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
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as Ne,d as qe,e as De}from"./chunk-BWY4D3BN.js";import{a as te}from"./chunk-T4LLJC5N.js";import{b as xe,c as Ee,h as Ue}from"./chunk-BDCTN4PU.js";import{b as ee}from"./chunk-R4PDSOB4.js";import{Z as b,ba as Me}from"./chunk-5MTN6KXV.js";import{j as Ae,p as Oe,r as _e,s as He}from"./chunk-ZBBVRYU3.js";import{a as Q,b as ke,h as Ce}from"./chunk-FJ3HMHT6.js";import{$a as Pe,Wa as H,_a as W,a as $}from"./chunk-UBCLPZSQ.js";import{q as F,r as N}from"./chunk-D5ADDBS5.js";import{h as _,i as Te}from"./chunk-PWK5Z5S3.js";import{X as he,Y as ve,_ as Z,b as le,ba as we,c as ue,ea as be,fa as V,ja as Se,la as ye,ma as Re,p as ce,r as pe,s as de,t as me,u as ge,w as fe}from"./chunk-KK626T3Z.js";import{z as M}from"./chunk-6DCXAXVD.js";import{c as ie,d as B,f as ae,h as U}from"./chunk-UGOK7VTC.js";import{v as Ie}from"./chunk-NJLULBTM.js";import{A as o}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as ne}from"node:fs";import mt from"node:os";import gt from"node:path";import{createServer as ft}from"node:http";import{randomBytes as ht}from"node:crypto";var it=o.discriminatedUnion("op",[o.strictObject({op:o.literal("set"),path:o.array(o.string().min(1)).min(1),value:o.unknown()}),o.strictObject({op:o.literal("unset"),path:o.array(o.string().min(1)).min(1)})]),at=o.discriminatedUnion("action",[o.strictObject({action:o.literal("patch"),expectedRevision:o.string(),operations:o.array(it).max(100)}),o.strictObject({action:o.literal("replace"),expectedRevision:o.string(),text:o.string().max(1048576)}),o.strictObject({action:o.literal("validate"),text:o.string().max(1048576)}),o.strictObject({action:o.literal("restore"),expectedRevision:o.string(),revision:o.string()}),o.strictObject({action:o.literal("trust"),root:o.string(),accountId:o.string(),trusted:o.boolean()}),o.strictObject({action:o.literal("client-state"),owner:o.string(),patch:Se,importOnly:o.boolean().optional()})]);function Be(n,e){let t=null;async function r(i,a){let c=U(n).config,p=null,u=null,m=null;try{p=await ue(c),m=await V(n,{projectRoot:i,accountId:a}),i||(t=m)}catch(I){u=B(I,c)}let w=m??(i?null:t);return{path:c,text:p,rawRevision:le(p),issue:u,effective:w,usingLastValid:!m&&!!w,applies:"next_turn",recoverableRevisions:await pe(n),clientState:u?null:await ye(n)}}l(r,"status");async function s(i){let a=at.parse(i);if(a.action==="validate")return{valid:!0,document:ce(a.text,U(n).config)};if(a.action==="client-state")return Re(n,a.owner,a.patch,a.importOnly);let c=l(async()=>{a.action==="patch"&&await fe(n,a.expectedRevision,a.operations),a.action==="replace"&&await de(n,a.expectedRevision,a.text),a.action==="restore"&&await me(n,a.revision,a.expectedRevision),a.action==="trust"&&await be(n,a.root,a.accountId,a.trusted)},"mutation");return e?await e(c):await c(),r()}return l(s,"mutate"),{status:r,mutate:s,schema:ge}}l(Be,"createConfigurationPayloads");import{Buffer as Fe}from"node:buffer";var G={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id, idempotency-key","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},lt=25*1024*1024,j=class extends Error{constructor(t,r,s){super(s);this.status=t;this.code=r;this.name="HttpBodyError"}status;code;static{l(this,"HttpBodyError")}};function Le(n,e,t={}){for(let[s,i]of Object.entries(G))e.setHeader(s,i);let r=$e(n.headers.origin);return r?(e.setHeader("Vary",dt(e.getHeader("Vary"))),ut(r,t)?(e.setHeader("Access-Control-Allow-Origin",r),{allowed:!0,origin:r}):{allowed:!1,origin:r}):{allowed:!0,origin:null}}l(Le,"applyCorsHeaders");function ut(n,e={}){if(n==="null")return!0;let t=je(n);return t?pt(t)?!0:new Set((e.allowedOrigins??[]).map(s=>s?je(s):null).filter(s=>!!s)).has(t):!1}l(ut,"isAllowedCorsOrigin");function x(n,e,t){n.writeHead(e,{"Content-Type":"application/json",...G}),n.end(JSON.stringify(t))}l(x,"sendJson");function Yt(n,e,t){n.writeHead(e,{"Content-Type":"text/plain; charset=utf-8",...G}),n.end(t)}l(Yt,"sendText");function Xt(n,e,t,r){n.writeHead(e,{"Content-Type":r,"Content-Length":String(t.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...G}),n.end(t)}l(Xt,"sendBinary");async function re(n,e={}){let t=e.maxBytes??lt,r=$e(n.headers["content-type"]),s=[],i=0;for await(let c of n){let p=Fe.from(c);if(i+=p.byteLength,i>t)throw new j(413,"request_body_too_large",`JSON request body exceeds ${t} bytes.`);s.push(p)}let a=Fe.concat(s).toString("utf8").trim();if(!a)return{};if(!ct(r))throw new j(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(a)}catch{throw new j(400,"invalid_json","Request body is not valid JSON.")}}l(re,"readJson");function Ve(n,e,t){let r=n.headers.authorization;return(typeof r=="string"&&r.startsWith("Bearer ")?r.slice(7):null)===t}l(Ve,"hasAuth");function $e(n){return Array.isArray(n)?n[0]??null:n??null}l($e,"headerValue");function ct(n){if(!n)return!1;let e=n.split(";")[0]?.trim().toLowerCase();return e==="application/json"||!!e?.endsWith("+json")}l(ct,"isJsonContentType");function je(n){try{let e=new URL(n);return e.protocol!=="http:"&&e.protocol!=="https:"?null:e.origin}catch{return null}}l(je,"normalizeOrigin");function pt(n){let e=new URL(n);return e.hostname==="localhost"||e.hostname==="127.0.0.1"||e.hostname==="::1"||e.hostname==="[::1]"}l(pt,"isLoopbackOrigin");function dt(n){let t=(Array.isArray(n)?n.join(", "):n?String(n):"").split(",").map(r=>r.trim()).filter(Boolean);return t.some(r=>r.toLowerCase()==="origin")||t.push("Origin"),t.join(", ")}l(dt,"appendVaryOrigin");function We(n){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
2
+ import{a as Ne,d as qe,e as De}from"./chunk-FVRII5XO.js";import{a as te}from"./chunk-XOB6FKQV.js";import{b as xe,c as Ee,h as Ue}from"./chunk-2V4LPUBH.js";import{b as ee}from"./chunk-RFMME46Z.js";import{Z as b,ba as Me}from"./chunk-XNOMIWEY.js";import{j as Ae,p as Oe,r as _e,s as He}from"./chunk-WWQNMC7C.js";import{a as Q,b as ke,h as Ce}from"./chunk-LKKMLBOH.js";import{Lb as H,Pb as W,Qb as Pe,a as $,w as F,x as N}from"./chunk-M3FLEZ4E.js";import{h as _,i as Te}from"./chunk-PWK5Z5S3.js";import{X as he,Y as ve,_ as Z,b as le,ba as we,c as ue,ea as be,fa as V,ja as Se,la as ye,ma as Re,p as ce,r as pe,s as de,t as me,u as ge,w as fe}from"./chunk-2EPR4HLF.js";import{z as M}from"./chunk-BKEDG3A4.js";import{c as ie,d as B,f as ae,h as U}from"./chunk-UGOK7VTC.js";import{v as Ie}from"./chunk-NJLULBTM.js";import{A as o}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as ne}from"node:fs";import mt from"node:os";import gt from"node:path";import{createServer as ft}from"node:http";import{randomBytes as ht}from"node:crypto";var it=o.discriminatedUnion("op",[o.strictObject({op:o.literal("set"),path:o.array(o.string().min(1)).min(1),value:o.unknown()}),o.strictObject({op:o.literal("unset"),path:o.array(o.string().min(1)).min(1)})]),at=o.discriminatedUnion("action",[o.strictObject({action:o.literal("patch"),expectedRevision:o.string(),operations:o.array(it).max(100)}),o.strictObject({action:o.literal("replace"),expectedRevision:o.string(),text:o.string().max(1048576)}),o.strictObject({action:o.literal("validate"),text:o.string().max(1048576)}),o.strictObject({action:o.literal("restore"),expectedRevision:o.string(),revision:o.string()}),o.strictObject({action:o.literal("trust"),root:o.string(),accountId:o.string(),trusted:o.boolean()}),o.strictObject({action:o.literal("client-state"),owner:o.string(),patch:Se,importOnly:o.boolean().optional()})]);function Be(n,e){let t=null;async function r(i,a){let c=U(n).config,p=null,u=null,m=null;try{p=await ue(c),m=await V(n,{projectRoot:i,accountId:a}),i||(t=m)}catch(I){u=B(I,c)}let w=m??(i?null:t);return{path:c,text:p,rawRevision:le(p),issue:u,effective:w,usingLastValid:!m&&!!w,applies:"next_turn",recoverableRevisions:await pe(n),clientState:u?null:await ye(n)}}l(r,"status");async function s(i){let a=at.parse(i);if(a.action==="validate")return{valid:!0,document:ce(a.text,U(n).config)};if(a.action==="client-state")return Re(n,a.owner,a.patch,a.importOnly);let c=l(async()=>{a.action==="patch"&&await fe(n,a.expectedRevision,a.operations),a.action==="replace"&&await de(n,a.expectedRevision,a.text),a.action==="restore"&&await me(n,a.revision,a.expectedRevision),a.action==="trust"&&await be(n,a.root,a.accountId,a.trusted)},"mutation");return e?await e(c):await c(),r()}return l(s,"mutate"),{status:r,mutate:s,schema:ge}}l(Be,"createConfigurationPayloads");import{Buffer as Fe}from"node:buffer";var G={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id, idempotency-key","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},lt=25*1024*1024,j=class extends Error{constructor(t,r,s){super(s);this.status=t;this.code=r;this.name="HttpBodyError"}status;code;static{l(this,"HttpBodyError")}};function Le(n,e,t={}){for(let[s,i]of Object.entries(G))e.setHeader(s,i);let r=$e(n.headers.origin);return r?(e.setHeader("Vary",dt(e.getHeader("Vary"))),ut(r,t)?(e.setHeader("Access-Control-Allow-Origin",r),{allowed:!0,origin:r}):{allowed:!1,origin:r}):{allowed:!0,origin:null}}l(Le,"applyCorsHeaders");function ut(n,e={}){if(n==="null")return!0;let t=je(n);return t?pt(t)?!0:new Set((e.allowedOrigins??[]).map(s=>s?je(s):null).filter(s=>!!s)).has(t):!1}l(ut,"isAllowedCorsOrigin");function x(n,e,t){n.writeHead(e,{"Content-Type":"application/json",...G}),n.end(JSON.stringify(t))}l(x,"sendJson");function Yt(n,e,t){n.writeHead(e,{"Content-Type":"text/plain; charset=utf-8",...G}),n.end(t)}l(Yt,"sendText");function Xt(n,e,t,r){n.writeHead(e,{"Content-Type":r,"Content-Length":String(t.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...G}),n.end(t)}l(Xt,"sendBinary");async function re(n,e={}){let t=e.maxBytes??lt,r=$e(n.headers["content-type"]),s=[],i=0;for await(let c of n){let p=Fe.from(c);if(i+=p.byteLength,i>t)throw new j(413,"request_body_too_large",`JSON request body exceeds ${t} bytes.`);s.push(p)}let a=Fe.concat(s).toString("utf8").trim();if(!a)return{};if(!ct(r))throw new j(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(a)}catch{throw new j(400,"invalid_json","Request body is not valid JSON.")}}l(re,"readJson");function Ve(n,e,t){let r=n.headers.authorization;return(typeof r=="string"&&r.startsWith("Bearer ")?r.slice(7):null)===t}l(Ve,"hasAuth");function $e(n){return Array.isArray(n)?n[0]??null:n??null}l($e,"headerValue");function ct(n){if(!n)return!1;let e=n.split(";")[0]?.trim().toLowerCase();return e==="application/json"||!!e?.endsWith("+json")}l(ct,"isJsonContentType");function je(n){try{let e=new URL(n);return e.protocol!=="http:"&&e.protocol!=="https:"?null:e.origin}catch{return null}}l(je,"normalizeOrigin");function pt(n){let e=new URL(n);return e.hostname==="localhost"||e.hostname==="127.0.0.1"||e.hostname==="::1"||e.hostname==="[::1]"}l(pt,"isLoopbackOrigin");function dt(n){let t=(Array.isArray(n)?n.join(", "):n?String(n):"").split(",").map(r=>r.trim()).filter(Boolean);return t.some(r=>r.toLowerCase()==="origin")||t.push("Origin"),t.join(", ")}l(dt,"appendVaryOrigin");function We(n){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
3
3
  <style nonce="${n}">body{font:16px system-ui;background:#171819;color:#eee;max-width:850px;margin:6vh auto;padding:24px}textarea{box-sizing:border-box;width:100%;min-height:280px;background:#222;color:#eee;padding:14px;border:1px solid #777;border-radius:8px;font:14px monospace}button,input,select{font:inherit;margin:6px;padding:8px}pre{white-space:pre-wrap}code{overflow-wrap:anywhere}button{cursor:pointer}p{line-height:1.5}</style>
4
4
  <h1>OpenPond needs a storage repair</h1><p id="issue" role="alert">Loading recovery details\u2026</p><p><code id="file"></code></p>
5
5
  <p id="action"></p><p>Migration backups and the source installation remain available. Execution services are stopped while recovery is open.</p>
@@ -20,7 +20,7 @@ for(const [id,action] of [['preview','preview'],['migrate','migrate'],['restart'
20
20
  el('diagnostics').onclick=()=>{if(!state)return;const blob=new Blob([JSON.stringify({issue:state.issue,migration:state.migration,config:{path:state.config.path,rawRevision:state.config.rawRevision,issue:state.config.issue}},null,2)],{type:'application/json'});const a=document.createElement('a');a.href=URL.createObjectURL(blob);a.download='openpond-recovery-diagnostics.json';a.click();URL.revokeObjectURL(a.href)};
21
21
  el('retry').onclick=async()=>{try{await request('/v1/recovery',{action:'retry'});message('Starting OpenPond\u2026');const timer=setInterval(async()=>{try{const h=await(await fetch('/health')).json();if(!h.recovery){clearInterval(timer);const next=new URLSearchParams(location.hash.slice(1)).get('returnTo');if(next){const u=new URL(next);if(['localhost','127.0.0.1','[::1]'].includes(u.hostname)){location.replace(u.toString());return}}location.reload();}}catch{}},500)}catch(e){message(e)}};
22
22
  (async()=>{const params=new URLSearchParams(location.hash.slice(1));token=params.get('openpondToken')||'';if(!token&&window.openpond?.getConnection)token=(await window.openpond.getConnection()).token;if(!token){message('Open the authenticated recovery URL from the launcher.');return}await load()})().catch(message);
23
- </script></html>`}l(We,"startupRecoveryPage");var vt=o.strictObject({action:o.enum(["preview","migrate","restart","retry"]),sourceAppHome:o.string().optional(),sourceConfig:o.string().optional(),resolutions:he.optional()});function Ge(n){return n instanceof ie&&/^(PRIVATE_STORAGE_|UNSAFE_STORAGE_|INVALID_CONFIG|CONFIG_|MIGRATION_|SOURCE_CHANGED_|CREDENTIAL_|UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|INVALID_ACCOUNT_|MISSING_INSTRUCTION_|INVALID_PROFILE_|DATABASE_RECOVERY_)/.test(n.issue.code)}l(Ge,"isRecoverableStartupError");async function Je(n,e,t){let r=/^(UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|UNSAFE_STORAGE_|PRIVATE_STORAGE_)/.test(t.issue.code),s=r?await ne.mkdtemp(gt.join(mt.tmpdir(),"openpond-recovery-")):n;return xe(s,async()=>{let{token:i,tokenFile:a}=await Ue(s),c=Be(n),p=t.issue,u,m=new Promise(f=>{u=f}),w=ft((f,h)=>{(async()=>{let S=new URL(f.url??"/","http://127.0.0.1");if(!Le(f,h).allowed){x(h,403,{error:"Origin not allowed"});return}if(f.method==="OPTIONS"){x(h,204,{});return}if(f.method==="GET"&&S.pathname==="/health"){x(h,200,{ok:!0,server:"openpond-app-server",version:ke,recovery:!0});return}if(f.method==="GET"&&S.pathname==="/"){let v=ht(18).toString("base64");h.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Content-Security-Policy":`default-src 'none'; script-src 'nonce-${v}'; style-src 'nonce-${v}'; connect-src 'self'; base-uri 'none'; frame-ancestors 'none'`}),h.end(We(v));return}if(!Ve(f,S,i)){x(h,401,{error:"Unauthorized"});return}let P=!r;if(f.method==="GET"&&S.pathname==="/v1/recovery"){x(h,200,{issue:p,configEditable:P,config:r?{path:U(n).config,text:null,rawRevision:"unavailable",issue:p,recoverableRevisions:[]}:await c.status(),migration:await ve(n).catch(v=>({issue:B(v,n)}))});return}if(f.method==="POST"&&S.pathname==="/v1/configuration"&&P){x(h,200,await c.mutate(await re(f)));return}if(f.method==="POST"&&S.pathname==="/v1/recovery"){let v=vt.parse(await re(f));if(r&&v.action!=="retry"&&v.action!=="preview")throw t;if(v.action==="restart"){x(h,200,await we(n));return}if(v.action==="preview"||v.action==="migrate"){x(h,200,await Z(n,{sourceAppHome:v.sourceAppHome,sourceConfig:v.sourceConfig,resolutions:v.resolutions,dryRun:v.action==="preview"}));return}await Z(n),await V(n),x(h,200,{ready:!0}),u();return}x(h,503,{error:`${p.message} ${p.action}`,issue:p,recovery:!0})})().catch(S=>{p=B(S,n),x(h,422,{error:`${p.message} ${p.action}`,issue:p})})});await new Promise((f,h)=>{w.once("error",h),w.listen(e,"127.0.0.1",()=>{w.off("error",h),f()})});let I=w.address().port,C=`http://127.0.0.1:${I}`;return await Ee(s,C,"startup-recovery"),{url:C,port:I,token:i,tokenFile:a,storePath:U(n).database,repaired:m,close:l(async()=>{w.closeIdleConnections(),await new Promise((f,h)=>w.close(S=>S?h(S):f())),r&&await ne.rm(s,{recursive:!0,force:!0})},"close")}}).catch(async i=>{throw r&&await ne.rm(s,{recursive:!0,force:!0}),i})}l(Je,"startRecoveryServer");import{createHash as Ut}from"node:crypto";import{createHash as wt,randomUUID as ze}from"node:crypto";var bt=o.object({updatedAt:o.string(),id:o.string().min(1)}).strict(),St=o.object({entries:o.array(_).max(200),nextBefore:bt.nullable()}).strict(),yt=o.object({run:_,replayed:o.boolean()}).strict(),J=class{constructor(e){this.client=e}client;static{l(this,"HostedCreateImproveStorage")}async getCreateImproveRun(e){let t=await this.client.request({contractVersion:b,requestId:ze(),operation:"create-improve/execute",params:{action:"get",runId:e}});return t===null?null:_.parse(t)}async listCreateImproveRuns(e={}){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit??250))),r=Array.isArray(e.state)?[...e.state]:e.state?[e.state]:[],s=[],i=null;for(;s.length<t;){let a=St.parse(await this.client.request({contractVersion:b,requestId:ze(),operation:"create-improve/execute",params:{action:"page",query:{profileId:e.profileId??null,targetKind:e.targetKind??null,targetId:e.targetId??null,state:r},before:i,limit:Math.min(50,t-s.length)}}));if(e.conversationId&&a.entries.some(c=>c.scope.conversationId!==e.conversationId))throw new Error("Hosted Create/Improve page crossed its conversation scope.");if(s.push(...a.entries),!a.nextBefore)break;if(a.entries.length===0||i&&(a.nextBefore.updatedAt>i.updatedAt||a.nextBefore.updatedAt===i.updatedAt&&a.nextBefore.id>=i.id))throw new Error("Hosted Create/Improve cursor did not advance.");i=a.nextBefore}return s}async upsertCreateImproveRun(e){let t=_.parse(e),r=`create-improve:${wt("sha256").update(JSON.stringify(t)).digest("hex")}`,s=await this.client.request({contractVersion:b,requestId:r,operation:"create-improve/execute",params:{action:"put",run:t}});return _.parse(o.object({run:o.unknown()}).strict().parse(s).run)}async mutateCreateImproveRun(e,t){let r=Te.parse(e),s=await this.getCreateImproveRun(r.runId);if(!s)throw new Error(`Create/Improve run not found: ${r.runId}`);if(s.appliedActionIds.includes(r.actionId))return{run:s,replayed:!0};if(s.revision!==r.expectedRevision)throw new Error(`Create/Improve run changed from revision ${r.expectedRevision} to ${s.revision}. Refresh and try again.`);let i=_.parse(t(s));if(i.id!==s.id||i.revision!==s.revision+1||!i.appliedActionIds.includes(r.actionId))throw new Error("Create/Improve mutation must preserve identity, advance one revision and record its action.");return yt.parse(await this.client.request({contractVersion:b,requestId:r.actionId,operation:"create-improve/execute",params:{action:"mutate",mutation:r,next:i}}))}};import{randomUUID as It}from"node:crypto";async function L(n,e){let t=n;for(;;)try{return await e(t)}catch(r){if(!Rt(r)||t<=1)throw r;t=Math.max(1,Math.floor(t/2))}}l(L,"hostedBoundedPage");function Rt(n){return n instanceof Error?n.message==="Host storage response is too large."||n.message==="Host storage request failed: host_storage_response_too_large":!1}l(Rt,"isOversizeResponse");var Tt=o.object({entries:o.array(o.object({sequence:o.number().int().positive(),event:$})).max(200),totalMatchingEvents:o.number().int().nonnegative(),remainingMatchingEvents:o.number().int().nonnegative()}).strict(),z=class{constructor(e){this.client=e}client;static{l(this,"HostedRuntimeEventStorage")}async runtimeEventsForSession(e,t={}){let r=t.limit==null?1e4:Math.max(0,Math.trunc(t.limit));if(r===0)return[];let s=Math.min(r,1e4),i=[],a=Math.max(0,t.afterSequence??0),c=0,p=t.names?new Set(t.names):null;for(;i.length<=s;){let u=await this.runtimeEventPageRows({sessionId:e,afterSequence:a,beforeSequence:null,limit:Math.min(200,s+1-i.length),excludeReasoningDeltas:t.excludeReasoningDeltas});for(let m of u.entries){if(m.sequence<=a)throw new Error("Host event cursor did not advance.");if(a=m.sequence,c+=1,c>1e4)throw new Error("Hosted runtime event scan exceeds 10,000 rows; use a narrower query.");(!p||p.has(m.event.name))&&i.push(m.event)}if(u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break}if(i.length>s||t.limit==null&&r===1e4&&i.length===s)throw new Error("Hosted runtime event read exceeds 10,000 rows; use a bounded cursor query.");return i}async persistedRuntimeEventsForSession(e,t={}){return this.runtimeEventsForSession(e,t)}async appendRuntimeEvent(e){let t=$.parse(e),r=await this.client.request({contractVersion:b,requestId:t.id,operation:"event/append",params:{event:t}});return o.object({event:$}).strict().parse(r).event}async runtimeEventPageRows(e){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit))),r=Math.max(0,Math.trunc(e.afterSequence)),s=e.beforeSequence,i=[],a=0,c=0;for(;i.length<t;){let p=Math.min(200,t-i.length),u=await L(p,async m=>Tt.parse(await this.client.request({contractVersion:b,requestId:`event-page:${It()}`,operation:"events/page",params:{sessionId:e.sessionId,afterSequence:r,beforeSequence:s,limit:m,...e.excludeReasoningDeltas?{excludeReasoningDeltas:!0}:{}}})));if(i.length===0&&(a=u.totalMatchingEvents,c=u.remainingMatchingEvents),i=s===null?[...i,...u.entries]:[...u.entries,...i],u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break;if(s===null){let m=u.entries.at(-1).sequence;if(m<=r)throw new Error("Host event cursor did not advance.");r=m}else{let m=u.entries[0].sequence;if(m>=s)throw new Error("Host event cursor did not advance.");s=m}}return{entries:i,totalMatchingEvents:a,remainingMatchingEvents:c}}};import{randomUUID as T}from"node:crypto";var Ke=o.object({revision:o.number().int().min(1),session:F}).strict(),Ye=o.object({revision:o.number().int().min(1),turn:N}).strict(),Pt=o.object({sessions:o.array(F).max(200),nextAfterId:o.string().min(1).nullable()}).strict(),xt=o.object({turns:o.array(N).max(200),nextBeforeSortIndex:o.number().int().nonnegative().nullable()}).strict(),K=class{constructor(e){this.client=e}client;static{l(this,"HostedSessionStorage")}async count(){let e=await this.client.request({contractVersion:b,requestId:T(),operation:"session/count",params:{}});return o.object({count:o.number().int().nonnegative()}).strict().parse(e).count}async get(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"session/get",params:{sessionId:e}});return t===null?null:Ke.parse(t)}async sessionCount(){return this.count()}async sessionShells(){let e=[],t=null;do{let r=await L(Math.min(10,1001-e.length),async s=>Pt.parse(await this.client.request({contractVersion:b,requestId:T(),operation:"session/page",params:{afterId:t,limit:s}})));if(e.push(...r.sessions),e.length>1e3)throw new Error("Hosted session list exceeds 1,000 rows; use a scoped page query.");if(r.nextAfterId!==null&&(r.sessions.length===0||t!==null&&r.nextAfterId<=t))throw new Error("Host session cursor did not advance.");t=r.nextAfterId}while(t!==null);return e}async getSession(e){return(await this.get(e))?.session??null}async insertSessionAtFront(e){await this.put({session:e,expectedRevision:null,requestId:T()})}async updateSession(e,t){let r=await this.get(e);if(!r)return null;let s=F.parse(t(r.session));if(s.id!==e)throw new Error("A session update cannot change its identity.");return(await this.put({session:s,expectedRevision:r.revision,requestId:T()})).session}async put(e){let t=F.parse(e.session);return Ke.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"session/put",params:{sessionId:t.id,expectedRevision:e.expectedRevision,session:t}}))}async readTurn(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/get",params:{turnId:e}});return t===null?null:Ye.parse(t)}async getTurn(e){return(await this.readTurn(e))?.turn??null}async turnsForSession(e,t=50){let r=Math.max(1,Math.min(1e3,Math.trunc(t))),s=[],i=null;for(;s.length<r;){let a=await L(Math.min(200,r-s.length),async c=>xt.parse(await this.client.request({contractVersion:b,requestId:T(),operation:"turn/page",params:{sessionId:e,beforeSortIndex:i,limit:c}})));if(s.push(...a.turns),a.nextBeforeSortIndex===null)break;if(i!==null&&a.nextBeforeSortIndex>=i)throw new Error("Host turn cursor did not advance.");i=a.nextBeforeSortIndex}return s}async countTurnsForSession(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/count",params:{sessionId:e}});return o.object({count:o.number().int().nonnegative()}).strict().parse(t).count}async hasSubagentParentWakeTurn(e,t){return await this.wakeCount(e,"messageId",t)>0}async countSubagentParentWakeTurns(e,t){return this.wakeCount(e,"fromRunId",t)}async latestAssistantTextForSession(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"events/latestAssistantText",params:{sessionId:e}});return o.object({text:o.string().nullable()}).strict().parse(t).text}async wakeCount(e,t,r){let s=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/wakeCount",params:{sessionId:e,key:t,value:r}});return o.object({count:o.number().int().nonnegative()}).strict().parse(s).count}async latestTurnForSession(e,t){let r=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/latest",params:{sessionId:e,status:t??null}});return r===null?null:N.parse(r)}async latestPersistedTurnForSession(e,t){return this.latestTurnForSession(e,t)}async insertTurn(e){await this.putTurn({turn:e,expectedRevision:null,requestId:T()})}async updateTurn(e,t){let r=await this.readTurn(e);if(!r)return null;let s=N.parse(t(r.turn));if(s.id!==e||s.sessionId!==r.turn.sessionId)throw new Error("A turn update cannot change its identity.");return(await this.putTurn({turn:s,expectedRevision:r.revision,requestId:T()})).turn}async putTurn(e){let t=N.parse(e.turn);return Ye.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"turn/put",params:{sessionId:t.sessionId,turnId:t.id,expectedRevision:e.expectedRevision,turn:t}}))}};import{createHash as Et,randomUUID as kt}from"node:crypto";var k=o.object({ok:o.literal(!0)}).strict(),Y=o.array(H),Ct=o.array(o.string()),At=o.object({turnId:o.string(),run:M}).strict(),Ot=o.object({inputs:o.array(H).max(10),hasMore:o.boolean()}).strict(),_t=o.object({items:o.array(W).max(10),hasMore:o.boolean()}).strict(),Ht=o.object({items:o.array(o.string()).max(200),hasMore:o.boolean()}).strict();function X(n,e){return`inbox:${n}:${Et("sha256").update(JSON.stringify(e)).digest("hex")}`}l(X,"retryKey");function Xe(n){if(n.senderKind==="ponder"||n.payload.ponderDesktop!==void 0)throw new Error("A desktop Ponder operation must be admitted on its originating local installation.");return{...n,senderKind:n.senderKind}}l(Xe,"hostedInput");var q=class{constructor(e){this.client=e}client;static{l(this,"HostedTaskInboxStorage")}async call(e,t,r=kt()){let s=await this.client.request({contractVersion:b,requestId:r,operation:"task-inbox/execute",params:e});return t.parse(s)}async inputPages(e,t=Number.MAX_SAFE_INTEGER){let r=[],s=0;for(;r.length<t;){let i=await this.call(e(s),Ot);for(let a of i.inputs){if(a.sequence<=s)throw new Error("Host task input cursor did not advance.");if(s=a.sequence,r.push(a),r.length>=t)break}if(!i.hasMore)return r;if(i.inputs.length===0)throw new Error("Host task input page made no progress.")}return r}async recoverTaskInboxOwners(e){return this.call({action:"recoverTaskInboxOwners",ownerId:e},o.array(o.object({sessionId:o.string(),turnId:o.string()}).strict()))}async hasTaskCompletion(e){return this.call({action:"hasTaskCompletion",turnId:e},o.boolean())}async taskInboxSnapshot(e){let t=await this.call({action:"taskInboxSnapshot",sessionId:e},Pe),[r,s]=await Promise.all([this.inputPages(i=>({action:"taskInboxSnapshotInputs",sessionId:e,afterSequence:i})),this.taskWaitsForSession(e)]);return{...t,inputs:r,waits:s}}async declareTaskWork(e,t,r,s){await this.call({action:"declareTaskWork",sessionId:e,turnId:t,ownerId:r,areas:s},k)}async taskWorkAreas(e){return this.call({action:"taskWorkAreas",sessionId:e},Ct)}async admitTaskInput(e){return this.call({action:"admitTaskInput",input:Xe(e)},H)}async admitTaskInputs(e){return this.call({action:"admitTaskInputs",inputs:e.map(Xe)},Y)}async rejectTaskInput(e,t){await this.call({action:"rejectTaskInput",id:e,error:t},k)}async getTaskInput(e){return this.call({action:"getTaskInput",id:e},H.nullable())}async taskInputsForSession(e,t={}){let r=Math.max(1,Math.min(500,t.limit??128)),s=[],i=t.afterSequence??0;for(;s.length<r;){let a=Math.min(10,r-s.length),c=await this.call({action:"taskInputsForSession",sessionId:e,query:{afterSequence:i,pendingOnly:t.pendingOnly,limit:a}},Y);if(!c.length)break;for(let p of c){if(p.sequence<=i)throw new Error("Host task input cursor did not advance.");i=p.sequence,s.push(p)}if(c.length<a)break}return s}async mutateTaskInput(e,t,r){return this.call({action:"mutateTaskInput",sessionId:e,inputId:t,change:r},H,X("mutate",{sessionId:e,inputId:t,change:r}))}async openTaskInboxTurn(e,t,r){await this.call({action:"openTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k,X("open",{sessionId:e,turnId:t,ownerId:r}))}async renewTaskInboxTurn(e,t,r){await this.call({action:"renewTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k)}async pendingTaskInputs(e,t){return this.inputPages(r=>({action:"pendingTaskInputs",sessionId:e,turnId:t,afterSequence:r}))}async taskAssignmentInputs(e){return this.inputPages(t=>({action:"taskAssignmentInputs",turnId:e,afterSequence:t}))}async pauseTaskInboxTurn(e,t,r){await this.call({action:"pauseTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k)}async includeTaskInputs(e,t,r,s){return this.call({action:"includeTaskInputs",sessionId:e,turnId:t,ownerId:r,requestId:s},Y,X("include",{sessionId:e,turnId:t,ownerId:r,requestId:s}))}async settleTaskInputRequest(e,t){await this.call({action:"settleTaskInputRequest",requestId:e,outcome:t},k)}async sealTaskInboxTurn(e,t,r){return this.call({action:"sealTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},o.boolean())}async sealNativeTaskInboxTurn(e,t,r){return this.call({action:"sealNativeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},Y)}async closeTaskInboxTurn(e,t,r,s){await this.call({action:"closeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r,outcome:s},k)}async taskInboxPaused(e){return this.call({action:"taskInboxPaused",sessionId:e},o.boolean())}async reserveTaskFollowup(e,t,r){return this.call({action:"reserveTaskFollowup",sessionId:e,turnId:t,ownerId:r},H.nullable(),X("reserve",{sessionId:e,turnId:t,ownerId:r}))}async taskInboxWakeTargets(){let e=[],t="";for(;;){let r=await this.call({action:"taskInboxWakeTargets",afterSessionId:t},Ht);for(let s of r.items){if(s<=t)throw new Error("Host task wake cursor did not advance.");t=s,e.push(s)}if(!r.hasMore)return e;if(!r.items.length)throw new Error("Host task wake page made no progress.")}}async createTaskWait(e){return this.call({action:"createTaskWait",value:e},W)}async settleTaskWait(e,t){return this.call({action:"settleTaskWait",id:e,state:t},W)}async taskWaitsForSession(e){let t=[],r="";for(;;){let s=await this.call({action:"taskWaitsForSession",sessionId:e,afterId:r},_t);for(let i of s.items){if(i.id<=r)throw new Error("Host task wait cursor did not advance.");r=i.id,t.push(i)}if(!s.hasMore)return t;if(!s.items.length)throw new Error("Host task wait page made no progress.")}}async commitSubagentCompletion(e,t){await this.call({action:"commitSubagentCompletion",value:e,turnId:t},k)}async pendingTaskCompletions(e=""){let t=[],r=e;for(;t.length<100;){let s=await this.call({action:"pendingTaskCompletions",afterTurnId:r},o.array(At).max(10));for(let i of s){if(i.turnId<=r)throw new Error("Host task completion cursor did not advance.");r=i.turnId,t.push(i)}if(s.length<10)break}return t}async settleTaskCompletion(e,t){await this.call({action:"settleTaskCompletion",turnId:e,inputId:t},k)}async upsertSubagentRun(e){return this.call({action:"upsertSubagentRun",value:M.parse(e)},M)}async getSubagentRun(e){return this.call({action:"getSubagentRun",id:e},M.nullable())}async listSubagentRuns(e={}){let r=[],s="",i=e.status?Array.isArray(e.status)?[...e.status]:[e.status]:null;for(;;){let a=await this.call({action:"listSubagentRuns",query:{parentSessionId:e.parentSessionId,childSessionId:e.childSessionId,status:i,afterId:s,limit:10}},o.array(M).max(10));for(let c of a){if(c.id<=s)throw new Error("Host subagent run cursor did not advance.");if(s=c.id,r.push(c),r.length>1e3)throw new Error("Hosted subagent run list exceeds 1,000 rows; use a narrower session or status query.")}if(a.length<10)break}return r.sort((a,c)=>(c.updatedAt??c.createdAt).localeCompare(a.updatedAt??a.createdAt)),e.limit===void 0?r:r.slice(0,Math.max(1,Math.min(1e3,e.limit)))}async listActiveSubagentRuns(e={}){return this.listSubagentRuns({...e,status:e.status??["queued","running","needs_resume"]})}};var se=class extends q{static{l(this,"HostedTurnRepository")}sessions;events;approvals;usage;createImprove;constructor(e){super(e),this.sessions=new K(e),this.events=new z(e),this.approvals=new qe(e),this.usage=new De(e),this.createImprove=new J(e)}sessionShells(){return this.sessions.sessionShells()}sessionCount(){return this.sessions.sessionCount()}getSession(e){return this.sessions.getSession(e)}insertSessionAtFront(e){return this.sessions.insertSessionAtFront(e)}updateSession(e,t){return this.sessions.updateSession(e,t)}getTurn(e){return this.sessions.getTurn(e)}insertTurn(e){return this.sessions.insertTurn(e)}updateTurn(e,t){return this.sessions.updateTurn(e,t)}latestTurnForSession(e,t){return this.sessions.latestTurnForSession(e,t)}latestPersistedTurnForSession(e,t){return this.sessions.latestPersistedTurnForSession(e,t)}turnsForSession(e,t){return this.sessions.turnsForSession(e,t)}countTurnsForSession(e){return this.sessions.countTurnsForSession(e)}hasSubagentParentWakeTurn(e,t){return this.sessions.hasSubagentParentWakeTurn(e,t)}countSubagentParentWakeTurns(e,t){return this.sessions.countSubagentParentWakeTurns(e,t)}latestAssistantTextForSession(e){return this.sessions.latestAssistantTextForSession(e)}appendRuntimeEvent(e){return this.events.appendRuntimeEvent(e)}runtimeEventsForSession(e,t){return this.events.runtimeEventsForSession(e,t)}persistedRuntimeEventsForSession(e,t){return this.events.persistedRuntimeEventsForSession(e,t)}async runtimeEventsForTurn(e,t){let r=await this.getTurn(e);if(!r)return[];let s=(await this.events.runtimeEventsForSession(r.sessionId)).filter(i=>i.turnId===e&&(!t?.names||t.names.includes(i.name)));return t?.limit==null?s:s.slice(0,Math.max(0,t.limit))}runtimeEventPageRows(e){return this.events.runtimeEventPageRows(e)}getApproval(e){return this.approvals.getApproval(e)}async upsertApproval(e){let t=await this.approvals.readApproval(e.id);t&&JSON.stringify(t.approval)===JSON.stringify(e)||await this.approvals.putApproval({approval:e,expectedRevision:t?.revision??null,requestId:`approval:${Ut("sha256").update(JSON.stringify({approval:e,revision:t?.revision??null})).digest("hex")}`})}upsertModelUsageRecord(e){return this.usage.upsertModelUsageRecord(e)}listModelUsageRecords(e){return this.usage.listModelUsageRecords(e)}getCreateImproveRun(e){return this.createImprove.getCreateImproveRun(e)}listCreateImproveRuns(e){return this.createImprove.listCreateImproveRuns(e)}upsertCreateImproveRun(e){return this.createImprove.upsertCreateImproveRun(e)}mutateCreateImproveRun(e,t){return this.createImprove.mutateCreateImproveRun(e,t)}};function Ze(n){return new se(n)}l(Ze,"createHostedRuntimeCoreStorage");function oe(n=process.env){let e=n.OPENPOND_API_KEY?.trim(),t=n.OPENPOND_OPCHAT_API_URL?.trim(),r=n.OPENPOND_HOSTED_MODEL_ID?.trim();if(!e||!t||!r)throw new Error("Hosted model stream requires a host credential, API URL, and admitted model.");let s=new URL(t);if(s.protocol!=="https:"||s.username||s.password||s.search||s.hash)throw new Error("Hosted model stream API URL is invalid.");return l(async function*(a){if(a.model!==r)throw new Error("Hosted model selection changed outside host admission.");yield*Ae({...a,apiBaseUrl:s.toString(),token:e,model:r})},"streamHostedModel")}l(oe,"createHostedModelStreamFromEnvironment");import{existsSync as Mt}from"node:fs";import{lstat as Nt,readFile as qt,realpath as Dt}from"node:fs/promises";import y from"node:path";import{fileURLToPath as Bt}from"node:url";var Qe=y.dirname(Bt(import.meta.url));function R(n,e,t){let r=n[e+1];if(!r||r.startsWith("--"))throw new Error(`${t} requires a value.`);return r}l(R,"requireValue");function et(n,e){let t=Number.parseInt(n,10);if(!Number.isFinite(t)||t<0||t>65535)throw new Error(`${e} must be a port from 0 to 65535.`);return t}l(et,"parsePort");function nt(n){let e="serve",t=Q,r=17874,s=null,i=!1,a=!1,c=null,p,u=!1,m,w,I,C=null,f=null,h=null,S=null,P,v="sqlite_bundle",A=0,E=n[0];if(E&&!E.startsWith("-")){if(E==="serve"||E==="server")e="serve";else if(E==="app-server")e="app-server";else if(E==="web")e="web";else{if(E==="help")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,help:!0};throw new Error(`Unknown command: ${E}`)}A=1}for(let g=A;g<n.length;g+=1){let d=n[g];if(d==="--help"||d==="-h")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,help:!0};if(d==="--listen"){let O=Ce(R(n,g,d));t=O.host,r=et(String(O.port),d),g+=1}else if(d==="--hostname"||d==="--host")t=R(n,g,d),g+=1;else if(d==="--port")r=et(R(n,g,d),d),g+=1;else if(d==="--web-root")s=y.resolve(R(n,g,d)),g+=1;else if(d==="--source-browser-state")I=y.resolve(R(n,g,d)),g+=1;else{if(d==="--store-dir")throw new Error("--store-dir has been replaced by --home. Use --home <directory> or OPENPOND_HOME.");if(d==="--home")c=y.resolve(R(n,g,d)),g+=1;else if(d==="--hosted-cache-home")p=y.resolve(R(n,g,d)),g+=1;else if(d==="--experiment-owner")u=!0;else if(d==="--experiment-harness-package"){if(m)throw new Error("Duplicate Experiment Harness source package.");m=y.resolve(R(n,g,d)),g+=1}else if(d==="--runtime-storage"){if(R(n,g,d)!=="hosted-postgres")throw new Error("Unsupported app-server runtime storage.");v="hosted_postgres",g+=1}else if(d==="--profile-external-dataset-package"){if(w)throw new Error("Duplicate private external Dataset package.");w=y.resolve(R(n,g,d)),g+=1}else if(d==="--profile-source-root")C=y.resolve(R(n,g,d)),g+=1;else if(d==="--profile-repository-id")f=R(n,g,d),g+=1;else if(d==="--profile-id")h=R(n,g,d),g+=1;else if(d==="--profile-revision")S=R(n,g,d),g+=1;else if(d==="--hosted-profile-release"){if(P)throw new Error("Duplicate hosted Profile release descriptor.");let O=R(n,g,d);if(O.length>16e3||!/^[A-Za-z0-9_-]+$/.test(O))throw new Error("Invalid hosted Profile release descriptor.");try{P=Ne.parse(JSON.parse(Buffer.from(O,"base64url").toString("utf8")))}catch{throw new Error("Invalid hosted Profile release descriptor.")}g+=1}else if(d==="--open-browser")i=!0;else if(d==="--print-access-url")a=!0;else throw new Error(`Unknown option: ${d}`)}}if(i&&a)throw new Error("--open-browser and --print-access-url cannot be used together.");if(e!=="web"&&(i||a))throw new Error("Browser options are only available in web mode.");let D=[C,f,h,S].filter(Boolean).length;if(D&&(D!==4||e!=="app-server"))throw new Error("Profile source flags require app-server mode and --profile-source-root, --profile-repository-id, --profile-id, and --profile-revision together.");if(v==="hosted_postgres"&&(e!=="app-server"||c||D))throw new Error("Hosted Postgres app-server cannot use --home or local Profile source flags.");if(P&&v!=="hosted_postgres")throw new Error("Hosted Profile release requires hosted Postgres app-server mode.");if(p&&v!=="hosted_postgres")throw new Error("Hosted cache home requires hosted Postgres mode.");if(u&&(e!=="app-server"||v!=="sqlite_bundle"||D||!c))throw new Error("Experiment owner mode requires an isolated app-server home without Profile selection.");if(m&&(!u||y.dirname(m)!==c))throw new Error("Experiment Harness source must be provisioned directly inside its isolated owner home.");return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,sourceBrowserState:I,...w?{profileExternalDatasetPackage:w}:{},...D?{profileSource:{repoPath:C,repositoryId:f,profileId:h,sourceRevision:S}}:{},...P?{admittedProfileRelease:P}:{},...p?{hostedCacheHome:p}:{},...u?{experimentOwner:!0}:{},...m?{experimentHarnessPackage:m}:{},help:!1}}l(nt,"parseCliArgs");function Ft(){return[process.env.OPENPOND_WEB_ROOT,y.resolve(process.cwd(),"apps/web/dist"),y.resolve(Qe,"../../web/dist"),y.resolve(process.cwd(),"web"),y.resolve(Qe,"../web")].filter(n=>!!n)}l(Ft,"defaultWebRootCandidates");function jt(n){let e=n?[n]:Ft();for(let t of e){let r=y.resolve(t);if(Mt(y.join(r,"index.html")))return r}return null}l(jt,"resolveWebRoot");function Lt(n){let e=n==="0.0.0.0"||n==="::"?"127.0.0.1":n;return e.includes(":")&&!e.startsWith("[")?`[${e}]`:e}l(Lt,"formatHostForUrl");function Vt(n){return`http://${Lt(n.status.host)}:${n.status.port}`}l(Vt,"browserBaseUrl");function $t(n,e){let t=new URL(n),r=new URLSearchParams;return r.set("openpondServerUrl",n),r.set("openpondToken",e),t.hash=r.toString(),t.toString()}l($t,"tokenizedWebUrl");async function tt(n,e=He){let t=$t(n.baseUrl,n.token);if(n.printAccessUrl)return{stdout:[`OpenPond access URL: ${t}`],stderr:[]};if(!n.openBrowser)return{stdout:[`OpenPond web UI: ${n.baseUrl}`],stderr:[]};let r=await e(t);return r.opened?{stdout:[`Opened OpenPond in your browser: ${n.baseUrl}`],stderr:[]}:{stdout:[`OpenPond access URL: ${t}`],stderr:[`Could not open the system browser: ${r.error}`]}}l(tt,"resolveWebLaunchMessages");function st(){console.log(`Usage:
23
+ </script></html>`}l(We,"startupRecoveryPage");var vt=o.strictObject({action:o.enum(["preview","migrate","restart","retry"]),sourceAppHome:o.string().optional(),sourceConfig:o.string().optional(),resolutions:he.optional()});function Ge(n){return n instanceof ie&&/^(PRIVATE_STORAGE_|UNSAFE_STORAGE_|INVALID_CONFIG|CONFIG_|MIGRATION_|SOURCE_CHANGED_|CREDENTIAL_|UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|INVALID_ACCOUNT_|MISSING_INSTRUCTION_|INVALID_PROFILE_|DATABASE_RECOVERY_)/.test(n.issue.code)}l(Ge,"isRecoverableStartupError");async function Je(n,e,t){let r=/^(UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|UNSAFE_STORAGE_|PRIVATE_STORAGE_)/.test(t.issue.code),s=r?await ne.mkdtemp(gt.join(mt.tmpdir(),"openpond-recovery-")):n;return xe(s,async()=>{let{token:i,tokenFile:a}=await Ue(s),c=Be(n),p=t.issue,u,m=new Promise(f=>{u=f}),w=ft((f,h)=>{(async()=>{let S=new URL(f.url??"/","http://127.0.0.1");if(!Le(f,h).allowed){x(h,403,{error:"Origin not allowed"});return}if(f.method==="OPTIONS"){x(h,204,{});return}if(f.method==="GET"&&S.pathname==="/health"){x(h,200,{ok:!0,server:"openpond-app-server",version:ke,recovery:!0});return}if(f.method==="GET"&&S.pathname==="/"){let v=ht(18).toString("base64");h.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Content-Security-Policy":`default-src 'none'; script-src 'nonce-${v}'; style-src 'nonce-${v}'; connect-src 'self'; base-uri 'none'; frame-ancestors 'none'`}),h.end(We(v));return}if(!Ve(f,S,i)){x(h,401,{error:"Unauthorized"});return}let P=!r;if(f.method==="GET"&&S.pathname==="/v1/recovery"){x(h,200,{issue:p,configEditable:P,config:r?{path:U(n).config,text:null,rawRevision:"unavailable",issue:p,recoverableRevisions:[]}:await c.status(),migration:await ve(n).catch(v=>({issue:B(v,n)}))});return}if(f.method==="POST"&&S.pathname==="/v1/configuration"&&P){x(h,200,await c.mutate(await re(f)));return}if(f.method==="POST"&&S.pathname==="/v1/recovery"){let v=vt.parse(await re(f));if(r&&v.action!=="retry"&&v.action!=="preview")throw t;if(v.action==="restart"){x(h,200,await we(n));return}if(v.action==="preview"||v.action==="migrate"){x(h,200,await Z(n,{sourceAppHome:v.sourceAppHome,sourceConfig:v.sourceConfig,resolutions:v.resolutions,dryRun:v.action==="preview"}));return}await Z(n),await V(n),x(h,200,{ready:!0}),u();return}x(h,503,{error:`${p.message} ${p.action}`,issue:p,recovery:!0})})().catch(S=>{p=B(S,n),x(h,422,{error:`${p.message} ${p.action}`,issue:p})})});await new Promise((f,h)=>{w.once("error",h),w.listen(e,"127.0.0.1",()=>{w.off("error",h),f()})});let I=w.address().port,C=`http://127.0.0.1:${I}`;return await Ee(s,C,"startup-recovery"),{url:C,port:I,token:i,tokenFile:a,storePath:U(n).database,repaired:m,close:l(async()=>{w.closeIdleConnections(),await new Promise((f,h)=>w.close(S=>S?h(S):f())),r&&await ne.rm(s,{recursive:!0,force:!0})},"close")}}).catch(async i=>{throw r&&await ne.rm(s,{recursive:!0,force:!0}),i})}l(Je,"startRecoveryServer");import{createHash as Ut}from"node:crypto";import{createHash as wt,randomUUID as ze}from"node:crypto";var bt=o.object({updatedAt:o.string(),id:o.string().min(1)}).strict(),St=o.object({entries:o.array(_).max(200),nextBefore:bt.nullable()}).strict(),yt=o.object({run:_,replayed:o.boolean()}).strict(),J=class{constructor(e){this.client=e}client;static{l(this,"HostedCreateImproveStorage")}async getCreateImproveRun(e){let t=await this.client.request({contractVersion:b,requestId:ze(),operation:"create-improve/execute",params:{action:"get",runId:e}});return t===null?null:_.parse(t)}async listCreateImproveRuns(e={}){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit??250))),r=Array.isArray(e.state)?[...e.state]:e.state?[e.state]:[],s=[],i=null;for(;s.length<t;){let a=St.parse(await this.client.request({contractVersion:b,requestId:ze(),operation:"create-improve/execute",params:{action:"page",query:{profileId:e.profileId??null,targetKind:e.targetKind??null,targetId:e.targetId??null,state:r},before:i,limit:Math.min(50,t-s.length)}}));if(e.conversationId&&a.entries.some(c=>c.scope.conversationId!==e.conversationId))throw new Error("Hosted Create/Improve page crossed its conversation scope.");if(s.push(...a.entries),!a.nextBefore)break;if(a.entries.length===0||i&&(a.nextBefore.updatedAt>i.updatedAt||a.nextBefore.updatedAt===i.updatedAt&&a.nextBefore.id>=i.id))throw new Error("Hosted Create/Improve cursor did not advance.");i=a.nextBefore}return s}async upsertCreateImproveRun(e){let t=_.parse(e),r=`create-improve:${wt("sha256").update(JSON.stringify(t)).digest("hex")}`,s=await this.client.request({contractVersion:b,requestId:r,operation:"create-improve/execute",params:{action:"put",run:t}});return _.parse(o.object({run:o.unknown()}).strict().parse(s).run)}async mutateCreateImproveRun(e,t){let r=Te.parse(e),s=await this.getCreateImproveRun(r.runId);if(!s)throw new Error(`Create/Improve run not found: ${r.runId}`);if(s.appliedActionIds.includes(r.actionId))return{run:s,replayed:!0};if(s.revision!==r.expectedRevision)throw new Error(`Create/Improve run changed from revision ${r.expectedRevision} to ${s.revision}. Refresh and try again.`);let i=_.parse(t(s));if(i.id!==s.id||i.revision!==s.revision+1||!i.appliedActionIds.includes(r.actionId))throw new Error("Create/Improve mutation must preserve identity, advance one revision and record its action.");return yt.parse(await this.client.request({contractVersion:b,requestId:r.actionId,operation:"create-improve/execute",params:{action:"mutate",mutation:r,next:i}}))}};import{randomUUID as It}from"node:crypto";async function L(n,e){let t=n;for(;;)try{return await e(t)}catch(r){if(!Rt(r)||t<=1)throw r;t=Math.max(1,Math.floor(t/2))}}l(L,"hostedBoundedPage");function Rt(n){return n instanceof Error?n.message==="Host storage response is too large."||n.message==="Host storage request failed: host_storage_response_too_large":!1}l(Rt,"isOversizeResponse");var Tt=o.object({entries:o.array(o.object({sequence:o.number().int().positive(),event:$})).max(200),totalMatchingEvents:o.number().int().nonnegative(),remainingMatchingEvents:o.number().int().nonnegative()}).strict(),z=class{constructor(e){this.client=e}client;static{l(this,"HostedRuntimeEventStorage")}async runtimeEventsForSession(e,t={}){let r=t.limit==null?1e4:Math.max(0,Math.trunc(t.limit));if(r===0)return[];let s=Math.min(r,1e4),i=[],a=Math.max(0,t.afterSequence??0),c=0,p=t.names?new Set(t.names):null;for(;i.length<=s;){let u=await this.runtimeEventPageRows({sessionId:e,afterSequence:a,beforeSequence:null,limit:Math.min(200,s+1-i.length),excludeReasoningDeltas:t.excludeReasoningDeltas});for(let m of u.entries){if(m.sequence<=a)throw new Error("Host event cursor did not advance.");if(a=m.sequence,c+=1,c>1e4)throw new Error("Hosted runtime event scan exceeds 10,000 rows; use a narrower query.");(!p||p.has(m.event.name))&&i.push(m.event)}if(u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break}if(i.length>s||t.limit==null&&r===1e4&&i.length===s)throw new Error("Hosted runtime event read exceeds 10,000 rows; use a bounded cursor query.");return i}async persistedRuntimeEventsForSession(e,t={}){return this.runtimeEventsForSession(e,t)}async appendRuntimeEvent(e){let t=$.parse(e),r=await this.client.request({contractVersion:b,requestId:t.id,operation:"event/append",params:{event:t}});return o.object({event:$}).strict().parse(r).event}async runtimeEventPageRows(e){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit))),r=Math.max(0,Math.trunc(e.afterSequence)),s=e.beforeSequence,i=[],a=0,c=0;for(;i.length<t;){let p=Math.min(200,t-i.length),u=await L(p,async m=>Tt.parse(await this.client.request({contractVersion:b,requestId:`event-page:${It()}`,operation:"events/page",params:{sessionId:e.sessionId,afterSequence:r,beforeSequence:s,limit:m,...e.excludeReasoningDeltas?{excludeReasoningDeltas:!0}:{}}})));if(i.length===0&&(a=u.totalMatchingEvents,c=u.remainingMatchingEvents),i=s===null?[...i,...u.entries]:[...u.entries,...i],u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break;if(s===null){let m=u.entries.at(-1).sequence;if(m<=r)throw new Error("Host event cursor did not advance.");r=m}else{let m=u.entries[0].sequence;if(m>=s)throw new Error("Host event cursor did not advance.");s=m}}return{entries:i,totalMatchingEvents:a,remainingMatchingEvents:c}}};import{randomUUID as T}from"node:crypto";var Ke=o.object({revision:o.number().int().min(1),session:F}).strict(),Ye=o.object({revision:o.number().int().min(1),turn:N}).strict(),Pt=o.object({sessions:o.array(F).max(200),nextAfterId:o.string().min(1).nullable()}).strict(),xt=o.object({turns:o.array(N).max(200),nextBeforeSortIndex:o.number().int().nonnegative().nullable()}).strict(),K=class{constructor(e){this.client=e}client;static{l(this,"HostedSessionStorage")}async count(){let e=await this.client.request({contractVersion:b,requestId:T(),operation:"session/count",params:{}});return o.object({count:o.number().int().nonnegative()}).strict().parse(e).count}async get(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"session/get",params:{sessionId:e}});return t===null?null:Ke.parse(t)}async sessionCount(){return this.count()}async sessionShells(){let e=[],t=null;do{let r=await L(Math.min(10,1001-e.length),async s=>Pt.parse(await this.client.request({contractVersion:b,requestId:T(),operation:"session/page",params:{afterId:t,limit:s}})));if(e.push(...r.sessions),e.length>1e3)throw new Error("Hosted session list exceeds 1,000 rows; use a scoped page query.");if(r.nextAfterId!==null&&(r.sessions.length===0||t!==null&&r.nextAfterId<=t))throw new Error("Host session cursor did not advance.");t=r.nextAfterId}while(t!==null);return e}async getSession(e){return(await this.get(e))?.session??null}async insertSessionAtFront(e){await this.put({session:e,expectedRevision:null,requestId:T()})}async updateSession(e,t){let r=await this.get(e);if(!r)return null;let s=F.parse(t(r.session));if(s.id!==e)throw new Error("A session update cannot change its identity.");return(await this.put({session:s,expectedRevision:r.revision,requestId:T()})).session}async put(e){let t=F.parse(e.session);return Ke.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"session/put",params:{sessionId:t.id,expectedRevision:e.expectedRevision,session:t}}))}async readTurn(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/get",params:{turnId:e}});return t===null?null:Ye.parse(t)}async getTurn(e){return(await this.readTurn(e))?.turn??null}async turnsForSession(e,t=50){let r=Math.max(1,Math.min(1e3,Math.trunc(t))),s=[],i=null;for(;s.length<r;){let a=await L(Math.min(200,r-s.length),async c=>xt.parse(await this.client.request({contractVersion:b,requestId:T(),operation:"turn/page",params:{sessionId:e,beforeSortIndex:i,limit:c}})));if(s.push(...a.turns),a.nextBeforeSortIndex===null)break;if(i!==null&&a.nextBeforeSortIndex>=i)throw new Error("Host turn cursor did not advance.");i=a.nextBeforeSortIndex}return s}async countTurnsForSession(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/count",params:{sessionId:e}});return o.object({count:o.number().int().nonnegative()}).strict().parse(t).count}async hasSubagentParentWakeTurn(e,t){return await this.wakeCount(e,"messageId",t)>0}async countSubagentParentWakeTurns(e,t){return this.wakeCount(e,"fromRunId",t)}async latestAssistantTextForSession(e){let t=await this.client.request({contractVersion:b,requestId:T(),operation:"events/latestAssistantText",params:{sessionId:e}});return o.object({text:o.string().nullable()}).strict().parse(t).text}async wakeCount(e,t,r){let s=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/wakeCount",params:{sessionId:e,key:t,value:r}});return o.object({count:o.number().int().nonnegative()}).strict().parse(s).count}async latestTurnForSession(e,t){let r=await this.client.request({contractVersion:b,requestId:T(),operation:"turn/latest",params:{sessionId:e,status:t??null}});return r===null?null:N.parse(r)}async latestPersistedTurnForSession(e,t){return this.latestTurnForSession(e,t)}async insertTurn(e){await this.putTurn({turn:e,expectedRevision:null,requestId:T()})}async updateTurn(e,t){let r=await this.readTurn(e);if(!r)return null;let s=N.parse(t(r.turn));if(s.id!==e||s.sessionId!==r.turn.sessionId)throw new Error("A turn update cannot change its identity.");return(await this.putTurn({turn:s,expectedRevision:r.revision,requestId:T()})).turn}async putTurn(e){let t=N.parse(e.turn);return Ye.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"turn/put",params:{sessionId:t.sessionId,turnId:t.id,expectedRevision:e.expectedRevision,turn:t}}))}};import{createHash as Et,randomUUID as kt}from"node:crypto";var k=o.object({ok:o.literal(!0)}).strict(),Y=o.array(H),Ct=o.array(o.string()),At=o.object({turnId:o.string(),run:M}).strict(),Ot=o.object({inputs:o.array(H).max(10),hasMore:o.boolean()}).strict(),_t=o.object({items:o.array(W).max(10),hasMore:o.boolean()}).strict(),Ht=o.object({items:o.array(o.string()).max(200),hasMore:o.boolean()}).strict();function X(n,e){return`inbox:${n}:${Et("sha256").update(JSON.stringify(e)).digest("hex")}`}l(X,"retryKey");function Xe(n){if(n.senderKind==="ponder"||n.payload.ponderDesktop!==void 0)throw new Error("A desktop Pal operation must be admitted on its originating local installation.");return{...n,senderKind:n.senderKind}}l(Xe,"hostedInput");var q=class{constructor(e){this.client=e}client;static{l(this,"HostedTaskInboxStorage")}async call(e,t,r=kt()){let s=await this.client.request({contractVersion:b,requestId:r,operation:"task-inbox/execute",params:e});return t.parse(s)}async inputPages(e,t=Number.MAX_SAFE_INTEGER){let r=[],s=0;for(;r.length<t;){let i=await this.call(e(s),Ot);for(let a of i.inputs){if(a.sequence<=s)throw new Error("Host task input cursor did not advance.");if(s=a.sequence,r.push(a),r.length>=t)break}if(!i.hasMore)return r;if(i.inputs.length===0)throw new Error("Host task input page made no progress.")}return r}async recoverTaskInboxOwners(e){return this.call({action:"recoverTaskInboxOwners",ownerId:e},o.array(o.object({sessionId:o.string(),turnId:o.string()}).strict()))}async hasTaskCompletion(e){return this.call({action:"hasTaskCompletion",turnId:e},o.boolean())}async taskInboxSnapshot(e){let t=await this.call({action:"taskInboxSnapshot",sessionId:e},Pe),[r,s]=await Promise.all([this.inputPages(i=>({action:"taskInboxSnapshotInputs",sessionId:e,afterSequence:i})),this.taskWaitsForSession(e)]);return{...t,inputs:r,waits:s}}async declareTaskWork(e,t,r,s){await this.call({action:"declareTaskWork",sessionId:e,turnId:t,ownerId:r,areas:s},k)}async taskWorkAreas(e){return this.call({action:"taskWorkAreas",sessionId:e},Ct)}async admitTaskInput(e){return this.call({action:"admitTaskInput",input:Xe(e)},H)}async admitTaskInputs(e){return this.call({action:"admitTaskInputs",inputs:e.map(Xe)},Y)}async rejectTaskInput(e,t){await this.call({action:"rejectTaskInput",id:e,error:t},k)}async getTaskInput(e){return this.call({action:"getTaskInput",id:e},H.nullable())}async taskInputsForSession(e,t={}){let r=Math.max(1,Math.min(500,t.limit??128)),s=[],i=t.afterSequence??0;for(;s.length<r;){let a=Math.min(10,r-s.length),c=await this.call({action:"taskInputsForSession",sessionId:e,query:{afterSequence:i,pendingOnly:t.pendingOnly,limit:a}},Y);if(!c.length)break;for(let p of c){if(p.sequence<=i)throw new Error("Host task input cursor did not advance.");i=p.sequence,s.push(p)}if(c.length<a)break}return s}async mutateTaskInput(e,t,r){return this.call({action:"mutateTaskInput",sessionId:e,inputId:t,change:r},H,X("mutate",{sessionId:e,inputId:t,change:r}))}async openTaskInboxTurn(e,t,r){await this.call({action:"openTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k,X("open",{sessionId:e,turnId:t,ownerId:r}))}async renewTaskInboxTurn(e,t,r){await this.call({action:"renewTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k)}async pendingTaskInputs(e,t){return this.inputPages(r=>({action:"pendingTaskInputs",sessionId:e,turnId:t,afterSequence:r}))}async taskAssignmentInputs(e){return this.inputPages(t=>({action:"taskAssignmentInputs",turnId:e,afterSequence:t}))}async pauseTaskInboxTurn(e,t,r){await this.call({action:"pauseTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},k)}async includeTaskInputs(e,t,r,s){return this.call({action:"includeTaskInputs",sessionId:e,turnId:t,ownerId:r,requestId:s},Y,X("include",{sessionId:e,turnId:t,ownerId:r,requestId:s}))}async settleTaskInputRequest(e,t){await this.call({action:"settleTaskInputRequest",requestId:e,outcome:t},k)}async sealTaskInboxTurn(e,t,r){return this.call({action:"sealTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},o.boolean())}async sealNativeTaskInboxTurn(e,t,r){return this.call({action:"sealNativeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},Y)}async closeTaskInboxTurn(e,t,r,s){await this.call({action:"closeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r,outcome:s},k)}async taskInboxPaused(e){return this.call({action:"taskInboxPaused",sessionId:e},o.boolean())}async reserveTaskFollowup(e,t,r){return this.call({action:"reserveTaskFollowup",sessionId:e,turnId:t,ownerId:r},H.nullable(),X("reserve",{sessionId:e,turnId:t,ownerId:r}))}async taskInboxWakeTargets(){let e=[],t="";for(;;){let r=await this.call({action:"taskInboxWakeTargets",afterSessionId:t},Ht);for(let s of r.items){if(s<=t)throw new Error("Host task wake cursor did not advance.");t=s,e.push(s)}if(!r.hasMore)return e;if(!r.items.length)throw new Error("Host task wake page made no progress.")}}async createTaskWait(e){return this.call({action:"createTaskWait",value:e},W)}async settleTaskWait(e,t){return this.call({action:"settleTaskWait",id:e,state:t},W)}async taskWaitsForSession(e){let t=[],r="";for(;;){let s=await this.call({action:"taskWaitsForSession",sessionId:e,afterId:r},_t);for(let i of s.items){if(i.id<=r)throw new Error("Host task wait cursor did not advance.");r=i.id,t.push(i)}if(!s.hasMore)return t;if(!s.items.length)throw new Error("Host task wait page made no progress.")}}async commitSubagentCompletion(e,t){await this.call({action:"commitSubagentCompletion",value:e,turnId:t},k)}async pendingTaskCompletions(e=""){let t=[],r=e;for(;t.length<100;){let s=await this.call({action:"pendingTaskCompletions",afterTurnId:r},o.array(At).max(10));for(let i of s){if(i.turnId<=r)throw new Error("Host task completion cursor did not advance.");r=i.turnId,t.push(i)}if(s.length<10)break}return t}async settleTaskCompletion(e,t){await this.call({action:"settleTaskCompletion",turnId:e,inputId:t},k)}async upsertSubagentRun(e){return this.call({action:"upsertSubagentRun",value:M.parse(e)},M)}async getSubagentRun(e){return this.call({action:"getSubagentRun",id:e},M.nullable())}async listSubagentRuns(e={}){let r=[],s="",i=e.status?Array.isArray(e.status)?[...e.status]:[e.status]:null;for(;;){let a=await this.call({action:"listSubagentRuns",query:{parentSessionId:e.parentSessionId,childSessionId:e.childSessionId,status:i,afterId:s,limit:10}},o.array(M).max(10));for(let c of a){if(c.id<=s)throw new Error("Host subagent run cursor did not advance.");if(s=c.id,r.push(c),r.length>1e3)throw new Error("Hosted subagent run list exceeds 1,000 rows; use a narrower session or status query.")}if(a.length<10)break}return r.sort((a,c)=>(c.updatedAt??c.createdAt).localeCompare(a.updatedAt??a.createdAt)),e.limit===void 0?r:r.slice(0,Math.max(1,Math.min(1e3,e.limit)))}async listActiveSubagentRuns(e={}){return this.listSubagentRuns({...e,status:e.status??["queued","running","needs_resume"]})}};var se=class extends q{static{l(this,"HostedTurnRepository")}sessions;events;approvals;usage;createImprove;constructor(e){super(e),this.sessions=new K(e),this.events=new z(e),this.approvals=new qe(e),this.usage=new De(e),this.createImprove=new J(e)}sessionShells(){return this.sessions.sessionShells()}sessionCount(){return this.sessions.sessionCount()}getSession(e){return this.sessions.getSession(e)}insertSessionAtFront(e){return this.sessions.insertSessionAtFront(e)}updateSession(e,t){return this.sessions.updateSession(e,t)}getTurn(e){return this.sessions.getTurn(e)}insertTurn(e){return this.sessions.insertTurn(e)}updateTurn(e,t){return this.sessions.updateTurn(e,t)}latestTurnForSession(e,t){return this.sessions.latestTurnForSession(e,t)}latestPersistedTurnForSession(e,t){return this.sessions.latestPersistedTurnForSession(e,t)}turnsForSession(e,t){return this.sessions.turnsForSession(e,t)}countTurnsForSession(e){return this.sessions.countTurnsForSession(e)}hasSubagentParentWakeTurn(e,t){return this.sessions.hasSubagentParentWakeTurn(e,t)}countSubagentParentWakeTurns(e,t){return this.sessions.countSubagentParentWakeTurns(e,t)}latestAssistantTextForSession(e){return this.sessions.latestAssistantTextForSession(e)}appendRuntimeEvent(e){return this.events.appendRuntimeEvent(e)}runtimeEventsForSession(e,t){return this.events.runtimeEventsForSession(e,t)}persistedRuntimeEventsForSession(e,t){return this.events.persistedRuntimeEventsForSession(e,t)}async runtimeEventsForTurn(e,t){let r=await this.getTurn(e);if(!r)return[];let s=(await this.events.runtimeEventsForSession(r.sessionId)).filter(i=>i.turnId===e&&(!t?.names||t.names.includes(i.name)));return t?.limit==null?s:s.slice(0,Math.max(0,t.limit))}runtimeEventPageRows(e){return this.events.runtimeEventPageRows(e)}getApproval(e){return this.approvals.getApproval(e)}async upsertApproval(e){let t=await this.approvals.readApproval(e.id);t&&JSON.stringify(t.approval)===JSON.stringify(e)||await this.approvals.putApproval({approval:e,expectedRevision:t?.revision??null,requestId:`approval:${Ut("sha256").update(JSON.stringify({approval:e,revision:t?.revision??null})).digest("hex")}`})}upsertModelUsageRecord(e){return this.usage.upsertModelUsageRecord(e)}listModelUsageRecords(e){return this.usage.listModelUsageRecords(e)}getCreateImproveRun(e){return this.createImprove.getCreateImproveRun(e)}listCreateImproveRuns(e){return this.createImprove.listCreateImproveRuns(e)}upsertCreateImproveRun(e){return this.createImprove.upsertCreateImproveRun(e)}mutateCreateImproveRun(e,t){return this.createImprove.mutateCreateImproveRun(e,t)}};function Ze(n){return new se(n)}l(Ze,"createHostedRuntimeCoreStorage");function oe(n=process.env){let e=n.OPENPOND_API_KEY?.trim(),t=n.OPENPOND_OPCHAT_API_URL?.trim(),r=n.OPENPOND_HOSTED_MODEL_ID?.trim();if(!e||!t||!r)throw new Error("Hosted model stream requires a host credential, API URL, and admitted model.");let s=new URL(t);if(s.protocol!=="https:"||s.username||s.password||s.search||s.hash)throw new Error("Hosted model stream API URL is invalid.");return l(async function*(a){if(a.model!==r)throw new Error("Hosted model selection changed outside host admission.");yield*Ae({...a,apiBaseUrl:s.toString(),token:e,model:r})},"streamHostedModel")}l(oe,"createHostedModelStreamFromEnvironment");import{existsSync as Mt}from"node:fs";import{lstat as Nt,readFile as qt,realpath as Dt}from"node:fs/promises";import y from"node:path";import{fileURLToPath as Bt}from"node:url";var Qe=y.dirname(Bt(import.meta.url));function R(n,e,t){let r=n[e+1];if(!r||r.startsWith("--"))throw new Error(`${t} requires a value.`);return r}l(R,"requireValue");function et(n,e){let t=Number.parseInt(n,10);if(!Number.isFinite(t)||t<0||t>65535)throw new Error(`${e} must be a port from 0 to 65535.`);return t}l(et,"parsePort");function nt(n){let e="serve",t=Q,r=17874,s=null,i=!1,a=!1,c=null,p,u=!1,m,w,I,C=null,f=null,h=null,S=null,P,v="sqlite_bundle",A=0,E=n[0];if(E&&!E.startsWith("-")){if(E==="serve"||E==="server")e="serve";else if(E==="app-server")e="app-server";else if(E==="web")e="web";else{if(E==="help")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,help:!0};throw new Error(`Unknown command: ${E}`)}A=1}for(let g=A;g<n.length;g+=1){let d=n[g];if(d==="--help"||d==="-h")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,help:!0};if(d==="--listen"){let O=Ce(R(n,g,d));t=O.host,r=et(String(O.port),d),g+=1}else if(d==="--hostname"||d==="--host")t=R(n,g,d),g+=1;else if(d==="--port")r=et(R(n,g,d),d),g+=1;else if(d==="--web-root")s=y.resolve(R(n,g,d)),g+=1;else if(d==="--source-browser-state")I=y.resolve(R(n,g,d)),g+=1;else{if(d==="--store-dir")throw new Error("--store-dir has been replaced by --home. Use --home <directory> or OPENPOND_HOME.");if(d==="--home")c=y.resolve(R(n,g,d)),g+=1;else if(d==="--hosted-cache-home")p=y.resolve(R(n,g,d)),g+=1;else if(d==="--experiment-owner")u=!0;else if(d==="--experiment-harness-package"){if(m)throw new Error("Duplicate Experiment Harness source package.");m=y.resolve(R(n,g,d)),g+=1}else if(d==="--runtime-storage"){if(R(n,g,d)!=="hosted-postgres")throw new Error("Unsupported app-server runtime storage.");v="hosted_postgres",g+=1}else if(d==="--profile-external-dataset-package"){if(w)throw new Error("Duplicate private external Dataset package.");w=y.resolve(R(n,g,d)),g+=1}else if(d==="--profile-source-root")C=y.resolve(R(n,g,d)),g+=1;else if(d==="--profile-repository-id")f=R(n,g,d),g+=1;else if(d==="--profile-id")h=R(n,g,d),g+=1;else if(d==="--profile-revision")S=R(n,g,d),g+=1;else if(d==="--hosted-profile-release"){if(P)throw new Error("Duplicate hosted Profile release descriptor.");let O=R(n,g,d);if(O.length>16e3||!/^[A-Za-z0-9_-]+$/.test(O))throw new Error("Invalid hosted Profile release descriptor.");try{P=Ne.parse(JSON.parse(Buffer.from(O,"base64url").toString("utf8")))}catch{throw new Error("Invalid hosted Profile release descriptor.")}g+=1}else if(d==="--open-browser")i=!0;else if(d==="--print-access-url")a=!0;else throw new Error(`Unknown option: ${d}`)}}if(i&&a)throw new Error("--open-browser and --print-access-url cannot be used together.");if(e!=="web"&&(i||a))throw new Error("Browser options are only available in web mode.");let D=[C,f,h,S].filter(Boolean).length;if(D&&(D!==4||e!=="app-server"))throw new Error("Profile source flags require app-server mode and --profile-source-root, --profile-repository-id, --profile-id, and --profile-revision together.");if(v==="hosted_postgres"&&(e!=="app-server"||c||D))throw new Error("Hosted Postgres app-server cannot use --home or local Profile source flags.");if(P&&v!=="hosted_postgres")throw new Error("Hosted Profile release requires hosted Postgres app-server mode.");if(p&&v!=="hosted_postgres")throw new Error("Hosted cache home requires hosted Postgres mode.");if(u&&(e!=="app-server"||v!=="sqlite_bundle"||D||!c))throw new Error("Experiment owner mode requires an isolated app-server home without Profile selection.");if(m&&(!u||y.dirname(m)!==c))throw new Error("Experiment Harness source must be provisioned directly inside its isolated owner home.");return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:a,storeDir:c,runtimeStorage:v,sourceBrowserState:I,...w?{profileExternalDatasetPackage:w}:{},...D?{profileSource:{repoPath:C,repositoryId:f,profileId:h,sourceRevision:S}}:{},...P?{admittedProfileRelease:P}:{},...p?{hostedCacheHome:p}:{},...u?{experimentOwner:!0}:{},...m?{experimentHarnessPackage:m}:{},help:!1}}l(nt,"parseCliArgs");function Ft(){return[process.env.OPENPOND_WEB_ROOT,y.resolve(process.cwd(),"apps/web/dist"),y.resolve(Qe,"../../web/dist"),y.resolve(process.cwd(),"web"),y.resolve(Qe,"../web")].filter(n=>!!n)}l(Ft,"defaultWebRootCandidates");function jt(n){let e=n?[n]:Ft();for(let t of e){let r=y.resolve(t);if(Mt(y.join(r,"index.html")))return r}return null}l(jt,"resolveWebRoot");function Lt(n){let e=n==="0.0.0.0"||n==="::"?"127.0.0.1":n;return e.includes(":")&&!e.startsWith("[")?`[${e}]`:e}l(Lt,"formatHostForUrl");function Vt(n){return`http://${Lt(n.status.host)}:${n.status.port}`}l(Vt,"browserBaseUrl");function $t(n,e){let t=new URL(n),r=new URLSearchParams;return r.set("openpondServerUrl",n),r.set("openpondToken",e),t.hash=r.toString(),t.toString()}l($t,"tokenizedWebUrl");async function tt(n,e=He){let t=$t(n.baseUrl,n.token);if(n.printAccessUrl)return{stdout:[`OpenPond access URL: ${t}`],stderr:[]};if(!n.openBrowser)return{stdout:[`OpenPond web UI: ${n.baseUrl}`],stderr:[]};let r=await e(t);return r.opened?{stdout:[`Opened OpenPond in your browser: ${n.baseUrl}`],stderr:[]}:{stdout:[`OpenPond access URL: ${t}`],stderr:[`Could not open the system browser: ${r.error}`]}}l(tt,"resolveWebLaunchMessages");function st(){console.log(`Usage:
24
24
  openpond-app-server serve [--hostname HOST] [--port PORT]
25
25
  openpond-app-server app-server [--home DIR]
26
26
  openpond-app-server web [--hostname HOST] [--port PORT] [--web-root DIR]
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{j as sr,v as Bt}from"./chunk-V67IFV26.js";import{a as et}from"./chunk-HIYQPZ7C.js";import{a as tt}from"./chunk-CLFYRN46.js";import{b as at}from"./chunk-ELYRVTTG.js";import{a as or}from"./chunk-AKGCM53D.js";import{a as nr}from"./chunk-FEAKTSRS.js";import{d as Ze}from"./chunk-VZXZ6CHS.js";import{b as Ye}from"./chunk-PAZDQRYU.js";import{a as tr,e as ar,f as rr}from"./chunk-MLTKB5G3.js";import{c as Za,e as He}from"./chunk-TTN63EAM.js";import{a as Mt}from"./chunk-IZ6DLEVY.js";import{a as Ka,b as _e,c as Xa,d as Oe,g as Xe,l as Qe,m as se,n as Ya}from"./chunk-MHYI7ATG.js";import{a as Ga}from"./chunk-RPOD6I64.js";import{a as er}from"./chunk-7KWD2I6W.js";import{c as Fa,y as $a}from"./chunk-3DVWJCOA.js";import{g as he}from"./chunk-FJ3HMHT6.js";import{e as Ra}from"./chunk-MWXW2CA6.js";import{b as Da}from"./chunk-L3KS6MOV.js";import{a as Qa}from"./chunk-IZ56L2ZK.js";import{a as Ct}from"./chunk-WBUK73ST.js";import{A as F,B as Ke,u as Ja,y as Ge}from"./chunk-LNRFRAV5.js";import{a as za,c as Se,d as Je,f as Ua,l as La,p as Va,r as Wa}from"./chunk-CQF6QZEL.js";import{r as Be}from"./chunk-D5ADDBS5.js";import{b as pa,d as fa,e as ha}from"./chunk-CN5OXQ7A.js";import{a as Le,e as ca,f as la,g as ma,h as ua}from"./chunk-OZ6LRNRE.js";import{f as Na}from"./chunk-WFVOG5PU.js";import{Qb as qa,_ as Oa,ha as ja,ta as Me,za as Tt}from"./chunk-M4ZRCRJM.js";import{f as Ha}from"./chunk-LAOLJDVB.js";import{k as ga}from"./chunk-UWHIU24L.js";import{G as We,H as Ea,L as Aa,R as xa,S as Pa,T as Ta,ba as Ca,e as Ia,f as Ve,ga as Ma,n as Sa,pa as Ba,ra as _a}from"./chunk-M6JRS5PA.js";import{Z as da}from"./chunk-KK626T3Z.js";import{M as sa}from"./chunk-6DCXAXVD.js";import{m as ia}from"./chunk-UGOK7VTC.js";import{Da as ba,Pb as Ie,Qb as ya,b as ka}from"./chunk-PBZCXPPC.js";import{r as wa,s as va}from"./chunk-NJLULBTM.js";import{i as oa,l as re,m as fe,n as v}from"./chunk-VVNV4NNW.js";import{A as M}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";import{execFile as Wr}from"node:child_process";import{readFile as Jr}from"node:fs/promises";import{promisify as Gr}from"node:util";var Kr=5,Xr=20*1024*1024,ir=4e4,Ot=Gr(Wr);function Zn(e){return async({grader:t,task:a,attempt:n})=>{let s=[],o=0,i=await Qr({store:e.store,attempt:n}),d=n.modelRef?.providerId===t.judge.providerId&&n.modelRef.modelId===t.judge.modelId?sr(n.metadata.hostedTokenPricing)??void 0:void 0,g=await e.modelText({model:t.judge,hostedTokenPricing:d,signal:new AbortController().signal,requestId:`task-judge:${n.id}:${t.id}`,onUsage:h((m,r)=>{s.push(m),typeof r=="number"&&Number.isFinite(r)&&r>=0&&(o+=r)},"onUsage"),messages:[{role:"system",content:`Apply this rubric and return JSON only with score (0..1), passed, and feedback.
2
+ import{j as sr,v as Bt}from"./chunk-ERT32RZA.js";import{a as tt}from"./chunk-H6C4MAUN.js";import{b as at}from"./chunk-JORRZ4BB.js";import{a as or}from"./chunk-AKGCM53D.js";import{a as nr}from"./chunk-FEAKTSRS.js";import{a as et}from"./chunk-HIYQPZ7C.js";import{d as Ze}from"./chunk-W2TICQ62.js";import{b as Ye}from"./chunk-NZTCH6K5.js";import{a as tr,e as ar,f as rr}from"./chunk-4SZ3HKHU.js";import{a as Mt}from"./chunk-IZ6DLEVY.js";import{a as Ga}from"./chunk-EZRUWIP6.js";import{c as Za,e as He}from"./chunk-AH26AQN7.js";import{a as Ka,b as _e,c as Xa,d as Oe,g as Xe,l as Qe,m as se,n as Ya}from"./chunk-LK2K3SPM.js";import{a as er}from"./chunk-7KWD2I6W.js";import{c as Fa,y as $a}from"./chunk-B4RKHHF7.js";import{g as he}from"./chunk-LKKMLBOH.js";import{x as Be}from"./chunk-M3FLEZ4E.js";import{a as Ct}from"./chunk-WBUK73ST.js";import{A as F,B as Ke,u as Ja,y as Ge}from"./chunk-GS6ZUSIN.js";import{a as za,c as Se,d as Je,f as Ua,l as La,p as Va,r as Wa}from"./chunk-OG33QAG6.js";import{e as Ra}from"./chunk-MWXW2CA6.js";import{b as Da}from"./chunk-L3KS6MOV.js";import{a as Qa}from"./chunk-IZ56L2ZK.js";import{b as pa,d as fa,e as ha}from"./chunk-3YXYBYWK.js";import{a as Le,e as ca,f as la,g as ma,h as ua}from"./chunk-MPNJ2BB4.js";import{f as Na}from"./chunk-V7KR74NO.js";import{Ca as Tt,Ub as qa,aa as Oa,ja,wa as Me}from"./chunk-YNQWJWIC.js";import{f as Ha}from"./chunk-LAOLJDVB.js";import{k as ga}from"./chunk-UWHIU24L.js";import{G as We,H as Ea,L as Aa,R as xa,S as Pa,T as Ta,ba as Ca,e as Ia,f as Ve,ga as Ma,n as Sa,pa as Ba,ra as _a}from"./chunk-ABF3W2MO.js";import{Z as da}from"./chunk-2EPR4HLF.js";import{M as sa}from"./chunk-BKEDG3A4.js";import{m as ia}from"./chunk-UGOK7VTC.js";import{Da as ba,Pb as Ie,Qb as ya,b as ka}from"./chunk-PBZCXPPC.js";import{r as wa,s as va}from"./chunk-NJLULBTM.js";import{i as oa,l as re,m as fe,n as v}from"./chunk-VVNV4NNW.js";import{A as M}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";import{execFile as Wr}from"node:child_process";import{readFile as Jr}from"node:fs/promises";import{promisify as Gr}from"node:util";var Kr=5,Xr=20*1024*1024,ir=4e4,Ot=Gr(Wr);function Zn(e){return async({grader:t,task:a,attempt:n})=>{let s=[],o=0,i=await Qr({store:e.store,attempt:n}),d=n.modelRef?.providerId===t.judge.providerId&&n.modelRef.modelId===t.judge.modelId?sr(n.metadata.hostedTokenPricing)??void 0:void 0,g=await e.modelText({model:t.judge,hostedTokenPricing:d,signal:new AbortController().signal,requestId:`task-judge:${n.id}:${t.id}`,onUsage:h((m,r)=>{s.push(m),typeof r=="number"&&Number.isFinite(r)&&r>=0&&(o+=r)},"onUsage"),messages:[{role:"system",content:`Apply this rubric and return JSON only with score (0..1), passed, and feedback.
3
3
 
4
4
  ${t.rubric}`},{role:"user",content:JSON.stringify({input:a.input,expectedOutput:a.expectedOutput,output:n.output,artifactEvidence:i})}]}),f=rr(g);if(!f)throw new Error("Model judge returned invalid structured output.");return{...f,usage:s,...o>0?{costUsd:o}:{}}}}h(Zn,"createTaskAttemptModelJudge");async function Qr(e){let t=(await e.store.listTaskAttemptArtifacts({attemptId:e.attempt.id})).filter(a=>a.kind==="output_artifact").slice(0,Kr);return Promise.all(t.map(async a=>{let n={artifactId:a.id,mediaType:a.mediaType??null,sha256:a.sha256,sizeBytes:a.sizeBytes,requiredOutputPath:typeof a.metadata.requiredOutputPath=="string"?a.metadata.requiredOutputPath:null};if(a.sizeBytes>Xr)return{...n,extraction:"omitted",reason:"artifact exceeds inspection bound"};try{if(a.mediaType==="application/pdf"){let{stdout:s}=await Ot("pdftotext",[a.path,"-"],{env:{...process.env,PATH:Mt()},maxBuffer:8388608,timeout:15e3});return{...n,extraction:"pdf_text",content:_t(s)}}if(Zr(a.mediaType)){let s=await en(a.path,a.mediaType);return{...n,extraction:"open_xml_text",content:_t(s.content),structure:s.structure}}return Yr(a.mediaType)?{...n,extraction:"text",content:_t(await Jr(a.path,"utf8"))}:{...n,extraction:"metadata_only"}}catch(s){return{...n,extraction:"unavailable",reason:s instanceof Error?s.message.slice(0,500):String(s).slice(0,500)}}}))}h(Qr,"loadTaskAttemptGraderEvidence");function Yr(e){return!!(e?.startsWith("text/")||e==="application/json"||e==="application/javascript"||e==="application/sql"||e==="application/xml"||e==="application/yaml")}h(Yr,"isTextArtifact");function Zr(e){return e==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||e==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"||e==="application/vnd.openxmlformats-officedocument.presentationml.presentation"}h(Zr,"isOpenXmlArtifact");async function en(e,t){let a={env:{...process.env,PATH:Mt()},maxBuffer:16777216,timeout:15e3},{stdout:n}=await Ot("unzip",["-Z1",e],a),s=n.split(/\r?\n/).filter(Boolean),o=tn(s,t).slice(0,250),i=[];for(let d of o){let{stdout:g}=await Ot("unzip",["-p",e,d],a),f=rn(g);f&&i.push(`[${d}]
5
5
  ${f}`)}return{content:i.join(`