openpond 0.2.61 → 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 (549) hide show
  1. package/README.md +2 -0
  2. package/dist/app-server.d.ts +4713 -477
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/{acp-FUAWCKBH.js → acp-H3MJCPHX.js} +1 -1
  5. package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-DWA7272M.js} +1 -1
  6. package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
  7. package/dist/chunks/{app-layer-4BFMOMKM.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-HAAYVEXB.js → app-server-evaluations-XGMGS67X.js} +1 -1
  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-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
  16. package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-2HAWOMZK.js} +1 -1
  17. package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
  18. package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
  19. package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
  20. package/dist/chunks/{chunk-LHENAWLH.js → chunk-42V4NV2F.js} +1 -1
  21. package/dist/chunks/{chunk-DW3GJRY3.js → chunk-4FNCBA3Y.js} +1 -1
  22. package/dist/chunks/{chunk-TXBIZDXG.js → chunk-4L6DU6Z2.js} +1 -1
  23. package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
  24. package/dist/chunks/{chunk-MLTKB5G3.js → chunk-4SZ3HKHU.js} +1 -1
  25. package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
  26. package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
  27. package/dist/chunks/chunk-5FU5RLML.js +2 -0
  28. package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-5MHYGMJG.js} +1 -1
  29. package/dist/chunks/chunk-6EBCS57F.js +2 -0
  30. package/dist/chunks/chunk-6RS4NAOY.js +2 -0
  31. package/dist/chunks/chunk-6XSSM4WT.js +3 -0
  32. package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
  33. package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
  34. package/dist/chunks/{chunk-BQUWZRWU.js → chunk-7WYL2IDD.js} +1 -1
  35. package/dist/chunks/chunk-7YLXGILH.js +2 -0
  36. package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
  37. package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
  38. package/dist/chunks/{chunk-TTN63EAM.js → chunk-AH26AQN7.js} +1 -1
  39. package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
  40. package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
  41. package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
  42. package/dist/chunks/chunk-B5R53U74.js +2 -0
  43. package/dist/chunks/chunk-BKEDG3A4.js +22 -0
  44. package/dist/chunks/{chunk-CO3OJFPU.js → chunk-BPZOABMC.js} +1 -1
  45. package/dist/chunks/{chunk-5VPU7OS7.js → chunk-BSPFY3Y5.js} +1 -1
  46. package/dist/chunks/{chunk-U4HZD2GM.js → chunk-BU27SLZP.js} +2 -2
  47. package/dist/chunks/chunk-C2AXMKK4.js +2 -0
  48. package/dist/chunks/{chunk-SIV5P6JO.js → chunk-C2LAEGOW.js} +2 -2
  49. package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-CZ5R4JXZ.js} +1 -1
  50. package/dist/chunks/{chunk-D4JZALZ4.js → chunk-DABBHWSF.js} +1 -1
  51. package/dist/chunks/{chunk-ROE24PN5.js → chunk-DLANLLKH.js} +1 -1
  52. package/dist/chunks/{chunk-57RY3LSR.js → chunk-DQI5TE6A.js} +2 -2
  53. package/dist/chunks/chunk-DTTFUANI.js +12 -0
  54. package/dist/chunks/{chunk-VBW2X42G.js → chunk-DUL6DXOI.js} +1 -1
  55. package/dist/chunks/{chunk-OQUKSRU3.js → chunk-ELX7VRSU.js} +1 -1
  56. package/dist/chunks/chunk-ERL2M773.js +3 -0
  57. package/dist/chunks/chunk-ERT32RZA.js +86 -0
  58. package/dist/chunks/{chunk-RPOD6I64.js → chunk-EZRUWIP6.js} +1 -1
  59. package/dist/chunks/{chunk-MCIIGQT7.js → chunk-F6UQ6PPK.js} +1 -1
  60. package/dist/chunks/chunk-F7QTIHXX.js +2 -0
  61. package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
  62. package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FVRII5XO.js} +1 -1
  63. package/dist/chunks/{chunk-GEXKTGLY.js → chunk-FYYYECHE.js} +50 -48
  64. package/dist/chunks/chunk-G32BO6M5.js +4 -0
  65. package/dist/chunks/{chunk-TSAW2QVU.js → chunk-G6OR5NB6.js} +1 -1
  66. package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GGJUWIGR.js} +1 -1
  67. package/dist/chunks/{chunk-Q66LWQGF.js → chunk-GPL2Z65R.js} +1 -1
  68. package/dist/chunks/{chunk-LNRFRAV5.js → chunk-GS6ZUSIN.js} +2 -2
  69. package/dist/chunks/{chunk-OFVUN4KI.js → chunk-GVARQXYI.js} +1 -1
  70. package/dist/chunks/chunk-GXCUH2VV.js +17 -0
  71. package/dist/chunks/{chunk-IUGK6BBY.js → chunk-GXZCMO6S.js} +1 -1
  72. package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
  73. package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
  74. package/dist/chunks/{chunk-I3W27VK4.js → chunk-HUCBKXTU.js} +1 -1
  75. package/dist/chunks/{chunk-P4XM7LUT.js → chunk-IHB5GTOJ.js} +2 -2
  76. package/dist/chunks/{chunk-U447MS3Y.js → chunk-IWWXIUAQ.js} +1 -1
  77. package/dist/chunks/chunk-J572ANHX.js +13 -0
  78. package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-J7ZTPXRQ.js} +1 -1
  79. package/dist/chunks/chunk-JCLTFDVW.js +2 -0
  80. package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
  81. package/dist/chunks/{chunk-ELYRVTTG.js → chunk-JORRZ4BB.js} +1 -1
  82. package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
  83. package/dist/chunks/chunk-JSQRLLN6.js +2 -0
  84. package/dist/chunks/chunk-KCOTDUGW.js +2 -0
  85. package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
  86. package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
  87. package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
  88. package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LK2K3SPM.js} +2 -2
  89. package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-LKKMLBOH.js} +1 -1
  90. package/dist/chunks/{chunk-BNZTJPK7.js → chunk-LSZJ5M3X.js} +1 -1
  91. package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
  92. package/dist/chunks/{chunk-4LZLO4OW.js → chunk-M3SCON53.js} +1 -1
  93. package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
  94. package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
  95. package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
  96. package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-N33D7KCW.js} +1 -1
  97. package/dist/chunks/chunk-N42HT64M.js +2 -0
  98. package/dist/chunks/{chunk-L3GA2CQI.js → chunk-N4VHLJBZ.js} +1 -1
  99. package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
  100. package/dist/chunks/chunk-NG2L6D7G.js +2 -0
  101. package/dist/chunks/{chunk-7EAWLYYB.js → chunk-NLYZ5K7U.js} +2 -2
  102. package/dist/chunks/{chunk-B47JMAVW.js → chunk-NT7N6KLE.js} +1 -1
  103. package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
  104. package/dist/chunks/{chunk-PAZDQRYU.js → chunk-NZTCH6K5.js} +1 -1
  105. package/dist/chunks/{chunk-CQF6QZEL.js → chunk-OG33QAG6.js} +1 -1
  106. package/dist/chunks/chunk-OTUBJV6C.js +6 -0
  107. package/dist/chunks/{chunk-TMMFF6DO.js → chunk-PBTXLQAU.js} +1 -1
  108. package/dist/chunks/chunk-Q34IF4PW.js +2 -0
  109. package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-QJ6KUVAR.js} +1 -1
  110. package/dist/chunks/{chunk-SID4X3YN.js → chunk-QU4UE73E.js} +1 -1
  111. package/dist/chunks/{chunk-I7JCARVH.js → chunk-R6VJDOQM.js} +3 -3
  112. package/dist/chunks/{chunk-6RVF2J47.js → chunk-R6WMY6AH.js} +1 -1
  113. package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-RDSVU6F6.js} +1 -1
  114. package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
  115. package/dist/chunks/{chunk-GQUS7MCH.js → chunk-RZUCVF2Q.js} +1 -1
  116. package/dist/chunks/chunk-SFKZITAG.js +9 -0
  117. package/dist/chunks/{chunk-MF35MALN.js → chunk-SHJY5RLU.js} +1 -1
  118. package/dist/chunks/chunk-SI5W5LBV.js +2 -0
  119. package/dist/chunks/chunk-SO42ZB5K.js +2 -0
  120. package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
  121. package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
  122. package/dist/chunks/{chunk-ZISYLRH6.js → chunk-TCOTXCV6.js} +1 -1
  123. package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
  124. package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
  125. package/dist/chunks/chunk-UPWJSNL5.js +2 -0
  126. package/dist/chunks/chunk-URNMC46H.js +157 -0
  127. package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
  128. package/dist/chunks/{chunk-WFVOG5PU.js → chunk-V7KR74NO.js} +1 -1
  129. package/dist/chunks/{chunk-QDBYLJGH.js → chunk-VHXDWAEH.js} +1 -1
  130. package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-W2TICQ62.js} +1 -1
  131. package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
  132. package/dist/chunks/chunk-WP2L2NY2.js +2 -0
  133. package/dist/chunks/chunk-WSOUMXH3.js +24 -0
  134. package/dist/chunks/chunk-WWQNMC7C.js +6 -0
  135. package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
  136. package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
  137. package/dist/chunks/{chunk-T4LLJC5N.js → chunk-XOB6FKQV.js} +1 -1
  138. package/dist/chunks/chunk-Y766IN7Y.js +2 -0
  139. package/dist/chunks/chunk-YCZZ62C2.js +2 -0
  140. package/dist/chunks/chunk-YM4PSVFW.js +4 -0
  141. package/dist/chunks/chunk-YNQWJWIC.js +10 -0
  142. package/dist/chunks/{chunk-LBBXVOVR.js → chunk-Z3BWCFLV.js} +1 -1
  143. package/dist/chunks/{chunk-WRQEYW3V.js → chunk-ZG6353RM.js} +1 -1
  144. package/dist/chunks/{chunk-PE7UKJXK.js → chunk-ZPTKR3GB.js} +1 -1
  145. package/dist/chunks/{chunk-2VXL6AU3.js → chunk-ZYVHOVKL.js} +1 -1
  146. package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
  147. package/dist/chunks/cli-PSXMIJTF.js +2 -0
  148. package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-XYKMXIWF.js} +1 -1
  149. package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
  150. package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
  151. package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-JONPTII6.js} +1 -1
  152. package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
  153. package/dist/chunks/{continual-CJUZM5ZQ.js → continual-Z7MO2PF6.js} +1 -1
  154. package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
  155. package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
  156. package/dist/chunks/datasets-2PC2HP7N.js +2 -0
  157. package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
  158. package/dist/chunks/dist-47AYOIH6.js +2 -0
  159. package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
  160. package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
  161. package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
  162. package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
  163. package/dist/chunks/experiments-SZQYR6MH.js +2 -0
  164. package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
  165. package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
  166. package/dist/chunks/{help-M2VQGPVC.js → help-7HXFWIKS.js} +1 -1
  167. package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
  168. package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
  169. package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
  170. package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
  171. package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
  172. package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
  173. package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
  174. package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
  175. package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
  176. package/dist/chunks/{hosted-profile-evaluation-preparation-ZAOGDQXO.js → hosted-profile-evaluation-preparation-2LSMZQNA.js} +1 -1
  177. package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
  178. package/dist/chunks/human-review-M26UKGJL.js +2 -0
  179. package/dist/chunks/{import-WLLUIDS6.js → import-6SI4BEKS.js} +2 -2
  180. package/dist/chunks/learning-HM3NWOV5.js +2 -0
  181. package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
  182. package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
  183. package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
  184. package/dist/chunks/opchat-AG4CWVY4.js +3 -0
  185. package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
  186. package/dist/chunks/organizations-KDKX77XZ.js +2 -0
  187. package/dist/chunks/{profile-JRS3JNRC.js → profile-O5HL5DTQ.js} +1 -1
  188. package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
  189. package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
  190. package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
  191. package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
  192. package/dist/chunks/{runtime-CBJF5GMB.js → runtime-XBA744HJ.js} +2 -2
  193. package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
  194. package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-27U3FQN7.js} +1 -1
  195. package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
  196. package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-FIPWOXWV.js} +1 -1
  197. package/dist/chunks/src-BLWX6DRG.js +424 -0
  198. package/dist/chunks/{src-4YZF6L6H.js → src-PU7QTFO5.js} +1 -1
  199. package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
  200. package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
  201. package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
  202. package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-K324SQTO.js} +1 -1
  203. package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-3LQMIYAP.js} +1 -1
  204. package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-3KSX7RSO.js} +1 -1
  205. package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
  206. package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
  207. package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
  208. package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
  209. package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
  210. package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
  211. package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
  212. package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
  213. package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-QTVHJAEP.js} +1 -1
  214. package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
  215. package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
  216. package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
  217. package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
  218. package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
  219. package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-DWV5XSMY.js} +1 -1
  220. package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-2KUY4T6M.js} +1 -1
  221. package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
  222. package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
  223. package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-UGVEFA6M.js} +1 -1
  224. package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
  225. package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-GEQIZELY.js} +1 -1
  226. package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
  227. package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-CQV7PL3V.js} +1 -1
  228. package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-XKN6K66J.js} +18 -10
  229. package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-Q7DTTR4S.js} +1 -1
  230. package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-XGAX7NLB.js} +1 -1
  231. package/dist/chunks/{taskset-NYLUYX6K.js → taskset-ARKJQKYQ.js} +1 -1
  232. package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
  233. package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
  234. package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-UTQAJA6H.js} +1 -1
  235. package/dist/chunks/training-3IWW4256.js +2 -0
  236. package/dist/chunks/{training-UBX6E7SK.js → training-RVIESURJ.js} +1 -1
  237. package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
  238. package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
  239. package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
  240. package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
  241. package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
  242. package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
  243. package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
  244. package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
  245. package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
  246. package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
  247. package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
  248. package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-7FBUBZ66.js} +1 -1
  249. package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-G3CMY7ZA.js} +1 -1
  250. package/dist/cli.js +2 -2
  251. package/dist/hosted-chat.d.ts +28 -0
  252. package/dist/index.js +1 -1
  253. package/dist/sandbox/url.d.ts +3 -1
  254. package/dist/skills/LICENSE +21 -0
  255. package/dist/skills/manifest.json +168 -0
  256. package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
  257. package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
  258. package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
  259. package/dist/skills/openpond-cli/SKILL.md +24 -7
  260. package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
  261. package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
  262. package/dist/skills/openpond-cli/references/experiments-and-training.md +156 -11
  263. package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
  264. package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
  265. package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
  266. package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
  267. package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
  268. package/dist/web/assets/App-DY2R8Z6r.js +53 -0
  269. package/dist/web/assets/App-DpFKLxuA.css +1 -0
  270. package/dist/web/assets/AppDialog-8Y0FYalT.js +1 -0
  271. package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
  272. package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-BiQbbVxq.js} +1 -1
  273. package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
  274. package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
  275. package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
  276. package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-J4ChOjvG.js} +1 -1
  277. package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
  278. package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
  279. package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
  280. package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
  281. package/dist/web/assets/CommunityView-Okydjpqm.js +1 -0
  282. package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
  283. package/dist/web/assets/ComposerCreateImproveStrip-CSngc8-V.js +1 -0
  284. package/dist/web/assets/ConversationImportsSettings-DS73kyfj.js +1 -0
  285. package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
  286. package/dist/web/assets/GetStartedView-DGFPQ1We.js +1 -0
  287. package/dist/web/assets/GettingStartedDialog-DFBYQdHz.js +1 -0
  288. package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
  289. package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
  290. package/dist/web/assets/HostedModelLearningSettings-CHaTHwC8.js +1 -0
  291. package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
  292. package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
  293. package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
  294. package/dist/web/assets/LabSkillSidebar-BwtlThO7.js +1 -0
  295. package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
  296. package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
  297. package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
  298. package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
  299. package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
  300. package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
  301. package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
  302. package/dist/web/assets/NewProjectDialog-CjrjgkTN.js +1 -0
  303. package/dist/web/assets/OutputsPage-jzx93QQ3.js +1 -0
  304. package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-C1M13qG2.js} +1 -1
  305. package/dist/web/assets/ProjectsPage-DZrjlMp2.js +1 -0
  306. package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
  307. package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
  308. package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
  309. package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
  310. package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
  311. package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
  312. package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
  313. package/dist/web/assets/TerminalOverlay-d7A2F9Lx.js +16 -0
  314. package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
  315. package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
  316. package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
  317. package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
  318. package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-FhYymrfc.js} +2 -2
  319. package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
  320. package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
  321. package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
  322. package/dist/web/assets/WorkspaceFileLocation-LrEWj4UK.js +1 -0
  323. package/dist/web/assets/WorkspaceGitDialogs-NRIMXnkS.js +1 -0
  324. package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
  325. package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
  326. package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
  327. package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
  328. package/dist/web/assets/bot-6OhUEmkE.js +1 -0
  329. package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
  330. package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
  331. package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-jmVA1BIf.js} +1 -1
  332. package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
  333. package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
  334. package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
  335. package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
  336. package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-BdQ_YDuk.js} +1 -1
  337. package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-Ck1ufAr8.js} +1 -1
  338. package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
  339. package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
  340. package/dist/web/assets/copy-CPkbMfXt.js +1 -0
  341. package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-CXQny8HU.js} +1 -1
  342. package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-CYxYl_om.js} +1 -1
  343. package/dist/web/assets/external-link-CDKOLG_v.js +1 -0
  344. package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-CEtOb_lK.js} +1 -1
  345. package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-CVMYZs3e.js} +1 -1
  346. package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
  347. package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-DoY4V_j0.js} +1 -1
  348. package/dist/web/assets/icons-D7jkCa2d.js +1 -0
  349. package/dist/web/assets/{image-C7HVlg3X.js → image-B-PjDSwU.js} +1 -1
  350. package/dist/web/assets/{index-BsPUniZy.js → index-D9WbJMSq.js} +2 -2
  351. package/dist/web/assets/index-g7UqJhnX.css +1 -0
  352. package/dist/web/assets/{info-BLWDShaz.js → info-CCnw-K3b.js} +1 -1
  353. package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
  354. package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-CeOpZdPj.js} +1 -1
  355. package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
  356. package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
  357. package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-BZX38cpr.js} +1 -1
  358. package/dist/web/assets/message-square-CvgSecgD.js +1 -0
  359. package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-CF2JDhi4.js} +2 -2
  360. package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-cbDqt48m.js} +2 -2
  361. package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-m2ze2EsL.js} +2 -2
  362. package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-yeyow_-Q.js} +2 -2
  363. package/dist/web/assets/{monitor-B6OuAu13.js → monitor-By0s4hxb.js} +1 -1
  364. package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-BJ2QgJLa.js} +1 -1
  365. package/dist/web/assets/{pdf-RXlFwNte.js → pdf-C4x-1jjP.js} +1 -1
  366. package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
  367. package/dist/web/assets/play-D_SuGDBM.js +1 -0
  368. package/dist/web/assets/plus-yw95Iaj8.js +1 -0
  369. package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-I86G1Gd9.js} +1 -1
  370. package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
  371. package/dist/web/assets/{python-BQXo7wMt.js → python-CqFTPj8r.js} +1 -1
  372. package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-Dga35Eay.js} +1 -1
  373. package/dist/web/assets/requests-BCbaFiqV.js +1 -0
  374. package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
  375. package/dist/web/assets/{save-BxXc21N6.js → save-BLKjYtzR.js} +1 -1
  376. package/dist/web/assets/settings-D7C-Auyi.js +21 -0
  377. package/dist/web/assets/settings-lists-DMKA1lCN.js +5 -0
  378. package/dist/web/assets/square-BY5lG2Ol.js +1 -0
  379. package/dist/web/assets/square-terminal-B-n7vUex.js +1 -0
  380. package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
  381. package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-BhmBE5XE.js} +1 -1
  382. package/dist/web/assets/training-QrdkRQZQ.js +2 -0
  383. package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-DB-jg6L_.js} +12 -12
  384. package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-BSWEII2p.js} +1 -1
  385. package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
  386. package/dist/web/assets/{upload-NXasN1wU.js → upload-C4MPhQn8.js} +1 -1
  387. package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-9oqWdRLs.js} +1 -1
  388. package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
  389. package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
  390. package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-BD0Uexmh.js} +1 -1
  391. package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-Cloe0WuQ.js} +1 -1
  392. package/dist/web/assets/{workers-u92Boudu.js → workers-BXagz5eg.js} +1 -1
  393. package/dist/web/assets/x-Dqpel42h.js +1 -0
  394. package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-sBdvVbCc.js} +1 -1
  395. package/dist/web/index.html +12 -3
  396. package/docs/command-reference.md +49 -5
  397. package/package.json +6 -2
  398. package/dist/chunks/actions-command-LOHNQUWP.js +0 -2
  399. package/dist/chunks/app-server-connected-apps-Q2VWWJNX.js +0 -2
  400. package/dist/chunks/app-server-harness-services-2PSZBT7U.js +0 -2
  401. package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
  402. package/dist/chunks/apps-7PIBF32Q.js +0 -2
  403. package/dist/chunks/chunk-3TYCIYW6.js +0 -17
  404. package/dist/chunks/chunk-4GZ2FPB5.js +0 -2
  405. package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
  406. package/dist/chunks/chunk-4N3UF3U5.js +0 -2
  407. package/dist/chunks/chunk-4P3X2RXA.js +0 -2
  408. package/dist/chunks/chunk-4RHM4WN2.js +0 -2
  409. package/dist/chunks/chunk-6DCXAXVD.js +0 -22
  410. package/dist/chunks/chunk-AWPYTDH4.js +0 -4
  411. package/dist/chunks/chunk-BLKTUFGB.js +0 -2
  412. package/dist/chunks/chunk-BN5AVRUG.js +0 -2
  413. package/dist/chunks/chunk-D5ADDBS5.js +0 -2
  414. package/dist/chunks/chunk-DGPGOBYZ.js +0 -5
  415. package/dist/chunks/chunk-E3EKBPCB.js +0 -2
  416. package/dist/chunks/chunk-E67M5WGY.js +0 -2
  417. package/dist/chunks/chunk-EIIGTADO.js +0 -2
  418. package/dist/chunks/chunk-F5JDBDYL.js +0 -2
  419. package/dist/chunks/chunk-FWIPHEVA.js +0 -12
  420. package/dist/chunks/chunk-GLVR74PX.js +0 -2
  421. package/dist/chunks/chunk-HZLV773Y.js +0 -22
  422. package/dist/chunks/chunk-JEVA7YQL.js +0 -3
  423. package/dist/chunks/chunk-KC7I6E6W.js +0 -2
  424. package/dist/chunks/chunk-M4ZRCRJM.js +0 -10
  425. package/dist/chunks/chunk-N663LL27.js +0 -2
  426. package/dist/chunks/chunk-NR5VASQB.js +0 -2
  427. package/dist/chunks/chunk-OJSK4NSW.js +0 -151
  428. package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
  429. package/dist/chunks/chunk-Q324ZA5M.js +0 -2
  430. package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
  431. package/dist/chunks/chunk-UJBEWIR3.js +0 -8
  432. package/dist/chunks/chunk-V67IFV26.js +0 -86
  433. package/dist/chunks/chunk-VSUHJ46L.js +0 -18
  434. package/dist/chunks/chunk-VWJ5IYQP.js +0 -2
  435. package/dist/chunks/chunk-X3WEQL3O.js +0 -2
  436. package/dist/chunks/chunk-XK7SPL63.js +0 -2
  437. package/dist/chunks/chunk-XLULTQLZ.js +0 -12
  438. package/dist/chunks/chunk-YR5ID2SS.js +0 -2
  439. package/dist/chunks/chunk-ZBBVRYU3.js +0 -6
  440. package/dist/chunks/chunk-ZHFH2TZN.js +0 -2
  441. package/dist/chunks/chunk-ZZWAQBA2.js +0 -2
  442. package/dist/chunks/cli-WC45SI7E.js +0 -2
  443. package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
  444. package/dist/chunks/connected-evidence-4J3YXU4O.js +0 -2
  445. package/dist/chunks/core-commands-JGXU6B4C.js +0 -2
  446. package/dist/chunks/dataset-preparation-authoring-DFGJBMVF.js +0 -4
  447. package/dist/chunks/datasets-MNHZAZIB.js +0 -2
  448. package/dist/chunks/desktop-test-P23MHAIG.js +0 -3
  449. package/dist/chunks/dist-IIFTZWNR.js +0 -2
  450. package/dist/chunks/evaluation-coordination-6NQEH5WU.js +0 -2
  451. package/dist/chunks/experiment-improvements-M27Z5OF4.js +0 -2
  452. package/dist/chunks/experiments-IWSCFDBB.js +0 -2
  453. package/dist/chunks/experiments-signal-R3NNH7WR.js +0 -2
  454. package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
  455. package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
  456. package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
  457. package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
  458. package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
  459. package/dist/chunks/hosted-profile-candidate-37ZFY2LH.js +0 -3
  460. package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
  461. package/dist/chunks/hosted-profile-evaluation-control-UQBMML6K.js +0 -2
  462. package/dist/chunks/hosted-profile-evaluation-inspection-YASS4T6L.js +0 -3
  463. package/dist/chunks/human-review-IJETDOWB.js +0 -2
  464. package/dist/chunks/learning-KVLTMRLD.js +0 -2
  465. package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
  466. package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
  467. package/dist/chunks/model-projects-AVBQDNYG.js +0 -2
  468. package/dist/chunks/opchat-KSOJEL4W.js +0 -3
  469. package/dist/chunks/organizations-DJRJWC5I.js +0 -2
  470. package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
  471. package/dist/chunks/project-agent-2KNJFNZI.js +0 -2
  472. package/dist/chunks/published-experiment-source-LFYHKFAO.js +0 -2
  473. package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
  474. package/dist/chunks/sandbox-command-IIGTPYN3.js +0 -2
  475. package/dist/chunks/saved-work-QA46KCME.js +0 -2
  476. package/dist/chunks/src-E7NWAN5B.js +0 -420
  477. package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
  478. package/dist/chunks/store-chat-resources-CGW7PDCG.js +0 -2
  479. package/dist/chunks/store-evaluation-results-V5J6L4NV.js +0 -7
  480. package/dist/chunks/store-harness-workspaces-HHMM6GNK.js +0 -2
  481. package/dist/chunks/store-human-review-V5H4QDHR.js +0 -7
  482. package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
  483. package/dist/chunks/store-model-batch-review-KMYPYWJR.js +0 -2
  484. package/dist/chunks/store-model-configuration-UXNC4PGY.js +0 -3
  485. package/dist/chunks/store-task-inbox-LNDCZOYE.js +0 -33
  486. package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
  487. package/dist/chunks/taskset-packages-I7I5KBFP.js +0 -2
  488. package/dist/chunks/training-error-AYOGHHL2.js +0 -2
  489. package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
  490. package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
  491. package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
  492. package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
  493. package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
  494. package/dist/web/assets/App-Df7uYQGj.css +0 -1
  495. package/dist/web/assets/App-Yy3l2sdD.js +0 -56
  496. package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
  497. package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
  498. package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
  499. package/dist/web/assets/ChatTimelineEntry-IKzZsHoI.js +0 -1
  500. package/dist/web/assets/CommandMenu-CBY2AJxV.js +0 -1
  501. package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
  502. package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
  503. package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
  504. package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
  505. package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
  506. package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
  507. package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
  508. package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
  509. package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
  510. package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
  511. package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
  512. package/dist/web/assets/LabsRoute-DOnw39du.js +0 -101
  513. package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
  514. package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
  515. package/dist/web/assets/MainPane-CuBUBA9F.css +0 -1
  516. package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
  517. package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
  518. package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
  519. package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
  520. package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
  521. package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
  522. package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
  523. package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
  524. package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
  525. package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
  526. package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
  527. package/dist/web/assets/TrainingMetricWorkbench-BmzHLwIP.js +0 -1
  528. package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
  529. package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
  530. package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
  531. package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
  532. package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
  533. package/dist/web/assets/app-models-BviS9b7U.js +0 -1
  534. package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
  535. package/dist/web/assets/chat-resources-CItQ4mZD.js +0 -1
  536. package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
  537. package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
  538. package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
  539. package/dist/web/assets/icons-kaq6k88m.js +0 -1
  540. package/dist/web/assets/index-DUMDOdB2.css +0 -1
  541. package/dist/web/assets/play-BPPQoqMl.js +0 -1
  542. package/dist/web/assets/plus-D18vYzHF.js +0 -1
  543. package/dist/web/assets/settings-BKmRueaw.js +0 -21
  544. package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
  545. package/dist/web/assets/square-Da8RuqW4.js +0 -1
  546. package/dist/web/assets/training-managed-adapter-81RrdT1k.js +0 -1
  547. package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
  548. package/dist/web/assets/useAgentInventory-BV4CUWzJ.js +0 -1
  549. /package/dist/chunks/{chunk-GLDYJM7O.js → chunk-T4QXKU5Y.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as vt,f as It}from"./chunk-OQPJ7FJF.js";import{a as Pt}from"./chunk-P7HRF4FM.js";import{ba as Ct}from"./chunk-GS6ZUSIN.js";import{a as At}from"./chunk-W5W4IODW.js";import{h as X,i as jt}from"./chunk-PWK5Z5S3.js";import{d as at}from"./chunk-MPNJ2BB4.js";import{a as yt}from"./chunk-KOKX7PBS.js";import{a as ge,b as be,c as he,d as St}from"./chunk-5EP2DZLJ.js";import{k as kt,l as _t,m as Rt}from"./chunk-5ZBLCWEJ.js";import{s as ue}from"./chunk-ZZHXQCNB.js";import{Fa as bt,Fb as ft,Ga as ht,Ua as pe,Va as w,Wa as xt,Xa as $,ab as J,ga as G}from"./chunk-YNQWJWIC.js";import{a as ot,c as de,d as it,e as rt}from"./chunk-UWHIU24L.js";import{G as $e,I as Je,J as C,K as se,L as T,M as le,N as U,P as Xe,Q as Ye,T as Qe,U as Ze,V as ce,X as et,Y as tt,Z as me,_ as nt,j as re,k as We,q as D,u as N,v as Ve,x as Ge}from"./chunk-BKEDG3A4.js";import{c as Be,d as Ke,f as I}from"./chunk-OE22TAXP.js";import{Hb as ut,Mb as pt,Pb as gt,d as st,e as lt,lb as ct,qb as mt,wb as dt}from"./chunk-PBZCXPPC.js";import{c as r,d as g,e as _,g as Ue,h as ze,n as Fe}from"./chunk-VVNV4NNW.js";import{A as e}from"./chunk-PF56N7ZY.js";import{a}from"./chunk-FTQLQJQV.js";var Mn=e.enum(["visual.published","file.preview_requested","task.inbox","task.input","task.wait","session.started","session.updated","session.title.updated","turn.started","assistant.delta","assistant.reasoning.delta","tool.started","tool.completed","skill.selected","skill.loaded","skill.load_failed","user_question.asked","user_question.answered","user_question.dismissed","approval.requested","approval.resolved","command.output","workspace_action","workspace_action_result","workspace.diff","create_improve.updated","session.context.updated","session.compaction.started","session.compaction.completed","session.compaction.failed","goal.continuation.started","goal.continuation.skipped","goal.continuation.failed","harness.refiner.queued","harness.refiner.started","harness.refiner.completed","harness.refiner.failed","turn.completed","turn.failed","turn.interrupted","session.closed",...Ve,"diagnostic"]),xe=e.object({id:e.string(),sequence:e.number().int().positive().optional(),sessionId:e.string().optional(),turnId:e.string().optional(),name:Mn,timestamp:e.string(),source:e.enum(["ui_button","chat_action","terminal_command","hook","provider","server"]).optional(),action:e.string().optional(),appId:e.string().nullable().optional(),args:e.record(e.string(),e.unknown()).optional(),status:e.enum(["started","completed","failed","pending"]).optional(),output:e.string().optional(),error:e.string().optional(),relatedDeploymentId:e.string().optional(),data:e.unknown().optional()}),$o=e.discriminatedUnion("target",[e.object({target:e.literal("local"),path:e.string().min(1),source:e.boolean()}).strict(),e.object({target:e.literal("sandbox"),path:e.string().min(1),sandboxId:e.string().min(1),source:e.boolean()}).strict()]);var Ln=e.enum(["slack","microsoft_teams","github","google","turnkey","x","mcp"]),Hn=e.enum(["search","read","write"]),qn=e.enum(vt),Zo=e.object({provider:Ln,operation:Hn,toolName:qn,sessionId:e.string().trim().min(1).max(200),turnId:e.string().trim().min(1).max(200),toolCallId:e.string().trim().min(1).max(300),userPrompt:e.string().max(2e5),connectionIds:e.array(e.string().trim().min(1).max(300)).min(1).max(8),capabilityIds:e.array(e.string().trim().min(1).max(200)).min(1).max(64),args:e.record(e.string(),e.unknown()).default({})}).strict().superRefine((t,n)=>{let i=It(t);i.ok||n.addIssue({code:e.ZodIssueCode.custom,message:i.error})}),ei=e.object({ok:e.boolean(),output:e.string().nullable().optional(),data:e.unknown().optional()}).strict();var fe="local_path:";function ai(t){return`${fe}${t.trim()}`}a(ai,"localPathWorkspaceId");function oi(t){return t.startsWith(fe)&&t.slice(fe.length).trim()||null}a(oi,"workspacePathFromLocalPathWorkspaceId");var ii=e.object({appId:e.string(),source:e.enum(["openpond","github","local_git","local_folder","unknown"]),workspacePath:e.string(),repoPath:e.string(),initialized:e.boolean(),remoteUrl:e.string().nullable(),expectedRemoteUrl:e.string().nullable(),currentBranch:e.string().nullable(),headCommit:e.string().nullable().optional().default(null),upstreamBranch:e.string().nullable().optional().default(null),ahead:e.number().int().nonnegative().optional().default(0),behind:e.number().int().nonnegative().optional().default(0),diverged:e.boolean().optional().default(!1),linkedSourceHeadCommit:e.string().nullable().optional().default(null),aheadOfLinkedSource:e.number().int().nonnegative().optional().default(0),behindLinkedSource:e.number().int().nonnegative().optional().default(0),divergedFromLinkedSource:e.boolean().optional().default(!1),linkedSourceComparisonError:e.string().nullable().optional().default(null),lastFetchAt:e.string().nullable().optional().default(null),defaultBranch:e.string().nullable(),branches:e.array(e.string()),dirty:e.boolean(),changedFilesCount:e.number(),untrackedFilesCount:e.number(),error:e.string().nullable(),updatedAt:e.string()}),Dn=e.object({path:e.string(),status:e.string(),additions:e.number(),deletions:e.number(),patch:e.string(),content:e.string().nullable().optional().default(null),contentType:e.string().optional(),contentEncoding:e.enum(["base64"]).optional(),readVersion:e.string().nullable().optional(),readStamp:e.string().optional()}),ri=e.object({appId:e.string(),repoPath:e.string(),initialized:e.boolean(),dirty:e.boolean(),filesChanged:e.number(),additions:e.number(),deletions:e.number(),repoFiles:e.array(e.string()).optional().default([]),files:e.array(Dn),error:e.string().nullable(),updatedAt:e.string()}),si=e.object({branch:e.string().trim().min(1).max(160)}),li=e.object({path:e.string().trim().min(1),content:e.string()}),Tt=e.object({line:e.number().int().nonnegative(),character:e.number().int().nonnegative()}),Nn=e.object({start:Tt,end:Tt}),Un=e.object({path:e.string(),range:Nn,severity:e.enum(["error","warning","info","hint"]),message:e.string(),source:e.string().nullable().optional().default(null),code:e.string().nullable().optional().default(null)}),wt=e.object({id:e.string(),root:e.string(),status:e.enum(["connected","unavailable","error"]),message:e.string().nullable().optional().default(null)}),ci=e.object({path:e.string().trim().min(1),content:e.string().optional(),waitForDiagnostics:e.boolean().optional().default(!0)}),mi=e.object({appId:e.string(),path:e.string(),diagnostics:e.array(Un),servers:e.array(wt),updatedAt:e.string()}),zn=e.object({operation:e.enum(["hover","definition","references","documentSymbol"]),path:e.string().trim().min(1),content:e.string().optional(),line:e.number().int().nonnegative().optional(),character:e.number().int().nonnegative().optional()}),di=e.object({appId:e.string(),operation:zn.shape.operation,path:e.string(),results:e.unknown(),servers:e.array(wt),updatedAt:e.string()}),Se=e.object({pinned:e.boolean().optional(),archived:e.boolean().optional(),order:e.number().optional()}),Et=e.record(e.string(),Se),Fn=e.object({path:e.string().min(1),title:e.string().min(1),contentType:e.string().min(1),sizeBytes:e.number().nonnegative().nullable(),sandboxId:e.string().nullable(),revision:e.string().optional(),updatedAt:e.string().optional()}),ui=e.object({files:e.array(Fn)});var u=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}),Ot=e.object({ref:u,revision:e.string().nullable(),sourceHash:e.string()});var z=e.enum(["chat","work","development"]),fi=e.enum(["chat","models","console","development"]),Mt="work";var ye=e.enum(["openpond.lab","openpond.ponder"]),E=e.object({id:e.string(),experience:z.default(Mt),provider:C,modelRef:I.nullable().optional(),openPondCommandAccessMode:T.default(Je),systemKind:ye.nullable().optional(),hiddenFromDefaultSidebar:e.boolean().optional(),parentSessionId:e.string().nullable().optional(),parentTurnId:e.string().nullable().optional(),subagentRunId:e.string().nullable().optional(),subagentRoleId:D.nullable().optional(),subagentDelegationMode:N.nullable().optional(),title:e.string(),appId:e.string().nullable(),appName:e.string().nullable(),workspaceKind:U.optional(),workspaceId:e.string().nullable().optional(),workspaceName:e.string().nullable().optional(),localProjectId:e.string().nullable().optional(),cloudProjectId:e.string().nullable().optional(),cloudTeamId:e.string().nullable().optional(),currentProfile:u.nullable().optional(),profileWorkflowBinding:st.nullable().optional(),profileComponentBinding:lt.nullable().optional(),metadata:e.record(e.string(),e.unknown()).optional(),cwd:e.string().nullable(),codexThreadId:e.string().nullable(),nativeAgent:e.object({provider:e.union([e.enum(["claude-code","grok-build","opencode"]),Be]),instanceId:e.string().min(1),sessionId:e.string().min(1),cwd:e.string().min(1)}).nullable().optional(),createdAt:e.string(),updatedAt:e.string(),status:e.enum(["idle","active","failed","closed"]),runtimeSeconds:e.number().int().nonnegative().optional(),runtimeRunningSince:e.string().nullable().optional(),pinned:e.boolean(),savedForLater:e.boolean().optional(),archived:e.boolean(),order:e.number()}),Ti=e.object({id:e.string(),sessionId:e.string(),providerTurnId:e.string().nullable(),modelRef:I.nullable().optional(),prompt:e.string(),startedAt:e.string(),completedAt:e.string().nullable(),status:e.enum(["in_progress","completed","failed","interrupted"]),error:e.string().nullable(),metadata:e.record(e.string(),e.unknown()).optional().default({}),createImproveRun:X.nullable().optional().default(null),profileSnapshot:Ot.nullable().optional(),harnessSnapshot:at.nullable().optional()});var Y=e.object({id:e.string().trim().min(1).max(191),agentId:e.string().trim().min(1).max(191).optional().nullable(),sourcePath:e.string().trim().min(1).max(2e3).optional().nullable(),sourceActionId:e.string().trim().min(1).max(191).optional().nullable(),name:e.string().trim().min(1).max(191).optional().nullable(),label:e.string().trim().min(1).max(160).optional().nullable(),description:e.string().trim().max(1e3).optional().nullable(),visibility:e.string().trim().max(80).optional().nullable(),inputSchema:e.union([e.string().trim().max(191),e.record(e.string(),e.unknown())]).optional().nullable(),outputSchema:e.union([e.string().trim().max(191),e.record(e.string(),e.unknown())]).optional().nullable(),approvalPolicy:e.record(e.string(),e.unknown()).optional().nullable(),artifactPolicy:e.record(e.string(),e.unknown()).optional().nullable(),setupRequirements:e.array(e.record(e.string(),e.unknown())).optional(),mcp:e.record(e.string(),e.unknown()).optional().nullable(),schedulePolicy:e.record(e.string(),e.unknown()).optional().nullable(),trace:e.record(e.string(),e.unknown()).optional().nullable(),implementation:e.record(e.string(),e.unknown()).optional().nullable(),invokesModel:e.boolean().optional()});var Bn=e.object({command:e.enum(["inspect","build","validate","eval","traces","run"]),status:e.enum(["passed","failed"]),checkedAt:e.string(),exitCode:e.number().nullable().optional(),sourceHead:e.string().nullable().optional()}),Kn=e.object({id:e.string(),name:e.string(),path:e.string(),enabled:e.boolean()}),ve=e.object({name:e.string(),description:e.string(),path:e.string(),scope:e.literal("profile"),enabled:e.boolean(),sourcePath:e.string(),charCount:e.number(),sourceHash:e.string(),validationStatus:e.enum(["valid","warning","error"]),validationMessages:e.array(e.string()),resourceFiles:e.array(e.string()).optional().default([])}),Wn=e.object({id:e.string(),name:e.string(),path:e.string(),agentId:e.string().nullable(),sourcePath:e.string()}),Ht=e.object({path:e.string(),originalPath:e.string().nullable().optional(),indexStatus:e.string().nullable(),worktreeStatus:e.string().nullable(),status:e.string(),category:e.enum(["added","modified","deleted","renamed","untracked","changed"])}),Vn=e.object({isRepo:e.boolean(),branch:e.string().nullable(),head:e.string().nullable(),shortHead:e.string().nullable(),dirty:e.boolean(),upstream:e.string().nullable(),ahead:e.number().nullable(),behind:e.number().nullable(),remoteUrl:e.string().nullable(),files:e.array(Ht),fileCount:e.number().int().nonnegative().optional(),error:e.string().nullable()}),Gn=e.object({actionCount:e.number(),generatedAt:e.string().nullable(),manifestPath:e.string().nullable(),registryPath:e.string().nullable(),stale:e.boolean(),error:e.string().nullable()}),$n=e.object({skillCount:e.number(),generatedAt:e.string().nullable(),stale:e.boolean(),error:e.string().nullable()}),Lt=e.object({ref:e.string(),source:e.enum(["action_catalog","source_upload_metadata"]),actionId:e.string().nullable(),kind:e.string().nullable(),label:e.string(),status:e.string(),required:e.boolean(),blocking:e.boolean()}),Jn=e.object({status:e.enum(["ready","setup_required","blocked"]),requirementCount:e.number(),blockingCount:e.number(),optionalMissingCount:e.number(),readyCount:e.number(),requirements:e.array(Lt),blockingRequirements:e.array(Lt)}),Xn=e.object({changedAgents:e.array(e.string()),newAgents:e.array(e.string()),deletedAgents:e.array(e.string()),changedSkills:e.array(e.string()).optional().default([]),changedActions:e.array(e.string()),changedExtensions:e.array(e.string()),setupChanges:e.array(e.string()),envRequirementChanges:e.array(e.string()),files:e.array(Ht),fileCount:e.number().int().nonnegative().optional()}),Yn=e.object({status:e.string(),agentId:e.string().nullable().optional(),deployPlanStatus:e.string().nullable().optional(),canRun:e.boolean().nullable().optional(),canDeploy:e.boolean().nullable().optional(),sourceRef:e.string().nullable().optional(),sourceCommitSha:e.string().nullable().optional(),manifestHash:e.string().nullable().optional(),manifestPath:e.string().nullable().optional(),setupCommands:e.array(e.string()).optional(),validationCommands:e.array(e.string()).optional(),requiredChecks:e.array(e.string()).optional(),evalNames:e.array(e.string()).optional(),blockedReasons:e.array(e.string()).optional(),staleReasons:e.array(e.string()).optional(),runtimeId:e.string().nullable().optional(),sandboxId:e.string().nullable().optional(),traceArtifactRefs:e.array(e.string()).optional(),evalResultArtifactRefs:e.array(e.string()).optional(),validatorArtifactRefs:e.array(e.string()).optional(),checkedAt:e.string().nullable().optional(),error:e.string().nullable().optional()}),Qn=e.object({status:e.string(),agentId:e.string().nullable().optional(),runtimeAgentId:e.string().nullable().optional(),projectId:e.string().nullable().optional(),sourceRoot:e.string().nullable().optional(),sourceRef:e.string().nullable().optional(),sourceCommitSha:e.string().nullable().optional(),manifestHash:e.string().nullable().optional(),manifestPath:e.string().nullable().optional(),manifestSyncedAt:e.string().nullable().optional(),fileCount:e.number().nullable().optional(),totalBytes:e.number().nullable().optional(),generatedManifestPath:e.string().nullable().optional(),synthesizedOpenPondYaml:e.boolean().nullable().optional(),uploadMetadataPath:e.string().nullable().optional(),setupCommands:e.array(e.string()).optional(),validationCommands:e.array(e.string()).optional(),materializedAt:e.string().nullable().optional(),error:e.string().nullable().optional()}),Zn=e.object({status:e.string(),agentId:e.string().nullable().optional(),snapshotId:e.string().nullable().optional(),sourceRef:e.string().nullable().optional(),sourceCommitSha:e.string().nullable().optional(),manifestHash:e.string().nullable().optional(),manifestPath:e.string().nullable().optional(),buildStatus:e.string().nullable().optional(),validationStatus:e.string().nullable().optional(),evalStatus:e.string().nullable().optional(),publishedAt:e.string().nullable().optional(),error:e.string().nullable().optional()}),ea=e.object({status:e.string(),agentId:e.string().nullable().optional(),runId:e.string().nullable().optional(),runtimeId:e.string().nullable().optional(),sandboxId:e.string().nullable().optional(),sourceRef:e.string().nullable().optional(),sourceCommitSha:e.string().nullable().optional(),manifestHash:e.string().nullable().optional(),setupGateStatus:e.string().nullable().optional(),setupRequirementRefs:e.array(e.string()).optional(),artifactRefs:e.array(e.string()).optional(),traceArtifactRefs:e.array(e.string()).optional(),evalArtifactRefs:e.array(e.string()).optional(),startedAt:e.string().nullable().optional(),completedAt:e.string().nullable().optional(),error:e.string().nullable().optional()}),ta=e.object({teamId:e.string().nullable(),projectId:e.string().nullable(),sourceRef:e.string().nullable(),sourceCommitSha:e.string().nullable(),lastPushedAt:e.string().nullable(),lastPushedLocalHead:e.string().nullable(),lastPushedHostedHead:e.string().nullable(),promotionStatus:e.string().nullable().optional().default(null),hostedRunStatus:e.string().nullable().optional().default(null),hostedRunAgentId:e.string().nullable().optional().default(null),hostedRunId:e.string().nullable().optional().default(null),hostedRunAt:e.string().nullable().optional().default(null),hostedSourceMaterialization:Qn.nullable().optional().default(null),hostedSourceCheck:Yn.nullable().optional().default(null),hostedPublish:Zn.nullable().optional().default(null),hostedRun:ea.nullable().optional().default(null)}),na=e.object({state:e.enum(["none","ready","dirty","pending_commit","error"]),message:e.string(),agentCount:e.number(),actionCount:e.number(),defaultAction:e.string().nullable(),checkFresh:e.boolean(),checkStaleReason:e.string().nullable(),localHead:e.string().nullable(),hostedHead:e.string().nullable()}),Ie=e.object({mode:e.enum(["none","local"]),repoPath:e.string().nullable(),activeProfile:e.string().nullable(),sourcePath:e.string().nullable(),manifestPath:e.string().nullable(),agents:e.array(Kn),skills:e.array(ve).optional().default([]),evals:e.array(Wn).optional().default([]),git:Vn.nullable(),catalog:Gn,skillCatalog:$n.optional().default({skillCount:0,generatedAt:null,stale:!0,error:null}),actionCatalog:e.array(Y),sourceSetupRequirements:e.array(e.record(e.string(),e.unknown())),setupGate:Jn,diff:Xn,hosted:ta.nullable(),summary:na,lastCheck:Bn.nullable(),error:e.string().nullable()}),aa=e.object({ref:u,name:e.string(),repoPath:e.string(),sourcePath:e.string().nullable(),state:Ie}),qt=e.object({lastUsed:u.nullable(),profiles:e.array(aa)});function Dt(){return{lastUsed:null,profiles:[]}}a(Dt,"emptyOpenPondProfileLibrary");function Nt(){return{mode:"none",repoPath:null,activeProfile:null,sourcePath:null,manifestPath:null,agents:[],skills:[],evals:[],git:null,catalog:{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!0,error:null},skillCatalog:{skillCount:0,generatedAt:null,stale:!0,error:null},actionCatalog:[],sourceSetupRequirements:[],setupGate:{status:"ready",requirementCount:0,blockingCount:0,optionalMissingCount:0,readyCount:0,requirements:[],blockingRequirements:[]},diff:{changedAgents:[],newAgents:[],deletedAgents:[],changedSkills:[],changedActions:[],changedExtensions:[],setupChanges:[],envRequirementChanges:[],files:[]},hosted:null,summary:{state:"none",message:"No active OpenPond profile.",agentCount:0,actionCount:0,defaultAction:null,checkFresh:!1,checkStaleReason:"No active profile.",localHead:null,hostedHead:null},lastCheck:null,error:null}}a(Nt,"emptyOpenPondProfileState");var oa=e.enum(["slack","microsoft_teams","github","google","turnkey","x","mcp"]),ia=e.enum(["slack","microsoft_teams","github","google","turnkey","x","mcp"]),ra=e.enum(["native_bot","oauth_connector","wallet_connector","mcp_endpoint"]),sa=e.object({kind:e.literal("integration"),provider:oa,appIds:e.array(ia).min(1).max(4),setupSurfaces:e.array(ra).min(1).max(4),connectionIds:e.array(e.string().trim().min(1)).max(8).optional(),capabilities:e.array(e.string().trim().min(1)).max(64).optional()}).strict(),P={maxAttachments:10,maxAttachmentBytes:12*1024*1024,maxAttachmentBase64Chars:Math.ceil(12*1024*1024*4/3)+16,maxTextChars:2e5},la=e.enum(["image","text","file"]),ca=e.object({sessionId:e.string().trim().min(1).max(200),turnId:e.string().trim().min(1).max(200),attachmentId:e.string().trim().min(1).max(200),storageName:e.string().trim().min(1).max(240),contentType:e.string().trim().min(1).max(160)}),ma=e.object({sessionId:e.string().trim().min(1).max(200),turnId:e.string().trim().min(1).max(200),attachmentId:e.string().trim().min(1).max(200),storageName:e.string().trim().min(1).max(1024),contentType:e.string().trim().min(1).max(160)}),Q=e.object({id:e.string().trim().min(1),name:e.string().trim().min(1).max(240),mediaType:e.string().trim().min(1).max(160),sizeBytes:e.number().int().nonnegative().max(P.maxAttachmentBytes),kind:la,lineCount:e.number().int().nonnegative().max(P.maxAttachmentBytes+1).optional(),relativePath:e.string().trim().min(1).max(1024).optional(),text:e.string().max(P.maxTextChars).optional(),contentsBase64:e.string().max(P.maxAttachmentBase64Chars).optional()}),tr=Q.omit({text:!0,contentsBase64:!0}).extend({imagePreview:ca.optional(),filePreview:ma.optional()}),nr=e.object({experience:z.optional(),provider:C.default($e),modelRef:I.optional(),openPondCommandAccessMode:T.optional(),systemKind:ye.nullable().optional(),hiddenFromDefaultSidebar:e.boolean().optional(),parentSessionId:e.string().trim().min(1).max(200).nullable().optional(),parentTurnId:e.string().trim().min(1).max(200).nullable().optional(),subagentRunId:e.string().trim().min(1).max(200).nullable().optional(),subagentRoleId:D.nullable().optional(),subagentDelegationMode:N.nullable().optional(),appId:e.string().nullable().optional(),appName:e.string().nullable().optional(),workspaceKind:U.optional(),workspaceId:e.string().nullable().optional(),workspaceName:e.string().nullable().optional(),localProjectId:e.string().nullable().optional(),cloudProjectId:e.string().nullable().optional(),cloudTeamId:e.string().nullable().optional(),currentProfile:u.nullable().optional(),profileWorkflowBinding:E.shape.profileWorkflowBinding,profileComponentBinding:E.shape.profileComponentBinding,metadata:e.record(e.string(),e.unknown()).optional(),cwd:e.string().nullable().optional(),title:e.string().optional(),autoTitlePrompt:e.string().trim().min(1).max(2e4).optional()}),ar=e.object({teamId:e.string().trim().min(1),projectName:e.string().trim().min(1).max(120).optional(),branch:e.string().trim().min(1).max(120).optional(),chatSessionId:e.string().trim().min(1).max(200).optional(),displayPrompt:e.string().trim().min(1).max(2e3).optional()}),or=e.object({branch:e.string().trim().min(1).max(120).optional()}),ir=e.object({prompt:e.string().min(1),workflowInput:e.unknown().optional(),metadata:e.record(e.string(),e.unknown()).optional(),usageAttribution:At.optional().nullable(),cwd:e.string().nullable().optional(),model:e.string().nullable().optional(),modelRef:I.optional(),mentionedAppIds:e.array(e.string().trim().min(1)).max(8).optional(),mentionedConnectedApps:e.array(sa).max(8).optional(),openPondActionCatalog:e.array(Y).max(100).optional(),attachments:e.array(Q).max(P.maxAttachments).optional(),createImproveRun:X.optional().nullable(),approvalPolicy:e.enum(["untrusted","on-failure","on-request","never"]).default("on-request"),sandbox:e.enum(["read-only","workspace-write","danger-full-access"]).default("workspace-write"),codexPermissionMode:se.default("default"),codexReasoningEffort:le.optional()}),rr=e.object({prompt:e.string().min(1),error:e.string().min(1),target:e.enum(["cloud_workspace","hybrid_sandbox"])}),sr=jt,lr=e.object({reason:e.enum(["manual"]).default("manual"),model:e.string().nullable().optional(),modelRef:I.optional()}),cr=e.object({hiddenFromDefaultSidebar:e.boolean().optional(),experience:z.optional(),provider:C.optional(),modelRef:I.nullable().optional(),openPondCommandAccessMode:T.optional(),pinned:e.boolean().optional(),savedForLater:e.boolean().optional(),archived:e.boolean().optional(),order:e.number().optional(),title:e.string().optional(),parentSessionId:e.string().trim().min(1).max(200).nullable().optional(),parentTurnId:e.string().trim().min(1).max(200).nullable().optional(),subagentRunId:e.string().trim().min(1).max(200).nullable().optional(),subagentRoleId:D.nullable().optional(),subagentDelegationMode:N.nullable().optional(),appId:e.string().nullable().optional(),appName:e.string().nullable().optional(),workspaceKind:U.optional(),workspaceId:e.string().nullable().optional(),workspaceName:e.string().nullable().optional(),localProjectId:e.string().nullable().optional(),cloudProjectId:e.string().nullable().optional(),cloudTeamId:e.string().nullable().optional(),currentProfile:u.nullable().optional(),metadata:e.record(e.string(),e.unknown()).optional(),cwd:e.string().nullable().optional()}),mr=e.object({command:e.string().trim().min(1),cwd:e.string().trim().min(1).max(4096).nullable().optional(),timeoutSeconds:e.number().int().min(1).max(3600).optional()}),dr=Se,ur=e.object({appIds:e.array(e.string()).min(1)}),pr=e.object({expectedRevision:e.string().optional(),defaultChatProvider:C.optional(),defaultChatModel:e.string().min(1).optional(),defaultChatModelRef:I.nullable().optional(),subagents:Ge.optional(),codexPermissionMode:se.optional(),codexReasoningEffort:le.optional(),openPondCommandAccessMode:T.optional(),defaultBranchPrefix:e.string().trim().max(48).optional(),defaultNewProjectDirectory:e.string().trim().max(4096).optional(),defaultTeamId:e.string().trim().max(191).nullable().optional(),advancedWorkspaceControls:e.boolean().optional(),steerActiveResponses:e.boolean().optional(),contextCompaction:Qe.optional(),training:Ze.optional(),sidebarWidth:e.number().int().min(244).max(560).optional(),diffPanelWidth:e.number().int().min(320).max(2400).optional(),sidebarSectionsCollapsed:Xe.optional(),editor:Ye.optional()}),gr=We,br=e.object({message:e.string().trim().min(1).max(4e3),surface:e.string().trim().min(1).max(120).default("app"),stack:e.string().max(12e3).nullable().optional(),context:e.record(e.string(),e.unknown()).optional()}).strict();var hr=e.object({activeTemplateId:tt,templateName:e.string().trim().min(1).max(80),soul:e.string().trim().min(1).max(8e3),saveAsNew:e.boolean().optional().default(!1)}),xr=e.object({decision:e.enum(["accept","acceptForSession","decline","cancel"]),answers:e.record(e.string().min(1).max(2e3),e.string().trim().min(1).max(8e3)).optional()}),fr=e.object({branch:e.string().trim().min(1).max(240).nullable().optional(),surface:e.enum(["desktop","terminal"])}),Sr=e.object({handle:e.string().min(1),baseUrl:e.string().nullable().optional()}),yr=e.object({handle:e.string().min(1),baseUrl:e.string().nullable().optional()}),vr=e.object({handle:e.string().min(1).optional(),apiKey:e.string().min(1),baseUrl:e.string().nullable().optional(),apiBaseUrl:e.string().nullable().optional(),chatApiBaseUrl:e.string().nullable().optional(),environment:e.string().nullable().optional(),setActive:e.boolean().optional()}),Ir=e.object({handle:e.string().min(1),currentBaseUrl:e.string().nullable().optional(),apiKey:e.string().min(1).optional(),baseUrl:e.string().nullable().optional(),apiBaseUrl:e.string().nullable().optional(),chatApiBaseUrl:e.string().nullable().optional(),environment:e.string().nullable().optional(),setActive:e.boolean().optional()});var da=e.enum(["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]),O=e.object({version:e.literal(1),kind:e.enum(["once","daily","weekdays","weekly","monthly"]),timeZone:e.string().trim().min(1).max(100),startDate:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),localTime:e.string().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),weekdays:e.array(da).min(1).max(7).optional(),dayOfMonth:e.number().int().min(1).max(31).optional(),end:e.discriminatedUnion("kind",[e.object({kind:e.literal("never")}),e.object({kind:e.literal("on_date"),date:e.string().regex(/^\d{4}-\d{2}-\d{2}$/)}),e.object({kind:e.literal("after_occurrences"),occurrences:e.number().int().min(1).max(1e5)})])}).superRefine((t,n)=>{t.kind==="weekly"&&!t.weekdays?.length&&n.addIssue({code:"custom",message:"Weekly recurrence requires at least one weekday.",path:["weekdays"]}),t.kind==="monthly"&&t.dayOfMonth===void 0&&n.addIssue({code:"custom",message:"Monthly recurrence requires a day of month.",path:["dayOfMonth"]})}),ua=e.object({id:e.string(),expression:e.string().nullable(),timeZone:e.string(),recurrence:O.nullable(),configurationVersion:e.number().int(),enabled:e.boolean(),nextRunAt:e.string().nullable(),lastTriggeredAt:e.string().nullable(),delivery:e.record(e.string(),e.unknown()).default({})}),pa=e.object({id:e.string(),definitionKey:e.string(),version:e.number().int(),name:e.string(),prompt:e.string(),modelId:e.string(),schedules:e.array(ua)}),ga=e.object({id:e.string(),definitionId:e.string(),scheduleId:e.string().nullable(),definitionName:e.string(),definitionVersion:e.number().int(),conversationId:e.string(),triggerKind:e.enum(["manual","schedule","webhook","retry"]),status:e.string(),notificationStatus:e.string(),deliveryStatus:e.string(),deliveryError:e.string().nullable(),createdAt:e.string()}),Pr=e.object({definitions:e.array(pa),runs:e.array(ga),asOf:e.string(),webBaseUrl:e.string().url().optional()}),jr=e.object({clientRequestId:e.string().trim().min(1).max(191),sourceTurnId:e.string().trim().min(1).max(191).nullable().optional(),targetSessionId:e.string().trim().min(1).max(191).nullable().optional(),name:e.string().trim().min(1).max(180),prompt:e.string().trim().min(1).max(2e4),recurrence:O,modelId:e.string().trim().min(1).max(191).default("openpond-chat")}),Ar=e.union([e.object({enabled:e.boolean()}),e.object({name:e.string().trim().min(1).max(180),prompt:e.string().trim().min(1).max(2e4),recurrence:O})]),Ut=e.enum(["queued","running","succeeded","failed"]),zt=e.object({id:e.string(),sessionId:e.string(),sessionTitle:e.string(),sourceTurnId:e.string().nullable(),name:e.string(),prompt:e.string(),profileRef:u.optional(),profileWorkflowId:e.string().optional(),profileMigrationError:e.string().nullable().optional(),recurrence:O,enabled:e.boolean(),nextRunAt:e.string().nullable(),lastRunAt:e.string().nullable(),lastRunStatus:Ut.nullable(),lastRunId:e.string().nullable(),lastError:e.string().nullable(),scheduledRunCount:e.number().int().nonnegative(),createdAt:e.string(),updatedAt:e.string()}),ba=e.object({definitionSnapshot:zt.optional(),configurationSnapshot:e.record(e.string(),e.unknown()).optional(),id:e.string(),workflowId:e.string(),sessionId:e.string(),scheduledFor:e.string(),trigger:e.enum(["schedule","manual"]),status:Ut,turnId:e.string().nullable(),error:e.string().nullable(),createdAt:e.string(),startedAt:e.string().nullable(),completedAt:e.string().nullable(),updatedAt:e.string()}),Cr=e.object({sessionId:e.string().trim().min(1).max(191),sourceTurnId:e.string().trim().min(1).max(191).nullable().optional(),name:e.string().trim().min(1).max(180),prompt:e.string().trim().min(1).max(2e4),recurrence:O}),Tr=e.union([e.object({enabled:e.boolean()}),e.object({name:e.string().trim().min(1).max(180),prompt:e.string().trim().min(1).max(2e4),recurrence:O})]),wr=e.object({workflows:e.array(zt),runs:e.array(ba),asOf:e.string()});var j=e.string().min(1).max(200),ha=e.string().regex(/^[a-f0-9]{64}$/),ke=e.object({manifestHash:ha,workspaceId:j,sessionId:j,turnId:j,baseCommit:e.string().regex(/^[a-f0-9]{40,64}$/),fileCount:e.number().int().nonnegative().max(2e4)}).strict(),Ft=e.object({handoffId:j,title:e.string().trim().min(1).max(300),kind:e.literal("review"),role:e.enum(["preparation","successor"]),prerequisiteOperationId:j,prerequisiteSessionId:j,preparationOperationId:j.optional(),source:ke.optional()}).strict();function xa(t,n,i){function l(c){if(c===null||typeof c=="string"||typeof c=="boolean"||typeof c=="number"&&Number.isFinite(c))return c;if(Array.isArray(c))return c.map(l);if(c&&typeof c=="object"&&Object.getPrototypeOf(c)===Object.prototype)return Object.fromEntries(Object.keys(c).sort().map(p=>[p,l(c[p])]));throw new Error("canonical_payload_not_json")}return a(l,"canonical"),JSON.stringify([t,n,l(i)])}a(xa,"canonicalRequestContent");var Nr=e.object({sessionId:e.string().min(1).max(200),creationHash:e.string().regex(/^[a-f0-9]{64}$/),sessionRevision:e.string().regex(/^[a-f0-9]{64}$/),executionRevision:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),o=e.string().trim().min(1).max(200),k=e.string().regex(/^[a-f0-9]{64}$/),Ur=15e3;var zr=5*6e4,L=e.object({installationId:e.string().uuid(),profileId:o,ownerUserId:o,teamId:o,bindingId:o,bindingRevision:e.number().int().positive()}).strict(),Fr=e.object({version:e.literal(1),scope:L,epoch:e.string().uuid().nullable(),runtimeId:e.string().uuid(),audience:e.string().url(),nonce:e.string().uuid(),issuedAt:e.string().datetime(),payloadHash:k,signature:e.string().regex(/^[A-Za-z0-9+/]{86}==$/)}).strict();function Br(t){return JSON.stringify([t.version,t.scope.installationId,t.scope.profileId,t.scope.ownerUserId,t.scope.teamId,t.scope.bindingId,t.scope.bindingRevision,t.epoch,t.runtimeId,t.audience,t.nonce,t.issuedAt,t.payloadHash])}a(Br,"ponderDesktopProofMessage");var Re=e.object({id:o,kind:e.enum(["session","starter"]),title:e.string().trim().min(1).max(300),providerId:o,modelId:e.string().trim().min(1).max(300).nullable(),experience:e.enum(["chat","work"]),workspaceId:o,workspaceLabel:e.string().trim().min(1).max(300),profileSelectionId:o.nullable(),revision:k,available:e.boolean(),unavailableReason:e.string().max(500).nullable(),canMessage:e.boolean(),canSteer:e.boolean(),canStop:e.boolean(),activeTurnId:o.nullable()}).strict(),Bt=2e4,Kr=e.object({revision:k,capturedAt:e.string().datetime(),targets:e.array(Re).max(Bt)}).strict(),Z=100,Kt=e.object({revision:k,capturedAt:e.string().datetime(),targetCount:e.number().int().min(0).max(Bt),pageCount:e.number().int().min(0).max(200)}).strict().refine(t=>t.pageCount===Math.ceil(t.targetCount/Z),{message:"ponder_desktop_catalog_page_count_invalid"}),Wr=e.object({catalog:Kt,index:e.number().int().min(0).max(199),targets:Re.array().min(1).max(Z)}).strict().refine(t=>t.index<t.catalog.pageCount&&t.targets.length===Math.min(Z,t.catalog.targetCount-t.index*Z),{message:"ponder_desktop_catalog_page_size_invalid"}),Vr=e.object({revision:k,pageIndex:e.number().int().min(0).max(199)}).strict(),Gr=e.object({scope:L,publicKey:e.string().min(1).max(512),runtimeId:e.string().uuid(),epoch:e.string().uuid(),authorizationRevision:e.number().int().positive(),reauthorizationGeneration:e.number().int().nonnegative().default(0),state:e.enum(["attached","revoked"]),leaseExpiresAt:e.string().datetime(),catalog:Kt.nullable()}).strict(),M={targetId:o,targetRevision:k},_e=e.string().trim().min(1).max(32e3),fa=e.discriminatedUnion("action",[e.object({...M,action:e.literal("create"),prompt:_e,title:e.string().trim().min(1).max(300)}).strict(),e.object({...M,action:e.literal("message"),prompt:_e}).strict(),e.object({...M,action:e.literal("steer"),prompt:_e,expectedTurnId:o}).strict(),e.object({...M,action:e.literal("stop"),expectedTurnId:o}).strict(),e.object({...M,action:e.literal("observe"),expectedTurnId:o}).strict(),e.object({...M,action:e.literal("inspect"),expectedTurnId:o}).strict()]),Sa=e.object({scope:L,epoch:e.string().uuid(),originChatTurnId:o,originToolCallId:o,humanControlId:o.optional(),authorizationRevision:e.number().int().positive()}).strict(),$r=e.object({scope:L,epoch:e.string().uuid(),runtimeId:e.string().uuid(),authorizationRevision:e.number().int().positive()}).strict(),Jr=e.object({id:o,origin:Sa,payloadHash:k,intent:fa,target:Re,workflow:Ft.optional(),state:e.enum(["ready","dispatching","admitted","completed","failed","cancelled","expired","attention"]),claimId:e.string().uuid().nullable(),claimedEpoch:e.string().uuid().nullable(),expiresAt:e.string().datetime(),admittedAt:e.string().datetime().nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime(),receipt:e.object({sessionId:o,sessionTitle:e.string().min(1).max(300),inputId:o.nullable(),turnId:o.nullable(),state:o}).strict().nullable(),error:e.string().max(1e3).nullable()}).strict(),ya=e.object({operationId:o,payloadHash:k,sessionId:o,sessionTitle:e.string().min(1).max(300),inputId:o.nullable(),turnId:o,completedAt:e.string().datetime(),outcome:e.enum(["completed","failed","cancelled"]),body:e.string().max(128e3),bodyTruncated:e.boolean(),assistantEventIds:e.array(o).max(2e3),providerId:o,modelId:o.nullable(),workspaceId:o,outputs:e.array(e.object({id:o,title:e.string().min(1).max(300),contentType:o,sizeBytes:e.number().int().nonnegative(),sha256:k}).strict()).max(100),error:e.string().max(2e3).nullable(),source:ke.optional(),sourceError:e.string().max(1e3).optional()}).strict();function Xr(t){return{origin:t.origin,intent:t.intent,target:t.target,...t.workflow?{workflow:t.workflow}:{}}}a(Xr,"ponderDesktopOperationContent");var Yr=e.object({version:e.literal(1),direction:e.enum(["sent","received"]),operationId:o,installationId:e.string().uuid(),profileId:o,ownerUserId:o,teamId:o,sessionId:o,title:e.string().min(1).max(300),turnId:o.nullable(),receiptId:o,status:o,body:e.string(),outputs:ya.shape.outputs}).strict();var us=e.object({rootPath:e.string(),sourcePath:e.string(),binding:it,currentRelease:de,releases:e.array(de),transitions:e.array(rt)}).strict(),ps=e.object({profile:ot,activate:e.boolean().default(!0),reason:e.string().trim().min(1).max(1e4),actor:e.string().trim().min(1).max(240).default("local-user"),authoringSkillHash:e.string().regex(/^[a-f0-9]{64}$/).nullable().default(null)}).strict(),gs=e.object({release:Ue,reason:e.string().trim().min(1).max(1e4),actor:e.string().trim().min(1).max(240).default("local-user")}).strict();var y=e.string().trim().min(1).max(240),Wt=e.object({teamId:y,actorId:y}).strict(),ee=e.discriminatedUnion("location",[e.object({location:e.literal("local"),jobId:y,owner:Wt,modelRunId:y,modelId:y,modelVersionId:y.nullable(),adapterArtifactLineageId:y.nullable()}).strict(),e.object({location:e.literal("cloud"),jobId:y,owner:Wt,apiOrigin:e.url().max(2e3),modelProjectId:y,portableProjectId:y,submissionHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict()]);var F=32e3,Is=128,ks=64e3,va=e.enum(["steer","message","followup","queued","result"]),Ia=e.enum(["pending","included","resolved","cancelled","rejected"]),ka=e.object({id:e.string().min(1),sequence:e.number().int().nonnegative(),sessionId:e.string().min(1),senderSessionId:e.string().min(1).nullable(),senderKind:e.enum(["user","task","runtime","ponder"]),kind:va,body:e.string().trim().min(1).max(F),payload:e.record(e.string(),e.unknown()).default({}),idempotencyKey:e.string().min(1).max(200),replyTo:e.string().min(1).nullable(),expectedTurnId:e.string().min(1).nullable(),turnId:e.string().min(1).nullable(),requestIds:e.array(e.string()),state:Ia,revision:e.number().int().positive(),createdAt:e.string(),updatedAt:e.string(),error:e.string().nullable()}).strict(),_a=e.object({scopeId:e.string().trim().min(1).max(240),selectionVersion:e.number().int().nonnegative(),evaluationModel:e.string().min(1).max(500).optional(),executionLocation:e.enum(["local","cloud"]).optional(),training:e.array(ee).max(16).optional(),resources:e.array(e.object({kind:e.enum(["dataset","grader","experiment"]),id:e.string().trim().min(1).max(240),revision:e.number().int().positive(),datasetId:e.string().trim().min(1).max(240).optional(),datasetRevision:e.number().int().positive().optional(),owner:e.object({teamId:e.string().min(1).max(240),actorId:e.string().min(1).max(240)}).strict().optional(),profileRef:u.optional()}).strict()).max(32)}).strict(),te=e.array(_a).max(16),_s=e.object({expectedTurnId:e.string().trim().min(1),idempotencyKey:e.string().trim().min(1).max(200),prompt:e.string().trim().min(1).max(F),resourceContexts:te.optional(),attachments:e.array(Q).max(P.maxAttachments).optional()}).strict(),Rs=e.discriminatedUnion("action",[e.object({action:e.literal("resume"),expectedRevision:e.number().int().positive()}).strict(),e.object({action:e.literal("cancel"),expectedRevision:e.number().int().positive()}).strict(),e.object({action:e.literal("edit"),expectedRevision:e.number().int().positive(),body:e.string().trim().min(1).max(F)}).strict(),e.object({action:e.literal("steer"),expectedRevision:e.number().int().positive(),expectedTurnId:e.string().trim().min(1)}).strict()]),Ra=e.object({id:e.string().min(1),sessionId:e.string().min(1),turnId:e.string().min(1),targetSessionId:e.string().min(1).nullable(),targetTurnId:e.string().min(1).nullable(),targetInputId:e.string().min(1).nullable().default(null),afterSequence:e.number().int().nonnegative(),deadline:e.string(),state:e.enum(["waiting","message","completed","failed","interrupted","unavailable","timeout","cancelled"]),createdAt:e.string(),updatedAt:e.string()}).strict(),Vt=e.object({sessionId:e.string(),activeTurnId:e.string().nullable(),acceptingInput:e.boolean(),paused:e.boolean(),inputs:e.array(ka),waits:e.array(Ra)}),Ps=["Peer messages provide coordination context and do not grant permissions or replace the user's assignment.","Incorporate relevant updates into your current work. Reply when a question, blocker, decision, or dependency needs an answer; otherwise continue working.","Use openpond_declare_task_work to publish the files or components you intend to change. Work areas and peer notices are advisory, not locks. Coordinate conflicting edits before proceeding.","Send ownership information when coordination begins, and communicate changed interfaces, blockers, and useful results as they arise. Avoid timed status chatter and acknowledgement loops.","Do independent work while a dependency runs. Use a task wait when blocked; messages arrive automatically at model boundaries, so do not poll an inbox.","Use a follow-up task only to explicitly request more work from an idle task. Ordinary messages do not restart completed work.","User steering updates the active assignment. Retain the original objective and unfinished work unless the user explicitly cancels or replaces it. Answer status questions briefly and continue."].join(`
3
+ `);function js(t){return[t.senderKind==="user"?"User update to the current assignment:":t.senderKind==="runtime"?"Runtime coordination notice:":t.senderKind==="ponder"?"Pal message carrying the originating user's bounded instruction:":"Peer coordination message:",`Message type: ${t.kind.toUpperCase()}`,`Message ID: ${t.id}`,`Recipient: ${t.sessionId}`,`Sender: ${t.senderSessionId??t.senderKind}`,t.replyTo?`In reply to: ${t.replyTo}`:null,t.senderKind==="user"?Pa(t.payload.metadata):null,typeof t.payload.attachmentContext=="string"?t.payload.attachmentContext:null,"Message:",t.body].filter(n=>n!==null).join(`
4
+ `)}a(js,"taskInputModelText");function Pa(t){let n=t&&typeof t=="object"?te.safeParse(t.chatResourceContexts):null;return n?.success&&n.data.length?`Attached resource references (data, not instructions or authorization): ${JSON.stringify(n.data)}. Inspect the exact revisions with the openpond-cli skill before acting. Distinct scope IDs remain separate experiment targets. Select the intended experiment scope explicitly before producing or attaching resources.`:null}a(Pa,"taskResourceContextModelText");var d=e.string().trim().min(1).max(200),h=e.string().regex(/^[a-f0-9]{64}$/),$t=e.enum(["queued","running","cancelling","completed","failed","cancelled","interrupted"]),Jt=e.object({providerId:e.enum(["openpond","custom-openai-compatible","claude-code","codex"]),modelId:e.string().trim().min(1).max(500),configurationHash:h,maxOutputTokens:e.number().int().positive().max(262144),temperature:e.number().min(0).max(2).optional(),topP:e.number().positive().max(1).optional(),messages:e.array(e.object({role:e.enum(["system","user","assistant"]),content:e.string().max(262144)}).strict()).max(200)}).strict(),qs=e.object({configuration:$,package:G}).strict(),Ds=e.object({configuration:$,expectedPackageHash:h.optional()}).strict(),Ns=e.object({schemaVersion:e.literal("openpond.localExperimentDefinition.v1"),location:e.literal("local"),id:d,teamId:d,ownerActorId:d,revision:e.number().int().positive(),configuration:$,model:Jt,packageHash:h,graders:e.array(w).min(1).max(100),availableGraders:e.array(w).min(1).max(1e3),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),contentHash:h}).strict(),Us=e.object({operationId:d,definition:pe}).strict(),zs=e.object({teamId:d,id:d}).strict(),Fs=e.object({teamId:d,projectId:d.optional(),status:$t.optional(),datasetHash:h.optional(),search:e.string().max(100).optional(),afterId:d.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),je=e.object({schemaVersion:e.literal("openpond.localExperimentExecution.v1"),location:e.literal("local"),id:d,teamId:d,ownerActorId:d,operationId:d,definition:pe,kind:e.enum(["target","scoring"]),executionHash:h,sourceExecution:e.object({id:d,executionHash:h}).strict().nullable(),packageHash:h,maximumCostUsd:e.number().finite().positive(),status:$t,createdAt:e.iso.datetime(),completedAt:e.iso.datetime().nullable(),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),completed:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative(),unknown:e.number().int().nonnegative()}).strict(),usage:e.object({knownCostUsd:e.number().finite().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),heldUsd:e.number().finite().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict(),cleanupComplete:e.boolean(),error:e.string().max(2e3).nullable()}).strict(),ja=je.omit({definition:!0});function Ae(t,n){t.kind==="scoring"!=(t.sourceExecution!==null)&&n.addIssue({code:"custom",message:"Only retained scoring passes name an original execution."}),["completed","failed","cancelled","interrupted"].includes(t.status)&&(!t.completedAt||t.counts.pending||t.counts.running)&&n.addIssue({code:"custom",message:"Terminal local execution requires complete population accounting."}),["completed","cancelled"].includes(t.status)&&!t.cleanupComplete&&n.addIssue({code:"custom",message:"Successful completion or cancellation requires confirmed local transport cleanup."}),t.usage.uncertainRequests>0&&t.usage.costUsd!==null&&n.addIssue({code:"custom",message:"Uncertain provider charges cannot claim a measured total."})}a(Ae,"validateLocalExecutionState");var Bs=je.superRefine(Ae),B=ja.superRefine(Ae),Aa=e.object({configuration:J,package:G}).strict(),Ca=e.object({configuration:J,expectedPackageHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),Pe=e.object({configuration:J,model:Jt,packageHash:e.string().regex(/^[a-f0-9]{64}$/),graders:e.array(w).min(1).max(100),availableGraders:e.array(w).min(1).max(1e3),retainedConfigurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional(),configurationHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().superRefine((t,n)=>{let{configurationHash:i,...l}=t;Fe(l)!==i&&n.addIssue({code:"custom",message:"Local configuration snapshot bytes changed."})}),{definition:Ks,...Ta}=je.shape,ne=e.object({...Ta,kind:e.literal("target"),...Pe.shape}).strict().superRefine((t,n)=>{let i={configuration:t.configuration,model:t.model,packageHash:t.packageHash,graders:t.graders,availableGraders:t.availableGraders,...t.retainedConfigurationHash?{retainedConfigurationHash:t.retainedConfigurationHash}:{},configurationHash:t.configurationHash};Ae(t,n),Pe.safeParse(i).success||n.addIssue({code:"custom",message:"Local Experiment configuration changed."}),(t.operationId!==t.configuration.operationId||t.teamId!==t.configuration.request.teamId||t.maximumCostUsd!==t.configuration.maximumCostUsd)&&n.addIssue({code:"custom",message:"Local Experiment differs from its sealed admission."})}),wa=e.object({items:e.array(ne).max(100),nextCursor:e.string().nullable()}).strict(),Ea=e.object({teamId:e.string().min(1).max(200),id:e.string().min(1).max(200),configurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),Oa=e.object({operationId:d,execution:e.object({id:d,executionHash:h}).strict(),graderPackage:G,graders:e.array(xt).min(1).max(100),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),Ws=Oa.omit({graderPackage:!0}),Ma=dt,La=e.object({sessionId:d,turnId:d,source:ct,profileRef:u,admissionHash:h,modelConfigurationHash:h,traceHash:h,runtimeEventRefs:e.array(d).max(1e4),startedAt:e.iso.datetime(),completedAt:e.iso.datetime(),outputHash:h,partialOutputAvailable:e.boolean()}).strict(),Xt=e.object({receiptId:d,taskId:d,seed:e.string(),status:e.enum(["pending","running","completed","failed","cancelled","unknown"]),input:e.record(e.string(),e.unknown()),policyVisibleContext:e.record(e.string(),e.unknown()),output:e.string().nullable(),messages:e.array(e.unknown()).max(4002),grade:ht.nullable(),error:e.string().nullable(),native:Ma.optional(),profileNative:La.optional(),externalProcess:bt.optional()}).strict(),Vs=e.object({execution:e.union([ne,B]),cases:e.array(Xt).max(1e4),contentHash:h}).strict(),Ha=e.object({items:e.array(e.object({sequence:e.number().int().positive(),type:e.string().min(1),payload:e.unknown()}).strict()).max(500),nextCursor:e.number().int().positive().nullable()}).strict(),Gs=e.object({location:e.literal("local"),execution:e.union([ne,B]),case:Xt,trace:Ha}).strict(),$s=e.object({items:e.array(B).max(100),nextCursor:d.nullable()}).strict(),Js=e.object({execution:B,graders:e.array(w).min(1).max(100),graderPackageHash:h}).strict(),Gt=e.object({execution:B,manifest:ut,result:pt}).strict().superRefine((t,n)=>{try{if(gt(t),t.manifest.id!==t.execution.id||t.manifest.teamId!==t.execution.teamId||t.manifest.lineage?.execution.id!==(t.execution.sourceExecution?.id??t.execution.id)||t.manifest.lineage.execution.contentHash!==(t.execution.sourceExecution?.executionHash??t.execution.executionHash)||t.manifest.lineage.scoringPassId!==(t.execution.kind==="scoring"?t.execution.id:null)||t.manifest.maximumCostUsd!==t.execution.maximumCostUsd)throw new Error("Portable evidence differs from its retained local execution.")}catch(i){n.addIssue({code:"custom",message:i instanceof Error?i.message:"Local portable evidence verification failed."})}}),Xs=e.object({location:e.literal("local"),baseline:Gt,candidate:Gt}).strict();var v=e.string().trim().min(1).max(240),qa=e.object({location:e.literal("local").default("local"),jobId:v,modelRunId:v,modelId:v,modelVersionId:v.nullable(),adapterArtifactLineageId:v.nullable(),owner:e.object({teamId:v,actorId:v}).strict(),taskset:ze,state:e.enum(["prepared","running","succeeded","failed","cancelled"]),executionState:e.enum(["queued","starting","running","cancelling","cancelled","succeeded","failed","reconciling"]),updatedAt:e.iso.datetime()}).strict(),Da=e.object({location:e.literal("cloud"),jobId:v,owner:e.object({teamId:v,actorId:v}).strict(),apiOrigin:e.url(),job:ft,updatedAt:e.iso.datetime()}).strict().refine(t=>t.jobId===t.job.id&&t.owner.teamId===t.job.teamId&&t.updatedAt===t.job.updatedAt,"Hosted training attachment must match its canonical job."),ae=e.union([qa,Da]);function al(t){return JSON.stringify([t.location,t.location==="cloud"?t.apiOrigin:null,t.owner.teamId,t.owner.actorId,t.jobId])}a(al,"chatTrainingAttachmentKey");function ol(t){let n={location:t.location,jobId:t.jobId,owner:t.owner};return ee.parse(t.location==="cloud"?{...n,apiOrigin:t.apiOrigin,modelProjectId:t.job.modelProjectId,portableProjectId:t.job.portableProjectId,submissionHash:t.job.submissionHash}:{...n,modelRunId:t.modelRunId,modelId:t.modelId,modelVersionId:t.modelVersionId,adapterArtifactLineageId:t.adapterArtifactLineageId})}a(ol,"chatTrainingReference");var s=e.string().trim().min(1).max(240),x=e.string().regex(/^[a-f0-9]{64}$/),Na=e.object({kind:e.enum(["structure","graders"]),revision:e.number().int().positive(),workspaceHash:x,status:e.enum(["passed","failed","unavailable"]),checkedAt:e.iso.datetime(),checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),issues:e.array(e.object({code:e.string(),message:e.string(),taskId:s.optional(),graderId:s.optional()})).max(1e4),scopes:e.array(e.object({graderId:s,checked:e.number().int().nonnegative(),total:e.number().int().nonnegative(),status:e.enum(["passed","failed","unavailable"])}).strict()).max(1e3).optional()}).strict(),Ua=e.object({apiOrigin:e.url(),actorId:s,teamId:s,datasetId:s,remoteRevision:e.number().int().nonnegative(),acknowledgedHash:x.nullable(),remoteHash:x.nullable(),pendingLocalHash:x.nullable(),paused:e.boolean(),status:e.enum(["pending","syncing","synced","retry","conflict","paused"]),error:e.string().nullable(),operationId:s.nullable(),pendingWorkspace:ue.nullable(),beginVersionOperationId:s.nullable().optional(),publicationIntent:e.object({operationId:s,expectedRevision:e.number().int().positive(),workspaceHash:x,packageHash:x,localHash:x}).strict().nullable().optional()}).strict(),dl=e.object({schemaVersion:e.literal("openpond.localDataset.v1"),ownerId:s,projectId:s.nullable(),workspace:ue,checks:e.array(Na).max(2),packageHash:x.nullable(),sync:Ua.nullable()}).strict(),R=e.object({kind:e.enum(["dataset","grader","experiment"]),id:s,revision:e.number().int().positive(),name:e.string().max(500),state:e.string().max(100),datasetId:s.optional(),datasetRevision:e.number().int().positive().optional(),taskCount:e.number().int().nonnegative().optional(),graderCount:e.number().int().nonnegative().optional(),checkState:e.string().optional(),syncState:e.string().optional(),model:e.string().optional(),evaluationHash:x.optional(),graderId:s.optional(),graderType:e.string().optional(),description:e.string().optional(),location:e.enum(["local","cloud"]).optional(),scoreLabel:e.string().optional(),owner:e.object({teamId:s,actorId:s}).strict().optional(),contentHash:x.optional(),profileRef:u.optional(),score:e.number().nullable().optional(),costUsd:e.number().nonnegative().nullable().optional(),evaluatedCount:e.number().int().nonnegative().optional(),failedCount:e.number().int().nonnegative().optional(),qualityFailureCount:e.number().int().nonnegative().optional(),executionFailureCount:e.number().int().nonnegative().optional(),ungradedCount:e.number().int().nonnegative().optional(),rows:e.array(e.object({id:s,label:e.string(),detail:e.string(),score:e.number().nullable().optional()})).max(10)}).strict(),Yt=e.object({id:s,ordinal:e.number().int().positive(),name:e.string().trim().min(1).max(500),dataset:R.nullable(),evaluationModel:e.string().min(1).max(500).optional(),executionLocation:e.enum(["local","cloud"]).optional(),graders:e.array(R),selectedGraderId:s.nullable(),runs:e.array(R),selectedRunId:s.nullable(),training:e.array(ae).optional(),selectedTrainingKey:e.string().max(4e3).nullable().optional(),selectedTrainingJobId:s.nullable().optional(),turnIds:e.array(s),operationId:s,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).strict(),za=Yt.extend({ordinal:e.null()}),ul=e.object({datasetFocus:za.optional(),scopes:e.array(Yt),activeScopeId:s.nullable(),selectionVersion:e.number().int().nonnegative(),selectedAt:e.iso.datetime().nullable(),selectionOperations:e.record(e.string(),e.object({hash:x,version:e.number().int().nonnegative(),visualPublicationId:e.string().optional(),resource:R.optional()}).strict()).default({})}).strict();function pl(t){return[...t.scopes,...t.datasetFocus?[t.datasetFocus]:[]]}a(pl,"chatResourceWorkspaces");var gl=e.object({action:e.enum(["schema","list","read","create","save","file","validate","check_graders","check_sources","package","import","inspect_source","import_source","upload","sync","pause_sync","disconnect_sync","related_chats","list_graders","read_grader","save_grader","test_grader","publish"]),id:s.optional(),operationId:s.optional(),expectedRevision:e.number().int().nonnegative().optional(),payload:e.record(e.string(),e.unknown()).default({})}).strict(),bl=e.object({contentHash:x,scope:e.string(),graders:e.unknown(),cases:e.array(e.object({id:s,taskId:s,seed:e.string(),status:e.string(),output:e.string().nullable(),error:e.string().nullable(),score:e.number().nullable()}).strict()).max(1e4)}).strict();var Fa=e.object({id:e.string().trim().min(1).max(80),label:e.string().trim().min(1).max(160),description:e.string().trim().max(500).nullable().optional().default(null)}),vl=e.object({id:e.string().trim().min(1),sessionId:e.string().trim().min(1),turnId:e.string().trim().min(1),toolCallId:e.string().trim().min(1),question:e.string().trim().min(1).max(2e3),reason:e.string().trim().max(1e3).nullable().optional().default(null),options:e.array(Fa).max(5).default([]),allowFreeform:e.boolean().default(!0),status:e.enum(["pending","answered","dismissed"]),answer:e.object({optionId:e.string().trim().min(1).nullable(),text:e.string().max(4e3)}).nullable(),createdAt:e.string(),answeredAt:e.string().nullable()}),Il=e.object({questionId:e.string().trim().min(1),action:e.enum(["answer","dismiss"]),optionId:e.string().trim().min(1).nullable().optional().default(null),text:e.string().trim().max(4e3).optional().default("")});var Rl=e.object({kind:e.enum(["session","project","draft"]),id:e.string().trim().min(1).max(300)}),Pl=e.enum(["unknown","idle","running","success","failed"]),jl=e.enum(["none","idle","running","success","failed","unknown"]);var Ba=e.object({id:e.string(),name:e.string(),type:e.string(),status:e.string(),isActive:e.boolean().nullable(),price:e.string().nullable(),currency:e.string().nullable(),credits:e.string().nullable()}).passthrough(),Ka=e.object({reachable:e.boolean(),authenticated:e.boolean().nullable(),apiBase:e.string(),latencyMs:e.number(),status:e.number().nullable(),service:e.string().nullable(),checkedAt:e.string(),error:e.string().nullable()}),Wa=e.object({id:e.string().nullable(),email:e.string().nullable(),name:e.string().nullable(),handle:e.string().nullable(),image:e.string().nullable(),timezone:e.string().nullable(),isAdmin:e.boolean().nullable(),isVerified:e.boolean().nullable(),dailyAgentAppId:e.string().nullable(),dailyAgentDeploymentId:e.string().nullable(),credits:e.string().nullable()}),Va=e.object({handle:e.string(),baseUrl:e.string().nullable().optional()}),Qt=e.object({state:e.enum(["signed_out","signed_in","loading","switching","auth_error"]),activeProfile:Va.nullable(),label:e.string(),email:e.string().nullable(),avatarUrl:e.string().nullable(),environment:e.string().nullable(),baseUrl:e.string().nullable(),apiBaseUrl:e.string().nullable(),chatApiBaseUrl:e.string().nullable().optional().default(null),creditsLabel:e.string().nullable(),profile:Wa.nullable(),products:e.array(Ba),apiHealth:Ka.nullable(),accounts:e.array(e.object({handle:e.string(),baseUrl:e.string().nullable(),apiBaseUrl:e.string().nullable().optional().default(null),chatApiBaseUrl:e.string().nullable().optional(),environment:e.string().nullable(),isActive:e.boolean(),authHealth:e.enum(["signed_out","signed_in","auth_error","unknown"]),displayLabel:e.string().nullable(),email:e.string().nullable().optional().default(null),avatarUrl:e.string().nullable(),apiKeyHint:e.string().nullable().optional(),apiKeyAccess:e.object({ownerType:e.enum(["user","team","organization","service"]).nullable(),teamId:e.string().nullable(),scopes:e.array(e.string())}).nullable().optional().default(null)})),error:e.string().nullable()}),Ce=e.object({asOf:e.string().nullable(),refreshing:e.boolean(),lastRefreshError:e.string().nullable(),source:e.enum(["fresh","cache","empty"])}),Zt=e.object({available:e.boolean(),binaryPath:e.string().nullable(),version:e.string().nullable(),authHealth:e.enum(["unknown","signed_in","signed_out","auth_error"]),account:e.object({type:e.string(),email:e.string().nullable(),planType:e.string().nullable(),label:e.string().nullable()}).nullable().default(null),appServer:e.object({status:e.enum(["idle","starting","ready","error"]),lastError:e.string().nullable()})});var en=e.object({id:e.string(),sessionId:e.string(),turnId:e.string().nullable(),providerRequestId:e.union([e.string(),e.number()]),kind:e.enum(["command","file_change","permissions","user_input","create_plan","subagent_patch_apply","legacy_exec","legacy_patch"]),title:e.string(),detail:e.string(),status:e.enum(["pending","accepted","accepted_for_session","declined","cancelled"]),createdAt:e.string()});var tn=e.object({key:e.enum(["files","diffs","checks","deploys","sources","schedules","tool_runs","logs","app_config"]),label:e.string(),status:e.enum(["placeholder","available","error"]),summary:e.string()});function Ml(){return[{key:"files",label:"Files",status:"placeholder",summary:"V2 linked workspace file browser."},{key:"diffs",label:"Diffs",status:"placeholder",summary:"V2 local and hosted Change diff view."},{key:"checks",label:"Checks",status:"placeholder",summary:"Hosted and local validation status."},{key:"deploys",label:"Deploys",status:"placeholder",summary:"Deploy preview and production lifecycle metadata."},{key:"sources",label:"Sources",status:"placeholder",summary:"OpenPond Sources configuration and status."},{key:"schedules",label:"Schedules",status:"placeholder",summary:"Schedules list is queried on demand for selected apps."},{key:"tool_runs",label:"Tool Runs",status:"placeholder",summary:"Tool execution history and safe run controls."},{key:"logs",label:"Logs",status:"placeholder",summary:"Local server, hook, provider, and OpenPond action logs."},{key:"app_config",label:"Config",status:"placeholder",summary:"App environment, template, and runtime config metadata."}]}a(Ml,"createPlaceholderPanes");var nn=e.object({name:e.string(),description:e.string(),path:e.string(),sourcePath:e.string(),enabled:e.boolean(),charCount:e.number().int().nonnegative(),sourceHash:e.string(),validationStatus:e.enum(["valid","error"]),validationMessages:e.array(e.string()),resourceFiles:e.array(e.string()),updatedAt:e.string().nullable()}),Ga=e.enum(["codex","profile","extension","builtin"]),Dl=e.object({skillName:e.string(),scope:Ga,path:e.string(),byteSize:e.number().int().nonnegative(),isBinary:e.boolean(),content:e.string().nullable()});var zl=["openpond-cli","openpond-desktop-harness","openpond-taskset-authoring","openpond-skill-authoring","openpond-agent-authoring","openpond-refiner-authoring"],Fl=[{name:"openpond-cli",description:"Use the OpenPond CLI for datasets, graders, experiments, model training, repos, deployments, and tools.",path:"skills/openpond-cli/SKILL.md",scope:"profile",enabled:!0,sourcePath:"bundled://openpond",charCount:0,sourceHash:"bundled",validationStatus:"valid",validationMessages:[],resourceFiles:["references/experiments-and-training.md","references/compact-resource-tables.md","references/diagnose-and-improve.md"]},{name:"openpond-taskset-authoring",description:"Create, organize, review, improve, or test OpenPond Tasksets and source data; inspect coverage, data quality, graders, and failed evals.",path:"skills/openpond-taskset-authoring/SKILL.md",scope:"profile",enabled:!0,sourcePath:"bundled://openpond",charCount:0,sourceHash:"bundled",validationStatus:"valid",validationMessages:[],resourceFiles:["references/task-design.md","references/graders-and-rewards.md","references/method-selection.md","references/privacy-and-provenance.md","references/benchmarking.md","references/data-quality.md","references/failure-diagnosis.md"]},{name:"openpond-skill-authoring",description:"Create, copy, adapt, review, or update OpenPond Profile skill packages from slash commands or ordinary authoring requests.",path:"skills/openpond-skill-authoring/SKILL.md",scope:"profile",enabled:!0,sourcePath:"bundled://openpond",charCount:0,sourceHash:"bundled",validationStatus:"valid",validationMessages:[],resourceFiles:["references/skill-package-layout.md","references/copying-and-adaptation.md","references/validation-and-repair.md","scripts/validate-skill.mjs"]},{name:"openpond-agent-authoring",description:"Create, improve, review, or repair source-backed OpenPond Profile Agents and Agent SDK projects.",path:"skills/openpond-agent-authoring/SKILL.md",scope:"profile",enabled:!0,sourcePath:"bundled://openpond",charCount:0,sourceHash:"bundled",validationStatus:"valid",validationMessages:[],resourceFiles:["references/profile-layout.md","references/action-and-chat-design.md","references/integrations-and-setup.md","references/validation-and-repair.md"]},{name:"openpond-refiner-authoring",description:"Inspect, extend, validate, activate, or roll back the OpenPond Refiner Review Profile without changing the Refiner Core.",path:"skills/openpond-refiner-authoring/SKILL.md",scope:"profile",enabled:!0,sourcePath:"bundled://openpond",charCount:0,sourceHash:"bundled",validationStatus:"valid",validationMessages:[],resourceFiles:["references/review-profile.md","references/core-boundary.md","references/validation-and-activation.md"]}],$a=e.object({name:e.string(),description:e.string(),relativePath:e.string(),sourcePath:e.string(),charCount:e.number().int().nonnegative(),sourceHash:e.string(),resourceFiles:e.array(e.string()),validationStatus:e.enum(["valid","error"]),validationMessages:e.array(e.string())}),an=e.object({id:e.string(),source:e.literal("github"),owner:e.string(),repo:e.string(),repositoryUrl:e.string().url(),requestedRef:e.string(),resolvedCommit:e.string(),sourcePath:e.string(),readmePath:e.string().nullable(),installedAt:e.string(),updatedAt:e.string(),packageHash:e.string(),skills:e.array($a),validationStatus:e.enum(["valid","error"]),validationMessages:e.array(e.string())}),Bl=an.omit({installedAt:!0,updatedAt:!0,sourcePath:!0}).extend({sourcePath:e.null()}),on=e.object({rootPath:e.string(),registryPath:e.string(),extensions:e.array(an),error:e.string().nullable()}),Kl=e.object({source:e.string().trim().min(1),ref:e.string().trim().min(1).optional()});var Ja=e.object({latestSequence:e.number().int().nonnegative(),oldestSequence:e.number().int().nonnegative(),totalEvents:e.number().int().nonnegative(),limit:e.number().int().nonnegative(),hasMoreBefore:e.boolean()}),ic=e.object({server:nt,account:Qt,codex:Zt,configuration:e.object({rawRevision:e.string(),effectiveRevision:e.string(),sources:e.array(e.object({layer:e.string(),path:e.string(),revision:e.string()})),provenance:e.record(e.string(),e.object({layer:e.string(),path:e.string(),revision:e.string()}))}).optional(),preferences:ce.optional().default(()=>ce.parse({})),providers:re.optional().default(()=>re.parse({})),personalization:me.optional().default(()=>me.parse({soul:et[0].content,soulPath:null,updatedAt:null})),apps:e.array(kt),localProjects:e.array(Rt).optional().default([]),cloudProjects:e.array(_t).optional().default([]),profile:Ie.optional().default(Nt),profileLibrary:qt.optional().default(Dt),codexPersonalSkills:e.array(nn).optional().default([]),builtInSkills:e.array(ve).optional().default([]),extensionCatalog:on.optional().default({rootPath:"",registryPath:"",extensions:[],error:null}),codexHistorySessions:e.array(E).optional().default([]),sidebarAppPreferences:Et,sidebarFileBookmarks:e.array(Pt).optional().default([]),appsError:e.string().nullable(),appsMeta:Ce,accountMeta:Ce,sessions:e.array(E),events:e.array(xe),eventWindow:Ja.optional(),approvals:e.array(en),placeholders:e.array(tn),diagnostics:e.array(xe)});function sc(t){return t?(t.match(/\r\n|\r|\n/g)?.length??0)+(/(?:\r\n|\r|\n)$/.test(t)?0:1):0}a(sc,"countTextLines");var dc=e.object({appId:e.string(),exists:e.boolean(),configPath:e.string().nullable().optional(),envVar:e.string().nullable(),toolName:e.string().nullable(),version:e.union([e.string(),e.number()]).nullable(),source:e.enum(["hosted_env","local_file","defaults","missing"]),currentConfig:e.record(e.string(),e.unknown()).nullable(),defaults:e.record(e.string(),e.unknown()).nullable(),schema:e.record(e.string(),e.unknown()).nullable(),error:e.string().nullable().optional(),updatedAt:e.string()}).passthrough(),rn=e.enum(["create_sandbox_template_scaffold","resource_read","resource_search","list_files","read_files","search_files","preview_write_files","preview_write_file","preview_edit_file","preview_delete_file","write_files","write_file","edit_file","delete_file","workspace_status","validate_sandbox_template","build_sandbox_template","run_sandbox_template","git_init","git_status","git_diff","git_fetch","git_commit","git_push","publish_openpond_repo","sandbox_create","sandbox_templates","sandbox_template_launch","sandbox_status","sandbox_start","sandbox_list_files","sandbox_read_file","sandbox_search_files","sandbox_upload_file","sandbox_write_file","sandbox_edit_file","sandbox_delete_file","sandbox_mkdir","sandbox_move_file","sandbox_exec","sandbox_git_status","sandbox_git_diff","sandbox_git_export_patch","sandbox_git_apply_patch_local","sandbox_git_branch","sandbox_git_commit","sandbox_git_pull","sandbox_git_push","sandbox_preserve_source","sandbox_promote_source","sandbox_run_action","sandbox_open_port","sandbox_snapshot_catalog","sandbox_snapshot_create","sandbox_snapshot_update","sandbox_snapshot_validate","sandbox_snapshot_publish","sandbox_replays","sandbox_replay_start","sandbox_replay_get","sandbox_replay_logs","sandbox_replay_artifacts","sandbox_replay_cancel","sandbox_logs","sandbox_receipts","sandbox_prepare_agent","sandbox_save_agent_package","sandbox_save_output","work_agent_package_install","work_output_delete","work_output_read","sandbox_schedule_create","sandbox_stop"]),uc=e.object({action:rn,args:e.record(e.string(),e.unknown()).optional().default({}),source:e.enum(["ui_button","chat_action","terminal_command","hook"]).default("chat_action")}),pc=e.object({ok:e.boolean(),action:rn,appId:e.string().nullable().optional(),output:e.string(),data:e.unknown().optional()});var K=e.object({id:e.string().trim().min(1).max(200),title:e.string().trim().min(1).max(240),sourceTaskId:e.string().trim().min(1).max(200),sourceTurnId:e.string().trim().min(1).max(200),revision:e.number().int().positive().default(1),createdAt:e.string().datetime()}),W=e.object({kind:e.enum(["structural","visual","test","user_review"]),status:e.enum(["passed","failed","not_run"]),label:e.string().trim().min(1).max(240),detail:e.string().trim().max(4e3).nullable().optional(),ref:e.string().trim().max(4096).nullable().optional()}),sn=e.object({kind:e.literal("local"),path:e.string().trim().min(1).max(4096),deviceId:e.string().trim().min(1).max(200)}),ln=e.object({kind:e.literal("managed"),fileId:e.string().trim().min(1).max(200),downloadPath:e.string().trim().min(1).max(4096)}),Xa=e.object({kind:e.literal("external"),provider:e.string().trim().min(1).max(120),resourceId:e.string().trim().min(1).max(500),url:e.string().url().nullable()}),cn=K.extend({kind:e.literal("file"),contentType:e.string().trim().min(1).max(200),sizeBytes:e.number().int().nonnegative(),sha256:e.string().regex(/^[a-f0-9]{64}$/),location:e.discriminatedUnion("kind",[sn,ln,Xa]),validation:e.array(W).max(32).default([])}),Ya=K.extend({kind:e.literal("source_change"),projectId:e.string().trim().min(1).max(200),ref:e.string().trim().min(1).max(500),url:e.string().url().nullable(),validation:e.array(W).max(32).default([])}),Qa=K.extend({kind:e.literal("deployment"),deploymentId:e.string().trim().min(1).max(200),url:e.string().url(),validation:e.array(W).max(32).default([])}),Za=K.extend({kind:e.literal("external_resource"),provider:e.string().trim().min(1).max(120),resourceId:e.string().trim().min(1).max(500),url:e.string().url(),contentType:e.string().trim().min(1).max(200).nullable(),validation:e.array(W).max(32).default([])}),mn=e.object({id:e.string().trim().min(1).max(191),label:e.string().trim().min(1).max(160).nullable(),description:e.string().trim().max(1e3).nullable(),inputSchema:e.record(e.string(),e.unknown()).nullable(),outputSchema:e.record(e.string(),e.unknown()).nullable(),schedulePolicy:e.record(e.string(),e.unknown()).nullable()}),dn=e.object({base:e.string().trim().min(1).max(200),resources:e.record(e.string(),e.unknown()),modelPolicy:e.record(e.string(),e.unknown()).nullable(),setup:e.record(e.string(),e.unknown()).nullable()}),eo=e.object({id:e.string().trim().min(1).max(200),kind:e.enum(["sdk_validation","sdk_eval"]),status:e.enum(["passed","failed"]),summary:e.string().trim().min(1).max(2e3),artifactPath:e.string().trim().min(1).max(4096),artifactSha256:e.string().regex(/^[a-f0-9]{64}$/)}),to=e.object({path:e.string().trim().min(1).max(4096),sizeBytes:e.number().int().nonnegative(),sha256:e.string().regex(/^[a-f0-9]{64}$/),contentsBase64:e.string()}),hc=e.object({schema:e.literal("openpond.agent-package.v1"),agentId:e.string().trim().min(1).max(191),versionId:e.string().trim().min(1).max(200),digest:e.string().regex(/^[a-f0-9]{64}$/),title:e.string().trim().min(1).max(240),source:e.object({files:e.array(to).min(1).max(1e3),totalSizeBytes:e.number().int().nonnegative()}),manifest:e.record(e.string(),e.unknown()),actions:e.array(mn).min(1).max(256),runtimeRequirements:dn,receipts:e.array(eo).min(2).max(64)}),no=K.extend({kind:e.literal("agent_package"),agentId:e.string().trim().min(1).max(191),versionId:e.string().trim().min(1).max(200),digest:e.string().regex(/^[a-f0-9]{64}$/),packageFileId:e.string().trim().min(1).max(200),manifestFileId:e.string().trim().min(1).max(200),actions:e.array(mn).min(1).max(256),runtimeRequirements:dn,validationReceiptIds:e.array(e.string().trim().min(1).max(200)).min(1).max(32),evalReceiptIds:e.array(e.string().trim().min(1).max(200)).min(1).max(32),sourceFileCount:e.number().int().positive(),sourceSizeBytes:e.number().int().nonnegative(),location:e.discriminatedUnion("kind",[sn,ln]),validation:e.array(W).max(32).default([])}),xc=e.discriminatedUnion("kind",[cn,Ya,Qa,Za,no]),fc=e.object({outputs:e.array(cn)}),Sc=1e7,yc=6e6;var ao=[{family:"document",extensions:[".md",".txt"],contentTypes:["text/markdown","text/plain"],preview:"markdown",validation:["structural"],creation:"built_in"},{family:"code",extensions:[".css",".js",".jsx",".mjs",".py",".sql",".ts",".tsx",".yaml",".yml"],contentTypes:["application/javascript","application/sql","application/yaml","text/css","text/javascript","text/typescript","text/yaml"],preview:"text",validation:["structural"],creation:"built_in"},{family:"document",extensions:[".docx"],contentTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],preview:"native_app",validation:["structural","visual"],creation:"node_package"},{family:"spreadsheet",extensions:[".xlsx"],contentTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],preview:"native_app",validation:["structural","visual"],creation:"node_package"},{family:"presentation",extensions:[".pptx"],contentTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],preview:"native_app",validation:["structural","visual"],creation:"node_package"},{family:"pdf",extensions:[".pdf"],contentTypes:["application/pdf"],preview:"pdf",validation:["structural","visual"],creation:"node_package"},{family:"data",extensions:[".csv",".tsv",".json"],contentTypes:["text/csv","text/tab-separated-values","application/json"],preview:"text",validation:["structural"],creation:"built_in"},{family:"image",extensions:[".avif",".gif",".jpeg",".jpg",".png",".svg",".webp"],contentTypes:["image/avif","image/gif","image/jpeg","image/png","image/svg+xml","image/webp"],preview:"image",validation:["structural","visual"],creation:"node_package"},{family:"audio",extensions:[".m4a",".mp3",".wav"],contentTypes:["audio/mp4","audio/mpeg","audio/wav"],preview:"audio",validation:["structural","playback"],creation:"node_package"},{family:"video",extensions:[".mov",".mp4",".webm"],contentTypes:["video/quicktime","video/mp4","video/webm"],preview:"video",validation:["structural","playback"],creation:"node_package"},{family:"site",extensions:[".html"],contentTypes:["text/html"],preview:"browser",validation:["structural","browser"],creation:"built_in"}],Ic=Object.freeze({".avif":"image/avif",".csv":"text/csv",".css":"text/css",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".gif":"image/gif",".html":"text/html",".js":"text/javascript",".jsx":"text/javascript",".jpeg":"image/jpeg",".jpg":"image/jpeg",".json":"application/json",".m4a":"audio/mp4",".md":"text/markdown",".mjs":"text/javascript",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".pdf":"application/pdf",".png":"image/png",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".py":"text/plain",".svg":"image/svg+xml",".sql":"application/sql",".tsv":"text/tab-separated-values",".ts":"text/typescript",".tsx":"text/typescript",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".webp":"image/webp",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".yaml":"application/yaml",".yml":"application/yaml"});function oo(t){return ao.find(n=>n.contentTypes.includes(t))??null}a(oo,"workFormatCapabilityForContentType");function kc(t,n){return t===n?!0:t!=="text/plain"?!1:oo(n)?.family==="code"}a(kc,"workOutputMediaTypesCompatible");var jc=1;var Ac=e.object({error:e.literal("protocol_unsupported"),minimumSupportedProtocolVersion:e.literal(1),supportedProtocolVersion:e.literal(1),upgradeRequired:e.literal(!0)}).strict(),Cc={frameBytes:262144,socketQueueBytes:1048576,workerQueueBytes:67108864,viewerSubscriptions:20,deviceSubscriptions:100,ticketMs:3e4,leaseMs:6e4,permitMs:15e3,historyTaskBytes:10485760,historyDeviceBytes:104857600,artifactBytes:26214400},m=e.string().min(1).max(200),io=e.object({installationId:e.string().uuid(),profileId:m,ownerUserId:m,teamId:m.nullable()}).strict(),Tc=e.object({version:e.literal(1),scope:io,runtimeId:e.string().uuid(),audience:e.string().url(),nonce:e.string().uuid(),issuedAt:e.string().datetime(),payloadHash:e.string().regex(/^[a-f0-9]{64}$/),signature:e.string().max(256)}).strict();function wc(t){return JSON.stringify(["remote-device",t.version,t.scope.installationId,t.scope.profileId,t.scope.ownerUserId,t.scope.teamId,t.runtimeId,t.audience,t.nonce,t.issuedAt,t.payloadHash])}a(wc,"remoteDeviceProofMessage");function ro(t){let n=a(i=>Array.isArray(i)?i.map(n):i&&typeof i=="object"?Object.fromEntries(Object.entries(i).sort(([l],[c])=>l.localeCompare(c)).map(([l,c])=>[l,n(c)])):i,"canonical");return JSON.stringify(n(t))}a(ro,"remoteDeviceCanonicalContent");var so=e.object({followUp:e.boolean(),resume:e.boolean().optional(),steer:e.boolean(),stop:e.boolean(),approval:e.boolean(),artifacts:e.boolean(),start:e.boolean().optional()}).strict(),lo=e.object({id:m,localSessionId:m,title:e.string().max(1e3),projectId:m.nullable(),projectLabel:e.string().max(1e3).nullable(),provider:e.string().max(100),capabilities:so,state:e.enum(["idle","running","completed","failed","attention"]),paused:e.boolean().optional(),latestTurnId:m.nullable().optional(),revision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),historyGeneration:m,lastEventSequence:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),activeTurnId:m.nullable().optional(),approvalId:m.nullable().optional(),createdAt:e.string().datetime().optional(),updatedAt:e.string().datetime().optional(),archived:e.boolean().default(!1),deleted:e.boolean().default(!1)}).strict(),Ec=e.object({idempotencyKey:m,action:e.enum(["follow_up","steer","stop","start","approval"]),targetId:m,expectedRevision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),expectedTurnId:m.nullable().optional(),expectedApprovalId:m.nullable().optional(),expiresAt:e.string().datetime().optional(),payload:e.object({text:e.string().max(1e5).optional(),resume:e.boolean().optional(),response:e.enum(["approve","reject"]).optional(),projectId:m.optional(),starterId:m.optional(),starterRevision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).optional()}).strict()}).strict().superRefine((t,n)=>{t.payload.resume===!0&&(t.action!=="follow_up"||!t.expectedTurnId)&&n.addIssue({code:"custom",path:["payload","resume"],message:"Explicit resume requires a follow-up targeting the observed paused turn."})}),Oc=e.object({id:m,timestamp:e.string().optional(),sequence:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),messageId:m.optional(),turnId:m.optional(),textMode:e.enum(["append","replace"]).optional(),fragmentIndex:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).optional(),fragmentCount:e.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),type:e.enum(["message","tool","state","approval"]),role:e.enum(["user","assistant","system"]).optional(),text:e.string().max(1e5).optional(),toolName:e.string().max(200).optional(),status:e.string().max(100).optional(),approvalId:m.optional(),artifactIds:e.array(m).max(100).optional(),truncated:e.boolean().optional()}).strict();function Mc(t,n,i){return ro({domain:"remote-device-dispatch-v1",command:t,expiresAt:n,keyId:i})}a(Mc,"remoteDevicePermitMessage");var co=e.object({id:e.string().min(1).max(200),projectId:e.string().min(1).max(200),projectLabel:e.string().max(1e3),title:e.string().max(1e3),revision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)}).strict(),un={revision:e.number().int().positive().max(Number.MAX_SAFE_INTEGER),snapshotId:e.string().uuid(),pageIndex:e.number().int().min(0).max(99),pageCount:e.number().int().min(1).max(100),complete:e.boolean(),tasks:e.array(lo).max(100),starters:e.array(co).max(100),removedIds:e.array(m).max(100),removedStarterIds:e.array(m).max(100)},Lc=e.discriminatedUnion("mode",[e.object({...un,mode:e.literal("snapshot")}).strict(),e.object({...un,mode:e.literal("patch"),baseRevision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)}).strict()]).superRefine((t,n)=>{(t.pageIndex>=t.pageCount||t.complete!==(t.pageIndex===t.pageCount-1))&&n.addIssue({code:"custom",message:"catalog_page_manifest_invalid"}),t.mode==="patch"&&t.revision<=t.baseRevision&&n.addIssue({code:"custom",message:"catalog_patch_revision_invalid"})}),Hc=e.object({pageIndex:e.number().int().min(0).max(99),mode:e.enum(["snapshot","patch"]),snapshotId:e.string().uuid(),revision:e.number().int().positive().max(Number.MAX_SAFE_INTEGER),committed:e.boolean(),catalogRevision:e.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)}).strict();var pn=e.enum(["github","openpond_git"]),gn=e.enum(["private","public"]),mo=e.enum(["actions","workflows","instructions","prompts","goals","evals","examples","tasksets","extensions"]),uo=e.object({agentIds:e.array(e.string().trim().min(1)).max(100),skillNames:e.array(e.string().trim().min(1)).max(200),optionalContent:e.array(mo).max(20).default([])}),bn=e.object({provider:pn,owner:e.string().trim().min(1).max(191).nullable().optional(),repository:e.string().trim().min(1).max(191),visibility:gn.default("private")}),po=e.object({ref:u,selection:uo,target:bn}),go=e.object({path:e.string(),sizeBytes:e.number().int().nonnegative(),category:e.string()}),zc=e.object({sourceHash:e.string(),sourceRevision:e.string().nullable(),clean:e.boolean(),blockedReasons:e.array(e.string()),warnings:e.array(e.string()),files:e.array(go),excludedFiles:e.array(e.string()),target:bn,replacesExisting:e.boolean()}),Fc=po.extend({expectedSourceHash:e.string().trim().min(1),confirmed:e.literal(!0)}),Bc=e.object({provider:pn,owner:e.string(),repository:e.string(),visibility:gn,remoteUrl:e.string(),webUrl:e.string(),revision:e.string()});var bo=e.enum(["cron","rate"]),hn=e.enum(["queued","running","succeeded","failed","skipped"]),Te=e.object({id:e.string(),localProjectId:e.string(),localProjectName:e.string(),agentRootPath:e.string(),agentName:e.string(),scheduleName:e.string(),scheduleType:bo,scheduleExpression:e.string(),timezone:e.string().nullable(),targetAction:e.string(),input:e.record(e.string(),e.unknown()).optional().default({}),enabledByDefault:e.boolean(),enabled:e.boolean(),sourceHash:e.string(),manifestHash:e.string().nullable(),agentVersionId:e.string().nullable().optional(),agentPackageDigest:e.string().nullable().optional(),nextRunAt:e.string().nullable(),lastRunAt:e.string().nullable(),lastRunStatus:hn.nullable(),lastRunId:e.string().nullable(),lastError:e.string().nullable(),createdAt:e.string(),updatedAt:e.string()}),xn=e.object({id:e.string(),scheduleId:e.string(),definitionSnapshot:Te.optional(),configurationSnapshot:e.record(e.string(),e.unknown()).optional(),inputSnapshot:e.record(e.string(),e.unknown()).optional(),localProjectId:e.string(),scheduleName:e.string(),scheduledFor:e.string(),trigger:e.enum(["schedule","manual"]),status:hn,targetAction:e.string(),agentVersionId:e.string().nullable().optional(),agentPackageDigest:e.string().nullable().optional(),startedAt:e.string().nullable(),completedAt:e.string().nullable(),exitCode:e.number().int().nullable(),stdout:e.string().nullable(),stderr:e.string().nullable(),result:e.record(e.string(),e.unknown()).nullable(),traceArtifactRef:e.string().nullable(),error:e.string().nullable(),createdAt:e.string(),updatedAt:e.string()}),Vc=e.object({schedules:e.array(Te),scheduler:e.object({running:e.boolean(),nextTickAt:e.string().nullable(),lastSyncAt:e.string().nullable(),scanRunning:e.boolean()})}),Gc=e.object({runs:e.array(xn)}),$c=e.object({enabled:e.boolean().optional()}),Jc=e.object({input:e.record(e.string(),e.unknown()).optional()}),Xc=e.object({schedule:Te,run:xn});var we=e.record(e.string(),e.unknown()),Zc=e.object({userId:e.string(),role:e.enum(["owner","admin","member"]),name:e.string(),handle:e.string().nullable(),image:e.string().nullable()}),ho=e.object({userId:e.string(),role:e.enum(["owner","admin","member"]),name:e.string(),handle:e.string().nullable(),image:e.string().nullable(),lastReadSequence:e.number().int().nonnegative()}),xo=e.object({id:e.string(),messageId:e.string(),refType:e.enum(["hosted_ai_thread","goal","openpond_session","project","agent_run","message_reply"]),refId:e.string(),preview:we,createdAt:e.string()}),Sn=e.object({id:e.string(),messageId:e.string().nullable(),clientAttachmentId:e.string(),kind:e.literal("image"),name:e.string(),mediaType:e.enum(["image/png","image/jpeg","image/webp","image/gif"]),sizeBytes:e.number().int().positive(),status:e.enum(["pending","ready","failed"]),createdAt:e.string(),readyAt:e.string().nullable()}),em=e.object({attachment:Sn,uploadUrl:e.string().url().nullable(),uploadHeaders:e.record(e.string(),e.string()),expiresAt:e.string().nullable()}),tm=e.object({url:e.string().url(),expiresAt:e.string()}),yn=e.object({id:e.string(),threadId:e.string(),teamId:e.string(),clientRequestId:e.string().nullable(),authorType:e.enum(["user","agent","system"]),authorUserId:e.string().nullable(),authorAgentId:e.string().nullable(),sequence:e.number().int().nonnegative(),kind:e.enum(["text","system","command_result"]),body:e.string(),metadata:we,editedAt:e.string().nullable(),deletedAt:e.string().nullable(),createdAt:e.string(),refs:e.array(xo),attachments:e.array(Sn)}),fo=e.object({id:e.string(),teamId:e.string(),kind:e.enum(["general","dm","group","channel"]),title:e.string().nullable(),createdByUserId:e.string(),lastMessageId:e.string().nullable(),lastMessageSequence:e.number().int().nonnegative(),lastMessageAt:e.string(),createdAt:e.string(),updatedAt:e.string(),unreadCount:e.number().int().nonnegative(),pinnedAt:e.string().nullable(),mutedAt:e.string().nullable(),archivedAt:e.string().nullable(),participants:e.array(ho),lastMessage:yn.nullable()}),nm=e.object({thread:fo,messages:e.array(yn),hasMoreBefore:e.boolean()}),am=e.object({threadId:e.string(),mutedAt:e.string().nullable()}),So=e.enum(["pending","running","completed","failed","interrupted","cancelled"]),fn=e.object({id:e.string(),conversationId:e.string(),threadId:e.string(),teamId:e.string(),requestedByUserId:e.string(),executorUserId:e.string().nullable(),providerId:e.string(),modelId:e.string(),clientRequestId:e.string(),baseMessageSequence:e.number().int().nonnegative(),status:So,partialBody:e.string().nullable(),userMessageId:e.string(),assistantMessageId:e.string().nullable(),errorCode:e.string().nullable(),cancelledByUserId:e.string().nullable(),leaseExpiresAt:e.string().nullable(),heartbeatAt:e.string().nullable(),createdAt:e.string(),updatedAt:e.string()}),yo=e.object({id:e.string(),conversationId:e.string(),sequence:e.number().int().nonnegative(),role:e.enum(["user","assistant","system","action"]),body:e.string(),createdByUserId:e.string().nullable(),createdAt:e.string()}),om=e.object({conversationId:e.string(),parentThreadId:e.string(),parentMessageId:e.string(),teamId:e.string(),title:e.string().nullable(),providerId:e.string().nullable(),modelId:e.string(),createdByUserId:e.string(),messages:e.array(yo),turns:e.array(fn),activeTurn:fn.nullable(),createdAt:e.string(),updatedAt:e.string()}),vo=e.object({id:e.number().int().nonnegative(),teamId:e.string(),threadId:e.string(),conversationId:e.string().nullable(),type:e.enum(["thread.created","message.created","message.updated","message.deleted","read.updated","ai_thread.created","ai_turn.updated"]),payload:we,createdAt:e.string()}),im=e.object({events:e.array(vo),cursor:e.number().int().nonnegative(),hasMore:e.boolean()}),rm=e.object({httpUrl:e.string().min(1),realtimeUrl:e.string().min(1),region:e.string().min(1),token:e.string().min(1),expiresAt:e.string().min(1),teamId:e.string().min(1),userId:e.string().min(1)});var Ee=e.record(e.string(),e.unknown()),f=e.string().nullable(),Io=e.enum(["draft","published","archived"]),Oe=e.enum(["owner","admin","member"]),vn=e.enum(["active","left"]),In=e.enum(["mentions","all","none"]),kn=e.enum(["public_preview","members"]),ko=e.enum(["members","admins"]),_o=e.object({canPreview:e.boolean(),canJoin:e.boolean(),canLeave:e.boolean(),canRead:e.boolean(),canPost:e.boolean(),canUpload:e.boolean(),canMention:e.boolean(),canManage:e.boolean(),requiresRulesAcceptance:e.boolean(),currentRulesVersionId:e.string().nullable()}),_n=e.object({id:e.string(),communityId:e.string(),version:e.number().int().positive(),title:e.string(),requiresReacceptance:e.boolean(),publishedAt:e.string()}),Ro=_n.extend({bodyMarkdown:e.string(),contentHash:e.string()}),Po=e.object({role:Oe,status:vn,notificationMode:In}),jo=e.object({id:e.string(),communityId:e.string(),userId:e.string(),role:Oe,status:vn,notificationMode:In,joinedAt:e.string(),leftAt:f,createdAt:e.string(),updatedAt:e.string()}),Rn=e.object({id:e.string(),slug:e.string(),displayName:e.string(),description:e.string(),imageUrl:e.string().nullable(),status:Io,visibility:e.enum(["public","private"]),joinPolicy:e.enum(["open","closed"]),historyVisibility:kn,featuredAt:f,publishedAt:f,archivedAt:f,memberCount:e.number().int().nonnegative(),membership:Po.nullable(),capabilities:_o,currentRules:_n.nullable()}),cm=e.object({items:e.array(Rn),nextCursor:e.string().nullable()}),Pn=e.object({lastReadSequence:e.number().int().nonnegative(),lastReadAt:f.optional(),mutedAt:f,pinnedAt:f}),Me=e.object({id:e.string(),communityId:e.string(),chatThreadId:e.string().nullable(),slug:e.string(),displayName:e.string(),topic:e.string(),position:e.number().int().nonnegative(),visibility:kn,postingPolicy:ko,isDefault:e.boolean(),archivedAt:f,lastMessageSequence:e.number().int().nonnegative(),unreadCount:e.number().int().nonnegative(),readState:Pn.nullable()}),mm=Rn.omit({currentRules:!0}).extend({currentRules:Ro.nullable(),channels:e.array(Me),previewMessageLimit:e.number().int().positive()}),Ao=e.object({id:e.string(),messageId:e.string(),refType:e.enum(["hosted_ai_thread","goal","openpond_session","project","agent_run","message_reply"]),refId:e.string(),preview:Ee,createdAt:e.string()}),jn=e.object({id:e.string(),messageId:e.string().nullable(),clientAttachmentId:e.string(),kind:e.literal("image"),name:e.string(),mediaType:e.enum(["image/png","image/jpeg","image/webp","image/gif"]),sizeBytes:e.number().int().positive(),status:e.enum(["pending","ready","failed"]),createdAt:e.string(),readyAt:f}),dm=e.object({attachment:jn,uploadUrl:e.string().url().nullable(),uploadHeaders:e.record(e.string(),e.string()),expiresAt:f}),um=e.object({url:e.string().url(),expiresAt:e.string()}),Co=e.object({id:e.string(),threadId:e.string(),teamId:e.null(),clientRequestId:e.string().nullable(),authorType:e.enum(["user","agent","system"]),authorUserId:e.string().nullable(),authorAgentId:e.string().nullable(),sequence:e.number().int().nonnegative(),kind:e.enum(["text","system","command_result"]),body:e.string(),metadata:Ee,editedAt:f,deletedAt:f,createdAt:e.string(),refs:e.array(Ao),attachments:e.array(jn)}),pm=e.object({messages:e.array(Co),hasMoreBefore:e.boolean(),channelId:e.string(),readState:Pn.omit({lastReadAt:!0}).nullable(),preview:e.boolean()}),To=e.object({userId:e.string(),handle:e.string().nullable(),name:e.string().nullable(),role:Oe}),gm=e.object({items:e.array(To),nextCursor:e.string().nullable()}),wo=e.object({id:e.number().int().nonnegative(),communityId:e.string(),channelId:e.string(),threadId:e.string(),type:e.enum(["thread.created","message.created","message.updated","message.deleted","read.updated"]),payload:Ee,createdAt:e.string()}),bm=e.object({events:e.array(wo),cursor:e.number().int().nonnegative(),hasMore:e.boolean()}),hm=e.object({httpUrl:e.string().min(1),realtimeUrl:e.string().min(1),region:e.string().min(1),token:e.string().min(1),expiresAt:e.string().min(1),communityId:e.string().min(1),userId:e.string().min(1),channel:e.string().min(1)}),xm=e.object({membership:jo,channels:e.array(Me)}),fm=e.object({channels:e.array(Me)});function ym(t){let n=Eo(t);if(n.length){let c=24+n.reduce((b,S)=>b+8+V(S.content),0),p=n.filter(b=>b.role==="assistant").map(b=>8+V(b.content));return{renderedTokens:c,maximumAssistantTargetTokens:Math.max(0,...p),assistantTargetCount:p.length}}let i=Mo(t.input),l=Lo(t.expectedOutput);return{renderedTokens:24+V(i)+V(l),maximumAssistantTargetTokens:8+V(l),assistantTargetCount:l?1:0}}a(ym,"estimateTrainingTaskSizing");function Eo(t){let n=[...An(t.input.messages),...An(t.expectedOutput?.messages)],i=[],l=new Map,c=a(p=>{let b=typeof p=="string"&&p?p:`missing_${l.size+1}`;return l.has(b)||l.set(b,`call_${l.size+1}`),l.get(b)},"canonicalCallId");for(let p of n){if(!oe(p))continue;let b=p.role,S=p.content;if(b==="tool"){i.push({role:"user",content:ie({content:typeof S=="string"?S:"",tool_call_id:c(p.tool_call_id),type:"tool_result"})});continue}if(b==="assistant"&&Array.isArray(p.tool_calls)&&p.tool_calls.length){for(let q of p.tool_calls)!oe(q)||!oe(q.function)||(i.push({role:"assistant",content:ie({arguments:Oo(q.function.arguments),name:q.function.name??null,type:"tool_call"})}),c(q.id));typeof S=="string"&&S&&i.push({role:"assistant",content:S});continue}(b==="system"||b==="user"||b==="assistant")&&typeof S=="string"&&S&&i.push({role:b,content:S})}return i}a(Eo,"normalizedTrainingMessages");function An(t){return Array.isArray(t)?t:[]}a(An,"messageArray");function Oo(t){if(typeof t!="string")return{};try{return JSON.parse(t)}catch{return{malformed_arguments:t}}}a(Oo,"parsedArguments");function ie(t){return JSON.stringify(Le(t))}a(ie,"stableJson");function Le(t){return Array.isArray(t)?t.map(Le):oe(t)?Object.fromEntries(Object.keys(t).sort().map(n=>[n,Le(t[n])])):t}a(Le,"sortJson");function Mo(t){return typeof t.prompt=="string"?t.prompt:ie(t)}a(Mo,"textInput");function Lo(t){return t?typeof t.text=="string"?t.text:ie(t):""}a(Lo,"textOutput");function V(t){return Math.ceil(t.length/2)}a(V,"estimatedTokens");function oe(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}a(oe,"isRecord");var Ho=e.object({schemaVersion:e.literal("openpond.trainingEngineCapabilities.v1"),adapterId:r,available:e.boolean(),methods:e.array(e.string().trim().min(1).max(100)),signalKinds:e.array(yt),modelFamilies:e.array(e.string().trim().min(1).max(200)),precisions:e.array(e.enum(["fp32","fp16","bf16","tf32","int8","int4"])),topologies:e.array(e.string().trim().min(1).max(200)),workerProtocolVersion:e.string().trim().min(1).max(200),upstreamRevision:e.string().trim().min(1).max(500),workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/).nullable().default(null),capabilityReceipt:g,checkedAt:_,unavailableReason:e.string().trim().min(1).max(5e3).nullable()}).strict(),qo=e.object({schemaVersion:e.literal("openpond.computeTargetCapabilities.v1"),adapterId:r,kind:e.enum(["local","ssh","managed","custom"]),provider:r.nullable(),available:e.boolean(),devices:e.array(e.object({id:r,kind:e.enum(["cpu","gpu","accelerator"]),vendor:e.string().trim().min(1).max(200),name:e.string().trim().min(1).max(500),memoryBytes:e.number().int().nonnegative().nullable(),runtime:e.string().trim().min(1).max(200)}).strict()),supportsWorkerImages:e.boolean(),supportsArtifactTransfer:e.boolean(),supportsCancellation:e.boolean(),capabilityReceipt:g,checkedAt:_,unavailableReason:e.string().trim().min(1).max(5e3).nullable()}).strict(),Do=e.object({schemaVersion:e.literal("openpond.harnessRuntimeCapabilities.v1"),adapterId:r,available:e.boolean(),placements:e.array(e.enum(["local","remote","colocated","provider_native"])),lifecycle:e.array(e.enum(["create","reset","step","grade","collect","destroy"])),deterministicReplay:e.boolean(),privilegedIsolation:e.boolean(),capabilityReceipt:g,checkedAt:_,unavailableReason:e.string().trim().min(1).max(5e3).nullable()}).strict(),Cm=e.object({schemaVersion:e.literal("openpond.resolvedTrainingPlan.v1"),manifest:St,recipe:Ct,runtime:ge,compute:be,engine:he,execution:e.object({trainingPlanId:r,approvalId:r}).strict().nullable(),maximumSpendUsd:e.number().nonnegative().nullable(),approvalHash:g,contentHash:g}).strict().superRefine((t,n)=>{let i=[["runtime",t.runtime,t.manifest.runtimeTarget],["compute",t.compute,t.manifest.computeTarget],["engine",t.engine,t.manifest.engine]];for(let[l,c,p]of i)JSON.stringify(c)!==JSON.stringify(p)&&n.addIssue({code:"custom",path:[l],message:`${l} must exactly match the Harness Run Manifest`});t.recipe.method!==t.manifest.recipe.method&&n.addIssue({code:"custom",path:["recipe","method"],message:"Recipe method must match the Harness Run Manifest"}),t.approvalHash!==t.manifest.approval.approvalHash&&n.addIssue({code:"custom",path:["approvalHash"],message:"Approval hash must match the Harness Run Manifest"}),t.maximumSpendUsd!==t.manifest.approval.maximumSpendUsd&&n.addIssue({code:"custom",path:["maximumSpendUsd"],message:"Maximum spend must match the Harness Run Manifest"})}),Tm=e.object({schemaVersion:e.literal("openpond.adapterValidationReceipt.v1"),adapterId:r,valid:e.boolean(),issues:e.array(e.object({code:r,path:e.string().trim().max(2e3).nullable(),message:e.string().trim().min(1).max(5e3)}).strict()),capabilityReceipt:g,planHash:g,createdAt:_,contentHash:g}).strict(),wm=e.object({runId:r,adapterId:r,protocolVersion:e.enum(["openpond.training.v2","adapter.native.v1"]).default("adapter.native.v1"),routeFamily:e.enum(["training_v2","adapter_native"]).default("adapter_native"),routeId:r.optional(),providerJobId:e.string().trim().min(1).max(1e3).nullable(),tenantId:r.optional(),leaseId:r.nullable(),manifestHash:g.optional(),inputBundleHash:g.optional(),createdAt:_}).strict(),Em=e.object({runId:r,state:e.enum(["queued","preparing","running","cancelling","cancelled","succeeded","failed"]),phase:e.string().trim().min(1).max(200),progress:e.number().min(0).max(1).nullable(),rolloutProgress:e.object({groupsCompleted:e.number().int().nonnegative(),groupsTarget:e.number().int().nonnegative(),optimizerUpdatesApplied:e.number().int().nonnegative(),optimizerUpdatesSkipped:e.number().int().nonnegative()}).strict().optional(),updatedAt:_,errorCode:r.nullable()}).strict(),Om=e.object({runId:r,manifestHash:g,artifacts:e.array(e.object({kind:e.enum(["checkpoint","adapter","metrics","trace","evaluation","receipt"]),objectRef:e.string().trim().min(1).max(2e3),sha256:g,sizeBytes:e.number().int().nonnegative(),metadata:e.record(e.string(),e.unknown()).optional()}).strict()),contentHash:g}).strict(),He=e.enum(["ready","model_download_required","compute_setup_required","provider_managed","unsupported"]),No=e.object({id:r,label:e.string().trim().min(1).max(500),description:e.string().trim().min(1).max(2e3),destinationId:r,computeAdapterId:r,runtimeAdapterId:r,engineAdapterId:r,methods:e.array(e.string().trim().min(1).max(100)),capabilityPills:e.array(e.string().trim().min(1).max(100)),executionMode:e.enum(["local_worker","provider_native"]),approvalPolicy:e.object({providerId:Ke,providerLabel:e.string().trim().min(1).max(200),settingsActionLabel:e.string().trim().min(1).max(500).nullable(),exportApprovalRequired:e.boolean(),exportDescription:e.string().trim().min(1).max(2e3).nullable(),preparationRequired:e.boolean(),minimumSpendUsd:e.number().nonnegative(),maximumSpendUsd:e.number().positive(),defaultMaximumSpendUsd:e.number().positive(),minimumRetentionDays:e.number().int().positive(),maximumRetentionDays:e.number().int().positive(),defaultRetentionDays:e.number().int().positive(),methodRequirement:e.string().trim().min(1).max(2e3).nullable()}).strict().nullable(),limits:e.object({maximumSequenceLength:e.number().int().positive(),maximumOutputTokens:e.number().int().positive(),maximumTrainingExamples:e.number().int().positive().nullable()}).strict(),defaults:e.object({loraRank:e.number().int().positive(),maxSteps:e.number().int().positive(),rolloutGroupSize:e.number().int().min(2).max(32),rolloutConcurrency:e.number().int().positive().max(32),rolloutOutputTokens:e.number().int().positive()}).strict(),available:e.boolean(),unavailableReason:e.string().trim().min(1).max(5e3).nullable()}).strict(),Uo=e.object({selectionKey:r,label:e.string().trim().min(1).max(500),source:e.enum(["local","builtin","huggingface","managed","search"]),modelId:e.string().trim().min(1).max(1e3),revision:e.string().trim().min(1).max(500).nullable(),tokenizerRevision:e.string().trim().min(1).max(500).nullable(),chatTemplateHash:g.nullable(),modelAssetId:r.nullable(),expectedBytes:e.number().int().nonnegative().nullable(),cached:e.boolean(),known:e.boolean(),searchResolved:e.boolean(),computeAdapterIds:e.array(r),engineAdapterIds:e.array(r),preparationState:He,reason:e.string().trim().min(1).max(5e3).nullable(),compatibilities:e.array(e.object({targetId:r,methods:e.array(e.string().trim().min(1).max(100)),state:He,reason:e.string().trim().min(1).max(5e3).nullable()}).strict())}).strict(),Mm=e.object({schemaVersion:e.literal("openpond.trainingCatalog.v1"),models:e.array(Uo).max(1e5),engines:e.array(Ho),compute:e.array(qo),runtimes:e.array(Do),targets:e.array(No),generatedAt:_,contentHash:g}).strict(),Lm=e.object({schemaVersion:e.literal("openpond.trainingPreparationPlan.v1"),modelRunId:r,state:He,reason:e.string().trim().min(1).max(5e3).nullable(),runtime:ge.nullable(),compute:be.nullable(),engine:he.nullable(),downloads:e.array(e.object({kind:e.literal("model"),label:e.string().trim().min(1).max(500),expectedBytes:e.number().int().nonnegative(),digest:e.string().trim().min(8).max(500),cached:e.boolean(),state:e.enum(["ready","required","downloading","cancelled","failed"]),progress:e.number().min(0).max(1).nullable(),cancellable:e.boolean(),diskImpactBytes:e.number().int().nonnegative()}).strict()),dataMovement:e.array(e.object({direction:e.enum(["upload","download","none"]),label:e.string().trim().min(1).max(500),bytes:e.number().int().nonnegative().nullable()}).strict()),quoteUsd:e.number().nonnegative().nullable(),maximumSpendUsd:e.number().nonnegative().nullable(),retentionDays:e.number().int().nonnegative().nullable(),sideEffectsStarted:e.literal(!1),contentHash:g}).strict();var Nm=e.object({sessionId:e.string().min(1),provider:e.string().min(1),title:e.string(),targetRevision:e.string().min(1),managedSessionId:e.string().nullable(),latestTurnId:e.string().nullable(),activeTurnId:e.string().nullable(),paused:e.boolean(),approvalBlocked:e.boolean(),canSendFollowup:e.boolean(),canSteer:e.boolean(),unavailableReason:e.string().nullable(),inbox:Vt}).strict(),Um=e.object({authority:e.literal("user_click"),mode:e.enum(["followup","steer"]),expectedTargetRevision:e.string().min(1),expectedTurnId:e.string().min(1).optional(),prompt:e.string().trim().min(1).max(F),idempotencyKey:e.string().trim().min(1).max(200),recommendationId:e.string().min(1).max(200).optional()}).strict().superRefine((t,n)=>{t.mode==="steer"&&!t.expectedTurnId&&n.addIssue({code:"custom",path:["expectedTurnId"],message:"Active steering requires the exact observed turn."}),t.mode==="followup"&&t.expectedTurnId&&n.addIssue({code:"custom",path:["expectedTurnId"],message:"Follow-up messages are delivered at the next turn boundary."})});var De=e.object({label:e.string().max(200),value:e.string().max(12e3),severity:e.enum(["info","warning","error"]).default("info")}).strict(),wn=e.object({kind:e.enum(["trajectory","evaluation"]),id:e.string().min(1).max(240),taskId:e.string().min(1).max(512).optional()}).strict().refine(t=>t.kind==="evaluation"?!!t.taskId:t.taskId===void 0,{message:"Evaluation feedback requires a task ID; trajectory feedback uses its receipt ID only."}),Cn=e.object({status:e.string(),score:e.number().nullable(),passed:e.boolean().nullable()}).strict(),Bm=e.object({jobId:e.string(),kind:e.enum(["trajectory","evaluation"]),id:e.string(),taskId:e.string().optional(),compositionSha256:e.string(),training:Cn,evaluation:Cn,graders:e.array(e.object({graderId:e.string(),role:e.enum(["training","evaluation"]),status:e.string(),rawScore:e.number().nullable(),normalizedScore:e.number().nullable(),passed:e.boolean().nullable(),message:e.string().nullable(),failureClass:e.string().nullable(),feedback:e.array(e.string().max(32768)).max(8)}).strict()).max(32)}).strict(),Tn=e.object({sourceJobId:e.string(),checkpointId:e.string(),checkpointJobId:e.string(),groupId:e.string(),groupIndex:e.number().int().nonnegative(),optimizerDisposition:e.enum(["applied","skipped_no_signal"]),inputPolicyVersion:e.number().int().nonnegative(),outputPolicyVersion:e.number().int().nonnegative().optional()}).strict(),qe=e.object({label:e.string(),state:e.enum(["done","active","pending","missing","failed"]),status:e.string(),detail:e.string().optional(),diagnostics:e.array(De).max(100).optional(),feedback:e.array(wn).max(100).optional(),error:e.string().optional(),progress:e.number().min(0).max(1).optional(),inLoop:e.boolean().optional()}).strict(),Km=e.object({jobId:e.string(),teamId:e.string(),modelProjectId:e.string(),state:e.string(),policyVersion:e.number().int().nonnegative(),groupsCompleted:e.number().int().nonnegative(),groupsTarget:e.number().int().nonnegative(),live:e.boolean(),continuation:e.object({sourceJobId:e.string(),artifactId:e.string(),checkpointId:e.string(),optimizerMode:e.enum(["continue","reset"]),materialized:e.boolean(),parentRank:e.number().int().positive().optional(),trainableRank:e.number().int().positive().optional()}).strict().optional(),recovery:e.object({sourceJobId:e.string(),checkpointId:e.string(),checkpointJobId:e.string().optional(),policyVersion:e.number().int().positive(),completedGroups:e.number().int().positive(),optimizerStateRestored:e.boolean(),optimizerUpdatesApplied:e.number().int().nonnegative().optional(),replayGroups:e.array(Tn).max(128).optional(),replayCompleted:e.boolean().optional(),undurablePolicyVersion:e.number().int().positive().optional()}).strict().optional(),nodes:e.array(qe).max(10),inference:qe.nullable(),groups:e.array(e.object({index:e.number().int().nonnegative(),optimizerDisposition:e.enum(["applied","skipped_no_signal"]).optional(),replay:Tn.optional(),inherited:e.object({sourceJobId:e.string(),checkpointId:e.string(),checkpointJobId:e.string(),optimizerDisposition:e.enum(["applied","skipped_no_signal"]),inputPolicyVersion:e.number().int().nonnegative(),outputPolicyVersion:e.number().int().nonnegative().optional()}).strict().optional(),nodes:e.array(qe).max(5).optional(),state:e.string(),meanReward:e.number().nullable(),plannedSlots:e.number().int().nonnegative(),diagnostics:e.array(De).max(100).optional(),attempts:e.array(e.object({id:e.string(),slot:e.number().int().nonnegative(),attempt:e.number().int().positive(),state:e.string(),reward:e.number().nullable(),diagnostics:e.array(De).max(100).optional(),feedback:e.array(wn).max(100).optional()}).strict()).max(1e3)}).strict()).max(50),groupCount:e.number().int().nonnegative(),logs:e.array(e.object({id:e.string(),at:e.string(),source:e.string(),message:e.string(),level:e.string()}).strict()).max(200)}).strict();var H=e.string().trim().min(1).max(240),Ne=e.string().regex(/^[a-f0-9]{64}$/),Jm=e.object({location:e.literal("local"),harnesses:e.array(e.object({id:H,name:e.string().max(500),source:mt}).strict()).max(100),profiles:e.array(e.object({id:H,name:e.string().max(500),profileRef:u,sourceRevision:e.string().min(1).max(500),harnessRelease:e.object({id:H,contentHash:Ne}).strict(),definitionId:H,definitionHash:Ne,taskset:e.object({id:H,revision:e.number().int().positive(),contentHash:Ne}).strict(),taskCount:e.number().int().nonnegative(),taskIds:e.array(H).max(1e4),seeds:e.array(e.string()).max(1e4)}).strict()).max(100)}).strict();var zo=e.object({id:e.uuid(),action:e.enum(["advanced-refiner-start","experiment-evaluation-schedule"]),intentHash:e.string().regex(/^[a-f0-9]{64}$/),createdAt:e.iso.datetime(),reviewedIntent:e.unknown().nullable(),command:e.unknown().nullable(),phase:e.enum(["reviewed","dispatching"]).nullable(),recoveryReady:e.boolean()}).strict().superRefine((t,n)=>{t.recoveryReady!==(t.reviewedIntent!==null&&t.command!==null&&t.phase!==null)&&n.addIssue({code:"custom",message:"Only the actual retained intent and command admit automatic recovery."})}),Qm=e.object({items:e.array(zo).max(100),nextCursor:e.uuid().nullable()}).strict();var A=e.string().min(1).max(200),td=e.object({operationId:A,payloadHash:e.string().regex(/^[a-f0-9]{64}$/),sessionId:A,sessionTitle:e.string().min(1).max(300),turnId:A,workspaceId:A,providerId:A,modelId:A.nullable(),capturedAt:e.string().datetime(),taskStatus:e.enum(["in_progress","completed","failed","interrupted"]),taskCompletedAt:e.string().datetime().nullable(),error:e.string().max(2e3).nullable(),events:e.array(e.object({id:A,sequence:e.number().int().positive(),timestamp:e.string().max(100),kind:e.enum(["assistant.delta","tool.started","tool.completed"]),text:e.string().max(4e3),action:e.string().max(300).nullable(),status:e.enum(["started","completed","failed","pending"]).nullable(),messageId:e.string().max(300).nullable(),messageSnapshot:e.boolean()}).strict()).max(100),coverage:e.object({olderEventsOmitted:e.boolean(),textTruncated:e.boolean(),textLimit:e.literal(16e3),eventLimit:e.literal(100)}).strict()}).strict().superRefine((t,n)=>{t.events.reduce((i,l)=>i+l.text.length,0)>16e3&&n.addIssue({code:"custom",message:"Inspection text exceeds its shared budget"}),t.taskStatus==="in_progress"&&t.taskCompletedAt!==null&&n.addIssue({code:"custom",message:"A running task cannot have a completion time"})});var En=e.object({scope:L,authorizationRevision:e.number().int().positive()}).strict(),Fo=e.object({id:e.string().min(1).max(200),name:e.string().min(1).max(300),cwd:e.string().min(1).max(8192).nullable(),revision:e.string().regex(/^[a-f0-9]{64}$/).nullable(),available:e.boolean(),previouslyShared:e.boolean(),shared:e.boolean()}).strict(),id=e.object({authority:En.nullable(),projects:Fo.array().max(100),nextCursor:e.string().min(1).max(200).nullable()}).strict(),rd=e.object({projectId:e.string().min(1).max(200),shared:e.boolean(),expectedRevision:e.string().regex(/^[a-f0-9]{64}$/).nullable(),expectedAuthority:En}).strict(),sd=e.object({projectId:e.string().min(1).max(200),shared:e.boolean(),discovery:e.enum(["current","pending"])}).strict();var Bo=e.object({kind:e.enum(["dataset","experiment","model","training"]),id:e.string().trim().min(1).max(240),revision:e.number().int().positive().optional(),location:e.enum(["local","cloud"]).default("local"),teamId:e.string().min(1).max(240).optional(),apiOrigin:e.url().max(2e3).optional(),scopeId:e.string().min(1).max(240).optional(),sessionId:e.string().min(1).max(240).optional()}).strict(),Ko=e.object({target:Bo,label:e.string().max(500),detail:e.string().max(2e3)}).strict(),On=Ko.extend({resource:R.optional(),dataset:R.optional(),graders:e.array(R).optional(),training:ae.optional(),model:e.object({id:e.string(),name:e.string(),portableProjectId:e.string(),baseModel:e.string().nullable(),trainingDataset:e.object({id:e.string(),revision:e.number().int().positive(),name:e.string()}).nullable(),evaluationDataset:e.object({id:e.string(),revision:e.number().int().positive(),name:e.string()}).nullable()}).strict().optional()}).strict();var Wo=e.enum(["prepare_evaluation","check_graders","inspect_results","diagnose","compare"]),hd=e.object({id:e.string(),sessionId:e.string(),sourceTurnId:e.string(),action:Wo,label:e.string(),draft:e.string(),contexts:te,focus:On}).strict();export{xe as a,xa as b,vl as c,Il as d,Rl as e,Zo as f,ai as g,oi as h,ii as i,Dn as j,ri as k,si as l,li as m,ci as n,mi as o,zn as p,di as q,Fn as r,Qt as s,z as t,Mt as u,u as v,E as w,Ti as x,en as y,Ml as z,Y as A,Dt as B,Nt as C,zl as D,Fl as E,Kl as F,ic as G,P as H,ma as I,Q as J,tr as K,nr as L,ar as M,or as N,ir as O,rr as P,sr as Q,lr as R,cr as S,mr as T,dr as U,ur as V,pr as W,gr as X,br as Y,hr as Z,xr as _,fr as $,Sr as aa,yr as ba,vr as ca,Ir as da,sc as ea,dc as fa,uc as ga,pc as ha,cn as ia,hc as ja,no as ka,fc as la,Sc as ma,yc as na,ao as oa,Ic as pa,oo as qa,kc as ra,jc as sa,Cc as ta,wc as ua,ro as va,Mc as wa,Lc as xa,Hc as ya,po as za,Fc as Aa,$c as Ba,Pr as Ca,jr as Da,Ar as Ea,zt as Fa,Cr as Ga,Tr as Ha,Zc as Ia,Sn as Ja,em as Ka,tm as La,yn as Ma,fo as Na,nm as Oa,am as Pa,fn as Qa,om as Ra,im as Sa,rm as Ta,In as Ua,Ro as Va,jo as Wa,cm as Xa,mm as Ya,jn as Za,dm as _a,um as $a,Co as ab,pm as bb,gm as cb,bm as db,hm as eb,xm as fb,fm as gb,ke as hb,Nr as ib,Ur as jb,L as kb,Fr as lb,Br as mb,Re as nb,Bt as ob,Kr as pb,Z as qb,Kt as rb,Wr as sb,Gr as tb,Jr as ub,ya as vb,Xr as wb,ym as xb,us as yb,ps as zb,gs as Ab,Ho as Bb,Cm as Cb,Tm as Db,wm as Eb,Em as Fb,Om as Gb,Mm as Hb,F as Ib,Is as Jb,ks as Kb,ka as Lb,te as Mb,_s as Nb,Rs as Ob,Ra as Pb,Vt as Qb,Ps as Rb,js as Sb,Pa as Tb,Um as Ub,Jt as Vb,Ns as Wb,zs as Xb,Fs as Yb,Bs as Zb,Aa as _b,Ca as $b,Pe as ac,ne as bc,Ea as cc,Oa as dc,Ws as ec,Ma as fc,La as gc,Vs as hc,ae as ic,al as jc,ol as kc,dl as lc,R as mc,ul as nc,pl as oc,gl as pc,wn as qc,Bm as rc,Km as sc,Jm as tc,Qm as uc,td as vc,En as wc,id as xc,rd as yc,Bo as zc,Wo as Ac,hd as Bc};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as v}from"./chunk-IZ56L2ZK.js";import{a as B}from"./chunk-KCJVFLBB.js";import{a as W,b as f,c as T,d as b,e as C,l as D,m as Q,n as J}from"./chunk-CN5OXQ7A.js";import{a as M,b as P,c as N}from"./chunk-NR5VASQB.js";import{a as u,e as h,f as y,g as S,h as H,i as x,j as E}from"./chunk-OZ6LRNRE.js";import{Db as L}from"./chunk-M6JRS5PA.js";import{e as O}from"./chunk-RV7PUSI2.js";import{a as w}from"./chunk-FTQLQJQV.js";var _={run_overlay:h,evaluation_review:O,refinement_candidate:M,refinement_candidate_lifecycle:P,cross_run_refinement_request:N,training_qualification:L,proposal:y,targeted_validation:S,merge_receipt:x,observation:W,trigger_decision:f,route_decision:T,apply_receipt:C,refiner_outcome:b};function k(o){return[o.id,o.ownerScope.kind,o.ownerScope.id,o.location,o.revision,o.sourceRevision,o.currentChannel.revision,o.currentChannel.release?.contentHash??null,JSON.stringify(o),o.createdAt,o.updatedAt]}w(k,"harnessWorkspaceParams");function g(o){let{createdAt:r,...e}=o;return e}w(g,"immutableHarnessReleaseRecord");var K=class extends B{static{w(this,"SqliteHarnessWorkspaceStore")}async createHarnessWorkspace(r){let e=u.parse(r);await this.ready;let s=this.writeQueue.then(()=>this.run(`INSERT INTO harness_workspaces (
2
+ import{a as v}from"./chunk-IZ56L2ZK.js";import{a as B}from"./chunk-KCJVFLBB.js";import{a as W,b as f,c as T,d as b,e as C,l as D,m as Q,n as J}from"./chunk-3YXYBYWK.js";import{a as u,e as h,f as y,g as S,h as H,i as x,j as E,n as M,o as P,p as N}from"./chunk-MPNJ2BB4.js";import{Db as L}from"./chunk-ABF3W2MO.js";import{e as O}from"./chunk-RV7PUSI2.js";import{a as w}from"./chunk-FTQLQJQV.js";var _={run_overlay:h,evaluation_review:O,refinement_candidate:M,refinement_candidate_lifecycle:P,cross_run_refinement_request:N,training_qualification:L,proposal:y,targeted_validation:S,merge_receipt:x,observation:W,trigger_decision:f,route_decision:T,apply_receipt:C,refiner_outcome:b};function k(o){return[o.id,o.ownerScope.kind,o.ownerScope.id,o.location,o.revision,o.sourceRevision,o.currentChannel.revision,o.currentChannel.release?.contentHash??null,JSON.stringify(o),o.createdAt,o.updatedAt]}w(k,"harnessWorkspaceParams");function g(o){let{createdAt:r,...e}=o;return e}w(g,"immutableHarnessReleaseRecord");var K=class extends B{static{w(this,"SqliteHarnessWorkspaceStore")}async createHarnessWorkspace(r){let e=u.parse(r);await this.ready;let s=this.writeQueue.then(()=>this.run(`INSERT INTO harness_workspaces (
3
3
  id, owner_kind, owner_id, location, revision, source_revision,
4
4
  channel_revision, current_release_hash, payload, created_at, updated_at
5
5
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,k(e)));return this.writeQueue=s.catch(()=>{}),await s,e}async createHarnessWorkspaceWithRelease(r){let e=u.parse(r.workspace),s=v.parse(r.release);if(s.workspaceId!==e.id||e.currentChannel.release?.id!==s.harnessRelease.id||e.currentChannel.release.contentHash!==s.harnessRelease.contentHash||e.sourceRevision!==s.sourceRevision)throw new Error("Initial Harness workspace and release record are not bound to the same source and release.");await this.ready;let a=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{await this.run(`INSERT INTO harness_workspaces (
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as n}from"./chunk-VNJAAYNQ.js";import{Ab as d,Bb as v,Cb as x,O as h,ib as g,o as m,sb as S,wb as _,yb as q,zb as L}from"./chunk-4M3YW3EQ.js";import{ra as b,x as p}from"./chunk-PBZCXPPC.js";import{A as r}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var f=r.object({id:n,scope:n,sourceId:n,name:r.string().trim().min(1).max(100),keyPrefix:r.string().min(1).max(100),createdAt:r.iso.datetime(),expiresAt:r.iso.datetime(),revokedAt:r.iso.datetime().nullable()}).strict(),I=r.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/),y=r.discriminatedUnion("action",[r.object({action:r.literal("create"),scope:n,sourceId:n,name:r.string().trim().min(1).max(100),expiresAt:r.iso.datetime(),operationId:n,apiKey:I}).strict(),r.object({action:r.literal("list"),scope:n,sourceId:n,afterId:n.optional(),limit:r.number().int().min(1).max(100).default(30)}).strict(),r.object({action:r.literal("revoke"),scope:n,sourceId:n,id:n}).strict()]),k=r.object({credential:f,apiKey:I}).strict(),C=r.object({items:r.array(f).max(100),nextCursor:n.nullable()}).strict(),R=r.object({scope:n,sourceId:n}).strict(),P=r.object({scope:n,source:m,taskDefinition:m,enabled:r.boolean(),allowedSplits:r.array(b).min(1).max(4)}).strict();function U(e,t){let a=Date.parse(r.iso.datetime().parse(e));if(a<=t.getTime()||a>t.getTime()+2160*60*60*1e3)throw new Error("Source credentials must expire within 90 days.")}l(U,"assertLearningCredentialExpiry");var j=r.object({batchId:r.string().trim().min(1).max(500),modelProjectId:r.string().trim().min(1).max(500)}).strict(),T=r.object({batchId:r.string().min(1),projectId:r.string().min(1),tasksetId:r.string().min(1),releaseId:r.string().min(1),revision:r.number().int().positive(),contentHash:r.string().regex(/^[a-f0-9]{64}$/)}).strict(),o=class extends Error{static{l(this,"OpenPondLearningError")}constructor(e,t,a,s){super(a),this.status=e,this.code=t,this.details=s,this.name="OpenPondLearningError"}status;code;details},J=class{static{l(this,"OpenPondLearningClient")}#e;constructor(e){if(!e.apiKey.trim()||!e.scope.trim())throw new Error("Learning API key and scope are required.");let t=new URL(e.baseUrl);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.search||t.hash)throw new Error("Learning base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.#e={...e,baseUrl:t.toString().replace(/\/+$/,"")}}async command(e,t={}){q(e);let a=L.parse({scope:this.#e.scope,command:e}),s=x.parse(await this.#t("commands",a,t));if(s.operationId!==e.operationId)throw new o(502,"operation_identity_mismatch","Learning response did not match the submitted operation.",null);return s}submitExample(e,t={}){return this.command({action:"submit_example",operationId:e.idempotencyKey,example:e},t)}submitFeedback(e,t={}){return this.command({action:"submit_feedback",operationId:e.idempotencyKey,feedback:e},t)}async get(e,t,a,s={}){let i=d.parse({action:"get",scope:this.#e.scope,kind:e,id:t,...a===void 0?{}:{revision:a}});return g[e].parse(await this.#t("read",i,s))}async inspectEvidence(e,t={}){let a=d.parse({action:"inspect_evidence",scope:this.#e.scope,evidence:e}),s=v.parse(await this.#t("read",a,t));if(!h(s.evidence,e))throw new o(502,"evidence_identity_mismatch","Inspection did not match the requested evidence release.",null);return s}async inspectTaskQueue(e=null,t={}){let a=d.parse({action:"inspect_task_queue",scope:this.#e.scope,modelProjectId:e}),s=_.parse(await this.#t("read",a,t));if(s.modelProjectId!==e)throw new o(502,"model_identity_mismatch","Task queue did not match the requested Model.",null);return s}async inspectPolicy(e,t={}){let a=d.parse({action:"inspect_policy",scope:this.#e.scope,policy:e}),s=S.parse(await this.#t("read",a,t));if(!h(s.policy,e))throw new o(502,"policy_identity_mismatch","Inspection did not match the requested policy release.",null);return s}async createSourceCredential(e,t={}){let a=y.parse({...e,action:"create",scope:this.#e.scope}),s=k.parse(await this.#t("credentials",a,t));if(this.#r(s.credential,e.sourceId),s.apiKey!==e.apiKey||!e.apiKey.startsWith(`${s.credential.keyPrefix}_`))throw new o(502,"credential_identity_mismatch","Credential response did not match the prepared credential.",null);return s}async listSourceCredentials(e,t={},a={}){let s=y.parse({...t,action:"list",scope:this.#e.scope,sourceId:e}),i=C.parse(await this.#t("credentials",s,a));if(i.items.length>(t.limit??30))throw new o(502,"credential_page_invalid","Credential response exceeded the requested page size.",null);for(let c of i.items)this.#r(c,e);return i}async revokeSourceCredential(e,t,a={}){let s=y.parse({action:"revoke",scope:this.#e.scope,sourceId:e,id:t}),i=f.parse(await this.#t("credentials",s,a));if(this.#r(i,e),i.id!==t||i.revokedAt===null)throw new o(502,"credential_revocation_mismatch","Credential revocation did not match the requested credential.",null);return i}async sourceConfiguration(e,t={}){let a=R.parse({scope:this.#e.scope,sourceId:e}),s=P.parse(await this.#t("source-config",a,t));if(s.scope!==this.#e.scope||s.source.id!==e)throw new o(502,"source_identity_mismatch","Source configuration did not match the requested source.",null);return s}#r(e,t){if(e.scope!==this.#e.scope||e.sourceId!==t)throw new o(502,"credential_scope_mismatch","Credential response did not match the requested source.",null)}async list(e,t={},a={}){let s=d.parse({action:"list",scope:this.#e.scope,kind:e,...t});return r.object({items:r.array(g[e]).max(100),nextCursor:r.string().nullable()}).strict().parse(await this.#t("read",s,a))}async publishBatch(e,t={}){let a=j.parse(e),s=T.parse(await this.#t("publish-batch",{...a,scope:this.#e.scope},t));if(s.batchId!==a.batchId)throw new o(502,"batch_identity_mismatch","Published batch response did not match the requested batch.",null);return s}async#t(e,t,a){p(t,16777216);let s=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/learning/${e}`,{method:"POST",headers:{Authorization:`Bearer ${this.#e.apiKey}`,"Content-Type":"application/json",Accept:"application/json","X-OpenPond-Team-Id":this.#e.scope},body:JSON.stringify(t),signal:a.signal,redirect:"error"}),i=await A(s);if(!s.ok){let c=r.object({code:r.string().optional(),error:r.string().optional()}).passthrough().safeParse(i);throw new o(s.status,c.success?c.data.code??"learning_request_failed":"learning_request_failed",c.success?c.data.error??`Learning request failed (${s.status}).`:`Learning request failed (${s.status}).`,i)}return i}};async function A(e){let a=e.body?.getReader();if(!a)throw new o(e.status,"empty_response","Learning response was empty.",null);let s=new TextDecoder,i=0,c="";try{for(;;){let u=await a.read();if(u.done)break;if(i+=u.value.byteLength,i>16777216)throw new o(e.status,"response_too_large","Learning response exceeded 16 MiB; request a smaller page.",null);c+=s.decode(u.value,{stream:!0})}c+=s.decode();let w=JSON.parse(c);return p(w,16777216),w}finally{await a.cancel(),a.releaseLock()}}l(A,"readBoundedLearningResponse");export{f as a,I as b,y as c,R as d,P as e,U as f,o as g,J as h};
2
+ import{b as n}from"./chunk-VNJAAYNQ.js";import{Ab as L,Bb as d,Cb as v,Db as x,P as h,jb as g,p as m,tb as S,xb as _,zb as q}from"./chunk-J572ANHX.js";import{ra as b,x as p}from"./chunk-PBZCXPPC.js";import{A as r}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var f=r.object({id:n,scope:n,sourceId:n,name:r.string().trim().min(1).max(100),keyPrefix:r.string().min(1).max(100),createdAt:r.iso.datetime(),expiresAt:r.iso.datetime(),revokedAt:r.iso.datetime().nullable()}).strict(),I=r.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/),y=r.discriminatedUnion("action",[r.object({action:r.literal("create"),scope:n,sourceId:n,name:r.string().trim().min(1).max(100),expiresAt:r.iso.datetime(),operationId:n,apiKey:I}).strict(),r.object({action:r.literal("list"),scope:n,sourceId:n,afterId:n.optional(),limit:r.number().int().min(1).max(100).default(30)}).strict(),r.object({action:r.literal("revoke"),scope:n,sourceId:n,id:n}).strict()]),k=r.object({credential:f,apiKey:I}).strict(),C=r.object({items:r.array(f).max(100),nextCursor:n.nullable()}).strict(),R=r.object({scope:n,sourceId:n}).strict(),P=r.object({scope:n,source:m,taskDefinition:m,enabled:r.boolean(),allowedSplits:r.array(b).min(1).max(4)}).strict();function U(e,t){let a=Date.parse(r.iso.datetime().parse(e));if(a<=t.getTime()||a>t.getTime()+2160*60*60*1e3)throw new Error("Source credentials must expire within 90 days.")}l(U,"assertLearningCredentialExpiry");var j=r.object({batchId:r.string().trim().min(1).max(500),modelProjectId:r.string().trim().min(1).max(500)}).strict(),T=r.object({batchId:r.string().min(1),projectId:r.string().min(1),tasksetId:r.string().min(1),releaseId:r.string().min(1),revision:r.number().int().positive(),contentHash:r.string().regex(/^[a-f0-9]{64}$/)}).strict(),o=class extends Error{static{l(this,"OpenPondLearningError")}constructor(e,t,a,s){super(a),this.status=e,this.code=t,this.details=s,this.name="OpenPondLearningError"}status;code;details},J=class{static{l(this,"OpenPondLearningClient")}#e;constructor(e){if(!e.apiKey.trim()||!e.scope.trim())throw new Error("Learning API key and scope are required.");let t=new URL(e.baseUrl);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.search||t.hash)throw new Error("Learning base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.#e={...e,baseUrl:t.toString().replace(/\/+$/,"")}}async command(e,t={}){q(e);let a=L.parse({scope:this.#e.scope,command:e}),s=x.parse(await this.#t("commands",a,t));if(s.operationId!==e.operationId)throw new o(502,"operation_identity_mismatch","Learning response did not match the submitted operation.",null);return s}submitExample(e,t={}){return this.command({action:"submit_example",operationId:e.idempotencyKey,example:e},t)}submitFeedback(e,t={}){return this.command({action:"submit_feedback",operationId:e.idempotencyKey,feedback:e},t)}async get(e,t,a,s={}){let i=d.parse({action:"get",scope:this.#e.scope,kind:e,id:t,...a===void 0?{}:{revision:a}});return g[e].parse(await this.#t("read",i,s))}async inspectEvidence(e,t={}){let a=d.parse({action:"inspect_evidence",scope:this.#e.scope,evidence:e}),s=v.parse(await this.#t("read",a,t));if(!h(s.evidence,e))throw new o(502,"evidence_identity_mismatch","Inspection did not match the requested evidence release.",null);return s}async inspectTaskQueue(e=null,t={}){let a=d.parse({action:"inspect_task_queue",scope:this.#e.scope,modelProjectId:e}),s=_.parse(await this.#t("read",a,t));if(s.modelProjectId!==e)throw new o(502,"model_identity_mismatch","Task queue did not match the requested Model.",null);return s}async inspectPolicy(e,t={}){let a=d.parse({action:"inspect_policy",scope:this.#e.scope,policy:e}),s=S.parse(await this.#t("read",a,t));if(!h(s.policy,e))throw new o(502,"policy_identity_mismatch","Inspection did not match the requested policy release.",null);return s}async createSourceCredential(e,t={}){let a=y.parse({...e,action:"create",scope:this.#e.scope}),s=k.parse(await this.#t("credentials",a,t));if(this.#r(s.credential,e.sourceId),s.apiKey!==e.apiKey||!e.apiKey.startsWith(`${s.credential.keyPrefix}_`))throw new o(502,"credential_identity_mismatch","Credential response did not match the prepared credential.",null);return s}async listSourceCredentials(e,t={},a={}){let s=y.parse({...t,action:"list",scope:this.#e.scope,sourceId:e}),i=C.parse(await this.#t("credentials",s,a));if(i.items.length>(t.limit??30))throw new o(502,"credential_page_invalid","Credential response exceeded the requested page size.",null);for(let c of i.items)this.#r(c,e);return i}async revokeSourceCredential(e,t,a={}){let s=y.parse({action:"revoke",scope:this.#e.scope,sourceId:e,id:t}),i=f.parse(await this.#t("credentials",s,a));if(this.#r(i,e),i.id!==t||i.revokedAt===null)throw new o(502,"credential_revocation_mismatch","Credential revocation did not match the requested credential.",null);return i}async sourceConfiguration(e,t={}){let a=R.parse({scope:this.#e.scope,sourceId:e}),s=P.parse(await this.#t("source-config",a,t));if(s.scope!==this.#e.scope||s.source.id!==e)throw new o(502,"source_identity_mismatch","Source configuration did not match the requested source.",null);return s}#r(e,t){if(e.scope!==this.#e.scope||e.sourceId!==t)throw new o(502,"credential_scope_mismatch","Credential response did not match the requested source.",null)}async list(e,t={},a={}){let s=d.parse({action:"list",scope:this.#e.scope,kind:e,...t});return r.object({items:r.array(g[e]).max(100),nextCursor:r.string().nullable()}).strict().parse(await this.#t("read",s,a))}async publishBatch(e,t={}){let a=j.parse(e),s=T.parse(await this.#t("publish-batch",{...a,scope:this.#e.scope},t));if(s.batchId!==a.batchId)throw new o(502,"batch_identity_mismatch","Published batch response did not match the requested batch.",null);return s}async#t(e,t,a){p(t,16777216);let s=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/learning/${e}`,{method:"POST",headers:{Authorization:`Bearer ${this.#e.apiKey}`,"Content-Type":"application/json",Accept:"application/json","X-OpenPond-Team-Id":this.#e.scope},body:JSON.stringify(t),signal:a.signal,redirect:"error"}),i=await A(s);if(!s.ok){let c=r.object({code:r.string().optional(),error:r.string().optional()}).passthrough().safeParse(i);throw new o(s.status,c.success?c.data.code??"learning_request_failed":"learning_request_failed",c.success?c.data.error??`Learning request failed (${s.status}).`:`Learning request failed (${s.status}).`,i)}return i}};async function A(e){let a=e.body?.getReader();if(!a)throw new o(e.status,"empty_response","Learning response was empty.",null);let s=new TextDecoder,i=0,c="";try{for(;;){let u=await a.read();if(u.done)break;if(i+=u.value.byteLength,i>16777216)throw new o(e.status,"response_too_large","Learning response exceeded 16 MiB; request a smaller page.",null);c+=s.decode(u.value,{stream:!0})}c+=s.decode();let w=JSON.parse(c);return p(w,16777216),w}finally{await a.cancel(),a.releaseLock()}}l(A,"readBoundedLearningResponse");export{f as a,I as b,y as c,R as d,P as e,U as f,o as g,J as h};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as I,b as v}from"./chunk-GLUWATL5.js";import{E as L,F as E}from"./chunk-KK626T3Z.js";import{f as x}from"./chunk-UGOK7VTC.js";import{a}from"./chunk-FTQLQJQV.js";var T=class extends Error{constructor(t,e){super(`API request timed out after ${t}ms: ${e}`);this.timeoutMs=t;this.requestUrl=e;this.name="ApiTimeoutError"}timeoutMs;requestUrl;static{a(this,"ApiTimeoutError")}code="OPENPOND_API_TIMEOUT"},w=class extends Error{constructor(t,e){super(`API response exceeded ${t} bytes: ${e}`);this.maximumBytes=t;this.requestUrl=e;this.name="ApiResponseTooLargeError"}maximumBytes;requestUrl;static{a(this,"ApiResponseTooLargeError")}code="OPENPOND_API_RESPONSE_TOO_LARGE"},O=class extends Error{constructor(t,e,o,r=null){let c=r||e;super(`${o} failed: ${t}${c?` ${c}`:""}`);this.status=t;this.apiMessage=r;this.name="OpenPondApiError",this.code=e||"OPENPOND_API_ERROR"}status;apiMessage;static{a(this,"OpenPondApiError")}code};async function i(s,n,t,e={}){let{timeoutMs:o=3e4,maxResponseBytes:r=8388608,explicitBearerAuth:c=!1,...p}=e,d=`${s}${t}`,m=new Headers(p.headers);m.set("Content-Type","application/json");let g=c?void 0:process.env.OPENPOND_API_KEY,h=n?.trim()||"",u=!c&&h.startsWith("opk_"),S=g||(u?h:null);S&&!m.has("openpond-api-key")&&m.set("openpond-api-key",S),n?m.set("Authorization",u?`ApiKey ${h}`:`Bearer ${n}`):g&&!m.has("Authorization")&&m.set("Authorization",`ApiKey ${g}`);let y=new AbortController,f=new T(o,d),R=o>0?setTimeout(()=>y.abort(f),o):null;R?.unref?.();let P=U(p.signal,y.signal,o),k=a(()=>{R&&clearTimeout(R)},"cleanup");try{let A=await fetch(d,{...p,headers:m,signal:P});return C(A,{cleanup:k,maximumBytes:r,requestUrl:d,timeoutController:y,timeoutError:f})}catch(A){throw k(),y.signal.aborted?f:A}}a(i,"apiFetch");async function l(s,n){let t;try{let e=await s.text();t=e?JSON.parse(e):{}}catch(e){if(e instanceof T||e instanceof w)throw e;t={}}if(!s.ok){let e=typeof t.error=="string"?t.error:null,o=typeof t.message=="string"?t.message:null;throw new O(s.status,e,n,o)}return t}a(l,"readApiJson");function C(s,n){if(!s.body)return n.cleanup(),s;let t=Number(s.headers.get("content-length"));if(n.maximumBytes>0&&Number.isFinite(t)&&t>n.maximumBytes)throw n.cleanup(),s.body.cancel(),new w(n.maximumBytes,n.requestUrl);let e=s.body.getReader(),o=0,r=new ReadableStream({async pull(c){try{let p=await e.read();if(p.done){n.cleanup(),c.close();return}if(o+=p.value.byteLength,n.maximumBytes>0&&o>n.maximumBytes){n.cleanup(),await e.cancel(),c.error(new w(n.maximumBytes,n.requestUrl));return}c.enqueue(p.value)}catch(p){n.cleanup(),c.error(n.timeoutController.signal.aborted?n.timeoutError:p)}},async cancel(c){n.cleanup(),await e.cancel(c)}});return new Response(r,{headers:s.headers,status:s.status,statusText:s.statusText})}a(C,"boundedResponse");function U(s,n,t){return t<=0?s??void 0:s?AbortSignal.any([s,n]):n}a(U,"composedSignal");async function _(s,n,t,e,o){let r=await i(s,n,`/v4/apps/${t}/commits`,{method:"POST",body:JSON.stringify({files:e,message:o})});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Commit failed: ${r.status} ${c}`)}return await r.json()}a(_,"commitFiles");async function j(s,n,t,e){let o=e?.environment??"production",r=await i(s,n,`/v4/apps/${t}/deployments`,{method:"POST",body:JSON.stringify({environment:o,...e?.commitSha?{commitSha:e.commitSha}:{},...e?.branch?{branch:e.branch}:{}})});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Deploy failed: ${r.status} ${c}`)}return await r.json()}a(j,"deployApp");async function B(s,n,t,e){let o=await i(s,n,`/v4/apps/${encodeURIComponent(t)}/deployments/promote-preview`,{method:"POST",body:JSON.stringify(e)});return l(o,"Preview promotion")}a(B,"promotePreviewToProduction");async function G(s,n,t,e){let o=await i(s,n,`/v1/apps/${encodeURIComponent(t)}/lifecycle/start`,{method:"POST",body:JSON.stringify(e)});return l(o,"App lifecycle start")}a(G,"startAppLifecycle");async function M(s,n,t){let e=await i(s,n,`/apps/deployments/${t}/logs`,{method:"GET"});if(!e.ok){let c=await e.text().catch(()=>"");throw new Error(`Deployment logs failed: ${e.status} ${c}`)}let o=await e.json().catch(()=>({}));return(Array.isArray(o.logs)?o.logs:[]).map(c=>{let p=typeof c.createdAt=="string"?c.createdAt:c.createdAt instanceof Date?c.createdAt.toISOString():new Date().toISOString();return{id:typeof c.id=="string"?c.id:`${Math.random()}`,type:typeof c.type=="string"?c.type:void 0,message:typeof c.message=="string"?c.message:"",createdAt:p}})}a(M,"getDeploymentLogs");async function J(s,n,t){let e=await i(s,n,`/apps/deployments/${t}/status`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment status failed: ${e.status} ${r}`)}return{status:(await e.json().catch(()=>({}))).deployment?.status}}a(J,"getDeploymentStatus");async function H(s,n,t,e){let o=new URLSearchParams;e?.status&&e.status.length>0&&o.set("status",e.status.join(",")),e?.createdAfter&&o.set("createdAfter",e.createdAfter),e?.branch&&o.set("branch",e.branch);let r=o.toString(),c=await i(s,n,`/apps/${t}/deployments/latest${r?`?${r}`:""}`,{method:"GET"});if(!c.ok){let d=await c.text().catch(()=>"");throw new Error(`Latest deployment lookup failed: ${c.status} ${d}`)}let p=await c.json().catch(()=>({}));return p.deployment?{id:p.deployment.id,status:p.deployment.status}:null}a(H,"getLatestDeploymentForApp");async function F(s,n,t){let e=await i(s,n,`/apps/deployments/${t}`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment fetch failed: ${e.status} ${r}`)}return(await e.json().catch(()=>({}))).deployment??null}a(F,"getDeploymentDetail");var V=new URL(v).hostname,D=new URL(I).hostname;async function ae(s,n,t){let e=new URLSearchParams;t?.handle&&e.set("handle",t.handle),typeof t?.limit=="number"&&Number.isFinite(t.limit)&&e.set("limit",String(Math.max(1,Math.floor(t.limit)))),typeof t?.offset=="number"&&Number.isFinite(t.offset)&&e.set("offset",String(Math.max(0,Math.floor(t.offset)))),typeof t?.includeScheduled=="boolean"&&e.set("includeScheduled",t.includeScheduled?"true":"false");let o=e.toString(),r=await i(s,n,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Apps list failed: ${r.status} ${p}`)}let c=await r.json().catch(()=>({}));return Array.isArray(c.apps)?c.apps:[]}a(ae,"listApps");async function ie(s,n,t){let e=await i(s,n,"/api/projects/local",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Create project failed: ${e.status} ${o}`)}return await e.json()}a(ie,"createLocalProject");async function ce(s,n,t){let e=await i(s,n,"/apps/repo/create",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Repo create failed: ${e.status} ${o}`)}return await e.json()}a(ce,"createRepo");async function pe(s,n,t,e){let o=await i(s,n,`/apps/${encodeURIComponent(t)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:e})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${r}`)}return await o.json()}a(pe,"updateAppCodeVisibility");async function ue(s,n,t,e){let o=await i(s,n,"/v4/apps/headless",{method:"POST",body:JSON.stringify({items:t,...e?{teamId:e}:{}})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Headless create failed: ${o.status} ${r}`)}return await o.json()}a(ue,"createHeadlessApps");async function le(s,n,t){let e=await i(s,n,`/v4/apps/${t}/template/status`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template status failed: ${e.status} ${o}`)}return await e.json()}a(le,"getTemplateStatus");async function de(s,n,t){let e=await i(s,n,`/v4/apps/${t}/template/branches`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template branches failed: ${e.status} ${o}`)}return await e.json()}a(de,"listTemplateBranches");async function me(s,n,t,e){let o=await i(s,n,`/v4/apps/${t}/template/deploy-latest`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Template deploy failed: ${o.status} ${r}`)}return await o.json()}a(me,"deployLatestTemplate");async function ge(s,n,t,e){let o=await i(s,n,`/v4/apps/${t}/environment`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Environment update failed: ${o.status} ${r}`)}return await o.json()}a(ge,"updateAppEnvironment");async function he(s,n,t){let e=await i(s,n,`/v4/apps/${t}/environment`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Environment get failed: ${e.status} ${o}`)}return await e.json()}a(he,"getAppEnvironment");async function ye(s,n){let t=await i(s,n,"/api/tools/manifest",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Manifest fetch failed: ${t.status} ${e}`)}return await t.json()}a(ye,"fetchToolManifest");async function fe(s,n){let t=await i(s,n,"/apps/tools",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Tools lookup failed: ${t.status} ${e}`)}return await t.json()}a(fe,"listUserTools");async function Re(s,n,t){let e=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Schedules lookup failed: ${e.status} ${r}`)}let o=await e.json().catch(()=>({}));return{schedules:Array.isArray(o.schedules)?o.schedules:[]}}a(Re,"listAppSchedules");async function we(s,n,t={}){let e=new URLSearchParams;t.domain&&e.set("domain",t.domain),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion),typeof t.limit=="number"&&e.set("limit",String(t.limit));for(let c of t.tags??[])e.append("tag",c);let o=e.toString(),r=await i(s,n,`/v1/opentool/recipes${o?`?${o}`:""}`,{method:"GET"});return l(r,"OpenTool recipe list")}a(we,"listOpenToolRecipes");async function Se(s,n,t){let e=await i(s,n,"/v1/opentool/recipes/search",{method:"POST",body:JSON.stringify(t)});return l(e,"OpenTool recipe search")}a(Se,"searchOpenToolRecipes");async function xe(s,n,t){let e=new URLSearchParams;typeof t.includeExamples=="boolean"&&e.set("includeExamples",String(t.includeExamples)),typeof t.includeTests=="boolean"&&e.set("includeTests",String(t.includeTests)),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion);let o=e.toString(),r=await i(s,n,`/v1/opentool/recipes/${encodeURIComponent(t.id)}${o?`?${o}`:""}`,{method:"GET"});return l(r,"OpenTool recipe get")}a(xe,"getOpenToolRecipe");async function Te(s,n,t){let e=await i(s,n,"/v1/opentool/rules",{method:"POST",body:JSON.stringify(t)});return l(e,"OpenTool rules get")}a(Te,"getOpenToolRules");function b(s){let n=new URLSearchParams;typeof s=="number"&&Number.isFinite(s)&&n.set("limit",String(Math.max(1,Math.floor(s))));let t=n.toString();return t?`?${t}`:""}a(b,"buildLimitQuery");function N(s){if(Array.isArray(s))return s;if(!s||typeof s!="object")return[];let n=s;return Array.isArray(n.logs)?n.logs:Array.isArray(n.runs)?n.runs:Array.isArray(n.scheduleRuns)?n.scheduleRuns:Array.isArray(n.items)?n.items:[]}a(N,"normalizeScheduleExecutionLogs");async function Pe(s,n,t,e){let o={...e?.preferredScheduleId?{preferredScheduleId:e.preferredScheduleId}:{},...e?.scheduleId?{scheduleId:e.scheduleId}:{},...e?.startAt?{startAt:e.startAt}:{},...e&&"endAt"in e?{endAt:e.endAt??null}:{}},r=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/start`,{method:"POST",body:JSON.stringify(o)});return l(r,"Schedule start")}a(Pe,"startAppSchedules");async function Ae(s,n,t){let e=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/stop`,{method:"POST",body:JSON.stringify({})});return l(e,"Schedule stop")}a(Ae,"stopAppSchedules");async function Ee(s,n){let t=await i(s,n,"/apps/schedules/current/stop",{method:"POST",body:JSON.stringify({})});return l(t,"Current schedule stop")}a(Ee,"stopCurrentAppSchedules");async function Oe(s,n,t){let e=await i(s,n,"/v1/schedules/run",{method:"POST",body:JSON.stringify({scheduleId:t.scheduleId})});return l(e,"Schedule run")}a(Oe,"runScheduleNow");async function be(s,n,t,e){let o=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/${encodeURIComponent(e)}`,{method:"DELETE"});return l(o,"Schedule delete")}a(be,"deleteOrArchiveSchedule");async function $e(s,n,t,e){let o=await i(s,n,`/v1/schedules/${encodeURIComponent(t)}/execution-logs${b(e?.limit)}`,{method:"GET"}),r=await l(o,"Schedule execution logs");return{logs:N(r)}}a($e,"listScheduleExecutionLogs");async function ke(s,n,t,e){let o=await i(s,n,`/v1/deployments/${encodeURIComponent(t)}/schedule-execution-logs${b(e?.limit)}`,{method:"GET"}),r=await l(o,"Deployment schedule execution logs");return{logs:N(r)}}a(ke,"listDeploymentScheduleExecutionLogs");async function Le(s,n,t){let e=await i(s,n,`/v1/schedule-execution-logs/${encodeURIComponent(t)}`,{method:"GET"});return l(e,"Schedule execution log")}a(Le,"getScheduleExecutionLog");async function Ie(s,n,t,e){let o=await i(s,n,`/v1/apps/${encodeURIComponent(t)}/execution-timeline${b(e?.limit)}`,{method:"GET"});return l(o,"App execution timeline")}a(Ie,"getAppExecutionTimeline");async function ve(s,n,t){return i(s,n,"/apps/agent/create",{method:"POST",body:JSON.stringify(t)})}a(ve,"createAgentFromPrompt");async function De(s,n,t){let e=new URLSearchParams;t?.appId&&e.set("appId",t.appId);let o=e.toString(),r=await i(s,n,`/apps/performance${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Performance lookup failed: ${r.status} ${c}`)}return await r.json()}a(De,"getUserPerformance");async function Ne(s,n,t){let e=new URLSearchParams({appId:t}),o=await i(s,n,`/apps/summary?${e.toString()}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Summary lookup failed: ${o.status} ${r}`)}return await o.json()}a(Ne,"getAppRuntimeSummary");async function z(s,n){let t=await i(s,n,"/v1/account",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Account lookup failed: ${t.status} ${e}`)}return await t.json()}a(z,"getOpenPondAccount");async function qe(s,n){let t=new Date().toISOString(),e=Date.now(),o=s.replace(/\/$/,"");try{let r=await i(o,null,"/health",{method:"GET",headers:{Accept:"application/json"}}),c=Date.now()-e,p=await r.json().catch(()=>({})),d=null,m=null;if(n?.trim())try{let g=await z(o,n);d=!0,m=g.account}catch{d=!1}return{reachable:r.ok,authenticated:d,apiBase:o,latencyMs:c,status:r.status,service:typeof p.service=="string"?p.service:null,checkedAt:t,account:m,...r.ok?{}:{error:r.statusText||`HTTP ${r.status}`}}}catch(r){return{reachable:!1,authenticated:n?.trim()?!1:null,apiBase:o,latencyMs:Date.now()-e,status:null,service:null,checkedAt:t,error:r instanceof Error?r.message:String(r)}}}a(qe,"checkOpenPondApiHealth");async function Ce(s,n,t){let e=await i(s,n,"/apps/assistant/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Assistant run failed: ${e.status} ${o}`)}return await e.json()}a(Ce,"runAssistantMode");async function Ue(s,n,t){let e=await i(s,n,"/apps/agent/digest",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Agent digest failed: ${e.status} ${o}`)}return await e.json()}a(Ue,"postAgentDigest");async function _e(s,n,t){let e=await i(s,n,"/apps/tools/execute",{method:"POST",body:JSON.stringify(t)}),o=await e.text().catch(()=>""),r=null;try{r=o?JSON.parse(o):null}catch{r=o}return e.ok?{ok:!0,status:e.status,data:r}:{ok:!1,status:e.status,error:r&&typeof r=="object"&&"error"in r?String(r.error):o||e.statusText}}a(_e,"executeUserTool");async function je(s,n,t){let e=await i(s,n,"/apps/backtests/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Backtest run failed: ${e.status} ${o}`)}return await e.json()}a(je,"submitBacktestRun");async function Be(s,n,t){let e=t.query&&Object.keys(t.query).length>0?`?${new URLSearchParams(t.query).toString()}`:"",o=await i(s,n,`/apps/backtests/tx${e}`,{method:t.method,body:t.method==="POST"&&t.body!==void 0?JSON.stringify(t.body):void 0});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtests request failed: ${o.status} ${r}`)}return await o.json()}a(Be,"submitBacktestTx");async function Ge(s,n,t){let e=new URLSearchParams(t).toString(),o=await i(s,n,`/apps/backtests/detail?${e}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtest detail failed: ${o.status} ${r}`)}return await o.json()}a(Ge,"submitBacktestDetail");function K(s){let n=s.trim().replace(/^\/+/,"");return encodeURIComponent(n||"tool")}a(K,"normalizeToolPathSegment");function W(s){let n=s.replace(/\/$/,""),t=process.env.OPENPOND_TOOL_URL;if(t)return t.replace(/\/$/,"");try{let e=new URL(n),o=e.hostname.toLowerCase(),r=o==="apps.openpond.live"?null:o===V||o===D||o===`www.${D}`||o==="openpond.live"||o==="www.openpond.live"?"https://apps.openpond.live":null;if(r)return r;let c=o==="localhost"||o==="127.0.0.1",p=e.port||(e.protocol==="https:"?"443":"80");if(c&&p==="3000")return n}catch{}return n}a(W,"resolveWorkerBaseUrl");async function Me(s,n,t){let e=W(s),o=K(t.toolName),c=`${t.deploymentId?`/${t.appId}/deployments/${t.deploymentId}`:`/${t.appId}`}/${o}`,p=new Headers(t.headers||{}),d=t.method??"POST",m=t.body===void 0||d==="GET"?void 0:JSON.stringify(t.body),g=await i(e,n,c,{method:d,body:m,headers:p}),h=await g.text().catch(()=>""),u=null;try{u=h?JSON.parse(h):null}catch{u=h}let S=u&&typeof u=="object"&&"ok"in u?!!u.ok:!0,y=g.ok&&S,f=u&&typeof u=="object"&&"status"in u&&Number(u.status)||g.status,R=u&&typeof u=="object"&&"error"in u?String(u.error):g.ok?void 0:h||g.statusText,P=u&&typeof u=="object"&&"data"in u?u.data:u;return{ok:y,status:f,data:P,error:R}}a(Me,"executeHostedTool");import{createHash as Y}from"node:crypto";var X=3600*1e3;function $(s){return Y("sha256").update(JSON.stringify([s.apiBase.replace(/\/$/,""),s.apiKey.trim()])).digest("hex")}a($,"buildCacheKey");async function q(s,n){let t=await L(x(),s,$(n),{allowStale:!0});return!t||Date.now()-Date.parse(t.updatedAt)>=(n.ttlMs??X)?null:t.payload}a(q,"cached");async function Ye(s){return q("cloud.apps",s)}a(Ye,"getCachedApps");async function Xe(s){await E(x(),"cloud.apps",$(s),s.apps)}a(Xe,"setCachedApps");async function Qe(s){return q("cloud.tools",s)}a(Qe,"getCachedTools");async function Ze(s){await E(x(),"cloud.tools",$(s),s.tools)}a(Ze,"setCachedTools");var it=["openpond-generic-v1","openpond-work-v1","openpond-coding-core-v1","openpond-agent-harness-v1"];export{i as a,_ as b,j as c,B as d,G as e,M as f,J as g,H as h,F as i,ae as j,ie as k,ce as l,pe as m,ue as n,le as o,de as p,me as q,ge as r,he as s,ye as t,fe as u,Re as v,we as w,Se as x,xe as y,Te as z,Pe as A,Ae as B,Ee as C,Oe as D,be as E,$e as F,ke as G,Le as H,Ie as I,ve as J,De as K,Ne as L,z as M,qe as N,Ce as O,Ue as P,_e as Q,je as R,Be as S,Ge as T,W as U,Me as V,X as W,Ye as X,Xe as Y,Qe as Z,Ze as _,it as $};
2
+ import{a as I,b as v}from"./chunk-GLUWATL5.js";import{E as L,F as E}from"./chunk-2EPR4HLF.js";import{f as x}from"./chunk-UGOK7VTC.js";import{a}from"./chunk-FTQLQJQV.js";var T=class extends Error{constructor(t,e){super(`API request timed out after ${t}ms: ${e}`);this.timeoutMs=t;this.requestUrl=e;this.name="ApiTimeoutError"}timeoutMs;requestUrl;static{a(this,"ApiTimeoutError")}code="OPENPOND_API_TIMEOUT"},w=class extends Error{constructor(t,e){super(`API response exceeded ${t} bytes: ${e}`);this.maximumBytes=t;this.requestUrl=e;this.name="ApiResponseTooLargeError"}maximumBytes;requestUrl;static{a(this,"ApiResponseTooLargeError")}code="OPENPOND_API_RESPONSE_TOO_LARGE"},O=class extends Error{constructor(t,e,o,r=null){let c=r||e;super(`${o} failed: ${t}${c?` ${c}`:""}`);this.status=t;this.apiMessage=r;this.name="OpenPondApiError",this.code=e||"OPENPOND_API_ERROR"}status;apiMessage;static{a(this,"OpenPondApiError")}code};async function i(s,n,t,e={}){let{timeoutMs:o=3e4,maxResponseBytes:r=8388608,explicitBearerAuth:c=!1,...p}=e,d=`${s}${t}`,m=new Headers(p.headers);m.set("Content-Type","application/json");let g=c?void 0:process.env.OPENPOND_API_KEY,h=n?.trim()||"",u=!c&&h.startsWith("opk_"),S=g||(u?h:null);S&&!m.has("openpond-api-key")&&m.set("openpond-api-key",S),n?m.set("Authorization",u?`ApiKey ${h}`:`Bearer ${n}`):g&&!m.has("Authorization")&&m.set("Authorization",`ApiKey ${g}`);let y=new AbortController,f=new T(o,d),R=o>0?setTimeout(()=>y.abort(f),o):null;R?.unref?.();let P=U(p.signal,y.signal,o),k=a(()=>{R&&clearTimeout(R)},"cleanup");try{let A=await fetch(d,{...p,headers:m,signal:P});return C(A,{cleanup:k,maximumBytes:r,requestUrl:d,timeoutController:y,timeoutError:f})}catch(A){throw k(),y.signal.aborted?f:A}}a(i,"apiFetch");async function l(s,n){let t;try{let e=await s.text();t=e?JSON.parse(e):{}}catch(e){if(e instanceof T||e instanceof w)throw e;t={}}if(!s.ok){let e=typeof t.error=="string"?t.error:null,o=typeof t.message=="string"?t.message:null;throw new O(s.status,e,n,o)}return t}a(l,"readApiJson");function C(s,n){if(!s.body)return n.cleanup(),s;let t=Number(s.headers.get("content-length"));if(n.maximumBytes>0&&Number.isFinite(t)&&t>n.maximumBytes)throw n.cleanup(),s.body.cancel(),new w(n.maximumBytes,n.requestUrl);let e=s.body.getReader(),o=0,r=new ReadableStream({async pull(c){try{let p=await e.read();if(p.done){n.cleanup(),c.close();return}if(o+=p.value.byteLength,n.maximumBytes>0&&o>n.maximumBytes){n.cleanup(),await e.cancel(),c.error(new w(n.maximumBytes,n.requestUrl));return}c.enqueue(p.value)}catch(p){n.cleanup(),c.error(n.timeoutController.signal.aborted?n.timeoutError:p)}},async cancel(c){n.cleanup(),await e.cancel(c)}});return new Response(r,{headers:s.headers,status:s.status,statusText:s.statusText})}a(C,"boundedResponse");function U(s,n,t){return t<=0?s??void 0:s?AbortSignal.any([s,n]):n}a(U,"composedSignal");async function _(s,n,t,e,o){let r=await i(s,n,`/v4/apps/${t}/commits`,{method:"POST",body:JSON.stringify({files:e,message:o})});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Commit failed: ${r.status} ${c}`)}return await r.json()}a(_,"commitFiles");async function j(s,n,t,e){let o=e?.environment??"production",r=await i(s,n,`/v4/apps/${t}/deployments`,{method:"POST",body:JSON.stringify({environment:o,...e?.commitSha?{commitSha:e.commitSha}:{},...e?.branch?{branch:e.branch}:{}})});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Deploy failed: ${r.status} ${c}`)}return await r.json()}a(j,"deployApp");async function B(s,n,t,e){let o=await i(s,n,`/v4/apps/${encodeURIComponent(t)}/deployments/promote-preview`,{method:"POST",body:JSON.stringify(e)});return l(o,"Preview promotion")}a(B,"promotePreviewToProduction");async function G(s,n,t,e){let o=await i(s,n,`/v1/apps/${encodeURIComponent(t)}/lifecycle/start`,{method:"POST",body:JSON.stringify(e)});return l(o,"App lifecycle start")}a(G,"startAppLifecycle");async function M(s,n,t){let e=await i(s,n,`/apps/deployments/${t}/logs`,{method:"GET"});if(!e.ok){let c=await e.text().catch(()=>"");throw new Error(`Deployment logs failed: ${e.status} ${c}`)}let o=await e.json().catch(()=>({}));return(Array.isArray(o.logs)?o.logs:[]).map(c=>{let p=typeof c.createdAt=="string"?c.createdAt:c.createdAt instanceof Date?c.createdAt.toISOString():new Date().toISOString();return{id:typeof c.id=="string"?c.id:`${Math.random()}`,type:typeof c.type=="string"?c.type:void 0,message:typeof c.message=="string"?c.message:"",createdAt:p}})}a(M,"getDeploymentLogs");async function J(s,n,t){let e=await i(s,n,`/apps/deployments/${t}/status`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment status failed: ${e.status} ${r}`)}return{status:(await e.json().catch(()=>({}))).deployment?.status}}a(J,"getDeploymentStatus");async function H(s,n,t,e){let o=new URLSearchParams;e?.status&&e.status.length>0&&o.set("status",e.status.join(",")),e?.createdAfter&&o.set("createdAfter",e.createdAfter),e?.branch&&o.set("branch",e.branch);let r=o.toString(),c=await i(s,n,`/apps/${t}/deployments/latest${r?`?${r}`:""}`,{method:"GET"});if(!c.ok){let d=await c.text().catch(()=>"");throw new Error(`Latest deployment lookup failed: ${c.status} ${d}`)}let p=await c.json().catch(()=>({}));return p.deployment?{id:p.deployment.id,status:p.deployment.status}:null}a(H,"getLatestDeploymentForApp");async function F(s,n,t){let e=await i(s,n,`/apps/deployments/${t}`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment fetch failed: ${e.status} ${r}`)}return(await e.json().catch(()=>({}))).deployment??null}a(F,"getDeploymentDetail");var V=new URL(v).hostname,D=new URL(I).hostname;async function ae(s,n,t){let e=new URLSearchParams;t?.handle&&e.set("handle",t.handle),typeof t?.limit=="number"&&Number.isFinite(t.limit)&&e.set("limit",String(Math.max(1,Math.floor(t.limit)))),typeof t?.offset=="number"&&Number.isFinite(t.offset)&&e.set("offset",String(Math.max(0,Math.floor(t.offset)))),typeof t?.includeScheduled=="boolean"&&e.set("includeScheduled",t.includeScheduled?"true":"false");let o=e.toString(),r=await i(s,n,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Apps list failed: ${r.status} ${p}`)}let c=await r.json().catch(()=>({}));return Array.isArray(c.apps)?c.apps:[]}a(ae,"listApps");async function ie(s,n,t){let e=await i(s,n,"/api/projects/local",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Create project failed: ${e.status} ${o}`)}return await e.json()}a(ie,"createLocalProject");async function ce(s,n,t){let e=await i(s,n,"/apps/repo/create",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Repo create failed: ${e.status} ${o}`)}return await e.json()}a(ce,"createRepo");async function pe(s,n,t,e){let o=await i(s,n,`/apps/${encodeURIComponent(t)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:e})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${r}`)}return await o.json()}a(pe,"updateAppCodeVisibility");async function ue(s,n,t,e){let o=await i(s,n,"/v4/apps/headless",{method:"POST",body:JSON.stringify({items:t,...e?{teamId:e}:{}})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Headless create failed: ${o.status} ${r}`)}return await o.json()}a(ue,"createHeadlessApps");async function le(s,n,t){let e=await i(s,n,`/v4/apps/${t}/template/status`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template status failed: ${e.status} ${o}`)}return await e.json()}a(le,"getTemplateStatus");async function de(s,n,t){let e=await i(s,n,`/v4/apps/${t}/template/branches`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template branches failed: ${e.status} ${o}`)}return await e.json()}a(de,"listTemplateBranches");async function me(s,n,t,e){let o=await i(s,n,`/v4/apps/${t}/template/deploy-latest`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Template deploy failed: ${o.status} ${r}`)}return await o.json()}a(me,"deployLatestTemplate");async function ge(s,n,t,e){let o=await i(s,n,`/v4/apps/${t}/environment`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Environment update failed: ${o.status} ${r}`)}return await o.json()}a(ge,"updateAppEnvironment");async function he(s,n,t){let e=await i(s,n,`/v4/apps/${t}/environment`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Environment get failed: ${e.status} ${o}`)}return await e.json()}a(he,"getAppEnvironment");async function ye(s,n){let t=await i(s,n,"/api/tools/manifest",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Manifest fetch failed: ${t.status} ${e}`)}return await t.json()}a(ye,"fetchToolManifest");async function fe(s,n){let t=await i(s,n,"/apps/tools",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Tools lookup failed: ${t.status} ${e}`)}return await t.json()}a(fe,"listUserTools");async function Re(s,n,t){let e=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Schedules lookup failed: ${e.status} ${r}`)}let o=await e.json().catch(()=>({}));return{schedules:Array.isArray(o.schedules)?o.schedules:[]}}a(Re,"listAppSchedules");async function we(s,n,t={}){let e=new URLSearchParams;t.domain&&e.set("domain",t.domain),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion),typeof t.limit=="number"&&e.set("limit",String(t.limit));for(let c of t.tags??[])e.append("tag",c);let o=e.toString(),r=await i(s,n,`/v1/opentool/recipes${o?`?${o}`:""}`,{method:"GET"});return l(r,"OpenTool recipe list")}a(we,"listOpenToolRecipes");async function Se(s,n,t){let e=await i(s,n,"/v1/opentool/recipes/search",{method:"POST",body:JSON.stringify(t)});return l(e,"OpenTool recipe search")}a(Se,"searchOpenToolRecipes");async function xe(s,n,t){let e=new URLSearchParams;typeof t.includeExamples=="boolean"&&e.set("includeExamples",String(t.includeExamples)),typeof t.includeTests=="boolean"&&e.set("includeTests",String(t.includeTests)),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion);let o=e.toString(),r=await i(s,n,`/v1/opentool/recipes/${encodeURIComponent(t.id)}${o?`?${o}`:""}`,{method:"GET"});return l(r,"OpenTool recipe get")}a(xe,"getOpenToolRecipe");async function Te(s,n,t){let e=await i(s,n,"/v1/opentool/rules",{method:"POST",body:JSON.stringify(t)});return l(e,"OpenTool rules get")}a(Te,"getOpenToolRules");function b(s){let n=new URLSearchParams;typeof s=="number"&&Number.isFinite(s)&&n.set("limit",String(Math.max(1,Math.floor(s))));let t=n.toString();return t?`?${t}`:""}a(b,"buildLimitQuery");function N(s){if(Array.isArray(s))return s;if(!s||typeof s!="object")return[];let n=s;return Array.isArray(n.logs)?n.logs:Array.isArray(n.runs)?n.runs:Array.isArray(n.scheduleRuns)?n.scheduleRuns:Array.isArray(n.items)?n.items:[]}a(N,"normalizeScheduleExecutionLogs");async function Pe(s,n,t,e){let o={...e?.preferredScheduleId?{preferredScheduleId:e.preferredScheduleId}:{},...e?.scheduleId?{scheduleId:e.scheduleId}:{},...e?.startAt?{startAt:e.startAt}:{},...e&&"endAt"in e?{endAt:e.endAt??null}:{}},r=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/start`,{method:"POST",body:JSON.stringify(o)});return l(r,"Schedule start")}a(Pe,"startAppSchedules");async function Ae(s,n,t){let e=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/stop`,{method:"POST",body:JSON.stringify({})});return l(e,"Schedule stop")}a(Ae,"stopAppSchedules");async function Ee(s,n){let t=await i(s,n,"/apps/schedules/current/stop",{method:"POST",body:JSON.stringify({})});return l(t,"Current schedule stop")}a(Ee,"stopCurrentAppSchedules");async function Oe(s,n,t){let e=await i(s,n,"/v1/schedules/run",{method:"POST",body:JSON.stringify({scheduleId:t.scheduleId})});return l(e,"Schedule run")}a(Oe,"runScheduleNow");async function be(s,n,t,e){let o=await i(s,n,`/apps/${encodeURIComponent(t)}/schedules/${encodeURIComponent(e)}`,{method:"DELETE"});return l(o,"Schedule delete")}a(be,"deleteOrArchiveSchedule");async function $e(s,n,t,e){let o=await i(s,n,`/v1/schedules/${encodeURIComponent(t)}/execution-logs${b(e?.limit)}`,{method:"GET"}),r=await l(o,"Schedule execution logs");return{logs:N(r)}}a($e,"listScheduleExecutionLogs");async function ke(s,n,t,e){let o=await i(s,n,`/v1/deployments/${encodeURIComponent(t)}/schedule-execution-logs${b(e?.limit)}`,{method:"GET"}),r=await l(o,"Deployment schedule execution logs");return{logs:N(r)}}a(ke,"listDeploymentScheduleExecutionLogs");async function Le(s,n,t){let e=await i(s,n,`/v1/schedule-execution-logs/${encodeURIComponent(t)}`,{method:"GET"});return l(e,"Schedule execution log")}a(Le,"getScheduleExecutionLog");async function Ie(s,n,t,e){let o=await i(s,n,`/v1/apps/${encodeURIComponent(t)}/execution-timeline${b(e?.limit)}`,{method:"GET"});return l(o,"App execution timeline")}a(Ie,"getAppExecutionTimeline");async function ve(s,n,t){return i(s,n,"/apps/agent/create",{method:"POST",body:JSON.stringify(t)})}a(ve,"createAgentFromPrompt");async function De(s,n,t){let e=new URLSearchParams;t?.appId&&e.set("appId",t.appId);let o=e.toString(),r=await i(s,n,`/apps/performance${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let c=await r.text().catch(()=>"");throw new Error(`Performance lookup failed: ${r.status} ${c}`)}return await r.json()}a(De,"getUserPerformance");async function Ne(s,n,t){let e=new URLSearchParams({appId:t}),o=await i(s,n,`/apps/summary?${e.toString()}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Summary lookup failed: ${o.status} ${r}`)}return await o.json()}a(Ne,"getAppRuntimeSummary");async function z(s,n){let t=await i(s,n,"/v1/account",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Account lookup failed: ${t.status} ${e}`)}return await t.json()}a(z,"getOpenPondAccount");async function qe(s,n){let t=new Date().toISOString(),e=Date.now(),o=s.replace(/\/$/,"");try{let r=await i(o,null,"/health",{method:"GET",headers:{Accept:"application/json"}}),c=Date.now()-e,p=await r.json().catch(()=>({})),d=null,m=null;if(n?.trim())try{let g=await z(o,n);d=!0,m=g.account}catch{d=!1}return{reachable:r.ok,authenticated:d,apiBase:o,latencyMs:c,status:r.status,service:typeof p.service=="string"?p.service:null,checkedAt:t,account:m,...r.ok?{}:{error:r.statusText||`HTTP ${r.status}`}}}catch(r){return{reachable:!1,authenticated:n?.trim()?!1:null,apiBase:o,latencyMs:Date.now()-e,status:null,service:null,checkedAt:t,error:r instanceof Error?r.message:String(r)}}}a(qe,"checkOpenPondApiHealth");async function Ce(s,n,t){let e=await i(s,n,"/apps/assistant/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Assistant run failed: ${e.status} ${o}`)}return await e.json()}a(Ce,"runAssistantMode");async function Ue(s,n,t){let e=await i(s,n,"/apps/agent/digest",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Agent digest failed: ${e.status} ${o}`)}return await e.json()}a(Ue,"postAgentDigest");async function _e(s,n,t){let e=await i(s,n,"/apps/tools/execute",{method:"POST",body:JSON.stringify(t)}),o=await e.text().catch(()=>""),r=null;try{r=o?JSON.parse(o):null}catch{r=o}return e.ok?{ok:!0,status:e.status,data:r}:{ok:!1,status:e.status,error:r&&typeof r=="object"&&"error"in r?String(r.error):o||e.statusText}}a(_e,"executeUserTool");async function je(s,n,t){let e=await i(s,n,"/apps/backtests/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Backtest run failed: ${e.status} ${o}`)}return await e.json()}a(je,"submitBacktestRun");async function Be(s,n,t){let e=t.query&&Object.keys(t.query).length>0?`?${new URLSearchParams(t.query).toString()}`:"",o=await i(s,n,`/apps/backtests/tx${e}`,{method:t.method,body:t.method==="POST"&&t.body!==void 0?JSON.stringify(t.body):void 0});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtests request failed: ${o.status} ${r}`)}return await o.json()}a(Be,"submitBacktestTx");async function Ge(s,n,t){let e=new URLSearchParams(t).toString(),o=await i(s,n,`/apps/backtests/detail?${e}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtest detail failed: ${o.status} ${r}`)}return await o.json()}a(Ge,"submitBacktestDetail");function K(s){let n=s.trim().replace(/^\/+/,"");return encodeURIComponent(n||"tool")}a(K,"normalizeToolPathSegment");function W(s){let n=s.replace(/\/$/,""),t=process.env.OPENPOND_TOOL_URL;if(t)return t.replace(/\/$/,"");try{let e=new URL(n),o=e.hostname.toLowerCase(),r=o==="apps.openpond.live"?null:o===V||o===D||o===`www.${D}`||o==="openpond.live"||o==="www.openpond.live"?"https://apps.openpond.live":null;if(r)return r;let c=o==="localhost"||o==="127.0.0.1",p=e.port||(e.protocol==="https:"?"443":"80");if(c&&p==="3000")return n}catch{}return n}a(W,"resolveWorkerBaseUrl");async function Me(s,n,t){let e=W(s),o=K(t.toolName),c=`${t.deploymentId?`/${t.appId}/deployments/${t.deploymentId}`:`/${t.appId}`}/${o}`,p=new Headers(t.headers||{}),d=t.method??"POST",m=t.body===void 0||d==="GET"?void 0:JSON.stringify(t.body),g=await i(e,n,c,{method:d,body:m,headers:p}),h=await g.text().catch(()=>""),u=null;try{u=h?JSON.parse(h):null}catch{u=h}let S=u&&typeof u=="object"&&"ok"in u?!!u.ok:!0,y=g.ok&&S,f=u&&typeof u=="object"&&"status"in u&&Number(u.status)||g.status,R=u&&typeof u=="object"&&"error"in u?String(u.error):g.ok?void 0:h||g.statusText,P=u&&typeof u=="object"&&"data"in u?u.data:u;return{ok:y,status:f,data:P,error:R}}a(Me,"executeHostedTool");import{createHash as Y}from"node:crypto";var X=3600*1e3;function $(s){return Y("sha256").update(JSON.stringify([s.apiBase.replace(/\/$/,""),s.apiKey.trim()])).digest("hex")}a($,"buildCacheKey");async function q(s,n){let t=await L(x(),s,$(n),{allowStale:!0});return!t||Date.now()-Date.parse(t.updatedAt)>=(n.ttlMs??X)?null:t.payload}a(q,"cached");async function Ye(s){return q("cloud.apps",s)}a(Ye,"getCachedApps");async function Xe(s){await E(x(),"cloud.apps",$(s),s.apps)}a(Xe,"setCachedApps");async function Qe(s){return q("cloud.tools",s)}a(Qe,"getCachedTools");async function Ze(s){await E(x(),"cloud.tools",$(s),s.tools)}a(Ze,"setCachedTools");var it=["openpond-generic-v1","openpond-work-v1","openpond-coding-core-v1","openpond-agent-harness-v1"];export{i as a,_ as b,j as c,B as d,G as e,M as f,J as g,H as h,F as i,ae as j,ie as k,ce as l,pe as m,ue as n,le as o,de as p,me as q,ge as r,he as s,ye as t,fe as u,Re as v,we as w,Se as x,xe as y,Te as z,Pe as A,Ae as B,Ee as C,Oe as D,be as E,$e as F,ke as G,Le as H,Ie as I,ve as J,De as K,Ne as L,z as M,qe as N,Ce as O,Ue as P,_e as Q,je as R,Be as S,Ge as T,W as U,Me as V,X as W,Ye as X,Xe as Y,Qe as Z,Ze as _,it as $};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{h as _,i as k}from"./chunk-UWHIU24L.js";import{a as H,c as v}from"./chunk-RV7PUSI2.js";import{c as r,d as c,e as i,g as o,n as m}from"./chunk-VVNV4NNW.js";import{A as n}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var h=n.record(n.string(),n.unknown()).default({}),u=n.number().int().nonnegative(),g=n.string().trim().min(1).max(1e5),I=n.object({kind:n.enum(["personal","team"]),id:r}).strict(),B=n.object({name:r,release:o.nullable(),revision:u}).strict(),ue=n.object({schemaVersion:n.literal("openpond.harnessWorkspace.v1"),id:r,ownerScope:I,name:n.string().trim().min(1).max(240),location:n.enum(["local","hosted"]),sourceRevision:n.string().trim().min(1).max(500),revision:u,dirty:n.boolean(),currentChannel:B,createdAt:i,updatedAt:i,metadata:h}).strict(),y=n.enum(["runtime","memory","prompt","skill","agent","product","taskset","training"]),C=n.enum(["text_instruction","memory","dependency_selection","executable_code","business_logic","financial_logic","permission","connected_app","publication","deployment","training","model_binding","team_or_global"]),A=n.object({id:r,route:y,operation:n.enum(["create","update","delete"]),target:n.string().trim().min(1).max(2e3),summary:n.string().trim().min(1).max(2e3),content:n.string().max(1e6).nullable(),contentHash:c.nullable(),effects:n.array(C).min(1).max(20)}).strict().superRefine((e,s)=>{if(e.operation==="delete"){(e.content!==null||e.contentHash!==null)&&s.addIssue({code:"custom",message:"delete edits cannot include replacement content",path:["content"]});return}if(e.content===null||e.contentHash===null){s.addIssue({code:"custom",message:"create and update edits require content and contentHash",path:["content"]});return}let a=m(e.content);e.contentHash!==a&&s.addIssue({code:"custom",message:`edit contentHash is ${e.contentHash}; expected ${a}`,path:["contentHash"]})}),w=n.object({workspaceId:r,revision:u,sourceRevision:n.string().trim().min(1).max(500),channelRevision:u}).strict(),R=n.object({id:r,revision:u,contentHash:c}).strict(),me=n.object({schemaVersion:n.literal("openpond.harnessTurnSnapshot.v1"),workspaceId:r,workspaceRevision:u,sourceRevision:n.string().trim().min(1).max(500),channelName:r,channelRevision:u,harnessRelease:o,toolCatalogHash:c.nullable().optional(),overlay:R.nullable().optional().default(null)}).strict(),j=n.object({schemaVersion:n.literal("openpond.harnessRunOverlay.v1"),id:r,runId:r,baseHarnessRelease:o,workspace:w,revision:u,status:n.enum(["active","frozen","abandoned"]),edits:n.array(A).max(1e3),createdAt:i,updatedAt:i,metadata:h}).strict(),D=j.extend({contentHash:c}).strict(),q=n.object({kind:n.enum(["tool_event","recovery","validation","user_turn","work_output","work_receipt"]),id:r,contentHash:c.nullable()}).strict(),O=n.object({id:r,kind:n.enum(["dependency","schema","package","file_render","skill","prompt","business_formula","targeted_evaluation","observed_recovery","memory","component_activation"]),description:g,required:n.boolean()}).strict(),E=n.object({schemaVersion:n.literal("openpond.harnessImprovementProposal.v1"),id:r,overlay:R,baseHarnessRelease:o,expectedWorkspace:w,requestedScope:n.enum(["personal","team","global"]),route:y,risk:n.enum(["low","review","restricted"]),effects:n.array(C).min(1).max(20),evidence:n.array(q).min(1).max(1e3),edits:n.array(A).min(1).max(1e3),validationPlan:n.array(O).min(1).max(100),expectedOutcome:g,createdAt:i,metadata:h}).strict().superRefine((e,s)=>{let a=new Set(e.effects);for(let[t,d]of e.edits.entries()){d.route!==e.route&&s.addIssue({code:"custom",message:"every edit route must match the proposal route",path:["edits",t,"route"]});for(let f of d.effects)a.has(f)||s.addIssue({code:"custom",message:`edit effect ${f} is missing from proposal effects`,path:["edits",t,"effects"]})}new Set(e.validationPlan.map(t=>t.id)).size!==e.validationPlan.length&&s.addIssue({code:"custom",message:"validation plan ids must be unique",path:["validationPlan"]})}),L=E.extend({contentHash:c}).strict(),V=n.object({schemaVersion:n.literal("openpond.harnessTargetedValidationReceipt.v1"),id:r,proposal:o,validationId:r,kind:O.shape.kind,status:n.enum(["passed","failed","blocked","skipped"]),summary:g,evidenceRefs:n.array(q).max(1e3),createdAt:i,metadata:h}).strict(),W=V.extend({contentHash:c}).strict(),F=n.enum(["advanced","retained","conflict","rolled_back"]),P=n.object({schemaVersion:n.literal("openpond.harnessAdvanceReceipt.v1"),id:r,workspaceId:r,ownerScope:I,proposal:o.nullable(),expectedWorkspaceRevision:u,observedWorkspaceRevision:u,previousChannelRevision:u,nextChannelRevision:u,previousRelease:o.nullable(),nextRelease:o.nullable(),validationReceipts:n.array(o).max(100),decision:F,reason:g,rollbackOf:o.nullable(),createdAt:i,metadata:h}).strict().superRefine((e,s)=>{let a=e.nextChannelRevision===e.previousChannelRevision+1;["advanced","rolled_back"].includes(e.decision)!==a&&s.addIssue({code:"custom",message:"only successful advancement or rollback increments the channel revision",path:["nextChannelRevision"]}),e.decision==="rolled_back"&&e.rollbackOf===null&&s.addIssue({code:"custom",message:"rollback receipts require rollbackOf",path:["rollbackOf"]}),e.decision!=="rolled_back"&&e.rollbackOf!==null&&s.addIssue({code:"custom",message:"rollbackOf is only valid for rollback receipts",path:["rollbackOf"]})}),M=P.extend({contentHash:c}).strict(),N=n.object({schemaVersion:n.literal("openpond.harnessOverlayMergeReceipt.v1"),id:r,workspaceId:r,baseHarnessRelease:o,leftOverlay:R,rightOverlay:R,decision:n.enum(["merged","conflict"]),mergedOverlay:R.nullable(),conflictTargets:n.array(n.string().trim().min(1).max(2e3)).max(1e3),requiresRevalidation:n.literal(!0),createdAt:i,metadata:h}).strict().superRefine((e,s)=>{e.decision==="merged"!=(e.mergedOverlay!==null)&&s.addIssue({code:"custom",message:"merged decisions require a merged overlay; conflicts cannot provide one",path:["mergedOverlay"]}),e.decision==="conflict"!=e.conflictTargets.length>0&&s.addIssue({code:"custom",message:"conflict decisions require conflict targets and merged decisions cannot include them",path:["conflictTargets"]})}),pe=N.extend({contentHash:c}).strict();function fe(e){let s=j.parse(e);return D.parse({...s,contentHash:m(s)})}l(fe,"createHarnessRunOverlay");function he(e){let s=E.parse(e);return L.parse({...s,contentHash:m(s)})}l(he,"createHarnessImprovementProposal");function ve(e){let s=V.parse(e);return W.parse({...s,contentHash:m(s)})}l(ve,"createHarnessTargetedValidationReceipt");function Re(e){let s=P.parse(e);return M.parse({...s,contentHash:m(s)})}l(Re,"createHarnessAdvanceReceipt");var U=n.string().trim().min(1).max(2e3),S=n.string().trim().min(1).max(1e5),G=n.enum(["create","update","delete"]),J=n.enum(["memory","prompt","skill","agent"]),Q=n.enum(["runtime","product","taskset","training"]),X=n.enum(["no_action","routed","applied","retained","failed"]),Y=n.enum(["not_applicable","pending","passed","rejected","failed"]),Z=n.enum(["not_applicable","pending","passed","failed"]),ee=n.object({schemaVersion:n.literal("openpond.harnessRefinerActivityReceipt.v1"),id:r,runRef:r,turnId:r,result:X,decision:n.enum(["no_action","route","propose"]).nullable(),route:y.nullable(),operation:G.nullable(),target:n.string().trim().min(1).max(2e3).nullable(),summary:U,evidenceBasis:_.nullable(),critiqueStatus:Y,validationStatus:Z,trigger:o,outcome:o.nullable(),proposal:o.nullable(),applyReceipt:o.nullable(),inputHarness:o,outputHarness:o.nullable(),createdAt:i}).strict().superRefine((e,s)=>{let a=e.result==="applied"||e.result==="retained";e.result==="no_action"?$(s,e,{decision:"no_action",route:null,operation:null,target:null,evidenceBasis:null,proposal:null,applyReceipt:null,outputHarness:null,critiqueStatus:"not_applicable",validationStatus:"not_applicable"}):e.result==="routed"?((e.decision!=="route"||!Q.safeParse(e.route).success||e.operation!==null||e.target!==null||e.evidenceBasis===null||e.proposal!==null||e.applyReceipt!==null||e.outputHarness!==null)&&s.addIssue({code:"custom",message:"routed activity requires an external route and evidence basis without proposal state"}),$(s,e,{critiqueStatus:"not_applicable",validationStatus:"not_applicable"})):a?((e.decision!=="propose"||!J.safeParse(e.route).success||e.operation===null||e.target===null||e.evidenceBasis===null||e.proposal===null||e.applyReceipt===null)&&s.addIssue({code:"custom",message:"applied and retained activity requires complete proposal state"}),e.result==="applied"&&e.outputHarness===null&&s.addIssue({code:"custom",message:"applied activity requires the advanced Harness release",path:["outputHarness"]}),e.result==="applied"&&(e.critiqueStatus!=="passed"||e.validationStatus!=="passed")&&s.addIssue({code:"custom",message:"applied activity requires passed critique and validation"}),e.result==="retained"&&e.outputHarness!==null&&s.addIssue({code:"custom",message:"retained activity cannot report a new Harness release",path:["outputHarness"]})):(e.decision!==null||e.route!==null||e.operation!==null||e.target!==null||e.evidenceBasis!==null||e.outcome!==null||e.proposal!==null||e.applyReceipt!==null||e.outputHarness!==null)&&s.addIssue({code:"custom",message:"failed activity cannot claim a decision, route, proposal, or release transition"}),e.result!=="failed"&&e.outcome===null&&s.addIssue({code:"custom",message:"terminal Refiner decisions require an outcome reference",path:["outcome"]})}),ke=ee.extend({contentHash:c}).strict(),ne=n.enum(["unresolved","confirmed","resolved","rejected","expired"]),se=n.object({kind:n.enum(["applied_change","later_success","manual_rejection","source_revoked","expired"]),reason:S,evidenceRefs:n.array(o).max(1e3),resolvedAt:i}).strict(),T=n.object({schemaVersion:n.literal("openpond.harnessRefinementCandidate.v1"),id:r,ownerScope:H,workspaceRef:r,fingerprint:c,recurrenceFamily:n.string().trim().min(1).max(1e3),statement:S,status:ne,occurrences:n.array(v).max(1e3),counterevidence:n.array(v).max(1e3),sourceReviews:n.array(o).min(1).max(100),relatedHarnessReleases:n.array(o).max(100),firstSeenAt:i,lastSeenAt:i,lastReviewedAt:i,expiresAt:i,resolution:se.nullable(),createdAt:i,updatedAt:i}).strict().superRefine((e,s)=>{p(s,e.occurrences,"occurrences"),p(s,e.counterevidence,"counterevidence"),p(s,e.sourceReviews,"sourceReviews"),p(s,e.relatedHarnessReleases,"relatedHarnessReleases");let a=new Set(e.occurrences.map(d=>d.occurrenceKey));e.counterevidence.some(d=>a.has(d.occurrenceKey))&&s.addIssue({code:"custom",message:"supporting occurrences and counterevidence must be disjoint",path:["counterevidence"]});let t=e.status==="unresolved"||e.status==="confirmed";t&&e.occurrences.length===0&&s.addIssue({code:"custom",message:"actionable candidates require at least one supporting occurrence",path:["occurrences"]}),t&&[...e.occurrences,...e.counterevidence].some(d=>d.sourcePolicy.state!=="authorized")&&s.addIssue({code:"custom",message:"actionable candidates may contain only currently authorized evidence",path:["occurrences"]}),t!==(e.resolution===null)&&s.addIssue({code:"custom",message:"only resolved, rejected, or expired candidates require a resolution",path:["resolution"]}),e.status==="expired"&&e.resolution?.kind!=="expired"&&s.addIssue({code:"custom",message:"expired candidates require an expired resolution",path:["resolution","kind"]}),e.status==="rejected"&&e.resolution&&!["manual_rejection","source_revoked"].includes(e.resolution.kind)&&s.addIssue({code:"custom",message:"rejected candidates require a rejection or revocation resolution",path:["resolution","kind"]}),e.status==="resolved"&&e.resolution&&!["applied_change","later_success"].includes(e.resolution.kind)&&s.addIssue({code:"custom",message:"resolved candidates require applied-change or later-success evidence",path:["resolution","kind"]}),ce(s,e)}),te=T.extend({contentHash:c}).strict(),ae=n.enum(["created","merged","rejected","expired","reopened","resolved"]),K=n.object({schemaVersion:n.literal("openpond.harnessRefinementCandidateLifecycleReceipt.v1"),id:r,candidateId:r,decision:ae,beforeCandidate:o.nullable(),afterCandidate:o,review:o,addedEvidence:n.array(v).max(1e3),removedEvidence:n.array(o).max(1e3),reason:S,createdAt:i}).strict().superRefine((e,s)=>{e.decision==="created"!=(e.beforeCandidate===null)&&s.addIssue({code:"custom",message:"only candidate creation omits the previous candidate reference",path:["beforeCandidate"]}),e.beforeCandidate&&e.beforeCandidate.contentHash===e.afterCandidate.contentHash&&s.addIssue({code:"custom",message:"candidate lifecycle transitions must change candidate content",path:["afterCandidate"]}),["created","reopened"].includes(e.decision)&&e.addedEvidence.length===0&&s.addIssue({code:"custom",message:`${e.decision} candidate transitions require added evidence`,path:["addedEvidence"]}),e.addedEvidence.some(t=>t.sourcePolicy.state!=="authorized")&&s.addIssue({code:"custom",message:"candidate transitions may add only authorized evidence",path:["addedEvidence"]}),p(s,e.addedEvidence,"addedEvidence"),p(s,e.removedEvidence,"removedEvidence");let a=new Set(e.removedEvidence.map(t=>b(t)));e.addedEvidence.some(t=>a.has(b(t.evidence)))&&s.addIssue({code:"custom",message:"candidate lifecycle evidence cannot be added and removed together",path:["removedEvidence"]})}),re=K.extend({contentHash:c}).strict(),z=n.object({schemaVersion:n.literal("openpond.harnessCrossRunRefinementRequest.v1"),id:r,ownerScope:H,workspaceRef:r,candidate:o,candidateFingerprint:c,review:o,admittedHarness:o,evidence:n.array(v).min(1).max(1e3),capabilities:k,deduplicationKey:c,createdAt:i}).strict().superRefine((e,s)=>{e.evidence.some(t=>t.sourcePolicy.state!=="authorized")&&s.addIssue({code:"custom",message:"cross-run refinement requires currently authorized evidence",path:["evidence"]}),p(s,e.evidence,"evidence"),Object.values(e.capabilities).some(Boolean)||s.addIssue({code:"custom",message:"cross-run refinement requires at least one available Harness capability",path:["capabilities"]});let a=ie(e);e.deduplicationKey!==a&&s.addIssue({code:"custom",message:`cross-run refinement deduplicationKey is ${e.deduplicationKey}; expected ${a}`,path:["deduplicationKey"]})}),oe=z.extend({contentHash:c}).strict();function Ie(e){return x(e,T,te)}l(Ie,"createHarnessRefinementCandidate");function Ce(e){return x(e,K,re)}l(Ce,"createHarnessRefinementCandidateLifecycleReceipt");function ie(e){return m({schemaVersion:"openpond.harnessCrossRunRefinementIdentity.v1",workspaceRef:e.workspaceRef,candidateFingerprint:e.candidateFingerprint,admittedHarness:e.admittedHarness})}l(ie,"harnessCrossRunRefinementDeduplicationKey");function Ae(e){return x(e,z,oe)}l(Ae,"createHarnessCrossRunRefinementRequest");function x(e,s,a){let t=s.parse(e);return a.parse({...t,contentHash:m(t)})}l(x,"createHashedContract");function $(e,s,a){for(let[t,d]of Object.entries(a))s[t]!==d&&e.addIssue({code:"custom",message:`${t} must be ${String(d)}`,path:[t]})}l($,"requireFields");function p(e,s,a){let t=s.map(d=>b(d));new Set(t).size!==t.length&&e.addIssue({code:"custom",message:`${a} references must be unique`,path:[a]})}l(p,"requireUniqueRefs");function b(e){if(!e||typeof e!="object"||Array.isArray(e))return String(e);let s=e;if(typeof s.occurrenceKey=="string")return s.occurrenceKey;let a=s.evidence;if(a&&typeof a=="object"&&!Array.isArray(a)){let t=a;return`${String(t.id)}:${String(t.contentHash)}`}return`${String(s.id)}:${String(s.contentHash)}`}l(b,"refKey");function ce(e,s){let a=[["firstSeenAt",s.firstSeenAt],["lastSeenAt",s.lastSeenAt],["lastReviewedAt",s.lastReviewedAt],["updatedAt",s.updatedAt],["expiresAt",s.expiresAt]];for(let t=1;t<a.length;t+=1){let d=a[t-1],f=a[t];Date.parse(d[1])<=Date.parse(f[1])||e.addIssue({code:"custom",message:`${f[0]} must not precede ${d[0]}`,path:[f[0]]})}Date.parse(s.createdAt)>Date.parse(s.updatedAt)&&e.addIssue({code:"custom",message:"updatedAt must not precede createdAt",path:["updatedAt"]})}l(ce,"requireChronology");export{ue as a,y as b,R as c,me as d,D as e,L as f,W as g,M as h,pe as i,fe as j,he as k,ve as l,Re as m,te as n,re as o,oe as p,Ie as q,Ce as r,ie as s,Ae as t};