openpond 0.2.61 → 0.2.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/README.md +2 -0
  2. package/dist/app-server.d.ts +4713 -477
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/{acp-FUAWCKBH.js → acp-H3MJCPHX.js} +1 -1
  5. package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-DWA7272M.js} +1 -1
  6. package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
  7. package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-K7H2WJ56.js} +1 -1
  8. package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +2 -0
  9. package/dist/chunks/{app-server-evaluations-HAAYVEXB.js → app-server-evaluations-XGMGS67X.js} +1 -1
  10. package/dist/chunks/app-server-harness-services-BHD6S5II.js +2 -0
  11. package/dist/chunks/app-server-runtime-LFIL6F7D.js +2 -0
  12. package/dist/chunks/apps-QKAHJGQ4.js +2 -0
  13. package/dist/chunks/chunk-25XXZS3E.js +2 -0
  14. package/dist/chunks/chunk-27JGS3KB.js +12 -0
  15. package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
  16. package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-2HAWOMZK.js} +1 -1
  17. package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
  18. package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
  19. package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
  20. package/dist/chunks/{chunk-LHENAWLH.js → chunk-42V4NV2F.js} +1 -1
  21. package/dist/chunks/{chunk-DW3GJRY3.js → chunk-4FNCBA3Y.js} +1 -1
  22. package/dist/chunks/{chunk-TXBIZDXG.js → chunk-4L6DU6Z2.js} +1 -1
  23. package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
  24. package/dist/chunks/{chunk-MLTKB5G3.js → chunk-4SZ3HKHU.js} +1 -1
  25. package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
  26. package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
  27. package/dist/chunks/chunk-5FU5RLML.js +2 -0
  28. package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-5MHYGMJG.js} +1 -1
  29. package/dist/chunks/chunk-6EBCS57F.js +2 -0
  30. package/dist/chunks/chunk-6RS4NAOY.js +2 -0
  31. package/dist/chunks/chunk-6XSSM4WT.js +3 -0
  32. package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
  33. package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
  34. package/dist/chunks/{chunk-BQUWZRWU.js → chunk-7WYL2IDD.js} +1 -1
  35. package/dist/chunks/chunk-7YLXGILH.js +2 -0
  36. package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
  37. package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
  38. package/dist/chunks/{chunk-TTN63EAM.js → chunk-AH26AQN7.js} +1 -1
  39. package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
  40. package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
  41. package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
  42. package/dist/chunks/chunk-B5R53U74.js +2 -0
  43. package/dist/chunks/chunk-BKEDG3A4.js +22 -0
  44. package/dist/chunks/{chunk-CO3OJFPU.js → chunk-BPZOABMC.js} +1 -1
  45. package/dist/chunks/{chunk-5VPU7OS7.js → chunk-BSPFY3Y5.js} +1 -1
  46. package/dist/chunks/{chunk-U4HZD2GM.js → chunk-BU27SLZP.js} +2 -2
  47. package/dist/chunks/chunk-C2AXMKK4.js +2 -0
  48. package/dist/chunks/{chunk-SIV5P6JO.js → chunk-C2LAEGOW.js} +2 -2
  49. package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-CZ5R4JXZ.js} +1 -1
  50. package/dist/chunks/{chunk-D4JZALZ4.js → chunk-DABBHWSF.js} +1 -1
  51. package/dist/chunks/{chunk-ROE24PN5.js → chunk-DLANLLKH.js} +1 -1
  52. package/dist/chunks/{chunk-57RY3LSR.js → chunk-DQI5TE6A.js} +2 -2
  53. package/dist/chunks/chunk-DTTFUANI.js +12 -0
  54. package/dist/chunks/{chunk-VBW2X42G.js → chunk-DUL6DXOI.js} +1 -1
  55. package/dist/chunks/{chunk-OQUKSRU3.js → chunk-ELX7VRSU.js} +1 -1
  56. package/dist/chunks/chunk-ERL2M773.js +3 -0
  57. package/dist/chunks/chunk-ERT32RZA.js +86 -0
  58. package/dist/chunks/{chunk-RPOD6I64.js → chunk-EZRUWIP6.js} +1 -1
  59. package/dist/chunks/{chunk-MCIIGQT7.js → chunk-F6UQ6PPK.js} +1 -1
  60. package/dist/chunks/chunk-F7QTIHXX.js +2 -0
  61. package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
  62. package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FVRII5XO.js} +1 -1
  63. package/dist/chunks/{chunk-GEXKTGLY.js → chunk-FYYYECHE.js} +50 -48
  64. package/dist/chunks/chunk-G32BO6M5.js +4 -0
  65. package/dist/chunks/{chunk-TSAW2QVU.js → chunk-G6OR5NB6.js} +1 -1
  66. package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GGJUWIGR.js} +1 -1
  67. package/dist/chunks/{chunk-Q66LWQGF.js → chunk-GPL2Z65R.js} +1 -1
  68. package/dist/chunks/{chunk-LNRFRAV5.js → chunk-GS6ZUSIN.js} +2 -2
  69. package/dist/chunks/{chunk-OFVUN4KI.js → chunk-GVARQXYI.js} +1 -1
  70. package/dist/chunks/chunk-GXCUH2VV.js +17 -0
  71. package/dist/chunks/{chunk-IUGK6BBY.js → chunk-GXZCMO6S.js} +1 -1
  72. package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
  73. package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
  74. package/dist/chunks/{chunk-I3W27VK4.js → chunk-HUCBKXTU.js} +1 -1
  75. package/dist/chunks/{chunk-P4XM7LUT.js → chunk-IHB5GTOJ.js} +2 -2
  76. package/dist/chunks/{chunk-U447MS3Y.js → chunk-IWWXIUAQ.js} +1 -1
  77. package/dist/chunks/chunk-J572ANHX.js +13 -0
  78. package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-J7ZTPXRQ.js} +1 -1
  79. package/dist/chunks/chunk-JCLTFDVW.js +2 -0
  80. package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
  81. package/dist/chunks/{chunk-ELYRVTTG.js → chunk-JORRZ4BB.js} +1 -1
  82. package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
  83. package/dist/chunks/chunk-JSQRLLN6.js +2 -0
  84. package/dist/chunks/chunk-KCOTDUGW.js +2 -0
  85. package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
  86. package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
  87. package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
  88. package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LK2K3SPM.js} +2 -2
  89. package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-LKKMLBOH.js} +1 -1
  90. package/dist/chunks/{chunk-BNZTJPK7.js → chunk-LSZJ5M3X.js} +1 -1
  91. package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
  92. package/dist/chunks/{chunk-4LZLO4OW.js → chunk-M3SCON53.js} +1 -1
  93. package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
  94. package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
  95. package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
  96. package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-N33D7KCW.js} +1 -1
  97. package/dist/chunks/chunk-N42HT64M.js +2 -0
  98. package/dist/chunks/{chunk-L3GA2CQI.js → chunk-N4VHLJBZ.js} +1 -1
  99. package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
  100. package/dist/chunks/chunk-NG2L6D7G.js +2 -0
  101. package/dist/chunks/{chunk-7EAWLYYB.js → chunk-NLYZ5K7U.js} +2 -2
  102. package/dist/chunks/{chunk-B47JMAVW.js → chunk-NT7N6KLE.js} +1 -1
  103. package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
  104. package/dist/chunks/{chunk-PAZDQRYU.js → chunk-NZTCH6K5.js} +1 -1
  105. package/dist/chunks/{chunk-CQF6QZEL.js → chunk-OG33QAG6.js} +1 -1
  106. package/dist/chunks/chunk-OTUBJV6C.js +6 -0
  107. package/dist/chunks/{chunk-TMMFF6DO.js → chunk-PBTXLQAU.js} +1 -1
  108. package/dist/chunks/chunk-Q34IF4PW.js +2 -0
  109. package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-QJ6KUVAR.js} +1 -1
  110. package/dist/chunks/{chunk-SID4X3YN.js → chunk-QU4UE73E.js} +1 -1
  111. package/dist/chunks/{chunk-I7JCARVH.js → chunk-R6VJDOQM.js} +3 -3
  112. package/dist/chunks/{chunk-6RVF2J47.js → chunk-R6WMY6AH.js} +1 -1
  113. package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-RDSVU6F6.js} +1 -1
  114. package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
  115. package/dist/chunks/{chunk-GQUS7MCH.js → chunk-RZUCVF2Q.js} +1 -1
  116. package/dist/chunks/chunk-SFKZITAG.js +9 -0
  117. package/dist/chunks/{chunk-MF35MALN.js → chunk-SHJY5RLU.js} +1 -1
  118. package/dist/chunks/chunk-SI5W5LBV.js +2 -0
  119. package/dist/chunks/chunk-SO42ZB5K.js +2 -0
  120. package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
  121. package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
  122. package/dist/chunks/{chunk-ZISYLRH6.js → chunk-TCOTXCV6.js} +1 -1
  123. package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
  124. package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
  125. package/dist/chunks/chunk-UPWJSNL5.js +2 -0
  126. package/dist/chunks/chunk-URNMC46H.js +157 -0
  127. package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
  128. package/dist/chunks/{chunk-WFVOG5PU.js → chunk-V7KR74NO.js} +1 -1
  129. package/dist/chunks/{chunk-QDBYLJGH.js → chunk-VHXDWAEH.js} +1 -1
  130. package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-W2TICQ62.js} +1 -1
  131. package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
  132. package/dist/chunks/chunk-WP2L2NY2.js +2 -0
  133. package/dist/chunks/chunk-WSOUMXH3.js +24 -0
  134. package/dist/chunks/chunk-WWQNMC7C.js +6 -0
  135. package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
  136. package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
  137. package/dist/chunks/{chunk-T4LLJC5N.js → chunk-XOB6FKQV.js} +1 -1
  138. package/dist/chunks/chunk-Y766IN7Y.js +2 -0
  139. package/dist/chunks/chunk-YCZZ62C2.js +2 -0
  140. package/dist/chunks/chunk-YM4PSVFW.js +4 -0
  141. package/dist/chunks/chunk-YNQWJWIC.js +10 -0
  142. package/dist/chunks/{chunk-LBBXVOVR.js → chunk-Z3BWCFLV.js} +1 -1
  143. package/dist/chunks/{chunk-WRQEYW3V.js → chunk-ZG6353RM.js} +1 -1
  144. package/dist/chunks/{chunk-PE7UKJXK.js → chunk-ZPTKR3GB.js} +1 -1
  145. package/dist/chunks/{chunk-2VXL6AU3.js → chunk-ZYVHOVKL.js} +1 -1
  146. package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
  147. package/dist/chunks/cli-PSXMIJTF.js +2 -0
  148. package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-XYKMXIWF.js} +1 -1
  149. package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
  150. package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
  151. package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-JONPTII6.js} +1 -1
  152. package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
  153. package/dist/chunks/{continual-CJUZM5ZQ.js → continual-Z7MO2PF6.js} +1 -1
  154. package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
  155. package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
  156. package/dist/chunks/datasets-2PC2HP7N.js +2 -0
  157. package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
  158. package/dist/chunks/dist-47AYOIH6.js +2 -0
  159. package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
  160. package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
  161. package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
  162. package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
  163. package/dist/chunks/experiments-SZQYR6MH.js +2 -0
  164. package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
  165. package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
  166. package/dist/chunks/{help-M2VQGPVC.js → help-7HXFWIKS.js} +1 -1
  167. package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
  168. package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
  169. package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
  170. package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
  171. package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
  172. package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
  173. package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
  174. package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
  175. package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
  176. package/dist/chunks/{hosted-profile-evaluation-preparation-ZAOGDQXO.js → hosted-profile-evaluation-preparation-2LSMZQNA.js} +1 -1
  177. package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
  178. package/dist/chunks/human-review-M26UKGJL.js +2 -0
  179. package/dist/chunks/{import-WLLUIDS6.js → import-6SI4BEKS.js} +2 -2
  180. package/dist/chunks/learning-HM3NWOV5.js +2 -0
  181. package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
  182. package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
  183. package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
  184. package/dist/chunks/opchat-AG4CWVY4.js +3 -0
  185. package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
  186. package/dist/chunks/organizations-KDKX77XZ.js +2 -0
  187. package/dist/chunks/{profile-JRS3JNRC.js → profile-O5HL5DTQ.js} +1 -1
  188. package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
  189. package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
  190. package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
  191. package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
  192. package/dist/chunks/{runtime-CBJF5GMB.js → runtime-XBA744HJ.js} +2 -2
  193. package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
  194. package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-27U3FQN7.js} +1 -1
  195. package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
  196. package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-FIPWOXWV.js} +1 -1
  197. package/dist/chunks/src-BLWX6DRG.js +424 -0
  198. package/dist/chunks/{src-4YZF6L6H.js → src-PU7QTFO5.js} +1 -1
  199. package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
  200. package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
  201. package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
  202. package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-K324SQTO.js} +1 -1
  203. package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-3LQMIYAP.js} +1 -1
  204. package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-3KSX7RSO.js} +1 -1
  205. package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
  206. package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
  207. package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
  208. package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
  209. package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
  210. package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
  211. package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
  212. package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
  213. package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-QTVHJAEP.js} +1 -1
  214. package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
  215. package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
  216. package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
  217. package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
  218. package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
  219. package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-DWV5XSMY.js} +1 -1
  220. package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-2KUY4T6M.js} +1 -1
  221. package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
  222. package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
  223. package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-UGVEFA6M.js} +1 -1
  224. package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
  225. package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-GEQIZELY.js} +1 -1
  226. package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
  227. package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-CQV7PL3V.js} +1 -1
  228. package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-XKN6K66J.js} +18 -10
  229. package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-Q7DTTR4S.js} +1 -1
  230. package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-XGAX7NLB.js} +1 -1
  231. package/dist/chunks/{taskset-NYLUYX6K.js → taskset-ARKJQKYQ.js} +1 -1
  232. package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
  233. package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
  234. package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-UTQAJA6H.js} +1 -1
  235. package/dist/chunks/training-3IWW4256.js +2 -0
  236. package/dist/chunks/{training-UBX6E7SK.js → training-RVIESURJ.js} +1 -1
  237. package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
  238. package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
  239. package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
  240. package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
  241. package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
  242. package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
  243. package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
  244. package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
  245. package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
  246. package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
  247. package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
  248. package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-7FBUBZ66.js} +1 -1
  249. package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-G3CMY7ZA.js} +1 -1
  250. package/dist/cli.js +2 -2
  251. package/dist/hosted-chat.d.ts +28 -0
  252. package/dist/index.js +1 -1
  253. package/dist/sandbox/url.d.ts +3 -1
  254. package/dist/skills/LICENSE +21 -0
  255. package/dist/skills/manifest.json +168 -0
  256. package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
  257. package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
  258. package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
  259. package/dist/skills/openpond-cli/SKILL.md +24 -7
  260. package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
  261. package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
  262. package/dist/skills/openpond-cli/references/experiments-and-training.md +156 -11
  263. package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
  264. package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
  265. package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
  266. package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
  267. package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
  268. package/dist/web/assets/App-DY2R8Z6r.js +53 -0
  269. package/dist/web/assets/App-DpFKLxuA.css +1 -0
  270. package/dist/web/assets/AppDialog-8Y0FYalT.js +1 -0
  271. package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
  272. package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-BiQbbVxq.js} +1 -1
  273. package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
  274. package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
  275. package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
  276. package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-J4ChOjvG.js} +1 -1
  277. package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
  278. package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
  279. package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
  280. package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
  281. package/dist/web/assets/CommunityView-Okydjpqm.js +1 -0
  282. package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
  283. package/dist/web/assets/ComposerCreateImproveStrip-CSngc8-V.js +1 -0
  284. package/dist/web/assets/ConversationImportsSettings-DS73kyfj.js +1 -0
  285. package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
  286. package/dist/web/assets/GetStartedView-DGFPQ1We.js +1 -0
  287. package/dist/web/assets/GettingStartedDialog-DFBYQdHz.js +1 -0
  288. package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
  289. package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
  290. package/dist/web/assets/HostedModelLearningSettings-CHaTHwC8.js +1 -0
  291. package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
  292. package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
  293. package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
  294. package/dist/web/assets/LabSkillSidebar-BwtlThO7.js +1 -0
  295. package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
  296. package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
  297. package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
  298. package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
  299. package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
  300. package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
  301. package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
  302. package/dist/web/assets/NewProjectDialog-CjrjgkTN.js +1 -0
  303. package/dist/web/assets/OutputsPage-jzx93QQ3.js +1 -0
  304. package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-C1M13qG2.js} +1 -1
  305. package/dist/web/assets/ProjectsPage-DZrjlMp2.js +1 -0
  306. package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
  307. package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
  308. package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
  309. package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
  310. package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
  311. package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
  312. package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
  313. package/dist/web/assets/TerminalOverlay-d7A2F9Lx.js +16 -0
  314. package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
  315. package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
  316. package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
  317. package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
  318. package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-FhYymrfc.js} +2 -2
  319. package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
  320. package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
  321. package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
  322. package/dist/web/assets/WorkspaceFileLocation-LrEWj4UK.js +1 -0
  323. package/dist/web/assets/WorkspaceGitDialogs-NRIMXnkS.js +1 -0
  324. package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
  325. package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
  326. package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
  327. package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
  328. package/dist/web/assets/bot-6OhUEmkE.js +1 -0
  329. package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
  330. package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
  331. package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-jmVA1BIf.js} +1 -1
  332. package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
  333. package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
  334. package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
  335. package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
  336. package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-BdQ_YDuk.js} +1 -1
  337. package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-Ck1ufAr8.js} +1 -1
  338. package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
  339. package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
  340. package/dist/web/assets/copy-CPkbMfXt.js +1 -0
  341. package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-CXQny8HU.js} +1 -1
  342. package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-CYxYl_om.js} +1 -1
  343. package/dist/web/assets/external-link-CDKOLG_v.js +1 -0
  344. package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-CEtOb_lK.js} +1 -1
  345. package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-CVMYZs3e.js} +1 -1
  346. package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
  347. package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-DoY4V_j0.js} +1 -1
  348. package/dist/web/assets/icons-D7jkCa2d.js +1 -0
  349. package/dist/web/assets/{image-C7HVlg3X.js → image-B-PjDSwU.js} +1 -1
  350. package/dist/web/assets/{index-BsPUniZy.js → index-D9WbJMSq.js} +2 -2
  351. package/dist/web/assets/index-g7UqJhnX.css +1 -0
  352. package/dist/web/assets/{info-BLWDShaz.js → info-CCnw-K3b.js} +1 -1
  353. package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
  354. package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-CeOpZdPj.js} +1 -1
  355. package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
  356. package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
  357. package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-BZX38cpr.js} +1 -1
  358. package/dist/web/assets/message-square-CvgSecgD.js +1 -0
  359. package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-CF2JDhi4.js} +2 -2
  360. package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-cbDqt48m.js} +2 -2
  361. package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-m2ze2EsL.js} +2 -2
  362. package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-yeyow_-Q.js} +2 -2
  363. package/dist/web/assets/{monitor-B6OuAu13.js → monitor-By0s4hxb.js} +1 -1
  364. package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-BJ2QgJLa.js} +1 -1
  365. package/dist/web/assets/{pdf-RXlFwNte.js → pdf-C4x-1jjP.js} +1 -1
  366. package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
  367. package/dist/web/assets/play-D_SuGDBM.js +1 -0
  368. package/dist/web/assets/plus-yw95Iaj8.js +1 -0
  369. package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-I86G1Gd9.js} +1 -1
  370. package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
  371. package/dist/web/assets/{python-BQXo7wMt.js → python-CqFTPj8r.js} +1 -1
  372. package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-Dga35Eay.js} +1 -1
  373. package/dist/web/assets/requests-BCbaFiqV.js +1 -0
  374. package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
  375. package/dist/web/assets/{save-BxXc21N6.js → save-BLKjYtzR.js} +1 -1
  376. package/dist/web/assets/settings-D7C-Auyi.js +21 -0
  377. package/dist/web/assets/settings-lists-DMKA1lCN.js +5 -0
  378. package/dist/web/assets/square-BY5lG2Ol.js +1 -0
  379. package/dist/web/assets/square-terminal-B-n7vUex.js +1 -0
  380. package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
  381. package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-BhmBE5XE.js} +1 -1
  382. package/dist/web/assets/training-QrdkRQZQ.js +2 -0
  383. package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-DB-jg6L_.js} +12 -12
  384. package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-BSWEII2p.js} +1 -1
  385. package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
  386. package/dist/web/assets/{upload-NXasN1wU.js → upload-C4MPhQn8.js} +1 -1
  387. package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-9oqWdRLs.js} +1 -1
  388. package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
  389. package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
  390. package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-BD0Uexmh.js} +1 -1
  391. package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-Cloe0WuQ.js} +1 -1
  392. package/dist/web/assets/{workers-u92Boudu.js → workers-BXagz5eg.js} +1 -1
  393. package/dist/web/assets/x-Dqpel42h.js +1 -0
  394. package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-sBdvVbCc.js} +1 -1
  395. package/dist/web/index.html +12 -3
  396. package/docs/command-reference.md +49 -5
  397. package/package.json +6 -2
  398. package/dist/chunks/actions-command-LOHNQUWP.js +0 -2
  399. package/dist/chunks/app-server-connected-apps-Q2VWWJNX.js +0 -2
  400. package/dist/chunks/app-server-harness-services-2PSZBT7U.js +0 -2
  401. package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
  402. package/dist/chunks/apps-7PIBF32Q.js +0 -2
  403. package/dist/chunks/chunk-3TYCIYW6.js +0 -17
  404. package/dist/chunks/chunk-4GZ2FPB5.js +0 -2
  405. package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
  406. package/dist/chunks/chunk-4N3UF3U5.js +0 -2
  407. package/dist/chunks/chunk-4P3X2RXA.js +0 -2
  408. package/dist/chunks/chunk-4RHM4WN2.js +0 -2
  409. package/dist/chunks/chunk-6DCXAXVD.js +0 -22
  410. package/dist/chunks/chunk-AWPYTDH4.js +0 -4
  411. package/dist/chunks/chunk-BLKTUFGB.js +0 -2
  412. package/dist/chunks/chunk-BN5AVRUG.js +0 -2
  413. package/dist/chunks/chunk-D5ADDBS5.js +0 -2
  414. package/dist/chunks/chunk-DGPGOBYZ.js +0 -5
  415. package/dist/chunks/chunk-E3EKBPCB.js +0 -2
  416. package/dist/chunks/chunk-E67M5WGY.js +0 -2
  417. package/dist/chunks/chunk-EIIGTADO.js +0 -2
  418. package/dist/chunks/chunk-F5JDBDYL.js +0 -2
  419. package/dist/chunks/chunk-FWIPHEVA.js +0 -12
  420. package/dist/chunks/chunk-GLVR74PX.js +0 -2
  421. package/dist/chunks/chunk-HZLV773Y.js +0 -22
  422. package/dist/chunks/chunk-JEVA7YQL.js +0 -3
  423. package/dist/chunks/chunk-KC7I6E6W.js +0 -2
  424. package/dist/chunks/chunk-M4ZRCRJM.js +0 -10
  425. package/dist/chunks/chunk-N663LL27.js +0 -2
  426. package/dist/chunks/chunk-NR5VASQB.js +0 -2
  427. package/dist/chunks/chunk-OJSK4NSW.js +0 -151
  428. package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
  429. package/dist/chunks/chunk-Q324ZA5M.js +0 -2
  430. package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
  431. package/dist/chunks/chunk-UJBEWIR3.js +0 -8
  432. package/dist/chunks/chunk-V67IFV26.js +0 -86
  433. package/dist/chunks/chunk-VSUHJ46L.js +0 -18
  434. package/dist/chunks/chunk-VWJ5IYQP.js +0 -2
  435. package/dist/chunks/chunk-X3WEQL3O.js +0 -2
  436. package/dist/chunks/chunk-XK7SPL63.js +0 -2
  437. package/dist/chunks/chunk-XLULTQLZ.js +0 -12
  438. package/dist/chunks/chunk-YR5ID2SS.js +0 -2
  439. package/dist/chunks/chunk-ZBBVRYU3.js +0 -6
  440. package/dist/chunks/chunk-ZHFH2TZN.js +0 -2
  441. package/dist/chunks/chunk-ZZWAQBA2.js +0 -2
  442. package/dist/chunks/cli-WC45SI7E.js +0 -2
  443. package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
  444. package/dist/chunks/connected-evidence-4J3YXU4O.js +0 -2
  445. package/dist/chunks/core-commands-JGXU6B4C.js +0 -2
  446. package/dist/chunks/dataset-preparation-authoring-DFGJBMVF.js +0 -4
  447. package/dist/chunks/datasets-MNHZAZIB.js +0 -2
  448. package/dist/chunks/desktop-test-P23MHAIG.js +0 -3
  449. package/dist/chunks/dist-IIFTZWNR.js +0 -2
  450. package/dist/chunks/evaluation-coordination-6NQEH5WU.js +0 -2
  451. package/dist/chunks/experiment-improvements-M27Z5OF4.js +0 -2
  452. package/dist/chunks/experiments-IWSCFDBB.js +0 -2
  453. package/dist/chunks/experiments-signal-R3NNH7WR.js +0 -2
  454. package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
  455. package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
  456. package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
  457. package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
  458. package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
  459. package/dist/chunks/hosted-profile-candidate-37ZFY2LH.js +0 -3
  460. package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
  461. package/dist/chunks/hosted-profile-evaluation-control-UQBMML6K.js +0 -2
  462. package/dist/chunks/hosted-profile-evaluation-inspection-YASS4T6L.js +0 -3
  463. package/dist/chunks/human-review-IJETDOWB.js +0 -2
  464. package/dist/chunks/learning-KVLTMRLD.js +0 -2
  465. package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
  466. package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
  467. package/dist/chunks/model-projects-AVBQDNYG.js +0 -2
  468. package/dist/chunks/opchat-KSOJEL4W.js +0 -3
  469. package/dist/chunks/organizations-DJRJWC5I.js +0 -2
  470. package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
  471. package/dist/chunks/project-agent-2KNJFNZI.js +0 -2
  472. package/dist/chunks/published-experiment-source-LFYHKFAO.js +0 -2
  473. package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
  474. package/dist/chunks/sandbox-command-IIGTPYN3.js +0 -2
  475. package/dist/chunks/saved-work-QA46KCME.js +0 -2
  476. package/dist/chunks/src-E7NWAN5B.js +0 -420
  477. package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
  478. package/dist/chunks/store-chat-resources-CGW7PDCG.js +0 -2
  479. package/dist/chunks/store-evaluation-results-V5J6L4NV.js +0 -7
  480. package/dist/chunks/store-harness-workspaces-HHMM6GNK.js +0 -2
  481. package/dist/chunks/store-human-review-V5H4QDHR.js +0 -7
  482. package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
  483. package/dist/chunks/store-model-batch-review-KMYPYWJR.js +0 -2
  484. package/dist/chunks/store-model-configuration-UXNC4PGY.js +0 -3
  485. package/dist/chunks/store-task-inbox-LNDCZOYE.js +0 -33
  486. package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
  487. package/dist/chunks/taskset-packages-I7I5KBFP.js +0 -2
  488. package/dist/chunks/training-error-AYOGHHL2.js +0 -2
  489. package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
  490. package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
  491. package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
  492. package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
  493. package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
  494. package/dist/web/assets/App-Df7uYQGj.css +0 -1
  495. package/dist/web/assets/App-Yy3l2sdD.js +0 -56
  496. package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
  497. package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
  498. package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
  499. package/dist/web/assets/ChatTimelineEntry-IKzZsHoI.js +0 -1
  500. package/dist/web/assets/CommandMenu-CBY2AJxV.js +0 -1
  501. package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
  502. package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
  503. package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
  504. package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
  505. package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
  506. package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
  507. package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
  508. package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
  509. package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
  510. package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
  511. package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
  512. package/dist/web/assets/LabsRoute-DOnw39du.js +0 -101
  513. package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
  514. package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
  515. package/dist/web/assets/MainPane-CuBUBA9F.css +0 -1
  516. package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
  517. package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
  518. package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
  519. package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
  520. package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
  521. package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
  522. package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
  523. package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
  524. package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
  525. package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
  526. package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
  527. package/dist/web/assets/TrainingMetricWorkbench-BmzHLwIP.js +0 -1
  528. package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
  529. package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
  530. package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
  531. package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
  532. package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
  533. package/dist/web/assets/app-models-BviS9b7U.js +0 -1
  534. package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
  535. package/dist/web/assets/chat-resources-CItQ4mZD.js +0 -1
  536. package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
  537. package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
  538. package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
  539. package/dist/web/assets/icons-kaq6k88m.js +0 -1
  540. package/dist/web/assets/index-DUMDOdB2.css +0 -1
  541. package/dist/web/assets/play-BPPQoqMl.js +0 -1
  542. package/dist/web/assets/plus-D18vYzHF.js +0 -1
  543. package/dist/web/assets/settings-BKmRueaw.js +0 -21
  544. package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
  545. package/dist/web/assets/square-Da8RuqW4.js +0 -1
  546. package/dist/web/assets/training-managed-adapter-81RrdT1k.js +0 -1
  547. package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
  548. package/dist/web/assets/useAgentInventory-BV4CUWzJ.js +0 -1
  549. /package/dist/chunks/{chunk-GLDYJM7O.js → chunk-T4QXKU5Y.js} +0 -0
@@ -0,0 +1,8 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{n as r}from"./create-pipeline-CyUZrbbO.js";import{n as i}from"./api-client-Dgz-fOMl.js";import"./icons-D7jkCa2d.js";import{t as a}from"./createLucideIcon-CXQny8HU.js";import{D as o,E as s,N as c,O as l,P as u,S as d,T as f,w as p,x as m}from"./training-model-data-DB-jg6L_.js";import{Ut as h}from"./CartesianChart-J4ChOjvG.js";import{t as g}from"./bot-6OhUEmkE.js";import{t as _}from"./chevron-down-jmVA1BIf.js";import{t as v}from"./chevron-up-CstyLXH3.js";import{t as y}from"./copy-CPkbMfXt.js";import{t as b}from"./external-link-CDKOLG_v.js";import{t as x}from"./folder-open-CEtOb_lK.js";import{t as S}from"./image-B-PjDSwU.js";import{t as C}from"./loader-circle-CPaJeTDy.js";import{t as w}from"./message-square-CvgSecgD.js";import{t as T}from"./play-D_SuGDBM.js";import{t as E}from"./refresh-cw-Dga35Eay.js";import{t as D}from"./square-terminal-B-n7vUex.js";import{t as O}from"./x-Dqpel42h.js";import{r as k}from"./AppToastContext-BiQbbVxq.js";import{n as A,t as ee}from"./profile-agent-labels-Duh96b8x.js";import{$t as j,Bt as te,D as ne,Gt as re,Ht as ie,Qt as M,Rt as ae,T as oe,Xt as N,an as P,b as F,bn as I,c as se,dn as L,en as R,fn as ce,jt as z,k as B,ln as V,nn as le,sn as ue,un as de,w as fe,x as H,zt as U}from"./App-DY2R8Z6r.js";import{t as pe}from"./HtmlVisual-D9Mh7xds.js";import{a as me,i as he}from"./TasksetDraftEditorPrimitives-ByC8bDjp.js";import{r as ge,t as _e}from"./AttachmentTypeIcon-DgADV7dn.js";import{F as ve,G as ye,I as be,K as xe,L as Se,P as Ce,R as we,V as W,Y as Te}from"./MainPane-6OlLiKKb.js";var Ee=a(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),De=a(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Oe=a(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),G=e(t(),1),K=n();function ke(e,t=!0){let n=ze(e);if(n)return n;let r=Re(),i=``,a=[],o=[],s=[];for(let t of e)!i&&t.label&&(i=t.label),ot(o,t.label),st(s,t),t.kind===`command`&&t.content?Ve(r,Ue(t.content)):He(r,t)||at(a,t.label);let c=[...Ye(r),...o,...s],l=r.runCount>0?nt(r.runCount):``,u=dt(a),d=(e.length===1&&e[0]?.kind===`command`&&e[0].content&&o.length===0&&s.length===0?Me(e[0].content,`completed`):null)||it(c,l)||u||i||`Ran command`;return{kind:tt(r,l),text:t?Ae(d,e):d}}function Ae(e,t){let n=je(t);return n.length?`${e}, started ${n.length===1?`subagent`:`subagents`} ${Y(n)}`:e}function je(e){return[...new Set(e.flatMap(e=>e.startedAgent&&(e.action!==`openpond_start_agent`||e.state===`completed`)?[e.startedAgent]:[]))]}function Me(e,t=`completed`){let n=ht(e);if(n.length===0)return null;let r=t===`running`||t===`pending`;if(n[0]===`$OPENPOND_CLI_NODE`&&n[1]===`$OPENPOND_CLI_ENTRY`){if(n.some(_t))return r?`Running OpenPond CLI commands`:`Ran OpenPond CLI commands`;let e=n[3],t=n[2]===`datasets`?{context:`selected dataset`,read:`dataset`,"list-graders":`graders`,"read-grader":`grader`}[e??``]:n[2]===`experiments`&&e===`list`?`experiments`:null;return t?`${r?`Reading`:`Read`} ${t}`:r?`Running OpenPond CLI`:`Ran OpenPond CLI`}if(n.some(_t))return r?`Running shell command`:`Ran shell command`;let i=We(n);if(!i)return null;let[a,o]=i;if(a===`cat`){let e=Z(o);return e.length===0?r?`Reading standard input`:`Read standard input`:`${r?`Reading`:`Read`} ${Q(e)}`}if(a===`sed`)return Le(pt([a,...o]),r);if(a===`rg`)return mt([a,...o],r);if([`grep`,`ag`].includes(a)||a===`git`&&o[0]===`grep`)return r?`Searching code`:`Searched code`;if([`ls`,`find`,`tree`,`fd`].includes(a)){let e=a===`ls`?Z(o):[];return e.length===0?r?`Listing files`:`Listed files`:`${r?`Listing`:`Listed`} files in ${Q(e)}`}if([`head`,`tail`,`nl`,`wc`,`awk`,`jq`].includes(a)){let e=qe(a,o);return e.length===0?r?`Running ${a}`:`Ran ${a}`:`${r?`Reading`:`Read`} ${Q(e)}`}if(a===`apply_patch`)return r?`Editing files`:`Edited files`;if(a===`write_stdin`)return r?`Continuing command`:`Continued command`;if(a===`wait`)return r?`Waiting for command`:`Waited for command`;if(a===`js`)return r?`Running JavaScript`:`Ran JavaScript`;if(a===`exec_command`)return r?`Running shell command`:`Ran shell command`;if(a===`read_file`)return r?`Reading file`:`Read file`;if(a===`view_image`)return r?`Viewing image`:`Viewed image`;if(a===`update_plan`)return r?`Updating plan`:`Updated plan`;if(a===`tool_search`)return r?`Searching tools`:`Searched tools`;if(a===`rm`)return r?`Removing files`:`Removed files`;if(a===`mv`)return r?`Moving files`:`Moved files`;if(a===`cp`)return r?`Copying files`:`Copied files`;if(a===`mkdir`)return r?`Creating directories`:`Created directories`;if(a===`touch`)return r?`Creating files`:`Created files`;if(a===`git`)return Ne(o,r);if(Ie(a))return Pe(a,o,r);if(Ke(a))return Fe(a,r);if([`curl`,`wget`].includes(a))return r?`Fetching URL`:`Fetched URL`;if([`node`,`tsx`,`python`,`python3`,`bash`,`sh`,`zsh`].includes(a))return r?`Running ${q(a)} script`:`Ran ${q(a)} script`;let s=q(a);return r?`Running ${s} command`:`Ran ${s} command`}function Ne(e,t){let n=e.find(e=>!e.startsWith(`-`))??``;return n===`status`?t?`Checking Git status`:`Checked Git status`:n===`diff`?t?`Reviewing changes`:`Reviewed changes`:n===`show`||n===`log`?t?`Reading Git history`:`Read Git history`:n===`add`?t?`Staging changes`:`Staged changes`:n===`commit`?t?`Committing changes`:`Committed changes`:n===`push`?t?`Pushing changes`:`Pushed changes`:n===`pull`||n===`fetch`?t?`Fetching changes`:`Fetched changes`:n===`checkout`||n===`switch`?t?`Switching branches`:`Switched branches`:n===`branch`?t?`Listing branches`:`Listed branches`:t?`Running Git command`:`Ran Git command`}function Pe(e,t,n){let r=t.join(` `).toLowerCase();return/\b(typecheck|tsc)\b/.test(r)?n?`Checking types`:`Checked types`:/\b(lint|eslint|prettier)\b/.test(r)?n?`Running lint`:`Ran lint`:/\b(test|vitest|jest|playwright)\b/.test(r)?n?`Running tests`:`Ran tests`:/\bbuild\b/.test(r)?n?`Building project`:`Built project`:/\b(install|add)\b/.test(r)?n?`Installing dependencies`:`Installed dependencies`:n?`Running ${q(e)} command`:`Ran ${q(e)} command`}function Fe(e,t){return e===`tsc`?t?`Checking types`:`Checked types`:e===`eslint`||e===`prettier`?t?`Running lint`:`Ran lint`:t?`Running tests`:`Ran tests`}function Ie(e){return[`bun`,`npm`,`pnpm`,`yarn`].includes(e)}function q(e){let t=e.split(`/`).filter(Boolean).at(-1)??e;return t===`python`||t===`python3`?`Python`:t===`node`||t===`tsx`?`Node`:[`bash`,`sh`,`zsh`].includes(t)?`shell`:t===`git`?`Git`:t}function Le(e,t){return!e||!t?e:e.startsWith(`Read `)?`Reading ${e.slice(5)}`:e.startsWith(`Run `)?`Running ${e.slice(4)}`:e}function Re(){return{approvals:0,controlCount:0,editCount:0,goalContextUpdates:0,imageCount:0,listedFiles:0,readFileCount:0,readFiles:new Set,reasoningCount:0,runCount:0,searchedCode:0,subagentStatuses:new Map,testsOrChecks:0,turnInterruptions:0,webSearches:0}}function ze(e){if(e.length===0)return null;let t=e.map(e=>e.subagentMessage).filter(e=>!!e);if(t.length===0||t.length!==e.length)return null;if(t.length===1){let e=t[0];return{kind:`subagent`,text:`${e.direction===`received`?`Child Message Received`:`Child Message Sent`}: ${e.summary}`}}let n=t.filter(e=>e.direction===`received`).length,r=t.length-n;return{kind:`subagent`,text:X(Y([n>0?Be(n,`received`):null,r>0?Be(r,`sent`):null].filter(e=>!!e)))}}function Be(e,t){return e===1?`child message ${t}`:`${e} child messages ${t}`}function Ve(e,t){e.editCount+=t.editCount??0,e.listedFiles+=t.listedFiles??0,e.searchedCode+=t.searchedCode??0,e.testsOrChecks+=t.testsOrChecks??0;for(let n of t.readFiles??[])e.readFiles.add(n);t.readFiles?.length&&(e.readFileCount+=t.readFiles.length),t.countedAsRun&&(e.runCount+=1)}function He(e,t){let n=t.label.toLowerCase();if(t.controlKind)return e.controlCount+=1,t.controlKind===`goal_context`&&(e.goalContextUpdates+=1),t.controlKind===`turn_aborted`&&(e.turnInterruptions+=1),!0;if(n===`reasoning`)return e.reasoningCount+=1,!0;if(n.includes(`approval`))return e.approvals+=1,!0;if(n.includes(`subagent`))return Qe(e,t,r(n)),!0;if(n.includes(`image`))return e.imageCount+=1,!0;function r(e){return e.includes(`failed`)?`failed`:e.includes(`blocked`)?`blocked`:e.includes(`stale`)?`stale`:e.includes(`needs revision`)?`needs revision`:e.includes(`archived`)?`archived`:e.includes(`accepted`)?`accepted`:e.includes(`submitted`)?`submitted`:e.includes(`completed`)?`completed`:`running`}return n.includes(`web`)?(e.webSearches+=1,!0):/\b(searching|searched)\b/.test(n)?(e.searchedCode+=1,!0):/\b(listing|listed)\b/.test(n)?(e.listedFiles+=1,!0):/\b(reading|read)\b/.test(n)?(e.readFileCount+=1,!0):/\b(editing|edited|writing|wrote|deleting|deleted|moving|moved|uploading|uploaded|creating|created)\b/.test(n)?(e.editCount+=1,!0):!1}function Ue(e){let t=ht(e);if(t.length===0||t.some(_t))return{countedAsRun:!0};let n=We(t);if(!n)return{countedAsRun:!0};let[r,i]=n;if(r===`apply_patch`||[`rm`,`mv`,`cp`,`mkdir`,`touch`].includes(r))return{countedAsRun:!1,editCount:1};if(Ge(r,i)||Ke(r))return{countedAsRun:!1,testsOrChecks:1};if(r===`rg`)return i.includes(`--files`)?{countedAsRun:!1,listedFiles:1}:{countedAsRun:!1,searchedCode:1};if([`grep`,`ag`].includes(r)||r===`git`&&i[0]===`grep`)return{countedAsRun:!1,searchedCode:1};if([`ls`,`find`,`tree`,`fd`].includes(r))return{countedAsRun:!1,listedFiles:1};let a=qe(r,i);return a.length>0?{countedAsRun:!1,readFiles:a}:{countedAsRun:!0}}function We(e){let t=0;for(;/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(e[t]??``);)t+=1;let n=e[t];if(!n)return null;if(n===`bunx`||n===`npx`){let r=e[t+1];return r?[r,e.slice(t+2)]:[n,[]]}return[n,e.slice(t+1)]}function Ge(e,t){if(![`bun`,`npm`,`pnpm`,`yarn`].includes(e))return!1;let n=t.join(` `).toLowerCase();return/\b(test|typecheck|check|lint|vitest|jest|playwright|tsc)\b/.test(n)}function Ke(e){return[`eslint`,`jest`,`playwright`,`prettier`,`tsc`,`vitest`].includes(e)}function qe(e,t){if(e===`cat`||e===`nl`||e===`head`||e===`tail`||e===`wc`)return Je(Z(t));if(e===`sed`){let e=t.findIndex(e=>e!==`-n`&&!e.startsWith(`--`));return Je(e>=0?Z(t.slice(e+1)):[])}return e===`awk`||e===`jq`?Je(Z(t.slice(1))):[]}function Je(e){return e.filter(e=>!(!e||e===`.`||e===`-`||/^\d+$/.test(e)))}function Ye(e){let t=[],n=Ze(e);n&&t.push(n),e.editCount>0&&t.push(`made edits`);let r=e.readFiles.size||e.readFileCount;return r>0&&t.push(rt(`read`,r,`file`)),e.searchedCode>0&&t.push(`searched code`),e.listedFiles>0&&t.push(`listed files`),e.testsOrChecks>0&&t.push(e.testsOrChecks===1?`ran checks`:`ran ${e.testsOrChecks} checks`),e.webSearches>0&&t.push(`searched web`),e.imageCount>0&&t.push(rt(`read`,e.imageCount,`image`)),e.reasoningCount>0&&t.length===0&&t.push(`thought through the request`),e.approvals>0&&t.push(`requested approval`),t.push(...Xe(e)),t}function Xe(e){let t=[];e.goalContextUpdates===1&&t.push(`goal context updated`),e.goalContextUpdates>1&&t.push(`${e.goalContextUpdates} goal context updates`),e.turnInterruptions===1&&t.push(`turn interrupted`),e.turnInterruptions>1&&t.push(`${e.turnInterruptions} turns interrupted`);let n=e.controlCount-e.goalContextUpdates-e.turnInterruptions;return n===1&&t.push(`context updated`),n>1&&t.push(`${n} context updates`),t}function Ze(e){let t=$e(e);return t.failed>0?J(t.failed,`failed`):t.blocked>0?J(t.blocked,`blocked`):t.stale>0?J(t.stale,`stale`):t[`needs revision`]>0?J(t[`needs revision`],`needs revision`):t.submitted>0?J(t.submitted,`submitted`):t.running>0&&t.completed===0&&t.accepted===0?J(t.running,`running`):t.accepted>0?J(t.accepted,`accepted`):t.completed>0?J(t.completed,`completed`):t.archived>0?J(t.archived,`archived`):null}function Qe(e,t,n){let r=t.openSession?.sessionId??(t.content.trim()||t.id),i=e.subagentStatuses.get(r);(!i||et(n)>et(i))&&e.subagentStatuses.set(r,n)}function $e(e){let t={accepted:0,archived:0,blocked:0,completed:0,failed:0,"needs revision":0,running:0,stale:0,submitted:0};for(let n of e.subagentStatuses.values())t[n]+=1;return t}function et(e){return e===`running`?1:e===`submitted`?2:e===`accepted`||e===`completed`||e===`archived`?3:e===`needs revision`?4:e===`blocked`?5:e===`stale`?6:7}function J(e,t){return e===1?`subagent ${t}`:`${e} subagents ${t}`}function tt(e,t){let n=[];return e.subagentStatuses.size>0&&n.push(`subagent`),e.editCount>0&&n.push(`edit`),(e.readFiles.size>0||e.readFileCount>0)&&n.push(`read`),e.searchedCode>0&&n.push(`search`),e.listedFiles>0&&n.push(`list`),e.webSearches>0&&n.push(`web`),e.imageCount>0&&n.push(`image`),e.reasoningCount>0&&n.push(`reasoning`),e.approvals>0&&n.push(`approval`),e.controlCount>0&&n.push(`control`),(e.testsOrChecks>0||t)&&n.push(`command`),n[0]??`command`}function nt(e){return e===1?`ran a command`:`ran ${e} commands`}function rt(e,t,n){return t===1?`${e} a ${n}`:`${e} ${t} ${n}s`}function it(e,t){return e.length===0?t?X(t):``:X(Y(t?[...e,t]:e))}function at(e,t){let n=t.trim();n&&(e.includes(n)||e.push(n))}function ot(e,t){let n=ct(t);n&&!e.includes(n)&&e.push(n)}function st(e,t){let n=t.receipt;if(!n)return;let r=`${n.status} receipt ${ut(n.id)} ${lt(n.totalUsd)}`;e.includes(r)||e.push(r)}function ct(e){switch(e.trim().toLowerCase()){case`applied locally`:return`applied locally`;case`apply locally failed`:return`apply locally failed`;case`exported sandbox patch`:return`exported patch`;case`patch export failed`:return`patch export failed`;case`preserved sandbox source`:return`preserved sandbox source`;case`preserve failed`:return`preserve failed`;case`stopped sandbox`:return`stopped sandbox`;case`sandbox stop failed`:return`sandbox stop failed`;default:return null}}function lt(e){let t=e.trim();return t.startsWith(`$`)?t:`$${t}`}function ut(e){let t=e.trim();return t.length<=14?t:`${t.slice(0,6)}...${t.slice(-4)}`}function dt(e){return e.length===0?``:X(Y(e.map(ft)))}function ft(e){return e&&`${e[0].toLowerCase()}${e.slice(1)}`}function Y(e){return e.length===0?``:e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(`, `)}, and ${e[e.length-1]}`}function X(e){return e&&`${e[0].toUpperCase()}${e.slice(1)}`}function pt(e){let t=e.findIndex((e,t)=>t>0&&e!==`-n`&&!e.startsWith(`--`)),n=t>=0?e[t]??``:``,r=t>=0?Z(e.slice(t+1)):[],i=/^(\d+)(?:,(\d+))?p$/.exec(n);if(i){let e=i[1],t=i[2],n=t?`lines ${e}-${t}`:`line ${e}`;return r.length>0?`Read ${n} of ${Q(r)}`:`Read ${n}`}return r.length>0?`Read ${Q(r)} with sed`:`Run sed`}function mt(e,t=!1){let n=e.slice(1);if(n.includes(`--files`)){let e=Z(n.filter(e=>e!==`--files`));return e.length>0?`${t?`Listing`:`Listed`} files matching ${Q(e)}`:t?`Listing files`:`Listed files`}let r=Z(n),i=r[0],a=r.slice(1);return i?a.length>0?`${t?`Searching`:`Searched`} for ${yt(i)} in ${Q(a)}`:`${t?`Searching`:`Searched`} for ${yt(i)}`:t?`Searching files`:`Searched files`}function ht(e){return(e.match(/"([^"\\]|\\.)*"|'[^']*'|[^\s]+/g)??[]).map(e=>gt(e)).filter(Boolean)}function gt(e){return e.startsWith(`'`)&&e.endsWith(`'`)||e.startsWith(`"`)&&e.endsWith(`"`)?e.slice(1,-1):e}function _t(e){return[`|`,`&&`,`||`,`;`,`>`,`>>`,`<`,`(`,`)`].includes(e)}function Z(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];r.startsWith(`-`)?vt(r)&&n+1<e.length&&(n+=1):t.push(r)}return t}function vt(e){return[`-e`,`-f`,`-g`,`--glob`,`--type`,`-t`,`--context`,`-C`,`-A`,`-B`,`-m`,`-n`,`-c`].includes(e)}function Q(e){return e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e[0]} and ${e.length-1} more`}function yt(e){return`"${e}"`}function bt(e,t,n){return new Set(e.filter(e=>{if(t.has(e.id))return!1;if(n===void 0)return!0;if(typeof e.timestamp!=`string`)return!1;let r=Date.parse(e.timestamp);return Number.isFinite(r)&&r>=n}).map(e=>e.id))}function xt(e){let t=null;for(let n of e){if(typeof n.timestamp!=`string`)continue;let e=Date.parse(n.timestamp);Number.isFinite(e)&&(t=t===null?e:Math.max(t,e))}return t}function St(e,t){let n=(0,G.useRef)({scopeKey:t,ids:new Set(e.map(e=>e.id)),initialized:!1,liveCutoff:null}),r=n.current.scopeKey===t,i=r&&n.current.initialized?bt(e,n.current.ids,n.current.liveCutoff??void 0):new Set;return(0,G.useLayoutEffect)(()=>{let r=n.current,i=r.scopeKey!==t,a=Date.now();n.current={scopeKey:t,ids:new Set(e.map(e=>e.id)),initialized:!i,liveCutoff:i?Math.max(a,xt(e)??0):r.liveCutoff??Math.max(a,xt(e)??0)}},[e,r,t]),i}var Ct=new Map,wt=[200,600,1500];function Tt({connection:e,latestTurnId:t,sessionId:n,turnRunning:r}){let[i,a]=(0,G.useState)(()=>({sessionId:null,summaries:Ct}));return(0,G.useEffect)(()=>{if(!e||!n)return;let i=!1,o=null,s=r?null:t,c=e=>{let t=wt[e];t===void 0||i||(o=setTimeout(()=>void l(e+1),t))},l=async t=>{try{let r=await I.usageTurnCache(e,n);if(i)return;let o=new Map(r.turns.map(e=>[e.turnId,e]));a({sessionId:n,summaries:o}),s&&!o.has(s)&&c(t)}catch{c(t)}};return l(0),()=>{i=!0,o!==null&&clearTimeout(o)}},[e,t,n,r]),i.sessionId===n?i.summaries:Ct}function Et(e){let t=[],n=[],r=()=>{if(n.length){if(n.length===1||!n.some(e=>e.message.role===`activity_group`))t.push(...n);else{let e=n[0],r=n.map(e=>e.message).filter(e=>e.role===`activity_group`),i=r.at(-1),a={...e.message,role:`activity_group`,content:void 0,taskMessage:void 0,taskMessagePresentation:void 0,refinerActivity:r.slice().reverse().find(e=>e.refinerActivity)?.refinerActivity,activityMessages:n.map(e=>e.message),activities:r.flatMap(e=>e.activities??[]),traceStartedAt:r[0]?.traceStartedAt,traceCompletedAt:i.traceCompletedAt,traceState:r.some(e=>e.traceState===`failed`)?`failed`:r.some(e=>e.traceState===`running`)?`running`:i.traceState};t.push({...e,message:a,showFooter:!1})}n=[]}};for(let i of e){let e=i.message;e.role===`activity_group`&&!e.deliverables?.length&&!e.userQuestion?n.push(i):(r(),t.push(i))}return r(),t}function Dt({notification:e,onOpenFile:t}){let n=e.status===`completed`?`Background task completed`:e.status===`failed`?`Background task failed`:`Background task stopped`;return(0,K.jsxs)(`article`,{className:`native-task-notification ${e.status}`,"aria-label":n,children:[(0,K.jsxs)(`header`,{children:[e.status===`completed`?(0,K.jsx)(L,{size:14}):(0,K.jsx)(V,{size:14}),(0,K.jsx)(`strong`,{children:n})]}),(0,K.jsx)(`p`,{children:e.summary}),(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{children:`Task details`}),(0,K.jsx)(`code`,{children:e.taskId}),e.outputFile?(0,K.jsx)(`div`,{children:t?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>t(e.outputFile),children:[(0,K.jsx)(D,{size:13}),`Open output`]}):(0,K.jsx)(`code`,{children:e.outputFile})}):null]})]})}function Ot({name:e,version:t,summary:n,primary:r,actions:i=[],children:a}){let[o,s]=(0,G.useState)(!1),c=[r,...i];return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`header`,{className:`chat-resource-toolbar`,children:[(0,K.jsx)(`strong`,{title:e,children:e}),(0,K.jsxs)(`span`,{className:`chat-resource-version`,children:[`V`,t]}),(0,K.jsx)(`span`,{className:`chat-resource-toolbar-summary`,title:n,children:n}),(0,K.jsx)(`button`,{type:`button`,className:`chat-resource-toolbar-primary`,disabled:r.disabled,"aria-expanded":r.expanded,"aria-controls":r.controls,onClick:r.run,children:r.label}),i.length||a?(0,K.jsx)(ae,{compact:!0,floating:!0,placement:`bottom`,floatingMenuWidth:220,label:`Actions for ${e}`,value:``,triggerContent:(0,K.jsx)(De,{size:15}),options:[...c.map((e,t)=>({value:String(t),label:e.label,disabled:e.disabled})),...a?[{value:`details`,label:o?`Hide details`:`Details`,separatorBefore:!0}]:[]],onChange:e=>{e===`details`?s(e=>!e):c[Number(e)]?.run()}}):null]}),o&&a?(0,K.jsx)(`div`,{className:`chat-resource-details`,children:a}):null]})}function kt({initial:e,connection:t,context:n}){let[r,i]=(0,G.useState)(e),[a,o]=(0,G.useState)(null),[s,c]=(0,G.useState)(!1),[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(!1),[p,m]=(0,G.useState)(null),[h,g]=(0,G.useState)(0),[_,v]=(0,G.useState)(null),[y,b]=(0,G.useState)([]),[x,S]=(0,G.useState)(null);(0,G.useEffect)(()=>i(e),[e]);async function C(e,a={}){if(!t||!r.datasetId||!r.graderId)throw Error(`The saved grader reference is unavailable.`);let s=await U(t,`dataset`,{action:e,id:r.datasetId,expectedRevision:r.datasetRevision,payload:{graderId:r.graderId,...a},context:n});return i(s.summary),o(s),s}async function w(e){if(!d){f(!0),m(null);try{await e()}catch(e){m(e instanceof Error?e.message:`Grader action failed.`)}finally{f(!1)}}}async function T(){let e=await C(`read_grader`);v(e.grader),b(e.record.workspace.draft.graderFixtures),u(!0),c(!0)}let E=s&&a?a.record.workspace.draft.graderFixtures.filter(e=>!Array.isArray(e.metadata.graderIds)||e.metadata.graderIds.includes(r.graderId)).map(e=>({id:e.id,label:e.label,detail:JSON.stringify(e.output)})):r.rows,D=a?.record.checks.find(e=>e.kind===`graders`);return(0,K.jsxs)(`section`,{className:`chat-resource-summary ${s?``:`compact`}`,"aria-label":`grader: ${r.name}`,children:[(0,K.jsx)(Ot,{name:r.name,version:r.revision,summary:r.checkState??r.state,primary:{label:`Test grader`,disabled:!t||d,run:()=>void w(async()=>{await C(`test_grader`),c(!0)})},actions:[{label:s?`Collapse`:`View examples`,disabled:!t||d,run:()=>void w(async()=>{s||await C(`read_grader`),c(!s)})},{label:`Edit`,disabled:!t||d,run:()=>void w(T)}],children:(0,K.jsxs)(`dl`,{children:[(0,K.jsx)(`dt`,{children:`Type`}),(0,K.jsx)(`dd`,{children:r.graderType}),(0,K.jsx)(`dt`,{children:`Dataset version`}),(0,K.jsxs)(`dd`,{children:[`V`,r.datasetRevision]}),(0,K.jsx)(`dt`,{children:`Checks`}),(0,K.jsx)(`dd`,{children:r.description})]})}),s&&(0,K.jsx)(`div`,{className:`training-table-wrap chat-resource-table ${s?`expanded`:``}`,tabIndex:0,"aria-label":`Grader examples`,children:(0,K.jsxs)(`table`,{className:`training-data-table evaluation-workspace-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:`Example`}),(0,K.jsx)(`th`,{children:`Output`})]})}),(0,K.jsx)(`tbody`,{children:E.length?E.slice(h*5,h*5+5).map(e=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{title:e.label,children:e.label}),(0,K.jsx)(`td`,{title:e.detail,children:e.detail})]},e.id)):(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{colSpan:2,children:`No saved examples. Add known-good and known-bad outputs before testing.`})})})]})}),s&&E.length>5&&(0,K.jsxs)(`div`,{className:`chat-resource-pagination`,children:[(0,K.jsx)(`button`,{type:`button`,disabled:h===0,onClick:()=>g(e=>e-1),children:`Previous`}),(0,K.jsxs)(`span`,{children:[h+1,`/`,Math.ceil(E.length/5)]}),(0,K.jsx)(`button`,{type:`button`,disabled:(h+1)*5>=E.length,onClick:()=>g(e=>e+1),children:`Show more`})]}),s&&D&&(0,K.jsx)(`div`,{className:`chat-resource-checks`,children:D.issues.filter(e=>!e.graderId||e.graderId===r.graderId).map((e,t)=>(0,K.jsx)(`p`,{children:e.message},t))}),l&&_&&(0,K.jsxs)(`div`,{className:`chat-resource-grader-editor`,children:[(0,K.jsx)(`p`,{children:`Save a new Dataset revision. Earlier examples and Experiment inputs stay pinned to their saved version.`}),(0,K.jsx)(me,{label:`Grader definition`,value:_,disabled:d,onChange:e=>{v(e),S(null)}}),(0,K.jsx)(he,{label:`Saved calibration examples`,value:y,disabled:d,onChange:e=>{b(e),S(null)}}),(0,K.jsxs)(`div`,{className:`chat-resource-actions`,children:[(0,K.jsx)(`button`,{className:`training-button`,disabled:d,onClick:()=>void w(async()=>{let e=x??crypto.randomUUID();S(e);let a=await U(t,`dataset`,{action:`save_grader`,id:r.datasetId,expectedRevision:r.datasetRevision,operationId:e,payload:{grader:{..._,id:r.graderId},fixtures:y},context:n}),s=a.record.workspace.draft.graders.find(e=>e.id===r.graderId);if(!s)throw Error(`The original grader was removed; inspect the saved Dataset.`);let c=await U(t,`dataset`,{action:`read_grader`,id:r.datasetId,expectedRevision:a.record.workspace.draft.revision,payload:{graderId:s.id}});i(c.summary),o(c),u(!1),S(null)}),children:`Save revision`}),(0,K.jsx)(`button`,{className:`training-button secondary`,disabled:d,onClick:()=>u(!1),children:`Close editor`})]})]}),p&&(0,K.jsx)(te,{error:p})]})}function At(e){return e.initial.kind===`grader`?(0,K.jsx)(kt,{...e}):(0,K.jsx)(jt,{...e})}function jt({initial:e,connection:t,context:n}){let[r,i]=(0,G.useState)(e),[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(0),[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(null),[p,m]=(0,G.useState)(null),[h,g]=(0,G.useState)(!1),[_,v]=(0,G.useState)([]),[y,b]=(0,G.useState)(``),[x,S]=(0,G.useState)([]),[C,w]=(0,G.useState)(``),[T,E]=(0,G.useState)(`10`),[D,O]=(0,G.useState)([]),[k,A]=(0,G.useState)(e.location??`local`),[ee,j]=(0,G.useState)(null),[ne,re]=(0,G.useState)(!0),ie=[...new Set([...x,...y?[y]:[]])],M=k===`local`&&!ne&&ie.length>0&&ie.every(e=>e.startsWith(`codex/`)),[oe]=(0,G.useState)(()=>crypto.randomUUID());(0,G.useEffect)(()=>i(e),[e]);let N=[`Creating`,`Importing`,`Failed`,`Cancelled`].includes(r.state)&&r.kind===`dataset`;(0,G.useEffect)(()=>{if(!t||N||r.kind===`experiment`&&![`queued`,`running`,`cancelling`].includes(r.state))return;let e=new AbortController,n,a=async()=>{try{let n=r.kind===`dataset`?await U(t,`dataset`,{action:`read`,id:r.id,expectedRevision:r.revision},e.signal):await U(t,`experiment`,{action:`status`,payload:{id:r.id}},e.signal);e.signal.aborted||(i(e=>({...n.summary,datasetId:e.datasetId,datasetRevision:e.datasetRevision})),m(`record`in n?n:n.view),f(null))}catch(t){e.signal.aborted||f(t instanceof Error?t.message:`Status unavailable.`)}e.signal.aborted||(n=setTimeout(()=>void a(),r.kind===`dataset`?1e4:2e3))};return a(),()=>{e.abort(),clearTimeout(n)}},[t,r.id,r.kind,r.state,r.revision,N]);async function P(e){if(!l&&t){u(!0),f(null);try{await e()}catch(e){f(e instanceof Error?e.message:`Resource action failed.`)}finally{u(!1)}}}async function F(e,a={}){let o=await U(t,`dataset`,{action:e,id:r.id,expectedRevision:r.revision,payload:a,context:n});i(o.summary),m(o)}async function I(){if(a)o(!1);else{if(r.kind===`dataset`){let e=await U(t,`dataset`,{action:`read`,id:r.id,expectedRevision:r.revision});m(e)}else{let e=await U(t,`experiment`,{action:`result`,payload:{id:r.id}});m(e.view)}c(0),o(!0)}}async function se(){let e=r.kind===`dataset`?r.id:r.datasetId,n=r.kind===`dataset`?r.revision:r.datasetRevision;if(!e||!n)throw Error(`The saved Dataset pin is unavailable.`);let[i,a]=await Promise.all([U(t,`experiment`,{action:`models`}),U(t,`dataset`,{action:`read`,id:e,expectedRevision:n})]);re(a.record.workspace.draft.graders.some(e=>e.kind===`model_judge`)),v(i.models),S([]),b(``),g(!0),i.models.length===1&&b(`${i.models[0].providerId}/${i.models[0].id}`)}async function L(){let e=[...new Set([...x,...y?[y]:[]])].map(e=>_.find(t=>`${t.providerId}/${t.id}`===e)),i=Number(C),a=Number(T);if(k===`cloud`&&e.some(e=>e?.providerId!==`openpond`))throw Error(`Cloud execution requires available OpenPond models.`);if(!e.length||e.length>8||e.some(e=>!e)||!M&&(!Number.isFinite(i)||i<=0)||!Number.isSafeInteger(a)||a<1||a>100)throw Error(`Select a model, a task count from 1 to 100, and a positive total budget for metered calls.`);let o=ee??crypto.randomUUID();j(o);let s=r.kind===`dataset`?r.id:r.datasetId,c=r.kind===`dataset`?r.revision:r.datasetRevision;if(!s||!c)throw Error(`This Experiment does not have an installation-local Dataset pin.`);let l=await U(t,`experiment`,{action:k===`cloud`?`run_cloud`:`run`,context:n,payload:{datasetId:s,revision:c,operationId:o,...M?{}:{maximumCostUsd:i},taskLimit:a,models:e.map(e=>({providerId:e.providerId,modelId:e.id}))}});n||O(l.summaries),g(!1),j(null)}let R=a&&p?`record`in p?p.record.workspace.draft.tasks.map(e=>({id:e.id,label:typeof e.input.prompt==`string`?e.input.prompt:typeof e.input.request==`string`?e.input.request:JSON.stringify(e.input),detail:p.record.workspace.draft.graders.map(e=>e.label).join(`, `),score:void 0})):p.cases.map(e=>({id:e.id,label:e.taskId,detail:e.error??e.output??e.status,score:e.score})):r.rows,ce={label:a?`Collapse`:r.kind===`dataset`?`View rows`:`View results`,disabled:l||!t||N,run:()=>void P(I)},z=[],B=(e,n,r=!1)=>z.push({label:e,run:()=>void P(n),disabled:l||!t||r});r.kind===`dataset`?(B(`Run experiment`,se,N),B(`Check graders`,()=>F(`check_graders`),N),!N&&r.syncState!==`Synced`&&r.syncState!==`Paused`&&B(r.syncState===`Local`?`Upload to cloud`:`Retry sync`,()=>F(r.syncState===`Local`?`upload`:`sync`)),a&&!N&&r.syncState!==`Local`&&(B(r.syncState===`Paused`?`Resume sync`:`Pause sync`,()=>F(`pause_sync`,{paused:r.syncState!==`Paused`})),B(`Disconnect cloud`,()=>F(`disconnect_sync`)))):[`queued`,`running`,`cancelling`].includes(r.state)?B(`Cancel experiment`,async()=>{let e=await U(t,`experiment`,{action:`cancel`,payload:{id:r.id}});i(t=>({...e.summary,datasetId:t.datasetId,datasetRevision:t.datasetRevision}))}):(!r.owner&&!r.profileRef&&B(`Run again`,se,!r.datasetId),B(`HTML charts`,async()=>{await U(t,`experiment`,{action:`charts`,context:n,payload:{ids:[r.id],operationId:oe}})},!n));let V=r.score==null?``:`${Number((r.score*100).toFixed(1))}%`,le=r.kind===`dataset`?`${r.taskCount??0} example${r.taskCount===1?``:`s`} · ${r.graderCount??0} grader${r.graderCount===1?``:`s`}`:`${r.evaluatedCount??0}/${r.taskCount??0} graded${V?` · ${V}`:``}`;return(0,K.jsxs)(`section`,{className:`chat-resource-summary ${a?``:`compact`}`,"aria-label":`${r.kind}: ${r.name}`,children:[(0,K.jsx)(Ot,{name:r.name,version:r.revision,summary:le,primary:ce,actions:z,children:(0,K.jsxs)(`dl`,{children:[(0,K.jsx)(`dt`,{children:`Status`}),(0,K.jsx)(`dd`,{children:r.state}),r.kind===`dataset`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{children:`Storage`}),(0,K.jsx)(`dd`,{children:r.syncState??`Local`}),(0,K.jsx)(`dt`,{children:`Grader checks`}),(0,K.jsx)(`dd`,{children:r.checkState??`Not checked`})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{children:`Model`}),(0,K.jsx)(`dd`,{children:r.model??`Unavailable`}),(0,K.jsx)(`dt`,{children:`Location`}),(0,K.jsx)(`dd`,{children:r.location??`local`}),(0,K.jsx)(`dt`,{children:r.scoreLabel??`Mean task score`}),(0,K.jsx)(`dd`,{children:V||`Unavailable`}),(0,K.jsx)(`dt`,{children:`Cost`}),(0,K.jsx)(`dd`,{children:r.costUsd==null?`Unavailable`:`$${r.costUsd.toFixed(4)}`}),(0,K.jsx)(`dt`,{children:`Quality failures`}),(0,K.jsx)(`dd`,{children:r.qualityFailureCount??`Unavailable`}),(0,K.jsx)(`dt`,{children:`Execution failures`}),(0,K.jsx)(`dd`,{children:r.executionFailureCount??`Unavailable`}),(0,K.jsx)(`dt`,{children:`Ungraded`}),(0,K.jsx)(`dd`,{children:r.ungradedCount??`Unavailable`})]})]})}),a&&(0,K.jsx)(`div`,{className:`training-table-wrap chat-resource-table ${a?`expanded`:``}`,tabIndex:0,"aria-label":`Resource rows`,children:(0,K.jsxs)(`table`,{className:`training-data-table evaluation-workspace-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:r.kind===`dataset`?`Task`:`Case`}),(0,K.jsx)(`th`,{children:r.kind===`dataset`?`Graders`:`Outcome`}),r.kind===`experiment`&&(0,K.jsx)(`th`,{children:`Score`})]})}),(0,K.jsx)(`tbody`,{children:R.length?R.slice(s*5,s*5+5).map(e=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{title:e.label,children:e.label}),(0,K.jsx)(`td`,{title:e.detail,children:e.detail}),r.kind===`experiment`&&(0,K.jsx)(`td`,{children:e.score==null?`Unavailable`:`${(e.score*100).toFixed(1)}%`})]},e.id)):(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{colSpan:r.kind===`experiment`?3:2,children:[`Creating`,`Importing`].includes(r.state)?`Waiting for saved tasks…`:`No saved rows to show.`})})})]})}),a&&R.length>5&&(0,K.jsxs)(`div`,{className:`chat-resource-pagination`,children:[(0,K.jsx)(`button`,{type:`button`,disabled:s===0,onClick:()=>c(e=>e-1),children:`Previous`}),(0,K.jsxs)(`span`,{children:[s+1,`/`,Math.ceil(R.length/5)]}),(0,K.jsx)(`button`,{type:`button`,disabled:(s+1)*5>=R.length,onClick:()=>c(e=>e+1),children:`Show more`})]}),h&&(0,K.jsxs)(`div`,{className:`chat-resource-run-setup`,children:[(0,K.jsxs)(`p`,{children:[`Run the saved Dataset, version `,r.kind===`dataset`?r.revision:r.datasetRevision,`. The total budget includes model calls and grading.`,k===`cloud`?` Cloud execution publishes this exact revision and enables Dataset sync.`:``]}),(0,K.jsx)(ae,{label:`Execution location`,value:k,options:[{value:`local`,label:`Local`},{value:`cloud`,label:`Cloud`,description:`Publish this saved version and run in the linked workspace`}],onChange:e=>{A(e),S([]),b(``),j(null)},disabled:l}),(0,K.jsx)(ae,{label:`Evaluated model`,value:y,options:[{value:``,label:`Select model`},..._.filter(e=>k===`local`||e.providerId===`openpond`).map(e=>({value:`${e.providerId}/${e.id}`,label:e.name,description:e.providerId}))],onChange:e=>{b(e),j(null)},disabled:l}),(0,K.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:l||!y||x.includes(y)||x.length>=8,onClick:()=>{S([...x,y]),b(``),j(null)},children:`Add model`}),x.length>0&&(0,K.jsxs)(`table`,{className:`training-data-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:`Selected model`}),(0,K.jsx)(`th`,{children:`Actions`})]})}),(0,K.jsx)(`tbody`,{children:x.map(e=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{children:_.find(t=>`${t.providerId}/${t.id}`===e)?.name??e}),(0,K.jsx)(`td`,{children:(0,K.jsx)(`button`,{type:`button`,className:`training-text-button`,disabled:l,onClick:()=>{S(x.filter(t=>t!==e)),j(null)},children:`Remove`})})]},e))})]}),!_.length&&(0,K.jsx)(`p`,{children:`Sign in to Codex or configure a supported local inference endpoint, a priced OpenPond model, or Claude API provider in Settings before running.`}),M?(0,K.jsx)(`p`,{children:`Uses your signed-in Codex account with Lite reasoning. No dollar budget is required. Token usage is retained; dollar cost is unavailable.`}):(0,K.jsxs)(`label`,{children:[`Total budget (USD)`,(0,K.jsx)(`input`,{type:`number`,min:`0.000001`,step:`any`,value:C,onChange:e=>{w(e.target.value),j(null)},disabled:l})]}),(0,K.jsxs)(`label`,{children:[`Maximum tasks`,(0,K.jsx)(`input`,{type:`number`,min:`1`,max:`100`,value:T,onChange:e=>{E(e.target.value),j(null)},disabled:l})]}),(0,K.jsx)(`button`,{type:`button`,className:`training-button`,disabled:l||!x.length&&!y||!M&&!C,onClick:()=>void P(L),children:k===`cloud`?`Run in cloud`:`Run experiment`}),(0,K.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:l,onClick:()=>g(!1),children:`Close`})]}),d&&(0,K.jsx)(te,{error:d}),D.map(e=>(0,K.jsx)(At,{initial:e,connection:t},e.id))]})}function Mt({resources:e,connection:t,context:n}){let[r,i]=(0,G.useState)(!1),a=(0,G.useId)(),o=e.find(e=>e.kind===`dataset`),s=o&&e.length>1&&e.every(e=>e===o||e.kind===`grader`&&e.datasetId===o.id&&e.datasetRevision===o.revision&&JSON.stringify(e.owner??null)===JSON.stringify(o.owner??null)&&JSON.stringify(e.profileRef??null)===JSON.stringify(o.profileRef??null)),c=e.map(e=>(0,K.jsx)(At,{initial:e,connection:t,context:n},`${e.kind}:${e.id}`));if(!s||!o)return(0,K.jsx)(K.Fragment,{children:c});let l=e.length-1;return(0,K.jsxs)(`section`,{className:`chat-resource-summary compact`,"aria-label":`Resources for ${o.name}`,children:[(0,K.jsx)(Ot,{name:o.name,version:o.revision,summary:`${l} grader${l===1?``:`s`}`,primary:{label:r?`Close`:`Inspect`,expanded:r,controls:a,run:()=>i(e=>!e)}}),r?(0,K.jsx)(`div`,{id:a,className:`chat-resource-group-details`,children:c}):null]})}var Nt=`<openpond_trusted_runtime_context>`,Pt=`</openpond_trusted_runtime_context>`;function Ft(e){let t=e.trimStart();if(!t.startsWith(Nt))return e;let n=t.indexOf(Pt,34);if(n===-1)return``;let r=t.slice(n+35).trim();if(!r.startsWith(`<user_request>`))return r;let i=r.slice(14);return(i.endsWith(`</user_request>`)?i.slice(0,-15):i).trim()}function It({content:e,timestamp:t,kvCacheSummary:n}){let r=(0,G.useRef)(null),i=(0,G.useRef)(0),[a,o]=(0,G.useState)(!1),[s,l]=(0,G.useState)(null);k(s),(0,G.useEffect)(()=>{let e=r.current?.closest(`.message-row, .ponder-transcript-message`),t=()=>{i.current++,o(!1)},n=n=>{e?.contains(n.relatedTarget)||t()};return t(),e?.addEventListener(`pointerleave`,t),e?.addEventListener(`focusout`,n),window.addEventListener(`scroll`,t,!0),()=>{i.current++,e?.removeEventListener(`pointerleave`,t),e?.removeEventListener(`focusout`,n),window.removeEventListener(`scroll`,t,!0)}},[e]);async function u(){if(!e)return;let t=++i.current;l(null);let n=await c(e);t===i.current&&(o(n),n||l(Error(`Could not copy the message. Try again.`)))}let d=n?.cacheHitRate,f=typeof d==`number`&&Number.isFinite(d)&&d>=0&&d<=1?Math.round(d*100):0,p=f>0?`${f}%`:null;return(0,K.jsxs)(`div`,{className:`assistant-message-footer`,ref:r,children:[(0,K.jsx)(Lt,{timestamp:t}),p?(0,K.jsxs)(`span`,{className:`message-kv-cache-metric`,"aria-label":`KV cache reuse ${p}`,children:[`KV `,p]}):null,(0,K.jsx)(`button`,{type:`button`,className:`message-copy-button${a?` is-copied`:``}`,title:a?`Copied`:`Copy message`,"aria-label":a?`Message copied`:`Copy assistant message`,disabled:!e,onClick:()=>void u(),children:a?(0,K.jsx)(L,{size:14}):(0,K.jsx)(y,{size:14})})]})}function Lt({timestamp:e}){let t=fe(e);return t?(0,K.jsx)(`time`,{className:`message-timestamp`,dateTime:e,title:oe(e),children:t}):null}function Rt({peer:e,connection:t,onOpenSession:n,onOpenPonder:r,showIcon:a=!1}){let[o,s]=(0,G.useState)(null),c=(0,G.useRef)(0);(0,G.useEffect)(()=>(c.current++,()=>{c.current++}),[t,e.sessionId,e.bindingId]);async function l(){if(!t||!r)return;let n=c.current;try{if(!e.ponderScope)throw Error(`This message has no verified Pal source.`);await we(t,e.ponderScope);let a=await i(t,`/v1/ponder`,{method:`POST`,body:`{}`});if(n!==c.current)return;if(a.bindingId!==e.bindingId)throw Error(`This task's original Pal conversation is no longer active.`);s(null),r()}catch(e){n===c.current&&s(e instanceof Error?e.message:String(e))}}let u=e.kind===`ponder`?!!(r&&t):!!(n&&e.sessionId),d=(0,K.jsxs)(K.Fragment,{children:[a?(0,K.jsx)(z,{session:{provider:e.provider}}):null,(0,K.jsx)(`span`,{className:`task-message-conversation-name`,children:e.title})]});return(0,K.jsxs)(K.Fragment,{children:[u?(0,K.jsx)(`button`,{type:`button`,className:`task-message-conversation`,title:e.title,onClick:()=>e.kind===`ponder`?void l():n?.(e.sessionId),children:d}):(0,K.jsx)(`span`,{className:`task-message-direction`,children:d}),o?(0,K.jsx)(te,{error:o}):null]})}function zt({message:e,onOpenSession:t,onOpenPonder:n,connection:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useId)(),s=e.taskMessage??e.taskMessagePresentation;if(!s)return null;let{input:c,direction:l,peer:u}=s,d=c.error?c.error:{pending:`Queued`,included:`Included in agent request`,resolved:`Delivered to agent`,rejected:`Not delivered`,cancelled:`Cancelled`}[c.state],f=c.state===`rejected`,p=c.state===`resolved`?L:f?V:c.state===`cancelled`?O:C;return(0,K.jsxs)(`article`,{className:`activity-tool-row task-message-row`,children:[(0,K.jsxs)(`div`,{className:`task-message-summary-row`,children:[(0,K.jsxs)(W,{className:`activity-tool-summary`,danger:f,icon:(0,K.jsx)(w,{"aria-hidden":!0,className:`activity-summary-kind-icon`,size:12}),children:[(0,K.jsx)(`span`,{children:l===`sent`?`Sent to`:`Received from`}),` `,(0,K.jsx)(Rt,{peer:u,connection:r,onOpenSession:t,onOpenPonder:n}),(0,K.jsx)(`span`,{className:`task-message-state`,role:`img`,"aria-label":d,title:d,children:(0,K.jsx)(p,{"aria-hidden":!0,size:12})})]}),(0,K.jsx)(`button`,{type:`button`,className:`activity-summary activity-tool-summary`,"aria-controls":o,"aria-expanded":i,"aria-label":`${l===`sent`?`Sent to`:`Received from`} ${u.title}: message details`,onClick:()=>a(e=>!e),children:(0,K.jsx)(_,{"aria-hidden":!0,className:`activity-summary-toggle ${i?`expanded`:``}`,size:14})})]}),i?(0,K.jsx)(`div`,{className:`activity-tool-details`,id:o,children:(0,K.jsx)(`pre`,{className:`activity-detail-output`,children:c.body})}):null]})}function Bt({content:e}){let[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(!1),a=(0,G.useRef)(null),o=(0,G.useId)();return(0,G.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);i(e.scrollHeight>Math.ceil(t*5)+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e,t]),(0,K.jsxs)(`div`,{className:`user-message-content-wrap`,children:[(0,K.jsx)(`div`,{ref:a,id:o,className:`user-message-content ${t?``:`collapsed`}`,children:e}),r?(0,K.jsxs)(`button`,{type:`button`,className:`user-message-show-more`,"aria-expanded":t,"aria-controls":o,onClick:()=>n(e=>!e),children:[t?(0,K.jsx)(v,{size:14}):(0,K.jsx)(_,{size:14}),(0,K.jsx)(`span`,{children:t?`Show less`:`Show more`})]}):null]})}var Vt=64,Ht=120,Ut=210,Wt=360,Gt=40,Kt=120,qt=600,Jt=100,Yt=33,$=new Set,Xt=!1;function Zt(e,t,n=0){if(e<=0)return{characterCount:0,remainder:0};let r=n+Math.min(Math.max(t,0),Jt)*(e>qt?Wt:e>Kt?Ut:e>Gt?Ht:Vt)/1e3,i=Math.min(e,Math.floor(r));return{characterCount:i,remainder:r-i}}function Qt(e,t,n){let r=Math.min(t.length,e.length+n),i=t.charCodeAt(r-1),a=t.charCodeAt(r);return i>=55296&&i<=56319&&a>=56320&&a<=57343&&(r+=1),t.slice(0,r)}function $t(){return typeof window<`u`&&typeof window.matchMedia==`function`&&typeof document<`u`&&document.visibilityState===`visible`&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function en(e,t,n){return t&&n?Qt(``,e,1):e}function tn(e,t=!1){let[n,r]=(0,G.useState)(()=>en(e,t,$t())),i=(0,G.useRef)(n),a=(0,G.useRef)(e),o=(0,G.useRef)(null),s=(0,G.useRef)(null),c=(0,G.useRef)(0),l=(0,G.useRef)(!0);return(0,G.useEffect)(()=>(l.current=!0,()=>{l.current=!1,o.current!==null&&(window.clearTimeout(o.current),o.current=null)}),[]),(0,G.useEffect)(()=>{if(a.current=e,!$t()||!e.startsWith(i.current)){o.current!==null&&(window.clearTimeout(o.current),o.current=null),s.current=null,c.current=0,i.current=e,l.current&&r(e);return}if(i.current.length===e.length||o.current!==null)return;let t=()=>{if(!l.current){o.current=null;return}let e=i.current,n=a.current,u=performance.now();if(!n.startsWith(e)){i.current=n,r(n),o.current=null,s.current=null,c.current=0;return}let d=n.length-e.length;if(d===0){o.current=null,s.current=null,c.current=0;return}let f=Zt(d,s.current===null?16:u-s.current,c.current);if(s.current=u,c.current=f.remainder,f.characterCount>0){let t=Qt(e,n,f.characterCount);i.current=t,r(t)}o.current=window.setTimeout(t,Yt)};return o.current=window.setTimeout(t,Yt),()=>{o.current!==null&&(window.clearTimeout(o.current),o.current=null)}},[e]),(0,G.useEffect)(()=>{let e=nn(()=>{document.visibilityState!==`visible`&&(o.current!==null&&(window.clearTimeout(o.current),o.current=null),s.current=null,c.current=0,i.current=a.current,l.current&&r(a.current))});return()=>{e(),o.current!==null&&(window.clearTimeout(o.current),o.current=null)}},[]),n}function nn(e){return $.add(e),Xt||=(document.addEventListener(`visibilitychange`,rn),!0),()=>{$.delete(e),$.size===0&&Xt&&(document.removeEventListener(`visibilitychange`,rn),Xt=!1)}}function rn(){for(let e of $)e()}function an({visibleContent:e,content:t,...n}){let r=p(e,e.length===t.length),i=on(r,e.length===t.length);return(0,K.jsx)(m,{...n,content:r,finalizedContent:i.finalized,mutableContent:i.mutable})}function on(e,t){if(t||!e)return{finalized:e,mutable:``};let n=e.split(`
2
+ `),r=!1,i=null,a=0,o=0;for(let e=0;e<n.length-1;e+=1){let t=n[e]??``,s=t.trim();!i&&/^\s*```/.test(t)&&(r=!r),r||(i&&s.endsWith(i)?i=null:!i&&s.startsWith(`\\[`)&&!s.endsWith(`\\]`)?i=`\\]`:!i&&s.startsWith(`$$`)&&s.indexOf(`$$`,2)<0&&(i=`$$`)),a+=t.length+1,!r&&!i&&s===``&&(o=a)}return{finalized:e.slice(0,o),mutable:e.slice(o)}}function sn({content:e=``,reasoningContent:t=``,animateInitialContent:n,children:r,footer:i,...a}){let o=tn(e,n),s=tn(t,n),c=o===e&&s===t;return(0,K.jsxs)(K.Fragment,{children:[t?(0,K.jsx)(`div`,{className:`assistant-message`,children:(0,K.jsx)(an,{...a,content:t,visibleContent:s})}):null,e?(0,K.jsx)(`div`,{className:`assistant-message`,children:(0,K.jsx)(an,{...a,content:e,visibleContent:o})}):null,r,c?i:null]})}function cn({actionRun:e,onOpenBrowserLink:t,onOpenFileInSidebar:n,workspaceRootPath:r=null}){let i=pn(e.status),a=mn(e);return(0,K.jsxs)(`div`,{className:`action-run-card ${e.status}`,children:[(0,K.jsxs)(`div`,{className:`action-run-header`,children:[(0,K.jsx)(`span`,{className:`action-run-status`,title:e.status,children:(0,K.jsx)(i,{size:15})}),(0,K.jsxs)(`div`,{className:`action-run-title`,children:[(0,K.jsx)(`strong`,{children:e.title}),(0,K.jsx)(`span`,{children:e.actionName})]})]}),a.length>0&&(0,K.jsx)(`div`,{className:`action-run-meta`,"aria-label":`Action run metadata`,children:a.map(e=>(0,K.jsxs)(`span`,{className:`action-run-chip`,children:[e.icon,(0,K.jsx)(`span`,{children:e.label}),(0,K.jsx)(`code`,{children:e.value})]},e.label))}),e.responseText&&(0,K.jsx)(`p`,{className:`action-run-response`,children:e.responseText}),e.refs.length>0&&(0,K.jsx)(`div`,{className:`action-run-ref-list`,"aria-label":`Action run references`,children:e.refs.slice(0,8).map(e=>(0,K.jsx)(fn,{refItem:e,onOpenBrowserLink:t,onOpenFileInSidebar:n,workspaceRootPath:r},e.id))}),e.childCalls.length>0&&(0,K.jsx)(`div`,{className:`action-run-child-list`,"aria-label":`Child implementation calls`,children:e.childCalls.map(e=>(0,K.jsxs)(`div`,{className:`action-run-child ${e.status}`,children:[(0,K.jsx)(`span`,{children:e.label}),(0,K.jsx)(`small`,{children:e.status}),e.detail&&(0,K.jsx)(`code`,{children:e.detail})]},e.id))})]})}function ln(e){return e.implementationType===`openpond-profile-action`}function un(e){let t=e.agentName??e.agentId;return e.actionName.endsWith(`.chat`)?A({actionId:e.actionName,label:e.title,name:t}):t?A({actionId:e.actionName,name:t}):e.title&&!ee(e.title)?A({actionId:e.actionName,label:e.title}):A({actionId:e.actionName})}function dn(e){return e.status===`failed`?`${e.title} failed.`:e.status===`completed`?`${e.title} completed.`:e.status===`pending`?`${e.title} is pending.`:`${e.title} is running...`}function fn({refItem:e,onOpenBrowserLink:t,onOpenFileInSidebar:n,workspaceRootPath:r}){let i=n?l(e.target,{workspaceRootPath:r}):null,a=hn(e.target)&&t,o=!!(i&&n);return(0,K.jsxs)(`div`,{className:`action-run-ref ${e.kind}`,children:[(0,K.jsx)(`span`,{children:e.label}),(0,K.jsx)(`code`,{children:e.target}),a&&(0,K.jsx)(`button`,{type:`button`,title:`Open ${e.target}`,"aria-label":`Open ${e.label}`,onClick:()=>t(e.target,{newTab:!0}),children:(0,K.jsx)(h,{size:13})}),o&&(0,K.jsx)(`button`,{type:`button`,title:`Open ${e.target}`,"aria-label":`Open ${e.label}`,onClick:()=>{i&&n&&n(i.path)},children:(0,K.jsx)(h,{size:13})})]})}function pn(e){return e===`completed`?de:e===`failed`?Oe:Te}function mn(e){let t=[];return e.implementationType&&t.push({label:`Type`,value:e.implementationType,icon:(0,K.jsx)(u,{size:12})}),e.runId&&t.push({label:`Run`,value:e.runId,icon:(0,K.jsx)(P,{size:12})}),e.sandboxId&&t.push({label:`Sandbox`,value:e.sandboxId,icon:(0,K.jsx)(P,{size:12})}),e.sourceRef&&t.push({label:`Source`,value:e.sourceRef,icon:(0,K.jsx)(le,{size:12})}),e.manifestHash&&t.push({label:`Manifest`,value:e.manifestHash,icon:(0,K.jsx)(P,{size:12})}),t}function hn(e){return/^https?:\/\//i.test(e)}function gn(e){let t=new Map;for(let n of e){if(!n.startedAgent||n.action===`openpond_start_agent`&&n.state!==`completed`)continue;let e=n.openSession?.sessionId??``;t.set(e||n.startedAgent,{sessionId:e,title:n.startedAgent,provider:n.startedAgentProvider??``})}return[...t.values()]}function _n({activities:e,messages:t,createdOnly:n=!1,onToggle:r,expanded:i,controls:a,...o}){let s=gn(e);for(let e of s){let n=t.map(e=>e.taskMessage??e.taskMessagePresentation).find(t=>t?.peer.sessionId===e.sessionId);!e.provider&&n&&(e.provider=n.peer.provider)}let c=new Set(s.map(e=>e.sessionId).filter(Boolean)),l={sent:new Map,received:new Map};for(let e of t){let t=e.taskMessage??e.taskMessagePresentation;if(t){let e=t.peer;if(t.direction===`sent`&&c.has(e.sessionId))continue;l[t.direction].set(e.sessionId||e.bindingId||e.title,e)}}let u=(e,t=!1)=>e.map((n,r)=>(0,K.jsxs)(G.Fragment,{children:[r?r===e.length-1?` and `:`, `:``,(0,K.jsx)(Rt,{...o,peer:n,showIcon:t})]},n.sessionId||n.title));return n?(0,K.jsx)(K.Fragment,{children:s.map(e=>(0,K.jsxs)(`div`,{className:`activity-created-agents`,children:[(0,K.jsx)(z,{session:{provider:e.provider}}),(0,K.jsx)(Rt,{...o,peer:e}),(0,K.jsx)(`span`,{children:`started`})]},e.sessionId||e.title))}):(0,K.jsxs)(K.Fragment,{children:[l.sent.size?(0,K.jsxs)(K.Fragment,{children:[`, `,(0,K.jsx)(`button`,{type:`button`,className:`activity-summary-label-toggle`,"aria-expanded":i,"aria-controls":a,onClick:r,children:`sent to`}),` `,u([...l.sent.values()])]}):null,l.received.size?(0,K.jsxs)(K.Fragment,{children:[`, `,(0,K.jsx)(`button`,{type:`button`,className:`activity-summary-label-toggle`,"aria-expanded":i,"aria-controls":a,onClick:r,children:`received from`}),` `,u([...l.received.values()])]}):null]})}function vn(e,t){let n=yn(e),[r,i]=(0,G.useState)(()=>n.getUrl(t));return(0,G.useEffect)(()=>{let e=!1;return i(n.getUrl(t)),n.loadUrl(t).then(t=>{e||i(t)}),()=>{e=!0}},[t,n]),r}function yn(e){let[,t]=(0,G.useState)(0),n=(0,G.useCallback)(t=>!e||!t?null:(H.activateConnection(e),H.get(F(e,`local-video`,t))),[e]),r=(0,G.useCallback)(async n=>{if(!e||!n)return null;H.activateConnection(e);let r=F(e,`local-video`,n);return H.load(r,()=>I.signLocalVideoUrl(e,{path:n})).finally(()=>t(e=>e+1))},[e]);return(0,G.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}var bn=4;function xn({onOpenSession:e,onShowAll:t,sessions:n}){let r=n.slice(0,bn),i=Math.max(0,n.length-r.length),a=n.map(Tn).join(`, `);return(0,K.jsxs)(`div`,{"aria-label":`Subagent conversations: ${a}`,className:`activity-subagent-avatar-group`,title:`Subagent conversations: ${a}`,children:[r.map(t=>(0,K.jsx)(Sn,{openSession:t,onOpenSession:e},t.sessionId)),i>0?(0,K.jsxs)(`button`,{type:`button`,"aria-label":`Show ${i} more subagent conversation${i===1?``:`s`}`,className:`activity-subagent-avatar activity-subagent-avatar-count`,onClick:t,title:`Show ${i} more subagent conversation${i===1?``:`s`}`,children:[`+`,i]}):null]})}function Sn({className:e=``,onOpenSession:t,openSession:n}){let r=Dn(n.roleId),i=On(n.status),a=`Open ${Tn(n)} conversation`;return(0,K.jsx)(`button`,{type:`button`,"aria-label":a,className:`activity-subagent-avatar ${e}`,"data-role":r,"data-status":i,onClick:()=>t(n.sessionId),title:a,children:(0,K.jsx)(Cn,{roleId:r})})}function Cn({roleId:e}){return e===`coding`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`path`,{d:`M9.4 7.2 4.8 12l4.6 4.8`}),(0,K.jsx)(`path`,{d:`m14.6 7.2 4.6 4.8-4.6 4.8`}),(0,K.jsx)(`path`,{d:`m12.9 5.7-1.8 12.6`})]}):e===`research`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`circle`,{cx:`10.8`,cy:`10.8`,r:`5.2`}),(0,K.jsx)(`path`,{d:`m15 15 4 4`}),(0,K.jsx)(`path`,{d:`M8.6 10.8h4.4`}),(0,K.jsx)(`path`,{d:`M10.8 8.6v4.4`})]}):e===`review`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`path`,{d:`M7 4.8h7.2L18 8.6v10.6H7z`}),(0,K.jsx)(`path`,{d:`M14 4.8v4h4`}),(0,K.jsx)(`path`,{d:`m8.9 14.2 2 2 4.3-4.7`})]}):e===`test`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`path`,{d:`M9.2 4.8h5.6`}),(0,K.jsx)(`path`,{d:`M10.4 4.8v5.4l-4 6.8a1.8 1.8 0 0 0 1.6 2.7h8a1.8 1.8 0 0 0 1.6-2.7l-4-6.8V4.8`}),(0,K.jsx)(`path`,{d:`M8.2 15.8h7.6`})]}):e===`docs`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`path`,{d:`M7 4.8h7.2L18 8.6v10.6H7z`}),(0,K.jsx)(`path`,{d:`M14 4.8v4h4`}),(0,K.jsx)(`path`,{d:`M9.2 11.4h5.6`}),(0,K.jsx)(`path`,{d:`M9.2 14.2h5.6`}),(0,K.jsx)(`path`,{d:`M9.2 17h3.4`})]}):e===`planner`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`circle`,{cx:`7.2`,cy:`7.2`,r:`2.1`}),(0,K.jsx)(`circle`,{cx:`16.8`,cy:`7.2`,r:`2.1`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`16.8`,r:`2.1`}),(0,K.jsx)(`path`,{d:`M9 8.2h6`}),(0,K.jsx)(`path`,{d:`m8.5 9 2.4 5.4`}),(0,K.jsx)(`path`,{d:`m15.5 9-2.4 5.4`})]}):e===`summarizer`?(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`path`,{d:`M7 6.8h10`}),(0,K.jsx)(`path`,{d:`M7 10.4h8.2`}),(0,K.jsx)(`path`,{d:`M7 14h6.2`}),(0,K.jsx)(`path`,{d:`M7 17.6h4.2`})]}):(0,K.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`activity-subagent-avatar-svg`,children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`8.2`,r:`3.2`}),(0,K.jsx)(`path`,{d:`M6.5 19.2c.6-3 2.5-5 5.5-5s4.9 2 5.5 5`}),(0,K.jsx)(`path`,{d:`M5.2 11.8h2`}),(0,K.jsx)(`path`,{d:`M16.8 11.8h2`})]})}function wn(e){let t=new Map;for(let n of e){let e=n.openSession;e&&t.set(e.sessionId,{...t.get(e.sessionId),...e})}return[...t.values()].reverse()}function Tn(e){let t=`${En(e.roleId)} subagent`,n=e.status?.replace(/_/g,` `).trim();return n?`${t} (${n})`:t}function En(e){return Dn(e).split(/[-_]+/).filter(Boolean).map(e=>e.slice(0,1).toUpperCase()+e.slice(1)).join(` `)||`Subagent`}function Dn(e){let t=e?.trim().toLowerCase()||`subagent`;return/^[a-z][a-z0-9_-]*$/.test(t)?t:`subagent`}function On(e){let t=e?.trim().toLowerCase()||`unknown`;return/^[a-z][a-z0-9_-]*$/.test(t)?t:`unknown`}function kn({activity:e,defaultExpanded:t=!1}){let[n,r]=(0,G.useState)(t),i=(0,G.useId)(),a=Mn(e);return(0,K.jsxs)(`section`,{className:`harness-refiner-receipt ${e.state} ${e.result??``}`,children:[(0,K.jsxs)(`button`,{"aria-controls":a?i:void 0,"aria-expanded":a?n:void 0,className:`harness-refiner-receipt-summary`,disabled:!a,onClick:()=>a&&r(e=>!e),type:`button`,children:[(0,K.jsx)(E,{"aria-hidden":!0,className:e.state===`running`?`spinning`:void 0,size:12}),(0,K.jsx)(`span`,{children:ne(e)}),a?(0,K.jsx)(_,{"aria-hidden":!0,className:`harness-refiner-receipt-toggle ${n?`expanded`:``}`,size:13}):null]}),a&&n?(0,K.jsxs)(`div`,{className:`harness-refiner-receipt-details`,id:i,children:[(0,K.jsx)(An,{activity:e}),e.reason?(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`strong`,{children:`Reason`}),(0,K.jsx)(`p`,{children:e.reason})]}):null,e.expectedOutcome?(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`strong`,{children:`Expected outcome`}),(0,K.jsx)(`p`,{children:e.expectedOutcome})]}):null,e.evidenceBasis?(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`strong`,{children:`Evidence basis`}),(0,K.jsx)(`p`,{children:e.evidenceBasis.kind.replaceAll(`_`,` `)}),(0,K.jsxs)(`small`,{children:[e.evidenceBasis.supportingEvidenceIds.length,` supporting item`,e.evidenceBasis.supportingEvidenceIds.length===1?``:`s`,e.evidenceBasis.counterevidence.length?` · ${e.evidenceBasis.counterevidence.length} counterexample${e.evidenceBasis.counterevidence.length===1?``:`s`}`:` · no material counterevidence`]})]}):null,e.validations.length?(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`strong`,{children:`Validation`}),(0,K.jsx)(`div`,{className:`harness-refiner-validation-list`,children:e.validations.map(e=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`span`,{className:e.status,children:e.status}),(0,K.jsx)(`p`,{children:e.summary})]},e.id))})]}):null,e.edits.length?(0,K.jsxs)(`details`,{className:`harness-refiner-exact-edits`,children:[(0,K.jsxs)(`summary`,{children:[`Review `,e.edits.length,` exact edit`,e.edits.length===1?``:`s`]}),e.edits.map(e=>(0,K.jsxs)(`section`,{children:[(0,K.jsxs)(`strong`,{children:[e.operation,` · `,e.target]}),(0,K.jsx)(`p`,{children:e.summary}),e.content===null?(0,K.jsx)(`small`,{children:`File deleted.`}):(0,K.jsx)(`pre`,{children:e.content})]},e.id))]}):null,(0,K.jsx)(jn,{refs:e.refs})]}):null]})}function An({activity:e}){let t=[e.route?[e.decision===`route`?`Owner`:`Layer`,e.route]:null,e.operation?[`Operation`,e.operation]:null,e.target?[`Target`,e.target]:null,e.critiqueStatus===`not_applicable`?null:[`Critique`,e.critiqueStatus],e.validationStatus===`not_applicable`?null:[`Validation`,e.validationStatus]].filter(e=>!!e);return t.length?(0,K.jsx)(`dl`,{className:`harness-refiner-receipt-facts`,children:t.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{children:e}),(0,K.jsx)(`dd`,{children:t?.replaceAll(`_`,` `)})]},e))}):null}function jn({refs:e}){let t=Object.entries(e).filter(e=>!!e[1]);return t.length?(0,K.jsxs)(`details`,{className:`harness-refiner-references`,children:[(0,K.jsx)(`summary`,{children:`Receipt references`}),(0,K.jsx)(`dl`,{children:t.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`dt`,{children:Nn(e)}),(0,K.jsx)(`dd`,{children:(0,K.jsx)(`code`,{children:t})})]},e))})]}):null}function Mn(e){return e.state!==`running`&&!!(e.reason||e.expectedOutcome||e.route||e.operation||e.target||e.evidenceBasis||e.validations.length||e.edits.length||Object.values(e.refs).some(Boolean))}function Nn(e){let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`);return`${t[0]?.toUpperCase()??``}${t.slice(1)}`}var Pn=5,Fn=280;function In({activeWorkspaceAppId:e,connection:t,message:n,onOpenFileInSidebar:r,onOpenSession:i,onOpenPonder:a}){let o=n.activities??[],[s,c]=(0,G.useState)(!1),[l,u]=(0,G.useState)(null),d=(0,G.useId)(),p=(0,G.useMemo)(()=>ke(o,!1),[o]),m=(0,G.useMemo)(()=>xe(o,s),[o,s]),h=o.find(e=>e.imagePreview)?.imagePreview??null,g=n.deliverables??[],v=Se(o),y=ve(),b=y?.messageIds.has(n.id)||n.activityMessages?.some(e=>y?.messageIds.has(e.id)),x=ar(l,t,e),S=n.traceState===`running`,C=n.traceState===`failed`||n.traceState===`interrupted`,w=ye(n.traceStartedAt,n.traceCompletedAt),T=Jn(p.text,n.traceState,w,o),E=gn(o),D=E.length>0||!!n.activityMessages?.some(e=>e.taskMessage||e.taskMessagePresentation),O=wn(o),k=o.length>0&&o.every(e=>e.subagentMessage),A=m.toolCount>0||!!n.refinerActivity||!!n.activityMessages?.some(e=>e.taskMessage||e.taskMessagePresentation);return k&&!n.refinerActivity&&!n.activityMessages?(0,K.jsx)(Gn,{activities:o}):(0,K.jsx)(K.Fragment,{children:o.length>0||g.length>0||n.refinerActivity?(0,K.jsxs)(`article`,{className:`activity-group work-trace ${S?`running`:`settled`}`,children:[o.length>0||n.refinerActivity?(0,K.jsxs)(`div`,{className:`activity-summary-row`,children:[(0,K.jsxs)(W,{controls:A?d:void 0,danger:C,expanded:m.toolsExpanded,icon:h?(0,K.jsx)(nr,{activeWorkspaceAppId:e,connection:t,image:h}):(0,K.jsx)(rr,{kind:p.kind}),onToggle:A&&!D?()=>c(e=>!e):void 0,running:S,children:[D&&A?(0,K.jsx)(`button`,{type:`button`,className:`activity-summary-label-toggle`,"aria-expanded":s,"aria-controls":d,onClick:()=>c(e=>!e),children:T===`Ran`?`Ran commands`:T||`Worked`}):T===`Ran`?`Ran commands`:T||`Worked`,D?(0,K.jsx)(_n,{activities:o,messages:n.activityMessages??[],onToggle:()=>c(e=>!e),expanded:s,controls:d,connection:t,onOpenSession:i,onOpenPonder:a}):null]}),D&&A?(0,K.jsx)(`button`,{type:`button`,className:`activity-summary activity-tool-summary`,"aria-label":`Tool activity details`,"aria-expanded":s,"aria-controls":d,onClick:()=>c(e=>!e),children:(0,K.jsx)(_,{"aria-hidden":!0,className:`activity-summary-toggle ${s?`expanded`:``}`,size:14})}):null,O.length>0&&i&&!D?(0,K.jsx)(xn,{onOpenSession:i,onShowAll:()=>c(!0),sessions:O}):null]}):null,E.length?(0,K.jsx)(_n,{createdOnly:!0,activities:o,messages:n.activityMessages??[],connection:t,onOpenSession:i,onOpenPonder:a}):null,v&&!b?(0,K.jsx)(be,{entries:v}):null,g.length>0?(0,K.jsx)(Bn,{artifacts:g,connection:t,onOpenFileInSidebar:r}):null,s&&A?(0,K.jsx)(`div`,{className:`work-trace-flow`,id:d,children:(n.activityMessages??[n]).map(n=>n.role===`task_message`?(0,K.jsx)(zt,{message:n,connection:t,onOpenSession:i,onOpenPonder:a},n.id):(0,K.jsxs)(`div`,{className:`activity-tool-row`,children:[xe(n.activities??[],!0).visibleActivities.map(n=>(0,K.jsx)(Rn,{activeWorkspaceAppId:e,activity:n,connection:t,onOpenImage:u,onOpenSession:i},n.id)),(0,K.jsx)(Ln,{activity:n.refinerActivity})]},n.id))}):null,(0,K.jsx)(f,{open:!!x,src:x,title:l?.path??``,onClose:()=>u(null)})]}):null})}function Ln({activity:e}){return e?(0,K.jsx)(`article`,{className:`refiner-activity-row`,children:(0,K.jsx)(kn,{activity:e})}):null}function Rn({activeWorkspaceAppId:e,activity:t,connection:n,onOpenImage:r,onOpenSession:i}){let[a,o]=(0,G.useState)(!1),s=(0,G.useId)();return t.subagentMessage?(0,K.jsx)(Wn,{activity:t}):(0,K.jsxs)(`div`,{className:`activity-tool-row ${t.controlKind===`turn_aborted`?`danger`:``}`,children:[(0,K.jsx)(W,{className:`activity-tool-summary`,controls:s,danger:t.controlKind===`turn_aborted`||t.state===`failed`,running:t.state===`running`||t.state===`pending`,expanded:a,icon:t.kind===`command`?(0,K.jsx)(D,{"aria-hidden":!0,className:`activity-summary-kind-icon`,size:12}):t.action===`openpond_dataset`?(0,K.jsx)(M,{"aria-hidden":!0,className:`activity-summary-kind-icon`,size:12}):t.action===`openpond_experiment`?(0,K.jsx)(ce,{"aria-hidden":!0,className:`activity-summary-kind-icon`,size:12}):void 0,onToggle:()=>o(e=>!e),children:Zn(t)}),a?(0,K.jsx)(zn,{activeWorkspaceAppId:e,activity:t,connection:n,detailsId:s,onOpenImage:r,onOpenSession:i}):null]})}function zn({activeWorkspaceAppId:e,activity:t,connection:n,detailsId:r,onOpenImage:i,onOpenSession:a}){let o=ar(t.imagePreview??null,n,e);return(0,K.jsxs)(`div`,{className:`activity-tool-details`,id:r,children:[t.kind===`command`&&t.content?(0,K.jsx)(Qn,{command:t.content,exitCode:t.terminal?.exitCode,output:t.detail,state:t.state}):t.content?sr(t.content)?(0,K.jsx)(`pre`,{className:`activity-detail-output`,children:t.content}):(0,K.jsx)(`code`,{className:`activity-tool-content`,children:t.content}):null,t.detail&&t.kind!==`command`?(0,K.jsx)(`pre`,{className:`activity-detail-output`,children:t.detail.replace(/\r\n/g,`
3
+ `).trimEnd()}):null,t.meta?(0,K.jsx)(`small`,{className:`activity-detail-meta`,children:t.meta}):null,t.imagePreview&&o?(0,K.jsx)(`button`,{type:`button`,className:`activity-image-preview`,title:`Open ${t.imagePreview.path}`,onClick:()=>i(t.imagePreview??null),children:(0,K.jsx)(`img`,{alt:B(t.imagePreview.path),decoding:`async`,loading:`lazy`,src:o})}):null,t.openSession&&a?(0,K.jsx)(Sn,{className:`activity-subagent-detail-avatar`,openSession:t.openSession,onOpenSession:a}):null]})}function Bn({artifacts:e,connection:t,onOpenFileInSidebar:n}){return(0,K.jsx)(`div`,{className:`activity-artifact-list`,children:e.map(e=>e.contentType.startsWith(`video/`)?(0,K.jsx)(Hn,{artifact:e,connection:t,onOpenFileInSidebar:n},e.path):e.contentType.startsWith(`image/`)?(0,K.jsx)(Vn,{artifact:e,connection:t},e.path):(0,K.jsx)(Ce,{artifact:e,onOpenFileInSidebar:n},e.path))})}function Vn({artifact:e,connection:t}){let[n,r]=(0,G.useState)(!1),i=o(t,e.path);return(0,K.jsxs)(`div`,{className:`activity-artifact-image`,title:e.path,children:[(0,K.jsx)(`button`,{type:`button`,disabled:!i,onClick:()=>r(!0),title:`Open ${e.title}`,children:i?(0,K.jsx)(`img`,{alt:e.title,decoding:`async`,loading:`lazy`,src:i}):(0,K.jsx)(S,{"aria-hidden":!0,size:20})}),(0,K.jsx)(`strong`,{children:e.title}),(0,K.jsx)(f,{open:n&&!!i,src:i,title:e.title,onClose:()=>r(!1)})]})}function Hn({artifact:e,connection:t,onOpenFileInSidebar:n}){let r=(0,G.useRef)(null),[i,a]=(0,G.useState)(!1),o=vn(t,e.path);return(0,K.jsxs)(`div`,{className:`activity-artifact-video`,title:e.path,children:[(0,K.jsxs)(`div`,{className:`activity-artifact-video-stage`,children:[o?(0,K.jsx)(`video`,{controls:!0,onPlay:()=>a(!0),preload:`metadata`,ref:r,src:o}):(0,K.jsx)(`div`,{className:`activity-artifact-video-loading`,children:`Preparing video…`}),o&&!i?(0,K.jsx)(`button`,{type:`button`,className:`activity-artifact-video-play`,onClick:()=>{let e=r.current;e&&e.play().then(()=>a(!0)).catch(()=>void 0)},"aria-label":`Play ${e.title}`,children:(0,K.jsx)(T,{"aria-hidden":!0,fill:`currentColor`,size:22})}):null]}),(0,K.jsxs)(`div`,{className:`activity-artifact-video-footer`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`activity-artifact-video-file`,onClick:()=>void d(e.path),title:`Show ${e.path} in its folder`,children:[(0,K.jsx)(x,{"aria-hidden":!0,size:13}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`strong`,{children:e.title}),(0,K.jsx)(`code`,{children:e.path})]}),(0,K.jsx)(`small`,{children:e.sizeBytes==null?e.contentType:Un(e.sizeBytes)})]}),n?(0,K.jsxs)(`button`,{type:`button`,className:`activity-artifact-video-sidebar`,onClick:()=>n(e.path),title:`Open video in sidebar`,children:[(0,K.jsx)(N,{"aria-hidden":!0,size:13}),`Open in sidebar`]}):null]})]})}function Un(e){return e<1024?`${e} B`:e<1024**2?`${(e/1024).toFixed(1)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}function Wn({activity:e}){let[t,n]=(0,G.useState)(!1),r=e.subagentMessage;if(!r)return null;let i=`${En(r.roleId??e.openSession?.roleId)} subagent`,a=r.direction===`received`?`${i} update`:`Message to ${i.toLowerCase()}`,o=r.modelRef?.modelId?`${a} · ${r.modelRef.modelId}`:a,s=Kn(r),c=qn(r.body);return(0,K.jsx)(`div`,{className:`activity-child-message ${r.direction}`,children:(0,K.jsxs)(`div`,{className:`activity-child-message-card`,children:[(0,K.jsxs)(`div`,{className:`activity-child-message-header`,children:[(0,K.jsxs)(`span`,{className:`activity-child-message-title`,children:[(0,K.jsx)(g,{"aria-hidden":!0,size:14}),(0,K.jsx)(`strong`,{title:o,children:o})]}),(0,K.jsx)(`small`,{children:r.kind.replace(/_/g,` `)})]}),(0,K.jsx)(`p`,{className:c&&!t?`collapsed`:void 0,style:{"--subagent-message-visible-lines":Pn},children:r.body}),c?(0,K.jsx)(`button`,{type:`button`,className:`activity-child-message-toggle`,"aria-expanded":t,onClick:()=>n(e=>!e),children:t?`Show less`:`Show more`}):null,(0,K.jsxs)(`details`,{className:`activity-child-message-details`,children:[(0,K.jsx)(`summary`,{children:`Message details`}),(0,K.jsx)(`div`,{className:`activity-child-message-facts`,"aria-label":`Child message metadata`,children:s.map(e=>(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`small`,{children:e.label}),(0,K.jsx)(`code`,{title:e.value,children:e.value})]},e.label))})]}),r.refs?.length?(0,K.jsx)(`div`,{className:`activity-child-message-refs`,"aria-label":`Child message references`,children:r.refs.map(e=>(0,K.jsxs)(`span`,{children:[e.kind,`:`,e.id,` (`,e.label,`)`]},`${e.kind}:${e.id}`))}):null]})},e.id)}function Gn({activities:e}){let t=e[0]?.subagentMessage?.direction??`received`;return(0,K.jsx)(`article`,{className:`activity-child-message-group ${t}`,children:e.map(e=>(0,K.jsx)(Wn,{activity:e},e.id))})}function Kn(e){return[{label:`Message`,value:e.messageId},{label:`Kind`,value:e.kind},{label:`From`,value:e.fromRunId},e.roleId?{label:`Role`,value:e.roleId}:null,e.modelRef?{label:`Model`,value:`${e.modelRef.providerId}/${e.modelRef.modelId}`}:null,e.childSessionId?{label:`Child`,value:e.childSessionId}:null,e.toRunId?{label:`To run`,value:e.toRunId}:null,e.toRole?{label:`To role`,value:e.toRole}:null,e.deliveryStatus?{label:`Delivery`,value:e.deliveryStatus}:null,e.wakeReason?{label:`Wake`,value:e.wakeReason}:null,e.createdAt?{label:`Created`,value:e.createdAt}:null].filter(e=>!!e)}function qn(e){return e.length>Fn||e.split(/\r?\n/).length>Pn}function Jn(e,t,n,r){return t===`running`?Yn(r)||e||`Working…`:t===`failed`?`${n?`Failed after ${n}`:`Failed`}${e?` · ${e}`:``}`:t===`interrupted`?`${n?`Interrupted after ${n}`:`Interrupted`}${e?` · ${e}`:``}`:e}function Yn(e){let t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(r.kind!==`reasoning`&&(t??=r,r.state===`running`||r.state===`pending`))return Xn(r)}return t?Xn(t):null}function Xn(e){return e.kind===`command`?e.state===`failed`?`Command failed`:Me(e.content,e.state)??(e.state===`running`||e.state===`pending`?`Running command`:`Ran command`):e.label.trim()||null}function Zn(e){if(e.kind!==`command`)return e.label;if(e.state===`running`||e.state===`pending`)return Xn(e)??`Running command`;let t=$n(e.terminal?.durationMs);return e.state===`failed`?`Command failed${t?` in ${t}`:``}`:`${Xn(e)??`Ran command`}${t?` in ${t}`:``}`}function Qn({command:e,exitCode:t,output:n,state:r}){let i=r===`running`||r===`pending`?`Running…`:t==null?r===`completed`?`Exit code 0`:`Failed`:`Exit code ${t}`;return(0,K.jsxs)(`section`,{"aria-label":`Shell command output`,className:`activity-command-terminal ${r??`completed`}`,children:[(0,K.jsx)(`header`,{children:`Shell`}),(0,K.jsx)(`pre`,{children:(0,K.jsxs)(`code`,{className:`shell-command-code`,children:[(0,K.jsx)(`span`,{className:`activity-command-prompt`,"aria-hidden":!0,children:`$\xA0`}),er(e),n?(0,K.jsx)(`span`,{className:`activity-command-output`,children:`\n${n.replace(/\r\n/g,`
4
+ `).trimEnd()}`}):null]})}),(0,K.jsx)(`footer`,{children:i})]})}function $n(e){if(e==null||e<0)return null;if(e<6e4)return`${Math.max(1,Math.round(e/1e3))}s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n>0?`${t}m ${n}s`:`${t}m`}function er(e){return tr(e).map((e,t)=>(0,K.jsx)(`span`,{className:`shell-token ${e.kind}`,children:e.text},`${t}-${e.text}`))}function tr(e){let t=e.match(/"[^"]*"|'[^']*'|&&|\|\||[|;&()<>]|\s+|[^\s|;&()<>]+/g)??[e],n=!0;return t.map(e=>/^\s+$/.test(e)?{kind:`plain`,text:e}:/^(?:&&|\|\||[|;&()<>])$/.test(e)?(n=e!==`)`&&e!==`>`,{kind:`operator`,text:e}):/^(['"]).*\1$/.test(e)?{kind:`string`,text:e}:/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(e)?{kind:`variable`,text:e}:n?(n=!1,{kind:`command`,text:e}):/^-{1,2}[\w-]/.test(e)?{kind:`flag`,text:e}:/^(?:\.{0,2}\/|~\/|[\w.-]+\/)/.test(e)?{kind:`path`,text:e}:{kind:`plain`,text:e})}function nr({activeWorkspaceAppId:e,connection:t,image:n}){let r=ar(n,t,e);return r?(0,K.jsx)(`img`,{"aria-hidden":!0,className:`activity-summary-image`,decoding:`async`,loading:`lazy`,src:r,alt:``}):null}function rr({kind:e}){let t=ir(e);return(0,K.jsx)(t,{"aria-hidden":!0,className:`activity-summary-kind-icon ${e}`,size:14})}function ir(e){return e===`approval`||e===`control`?V:e===`edit`?ie:e===`image`?S:e===`list`?M:e===`read`?P:e===`reasoning`?Ee:e===`search`?re:e===`subagent`?g:e===`web`?R:D}function ar(e,t,n){let r=e&&or(e.path)?e.path:null,i=e?.appId??n,a=o(t,r),c=s(t,r?null:i,r?null:e?.path);return r?a:c}function or(e){return/^file:\/\//i.test(e)||e.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(e)}function sr(e){return e.includes(`
5
+ `)||e.length>160}function cr({summary:e,onOpenFileInSidebar:t}){let[n,r]=(0,G.useState)(null),i=`Workspace changes · ${e.filesChanged} ${e.filesChanged===1?`file`:`files`}`,a=e.files.reduce((e,t)=>{let n=ur(t);return{additions:e.additions+n.additions,deletions:e.deletions+n.deletions}},{additions:0,deletions:0});return(0,K.jsxs)(`div`,{className:`change-summary-card`,children:[(0,K.jsxs)(`div`,{className:`change-summary-header`,children:[(0,K.jsxs)(`span`,{children:[i,(0,K.jsx)(`br`,{}),(0,K.jsx)(`small`,{style:{color:`var(--text-muted)`},children:`May include edits from other chats or tools.`})]}),(0,K.jsxs)(`span`,{className:`change-summary-counts`,children:[(0,K.jsxs)(`span`,{className:`diff-addition`,children:[`+`,a.additions]}),(0,K.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,a.deletions]})]})]}),(0,K.jsx)(`div`,{className:`change-summary-files`,children:e.files.map(e=>(0,K.jsx)(lr,{file:e,onOpenFileInSidebar:t,open:n===e.path,onToggle:()=>r(t=>t===e.path?null:e.path)},e.path))})]})}function lr({file:e,onOpenFileInSidebar:t,open:n,onToggle:r}){let i=ur(e),a=fr(e.patch);return(0,K.jsxs)(`div`,{className:`change-summary-file`,children:[(0,K.jsxs)(`div`,{className:`change-summary-file-trigger`,children:[(0,K.jsx)(`button`,{type:`button`,className:`change-summary-file-toggle`,onClick:r,children:(0,K.jsx)(`span`,{children:e.path})}),(0,K.jsxs)(`span`,{className:`change-summary-counts`,children:[(0,K.jsxs)(`span`,{className:`diff-addition`,children:[`+`,i.additions]}),(0,K.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,i.deletions]})]}),t&&(0,K.jsx)(`button`,{type:`button`,className:`change-summary-open-file`,title:`Open in sidebar`,"aria-label":`Open ${e.path} in sidebar`,onClick:()=>t(e.path),children:(0,K.jsx)(h,{size:14})}),(0,K.jsx)(`button`,{type:`button`,className:`change-summary-expand-file`,title:n?`Hide patch`:`Show patch`,"aria-label":n?`Hide ${e.path} patch`:`Show ${e.path} patch`,onClick:r,children:(0,K.jsx)(_,{className:n?`expanded`:``,size:14})})]}),n&&a&&(0,K.jsx)(`div`,{className:`change-summary-patch-unavailable`,children:`Patch is no longer available for this workspace path.`}),n&&e.patch&&!a&&(0,K.jsx)(`pre`,{className:`change-summary-patch`,children:(0,K.jsx)(`code`,{children:e.patch})})]})}function ur(e){if((e.status===`added`||e.status===`untracked`)&&e.additions===0&&e.content)return{additions:dr(e.content),deletions:0};if(e.additions>0||e.deletions>0||!e.patch||fr(e.patch))return{additions:e.additions,deletions:e.deletions};let t=pr(e.patch);return t.additions>0||t.deletions>0?t:{additions:e.additions,deletions:e.deletions}}function dr(e){let t=e.endsWith(`
6
+ `)?e.slice(0,-1):e;return t?t.split(`
7
+ `).length:0}function fr(e){return/^error: Could not access /m.test(e)}function pr(e){let t=0,n=0;for(let r of e.split(`
8
+ `))r.startsWith(`+++`)||r.startsWith(`---`)||(r.startsWith(`+`)&&(t+=1),r.startsWith(`-`)&&(n+=1));return{additions:t,deletions:n}}function mr({run:e}){let t=e.plan,n=e.questions.find(e=>e.status===`pending`)??null,i=r(t?.metadata),a=e.target.kind===`agent`?null:e.sourceRefs[0]??t?.sourcePlan[0]?.path??null,o=e.checkRefs.length||t?.checks.length||0;return(0,K.jsxs)(`section`,{className:`chat-create-receipt`,"aria-label":`Create or improve status`,children:[(0,K.jsxs)(`div`,{className:`chat-create-receipt-heading`,children:[(0,K.jsx)(P,{size:14}),(0,K.jsx)(`span`,{children:hr(e)}),(0,K.jsx)(`small`,{children:e.target.kind})]}),(0,K.jsx)(`p`,{children:gr(e,t?.summary??null,n?.prompt??null)}),i||a||o?(0,K.jsxs)(`div`,{className:`chat-create-receipt-facts`,children:[i?(0,K.jsx)(`span`,{title:i.detail,children:i.label}):null,a?(0,K.jsx)(`span`,{title:a,children:a}):null,o?(0,K.jsxs)(`span`,{children:[o,` Evals`]}):null]}):null]})}function hr(e){let t=e.target.kind===`agent`;return e.state===`awaiting_questions`?`Question ready`:e.state===`awaiting_plan_approval`?`Plan ready`:e.state===`applying_source`?t?`Saving Agent`:`Applying source`:e.state===`running_checks`?`Running Evals`:e.state===`evaluating`?t?`Checking Agent`:`Evaluating candidate`:e.state===`awaiting_promotion`?t?`Update ready`:`Candidate ready`:e.state===`opening_pull_request`?`Opening review`:e.state===`pull_request_open`?`Review open`:e.state===`reconciling_release`?t?`Applying update`:`Merging change`:e.state===`released`?t?`Agent updated`:`Released`:e.state===`rejected`?t?`Current Agent kept`:`Rejected`:e.state===`ready`||e.state===`ready_local`?t?`Agent ready`:`Workproduct ready`:e.state===`published_hosted`?`Published`:e.state===`cancelled`?`Cancelled`:e.state===`blocked`?`Blocked`:e.state===`failed`?`Failed`:e.operation===`improve`?`Planning improvement`:`Planning creation`}function gr(e,t,n){return e.state===`awaiting_questions`&&n?n:t||(e.blockedReason?e.blockedReason:e.state===`ready`||e.state===`ready_local`?e.target.kind===`agent`?`The Agent and its actions are ready to use.`:`The candidate and its Evals are ready.`:e.state===`awaiting_promotion`?e.target.kind===`agent`?`The updated Agent passed its Evals. Apply the update or keep the current version.`:`The candidate has been committed and evaluated. Merge or reject it.`:e.state===`pull_request_open`&&e.releaseOutcome.pullRequest?e.target.kind===`agent`?`The Agent update review is waiting to finish or close.`:`The external review is waiting for merge or closure.`:e.state===`released`?e.target.kind===`agent`?`The Agent update is saved and its Evals passed.`:`The change merged and the active Profile passed its post-merge Evals.`:e.state===`rejected`?e.blockedReason??(e.target.kind===`agent`?`The Agent update was not applied.`:`The candidate was rejected.`):`Preparing work for ${e.objective}.`)}function _r(e,t){let n=vr(e),[r,i]=(0,G.useState)(()=>n.getUrl(t));return(0,G.useEffect)(()=>{let e=!1;return i(n.getUrl(t)),n.loadUrl(t).then(t=>{e||i(t)}),()=>{e=!0}},[t,n]),r}function vr(e){let[,t]=(0,G.useState)(0),n=(0,G.useCallback)(t=>!e||!t?null:(H.activateConnection(e),H.get(yr(e,t))),[e]),r=(0,G.useCallback)(async n=>{if(!e||!n)return null;let r=yr(e,n);return H.activateConnection(e),H.load(r,()=>I.signChatAttachmentImageUrl(e,n)).finally(()=>t(e=>e+1))},[e]);return(0,G.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}function yr(e,t){return F(e,`chat-attachment-image`,t.sessionId,t.turnId,t.attachmentId,t.storageName,t.contentType)}function br({attachments:e,compact:t,connection:n,onOpenAttachment:r}){return(0,K.jsx)(`div`,{className:`user-message-attachments${t?` compact`:``}`,"aria-label":`Attached files`,children:e.map(e=>(0,K.jsx)(xr,{attachment:e,connection:n,onOpenAttachment:r},e.id))})}function xr({attachment:e,connection:t,onOpenAttachment:n}){return e.kind===`image`&&e.imagePreview?(0,K.jsx)(Cr,{attachment:e,connection:t,onOpenAttachment:n}):(0,K.jsx)(Sr,{attachment:e,onOpenAttachment:n})}function Sr({attachment:e,onOpenAttachment:t}){let[n,r]=(0,G.useState)(!1),i=!!((e.filePreview||e.imagePreview)&&t),a=n?`Opening`:e.lineCount===void 0?null:ge(e.lineCount),o=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_e,{attachment:e,size:13}),(0,K.jsx)(`span`,{children:e.name}),a?(0,K.jsx)(`small`,{children:a}):null]});return i?(0,K.jsx)(`button`,{"aria-label":`Open attached file ${e.name}`,className:`user-message-attachment openable`,disabled:n,title:`Open ${e.name}`,type:`button`,onClick:()=>{t&&!n&&(r(!0),t(e).finally(()=>r(!1)))},children:o}):(0,K.jsx)(`span`,{className:`user-message-attachment`,title:e.name,children:o})}function Cr({attachment:e,connection:t,onOpenAttachment:n}){let r=_r(t,e.imagePreview),[i,a]=(0,G.useState)(!1);return(0,K.jsx)(`button`,{className:`user-message-image-attachment`,"aria-label":`Open attached image ${e.name}`,"aria-busy":i,disabled:!n||i,title:i?`Opening ${e.name}`:`Open ${e.name}`,type:`button`,onClick:()=>{n&&!i&&(a(!0),n(e).finally(()=>a(!1)))},children:r?(0,K.jsx)(`img`,{alt:``,decoding:`async`,loading:`lazy`,src:r}):(0,K.jsx)(S,{size:24})})}var wr=(0,G.memo)(function({activeWorkspaceAppId:e=null,animateInitialContent:t=!1,accountBaseUrl:n=null,billingOrganizationSlug:r=null,billingTeamId:i=null,connection:a=null,conversationLinks:o,message:s,kvCacheSummary:c=null,onOpenBrowserLink:l,onOpenAttachmentInSidebar:u,onOpenFileInSidebar:d,onOpenProfileSettings:f,onResolveUserQuestion:p,onOpenSession:h,onOpenPonder:g,showFooter:_=!0,userAttachmentDisplay:v=`full`,workspaceRootPath:y=null}){if(s.nativeTaskNotification)return(0,K.jsx)(`div`,{className:`message-row assistant`,children:(0,K.jsx)(Dt,{notification:s.nativeTaskNotification,onOpenFile:d})});if(s.role===`resources`)return(0,K.jsx)(`article`,{className:`message-row assistant`,"data-resource-response":s.turnId,children:(0,K.jsx)(Mt,{resources:s.resources??[],connection:a,context:s.resourceSessionId&&s.turnId?{sessionId:s.resourceSessionId,turnId:s.turnId}:void 0})});if(s.role===`visual`&&s.visual)return(0,K.jsx)(`article`,{className:`message-row assistant`,"data-notification-turn":s.turnId,"data-notification-final":s.finalAnswer?`true`:void 0,children:(0,K.jsx)(pe,{visual:s.visual,connection:a},s.visual.publicationId)});if(s.role===`task_message`)return(0,K.jsx)(zt,{message:s,onOpenSession:h,onOpenPonder:g,connection:a});if(s.role===`status_divider`)return(0,K.jsx)(Ir,{message:s});if(s.role===`activity_group`)return(0,K.jsx)(In,{activeWorkspaceAppId:e,connection:a,message:s,onOpenFileInSidebar:d,onOpenSession:h,onOpenPonder:g});if(s.role===`error`)return s.errorKind===`opchat_quota_exceeded`?(0,K.jsx)(`article`,{className:`message-row assistant`,"data-notification-turn":s.turnId,"data-notification-final":s.finalAnswer?`true`:void 0,children:(0,K.jsx)(Nr,{accountBaseUrl:n,billingOrganizationSlug:r,billingTeamId:i,onOpenBrowserLink:l})}):(0,K.jsx)(`article`,{className:`message-row assistant`,"data-notification-turn":s.turnId,"data-notification-final":s.finalAnswer?`true`:void 0,children:(0,K.jsx)(`div`,{className:`assistant-message error-message`,children:s.content??``})});if(s.role===`user`){let e=Ft(s.content??``),t=s.attachments??[],n=v===`compact`,r=t.length>0;return!e&&!r?null:(0,K.jsx)(`article`,{className:`message-row user`,children:(0,K.jsxs)(`div`,{className:`user-message ${r?`has-attachments`:``}`,children:[t.length?(0,K.jsx)(br,{attachments:t,compact:n,connection:a,onOpenAttachment:u}):null,e?(0,K.jsx)(Bt,{content:e}):null]})})}let b=s.actionRun&&ln(s.actionRun)?un(s.actionRun):null;return(0,K.jsx)(`article`,{className:`message-row assistant`,"data-notification-turn":s.turnId,"data-notification-final":s.finalAnswer?`true`:void 0,children:(0,K.jsxs)(sn,{activeWorkspaceAppId:e,animateInitialContent:t,connection:a,content:s.content,reasoningContent:s.reasoningContent,conversationLinks:o,onOpenConversation:h,onOpenBrowserLink:l,onOpenFileInSidebar:d,workspaceRootPath:y,footer:_&&s.finalAnswer?(0,K.jsx)(It,{content:s.content,timestamp:s.timestamp,kvCacheSummary:c}):null,children:[s.sources?.length?(0,K.jsx)(Or,{sources:s.sources,onOpenBrowserLink:l}):null,s.actionRun&&ln(s.actionRun)?(0,K.jsxs)(`div`,{className:`assistant-message action-run-profile-message ${s.actionRun.status}`,children:[(0,K.jsx)(m,{activeWorkspaceAppId:e,connection:a,content:s.actionRun.responseText??dn(s.actionRun),onOpenBrowserLink:l,onOpenFileInSidebar:d,workspaceRootPath:y}),b?(0,K.jsx)(`div`,{className:`action-run-agent-label`,children:f?(0,K.jsx)(`button`,{type:`button`,className:`action-run-agent-link`,onClick:f,children:b}):(0,K.jsx)(`span`,{children:b})}):null]}):s.actionRun?(0,K.jsx)(cn,{actionRun:s.actionRun,onOpenBrowserLink:l,onOpenFileInSidebar:d,workspaceRootPath:y}):null,s.changeSummary&&(0,K.jsx)(cr,{summary:s.changeSummary,onOpenFileInSidebar:d}),s.createImproveRun?(0,K.jsx)(mr,{run:s.createImproveRun}):null,s.userQuestion?(0,K.jsx)(Dr,{question:s.userQuestion,onResolve:p}):null]})})},Tr);function Tr(e,t){return e.activeWorkspaceAppId===t.activeWorkspaceAppId&&e.animateInitialContent===t.animateInitialContent&&e.accountBaseUrl===t.accountBaseUrl&&e.billingOrganizationSlug===t.billingOrganizationSlug&&e.billingTeamId===t.billingTeamId&&e.connection===t.connection&&e.kvCacheSummary===t.kvCacheSummary&&e.onOpenBrowserLink===t.onOpenBrowserLink&&e.onOpenAttachmentInSidebar===t.onOpenAttachmentInSidebar&&e.onOpenFileInSidebar===t.onOpenFileInSidebar&&e.onOpenProfileSettings===t.onOpenProfileSettings&&e.onResolveUserQuestion===t.onResolveUserQuestion&&e.onOpenSession===t.onOpenSession&&e.showFooter===t.showFooter&&e.userAttachmentDisplay===t.userAttachmentDisplay&&e.workspaceRootPath===t.workspaceRootPath&&Er(e.message,t.message)}function Er(e,t){return e===t||e.id===t.id&&e.role===t.role&&e.visual?.publicationId===t.visual?.publicationId&&e.content===t.content&&e.finalAnswer===t.finalAnswer&&e.nativeTaskNotification===t.nativeTaskNotification&&e.timestamp===t.timestamp&&e.turnId===t.turnId&&e.statusKind===t.statusKind&&e.statusState===t.statusState&&e.statusTone===t.statusTone&&e.errorKind===t.errorKind&&Pr(e.attachments,t.attachments)&&e.activities===t.activities&&e.resources===t.resources&&e.sources===t.sources&&e.actionRun===t.actionRun&&e.changeSummary===t.changeSummary&&e.createImproveRun===t.createImproveRun&&e.userQuestion===t.userQuestion&&e.reasoningContent===t.reasoningContent&&e.taskMessage===t.taskMessage&&e.taskMessagePresentation===t.taskMessagePresentation}function Dr({question:e,onResolve:t}){let[n,r]=(0,G.useState)(``),[i,a]=(0,G.useState)(!1),o=async n=>{if(t&&!i&&e.status===`pending`){a(!0);try{await t(e,n)}finally{a(!1)}}};return(0,K.jsxs)(`section`,{"data-notification-question":e.id,className:`user-question-card ${e.status}`,"aria-label":`Question from OpenPond`,children:[(0,K.jsxs)(`header`,{className:`user-question-header`,children:[(0,K.jsx)(`span`,{className:`user-question-icon`,"aria-hidden":!0,children:(0,K.jsx)(j,{size:17})}),(0,K.jsxs)(`span`,{className:`user-question-heading`,children:[(0,K.jsx)(`span`,{className:`user-question-eyebrow`,children:`Question`}),(0,K.jsx)(`strong`,{children:e.question})]})]}),e.reason?(0,K.jsx)(`p`,{className:`user-question-reason`,children:e.reason}):null,e.status===`pending`?(0,K.jsxs)(K.Fragment,{children:[e.options.length>0?(0,K.jsx)(`div`,{className:`user-question-options`,children:e.options.map((n,r)=>(0,K.jsxs)(`button`,{disabled:i||!t,type:`button`,onClick:()=>void o({questionId:e.id,action:`answer`,optionId:n.id,text:n.label}),children:[(0,K.jsx)(`span`,{className:`user-question-option-index`,"aria-hidden":!0,children:r+1}),(0,K.jsxs)(`span`,{className:`user-question-option-copy`,children:[(0,K.jsx)(`span`,{children:n.label}),n.description?(0,K.jsx)(`small`,{children:n.description}):null]})]},n.id))}):null,e.allowFreeform?(0,K.jsxs)(`form`,{className:`user-question-freeform`,onSubmit:t=>{t.preventDefault();let r=n.trim();r&&o({questionId:e.id,action:`answer`,optionId:null,text:r})},children:[(0,K.jsx)(`label`,{htmlFor:`question-answer-${e.id}`,children:`Or write your own answer`}),(0,K.jsxs)(`span`,{className:`user-question-freeform-controls`,children:[(0,K.jsx)(`input`,{"aria-label":`Answer`,disabled:i||!t,id:`question-answer-${e.id}`,onChange:e=>r(e.target.value),placeholder:`Type an answer`,value:n}),(0,K.jsx)(`button`,{disabled:i||!t||!n.trim(),type:`submit`,children:i?`Sending…`:`Answer`})]})]}):null,(0,K.jsx)(`button`,{className:`user-question-dismiss`,disabled:i||!t,type:`button`,onClick:()=>void o({questionId:e.id,action:`dismiss`,optionId:null,text:``}),children:`Skip for now`})]}):(0,K.jsxs)(`span`,{className:`user-question-resolution`,children:[(0,K.jsx)(de,{"aria-hidden":!0,size:15}),(0,K.jsx)(`small`,{children:e.status===`answered`?`Answered${e.answer?.text?`: ${e.answer.text}`:``}`:`Skipped`})]})]})}function Or({sources:e,onOpenBrowserLink:t}){return(0,K.jsx)(`div`,{className:`assistant-sources`,"aria-label":`Sources`,children:(0,K.jsx)(`div`,{className:`assistant-source-stack`,children:e.map(e=>(0,K.jsx)(kr,{source:e,onOpenBrowserLink:t},`${e.id}:${e.url}`))})})}function kr({source:e,onOpenBrowserLink:t}){let n=jr(e),r=[e.title,Mr(e.url)].filter(Boolean).join(` - `),i=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ar,{source:e}),(0,K.jsx)(`span`,{children:n})]});return t?(0,K.jsx)(`button`,{type:`button`,className:`assistant-source-pill`,title:r||n,"aria-label":`Open source ${n}`,onClick:()=>t(e.url,{newTab:!0}),children:i}):(0,K.jsx)(`a`,{className:`assistant-source-pill`,href:e.url,target:`_blank`,rel:`noreferrer`,title:r||n,"aria-label":`Open source ${n}`,children:i})}function Ar({source:e}){let[t,n]=(0,G.useState)(!1);return!e.faviconUrl||t?(0,K.jsx)(R,{className:`assistant-source-fallback-icon`,size:13}):(0,K.jsx)(`img`,{alt:``,"aria-hidden":`true`,className:`assistant-source-favicon`,decoding:`async`,loading:`lazy`,src:e.faviconUrl,onError:()=>n(!0)})}function jr(e){return e.sourceName?.trim()||Mr(e.url)||e.title}function Mr(e){try{return new URL(e).hostname.replace(/^www\./i,``)}catch{return null}}function Nr({accountBaseUrl:e,billingOrganizationSlug:t,billingTeamId:n,onOpenBrowserLink:r}){let i=se({accountBaseUrl:e,organizationSlug:t,teamId:n}),a=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(ue,{size:15}),(0,K.jsx)(`span`,{children:`Add credits`}),(0,K.jsx)(b,{size:13})]});return(0,K.jsxs)(`div`,{className:`assistant-message quota-error-card`,role:`alert`,children:[(0,K.jsx)(`div`,{className:`quota-error-card-icon`,children:(0,K.jsx)(ue,{size:17})}),(0,K.jsxs)(`div`,{className:`quota-error-card-body`,children:[(0,K.jsx)(`strong`,{children:`OpenPond Chat allowance reached`}),(0,K.jsx)(`p`,{children:`You have reached your OpChat token allowance for this period. Add credits or wait for the allowance to reset.`}),r?(0,K.jsx)(`button`,{type:`button`,className:`quota-error-card-action`,onClick:()=>r(i,{newTab:!0}),children:a}):(0,K.jsx)(`a`,{className:`quota-error-card-action`,href:i,target:`_blank`,rel:`noreferrer`,children:a})]})]})}function Pr(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r.id!==i.id||r.kind!==i.kind||r.name!==i.name||r.mediaType!==i.mediaType||r.sizeBytes!==i.sizeBytes||r.lineCount!==i.lineCount||r.imagePreview?.sessionId!==i.imagePreview?.sessionId||r.imagePreview?.turnId!==i.imagePreview?.turnId||r.imagePreview?.attachmentId!==i.imagePreview?.attachmentId||r.imagePreview?.storageName!==i.imagePreview?.storageName||r.imagePreview?.contentType!==i.imagePreview?.contentType||r.filePreview?.sessionId!==i.filePreview?.sessionId||r.filePreview?.turnId!==i.filePreview?.turnId||r.filePreview?.attachmentId!==i.filePreview?.attachmentId||r.filePreview?.storageName!==i.filePreview?.storageName||r.filePreview?.contentType!==i.filePreview?.contentType)return!1}return!0}var Fr=(0,G.memo)(function(){return(0,K.jsx)(`article`,{className:`activity-group thinking-row`,"aria-live":`polite`,children:(0,K.jsx)(W,{running:!0,children:`Thinking…`})})});function Ir({message:e}){let t=e.statusTone??`info`,n=e.statusState??`idle`;return(0,K.jsx)(`article`,{className:`status-divider ${t} ${n}`,"aria-live":t===`danger`?`assertive`:`polite`,children:(0,K.jsx)(`span`,{children:e.content??``})})}function Lr({row:e,renderMessage:t}){let[n,r]=(0,G.useState)(!1),i=(0,G.useId)(),a=(0,G.useMemo)(()=>e.type===`work`?Et(e.messages):[],[e]);return e.type===`thinking`?(0,K.jsx)(Fr,{}):e.type===`message`?t(e):(0,K.jsxs)(`div`,{className:`chat-work-history`,children:[(0,K.jsx)(W,{className:`chat-work-history-summary`,controls:i,expanded:n,onToggle:()=>r(e=>!e),children:e.label}),n?(0,K.jsx)(`div`,{className:`chat-work-history-content`,id:i,children:a.map(e=>(0,K.jsx)(`div`,{children:t(e)},e.id))}):null]})}export{St as i,wr as n,Tt as r,Lr as t};
@@ -0,0 +1 @@
1
+ .chat-resource-summary{width:100%;color:var(--text-primary);margin-block:12px;container-type:inline-size}.chat-resource-toolbar{border:1px solid var(--border-default);background:var(--surface-panel);border-bottom:0;border-radius:8px 8px 0 0;flex-wrap:nowrap;align-items:center;gap:8px;min-width:0;padding:4px 6px;display:flex}.chat-resource-toolbar>strong{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:12px;font-weight:500;overflow:hidden}.chat-resource-version,.chat-resource-toolbar-summary{color:var(--text-muted);white-space:nowrap;font-size:12px}.chat-resource-toolbar-summary{text-overflow:ellipsis;flex:none;max-width:50%;overflow:hidden}.chat-resource-toolbar .dropdown-select{flex:none}.chat-resource-toolbar .dropdown-trigger,.chat-resource-toolbar-primary{min-height:28px;padding:4px 6px;font-size:12px}.chat-resource-toolbar-primary{color:var(--text-primary);background:0 0;border:0;border-radius:5px;flex:none}.chat-resource-toolbar-primary:hover{background:var(--surface-raised)}.chat-resource-toolbar-primary:disabled{opacity:.5}.chat-resource-details{border:1px solid var(--border-default);border-bottom:0;padding:10px 12px;font-size:12px}.chat-resource-details dl{grid-template-columns:max-content minmax(0,1fr);gap:6px 16px;margin:0;display:grid}.chat-resource-details dt{color:var(--text-muted)}.chat-resource-details dd{overflow-wrap:anywhere;margin:0}.chat-resource-table{border:1px solid var(--border-default);border-radius:0 0 8px 8px;max-height:240px;overflow:auto}.chat-resource-table.expanded{max-height:min(440px,55vh)}.chat-resource-table table{table-layout:fixed;width:100%}.chat-resource-table th{background:var(--surface-panel);position:sticky;top:0}.chat-resource-table td{overflow-wrap:anywhere;vertical-align:top}.chat-resource-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.chat-resource-run-setup{background:var(--surface-panel);border-radius:8px;flex-wrap:wrap;align-items:end;gap:12px;margin-top:12px;padding:12px;display:flex}.chat-resource-run-setup>p{width:100%;margin:0;font-size:12px}.chat-resource-run-setup label{flex-direction:column;gap:5px;font-size:12px;display:flex}.chat-resource-run-setup input{background:var(--surface-page);width:120px;color:var(--text-primary);border:1px solid var(--border-default);border-radius:6px;padding:6px}.chat-resource-checks{padding:12px;font-size:12px}.chat-resource-error{color:var(--status-danger);font-size:12px}@container (width<=420px){.chat-resource-toolbar{gap:4px}.chat-resource-toolbar-primary{display:none}}@media (pointer:coarse){.chat-resource-toolbar .dropdown-trigger,.chat-resource-toolbar-primary{min-height:44px}}.chat-resource-grader-editor{background:var(--surface-panel);border-radius:8px;margin-top:12px;padding:12px}.chat-resource-grader-editor textarea{width:100%;min-height:140px}.chat-resource-summary.compact .chat-resource-toolbar{border-bottom:1px solid var(--border-default);border-radius:8px}.chat-resource-group-details{border-left:1px solid var(--border-default);padding-inline:8px}.chat-resource-table .training-data-table :is(th,td){padding:5px 8px;font-size:12px;line-height:1.4}.chat-resource-table td{text-overflow:ellipsis;white-space:nowrap;max-height:3em;overflow:hidden}.chat-resource-pagination{color:var(--text-muted);justify-content:flex-end;align-items:center;gap:8px;padding:4px;font-size:12px;display:flex}.chat-resource-pagination button{color:var(--text-primary);font:inherit;background:0 0;border:0;padding:4px}.chat-resource-pagination button:disabled{opacity:.4}.composer-experiment-create{align-items:center;gap:5px;display:inline-flex}
@@ -1 +1 @@
1
- import{m as e}from"./index-BsPUniZy.js";import"./icons-kaq6k88m.js";import{Fn as t}from"./App-Yy3l2sdD.js";var n=e();function r({onSelect:e,view:r}){return(0,n.jsxs)(`nav`,{className:`collaboration-tabs`,"aria-label":`Collaboration`,children:[(0,n.jsx)(`button`,{"aria-current":r===`team`?`page`:void 0,className:r===`team`?`active`:``,onClick:()=>e(`team`),type:`button`,children:(0,n.jsx)(`span`,{children:`Team chat`})}),(0,n.jsxs)(`button`,{"aria-current":r===`community`?`page`:void 0,className:r===`community`?`active`:``,onClick:()=>e(`community`),type:`button`,children:[(0,n.jsx)(t,{size:15}),(0,n.jsx)(`span`,{children:`Communities`})]})]})}export{r as CollaborationTabs};
1
+ import{m as e}from"./index-D9WbJMSq.js";import"./icons-D7jkCa2d.js";import{en as t}from"./App-DY2R8Z6r.js";var n=e();function r({onSelect:e,view:r}){return(0,n.jsxs)(`nav`,{className:`collaboration-tabs`,"aria-label":`Collaboration`,children:[(0,n.jsx)(`button`,{"aria-current":r===`team`?`page`:void 0,className:r===`team`?`active`:``,onClick:()=>e(`team`),type:`button`,children:(0,n.jsx)(`span`,{children:`Team chat`})}),(0,n.jsxs)(`button`,{"aria-current":r===`community`?`page`:void 0,className:r===`community`?`active`:``,onClick:()=>e(`community`),type:`button`,children:[(0,n.jsx)(t,{size:15}),(0,n.jsx)(`span`,{children:`Communities`})]})]})}export{r as CollaborationTabs};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{h as r,m as i}from"./app-models-CUA9XB9U.js";import"./icons-D7jkCa2d.js";import{t as a}from"./message-square-CvgSecgD.js";import{E as o,Gt as s,Ht as c,Yt as l,_n as u,cn as d,in as f}from"./App-DY2R8Z6r.js";var p=e(t(),1),m=n();function h({open:e,query:t,projects:n,sessions:r,onQueryChange:h,onClose:v,onNewChat:x,onOpenProject:S,onOpenSession:C}){let w=t.trim().toLowerCase(),T=(0,p.useMemo)(()=>g(r,w,10),[w,r]),E=(0,p.useMemo)(()=>_(n,w,8),[w,n]);if(!e)return null;let D=()=>{let e=E[0];if(e){S(e);return}let t=T[0];t&&C(t)};return(0,m.jsx)(`div`,{className:`command-overlay`,role:`presentation`,onMouseDown:v,children:(0,m.jsxs)(`section`,{className:`command-menu`,role:`dialog`,"aria-modal":`true`,"aria-label":`Search chats and projects`,onMouseDown:e=>e.stopPropagation(),children:[(0,m.jsxs)(`div`,{className:`command-input-row`,children:[(0,m.jsx)(s,{size:17}),(0,m.jsx)(`input`,{autoFocus:!0,value:t,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),D()),e.key===`Escape`&&(e.preventDefault(),v())},placeholder:`Search chats and projects`}),(0,m.jsx)(`kbd`,{children:`Esc`})]}),(0,m.jsxs)(`div`,{className:`command-results`,children:[(0,m.jsxs)(`button`,{className:`command-result command-create`,onClick:x,children:[(0,m.jsx)(c,{size:15}),(0,m.jsx)(`span`,{children:`New local task`}),(0,m.jsx)(`small`,{children:`General`})]}),(0,m.jsxs)(b,{label:`Projects`,children:[E.map(e=>(0,m.jsxs)(`button`,{className:`command-result`,onClick:()=>S(e),children:[i(e)?(0,m.jsx)(d,{size:15}):(0,m.jsx)(f,{size:15}),(0,m.jsx)(`span`,{children:e.project.name}),(0,m.jsx)(`small`,{children:y(e)})]},e.project.id)),E.length===0&&(0,m.jsx)(`div`,{className:`command-empty`,children:`No projects found`})]}),(0,m.jsxs)(b,{label:`Chats`,children:[T.map(e=>(0,m.jsxs)(`button`,{className:`command-result`,onClick:()=>C(e),children:[e.pinned?(0,m.jsx)(l,{size:15}):e.savedForLater?(0,m.jsx)(u,{size:15}):(0,m.jsx)(a,{size:15}),(0,m.jsx)(`span`,{children:e.title}),(0,m.jsx)(`small`,{children:e.appName??o(e.updatedAt)})]},e.id)),T.length===0&&(0,m.jsx)(`div`,{className:`command-empty`,children:`No chats found`})]})]})]})})}function g(e,t,n){let r=[];for(let i of e)if((!t||`${i.title} ${i.appName??``}`.toLowerCase().includes(t))&&(r.push(i),r.length>=n))break;return r}function _(e,t,n){let r=[];for(let i of e)if((!t||v(i).toLowerCase().includes(t))&&(r.push(i),r.length>=n))break;return r}function v(e){return r(e)?`${e.project.name} ${e.project.path} ${e.project.workspacePath}`:`${e.project.name} ${e.project.sourceLabel??``} ${e.project.organizationName??``}`}function y(e){return i(e)?e.project.organizationName??`Cloud Project`:e.project.linkedOpenPondApp?`OpenPond project`:e.project.source===`git`?`Local Git`:`Local folder`}function b({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`command-group`,children:[(0,m.jsx)(`div`,{className:`command-group-label`,children:e}),t]})}export{h as CommandMenu};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{o as r,r as i,t as a}from"./ComposerAttachments-RXCiE88M.js";import"./icons-D7jkCa2d.js";import{F as o,x as s}from"./training-model-data-DB-jg6L_.js";import{i as c,n as l,r as u,t as d}from"./wifi-off-Cloe0WuQ.js";import{t as f}from"./paperclip-BJ2QgJLa.js";import{t as p}from"./refresh-cw-Dga35Eay.js";import{t as m}from"./x-Dqpel42h.js";import{r as h}from"./AppToastContext-BiQbbVxq.js";import{Bt as g,Ht as _,Vt as v}from"./App-DY2R8Z6r.js";import{X as y,k as b,q as x}from"./MainPane-6OlLiKKb.js";var S=e(t(),1),C=n(),w=2e4,T=10,E=12582912,D=new Set([`image/png`,`image/jpeg`,`image/webp`,`image/gif`]);function O(e){let[t,n]=(0,S.useState)(``),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)(null),[p,h]=(0,S.useState)(!1),[_,v]=(0,S.useState)([]),[x,O]=(0,S.useState)(0),[N,P]=(0,S.useState)(null),F=(0,S.useRef)(null),I=(0,S.useRef)(null),L=(0,S.useRef)(c);L.current=c;let R=(0,S.useMemo)(()=>k(t,o),[t,o]),z=R?`${R.start}:${R.end}:${R.query}`:null,B=R?.query??null,V=(0,S.useMemo)(()=>{if(!R)return[];let t=new Map;for(let n of[...e.members,..._])t.set(n.userId,n);let n=R.query.toLowerCase();return[...t.values()].filter(e=>`${e.handle??``} ${e.name??``}`.toLowerCase().includes(n)).slice(0,8)},[R,e.members,_]),H=!!(R&&z!==N&&V.length>0),U=!!(e.disabled||e.busy||p),W=!U&&(!!t.trim()||c.length>0);(0,S.useEffect)(()=>{if(B==null){v([]);return}let t=!0,n=window.setTimeout(()=>{e.onSearchMembers(B).then(e=>{t&&v(e)},()=>{t&&v([])})},150);return()=>{t=!1,window.clearTimeout(n)}},[B,e.onSearchMembers]),(0,S.useEffect)(()=>{O(0)},[z]),(0,S.useEffect)(()=>()=>M(L.current),[]);async function G(i){if(i?.preventDefault(),W){d(null),h(!0);try{let i=await Promise.all(c.map(r));if(!await e.onSend({body:t,mentionUserIds:A(t,e.members),attachments:i,replyToMessageId:e.replyTo?.id??null}))return;M(c),n(``),s(0),l([]),e.onCancelReply()}catch(e){d(e instanceof Error?e.message:String(e))}finally{h(!1)}}}function K(e){if(H){if(e.key===`ArrowDown`){e.preventDefault(),O(e=>(e+1)%V.length);return}if(e.key===`ArrowUp`){e.preventDefault(),O(e=>(e-1+V.length)%V.length);return}if(e.key===`Enter`||e.key===`Tab`){e.preventDefault(),X(V[x]??V[0]);return}if(e.key===`Escape`){e.preventDefault(),P(z);return}}e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),G())}function q(e){if(!e)return;d(null);let t=Math.max(0,T-c.length);if(t===0){d(`You can attach up to ${T} images.`),Y();return}let n=[...e],r=n.slice(0,t),a=r.find(e=>!D.has(e.type)),o=r.find(e=>e.size<=0||e.size>E);if(a){d(`${a.name} is not a supported image type.`),Y();return}if(o){d(`${o.name} must be smaller than 12 MB.`),Y();return}let s=r.map(e=>({id:i(),file:e,name:e.name,mediaType:e.type,sizeBytes:e.size,kind:`image`,previewUrl:URL.createObjectURL(e)}));l(e=>[...e,...s]),n.length>t&&d(`Only ${T} images can be attached to one message.`),Y()}function J(e){l(t=>{let n=t.find(t=>t.id===e);return n?.previewUrl&&URL.revokeObjectURL(n.previewUrl),t.filter(t=>t.id!==e)})}function Y(){F.current&&(F.current.value=``)}function X(e){if(!R)return;let r=`@${j(e)} `,i=`${t.slice(0,R.start)}${r}${t.slice(R.end)}`,a=R.start+r.length;n(i),s(a),P(null),window.requestAnimationFrame(()=>I.current?.focusAtPromptIndex(a))}return(0,C.jsxs)(`form`,{className:`composer dock community-composer${c.length>0?` has-attachments`:``}${u?` has-attachment-error`:``}`,onSubmit:G,children:[e.replyTo?(0,C.jsxs)(`div`,{className:`community-composer-reply`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:`Replying to`}),e.replyTo.body.slice(0,100)||`message`]}),(0,C.jsx)(`button`,{type:`button`,"aria-label":`Cancel reply`,onClick:e.onCancelReply,children:(0,C.jsx)(m,{size:13})})]}):null,H?(0,C.jsx)(`div`,{className:`community-mention-menu`,role:`listbox`,"aria-label":`Community members`,children:V.map((e,t)=>(0,C.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===x,onMouseDown:e=>e.preventDefault(),onClick:()=>X(e),children:[(0,C.jsx)(`strong`,{children:e.name??e.handle??`Community member`}),e.handle?(0,C.jsxs)(`small`,{children:[`@`,e.handle]}):null]},e.userId))}):null,(0,C.jsxs)(`div`,{className:`composer-input-shell`,children:[c.length>0?(0,C.jsx)(`div`,{className:`composer-attachments`,"aria-label":`Selected attachments`,children:c.map(e=>(0,C.jsx)(a,{attachment:e,onRemove:()=>J(e.id)},e.id))}):null,u?(0,C.jsx)(g,{error:u}):null,(0,C.jsx)(`div`,{className:`composer-textarea-frame`,onClick:e=>{e.target===e.currentTarget&&I.current?.focusAtPromptIndex(o)},children:(0,C.jsx)(b,{ref:I,disabled:U,onCursorChange:s,onKeyDown:K,onPromptChange:(e,t)=>{let r=e.slice(0,w);n(r),s(Math.min(t,r.length))},onTokenPositionChange:()=>void 0,placeholder:e.disabled?`Accept the community rules to post`:`Message community`,prompt:t,token:null})}),(0,C.jsxs)(`div`,{className:`composer-primary-controls team-chat-composer-controls`,children:[(0,C.jsx)(`input`,{ref:F,className:`composer-file-input`,hidden:!0,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,onChange:e=>q(e.currentTarget.files)}),(0,C.jsx)(`button`,{type:`button`,className:`composer-icon`,"aria-label":`Attach images`,disabled:U||c.length>=T,onClick:()=>F.current?.click(),children:(0,C.jsx)(f,{size:17})}),(0,C.jsx)(`div`,{className:`composer-spacer`}),(0,C.jsx)(`button`,{type:`submit`,className:`send-button`,"aria-label":`Send message`,disabled:!W,children:(0,C.jsx)(y,{size:17})})]})]})]})}function k(e,t=e.length){let n=Math.max(0,Math.min(t,e.length)),r=/(?:^|\s)@([\w-]*)$/.exec(e.slice(0,n));return!r||r.index==null?null:{start:r.index+r[0].indexOf(`@`),end:n,query:r[1]??``}}function A(e,t){let n=new Set([...e.matchAll(/(?:^|\s)@([\w-]+)/g)].map(e=>e[1]?.toLowerCase()));return t.filter(e=>n.has(j(e).toLowerCase())).map(e=>e.userId)}function j(e){return e.handle??e.name?.replace(/[^\w-]/g,``)??e.userId}function M(e){for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl)}function N(e){let[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(e.message.body),a=e.message.refs.find(e=>e.refType===`message_reply`),c=a?e.messagesById.get(a.refId)??null:null,l=c?.authorUserId?e.membersById.get(c.authorUserId)??null:null;return(0,C.jsxs)(`article`,{className:`community-message${e.own?` own`:``}`,id:`community-message-${e.message.id}`,children:[(0,C.jsx)(`div`,{className:`community-avatar`,children:P(e.author?.name??e.author?.handle??`?`)}),(0,C.jsxs)(`div`,{className:`community-message-content`,children:[(0,C.jsxs)(`header`,{children:[(0,C.jsx)(`strong`,{children:e.author?.name??e.author?.handle??`Community member`}),(0,C.jsx)(`time`,{dateTime:e.message.createdAt,children:F(e.message.createdAt)}),e.message.editedAt?(0,C.jsx)(`span`,{children:`edited`}):null,e.message.deletedAt?null:(0,C.jsxs)(`div`,{className:`community-message-actions`,children:[(0,C.jsx)(`button`,{type:`button`,"aria-label":`Reply`,onClick:()=>e.onReply(e.message),children:(0,C.jsx)(x,{size:13})}),e.own?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Edit`,onClick:()=>n(!0),children:(0,C.jsx)(_,{size:13})}):null,e.own?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Delete`,onClick:()=>void e.onDelete(e.message.id),children:(0,C.jsx)(o,{size:13})}):null]})]}),a?(0,C.jsxs)(`button`,{type:`button`,className:`community-reply-quote`,onClick:()=>document.getElementById(`community-message-${a.refId}`)?.scrollIntoView({behavior:`smooth`,block:`center`}),children:[(0,C.jsx)(`strong`,{children:l?.name??`Community member`}),(0,C.jsx)(`span`,{children:c?.deletedAt?`Message deleted`:c?.body??String(a.preview.body??`Earlier message`)})]}):null,t?(0,C.jsxs)(`form`,{className:`community-message-edit`,onSubmit:t=>{t.preventDefault(),e.onEdit(e.message.id,r).then(e=>{e&&n(!1)})},children:[(0,C.jsx)(`textarea`,{autoFocus:!0,value:r,onChange:e=>i(e.currentTarget.value)}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),(0,C.jsx)(`button`,{type:`submit`,disabled:!r.trim(),children:`Save`})]})]}):e.message.deletedAt?(0,C.jsx)(`div`,{className:`community-message-deleted`,children:`Message deleted`}):(0,C.jsx)(s,{content:e.message.body}),!e.message.deletedAt&&e.message.attachments.length>0?(0,C.jsx)(`div`,{className:`community-message-attachments`,children:e.message.attachments.map(t=>e.attachmentsAccessible?(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void e.onDownloadAttachment(t.id),children:[(0,C.jsx)(`span`,{children:t.name}),(0,C.jsx)(`small`,{children:I(t.sizeBytes)})]},t.id):(0,C.jsxs)(`div`,{className:`community-attachment-placeholder`,children:[(0,C.jsx)(`span`,{children:t.name}),(0,C.jsxs)(`small`,{children:[`Join to view · `,I(t.sizeBytes)]})]},t.id))}):null]})]})}function P(e){return e.split(/\s+/).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)||`?`}function F(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function I(e){return e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function L(e){let[t,n]=(0,S.useState)(!1),r=(0,S.useRef)(null),i=(0,S.useRef)(e.onClose);(0,S.useEffect)(()=>n(!1),[e.rules.id]),(0,S.useEffect)(()=>{i.current=e.onClose},[e.onClose]),(0,S.useEffect)(()=>{let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=r.current,n=()=>[...t?.querySelectorAll(`button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])`)??[]];n()[0]?.focus();let a=e=>{if(e.key===`Escape`){e.preventDefault(),i.current();return}if(e.key!==`Tab`)return;let r=n();if(r.length===0){e.preventDefault(),t?.focus();return}let a=r[0],o=r.at(-1);e.shiftKey&&document.activeElement===a?(e.preventDefault(),o.focus()):!e.shiftKey&&document.activeElement===o&&(e.preventDefault(),a.focus())};return document.addEventListener(`keydown`,a),()=>{document.removeEventListener(`keydown`,a),e?.focus()}},[]);let a=e.mode!==`review`;return(0,C.jsx)(`div`,{className:`community-dialog-backdrop`,role:`presentation`,onMouseDown:e.onClose,children:(0,C.jsxs)(`section`,{ref:r,className:`community-rules-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`community-rules-title`,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),children:[(0,C.jsxs)(`header`,{children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`small`,{children:[`Community rules · version `,e.rules.version]}),(0,C.jsx)(`h2`,{id:`community-rules-title`,children:e.rules.title})]}),(0,C.jsx)(`button`,{type:`button`,"aria-label":`Close rules`,onClick:e.onClose,children:(0,C.jsx)(m,{size:16})})]}),(0,C.jsx)(`div`,{className:`community-rules-body`,children:(0,C.jsx)(s,{content:e.rules.bodyMarkdown})}),(0,C.jsxs)(`footer`,{children:[a?(0,C.jsxs)(`label`,{className:`community-rules-acceptance`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.currentTarget.checked)}),(0,C.jsx)(`span`,{children:`I have read and agree to follow these rules.`})]}):(0,C.jsx)(`span`,{}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{type:`button`,className:`secondary`,onClick:e.onClose,children:`Cancel`}),a?(0,C.jsx)(`button`,{type:`button`,disabled:!t||e.busy,onClick:()=>void e.onAccept().then(t=>{t&&e.onClose()}),children:e.busy?`Saving…`:e.mode===`join`?`Agree and join`:`Accept updated rules`}):null]})]})]})})}function R({communities:e,chat:t,currentUserId:n}){h(e.discoveryError),h(t.lostMembership?`Your membership changed. Refresh the community before continuing.`:null),h(e.previewError),h(e.membershipError?.message),h(t.channelsError,{prefix:`Channels`}),h(t.messagesError,{prefix:`Messages`}),h(t.actionError);let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null),s=(0,S.useRef)(null),c=e.preview,u=c?.membership?.status===`active`,f=!!c?.capabilities.requiresRulesAcceptance,m=(0,S.useMemo)(()=>new Map(t.members.map(e=>[e.userId,e])),[t.members]),g=(0,S.useMemo)(()=>new Map(t.messages.map(e=>[e.id,e])),[t.messages]),_=t.messages.at(-1)?.sequence??0;if((0,S.useEffect)(()=>{let e=s.current;e&&(e.scrollTop=e.scrollHeight)},[t.selectedChannelId,_]),(0,S.useEffect)(()=>{o(null),f&&c?.currentRules&&i(`reaccept`)},[c?.currentRules,f]),!e.selectedSummary)return(0,C.jsx)(`section`,{className:`community-empty-page`,children:(0,C.jsxs)(`div`,{className:`community-discovery-card`,children:[(0,C.jsx)(v,{size:30}),(0,C.jsx)(`h1`,{children:`Discover communities`}),(0,C.jsx)(`p`,{children:e.discoveryLoading&&e.items.length===0?`Finding communities…`:`Preview public conversations and join after accepting each community's rules.`}),e.items.length>0?(0,C.jsx)(`div`,{className:`community-discovery-list`,children:e.items.map(t=>(0,C.jsxs)(`button`,{type:`button`,onClick:()=>e.selectCommunity(t.id),children:[(0,C.jsx)(B,{name:t.displayName,imageUrl:t.imageUrl}),(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:t.displayName}),(0,C.jsx)(`small`,{children:t.description})]}),(0,C.jsx)(`em`,{children:t.membership?.status===`active`?`Joined`:t.featuredAt?`Featured`:`${t.memberCount.toLocaleString()} members`})]},t.id))}):e.discoveryLoading?null:(0,C.jsx)(`div`,{className:`community-state`,children:`No public communities are available yet.`}),(0,C.jsxs)(`div`,{className:`community-discovery-actions`,children:[(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void e.refresh(),disabled:e.discoveryLoading,children:[(0,C.jsx)(p,{size:14}),` Refresh`]}),e.nextCursor?(0,C.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>void e.loadMore(),disabled:e.discoveryLoading,children:`Load more`}):null]})]})});if(!c&&e.previewLoading)return(0,C.jsx)(`section`,{className:`community-empty-page`,children:(0,C.jsxs)(`div`,{className:`community-empty-card`,children:[(0,C.jsx)(`span`,{className:`community-spinner`}),` Loading community…`]})});if(!c)return(0,C.jsx)(`section`,{className:`community-empty-page`,children:(0,C.jsxs)(`div`,{className:`community-empty-card`,children:[(0,C.jsx)(`h1`,{children:e.selectedSummary.displayName}),(0,C.jsx)(`div`,{className:`community-state`,children:`This community preview is unavailable.`}),(0,C.jsxs)(`button`,{type:`button`,onClick:()=>e.selectCommunity(e.selectedSummary.id),children:[(0,C.jsx)(p,{size:14}),` Retry preview`]})]})});let y=c.currentRules;return(0,C.jsxs)(`section`,{className:`community-view`,children:[(0,C.jsxs)(`header`,{className:`community-header`,children:[(0,C.jsxs)(`div`,{className:`community-heading`,children:[(0,C.jsx)(B,{name:c.displayName,imageUrl:c.imageUrl}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`small`,{children:c.displayName}),(0,C.jsx)(`h1`,{children:t.selectedChannel?`# ${t.selectedChannel.displayName}`:c.displayName}),(0,C.jsx)(`p`,{children:t.selectedChannel?.topic||c.description})]})]}),(0,C.jsxs)(`div`,{className:`community-header-actions`,children:[(0,C.jsxs)(`span`,{className:`community-member-count`,children:[(0,C.jsx)(v,{size:14}),` `,c.memberCount.toLocaleString()]}),y?(0,C.jsxs)(`button`,{type:`button`,className:`secondary`,onClick:()=>i(`review`),children:[(0,C.jsx)(l,{size:14}),` Rules`]}):null,u?(0,C.jsx)(z,{mode:c.membership?.notificationMode??`mentions`,busy:e.membershipBusy,onMode:e.updateNotifications,onLeave:e.leave}):null]})]}),(0,C.jsxs)(`div`,{className:`community-chat-main conversation-surface-main`,children:[(0,C.jsxs)(`div`,{className:`community-chat-notices`,children:[u?f?(0,C.jsxs)(`div`,{className:`community-preview-banner warning`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`strong`,{children:`The rules have changed`}),(0,C.jsx)(`span`,{children:`Accept the current rules to continue reading live updates and posting.`})]}),(0,C.jsx)(`button`,{type:`button`,disabled:!y||e.membershipBusy,onClick:()=>i(`reaccept`),children:`Review updated rules`})]}):null:(0,C.jsxs)(`div`,{className:`community-preview-banner`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`strong`,{children:[`Previewing `,c.displayName]}),(0,C.jsx)(`span`,{children:`Read the public conversation, then accept the rules to join and post.`})]}),(0,C.jsx)(`button`,{type:`button`,disabled:!y||e.membershipBusy,onClick:()=>i(`join`),children:`Join community`})]}),t.realtimeError&&u&&!f?(0,C.jsxs)(`div`,{className:`community-realtime-state`,children:[(0,C.jsx)(d,{size:14}),(0,C.jsx)(`span`,{children:`Live updates are reconnecting. Loaded messages are still available.`})]}):null,t.channelsError?(0,C.jsx)(`button`,{type:`button`,className:`community-state`,onClick:()=>void t.loadChannels(),children:`Retry loading channels`}):null]}),(0,C.jsxs)(`div`,{className:`community-message-pane conversation-message-scroll`,ref:s,role:`log`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-busy":t.messagesLoading,"aria-label":t.selectedChannel?`${c.displayName}, ${t.selectedChannel.displayName}`:c.displayName,tabIndex:0,children:[t.hasMoreBefore?(0,C.jsx)(`button`,{type:`button`,className:`community-load-older`,disabled:t.olderMessagesLoading,onClick:()=>void t.loadOlder(),children:t.olderMessagesLoading?`Loading…`:`Load earlier messages`}):null,t.messagesLoading&&t.messages.length===0?(0,C.jsx)(`div`,{className:`community-message-state`,children:`Loading messages…`}):null,t.messagesError?(0,C.jsxs)(`div`,{className:`community-message-state`,children:[`Messages are unavailable. `,(0,C.jsx)(`button`,{type:`button`,onClick:()=>void t.loadMessages(),children:`Retry`})]}):null,!t.messagesLoading&&!t.messagesError&&t.messages.length===0?(0,C.jsx)(`div`,{className:`community-message-state`,children:`No messages in this channel yet.`}):null,t.messages.map(e=>(0,C.jsx)(N,{message:e,author:e.authorUserId?m.get(e.authorUserId)??null:null,own:e.authorUserId===n,attachmentsAccessible:!t.previewMode,membersById:m,messagesById:g,onReply:o,onEdit:t.editMessage,onDelete:t.deleteMessage,onDownloadAttachment:t.downloadAttachment},e.id))]}),u?(0,C.jsxs)(`div`,{className:`community-composer-wrap conversation-composer-shell`,children:[t.failedSend?(0,C.jsxs)(`div`,{className:`community-failed-send`,children:[(0,C.jsx)(`span`,{children:`Message not sent.`}),(0,C.jsx)(`button`,{type:`button`,disabled:t.sending,onClick:()=>void t.retrySend(),children:`Retry`}),(0,C.jsx)(`button`,{type:`button`,onClick:t.dismissFailedSend,children:`Dismiss`})]}):null,(0,C.jsx)(O,{members:t.members,replyTo:a,busy:t.sending,disabled:f||t.lostMembership||!t.selectedChannel||t.selectedChannel.postingPolicy===`admins`&&c.membership?.role===`member`,onCancelReply:()=>o(null),onSearchMembers:t.searchMembers,onSend:t.sendMessage})]}):null]}),r&&y?(0,C.jsx)(L,{rules:y,mode:r,busy:e.membershipBusy,onAccept:r===`join`?e.join:e.acceptRules,onClose:()=>i(null)}):null]})}function z(e){let[t,n]=(0,S.useState)(!1);return(0,C.jsxs)(`div`,{className:`community-membership-menu`,children:[(0,C.jsxs)(`button`,{type:`button`,className:`secondary`,"aria-expanded":t,onClick:()=>n(e=>!e),children:[e.mode===`none`?(0,C.jsx)(u,{size:14}):(0,C.jsx)(c,{size:14}),` Joined`]}),t?(0,C.jsxs)(`div`,{className:`community-membership-popover`,children:[(0,C.jsx)(`strong`,{children:`Notifications`}),[`mentions`,`all`,`none`].map(t=>(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`radio`,name:`community-notifications`,checked:e.mode===t,disabled:e.busy,onChange:()=>void e.onMode(t)}),` `,t===`mentions`?`Mentions`:t===`all`?`All messages`:`Nothing`]},t)),(0,C.jsx)(`button`,{type:`button`,className:`danger`,disabled:e.busy,onClick:()=>{window.confirm(`Leave this community? You can join again later by accepting the current rules.`)&&e.onLeave().then(e=>{e&&n(!1)})},children:`Leave community`})]}):null]})}function B({name:e,imageUrl:t}){return t?(0,C.jsx)(`img`,{className:`community-icon`,src:t,alt:``}):(0,C.jsx)(`span`,{className:`community-icon fallback`,children:e.slice(0,2).toUpperCase()})}export{R as CommunityView};
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{t as r}from"./requests-BCbaFiqV.js";import"./icons-D7jkCa2d.js";import{T as i}from"./training-model-data-DB-jg6L_.js";import{t as a}from"./x-Dqpel42h.js";import{n as o,r as s,t as c}from"./AttachmentTypeIcon-DgADV7dn.js";function l(e){return e?(e.match(/\r\n|\r|\n/g)?.length??0)+ +!/(?:\r\n|\r|\n)$/.test(e):0}var u=e(t(),1),d=n(),f=new Set([`csv`,`css`,`html`,`js`,`json`,`jsx`,`log`,`md`,`mdx`,`py`,`sql`,`svg`,`ts`,`tsx`,`txt`,`xml`,`yaml`,`yml`]),p=/^Pasted text(?: (\d+))?\.txt$/;function m(e,t){if(e.length<2e3)return null;let n=new Set;for(let e of t){let t=p.exec(e.name);t&&n.add(t[1]?Number(t[1]):1)}let r=1;for(;n.has(r);)r+=1;let i=r===1?`Pasted text.txt`:`Pasted text ${r}.txt`;return new File([e],i,{type:`text/plain`})}function h({attachment:e,onRemove:t}){let[n,r]=(0,u.useState)(!1),f=(0,u.useRef)(null),p=(0,u.useCallback)(()=>{r(!1),f.current?.focus()},[]),[m,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(e.kind!==`text`)return;let t=!1;return e.file.text().then(e=>{t||h(l(e))},()=>void 0),()=>{t=!0}},[e.file,e.kind]);let g=e.kind!==`image`;return(0,d.jsxs)(`div`,{className:`composer-attachment-card ${e.kind}`,children:[e.kind===`image`&&e.previewUrl?(0,d.jsx)(`button`,{ref:f,type:`button`,className:`composer-attachment-thumb composer-attachment-preview`,"aria-label":`Preview ${e.name}`,title:`Preview ${e.name}`,onClick:()=>r(!0),children:(0,d.jsx)(`img`,{alt:``,decoding:`async`,src:e.previewUrl})}):(0,d.jsx)(`div`,{className:`composer-attachment-thumb`,"aria-hidden":`true`,children:(0,d.jsx)(c,{attachment:e,size:22})}),(0,d.jsx)(i,{open:n,src:e.previewUrl??null,title:e.name,onClose:p}),g?(0,d.jsxs)(`div`,{className:`composer-attachment-meta`,children:[(0,d.jsx)(`strong`,{children:e.name}),(0,d.jsx)(`span`,{children:e.kind===`text`&&m!==null?s(m):o(e)})]}):null,(0,d.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`Remove ${e.name}`,onClick:t,children:(0,d.jsx)(a,{size:14})})]})}function g(){return globalThis.crypto?.randomUUID?.()??`attachment-${Date.now()}-${Math.random().toString(36).slice(2)}`}function _(e){if(e.type.startsWith(`image/`))return`image`;if(e.type.startsWith(`text/`))return`text`;let t=e.name.split(`.`).pop()?.toLowerCase()??``;return f.has(t)?`text`:`file`}async function v(e){let[t,n]=await Promise.all([b(e.file),e.kind===`text`?x(e.file):Promise.resolve(void 0)]);return{id:e.id,name:e.name,mediaType:e.mediaType,sizeBytes:e.sizeBytes,kind:e.kind,...n===void 0?{}:{lineCount:l(n)},...e.relativePath?{relativePath:e.relativePath}:{},contentsBase64:t,...n?{text:S(n)}:{}}}function y(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=e/1024;for(let e of t){if(n<1024)return`${n.toFixed(n>=10?0:1)} ${e}`;n/=1024}return`${n.toFixed(0)} TB`}function b(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let[,e=``]=(typeof r.result==`string`?r.result:``).split(`,`,2);t(e)},r.onerror=()=>n(r.error??Error(`Failed to read file`)),r.readAsDataURL(e)})}function x(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(typeof r.result==`string`?r.result:``),r.onerror=()=>n(r.error??Error(`Failed to read file`)),r.readAsText(e)})}function S(e){return e.length<=r.maxTextChars?e:`${e.slice(0,Math.max(0,r.maxTextChars-28))}
2
+ [attachment text truncated]`}export{y as a,m as i,_ as n,v as o,g as r,h as t};
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{g as n,m as r}from"./index-D9WbJMSq.js";import{n as i}from"./create-pipeline-CyUZrbbO.js";import"./icons-D7jkCa2d.js";import{I as a}from"./training-model-data-DB-jg6L_.js";import{t as o}from"./loader-circle-CPaJeTDy.js";import{t as s}from"./play-D_SuGDBM.js";import{t as c}from"./refresh-cw-Dga35Eay.js";import{t as l}from"./x-Dqpel42h.js";import{$t as u,an as d,dn as f,ln as p}from"./App-DY2R8Z6r.js";var m=t({ComposerCreateImproveStrip:()=>_}),h=e(n(),1),g=r();function _({runtime:e}){let[t,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(``),[m,_]=(0,h.useState)(null),D=e.run,O=D.plan,k=v(D),A={run:D},j=S(D.state),M=w(D),N=M?.git?.pullRequest??D.releaseOutcome.pullRequest;(0,h.useEffect)(()=>{n(!1),i(``),_(null)},[D.id,D.revision,D.state,O?.id,k?.id]);async function P(e,t){if(t&&!m){_(e);try{await t()}finally{_(null)}}}return(0,g.jsxs)(`section`,{"data-notification-run":D.id,className:`composer-create-strip ${j}`,"aria-label":`Create or improve status`,children:[(0,g.jsxs)(`div`,{className:`composer-create-strip-heading`,children:[j===`danger`?(0,g.jsx)(p,{size:15}):D.state===`awaiting_questions`?(0,g.jsx)(u,{size:15}):C(D.state)?(0,g.jsx)(o,{className:`composer-create-spin`,size:15}):(0,g.jsx)(d,{size:15}),(0,g.jsx)(`span`,{children:b(D)}),(0,g.jsx)(`small`,{children:D.target.kind})]}),D.state===`awaiting_questions`&&k?(0,g.jsxs)(`div`,{className:`composer-create-question`,children:[(0,g.jsx)(`p`,{children:k.prompt}),(0,g.jsx)(`div`,{className:`composer-create-options`,children:k.options.map(t=>(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`answer:${t.id}`,()=>e.onAnswerQuestion?e.onAnswerQuestion(A,k.id,t.value):Promise.resolve()),children:[(0,g.jsx)(`span`,{children:m===`answer:${t.id}`?`Saving`:t.label}),t.description?(0,g.jsx)(`small`,{children:t.description}):null]},t.id))})]}):D.state===`awaiting_plan_approval`&&O?(0,g.jsxs)(`div`,{className:`composer-create-plan-summary`,children:[(0,g.jsx)(`p`,{children:O.summary}),(0,g.jsx)(y,{run:D}),t?(0,g.jsxs)(`div`,{className:`composer-create-revision`,children:[(0,g.jsx)(`textarea`,{rows:2,value:r,placeholder:`Describe the plan revision`,onChange:e=>i(e.currentTarget.value)}),(0,g.jsxs)(`div`,{children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!r.trim()||!!m,onClick:()=>void P(`revise`,()=>e.onRevise?e.onRevise(A,r):Promise.resolve()),children:[(0,g.jsx)(d,{size:13}),(0,g.jsx)(`span`,{children:m===`revise`?`Saving`:`Save revision`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>n(!1),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:`Close`})]})]})]}):(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`approve`,()=>e.onApprove?e.onApprove(A):Promise.resolve()),children:[(0,g.jsx)(f,{size:13}),(0,g.jsx)(`span`,{children:m===`approve`?`Confirming`:`Confirm plan`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>n(!0),children:[(0,g.jsx)(d,{size:13}),(0,g.jsx)(`span`,{children:`Edit plan`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`cancel`,()=>e.onCancel?e.onCancel(A):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`cancel`?`Cancelling`:`Cancel`})]})]})]}):D.state===`paused`?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:`This work is paused. Resume it when you are ready to continue.`}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`resume`,()=>e.onResume?e.onResume(A):Promise.resolve()),children:[(0,g.jsx)(s,{size:13}),(0,g.jsx)(`span`,{children:m===`resume`?`Resuming`:`Resume`})]})]}):D.state===`awaiting_promotion`&&M?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:E(D,M.id)}),(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m||!T(D,M.id),onClick:()=>void P(`apply-candidate`,()=>e.onApplyCandidate?e.onApplyCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(f,{size:13}),(0,g.jsx)(`span`,{children:m===`apply-candidate`?`Applying`:`Apply update`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reject-candidate`,()=>e.onRejectCandidate?e.onRejectCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`reject-candidate`?`Keeping current version`:`Keep current version`})]})]})]}):D.state===`pull_request_open`&&M&&N?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:D.target.kind===`agent`?`An Agent update review is open. Finish or close it, then refresh its status.`:`An external review is open. Merge or close it, then refresh its status.`}),(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reconcile-pr`,()=>e.onReconcilePullRequest?e.onReconcilePullRequest(A,M.id):Promise.resolve()),children:[(0,g.jsx)(c,{size:13}),(0,g.jsx)(`span`,{children:m===`reconcile-pr`?`Checking`:`Refresh review`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reject-candidate`,()=>e.onRejectCandidate?e.onRejectCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`reject-candidate`?`Closing`:`Close review`})]})]})]}):D.state===`blocked`||D.state===`failed`||D.state===`cancelled`?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:D.blockedReason??`This work stopped before it was ready.`}),D.state===`blocked`&&M?.git?.worktreePath&&[`draft`,`checking`].includes(M.status)?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`resume`,()=>e.onResume?e.onResume(A):Promise.resolve()),children:[(0,g.jsx)(s,{size:13}),(0,g.jsx)(`span`,{children:m===`resume`?`Continuing`:`Continue update`})]}):D.state===`blocked`&&M?.git?.pullRequest?.state===`merged`?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reconcile-pr`,()=>e.onReconcilePullRequest?e.onReconcilePullRequest(A,M.id):Promise.resolve()),children:[(0,g.jsx)(c,{size:13}),(0,g.jsx)(`span`,{children:m===`reconcile-pr`?`Checking`:`Re-run verification`})]}):null]}):D.state===`released`||D.state===`rejected`||D.state===`ready_local`||D.state===`ready`||D.state===`published_hosted`?(0,g.jsxs)(`div`,{className:`composer-create-status-body composer-create-status-body-reveals`,children:[(0,g.jsx)(`p`,{children:D.state===`released`?`The Agent update is saved and its Evals passed.`:D.state===`rejected`?`The Agent update was not applied.`:D.state===`published_hosted`?`Published to the hosted Profile.`:`The Agent and its actions are ready to use.`}),(0,g.jsx)(`div`,{className:`composer-create-hover-details`,children:(0,g.jsx)(y,{run:D})})]}):(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:x(D)}),(0,g.jsx)(y,{run:D}),D.executionPolicy.pauseAllowed&&e.onPause?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`pause`,()=>e.onPause?.(A)??Promise.resolve()),children:[(0,g.jsx)(a,{size:13}),(0,g.jsx)(`span`,{children:m===`pause`?`Pausing`:`Pause`})]}):null]})]})}function v(e){return e.questions.find(e=>e.status===`pending`&&e.required)??e.questions.find(e=>e.status===`pending`)??null}function y({run:e}){let t=e.plan,n=e.target.kind===`agent`,r=n?null:e.sourceRefs[0]??t?.sourcePlan[0]?.path??null,a=e.checkRefs.length||t?.checks.length||0,o=n?0:t?.requirements.length??0,s=n?[]:[...e.sourceRefs,...e.checkRefs].slice(0,4),c=i(t?.metadata);return!r&&a===0&&o===0&&s.length===0&&!c?null:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`composer-create-facts`,children:[c?(0,g.jsx)(`span`,{title:c.detail,children:c.label}):null,r?(0,g.jsx)(`span`,{title:r,children:r}):null,a?(0,g.jsx)(`span`,{children:n?`${a} Evals`:e.checkRefs.length?`${e.checkRefs.length} check refs`:`${a} checks`}):null,o?(0,g.jsxs)(`span`,{children:[o,` setup rows`]}):null]}),s.length?(0,g.jsx)(`ul`,{className:`composer-create-refs`,"aria-label":`Source and check refs`,children:s.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(`code`,{title:e,children:e})},e))}):null]})}function b(e){let t=e.target.kind===`agent`;return e.state===`awaiting_questions`?`Question`:e.state===`awaiting_plan_approval`?`Plan`:e.state===`applying_source`?t?`Saving Agent`:`Applying source`:e.state===`running_checks`?`Running Evals`:e.state===`evaluating`?t?`Checking Agent`:`Evaluating`:e.state===`awaiting_promotion`?t?`Update ready`:`Candidate ready`:e.state===`opening_pull_request`?`Opening review`:e.state===`pull_request_open`?`Review open`:e.state===`reconciling_release`?t?`Applying update`:`Merging change`:e.state===`released`?t?`Agent updated`:`Released`:e.state===`rejected`?t?`Current Agent kept`:`Rejected`:e.state===`paused`?`Paused`:e.state===`ready`||e.state===`ready_local`?`Ready`:e.state===`published_hosted`?`Published`:e.state===`cancelled`?`Cancelled`:e.state===`blocked`?`Blocked`:e.state===`failed`?`Failed`:e.operation===`improve`?`Improve`:`Create`}function x(e){let t=e.state,n=e.target.kind===`agent`;return t===`applying_source`?n?`Saving the approved Agent plan.`:`Applying the approved source changes.`:t===`running_checks`?n?`Running Evals against the Agent.`:`Running checks against the candidate.`:t===`evaluating`?n?`Checking the Agent's behavior.`:`Evaluating the candidate against its Evals.`:t===`opening_pull_request`?n?`Preparing the Agent update review.`:`Opening the candidate review.`:t===`reconciling_release`?`Applying the change and verifying the active Profile.`:t===`pushing_hosted`?`Pushing the Profile source.`:t===`running_hosted_checks`?n?`Running hosted Evals.`:`Running hosted checks.`:`Preparing the work.`}function S(e){return[`released`,`ready`,`ready_local`,`published_hosted`].includes(e)?`success`:[`rejected`,`blocked`,`failed`,`cancelled`].includes(e)?`danger`:[`awaiting_questions`,`awaiting_plan_approval`,`awaiting_promotion`,`pull_request_open`,`paused`].includes(e)?`warning`:`info`}function C(e){return[`planning`,`applying_source`,`running_checks`,`evaluating`,`opening_pull_request`,`reconciling_release`,`pushing_hosted`,`running_hosted_checks`].includes(e)}function w(e){return[...e.candidates].reverse().find(e=>e.target.kind===`agent`)??null}function T(e,t){let n=e.evaluationReceipts.filter(e=>e.candidateId===t&&e.subject===`candidate`);return n.length>0&&n.every(e=>e.status===`passed`&&e.publishGate!==`failed`)}function E(e,t){let n=e.evaluationReceipts.find(e=>e.candidateId===t&&e.subject===`active`),r=e.evaluationReceipts.find(e=>e.candidateId===t&&e.subject===`candidate`),i=e=>e?.summaryCounts?`${e.summaryCounts.passed}/${e.summaryCounts.total}`:e?.status??`not run`;return e.target.kind===`agent`?`Current Agent: ${i(n)} Evals passed. Updated Agent: ${i(r)} Evals passed.`:`Base Evals: ${i(n)} passed. Candidate Evals: ${i(r)} passed.`}export{m as n,_ as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{n as r}from"./api-client-Dgz-fOMl.js";import{t as i}from"./NativeSetupTerminal-CPDChcMi.js";import{Bt as a,Nt as o}from"./App-DY2R8Z6r.js";import{n as s,r as c,t as l}from"./useAgentInventory-isO79ui9.js";var u=e(t(),1),d=n(),f=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function p({schedule:e,name:t,disabled:n,disconnected:r,onSave:i}){let[a,o]=(0,u.useState)(null),s=a??{enabled:!!e,frequency:e?.frequency??`daily`,time:e?.frequency===`daily`||e?.frequency===`weekly`?e.time:`00:00`,day:e?.frequency===`weekly`?e.day:1,expression:e?.frequency===`cron`?e.expression:`0 * * * *`},{enabled:c,frequency:l,time:p,day:m,expression:h}=s,g=c?l===`cron`?{frequency:l,expression:h.trim()}:l===`hourly`?{frequency:l}:l===`weekly`?{frequency:l,time:p,day:m}:{frequency:l,time:p}:null,_=JSON.stringify(g)!==JSON.stringify(e),v=n||!c||r,y=l===`daily`||l===`weekly`;return(0,d.jsxs)(`form`,{className:`conversation-import-schedule`,onSubmit:e=>{e.preventDefault(),i(g).then(()=>o(null)).catch(()=>{})},children:[(0,d.jsxs)(`label`,{children:[(0,d.jsx)(`input`,{type:`checkbox`,checked:c,disabled:n||r&&!c,onChange:e=>o({...s,enabled:e.target.checked})}),`Continual imports`]}),(0,d.jsxs)(`label`,{children:[`Frequency`,(0,d.jsxs)(`select`,{"aria-label":`${t} import frequency`,value:l,disabled:v,onChange:e=>o({...s,frequency:e.target.value}),children:[(0,d.jsx)(`option`,{value:`hourly`,children:`Hourly`}),(0,d.jsx)(`option`,{value:`daily`,children:`Daily`}),(0,d.jsx)(`option`,{value:`weekly`,children:`Weekly`}),(0,d.jsx)(`option`,{value:`cron`,children:`Custom cron`})]})]}),l===`weekly`?(0,d.jsxs)(`label`,{children:[`Day`,(0,d.jsx)(`select`,{"aria-label":`${t} import day`,value:m,disabled:v,onChange:e=>o({...s,day:Number(e.target.value)}),children:f.map((e,t)=>(0,d.jsx)(`option`,{value:t,children:e},e))})]}):null,y?(0,d.jsxs)(`label`,{children:[`Sync time`,(0,d.jsx)(`input`,{"aria-label":`${t} sync time`,type:`time`,required:c,value:p,disabled:v,onChange:e=>o({...s,time:e.target.value})})]}):null,l===`cron`?(0,d.jsxs)(`label`,{children:[`Cron expression`,(0,d.jsx)(`input`,{"aria-label":`${t} cron expression`,type:`text`,required:c,maxLength:512,value:h,placeholder:`0 * * * *`,disabled:v,onChange:e=>o({...s,expression:e.target.value})})]}):null,(0,d.jsx)(`button`,{className:`settings-secondary`,type:`submit`,disabled:n||!_||c&&(y?!p:l===`cron`&&!h.trim()),children:c?`Save schedule`:`Disable continual imports`}),(0,d.jsxs)(`small`,{children:[l===`cron`?`Five fields: minute, hour, day of month, month, day of week. For example, 0 * * * * runs hourly. Choose a single minute; faster schedules are not supported. `:l===`hourly`?`Runs at the start of each hour. `:`Midnight leaves time before a 2 a.m. model run. `,`A running import is never overlapped. Changing this setting does not start an import.`]})]})}var m=(e,t)=>e?new Date(e).toLocaleString(void 0,{timeZone:t}):`Not yet`;function h({connection:e}){let{inventory:t,loading:n,error:s,refresh:c}=l(e),[f,p]=(0,u.useState)(!1),[m,h]=(0,u.useState)(null),[_,v]=(0,u.useState)(null);async function y(t,n,i){if(e&&!f){p(!0),h(null);try{let a=await r(e,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:t,connectionId:n,...i===void 0?{}:{schedule:i}})});a.command&&v(a.command),await c()}catch(e){throw h(e instanceof Error?e.message:`Unable to update conversation imports.`),e}finally{p(!1)}}}let b=(e,t)=>{y(e,t).catch(()=>{})};return(0,d.jsxs)(`section`,{className:`account-settings conversation-imports`,children:[(0,d.jsxs)(`div`,{className:`conversation-imports-heading`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h1`,{children:`Conversation imports`}),(0,d.jsx)(`p`,{children:`Import saved conversations once, or choose a separate recurring schedule for each source.`})]}),(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>void c(),children:`Refresh`})]}),(0,d.jsxs)(`p`,{children:[`Continual imports use this computer’s local time`,t?` (${t.collector.timezone})`:``,`. If it is off or asleep, that run is skipped. The next scheduled run picks up changes from missed days.`]}),(0,d.jsx)(`p`,{children:`Imports do not enable continual learning or change model training schedules.`}),m??s?(0,d.jsx)(a,{error:m??s}):null,e?null:(0,d.jsx)(`p`,{children:`Connect to a desktop runtime to manage imports.`}),n&&!t?(0,d.jsx)(`p`,{role:`status`,children:`Loading conversation imports…`}):null,t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`conversation-imports-toolbar`,children:[(0,d.jsx)(`strong`,{role:`status`,children:t.collector.running?`Import in progress`:`No import running`}),t.collector.running?(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:f,onClick:()=>b(`stop`),children:`Cancel current run`}):null]}),t.collector.connections.length?t.collector.connections.map(e=>(0,d.jsx)(g,{item:e,status:t.collector,disabled:f||_!==null,onAction:b,onSchedule:t=>y(`schedule`,e.id,t)},e.id)):(0,d.jsxs)(`div`,{className:`conversation-imports-empty`,children:[(0,d.jsx)(`p`,{children:`No conversation sources connected. Choose a source in Connections and import its recent history.`}),(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,onClick:()=>o({kind:`view`,view:`apps`}),children:`Open Connections`})]}),(0,d.jsxs)(`details`,{children:[(0,d.jsx)(`summary`,{children:`CLI and local state`}),(0,d.jsx)(`p`,{children:t.directory}),(0,d.jsx)(`code`,{children:t.statusCommand})]})]}):null,_&&e?(0,d.jsx)(i,{connection:e,command:_,onComplete:()=>void c(),onClose:()=>{v(null),c()}}):null]})}function g({item:e,status:t,disabled:n,onAction:r,onSchedule:i}){let a=s.find(t=>t.id===e.source),l=e.run,u=t.running&&l?.state===`running`;return(0,d.jsxs)(`article`,{className:`conversation-import-card`,children:[(0,d.jsxs)(`div`,{className:`conversation-import-card-heading`,children:[(0,d.jsx)(`h3`,{children:a?.name??e.source}),(0,d.jsx)(`span`,{children:c(e,t)})]}),(0,d.jsxs)(`dl`,{className:`conversation-import-details`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Destination`}),(0,d.jsx)(`dd`,{children:e.accountBaseUrl??`Hosted destination`})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Project`}),(0,d.jsx)(`dd`,{children:e.projectId})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Source`}),(0,d.jsx)(`dd`,{children:e.sourceRoot})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Initial history`}),(0,d.jsx)(`dd`,{children:e.since?`Since ${m(e.since,t.timezone)}`:`All history`})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Upload selection`}),(0,d.jsx)(`dd`,{children:e.selectedConversations===null?`All history`:`${e.selectedConversations} approved conversations`})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Last successful sync`}),(0,d.jsx)(`dd`,{children:m(e.lastSuccessfulSyncAt,t.timezone)})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`dt`,{children:`Next sync`}),(0,d.jsx)(`dd`,{children:e.nextRunAt?m(e.nextRunAt,t.timezone):e.schedule?`Source paused or disconnected`:`Manual only`})]})]}),u&&l?(0,d.jsxs)(`div`,{role:`status`,className:`conversation-import-progress`,children:[(0,d.jsxs)(`span`,{children:[l.phase===`uploading`?`Uploading conversations`:l.phase===`discovering`?`Finding conversations`:`Reading conversations`,` · `,l.processed,` of `,l.discovered,` checked`]}),l.discovered>0?(0,d.jsx)(`progress`,{value:l.processed,max:l.discovered,"aria-label":`${a?.name??e.source} import progress`}):(0,d.jsx)(`progress`,{"aria-label":`Finding conversations`}),(0,d.jsxs)(`small`,{children:[l.uploaded,` turns uploaded · `,e.queued,` updates queued`]})]}):(0,d.jsxs)(`p`,{children:[e.admitted,` turns imported · `,e.queued,` updates queued`,l?.state===`cancelled`?` · Last run cancelled`:``]}),e.error||l?.state===`failed`?(0,d.jsx)(`p`,{role:`alert`,children:e.error??l?.error}):null,(0,d.jsx)(p,{schedule:e.schedule,name:a?.name??e.source,disabled:n,disconnected:e.state===`disconnected`||e.selectedConversations===0,onSave:i}),(0,d.jsxs)(`div`,{className:`settings-button-row`,children:[(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n||t.running||e.state!==`active`||e.selectedConversations===0,onClick:()=>r(`sync`,e.id),children:`Sync now`}),(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,onClick:()=>o({kind:`view`,view:`apps`}),children:`Choose conversations in Connections`}),e.state===`disconnected`?(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(`reconnect`,e.id),children:`Reconnect`}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(e.state===`paused`?`resume`:`pause`,e.id),children:e.state===`paused`?`Resume source`:`Pause source`}),(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(`disconnect`,e.id),children:`Disconnect`})]})]})]})}export{h as ConversationImportsSettings};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/aiden0z-pptx-renderer.es-Bo43EjzT.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/jszip.min-BWcKrrYP.js","assets/pdf-C4x-1jjP.js","assets/index-D9WbJMSq.js","assets/index-g7UqJhnX.css","assets/docx-preview-Blk_WGfs.js"])))=>i.map(i=>d[i]);
2
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n,t as r}from"./index-D9WbJMSq.js";import"./icons-D7jkCa2d.js";import{U as i,an as a}from"./App-DY2R8Z6r.js";import{t as o}from"./pdf.worker.min-BrEVksTu.js";var s=e(t(),1);function c(e=()=>new Promise(e=>setTimeout(e,0))){let t=Promise.resolve();return(n,r)=>{let i=t.then(async()=>{if(n.aborted||(await e(),n.aborted))return;let t=()=>{},i=new Promise(e=>{t=e,n.addEventListener(`abort`,t,{once:!0})});try{await Promise.race([r(),i])}finally{n.removeEventListener(`abort`,t)}});return t=i.catch(()=>{}),i}}var l=c(),u=n();function d({file:e,thumbnail:t=!0}){let n=(0,s.useRef)(null),c=`word-preview-${(0,s.useId)().replace(/[^a-z0-9]/gi,``)}`,[d,f]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let a=n.current;if(!a||!e.content)return;let s=new AbortController,u=document.createElement(`div`);a.replaceChildren(u);let d=[];f(!1),m(!1);let p=()=>{let e=u.offsetWidth;if(!e)return;let n=u.scrollHeight,r=t?a.parentElement?.clientHeight??0:0,i=t&&r&&n?Math.min(a.clientWidth/e,r/n):a.clientWidth/e;u.style.zoom=String(i)},h=new ResizeObserver(p);h.observe(a),t&&a.parentElement&&h.observe(a.parentElement);let g=async()=>{let n=Uint8Array.from(atob(e.content),e=>e.charCodeAt(0));if(i(e)){let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await r(async()=>{let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await import(`./aiden0z-pptx-renderer.es-Bo43EjzT.js`);return{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}},__vite__mapDeps([0,1,2]));if(s.signal.aborted)return;u.style.width=`320px`;let i=new e(u,{width:320,zipLimits:t,lazySlides:!0,lazyMedia:!0,pdfjs:!1});d.push(()=>i.destroy()),await i.open(n,{signal:s.signal,renderMode:`slide`})}else if(/\.pdf$/i.test(e.path)){let e=await r(()=>import(`./pdf-C4x-1jjP.js`),__vite__mapDeps([3,4,1,5]));if(s.signal.aborted)return;e.GlobalWorkerOptions.workerSrc=o;let t=e.getDocument({data:n});d.push(()=>{t.destroy().catch(()=>{})});let i=await t.promise;if(s.signal.aborted)return;let a=await i.getPage(1),c=a.getViewport({scale:320/a.getViewport({scale:1}).width}),l=document.createElement(`canvas`);l.width=c.width,l.height=c.height,u.style.width=`320px`,u.appendChild(l);let f=a.render({canvas:l,viewport:c});d.push(()=>f.cancel()),await f.promise}else{let[{renderAsync:e},{parseZipLazyMedia:i,RECOMMENDED_ZIP_LIMITS:a}]=await Promise.all([r(()=>import(`./docx-preview-Blk_WGfs.js`),__vite__mapDeps([6,1,2])),r(()=>import(`./aiden0z-pptx-renderer.es-Bo43EjzT.js`),__vite__mapDeps([0,1,2]))]);if(await i(n.buffer,a),s.signal.aborted)return;u.style.width=`816px`,await e(n,u,u,{className:c,inWrapper:!1,breakPages:!0,useBase64URL:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!t,renderEndnotes:!t}),t&&Array.from(u.querySelectorAll(`section.${c}`)).slice(1).forEach(e=>e.remove())}s.signal.aborted||(p(),f(!0))};return(t?l(s.signal,g):g()).catch(()=>{s.signal.aborted||m(!0)}),()=>{s.abort(),h.disconnect(),d.reverse().forEach(e=>e()),u.remove()}},[c,e.content,e.path,t]),(0,u.jsxs)(`div`,{className:`file-page-preview ${t?`thumbnail`:`document`}`,children:[d?null:(0,u.jsx)(`span`,{className:`file-page-preview-placeholder`,role:t?void 0:`status`,children:t?(0,u.jsx)(a,{size:28}):p?`Preview unavailable. Download the original document to open it.`:`Loading document…`}),(0,u.jsx)(`div`,{ref:n,className:`file-page-preview-content ${d&&!p?`ready`:``}`})]})}export{d as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t,d as n,f as r,g as i,h as a,i as o,m as s,o as c,r as l,u}from"./index-D9WbJMSq.js";import{a as d,n as f}from"./client-choice-storage-BdQ_YDuk.js";import"./icons-D7jkCa2d.js";import{V as p}from"./training-model-data-DB-jg6L_.js";import{t as m}from"./play-D_SuGDBM.js";import{t as h}from"./x-Dqpel42h.js";import{t as g}from"./AppDialog-8Y0FYalT.js";import{vn as _}from"./App-DY2R8Z6r.js";var v=e(i(),1),ee=a(),y=s();function te({badge:e,onPlay:t,titleElement:n=`h3`,video:r}){let[i,a]=(0,v.useState)(!1),o=(0,v.useRef)(null),s=n,c=`${r.id}-title`;function l(){if(t){t();return}(0,ee.flushSync)(()=>a(!0));let e=o.current;e&&(e.load(),e.play().catch(()=>void 0))}return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`article`,{className:`get-started-course-card`,"aria-labelledby":c,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Play ${r.title}`,className:`get-started-course-open`,onClick:l,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-course-media`,children:[(0,y.jsx)(`img`,{alt:``,className:`get-started-course-poster`,decoding:`async`,src:r.posterUrl}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,"aria-hidden":`true`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),e?(0,y.jsx)(`span`,{className:`get-started-course-badge`,"aria-hidden":`true`,children:e}):null]}),(0,y.jsxs)(`div`,{className:`get-started-course-copy`,children:[(0,y.jsx)(s,{id:c,children:r.title}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,"aria-label":`${r.title} details`,children:[(0,y.jsx)(`span`,{children:r.eyebrow}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:r.duration})]}),r.description?(0,y.jsx)(`p`,{children:r.description}):null]})]}),i&&!t?(0,y.jsx)(b,{onClose:()=>a(!1),video:r,videoRef:o}):null]})}function b({autoAdvance:e=!1,contained:t=!1,inertExclusionSelector:n,navigation:r,onEnded:i,onClose:a,onPause:o,onTimeUpdate:s,video:c,videoRef:l}){return(0,y.jsxs)(g,{ariaLabel:`${c.title} player`,backdropClassName:`get-started-course-player-backdrop`,className:`get-started-course-player`,contained:t,inertExclusionSelector:n,onClose:a,children:[(0,y.jsxs)(`header`,{className:`get-started-course-player-header`,children:[(0,y.jsxs)(`div`,{className:`get-started-course-player-copy`,children:[(0,y.jsx)(`strong`,{children:c.title}),(0,y.jsxs)(`span`,{children:[r?`Lesson ${r.currentIndex+1} of ${r.total}`:c.eyebrow,` · `,c.duration]})]}),(0,y.jsxs)(`div`,{className:`get-started-course-player-actions`,children:[r?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{"aria-label":`Previous lesson`,disabled:!r.onPrevious,onClick:r.onPrevious,title:`Previous lesson`,type:`button`,children:(0,y.jsx)(_,{size:17})}),(0,y.jsx)(`button`,{"aria-label":`Next lesson`,disabled:!r.onNext,onClick:r.onNext,title:`Next lesson`,type:`button`,children:(0,y.jsx)(p,{size:17})})]}):null,(0,y.jsx)(`button`,{"aria-label":`Close video player`,"data-autofocus":!0,onClick:a,title:`Close`,type:`button`,children:(0,y.jsx)(h,{size:18})})]})]}),(0,y.jsx)(`div`,{className:`get-started-course-player-body`,children:(0,y.jsx)(`div`,{className:`get-started-course-player-media`,children:(0,y.jsx)(`div`,{className:`get-started-course-player-stage`,children:(0,y.jsx)(`video`,{"aria-label":`${c.title} video`,className:`get-started-course-player-video`,controls:!0,"data-auto-advance":e?`true`:void 0,onEnded:e=>i?.(e.currentTarget),onPause:e=>o?.(e.currentTarget),onTimeUpdate:e=>s?.(e.currentTarget),playsInline:!0,poster:c.posterUrl,preload:`metadata`,ref:l,src:c.videoUrl,children:c.captionsUrl?(0,y.jsx)(`track`,{kind:`captions`,label:`English`,src:c.captionsUrl,srcLang:`en`}):null},c.id)})})})]})}var x={schemaVersion:`openpond.publicVideoManifest.v1`,playlists:[{id:`post-training-from-first-principles`,fullVideoId:`post-training-full-course`,status:`draft`,title:`Post-training from first principles`,videoIds:[`post-training-01-how-post-training-works`,`post-training-02-definitions`,`post-training-03-on-policy-off-policy`,`post-training-04-rewards-credit-assignment`,`post-training-05-verifiable-rewards-rlvr`,`post-training-06-ppo-grpo`,`post-training-07-distillation`,`post-training-08-opsd-sdft-sdpo`,`post-training-09-credible-experiments`,`post-training-10-technical-appendix`]},{id:`how-to-make-an-agent`,status:`published`,title:`Agents`,playAllVideoId:`make-agent-tutorial`,videoIds:[`make-agent-tutorial-create`,`make-agent-tutorial-use`,`make-agent-tutorial-improve`]}],videos:[{id:`post-training-01-how-post-training-works`,localPath:`courses/post-training/01-how-post-training-works.mp4`,objectKey:`media/videos/aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a.mp4`,sha256:`aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a`,sizeBytes:2114638,durationSeconds:64.967},{id:`post-training-02-definitions`,localPath:`courses/post-training/02-definitions.mp4`,objectKey:`media/videos/c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc.mp4`,sha256:`c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc`,sizeBytes:11956956,durationSeconds:374.367},{id:`post-training-03-on-policy-off-policy`,localPath:`courses/post-training/03-on-policy-off-policy.mp4`,objectKey:`media/videos/a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762.mp4`,sha256:`a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762`,sizeBytes:2291518,durationSeconds:66.367},{id:`post-training-04-rewards-credit-assignment`,localPath:`courses/post-training/04-rewards-credit-assignment.mp4`,objectKey:`media/videos/685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f.mp4`,sha256:`685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f`,sizeBytes:5677418,durationSeconds:179.834},{id:`post-training-05-verifiable-rewards-rlvr`,localPath:`courses/post-training/05-verifiable-rewards-rlvr.mp4`,objectKey:`media/videos/0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a.mp4`,sha256:`0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a`,sizeBytes:5666892,durationSeconds:172.534},{id:`post-training-06-ppo-grpo`,localPath:`courses/post-training/06-ppo-grpo.mp4`,objectKey:`media/videos/66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3.mp4`,sha256:`66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3`,sizeBytes:5519257,durationSeconds:173.6},{id:`post-training-07-distillation`,localPath:`courses/post-training/07-distillation.mp4`,objectKey:`media/videos/3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466.mp4`,sha256:`3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466`,sizeBytes:4687640,durationSeconds:161.667},{id:`post-training-08-opsd-sdft-sdpo`,localPath:`courses/post-training/08-opsd-sdft-sdpo.mp4`,objectKey:`media/videos/3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031.mp4`,sha256:`3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031`,sizeBytes:5439835,durationSeconds:163.134},{id:`post-training-09-credible-experiments`,localPath:`courses/post-training/09-credible-experiments.mp4`,objectKey:`media/videos/fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023.mp4`,sha256:`fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023`,sizeBytes:6909405,durationSeconds:211.934},{id:`post-training-10-technical-appendix`,localPath:`courses/post-training/10-technical-appendix.mp4`,objectKey:`media/videos/17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21.mp4`,sha256:`17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21`,sizeBytes:5481950,durationSeconds:191.767},{id:`post-training-full-course`,localPath:`courses/post-training/full-course.mp4`,objectKey:`media/videos/d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f.mp4`,sha256:`d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f`,sizeBytes:55740426,durationSeconds:1760.192},{id:`openpond-agent-overview`,localPath:`tutorials/what-is-an-openpond-agent.mp4`,objectKey:`media/videos/421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7.mp4`,sha256:`421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7`,sizeBytes:5259848,durationSeconds:77.467},{id:`make-agent-tutorial`,localPath:`tutorials/how-to-make-an-agent.mp4`,objectKey:`media/videos/252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255.mp4`,sha256:`252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255`,sizeBytes:17339101,durationSeconds:273.067},{id:`make-agent-tutorial-create`,localPath:`tutorials/how-to-make-an-agent-create.mp4`,objectKey:`media/videos/322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44.mp4`,sha256:`322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44`,sizeBytes:6050301,durationSeconds:100.4},{id:`make-agent-tutorial-use`,localPath:`tutorials/how-to-make-an-agent-use.mp4`,objectKey:`media/videos/6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1.mp4`,sha256:`6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1`,sizeBytes:5084394,durationSeconds:75.1},{id:`make-agent-tutorial-improve`,localPath:`tutorials/how-to-make-an-agent-improve.mp4`,objectKey:`media/videos/fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d.mp4`,sha256:`fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d`,sizeBytes:6255324,durationSeconds:108.634}]},S=`https://media.openpond.ai`,C=x,ne=new Map(C.playlists.map(e=>[e.id,e])),re=new Map(C.videos.map(e=>[e.id,e]));function w(e){let t=ne.get(e);if(!t)throw Error(`Public video manifest is missing playlist ${e}`);return t}function ie(e,t){return t?`${S}/${e.objectKey}`:r(e.localPath)}function T(e){let t=re.get(e);if(!t)throw Error(`Public video manifest is missing ${e}`);return ie(t,!0)}var ae=T(`make-agent-tutorial`),E=T(`openpond-agent-overview`);function oe(e){return T(`make-agent-tutorial-${e}`)}var D={schemaVersion:`openpond.tutorialFrames.v2`,tutorial:{title:`How to make an agent`,subtitle:`Create, run, improve, and verify an Account Health Agent.`,outroTitle:`Agent shared from the hosted Profile`,outroSubtitle:`Available to teammates and hosted sandboxes. · Synthetic tutorial data · AI-generated narration`,narration:{model:`gpt-4o-mini-tts-2025-12-15`,voice:`cedar`,speed:1.12,responseFormat:`wav`,instructions:`Warm, clear product tutorial narration. Speak at a calm conversational pace with practical emphasis on user choices, evidence, approvals, and results. Pronounce OpenPond as open pond, P1 as P one, CSV as C S V, JSON as jay son, and Taskset as task set. Finish each sentence cleanly. Avoid hype, sales cadence, dramatic delivery, or imitation of any real person.`,leadInSeconds:.55,tailSeconds:.7,audioTitle:`AI-generated narration`,audioCredit:`OpenAI Speech · Cedar voice`}},chapters:[{id:`create`,label:`Create`,title:`Create an Agent`,subtitle:`Turn a plain-language purpose into a working Account Health Agent.`,outroTitle:`Account Health Agent created`,outroSubtitle:`The agent is ready to use. · AI-generated narration`,cardDuration:1.5},{id:`use`,label:`Use`,title:`Use the Agent`,subtitle:`Chat with the Account Health Agent and run its actions with approval.`,outroTitle:`First agent run complete`,outroSubtitle:`The result and supporting evidence are ready to review. · AI-generated narration`,cardDuration:1.5},{id:`improve`,label:`Improve`,title:`Improve the Agent`,subtitle:`Use real run evidence and Evals to make the Account Health Agent better.`,outroTitle:`Account Health Agent improved`,outroSubtitle:`The updated agent passed its Evals. · AI-generated narration`,cardDuration:1.5}],transitionDuration:.33,frames:[{id:`C01`,file:`C01-account-agent-lab-create-menu.png`,chapter:`create`,label:`Start in Profile`,caption:`Open Profile, choose Agent, and start the guided creation flow.`,placement:`bottom-left`,narration:`Open Profile, choose Agent, and start the guided creation flow.`,focus:{x:.84,y:.06,width:.145,height:.31,zoom:1.55}},{id:`C02`,file:`C02-source-choice-wide.png`,chapter:`create`,label:`Start from a prompt or chats`,caption:`Choose From prompt to describe the Agent directly, or From chats to include examples of the work it should handle.`,placement:`bottom-left`,narration:`Choose From prompt to describe the Agent directly, or From chats to include examples of the work it should handle.`,focus:{x:.31,y:.34,width:.38,height:.31,zoom:1.42}},{id:`C04`,file:`C04-from-chats-wide.png`,chapter:`create`,label:`Add purpose and chats`,caption:`This synthetic example starts with three chats: Acme has renewal blockers, Northstar is expanding, and the team needs a weekly account review. Add them with the Agent purpose.`,placement:`top-left`,narration:`This synthetic example starts with three chats: Acme has renewal blockers, Northstar is expanding, and the team needs a weekly account review. Add them with the Agent purpose.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`C06`,file:`C06-disclosure.png`,chapter:`create`,label:`See how chats build the plan`,caption:`Review the selected excerpts as examples. OpenPond turns their recurring goals, decisions, corrections, and answer patterns into the first Agent plan.`,placement:`bottom-left`,narration:`Review the selected excerpts as examples. OpenPond turns their recurring goals, decisions, corrections, and answer patterns into the first Agent plan.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`C07`,file:`C07-agent-review.png`,chapter:`create`,label:`Review the Agent`,caption:`The draft converts those examples into the Agent's purpose, chat behavior, runnable actions, output formats, and Evals for your review.`,placement:`bottom-left`,narration:`The draft converts those examples into the Agent's purpose, chat behavior, runnable actions, output formats, and Evals for your review.`,focus:{x:.31,y:.04,width:.38,height:.76,zoom:1.27}},{id:`C08`,file:`C08-right-chat-question.png`,chapter:`create`,label:`Answer the planning question`,caption:`The right side panel asks how the Agent should prioritize conflicting account risks.`,placement:`top-left`,narration:`The right side panel asks how the Agent should prioritize conflicting account risks.`,focus:{x:.715,y:.19,width:.265,height:.72,zoom:1.42}},{id:`C09`,file:`C09-right-chat-plan.png`,chapter:`create`,label:`Confirm the plan`,caption:`Before creation, review the proposed name, chat endpoint, runnable actions, Evals, and output formats.`,placement:`top-left`,narration:`Before creation, review the proposed name, chat endpoint, runnable actions, Evals, and output formats.`,focus:{x:.715,y:.18,width:.265,height:.72,zoom:1.42}},{id:`C09A`,file:`C09A-edit-plan.png`,chapter:`create`,label:`Edit the plan`,caption:`If the plan misses a requirement, open Edit plan and describe the change in plain language before any Agent source is created.`,placement:`top-left`,narration:`If the plan misses a requirement, open Edit plan and describe the change in plain language before any Agent source is created.`,focus:{x:.73,y:.66,width:.24,height:.24,zoom:1.45}},{id:`C09B`,file:`C09B-revised-plan.png`,chapter:`create`,label:`Create from the revised plan`,caption:`Review the revised plan, then click Confirm plan to create the Agent and run its Evals.`,placement:`top-left`,narration:`Review the revised plan, then click Confirm plan to create the Agent and run its Evals.`,focus:{x:.72,y:.7,width:.25,height:.2,zoom:1.45}},{id:`C10`,file:`C10-candidate-evaluation.png`,chapter:`create`,label:`Review the Evals`,caption:`This is the creation result: OpenPond built the Agent and passed its behavior Evals against the Account Health examples.`,placement:`bottom-left`,narration:`This is the creation result: OpenPond built the Agent and passed its behavior Evals against the Account Health examples.`,focus:{x:.19,y:.18,width:.5,height:.22,zoom:1.36}},{id:`C11`,file:`C11-local-source-applied.png`,chapter:`create`,label:`Save the Agent`,caption:`After the Evals pass, the Agent is saved to your Profile and is ready to use.`,placement:`bottom-left`,narration:`After the Evals pass, the Agent is saved to your Profile and is ready to use.`,focus:{x:.19,y:.16,width:.5,height:.14,zoom:1.38}},{id:`C12`,file:`C12-ready-local-detail.png`,chapter:`create`,label:`Use the Agent`,caption:`The Agent page shows its purpose, chat entrypoint, and runnable account actions.`,placement:`bottom-left`,narration:`The Agent page shows its purpose, chat entrypoint, and runnable account actions.`,focus:{x:.19,y:.17,width:.5,height:.13,zoom:1.38}},{id:`C13Q`,file:`C13Q-chat-acme-prompt.png`,chapter:`use`,label:`Ask the chat endpoint`,caption:`Use opens a normal chat with the Agent attached. Type a natural-language question about Acme before sending it.`,placement:`top-left`,narration:`Use opens a normal chat with the Agent attached. Type a natural-language question about Acme before sending it.`,focus:{x:.245,y:.84,width:.39,height:.14,zoom:1.48}},{id:`C13`,file:`C13-chat-acme.png`,chapter:`use`,label:`Ask about Acme`,caption:`Acme is the at-risk example: the Agent answers in chat with renewal timing, usage decline, the disputed invoice, and the open P1 case.`,placement:`top-left`,narration:`Acme is the at-risk example: the Agent answers in chat with renewal timing, usage decline, the disputed invoice, and the open P1 case.`,focus:{x:.2,y:.08,width:.48,height:.32,zoom:1.34}},{id:`C14`,file:`C14-chat-follow-up.png`,chapter:`use`,label:`Ask a follow-up`,caption:`A follow-up keeps Acme context and assigns the first actions to Revenue Operations and Support instead of restarting the conversation.`,placement:`top-left`,narration:`A follow-up keeps Acme context and assigns the first actions to Revenue Operations and Support instead of restarting the conversation.`,focus:{x:.2,y:.08,width:.48,height:.36,zoom:1.32}},{id:`C15`,file:`C15-action-picker.png`,chapter:`use`,label:`Choose a direct action`,caption:`The action picker offers chat plus each runnable account action, so you can choose conversation or a focused task.`,placement:`top-left`,narration:`The action picker offers chat plus each runnable account action, so you can choose conversation or a focused task.`,focus:{x:.245,y:.84,width:.39,height:.14,zoom:1.48}},{id:`C16`,file:`C16-northstar-summary.png`,chapter:`use`,label:`Summarize Northstar`,caption:`Northstar is the healthy expansion example from the source chats. Its direct summary identifies rising usage and the request for twenty-five more seats.`,placement:`top-left`,narration:`Northstar is the healthy expansion example from the source chats. Its direct summary identifies rising usage and the request for twenty-five more seats.`,focus:{x:.2,y:.37,width:.48,height:.2,zoom:1.38}},{id:`C17`,file:`C17-acme-triage.png`,chapter:`use`,label:`Triage Acme`,caption:`Running renewal triage for Acme returns high risk, cites the billing and support blockers, and orders the next steps.`,placement:`top-left`,narration:`Running renewal triage for Acme returns high risk, cites the billing and support blockers, and orders the next steps.`,focus:{x:.2,y:.57,width:.48,height:.15,zoom:1.4}},{id:`C18`,file:`C18-weekly-review-artifacts.png`,chapter:`use`,label:`Build the weekly review`,caption:`The weekly review action combines the portfolio and returns visible Markdown, CSV, and JSON artifacts for downstream use.`,placement:`top-left`,narration:`The weekly review action combines the portfolio and returns visible Markdown, CSV, and JSON artifacts for downstream use.`,focus:{x:.2,y:.68,width:.48,height:.19,zoom:1.36}},{id:`C19`,file:`C19-after-restart.png`,chapter:`use`,label:`Verify persistence`,caption:`After restarting OpenPond, the same Agent, chat history, and actions remain available.`,placement:`bottom-left`,narration:`After restarting OpenPond, the same Agent, chat history, and actions remain available.`,focus:{x:.19,y:.16,width:.5,height:.15,zoom:1.38}},{id:`I00`,file:`I00-current-priority-gap.png`,chapter:`improve`,label:`Identify the behavior gap`,caption:`The current Agent finds the right facts, but buries the priority after the account summary. Improve will make the billing and P1 decision lead every high-risk result.`,placement:`top-left`,narration:`The current Agent finds the right facts, but buries the priority after the account summary. Improve will make the billing and P1 decision lead every high-risk result.`,focus:{x:.38,y:.06,width:.42,height:.18,zoom:1.4}},{id:`I01`,file:`I01-improve-source-choice.png`,chapter:`improve`,label:`Start Improve`,caption:`Open Improve agent on the existing Agent, then choose whether to describe the correction directly or include a chat that demonstrates it.`,placement:`bottom-left`,narration:`Open Improve agent on the existing Agent, then choose whether to describe the correction directly or include a chat that demonstrates it.`,focus:{x:.31,y:.34,width:.38,height:.31,zoom:1.42}},{id:`I02`,file:`I02-improve-from-chats.png`,chapter:`improve`,label:`Add the correction chat`,caption:`Choose From chats, ask every high-risk response to lead with the billing and P1 decision, and attach the correction conversation that demonstrates it.`,placement:`top-left`,narration:`Choose From chats, ask every high-risk response to lead with the billing and P1 decision, and attach the correction conversation that demonstrates it.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`I03`,file:`I03-improve-review.png`,chapter:`improve`,label:`Review the improvement`,caption:`Review the new lead-with-priority behavior, the existing capabilities that must stay intact, and the Evals OpenPond will rerun.`,placement:`bottom-left`,narration:`Review the new lead-with-priority behavior, the existing capabilities that must stay intact, and the Evals OpenPond will rerun.`,focus:{x:.31,y:.04,width:.38,height:.76,zoom:1.27}},{id:`I04`,file:`I04-improve-right-chat-plan.png`,chapter:`improve`,label:`Confirm the Improve plan`,caption:`Review the planned change and confirm that it preserves citations and every existing action.`,placement:`top-left`,narration:`Review the planned change and confirm that it preserves citations and every existing action.`,focus:{x:.715,y:.18,width:.265,height:.72,zoom:1.42}},{id:`I05`,file:`I05-improve-comparison.png`,chapter:`improve`,label:`Compare the results`,caption:`The same locked Evals make the decision clear: the current Agent misses the new lead sentence, while the updated Agent passes every original and new Eval.`,placement:`bottom-left`,narration:`The same locked Evals make the decision clear: the current Agent misses the new lead sentence, while the updated Agent passes every original and new Eval.`,focus:{x:.745,y:.8,width:.22,height:.13,zoom:1.5}},{id:`I06`,file:`I06-improved-release.png`,chapter:`improve`,label:`Save the improvement`,caption:`Apply the update only after that comparison. The existing Agent updates in place, with the successful Evals recorded.`,placement:`bottom-left`,narration:`Apply the update only after that comparison. The existing Agent updates in place, with the successful Evals recorded.`,focus:{x:.71,y:.16,width:.28,height:.22,zoom:1.45}},{id:`I07`,file:`I07-improved-chat.png`,chapter:`improve`,label:`Verify improved chat`,caption:`The improved chat now places disputed billing and the open P1 case ahead of adoption decline while preserving source citations.`,placement:`top-left`,narration:`The improved chat now places disputed billing and the open P1 case ahead of adoption decline while preserving source citations.`,focus:{x:.2,y:.08,width:.48,height:.16,zoom:1.4}},{id:`I08`,file:`I08-improved-triage.png`,chapter:`improve`,label:`Verify improved triage`,caption:`The direct triage action repeats the billing-first result, proving the change works outside chat without breaking the existing workflow.`,placement:`top-left`,narration:`The direct triage action repeats the billing-first result, proving the change works outside chat without breaking the existing workflow.`,focus:{x:.2,y:.27,width:.48,height:.16,zoom:1.4}},{id:`I09`,file:`I09-profile-commit-dialog.png`,chapter:`improve`,label:`Commit the Profile source`,caption:`Commit the final Agent source with a clear Git message so the exact Profile version remains reviewable and shareable.`,placement:`bottom-left`,narration:`Commit the final Agent source with a clear Git message so the exact Profile version remains reviewable and shareable.`,focus:{x:.37,y:.36,width:.26,height:.29,zoom:1.45}},{id:`I10`,file:`I10-profile-sync-dialog.png`,chapter:`improve`,label:`Review the hosted sync`,caption:`Open Sync to review the committed Profile changes. Confirm sync publishes this version so teammates can use the Agent in chat and hosted sandboxes can attach the same source.`,placement:`bottom-left`,narration:`Open Sync to review the committed Profile changes. Confirm sync publishes this version so teammates can use the Agent in chat and hosted sandboxes can attach the same source.`,focus:{x:.5,y:.61,width:.11,height:.07,zoom:1.55}}],frameMinimumDuration:5.2,focusStyle:{borderColor:`#22d3ee`,borderWidth:5,dimOpacity:.32,zoomDelaySeconds:.8,zoomDurationSeconds:1.2}},se=w(`how-to-make-an-agent`),O=D.chapters,ce={create:`1:24`,use:`1:05`,improve:`1:10`},k=se.title,le=D.tutorial.title,A=`4:33`,j={captionsUrl:l,chapterIds:O.map(e=>e.id),description:`Create, use, and improve an Account Health Agent in one continuous walkthrough.`,duration:A,eyebrow:`Play all`,id:`make-agent-tutorial`,lessonNumber:null,posterUrl:o,title:le,videoId:`play-all`,videoUrl:ae},M=O.map((e,t)=>({captionsUrl:u(e.id),chapterIds:[e.id],description:e.subtitle,duration:ce[e.id],eyebrow:`Lesson ${t+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:t+1,posterUrl:n(e.id),title:e.title,videoId:e.id,videoUrl:oe(e.id)})),ue=[j,...M];function N(e){return ue.find(t=>t.videoId===e)??j}function de(e){let t=M.findIndex(t=>t.videoId===e);return t<0?null:M[t+1]?.videoId??null}var fe=[2,1,0];function pe({activeVideoId:e=`play-all`,autoplay:t=!0,onClose:n,onOpen:r,onSelectVideo:i,open:a=!1,playRequestId:o=0}={}){let s=(0,v.useRef)(null),c=N(e);(0,v.useEffect)(()=>{if(!a)return;let e=s.current;e&&(e.load(),o>0&&e.play().catch(()=>void 0))},[c.id,a,o]);function l(){if(!t||!i)return;let n=de(e);n&&i(n)}return(0,y.jsxs)(`section`,{className:`get-started-series`,"aria-label":k,children:[(0,y.jsxs)(`article`,{className:`get-started-playlist-card`,"aria-labelledby":`make-agent-series-title`,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Open ${k} playlist`,className:`get-started-playlist-open`,onClick:r,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-playlist-stack`,"aria-hidden":`true`,children:[fe.map((e,t)=>{let n=M[e];return(0,y.jsx)(`div`,{className:`get-started-playlist-poster layer-${t+1}`,children:(0,y.jsx)(`img`,{alt:``,decoding:`async`,src:n.posterUrl})},n.id)}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),(0,y.jsxs)(`span`,{className:`get-started-playlist-count`,children:[M.length,` lessons`]})]}),(0,y.jsxs)(`div`,{className:`get-started-playlist-copy`,children:[(0,y.jsx)(`h1`,{id:`make-agent-series-title`,children:k}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,children:[(0,y.jsx)(`span`,{children:`Walkthrough playlist`}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:A})]}),(0,y.jsx)(`p`,{children:`Create, use, and improve an Account Health Agent, or play the full walkthrough.`})]})]}),a&&n&&i?(0,y.jsx)(me,{activeVideoId:e,autoplay:t,contained:!0,inertExclusionSelector:`.get-started-learning-panel`,onClose:n,onEnded:l,onSelectVideo:i,videoRef:s}):null]})}function me({activeVideoId:e=`play-all`,autoplay:t=!0,contained:n=!1,inertExclusionSelector:r,onClose:i,onEnded:a,onSelectVideo:o=()=>void 0,videoRef:s}){let c=N(e),l=M.findIndex(t=>t.videoId===e),u=l>=0?M[l+1]?.videoId:void 0,d=l>0?M[l-1]?.videoId:void 0;return(0,y.jsx)(b,{autoAdvance:t&&l>=0,contained:n,inertExclusionSelector:r,navigation:l>=0?{currentIndex:l,onNext:u?()=>o(u):void 0,onPrevious:d?()=>o(d):void 0,total:M.length}:void 0,onClose:i,onEnded:a?()=>a():void 0,video:c,videoRef:s})}var P=w(`post-training-from-first-principles`),F=P.title,he=P.status;function I(e,t,n,i,a,o){let s=`courses/post-training/${t}`,c=`post-training-${t}`;return{captionsUrl:r(`${s}.vtt`),description:o,duration:a,eyebrow:i,id:c,lessonNumber:e,posterUrl:r(`${s}-poster.webp`),slug:t,title:n,videoUrl:T(c)}}var L=[I(1,`01-how-post-training-works`,`How post-training works`,`Start here`,`1:05`,`The choose, judge, and update loop behind every method in this series.`),I(2,`02-definitions`,`Definitions`,`Reference`,`6:14`,`Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series.`),I(3,`03-on-policy-off-policy`,`On-policy and off-policy data`,`Data source`,`1:06`,`Why learner rollouts and teacher or stored data support different updates.`),I(4,`04-rewards-credit-assignment`,`Rewards and credit assignment`,`RL foundation`,`3:00`,`Follow a code-repair trajectory from actions and observations to advantage.`),I(5,`05-verifiable-rewards-rlvr`,`Verifiable rewards`,`RLVR`,`2:53`,`See how tests create scalable rewards—and how a model can exploit the checker.`),I(6,`06-ppo-grpo`,`PPO and GRPO`,`Policy updates`,`2:54`,`Compare PPO's learned critic with GRPO's sibling-response baseline.`),I(7,`07-distillation`,`Distillation`,`Teacher targets`,`2:42`,`Transfer a teacher's token distribution instead of copying one final answer.`),I(8,`08-opsd-sdft-sdpo`,`OPSD, SDFT, and SDPO`,`Teacher evidence`,`2:43`,`Compare trusted solutions, demonstrations, and failure feedback at one prefix.`),I(9,`09-credible-experiments`,`Credible experiments`,`Research design`,`3:32`,`Build versioned datasets, fair baselines, and claims that survive scrutiny.`),I(10,`10-technical-appendix`,`Technical appendix`,`Advanced details`,`3:12`,`Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.`)],ge=`29 min`,R=P.fullVideoId;if(!R)throw Error(`Post-training playlist is missing its full video`);var z={captionsUrl:r(`courses/post-training/full-course.vtt`),description:`All ten lessons in one continuous video for watching, sharing, or uploading.`,duration:`29:20`,eyebrow:`Full course`,id:R,posterUrl:r(`courses/post-training/full-course-poster.webp`),title:F,videoUrl:T(R)};function B(e){let t=e+1;return t<L.length?t:null}var V=`Subject to change, lesson work in progress`;function _e(){let e=he===`draft`?`Draft`:`Published`;return(0,y.jsx)(`span`,{"aria-label":`${e}: ${V}`,className:`get-started-playlist-status app-tooltip`,"data-tooltip":V,tabIndex:0,children:e})}var H=`openpond.post-training-progress.v1`,U=Object.freeze({}),ve=1e3,W=new Set,G=null,K=null,q=!1;function J(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function ye(e){if(!e||typeof e!=`object`||Array.isArray(e))return U;let t={};for(let[n,r]of Object.entries(e)){if(!n||!r||typeof r!=`object`||Array.isArray(r))continue;let e=r,i=J(e.duration),a=J(e.currentTime),o=J(e.updatedAt);if(i===null||i<=0||a===null)continue;let s=e.completed===!0;t[n]={completed:s,currentTime:s?i:Math.min(i,Math.max(0,a)),duration:i,updatedAt:o===null?0:Math.max(0,o)}}return Object.keys(t).length>0?t:U}function be(e){if(!e)return U;try{return ye(JSON.parse(e))}catch{return U}}function Y(){if(typeof window>`u`)return U;try{return be(f.getItem(H))}catch{return U}}function X(){if(typeof window<`u`&&K!==null&&window.clearTimeout(K),K=null,typeof window<`u`&&G!==null)try{f.setItem(H,JSON.stringify(G))}catch{}}function xe(){typeof window<`u`&&K===null&&(K=window.setTimeout(X,ve))}function Se(){typeof window>`u`||q||(q=!0,window.addEventListener(`pagehide`,X),d(()=>{G=Y(),W.forEach(e=>e())}))}function Z(){return G===null&&(G=Y()),Se(),G}function Q({completed:e=!1,currentTime:t,duration:n,lessonId:r}){if(!r||!Number.isFinite(n)||n<=0||!Number.isFinite(t))return;let i=Z(),a=i[r],o=!!(a?.completed||e),s=o?n:Math.min(n,Math.max(0,t));a&&a.completed===o&&Math.abs(a.currentTime-s)<.25&&Math.abs(a.duration-n)<.25||(G={...i,[r]:{completed:o,currentTime:s,duration:n,updatedAt:Date.now()}},xe(),W.forEach(e=>e()))}function Ce(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}var $=F,we=[2,1,0];function Te({activeLessonIndex:e,fullCourseSelected:t=!1,autoplay:n=!0,open:r,onClose:i,onOpen:a,onSelectLesson:o,playRequestId:s=0}){let c=(0,v.useRef)(null),l=(0,v.useRef)(null),u=L[e]??L[0],d=t?z:u;(0,v.useEffect)(()=>{if(!r)return;let e=c.current;if(!e)return;let t=!1;l.current=null,e.load();let n=()=>{if(t)return;let n=Ce(Z()[d.id]);n>0&&(e.currentTime=n),s>0&&e.play().catch(()=>void 0)};return e.readyState>=HTMLMediaElement.HAVE_METADATA?n():e.addEventListener(`loadedmetadata`,n,{once:!0}),()=>{t=!0,e.removeEventListener(`loadedmetadata`,n),Number.isFinite(e.duration)&&e.duration>0&&e.currentTime>0&&Q({completed:e.ended,currentTime:e.currentTime,duration:e.duration,lessonId:d.id})}},[d.id,r,s]);function f(e,t=!1){!Number.isFinite(e.duration)||e.duration<=0||Q({completed:t,currentTime:t?e.duration:e.currentTime,duration:e.duration,lessonId:d.id})}function p(e){if(!Number.isFinite(e.duration)||e.duration<=0)return;let t=Math.min(99,Math.floor(e.currentTime/e.duration*100)),n=l.current;(n?.lessonId!==d.id||n.percent!==t)&&(l.current={lessonId:d.id,percent:t},f(e))}function h(e){f(e,!0),n&&!t&&g()}function g(){let t=B(e);t!==null&&o(t)}return(0,y.jsxs)(`section`,{className:`get-started-series`,"aria-label":$,children:[(0,y.jsxs)(`article`,{className:`get-started-playlist-card`,"aria-labelledby":`post-training-series-title`,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Open ${$} playlist`,className:`get-started-playlist-open`,onClick:a,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-playlist-stack`,"aria-hidden":`true`,children:[we.map((e,t)=>{let n=L[e];return(0,y.jsx)(`div`,{className:`get-started-playlist-poster layer-${t+1}`,children:(0,y.jsx)(`img`,{alt:``,decoding:`async`,src:n.posterUrl})},n.id)}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),(0,y.jsxs)(`span`,{className:`get-started-playlist-count`,children:[L.length,` lessons`]})]}),(0,y.jsxs)(`div`,{className:`get-started-playlist-copy`,children:[(0,y.jsxs)(`div`,{className:`get-started-playlist-title`,children:[(0,y.jsx)(`h1`,{id:`post-training-series-title`,children:$}),(0,y.jsx)(_e,{})]}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,children:[(0,y.jsx)(`span`,{children:`Learning series`}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:ge})]}),(0,y.jsx)(`p`,{children:`Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix.`})]})]}),r?(0,y.jsx)(Ee,{activeLessonIndex:e,autoplay:n,fullCourseSelected:t,onClose:i,onEnded:h,onPause:f,onSelectLesson:o,onTimeUpdate:p,videoRef:c}):null]})}function Ee({activeLessonIndex:e,autoplay:t,fullCourseSelected:n,onClose:r,onEnded:i,onPause:a,onSelectLesson:o,onTimeUpdate:s,videoRef:c}){let l=L[e]??L[0],u=B(e),d=n?z:l;return(0,y.jsx)(b,{autoAdvance:t&&!n,contained:!0,inertExclusionSelector:`.get-started-learning-panel`,navigation:n?void 0:{currentIndex:e,onNext:u===null?void 0:()=>o(u),onPrevious:e>0?()=>o(e-1):void 0,total:L.length},onClose:r,onEnded:i,onPause:a,onTimeUpdate:s,video:d,videoRef:c})}var De={captionsUrl:t,description:`See how Profile Agents combine chat, direct actions, shared runtime surfaces, and Evals.`,duration:`1:16`,eyebrow:`Agent overview`,id:`openpond-agent-overview`,posterUrl:c,title:`What is an OpenPond Agent?`,videoUrl:E};function Oe(e={}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),a=e.makeAgentTutorial===void 0?t:e.makeAgentTutorial,o=e.postTrainingCourse===void 0?r:e.postTrainingCourse,s=!!(o||a);function c(){e.onOpenMakeAgentTutorial?e.onOpenMakeAgentTutorial():(i(null),n({autoplay:!0,playRequestId:0,videoId:`create`}))}function l(){e.onCloseMakeAgentTutorial?e.onCloseMakeAgentTutorial():n(null)}function u(t){e.onSelectMakeAgentTutorialVideo?e.onSelectMakeAgentTutorialVideo(t):n(e=>e&&{...e,playRequestId:e.playRequestId+1,videoId:t})}function d(){e.onOpenPostTrainingCourse?e.onOpenPostTrainingCourse():(n(null),i({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0}))}function f(){e.onClosePostTrainingCourse?e.onClosePostTrainingCourse():i(null)}function p(t){e.onSelectPostTrainingLesson?e.onSelectPostTrainingLesson(t):i(e=>e&&{...e,fullCourseSelected:!1,lessonIndex:t,playRequestId:e.playRequestId+1})}return(0,y.jsx)(`section`,{className:`get-started-view ${s?`course-player-open`:``}`,"aria-label":`Walkthroughs`,children:(0,y.jsxs)(`div`,{className:`get-started-shell`,children:[(0,y.jsxs)(`section`,{className:`get-started-start-here`,"aria-labelledby":`get-started-start-here-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-start-here-title`,children:`Start here`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(te,{titleElement:`h1`,video:De})})]}),(0,y.jsxs)(`section`,{className:`get-started-walkthroughs`,"aria-labelledby":`get-started-walkthroughs-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-walkthroughs-title`,children:`Walkthroughs`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(pe,{activeVideoId:a?.videoId??`create`,autoplay:a?.autoplay??!0,onClose:l,onOpen:c,onSelectVideo:u,open:!!a,playRequestId:a?.playRequestId??0})})]}),(0,y.jsxs)(`section`,{className:`get-started-learn`,"aria-labelledby":`get-started-learn-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-learn-title`,children:`Learn deeper`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(Te,{activeLessonIndex:o?.lessonIndex??0,autoplay:o?.autoplay??!0,fullCourseSelected:o?.fullCourseSelected??!1,open:!!o,onClose:f,onOpen:d,onSelectLesson:p,playRequestId:o?.playRequestId??0})})]})]})})}export{Oe as GetStartedView};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n,s as r}from"./index-D9WbJMSq.js";import{n as i}from"./api-client-Dgz-fOMl.js";import"./icons-D7jkCa2d.js";import{t as a}from"./external-link-CDKOLG_v.js";import{t as o}from"./loader-circle-CPaJeTDy.js";import{t as s}from"./plus-yw95Iaj8.js";import{t as c}from"./x-Dqpel42h.js";import{t as l}from"./NativeSetupTerminal-CPDChcMi.js";import{t as u}from"./AppDialog-8Y0FYalT.js";import{Bt as d,bn as f,dn as p,t as m}from"./App-DY2R8Z6r.js";/* empty css */import{t as h}from"./useAccountSettings-9oqWdRLs.js";var g=e(t(),1),_=n(),v={codex:{name:`Codex`,installUrl:`https://developers.openai.com/codex/cli`},"claude-code":{name:`Claude`,installUrl:`https://code.claude.com/docs/en/setup`}};function y({providerId:e,connection:t,config:n,onProviders:r}){let c=v[e],u=m(),d=(0,g.useRef)(u.active);d.current=u.active;let[h,y]=(0,g.useState)(null),[b,x]=(0,g.useState)(!0),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(null),E=(0,g.useRef)(null),D=(0,g.useRef)(!1),O=(0,g.useRef)(r);O.current=r,(0,g.useEffect)(()=>(D.current=!0,()=>{D.current=!1}),[]);let k=(0,g.useCallback)(async()=>{E.current?.abort();let n=new AbortController;E.current=n;let r=setTimeout(()=>n.abort(Error(`Connection check timed out. Try again.`)),45e3);x(!0),C(null),y(null);try{let r=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:n.signal});if(E.current!==n||n.signal.aborted)return;y(r),C(r.error),O.current(r.settings)}catch(e){E.current===n&&C(e instanceof Error?e.message:String(e))}finally{clearTimeout(r),E.current===n&&(E.current=null,x(!1))}},[t.serverUrl,t.token,e]);(0,g.useEffect)(()=>{!w&&!(e===`claude-code`&&d.current)&&k();function t(){!E.current&&!w&&!(e===`claude-code`&&d.current)&&k()}return window.addEventListener(`focus`,t),()=>{window.removeEventListener(`focus`,t);let e=E.current;E.current=null,e?.abort()}},[k,n?.binaryPath,n?.sourceHome,w,e]);async function A(){if(!b){x(!0),C(null);try{let n=await f.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(!D.current)return;O.current(n),await k()}catch(e){C(e instanceof Error?e.message:String(e)),x(!1)}}}async function j(){if(b)return;let r=new AbortController;E.current=r;let a=setTimeout(()=>r.abort(),1e4);x(!0),C(null);try{let a=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`login`}),signal:r.signal});if(E.current!==r||r.signal.aborted)return;if(!n?.enabled){let n=await f.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(E.current!==r||r.signal.aborted)return;O.current(n)}E.current===r&&!r.signal.aborted&&(e===`claude-code`?u.start(a):T(a))}catch(e){E.current===r&&C(e instanceof Error?e.message:String(e))}finally{clearTimeout(a),E.current===r&&(E.current=null,x(!1))}}(0,g.useEffect)(()=>{if(e!==`claude-code`||!u.result)return;let t=u.result.settings.providers[e];(t?.binaryPath||null)===(n?.binaryPath||null)&&(t?.sourceHome||null)===(n?.sourceHome||null)&&(x(!1),y(u.result),C(u.result.status===`unavailable`?u.result.error:null))},[u.result,e,n?.binaryPath,n?.sourceHome]);let M=!S&&h?.status===`ready`;return(0,_.jsxs)(`li`,{className:`getting-started-card`,children:[(0,_.jsx)(`img`,{className:`getting-started-provider-icon`,src:`/agent-sources/${e}.svg`,alt:``}),(0,_.jsx)(`h3`,{children:c.name}),(0,_.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,"aria-live":`polite`,children:e===`claude-code`&&u.active?(0,_.jsx)(`button`,{type:`button`,onClick:u.resume,children:`Continue sign-in`}):b?(0,_.jsx)(o,{className:`settings-spin`,size:20,"aria-label":`Checking ${c.name}`}):M&&n?.enabled?(0,_.jsxs)(`span`,{children:[(0,_.jsx)(p,{size:16}),` Connected`]}):M?(0,_.jsxs)(`button`,{type:`button`,"aria-label":`Connect ${c.name}`,onClick:()=>void A(),children:[(0,_.jsx)(s,{size:14}),` Connect`]}):h?.status===`missing`?(0,_.jsxs)(`a`,{href:c.installUrl,target:`_blank`,rel:`noreferrer`,children:[`Install `,c.name,` `,(0,_.jsx)(a,{size:12})]}):h?.status===`needs_login`?(0,_.jsx)(`button`,{type:`button`,className:`getting-started-login`,"aria-label":`Log in to ${c.name}`,title:S??void 0,onClick:()=>void j(),children:`Log in`}):(0,_.jsx)(`button`,{type:`button`,"aria-label":`Retry ${c.name} connection`,title:S??`Check connection again`,onClick:()=>void k(),children:`Retry`})}),w?(0,_.jsx)(l,{modal:!0,connection:t,command:w.command,displayCommand:w.displayCommand,onComplete:()=>T(null),onClose:()=>T(null)}):null]})}var b=`https://www.openpond.ai/api-keys`;function x({connection:e,payload:t,onPayload:n,onClose:i}){let[o,s]=(0,g.useState)(!1),[l,f]=(0,g.useState)(``),[m,v]=(0,g.useState)(null),x=(0,g.useRef)(t);x.current=t;let S=h({connection:e,onPayload:n,onError:v});function C(e){n({...x.current,providers:e})}let w=t.account.state===`signed_in`;async function T(e){if(e.preventDefault(),l.trim()&&!S.saving)try{await S.saveAccount({apiKey:l,baseUrl:`https://www.openpond.ai`,apiBaseUrl:`https://api.openpond.ai`,environment:`production`}),f(``),s(!1)}catch{}}async function E(){v(null);try{let e=window.openpond?.browser;if(e?.openExternal){let t=await e.openExternal({conversationId:`openpond-get-started`,url:b});if(!t.ok)throw Error(t.error??`Could not open API keys in your browser.`)}else window.open(b,`_blank`,`noopener,noreferrer`)}catch(e){v(e instanceof Error?e.message:String(e))}}return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(u,{inertExclusionSelector:`.native-login-session`,ariaLabel:`Get started with OpenPond`,backdropClassName:`git-dialog-backdrop`,className:`git-dialog getting-started-dialog`,onClose:i,children:[(0,_.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close get started`,title:`Close`,onClick:i,children:(0,_.jsx)(c,{size:16})}),(0,_.jsx)(`header`,{className:`getting-started-header`,children:(0,_.jsx)(`h2`,{children:`Get started with OpenPond`})}),(0,_.jsxs)(`ol`,{className:`getting-started-cards`,children:[(0,_.jsxs)(`li`,{className:`getting-started-card`,children:[(0,_.jsx)(`img`,{className:`getting-started-provider-icon`,src:r,alt:``}),(0,_.jsx)(`h3`,{children:`OpenPond account`}),(0,_.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,children:w?(0,_.jsxs)(`span`,{children:[(0,_.jsx)(p,{size:16}),` Connected`]}):(0,_.jsx)(`a`,{href:b,onClick:e=>{e.preventDefault(),v(null),s(!0)},children:`Connect account`})})]}),(0,_.jsx)(y,{providerId:`codex`,connection:e,config:t.providers.providers.codex,onProviders:C}),(0,_.jsx)(y,{providerId:`claude-code`,connection:e,config:t.providers.providers[`claude-code`],onProviders:C})]})]}),o?(0,_.jsxs)(u,{ariaLabel:`Connect OpenPond account`,backdropClassName:`git-dialog-backdrop getting-started-account-backdrop`,className:`git-dialog getting-started-account-dialog`,onClose:()=>s(!1),dismissDisabled:S.saving,children:[(0,_.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close account connection`,disabled:S.saving,onClick:()=>s(!1),children:(0,_.jsx)(c,{size:16})}),(0,_.jsx)(`h2`,{children:`Connect OpenPond`}),(0,_.jsxs)(`a`,{href:b,target:`_blank`,rel:`noreferrer`,className:`getting-started-key-link`,onClick:e=>{e.preventDefault(),E()},children:[`Create an API key `,(0,_.jsx)(a,{size:12})]}),(0,_.jsxs)(`form`,{onSubmit:e=>void T(e),children:[(0,_.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,_.jsx)(`span`,{children:`OpenPond API key`}),(0,_.jsx)(`input`,{"data-autofocus":!0,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:`opk_…`,value:l,disabled:S.saving,onChange:e=>{f(e.target.value),v(null)}})]}),m?(0,_.jsx)(d,{error:m}):null,(0,_.jsx)(`button`,{className:`git-dialog-primary`,type:`submit`,disabled:S.saving||!l.trim(),children:S.saving?`Connecting…`:`Connect account`})]})]}):null]})}export{x as GettingStartedDialog};
@@ -0,0 +1 @@
1
+ .git-dialog.getting-started-dialog{outline:none;gap:32px;width:min(800px,100vw - 34px);max-height:calc(100dvh - 34px);padding:36px;overflow-y:auto}.getting-started-header{gap:10px;padding-right:20px;display:grid}.getting-started-header h2{letter-spacing:-.5px;margin:0;font-size:23px;font-weight:500}.getting-started-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none;display:grid}.getting-started-card{aspect-ratio:1;border:1px solid var(--border-default);background:var(--surface-panel);text-align:center;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:16px;min-width:0;padding:24px 16px;display:flex}.getting-started-provider-icon{object-fit:contain;width:30px;height:30px}.getting-started-card h3{white-space:nowrap;margin:0;font-size:14px;font-weight:500}.getting-started-card-status{min-height:26px;color:var(--accent-primary);justify-content:center;align-items:center;font-size:12px;display:flex}.getting-started-card-status span,.getting-started-card-status a,.getting-started-card-status button{justify-content:center;align-items:center;gap:5px;display:inline-flex}.getting-started-card-status a,.getting-started-key-link{color:var(--accent-primary);text-decoration:none}.getting-started-card-status a:hover,.getting-started-key-link:hover{text-decoration:underline}.getting-started-card-status button{border:1px solid var(--border-strong);color:var(--accent-primary);font:inherit;cursor:pointer;background:0 0;border-radius:7px;padding:4px 10px}.getting-started-card-status button:hover{background:var(--state-hover)}.getting-started-card-status .getting-started-login{border-color:var(--action-cayenne);background:var(--action-cayenne);color:var(--text-on-accent)}.getting-started-card-status .getting-started-login:hover{border-color:var(--action-cayenne-hover);background:var(--action-cayenne-hover)}.getting-started-account-backdrop{z-index:100}.getting-started-account-dialog form{gap:16px;display:grid}.getting-started-account-dialog form>button{justify-self:end}.getting-started-key-link{align-items:center;gap:5px;font-size:13px;display:inline-flex}.getting-started-account-dialog .getting-started-error{color:var(--accent-primary);margin:0;font-size:12px;line-height:1.5}.getting-started-dialog :is(button,a):focus-visible{outline:2px solid var(--accent-primary);outline-offset:3px}@media (width<=620px){.git-dialog.getting-started-dialog{gap:24px;padding:24px}.getting-started-cards{grid-template-columns:1fr;gap:12px}.getting-started-card{aspect-ratio:auto;gap:12px;min-height:180px;padding:24px 16px}}
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{pn as r}from"./App-Yy3l2sdD.js";import{t as i}from"./LabsRoute-DOnw39du.js";var a=e(t(),1),o=n();function s({api:e,policyId:t,sourceId:n,onBack:s}){let c=(0,a.useMemo)(()=>e.reviewClient(t,n),[e,t,n]),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null);return(0,o.jsxs)(`section`,{"aria-label":`Hosted example review`,children:[(0,o.jsx)(`button`,{type:`button`,className:`training-button secondary`,onClick:()=>{r(s)},children:`Back to continual learning`}),(0,o.jsx)(`p`,{children:`Reviewing hosted examples. Approved tasks become eligible for this policy's next training check.`}),(0,o.jsx)(i,{client:c,selectedId:l,after:d,sourceId:n,onSelect:e=>{r(()=>u(e))},onPage:f})]})}export{s as HostedModelLearningReview};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{It as r}from"./App-DY2R8Z6r.js";import{t as i}from"./LabsRoute-BV7ZJGEw.js";var a=e(t(),1),o=n();function s({api:e,policyId:t,sourceId:n,onBack:s}){let c=(0,a.useMemo)(()=>e.reviewClient(t,n),[e,t,n]),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null);return(0,o.jsxs)(`section`,{"aria-label":`Hosted example review`,children:[(0,o.jsx)(`button`,{type:`button`,className:`training-button secondary`,onClick:()=>{r(s)},children:`Back to continual learning`}),(0,o.jsx)(`p`,{children:`Reviewing hosted examples. Approved tasks become eligible for this policy's next training check.`}),(0,o.jsx)(i,{client:c,selectedId:l,after:d,sourceId:n,onSelect:e=>{r(()=>u(e))},onPage:f})]})}export{s as HostedModelLearningReview};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D9WbJMSq.js";import{b as r,x as i}from"./contracts-BLiqJxBv.js";import{t as a}from"./api-client-Dgz-fOMl.js";import{t as o}from"./AppDialog-8Y0FYalT.js";import{a as s,i as c,n as l,o as u,r as d}from"./LabsRoute-BV7ZJGEw.js";var f=e(t(),1),p=n();function m({client:e,project:t,policy:n,onClose:m}){let[h]=(0,f.useState)(()=>n?.id??`policy-${crypto.randomUUID()}`),[g]=(0,f.useState)(()=>s(t,n)),[_,v]=(0,f.useState)(g.enabled),[y,b]=(0,f.useState)(g.scheduled),[x,S]=(0,f.useState)(!n),[C,w]=(0,f.useState)(g.humanReviewRequired),[T,E]=(0,f.useState)(n?.sources??[]),[D,O]=(0,f.useState)(n?.taskDefinition??null),[k,A]=(0,f.useState)({interval:String(g.intervalSeconds/60),minimum:String(g.minimumApprovedExamples),batch:String(g.maxBatchExamples),spend:String(g.maxIterationSpendUsd),daily:String(g.maxDailySpendUsd),cooldown:String(g.cooldownSeconds/60),retries:String(g.maxRetries),backlog:String(g.maxBacklogExamples)}),[j,M]=(0,f.useState)(!1),[N,P]=(0,f.useState)(!1),[F,I]=(0,f.useState)(null),[L,R]=(0,f.useState)(),[z,B]=(0,f.useState)(null),[V,H]=(0,f.useState)(null),U=(0,f.useRef)(null),W=(0,f.useRef)(!1);(0,f.useEffect)(()=>{let t=!1;return e.sources(L).then(e=>{t||(B({after:L,data:e}),H(null))},e=>{t||H(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[e,L]);let G=z&&z.after===L?z.data:null,K=x?t.trainingSetup.rewardBindingRef:n?.rewardBinding;function q(e){let t=T.some(t=>t.id===e.id);E(t?T.filter(t=>t.id!==e.id):[...T,r(e)]),O(t&&T.length===1?null:D??e.taskDefinition),M(!0)}async function J(){if(W.current)return!1;W.current=!0,P(!0),I(null);try{if(!U.current){if(!D||!T.length||!K)throw Error(`Select task sources and a Model Reward before saving.`);let e=c({project:t,previous:n,policyId:h,applyModelConfiguration:x,sources:T,taskDefinition:D,settings:{enabled:_,scheduled:y,humanReviewRequired:C,intervalSeconds:Number(k.interval)*60,minimumApprovedExamples:Number(k.minimum),maxBatchExamples:Number(k.batch),maxIterationSpendUsd:Number(k.spend),maxDailySpendUsd:Number(k.daily),cooldownSeconds:Number(k.cooldown)*60,maxRetries:Number(k.retries),maxBacklogExamples:Number(k.backlog)}});U.current={action:`publish`,kind:`policy`,operationId:crypto.randomUUID(),expectedRevision:n?.revision??0,content:e}}return await e.command(U.current),U.current=null,M(!1),!0}catch(e){return e instanceof a&&e.status>=400&&e.status<500&&![408,429].includes(e.status)&&(U.current=null),I(e instanceof Error?e.message:`Unable to save learning settings.`),!1}finally{W.current=!1,P(!1)}}let Y=u({name:`learning settings`,dirty:j,busy:N,save:J});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(o,{ariaLabel:`Continual learning settings`,className:`labs-rename-dialog learning-workspace hosted-learning-settings`,backdropClassName:`labs-rename-backdrop`,dismissDisabled:N,onClose:()=>{Y.requestLeave(m)},children:[(0,p.jsx)(`h2`,{children:`Continual learning settings`}),(0,p.jsxs)(`p`,{children:[`Train `,t.name,` from approved tasks. Acceptance and serving remain separate decisions.`]}),(0,p.jsx)(l,{error:F??V}),(0,p.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),await J()&&(Y.allowNextNavigation(),m())},children:[(0,p.jsxs)(`fieldset`,{disabled:N||!!U.current,onChange:()=>M(!0),children:[(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),` Enable learning`]}),(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:C,disabled:C,onChange:()=>w(!0)}),` Human review required`]}),(0,p.jsx)(`p`,{children:`New policies require human review. Qualified automatic admission cannot be configured here yet.`}),n?(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>S(e.target.checked)}),` Use the Model’s current training configuration`]}):null,(0,p.jsxs)(`fieldset`,{children:[(0,p.jsx)(`legend`,{children:`Task sources`}),!G&&!V?(0,p.jsx)(`p`,{children:`Loading sources…`}):null,G?.sources.items.map(e=>{let t=G.definitions.find(t=>i(r(t),e.taskDefinition)),n=!!(K&&t&&i(K,t.rewardBinding)&&(!D||i(D,e.taskDefinition))),a=T.find(t=>t.id===e.id);return(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:!!a,disabled:!a&&(!e.enabled||!n),onChange:()=>q(e)}),` `,e.name,a&&a.revision!==e.revision?(0,p.jsxs)(`small`,{children:[`Using saved revision `,a.revision,`; clear and reselect to update.`]}):n?null:(0,p.jsx)(`small`,{children:`Different task format or Reward.`})]},e.id)}),(0,p.jsxs)(`p`,{children:[T.length,` sources selected. `,(0,p.jsx)(`button`,{type:`button`,onClick:()=>{E([]),O(null),M(!0)},children:`Clear selection`})]}),(0,p.jsx)(d,{after:L,next:G?.sources.nextCursor,onPage:e=>R(e??void 0)})]}),(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked)}),` Schedule training`]}),Object.keys(k).filter(e=>e!==`interval`||y).map(e=>(0,p.jsxs)(`label`,{children:[{interval:`Check interval (minutes)`,minimum:`Minimum approved examples`,batch:`Maximum examples per batch`,spend:`Maximum spend per iteration ($)`,daily:`Maximum daily spend ($)`,cooldown:`Cooldown (minutes)`,retries:`Automatic retries`,backlog:`Maximum backlog`}[e],(0,p.jsx)(`input`,{type:`number`,value:k[e],min:`0`,step:e===`spend`||e===`daily`?`0.01`:`1`,onChange:t=>A(n=>({...n,[e]:t.target.value}))})]},e))]}),(0,p.jsxs)(`div`,{className:`model-build-actions`,children:[(0,p.jsx)(`button`,{type:`submit`,className:`training-button`,disabled:N,children:N?`Saving…`:U.current?`Retry save`:`Save settings`}),(0,p.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:N,onClick:()=>{Y.requestLeave(m)},children:`Cancel`})]})]})]}),Y.dialog]})}export{m as HostedModelLearningSettings};
@@ -0,0 +1 @@
1
+ .html-visual{overflow-anchor:auto;width:100%;min-width:0}.html-visual-toolbar{min-height:32px;color:var(--text-muted);align-items:center;gap:8px;margin-bottom:8px;font-size:12px;display:flex}.html-visual-toolbar>:first-child{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.html-visual-toolbar button,.html-visual-status button{color:var(--text-muted);font:inherit;cursor:pointer;background:0 0;border:0;padding:4px}.html-visual-toolbar button{border-radius:7px;place-items:center;width:27px;height:27px;display:grid}.html-visual-toolbar button:hover,.html-visual-status button:hover{color:var(--text-primary)}.html-visual-toolbar button:focus-visible{outline:2px solid var(--accent-info);outline-offset:2px}.html-visual-toolbar button:disabled{opacity:.45;cursor:default}.html-visual-content{position:relative}.html-visual-preview{cursor:pointer;background:0 0;border:0;border-radius:8px;width:100%;padding:0;display:block;overflow:hidden}.html-visual-preview img{width:100%;height:auto;display:block}.html-visual-preview:focus-visible{outline:2px solid var(--accent-info);outline-offset:2px}.html-visual-placeholder{position:absolute;inset:0;overflow:hidden}.html-visual-content iframe{background:0 0;border:0;width:100%;display:block}.html-visual-placeholder img{object-fit:contain;object-position:top;width:100%;display:block}.html-visual-status{color:var(--text-muted);padding:8px 0;font-size:12px}.html-visual-selection-receipt{color:var(--text-primary);align-items:center;gap:8px;padding:8px 0;font-size:13px;display:flex}.html-visual-selection-receipt span{overflow-wrap:anywhere;flex:1;min-width:0}.html-visual-selection-receipt button{color:var(--text-muted);font:inherit;background:0 0;border:0;padding:4px}