openpond 0.2.61 → 0.2.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/README.md +2 -0
  2. package/dist/app-server.d.ts +4713 -477
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/{acp-FUAWCKBH.js → acp-H3MJCPHX.js} +1 -1
  5. package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-DWA7272M.js} +1 -1
  6. package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
  7. package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-K7H2WJ56.js} +1 -1
  8. package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +2 -0
  9. package/dist/chunks/{app-server-evaluations-HAAYVEXB.js → app-server-evaluations-XGMGS67X.js} +1 -1
  10. package/dist/chunks/app-server-harness-services-BHD6S5II.js +2 -0
  11. package/dist/chunks/app-server-runtime-LFIL6F7D.js +2 -0
  12. package/dist/chunks/apps-QKAHJGQ4.js +2 -0
  13. package/dist/chunks/chunk-25XXZS3E.js +2 -0
  14. package/dist/chunks/chunk-27JGS3KB.js +12 -0
  15. package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
  16. package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-2HAWOMZK.js} +1 -1
  17. package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
  18. package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
  19. package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
  20. package/dist/chunks/{chunk-LHENAWLH.js → chunk-42V4NV2F.js} +1 -1
  21. package/dist/chunks/{chunk-DW3GJRY3.js → chunk-4FNCBA3Y.js} +1 -1
  22. package/dist/chunks/{chunk-TXBIZDXG.js → chunk-4L6DU6Z2.js} +1 -1
  23. package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
  24. package/dist/chunks/{chunk-MLTKB5G3.js → chunk-4SZ3HKHU.js} +1 -1
  25. package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
  26. package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
  27. package/dist/chunks/chunk-5FU5RLML.js +2 -0
  28. package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-5MHYGMJG.js} +1 -1
  29. package/dist/chunks/chunk-6EBCS57F.js +2 -0
  30. package/dist/chunks/chunk-6RS4NAOY.js +2 -0
  31. package/dist/chunks/chunk-6XSSM4WT.js +3 -0
  32. package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
  33. package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
  34. package/dist/chunks/{chunk-BQUWZRWU.js → chunk-7WYL2IDD.js} +1 -1
  35. package/dist/chunks/chunk-7YLXGILH.js +2 -0
  36. package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
  37. package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
  38. package/dist/chunks/{chunk-TTN63EAM.js → chunk-AH26AQN7.js} +1 -1
  39. package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
  40. package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
  41. package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
  42. package/dist/chunks/chunk-B5R53U74.js +2 -0
  43. package/dist/chunks/chunk-BKEDG3A4.js +22 -0
  44. package/dist/chunks/{chunk-CO3OJFPU.js → chunk-BPZOABMC.js} +1 -1
  45. package/dist/chunks/{chunk-5VPU7OS7.js → chunk-BSPFY3Y5.js} +1 -1
  46. package/dist/chunks/{chunk-U4HZD2GM.js → chunk-BU27SLZP.js} +2 -2
  47. package/dist/chunks/chunk-C2AXMKK4.js +2 -0
  48. package/dist/chunks/{chunk-SIV5P6JO.js → chunk-C2LAEGOW.js} +2 -2
  49. package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-CZ5R4JXZ.js} +1 -1
  50. package/dist/chunks/{chunk-D4JZALZ4.js → chunk-DABBHWSF.js} +1 -1
  51. package/dist/chunks/{chunk-ROE24PN5.js → chunk-DLANLLKH.js} +1 -1
  52. package/dist/chunks/{chunk-57RY3LSR.js → chunk-DQI5TE6A.js} +2 -2
  53. package/dist/chunks/chunk-DTTFUANI.js +12 -0
  54. package/dist/chunks/{chunk-VBW2X42G.js → chunk-DUL6DXOI.js} +1 -1
  55. package/dist/chunks/{chunk-OQUKSRU3.js → chunk-ELX7VRSU.js} +1 -1
  56. package/dist/chunks/chunk-ERL2M773.js +3 -0
  57. package/dist/chunks/chunk-ERT32RZA.js +86 -0
  58. package/dist/chunks/{chunk-RPOD6I64.js → chunk-EZRUWIP6.js} +1 -1
  59. package/dist/chunks/{chunk-MCIIGQT7.js → chunk-F6UQ6PPK.js} +1 -1
  60. package/dist/chunks/chunk-F7QTIHXX.js +2 -0
  61. package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
  62. package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FVRII5XO.js} +1 -1
  63. package/dist/chunks/{chunk-GEXKTGLY.js → chunk-FYYYECHE.js} +50 -48
  64. package/dist/chunks/chunk-G32BO6M5.js +4 -0
  65. package/dist/chunks/{chunk-TSAW2QVU.js → chunk-G6OR5NB6.js} +1 -1
  66. package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GGJUWIGR.js} +1 -1
  67. package/dist/chunks/{chunk-Q66LWQGF.js → chunk-GPL2Z65R.js} +1 -1
  68. package/dist/chunks/{chunk-LNRFRAV5.js → chunk-GS6ZUSIN.js} +2 -2
  69. package/dist/chunks/{chunk-OFVUN4KI.js → chunk-GVARQXYI.js} +1 -1
  70. package/dist/chunks/chunk-GXCUH2VV.js +17 -0
  71. package/dist/chunks/{chunk-IUGK6BBY.js → chunk-GXZCMO6S.js} +1 -1
  72. package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
  73. package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
  74. package/dist/chunks/{chunk-I3W27VK4.js → chunk-HUCBKXTU.js} +1 -1
  75. package/dist/chunks/{chunk-P4XM7LUT.js → chunk-IHB5GTOJ.js} +2 -2
  76. package/dist/chunks/{chunk-U447MS3Y.js → chunk-IWWXIUAQ.js} +1 -1
  77. package/dist/chunks/chunk-J572ANHX.js +13 -0
  78. package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-J7ZTPXRQ.js} +1 -1
  79. package/dist/chunks/chunk-JCLTFDVW.js +2 -0
  80. package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
  81. package/dist/chunks/{chunk-ELYRVTTG.js → chunk-JORRZ4BB.js} +1 -1
  82. package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
  83. package/dist/chunks/chunk-JSQRLLN6.js +2 -0
  84. package/dist/chunks/chunk-KCOTDUGW.js +2 -0
  85. package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
  86. package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
  87. package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
  88. package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LK2K3SPM.js} +2 -2
  89. package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-LKKMLBOH.js} +1 -1
  90. package/dist/chunks/{chunk-BNZTJPK7.js → chunk-LSZJ5M3X.js} +1 -1
  91. package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
  92. package/dist/chunks/{chunk-4LZLO4OW.js → chunk-M3SCON53.js} +1 -1
  93. package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
  94. package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
  95. package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
  96. package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-N33D7KCW.js} +1 -1
  97. package/dist/chunks/chunk-N42HT64M.js +2 -0
  98. package/dist/chunks/{chunk-L3GA2CQI.js → chunk-N4VHLJBZ.js} +1 -1
  99. package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
  100. package/dist/chunks/chunk-NG2L6D7G.js +2 -0
  101. package/dist/chunks/{chunk-7EAWLYYB.js → chunk-NLYZ5K7U.js} +2 -2
  102. package/dist/chunks/{chunk-B47JMAVW.js → chunk-NT7N6KLE.js} +1 -1
  103. package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
  104. package/dist/chunks/{chunk-PAZDQRYU.js → chunk-NZTCH6K5.js} +1 -1
  105. package/dist/chunks/{chunk-CQF6QZEL.js → chunk-OG33QAG6.js} +1 -1
  106. package/dist/chunks/chunk-OTUBJV6C.js +6 -0
  107. package/dist/chunks/{chunk-TMMFF6DO.js → chunk-PBTXLQAU.js} +1 -1
  108. package/dist/chunks/chunk-Q34IF4PW.js +2 -0
  109. package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-QJ6KUVAR.js} +1 -1
  110. package/dist/chunks/{chunk-SID4X3YN.js → chunk-QU4UE73E.js} +1 -1
  111. package/dist/chunks/{chunk-I7JCARVH.js → chunk-R6VJDOQM.js} +3 -3
  112. package/dist/chunks/{chunk-6RVF2J47.js → chunk-R6WMY6AH.js} +1 -1
  113. package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-RDSVU6F6.js} +1 -1
  114. package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
  115. package/dist/chunks/{chunk-GQUS7MCH.js → chunk-RZUCVF2Q.js} +1 -1
  116. package/dist/chunks/chunk-SFKZITAG.js +9 -0
  117. package/dist/chunks/{chunk-MF35MALN.js → chunk-SHJY5RLU.js} +1 -1
  118. package/dist/chunks/chunk-SI5W5LBV.js +2 -0
  119. package/dist/chunks/chunk-SO42ZB5K.js +2 -0
  120. package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
  121. package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
  122. package/dist/chunks/{chunk-ZISYLRH6.js → chunk-TCOTXCV6.js} +1 -1
  123. package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
  124. package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
  125. package/dist/chunks/chunk-UPWJSNL5.js +2 -0
  126. package/dist/chunks/chunk-URNMC46H.js +157 -0
  127. package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
  128. package/dist/chunks/{chunk-WFVOG5PU.js → chunk-V7KR74NO.js} +1 -1
  129. package/dist/chunks/{chunk-QDBYLJGH.js → chunk-VHXDWAEH.js} +1 -1
  130. package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-W2TICQ62.js} +1 -1
  131. package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
  132. package/dist/chunks/chunk-WP2L2NY2.js +2 -0
  133. package/dist/chunks/chunk-WSOUMXH3.js +24 -0
  134. package/dist/chunks/chunk-WWQNMC7C.js +6 -0
  135. package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
  136. package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
  137. package/dist/chunks/{chunk-T4LLJC5N.js → chunk-XOB6FKQV.js} +1 -1
  138. package/dist/chunks/chunk-Y766IN7Y.js +2 -0
  139. package/dist/chunks/chunk-YCZZ62C2.js +2 -0
  140. package/dist/chunks/chunk-YM4PSVFW.js +4 -0
  141. package/dist/chunks/chunk-YNQWJWIC.js +10 -0
  142. package/dist/chunks/{chunk-LBBXVOVR.js → chunk-Z3BWCFLV.js} +1 -1
  143. package/dist/chunks/{chunk-WRQEYW3V.js → chunk-ZG6353RM.js} +1 -1
  144. package/dist/chunks/{chunk-PE7UKJXK.js → chunk-ZPTKR3GB.js} +1 -1
  145. package/dist/chunks/{chunk-2VXL6AU3.js → chunk-ZYVHOVKL.js} +1 -1
  146. package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
  147. package/dist/chunks/cli-PSXMIJTF.js +2 -0
  148. package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-XYKMXIWF.js} +1 -1
  149. package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
  150. package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
  151. package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-JONPTII6.js} +1 -1
  152. package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
  153. package/dist/chunks/{continual-CJUZM5ZQ.js → continual-Z7MO2PF6.js} +1 -1
  154. package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
  155. package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
  156. package/dist/chunks/datasets-2PC2HP7N.js +2 -0
  157. package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
  158. package/dist/chunks/dist-47AYOIH6.js +2 -0
  159. package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
  160. package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
  161. package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
  162. package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
  163. package/dist/chunks/experiments-SZQYR6MH.js +2 -0
  164. package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
  165. package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
  166. package/dist/chunks/{help-M2VQGPVC.js → help-7HXFWIKS.js} +1 -1
  167. package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
  168. package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
  169. package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
  170. package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
  171. package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
  172. package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
  173. package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
  174. package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
  175. package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
  176. package/dist/chunks/{hosted-profile-evaluation-preparation-ZAOGDQXO.js → hosted-profile-evaluation-preparation-2LSMZQNA.js} +1 -1
  177. package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
  178. package/dist/chunks/human-review-M26UKGJL.js +2 -0
  179. package/dist/chunks/{import-WLLUIDS6.js → import-6SI4BEKS.js} +2 -2
  180. package/dist/chunks/learning-HM3NWOV5.js +2 -0
  181. package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
  182. package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
  183. package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
  184. package/dist/chunks/opchat-AG4CWVY4.js +3 -0
  185. package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
  186. package/dist/chunks/organizations-KDKX77XZ.js +2 -0
  187. package/dist/chunks/{profile-JRS3JNRC.js → profile-O5HL5DTQ.js} +1 -1
  188. package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
  189. package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
  190. package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
  191. package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
  192. package/dist/chunks/{runtime-CBJF5GMB.js → runtime-XBA744HJ.js} +2 -2
  193. package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
  194. package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-27U3FQN7.js} +1 -1
  195. package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
  196. package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-FIPWOXWV.js} +1 -1
  197. package/dist/chunks/src-BLWX6DRG.js +424 -0
  198. package/dist/chunks/{src-4YZF6L6H.js → src-PU7QTFO5.js} +1 -1
  199. package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
  200. package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
  201. package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
  202. package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-K324SQTO.js} +1 -1
  203. package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-3LQMIYAP.js} +1 -1
  204. package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-3KSX7RSO.js} +1 -1
  205. package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
  206. package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
  207. package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
  208. package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
  209. package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
  210. package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
  211. package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
  212. package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
  213. package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-QTVHJAEP.js} +1 -1
  214. package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
  215. package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
  216. package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
  217. package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
  218. package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
  219. package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-DWV5XSMY.js} +1 -1
  220. package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-2KUY4T6M.js} +1 -1
  221. package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
  222. package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
  223. package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-UGVEFA6M.js} +1 -1
  224. package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
  225. package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-GEQIZELY.js} +1 -1
  226. package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
  227. package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-CQV7PL3V.js} +1 -1
  228. package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-XKN6K66J.js} +18 -10
  229. package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-Q7DTTR4S.js} +1 -1
  230. package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-XGAX7NLB.js} +1 -1
  231. package/dist/chunks/{taskset-NYLUYX6K.js → taskset-ARKJQKYQ.js} +1 -1
  232. package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
  233. package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
  234. package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-UTQAJA6H.js} +1 -1
  235. package/dist/chunks/training-3IWW4256.js +2 -0
  236. package/dist/chunks/{training-UBX6E7SK.js → training-RVIESURJ.js} +1 -1
  237. package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
  238. package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
  239. package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
  240. package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
  241. package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
  242. package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
  243. package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
  244. package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
  245. package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
  246. package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
  247. package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
  248. package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-7FBUBZ66.js} +1 -1
  249. package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-G3CMY7ZA.js} +1 -1
  250. package/dist/cli.js +2 -2
  251. package/dist/hosted-chat.d.ts +28 -0
  252. package/dist/index.js +1 -1
  253. package/dist/sandbox/url.d.ts +3 -1
  254. package/dist/skills/LICENSE +21 -0
  255. package/dist/skills/manifest.json +168 -0
  256. package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
  257. package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
  258. package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
  259. package/dist/skills/openpond-cli/SKILL.md +24 -7
  260. package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
  261. package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
  262. package/dist/skills/openpond-cli/references/experiments-and-training.md +156 -11
  263. package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
  264. package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
  265. package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
  266. package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
  267. package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
  268. package/dist/web/assets/App-DY2R8Z6r.js +53 -0
  269. package/dist/web/assets/App-DpFKLxuA.css +1 -0
  270. package/dist/web/assets/AppDialog-8Y0FYalT.js +1 -0
  271. package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
  272. package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-BiQbbVxq.js} +1 -1
  273. package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
  274. package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
  275. package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
  276. package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-J4ChOjvG.js} +1 -1
  277. package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
  278. package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
  279. package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
  280. package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
  281. package/dist/web/assets/CommunityView-Okydjpqm.js +1 -0
  282. package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
  283. package/dist/web/assets/ComposerCreateImproveStrip-CSngc8-V.js +1 -0
  284. package/dist/web/assets/ConversationImportsSettings-DS73kyfj.js +1 -0
  285. package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
  286. package/dist/web/assets/GetStartedView-DGFPQ1We.js +1 -0
  287. package/dist/web/assets/GettingStartedDialog-DFBYQdHz.js +1 -0
  288. package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
  289. package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
  290. package/dist/web/assets/HostedModelLearningSettings-CHaTHwC8.js +1 -0
  291. package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
  292. package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
  293. package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
  294. package/dist/web/assets/LabSkillSidebar-BwtlThO7.js +1 -0
  295. package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
  296. package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
  297. package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
  298. package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
  299. package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
  300. package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
  301. package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
  302. package/dist/web/assets/NewProjectDialog-CjrjgkTN.js +1 -0
  303. package/dist/web/assets/OutputsPage-jzx93QQ3.js +1 -0
  304. package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-C1M13qG2.js} +1 -1
  305. package/dist/web/assets/ProjectsPage-DZrjlMp2.js +1 -0
  306. package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
  307. package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
  308. package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
  309. package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
  310. package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
  311. package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
  312. package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
  313. package/dist/web/assets/TerminalOverlay-d7A2F9Lx.js +16 -0
  314. package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
  315. package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
  316. package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
  317. package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
  318. package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-FhYymrfc.js} +2 -2
  319. package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
  320. package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
  321. package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
  322. package/dist/web/assets/WorkspaceFileLocation-LrEWj4UK.js +1 -0
  323. package/dist/web/assets/WorkspaceGitDialogs-NRIMXnkS.js +1 -0
  324. package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
  325. package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
  326. package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
  327. package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
  328. package/dist/web/assets/bot-6OhUEmkE.js +1 -0
  329. package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
  330. package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
  331. package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-jmVA1BIf.js} +1 -1
  332. package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
  333. package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
  334. package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
  335. package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
  336. package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-BdQ_YDuk.js} +1 -1
  337. package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-Ck1ufAr8.js} +1 -1
  338. package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
  339. package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
  340. package/dist/web/assets/copy-CPkbMfXt.js +1 -0
  341. package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-CXQny8HU.js} +1 -1
  342. package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-CYxYl_om.js} +1 -1
  343. package/dist/web/assets/external-link-CDKOLG_v.js +1 -0
  344. package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-CEtOb_lK.js} +1 -1
  345. package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-CVMYZs3e.js} +1 -1
  346. package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
  347. package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-DoY4V_j0.js} +1 -1
  348. package/dist/web/assets/icons-D7jkCa2d.js +1 -0
  349. package/dist/web/assets/{image-C7HVlg3X.js → image-B-PjDSwU.js} +1 -1
  350. package/dist/web/assets/{index-BsPUniZy.js → index-D9WbJMSq.js} +2 -2
  351. package/dist/web/assets/index-g7UqJhnX.css +1 -0
  352. package/dist/web/assets/{info-BLWDShaz.js → info-CCnw-K3b.js} +1 -1
  353. package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
  354. package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-CeOpZdPj.js} +1 -1
  355. package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
  356. package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
  357. package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-BZX38cpr.js} +1 -1
  358. package/dist/web/assets/message-square-CvgSecgD.js +1 -0
  359. package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-CF2JDhi4.js} +2 -2
  360. package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-cbDqt48m.js} +2 -2
  361. package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-m2ze2EsL.js} +2 -2
  362. package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-yeyow_-Q.js} +2 -2
  363. package/dist/web/assets/{monitor-B6OuAu13.js → monitor-By0s4hxb.js} +1 -1
  364. package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-BJ2QgJLa.js} +1 -1
  365. package/dist/web/assets/{pdf-RXlFwNte.js → pdf-C4x-1jjP.js} +1 -1
  366. package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
  367. package/dist/web/assets/play-D_SuGDBM.js +1 -0
  368. package/dist/web/assets/plus-yw95Iaj8.js +1 -0
  369. package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-I86G1Gd9.js} +1 -1
  370. package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
  371. package/dist/web/assets/{python-BQXo7wMt.js → python-CqFTPj8r.js} +1 -1
  372. package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-Dga35Eay.js} +1 -1
  373. package/dist/web/assets/requests-BCbaFiqV.js +1 -0
  374. package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
  375. package/dist/web/assets/{save-BxXc21N6.js → save-BLKjYtzR.js} +1 -1
  376. package/dist/web/assets/settings-D7C-Auyi.js +21 -0
  377. package/dist/web/assets/settings-lists-DMKA1lCN.js +5 -0
  378. package/dist/web/assets/square-BY5lG2Ol.js +1 -0
  379. package/dist/web/assets/square-terminal-B-n7vUex.js +1 -0
  380. package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
  381. package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-BhmBE5XE.js} +1 -1
  382. package/dist/web/assets/training-QrdkRQZQ.js +2 -0
  383. package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-DB-jg6L_.js} +12 -12
  384. package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-BSWEII2p.js} +1 -1
  385. package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
  386. package/dist/web/assets/{upload-NXasN1wU.js → upload-C4MPhQn8.js} +1 -1
  387. package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-9oqWdRLs.js} +1 -1
  388. package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
  389. package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
  390. package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-BD0Uexmh.js} +1 -1
  391. package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-Cloe0WuQ.js} +1 -1
  392. package/dist/web/assets/{workers-u92Boudu.js → workers-BXagz5eg.js} +1 -1
  393. package/dist/web/assets/x-Dqpel42h.js +1 -0
  394. package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-sBdvVbCc.js} +1 -1
  395. package/dist/web/index.html +12 -3
  396. package/docs/command-reference.md +49 -5
  397. package/package.json +6 -2
  398. package/dist/chunks/actions-command-LOHNQUWP.js +0 -2
  399. package/dist/chunks/app-server-connected-apps-Q2VWWJNX.js +0 -2
  400. package/dist/chunks/app-server-harness-services-2PSZBT7U.js +0 -2
  401. package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
  402. package/dist/chunks/apps-7PIBF32Q.js +0 -2
  403. package/dist/chunks/chunk-3TYCIYW6.js +0 -17
  404. package/dist/chunks/chunk-4GZ2FPB5.js +0 -2
  405. package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
  406. package/dist/chunks/chunk-4N3UF3U5.js +0 -2
  407. package/dist/chunks/chunk-4P3X2RXA.js +0 -2
  408. package/dist/chunks/chunk-4RHM4WN2.js +0 -2
  409. package/dist/chunks/chunk-6DCXAXVD.js +0 -22
  410. package/dist/chunks/chunk-AWPYTDH4.js +0 -4
  411. package/dist/chunks/chunk-BLKTUFGB.js +0 -2
  412. package/dist/chunks/chunk-BN5AVRUG.js +0 -2
  413. package/dist/chunks/chunk-D5ADDBS5.js +0 -2
  414. package/dist/chunks/chunk-DGPGOBYZ.js +0 -5
  415. package/dist/chunks/chunk-E3EKBPCB.js +0 -2
  416. package/dist/chunks/chunk-E67M5WGY.js +0 -2
  417. package/dist/chunks/chunk-EIIGTADO.js +0 -2
  418. package/dist/chunks/chunk-F5JDBDYL.js +0 -2
  419. package/dist/chunks/chunk-FWIPHEVA.js +0 -12
  420. package/dist/chunks/chunk-GLVR74PX.js +0 -2
  421. package/dist/chunks/chunk-HZLV773Y.js +0 -22
  422. package/dist/chunks/chunk-JEVA7YQL.js +0 -3
  423. package/dist/chunks/chunk-KC7I6E6W.js +0 -2
  424. package/dist/chunks/chunk-M4ZRCRJM.js +0 -10
  425. package/dist/chunks/chunk-N663LL27.js +0 -2
  426. package/dist/chunks/chunk-NR5VASQB.js +0 -2
  427. package/dist/chunks/chunk-OJSK4NSW.js +0 -151
  428. package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
  429. package/dist/chunks/chunk-Q324ZA5M.js +0 -2
  430. package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
  431. package/dist/chunks/chunk-UJBEWIR3.js +0 -8
  432. package/dist/chunks/chunk-V67IFV26.js +0 -86
  433. package/dist/chunks/chunk-VSUHJ46L.js +0 -18
  434. package/dist/chunks/chunk-VWJ5IYQP.js +0 -2
  435. package/dist/chunks/chunk-X3WEQL3O.js +0 -2
  436. package/dist/chunks/chunk-XK7SPL63.js +0 -2
  437. package/dist/chunks/chunk-XLULTQLZ.js +0 -12
  438. package/dist/chunks/chunk-YR5ID2SS.js +0 -2
  439. package/dist/chunks/chunk-ZBBVRYU3.js +0 -6
  440. package/dist/chunks/chunk-ZHFH2TZN.js +0 -2
  441. package/dist/chunks/chunk-ZZWAQBA2.js +0 -2
  442. package/dist/chunks/cli-WC45SI7E.js +0 -2
  443. package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
  444. package/dist/chunks/connected-evidence-4J3YXU4O.js +0 -2
  445. package/dist/chunks/core-commands-JGXU6B4C.js +0 -2
  446. package/dist/chunks/dataset-preparation-authoring-DFGJBMVF.js +0 -4
  447. package/dist/chunks/datasets-MNHZAZIB.js +0 -2
  448. package/dist/chunks/desktop-test-P23MHAIG.js +0 -3
  449. package/dist/chunks/dist-IIFTZWNR.js +0 -2
  450. package/dist/chunks/evaluation-coordination-6NQEH5WU.js +0 -2
  451. package/dist/chunks/experiment-improvements-M27Z5OF4.js +0 -2
  452. package/dist/chunks/experiments-IWSCFDBB.js +0 -2
  453. package/dist/chunks/experiments-signal-R3NNH7WR.js +0 -2
  454. package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
  455. package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
  456. package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
  457. package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
  458. package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
  459. package/dist/chunks/hosted-profile-candidate-37ZFY2LH.js +0 -3
  460. package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
  461. package/dist/chunks/hosted-profile-evaluation-control-UQBMML6K.js +0 -2
  462. package/dist/chunks/hosted-profile-evaluation-inspection-YASS4T6L.js +0 -3
  463. package/dist/chunks/human-review-IJETDOWB.js +0 -2
  464. package/dist/chunks/learning-KVLTMRLD.js +0 -2
  465. package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
  466. package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
  467. package/dist/chunks/model-projects-AVBQDNYG.js +0 -2
  468. package/dist/chunks/opchat-KSOJEL4W.js +0 -3
  469. package/dist/chunks/organizations-DJRJWC5I.js +0 -2
  470. package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
  471. package/dist/chunks/project-agent-2KNJFNZI.js +0 -2
  472. package/dist/chunks/published-experiment-source-LFYHKFAO.js +0 -2
  473. package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
  474. package/dist/chunks/sandbox-command-IIGTPYN3.js +0 -2
  475. package/dist/chunks/saved-work-QA46KCME.js +0 -2
  476. package/dist/chunks/src-E7NWAN5B.js +0 -420
  477. package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
  478. package/dist/chunks/store-chat-resources-CGW7PDCG.js +0 -2
  479. package/dist/chunks/store-evaluation-results-V5J6L4NV.js +0 -7
  480. package/dist/chunks/store-harness-workspaces-HHMM6GNK.js +0 -2
  481. package/dist/chunks/store-human-review-V5H4QDHR.js +0 -7
  482. package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
  483. package/dist/chunks/store-model-batch-review-KMYPYWJR.js +0 -2
  484. package/dist/chunks/store-model-configuration-UXNC4PGY.js +0 -3
  485. package/dist/chunks/store-task-inbox-LNDCZOYE.js +0 -33
  486. package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
  487. package/dist/chunks/taskset-packages-I7I5KBFP.js +0 -2
  488. package/dist/chunks/training-error-AYOGHHL2.js +0 -2
  489. package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
  490. package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
  491. package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
  492. package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
  493. package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
  494. package/dist/web/assets/App-Df7uYQGj.css +0 -1
  495. package/dist/web/assets/App-Yy3l2sdD.js +0 -56
  496. package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
  497. package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
  498. package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
  499. package/dist/web/assets/ChatTimelineEntry-IKzZsHoI.js +0 -1
  500. package/dist/web/assets/CommandMenu-CBY2AJxV.js +0 -1
  501. package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
  502. package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
  503. package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
  504. package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
  505. package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
  506. package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
  507. package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
  508. package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
  509. package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
  510. package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
  511. package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
  512. package/dist/web/assets/LabsRoute-DOnw39du.js +0 -101
  513. package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
  514. package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
  515. package/dist/web/assets/MainPane-CuBUBA9F.css +0 -1
  516. package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
  517. package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
  518. package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
  519. package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
  520. package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
  521. package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
  522. package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
  523. package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
  524. package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
  525. package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
  526. package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
  527. package/dist/web/assets/TrainingMetricWorkbench-BmzHLwIP.js +0 -1
  528. package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
  529. package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
  530. package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
  531. package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
  532. package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
  533. package/dist/web/assets/app-models-BviS9b7U.js +0 -1
  534. package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
  535. package/dist/web/assets/chat-resources-CItQ4mZD.js +0 -1
  536. package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
  537. package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
  538. package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
  539. package/dist/web/assets/icons-kaq6k88m.js +0 -1
  540. package/dist/web/assets/index-DUMDOdB2.css +0 -1
  541. package/dist/web/assets/play-BPPQoqMl.js +0 -1
  542. package/dist/web/assets/plus-D18vYzHF.js +0 -1
  543. package/dist/web/assets/settings-BKmRueaw.js +0 -21
  544. package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
  545. package/dist/web/assets/square-Da8RuqW4.js +0 -1
  546. package/dist/web/assets/training-managed-adapter-81RrdT1k.js +0 -1
  547. package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
  548. package/dist/web/assets/useAgentInventory-BV4CUWzJ.js +0 -1
  549. /package/dist/chunks/{chunk-GLDYJM7O.js → chunk-T4QXKU5Y.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TerminalOverlay-D-Yq8av_.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-BsPUniZy.js","assets/index-DUMDOdB2.css","assets/api-client-Dgz-fOMl.js","assets/icons-kaq6k88m.js","assets/chevron-down-Bnma8EMP.js","assets/createLucideIcon-C4b2afqG.js","assets/plus-D18vYzHF.js","assets/AppToastContext-BB_2hRfw.js","assets/ui-theme.generated-R0MY_Jy0.js","assets/App-Yy3l2sdD.js","assets/useQuery-ByaRC9SK.js","assets/schemas-lO3MoWQr.js","assets/common-BMjyKlX-.js","assets/settings-BKmRueaw.js","assets/client-choice-storage-BuNdhYSV.js","assets/app-models-BviS9b7U.js","assets/create-pipeline-CyUZrbbO.js","assets/profile-ref-DSNkG6Ol.js","assets/chunk-H3JZ3P5T-B0SCoPw4.js","assets/work-outputs-CK0nHe4g.js","assets/contracts-BHTOD1nd.js","assets/training-managed-adapter-81RrdT1k.js","assets/chunk-GAIDBPFY-BLuHpurI.js","assets/reward-checks-5AOStF27.js","assets/chat-resources-CItQ4mZD.js","assets/ponder-desktop-Dm7tOkKo.js","assets/browser-sidebar-links-ujSvTf5h.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/chevron-right-Cxv_xBz5.js","assets/maximize-2-DUWvLap6.js","assets/refresh-cw-NXOER_CD.js","assets/models-route-Bl_TmMl6.js","assets/PageChrome-BBnWAENV.js","assets/organization-types-PP-yuR2J.js","assets/App-Df7uYQGj.css","assets/TerminalOverlay-DoUFGstN.css"])))=>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-BsPUniZy.js";var i=e(t(),1),a=n(),o=(0,i.lazy)(()=>r(()=>import(`./TerminalOverlay-D-Yq8av_.js`).then(e=>({default:e.TerminalOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function s({open:e,connection:t,scope:n,tabs:r,onTabsChange:s,cwd:c,appId:l,workspaceName:u,queuedCommand:d,onClose:f}){let[p,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{e&&m(!0)},[e]),p?(0,a.jsx)(i.Suspense,{fallback:null,children:(0,a.jsx)(o,{open:e,connection:t,scope:n,tabs:r,onTabsChange:s,cwd:c,appId:l,workspaceName:u,queuedCommand:d,onClose:f})}):null}export{s as AppTerminalPanel};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{c as t,g as n,m as r,u as i}from"./index-BsPUniZy.js";import{T as a,t as o}from"./useQuery-ByaRC9SK.js";import{a as s,c,d as l,m as u,o as d,p as f,r as p,v as m}from"./schemas-lO3MoWQr.js";import{C as h}from"./app-models-BviS9b7U.js";import{d as g,h as _,i as v,p as y}from"./chunk-H3JZ3P5T-B0SCoPw4.js";import{n as b}from"./api-client-Dgz-fOMl.js";import"./icons-kaq6k88m.js";import{t as x}from"./chevron-right-Cxv_xBz5.js";import{a as S,i as C,n as w,t as T}from"./settings-lists-DMNPkGYk.js";import{t as E}from"./plus-D18vYzHF.js";import{t as D}from"./refresh-cw-NXOER_CD.js";import{Ir as O,Kn as k,Lr as A,Vn as j,Xt as M,_n as N,hn as P,on as F,rr as I,sn as L,un as R,vn as z,wn as ee}from"./App-Yy3l2sdD.js";import{D as B,O as te}from"./MainPane-BpE7AKXu.js";import{n as V,r as H,t as ne}from"./useAgentInventory-BV4CUWzJ.js";/* empty css */var U=e(n(),1),W=r();function re({agent:e,account:t,native:n,inventory:r,projects:i,teamId:a,learningControl:o,connected:s,onHide:c,onManage:l}){let u=r?.collector.connections.filter(t=>t.source===e.id)??[],d=r?.sources.some(t=>t.source===e.id&&t.available&&t.capabilities.history);return(0,W.jsxs)(`article`,{className:`agent-connection-card`,"aria-label":e.name,children:[(0,W.jsxs)(`div`,{className:`agent-card-title`,children:[(0,W.jsx)(`img`,{src:e.icon,alt:``}),(0,W.jsx)(`span`,{children:e.name}),(0,W.jsx)(`button`,{type:`button`,className:`agent-hide`,"aria-label":`Hide ${e.name}`,onClick:c,children:(0,W.jsx)(z,{size:14})})]}),e.id===`openpond_chat`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`small`,{children:t?.state===`signed_in`?`Connected to OpenPond`:`Sign in to OpenPond`}),(0,W.jsx)(`p`,{children:`Use Ponder Pal from the sidebar.`}),(0,W.jsx)(`button`,{type:`button`,className:`agent-account-link`,onClick:()=>void R({kind:`settings`,section:`account`}),children:`Account setup`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`small`,{children:n?n.available?n.enabled?`Ready to chat`:`Installed · chat disabled`:n.lastError??`Check installation`:`Conversation import`}),(0,W.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:!s,onClick:l,children:n?.available||u.length?`Manage`:`Connect`}),(0,W.jsx)(`div`,{className:`agent-card-sync`,children:u.length?u.map(e=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{children:H(e,r.collector)}),(0,W.jsxs)(`small`,{children:[i.find(t=>t.id===e.projectId&&e.teamId===a)?.content.name??e.projectId,` `,`· `,e.admitted,` tasks`]}),e.teamId===a?null:(0,W.jsxs)(`small`,{children:[`Team: `,e.teamId]}),e.queued?(0,W.jsxs)(`small`,{children:[e.queued,` updates queued`]}):null,e.lastAdmissionAt?(0,W.jsxs)(`small`,{children:[`Last sync: `,new Date(e.lastAdmissionAt).toLocaleString()]}):null,e.error?(0,W.jsx)(N,{error:e.error}):null]},e.id)):(0,W.jsx)(`small`,{children:r?d?`History available · sync not connected`:`No local history found`:`Reading local setup…`})})]}),o]})}function ie(e,t,n,r){let i=(0,U.useRef)({providers:t,onProvider:n});i.current={providers:t,onProvider:n};let a=JSON.stringify([`claude-code`,`opencode`,`grok-build`].map(e=>{let n=t?.providers[e];return[e,n?.binaryPath,n?.sourceHome,n?.enabled]}));(0,U.useEffect)(()=>{if(!e||!i.current.providers)return;let t=!1,n=[`claude-code`,`opencode`,`grok-build`].map(n=>{let a=i.current.providers?.providers[n],o=new AbortController,s=r>0?{promise:b(e,`/v1/providers/${n}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:o.signal}),release:()=>o.abort()}:B(e,n,i.current.providers?.providers[n]);return s.promise.then(o=>{t||(r>0&&o.session&&!o.error&&te(e,n,o,a),i.current.onProvider(n,o.settings))},()=>{}),s});return()=>{t=!0,n.forEach(e=>e.release())}},[e,a,r])}var G=m().trim().min(1).max(240),K=f().int().positive(),q=p([`dataset`,`evaluator`,`model`,`training_configuration`,`training_run`,`harness`,`environment`,`experiment`,`learning_policy`,`deployment`]),J=u({kind:q,resourceId:G,release:v.nullable(),role:p([`training`,`validation`,`holdout`,`target`,`reward`,`evaluation`,`serving`,`source`])}).strict(),ae=c(`kind`,[u({kind:l(`model`),providerId:G,modelId:G,artifact:v.nullable(),messages:s(u({role:p([`system`,`user`,`assistant`]),content:m().max(1e5)}).strict()).max(100)}).strict(),u({kind:l(`harness`),profileRepositoryId:G,source:_}).strict(),u({kind:l(`agent`),source:y}).strict(),u({kind:l(`suite`),profileRepositoryId:G,suiteId:G,sources:s(_).min(1).max(1e3)}).strict().superRefine((e,t)=>{let n=e.sources[0],r=new Set;for(let[i,a]of e.sources.entries())r.has(a.definitionId)&&t.addIssue({code:`custom`,path:[`sources`,i],message:`Suite definitions must be unique.`}),r.add(a.definitionId),(a.profileId!==n.profileId||a.sourceRevision!==n.sourceRevision||a.catalogHash!==n.catalogHash||g(a.harnessRelease)!==g(n.harnessRelease))&&t.addIssue({code:`custom`,path:[`sources`,i],message:`Suite checks must belong to the same pinned Profile source and Harness release.`})})]),oe=u({name:m().trim().min(1).max(200),description:m().max(1e4),targets:s(u({id:G,name:m().trim().min(1).max(200),target:ae}).strict()).max(100),defaultTargetId:G.nullable(),resources:s(J).max(1e3)}).strict().superRefine((e,t)=>{new Set(e.targets.map(e=>e.id)).size!==e.targets.length&&t.addIssue({code:`custom`,path:[`targets`],message:`Target identities must be unique.`}),e.defaultTargetId&&!e.targets.some(t=>t.id===e.defaultTargetId)&&t.addIssue({code:`custom`,path:[`defaultTargetId`],message:`Default target must belong to this Project.`}),new Set(e.resources.map(e=>g(e))).size!==e.resources.length&&t.addIssue({code:`custom`,path:[`resources`],message:`Resource links must be unique.`})}),se=u({schemaVersion:l(`openpond.trainingProject.v1`),id:G,teamId:G,creatorUserId:G,ownerScope:p([`workspace`,`personal`]).optional(),revision:K,content:oe,archived:d(),createdAt:m().datetime(),updatedAt:m().datetime()}).strict();u({operationId:G,id:G,expectedRevision:f().int().nonnegative(),content:oe,ownerScope:p([`workspace`,`personal`]).optional()}).strict(),u({operationId:G,expectedRevision:K,archived:d()}).strict();var ce=u({teamId:G,projects:s(se).max(100),nextCursor:G.nullable()}).strict();u({operation:p([`evaluate`,`train`,`enable_learning`,`accept_candidate`,`serve`]),support:p([`supported`,`unsupported`]),state:p([`ready`,`needs_setup`,`blocked`]),reasons:s(u({code:G,message:m().min(1).max(2e3),field:m().nullable(),action:p([`choose_target`,`choose_data`,`choose_evaluator`,`configure_runtime`,`request_access`,`configure_budget`,`wait`,`review_evidence`]).nullable()}).strict()).max(100)}).strict().superRefine((e,t)=>{e.state===`ready`&&(e.support!==`supported`||e.reasons.length)&&t.addIssue({code:`custom`,message:`Ready operations must be supported with no blockers.`}),e.state!==`ready`&&!e.reasons.length&&t.addIssue({code:`custom`,message:`Unavailable operations must explain the next step.`})});var Y=new WeakMap;function le(e,t,n){let r=JSON.stringify([t?.activeProfile,t?.profile?.id,n]),i=e?Y.get(e)?.get(r):void 0,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(null),[l,u]=(0,U.useState)(!1),[d,f]=(0,U.useState)(0),p=t?.state===`signed_in`?a?.key===r&&a.connection===e?a.value:i:void 0;(0,U.useEffect)(()=>{if(!e||!n||t?.state!==`signed_in`)return;let i=new AbortController;u(!0),c(null);async function a(){let t=[],a=new Set,s;do{let r=ce.parse(await b(e,`/v1/training/evaluation-workspace`,{method:`POST`,body:JSON.stringify({teamId:n,operation:`projects`,value:{cursor:s}}),signal:i.signal}));if(r.teamId!==n)throw Error(`The hosted project workspace changed. Refresh connections.`);if(t.push(...r.projects.filter(e=>!e.archived)),s=r.nextCursor??void 0,s&&a.has(s))throw Error(`Project pagination stalled. Refresh connections.`);s&&a.add(s)}while(s&&!i.signal.aborted);if(i.signal.aborted)return;let c=Y.get(e);c||(c=new Map,Y.set(e,c));let l=c.get(r)?.selected,u={projects:t,selected:l&&t.some(e=>e.id===l)?l:t.length===1?t[0].id:``};c.set(r,u),o({key:r,connection:e,value:u})}return a().catch(e=>{i.signal.aborted||c(e instanceof Error?e.message:`Unable to list hosted projects.`)}).finally(()=>{i.signal.aborted||u(!1)}),()=>i.abort()},[e,r,n,t?.state,d]);let m=(0,U.useCallback)(t=>{if(!e)return;let n=Y.get(e)?.get(r);if(!n||!n.projects.some(e=>e.id===t))return;let i={...n,selected:t};Y.get(e).set(r,i),o({key:r,connection:e,value:i})},[e,r]);return{projects:p?.projects??[],projectId:p?.selected??``,select:m,error:s,loading:l,refresh:()=>f(e=>e+1)}}var ue=e(L(),1),de=e(F(),1);function fe({connection:e,connectionId:t,disabled:n,projectName:r,onUpload:i,onClose:a}){let[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(`all`),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(()=>new Map),[m,h]=(0,U.useState)(!0),[g,_]=(0,U.useState)(null),[v,y]=(0,U.useState)(0);C(e,g,()=>y(e=>e+1));let x=(0,U.useRef)(null),S=(0,U.useRef)(0);(0,U.useEffect)(()=>{let n=new AbortController;x.current?.abort(),x.current=n,h(!0),d(null),_(null);let r=window.setTimeout(()=>{let r=v!==S.current;S.current=v,b(e,`/v1/native-history/collector`,{method:`POST`,signal:n.signal,body:JSON.stringify({command:`conversations`,connectionId:t,query:o,range:c,refresh:r})}).then(e=>{n.signal.aborted||d(e)}).catch(e=>{n.signal.aborted||_(e instanceof Error?e.message:`Unable to list conversations.`)}).finally(()=>{n.signal.aborted||h(!1)})},200);return()=>{window.clearTimeout(r),n.abort(),x.current?.abort()}},[e,t,o,c,v]);async function w(){if(m||u?.nextOffset==null)return;let n=new AbortController;x.current=n,h(!0),_(null);try{let r=await b(e,`/v1/native-history/collector`,{method:`POST`,signal:n.signal,body:JSON.stringify({command:`conversations`,connectionId:t,query:o,range:c,offset:u.nextOffset})});n.signal.aborted||d(e=>({...r,items:[...new Map([...e?.items??[],...r.items].map(e=>[e.key,e])).values()]}))}catch(e){n.signal.aborted||_(e instanceof Error?e.message:`Unable to load more conversations.`)}finally{n.signal.aborted||h(!1)}}function T(e,t){p(n=>{let r=new Map(n);return t?r.set(e.key,e):r.delete(e.key),r})}let E=u?.items??[],D=E.filter(e=>!e.issue),O=D.length>0&&D.every(e=>f.has(e.key)),k=new Set(E.map(e=>e.key)),A=[...f.keys()].filter(e=>!k.has(e)).length;return(0,W.jsxs)(`section`,{className:`conversation-upload-picker`,"aria-label":`Choose conversations to upload`,children:[(0,W.jsx)(`h3`,{children:`Choose conversations`}),(0,W.jsxs)(`p`,{children:[`Upload to `,(0,W.jsx)(`strong`,{children:r}),`. This selection also sets which conversations later syncs update. Previously uploaded data stays in the project.`]}),(0,W.jsxs)(`div`,{className:`conversation-upload-toolbar`,children:[(0,W.jsx)(`input`,{autoFocus:!0,type:`search`,"aria-label":`Search conversations`,placeholder:`Search title, folder, or session ID`,value:o,disabled:n,onChange:e=>s(e.target.value)}),(0,W.jsx)(P,{label:`Conversation activity`,value:c,disabled:n,onChange:l,options:[{value:`all`,label:`All dates`},{value:`week`,label:`Active last week`},{value:`day`,label:`Active last day`}]})]}),(0,W.jsxs)(`div`,{className:`conversation-upload-selection`,role:`status`,children:[(0,W.jsxs)(`span`,{children:[f.size,` selected`,A?` · ${A} outside this view`:``,u?` · ${u.total} matching`:``]}),(0,W.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>y(e=>e+1),children:`Refresh`}),(0,W.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||!f.size,onClick:()=>p(new Map),children:`Clear selection`})]}),(0,W.jsx)(`div`,{className:`evaluation-table-scroll evaluation-table-frame conversation-upload-table`,children:(0,W.jsxs)(`table`,{className:`training-data-table evaluation-workspace-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:(0,W.jsx)(`input`,{type:`checkbox`,className:`training-chat-checkbox`,"aria-label":`Select visible conversations`,checked:O,disabled:n||m||!D.length,onChange:e=>{let t=e.target.checked;p(e=>{let n=new Map(e);return D.forEach(e=>{t?n.set(e.key,e):n.delete(e.key)}),n})}})}),(0,W.jsx)(`th`,{children:`Conversation`}),(0,W.jsx)(`th`,{children:`Last activity`})]})}),(0,W.jsxs)(`tbody`,{children:[E.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:(0,W.jsx)(`input`,{type:`checkbox`,className:`training-chat-checkbox`,"aria-label":`Select ${e.title}`,checked:f.has(e.key),disabled:n||!!e.issue,onChange:t=>T(e,t.target.checked)})}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`span`,{className:`conversation-upload-title`,title:e.title,children:e.title}),(0,W.jsx)(`small`,{title:e.cwd??e.nativeSessionId,children:e.cwd??e.nativeSessionId}),e.issue?(0,W.jsx)(`small`,{role:`status`,children:e.issue}):e.approved?(0,W.jsx)(`small`,{children:`Already approved for sync`}):null]}),(0,W.jsx)(`td`,{children:(0,W.jsx)(`time`,{dateTime:e.updatedAt,children:new Date(e.updatedAt).toLocaleDateString()})})]},e.key)),m?(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{colSpan:3,role:`status`,children:`Loading conversations…`})}):!E.length&&!g?(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{colSpan:3,children:o.trim()||c!==`all`?`No conversations match these filters.`:`No saved conversations found in this installation.`})}):null]})]})}),g?(0,W.jsx)(N,{error:g,children:(0,W.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>y(e=>e+1),children:`Retry`})}):null,u?.nextOffset==null?null:(0,W.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>void w(),children:`Load more conversations`}),(0,W.jsx)(`p`,{children:`The complete selected conversations are uploaded, including their prompts, responses, and tool history. Date filters help you find conversations; they do not trim their contents.`}),(0,W.jsxs)(`div`,{className:`settings-button-row`,children:[(0,W.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:n||!f.size,onClick:()=>void i([...f.keys()]),children:`Upload ${f.size} conversation${f.size===1?``:`s`}`}),(0,W.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n,onClick:a,children:`Cancel`})]})]})}ue.default.extend(de.default);function pe({agent:e,inventory:t,connection:n,account:r,teamId:i,projects:a,projectId:o,onRefresh:s,learningUrl:c}){let l=t?.sources.filter(t=>t.source===e.id)??[],[u,d]=(0,U.useState)(l.length===1?l[0].instanceId:``),[f,p]=(0,U.useState)(o),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(null),[v,y]=(0,U.useState)(!1),[x,S]=(0,U.useState)(null),C=l.find(e=>e.instanceId===u)??(!u&&l.length===1?l[0]:void 0),w=t?.collector.connections.filter(t=>t.source===e.id)??[],T=r?.baseUrl??r?.activeProfile?.baseUrl,E=r?.apiBaseUrl;async function D(e,t,r){if(!(!n||v||g)){y(!0),S(null);try{let a=await b(n,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:e,...t?{connectionId:t}:{},...r?{sessionKeys:r}:{},...e===`connect`?{setup:{sourceInstanceId:C?.instanceId,teamId:i,projectId:f,accountBaseUrl:T,apiBaseUrl:E,range:`all`}}:{}})});a.command?_(a.command):await s()}catch(e){S(e instanceof Error?e.message:`Unable to update this connection.`)}finally{y(!1)}}}let O=v||g!==null,k=w.find(e=>e.id===m),A=g&&n?(0,W.jsx)(M,{connection:n,command:g,onComplete:()=>{_(null),h(null),s()},onClose:()=>{_(null),s()}}):null;return k&&n?(0,W.jsxs)(`div`,{className:`agent-conversation-setup provider-dialog-body`,children:[(0,W.jsx)(fe,{connection:n,connectionId:k.id,projectName:a.find(e=>e.id===k.projectId&&k.teamId===i)?.content.name??k.projectId,disabled:O||!!t?.collector.running,onClose:()=>h(null),onUpload:e=>D(`upload`,k.id,e)},k.id),x?(0,W.jsx)(N,{error:x}):null,A]}):(0,W.jsxs)(`div`,{className:`agent-conversation-setup provider-dialog-body`,children:[(0,W.jsxs)(`p`,{children:[`Sync saved `,e.name,` conversations to an existing OpenPond project. Connecting authorizes the destination. Choose conversations and confirm an upload when ready.`]}),w.map(n=>(0,W.jsxs)(`section`,{className:`agent-retained-connection`,"aria-label":`${e.name} sync connection`,children:[(0,W.jsx)(`strong`,{children:H(n,t.collector)}),(0,W.jsxs)(`span`,{children:[`Project:`,` `,n.teamId===i?a.find(e=>e.id===n.projectId)?.content.name??n.projectId:n.projectId,` `,`· Team: `,n.teamId]}),(0,W.jsx)(`small`,{children:n.accountBaseUrl??`Hosted destination`}),(0,W.jsx)(`small`,{className:`agent-source-path`,children:n.sourceRoot}),(0,W.jsxs)(`span`,{children:[n.admitted,` tasks imported · `,n.queued,` updates queued`]}),(0,W.jsx)(`small`,{children:n.selectedConversations===null?`All history approved for sync`:`${n.selectedConversations} conversations approved for sync`}),n.backfill.total>0&&n.backfill.stage!==`complete`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`progress`,{"aria-label":`History import progress`,value:n.backfill.admitted+n.backfill.skipped,max:n.backfill.total}),(0,W.jsxs)(`small`,{children:[n.backfill.admitted+n.backfill.skipped,` of`,` `,n.backfill.total,` conversations processed`]})]}):null,(0,W.jsx)(`small`,{children:n.lastAdmissionAt?`Last synced ${(0,ue.default)(n.lastAdmissionAt).fromNow()}`:`No uploads acknowledged yet`}),n.error?(0,W.jsx)(N,{error:n.error}):null,(0,W.jsxs)(`div`,{className:`settings-button-row`,children:[(0,W.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:O||n.state!==`active`||t?.collector.running,onClick:()=>h(n.id),children:`Choose conversations…`}),n.state===`disconnected`?(0,W.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>void D(`reconnect`,n.id),children:`Reconnect`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>void D(n.state===`paused`?`resume`:`pause`,n.id),children:n.state===`paused`?`Resume`:`Pause`}),(0,W.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>{window.confirm(`Disconnect this conversation source? Imported data stays in its project.`)&&D(`disconnect`,n.id)},children:`Disconnect`})]}),n.destinationLinks.tasks?(0,W.jsx)(`a`,{href:n.destinationLinks.tasks,target:`_blank`,rel:`noreferrer`,children:`View tasks`}):null,n.destinationLinks.conversations?(0,W.jsx)(`a`,{href:n.destinationLinks.conversations,target:`_blank`,rel:`noreferrer`,children:`View conversations`}):null]})]},n.id)),(0,W.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),D(`connect`)},className:`agent-sync-form`,children:[(0,W.jsx)(`h3`,{children:w.length?`Add another connection`:`Connect conversations`}),(0,W.jsxs)(`label`,{className:`agent-source-field`,children:[`Source installation`,(0,W.jsx)(P,{label:`Source installation`,value:C?.instanceId??``,disabled:O,onChange:d,options:[{value:``,label:`Select installation`},...l.map(e=>({value:e.instanceId,label:e.root,disabled:!e.available||!e.capabilities.history}))]})]}),C?.reason?(0,W.jsx)(`small`,{children:C.reason}):null,l.some(e=>e.available&&e.capabilities.history)?null:(0,W.jsxs)(`small`,{children:[`No readable conversation history found.`,` `,e.provider?`Use Agent setup to check the installation, or create a conversation in this agent first.`:`Open this agent and create a conversation, then refresh connections.`]}),(0,W.jsxs)(`label`,{children:[`Project`,(0,W.jsx)(P,{label:`Upload destination project`,value:f,disabled:O||!i,onChange:p,searchable:!0,options:[{value:``,label:`Select project`},...a.map(e=>({value:e.id,label:e.content.name}))]})]}),(0,W.jsx)(`p`,{children:`No conversations are uploaded during setup. Continual imports are off by default and can be scheduled after choosing conversations.`}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>R({kind:`settings`,section:`conversation-imports`}),children:`Manage continual imports in Settings`}),r?.state!==`signed_in`||!i?(0,W.jsx)(`small`,{children:`Sign in and select a default team in Account settings to choose a hosted project.`}):null,(0,W.jsx)(`button`,{type:`submit`,className:`agent-connect-button`,disabled:O||!C?.available||!C.capabilities.history||!a.some(e=>e.id===f)||!i||!T||!E||r?.state!==`signed_in`,children:v?`Opening setup…`:`Connect conversations`})]}),c?(0,W.jsx)(`a`,{className:`agent-learning-link`,href:c,target:`_blank`,rel:`noreferrer`,children:`Configure continual learning in Console`}):null,t?(0,W.jsxs)(`details`,{children:[(0,W.jsx)(`summary`,{children:`CLI setup`}),(0,W.jsxs)(`small`,{className:`agent-source-path`,children:[`Importer directory: `,t.directory]}),(0,W.jsx)(`code`,{children:t.statusCommand})]}):null,x?(0,W.jsx)(N,{error:x}):null,A]})}var X=e=>JSON.stringify([e.origin,e.sourceInstanceId]),me=e=>({id:e.id,revision:e.revision,contentHash:e.contentHash});function Z(e,t,n,r,i){return b(e,`/v1/conversation-learning/${n}?${new URLSearchParams({teamId:t})}`,{method:r===void 0?`GET`:`POST`,...r===void 0?{}:{body:JSON.stringify(r)},signal:i})}function he(e,t,n,r){let i=a(),s=[`native-conversation-learning`,e?.serverUrl,n,t];return{...o({queryKey:s,enabled:!!(e&&t&&r),queryFn:({signal:n})=>Z(e,t,`options`,void 0,n),staleTime:15e3,refetchInterval:3e4}),refresh:()=>i.invalidateQueries({queryKey:s})}}function ge(e,t,n,r,i){return Z(e,t,`policies`,{...n?{id:n.id}:{},expectedRevision:n?.revision??0,configuration:r,enabled:i})}function Q(e,t,n=[]){let r=t?.configuration;return{projectId:e,name:r?.name??`Continuous learning`,mode:r?.mode??`activate`,definition:r?.definition??null,configurationId:r?.configuration?.id??``,trainingPolicyId:r?.learningPolicy?.id??``,graderIds:[],sourceKeys:[...new Set([...r?.sources.filter(e=>e.enabled).map(X)??[],...n.map(X)])],adapter:r?.adapter??{kind:`complete_text`,qualitativeOnly:!0},generator:r?.generator??null,graderSelection:r?.graderSelection??(t?{mode:`manual`}:{mode:`auto`,modelId:`gpt-6-luna`,sampleSize:8,maximumOutputTokens:2048,maximumSpendUsd:1}),schedule:r?.schedule??{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hour:2,minute:0,endHour:6,endMinute:0},limits:r?.limits??{perCycleUsd:5,dailyUsd:5,monthlyUsd:25,gradeUsd:.2,maximumTasks:10,minimumExamples:5,maxGpuSeconds:10800,maximumAttempts:2,lookbackDays:30},exceptions:r?.exceptions??`block`,minimumScore:r?.minimumScore??.8,selection:r?.selection??{maximumSourceShare:1,maximumFailureShare:1,maximumLengthShare:1,replayFraction:.2,auditFraction:.1},acceptance:r?.acceptance??{minimumCasesPerCheck:20,minimumImprovement:.05,windowCasesPerCheck:20},failurePolicy:r?.failurePolicy??{pauseAfterConsecutiveFailures:3},...r?.serving?{serving:r.serving}:{serving:{targetId:``,canarySeconds:120,rollbackOnRuntimeFailure:!0}}}}function $(e,t){let n=e?.configurations.find(e=>e.id===t);return e?.trainingPolicies.filter(e=>e.modelProjectId===n?.portableProjectId&&e.training.recipe.id===`model-recipe-${n?.etag}`&&!e.id.startsWith(`conversation-training-`))??[]}async function _e(e,t,n,r,i,a){let o=r.configurations.find(e=>e.id===n.configurationId),s=$(r,n.configurationId).find(e=>e.id===n.trainingPolicyId);if(!n.name.trim())throw Error(`Enter a policy name.`);if(!r.projects.some(e=>e.id===n.projectId))throw Error(`This owned Project is unavailable for continuous learning.`);if(n.configurationId&&(!o||!r.projects.find(e=>e.id===n.projectId)?.configurationIds.includes(o.id)))throw Error(`Choose a model configuration attached to this Project.`);if(n.mode!==`evaluate`&&(!o||!s))throw Error(`Choose an owned model and its reviewed training setup.`);if(n.limits.perCycleUsd>n.limits.dailyUsd||n.limits.dailyUsd>n.limits.monthlyUsd)throw Error(`Daily and monthly spending limits must cover the run limit.`);if(n.limits.minimumExamples>n.limits.maximumTasks-Math.floor(n.limits.maximumTasks*(n.selection?.replayFraction??0)))throw Error(`Leave capacity for the minimum new examples after replay.`);let c=r.sources.filter(e=>e.projectId===n.projectId&&n.sourceKeys.includes(X(e)));if(!c.length)throw Error(`Select a source agent for this Project.`);let l=[...(i?.configuration.sources??[]).filter(e=>!c.some(t=>X(t)===X(e))).map(e=>({...e,enabled:!1})),...c.map(e=>({origin:e.origin,sourceInstanceId:e.sourceInstanceId,enabled:!0}))],u=n.definition;if(o&&(i?.configuration.configuration?.id!==o.id||i.configuration.configuration.expectedEtag!==o.etag))u=await Z(e,t,`definitions`,{projectId:n.projectId,configuration:{id:o.id,expectedRevision:o.revision,expectedEtag:o.etag}});else if(n.graderIds.length){let i=r.graders.flatMap(e=>e&&n.graderIds.includes(e.id)?[me(e)]:[]);u=await Z(e,t,`definitions`,{projectId:n.projectId,graders:i})}if(!u)throw Error(`Select evaluation rubrics or an existing task definition.`);let d=n.serving,f=r.servingTargets.find(e=>e.id===d?.targetId);if(n.mode===`activate`&&d?.targetId&&(!f||!f.enabled||f.projectId!==n.projectId))throw Error(`Select an available serving target in this Project.`);if(n.mode===`activate`&&(!d?.targetId||f?.hostedPonder)&&(d={targetId:(await Z(e,t,`serving-targets`,{action:`ensure_hosted_ponder`,projectId:n.projectId,bindingId:r.ponderBindingId})).id,canarySeconds:d?.canarySeconds??120,rollbackOnRuntimeFailure:!0}),n.mode===`activate`&&!d?.targetId)throw Error(`Choose a serving target, or enable the policy to register hosted Ponder.`);let{sourceKeys:p,configurationId:m,trainingPolicyId:h,graderIds:g,..._}=n,v={..._,name:n.name.trim(),definition:u,sources:l,configuration:o?{id:o.id,expectedRevision:o.revision,expectedEtag:o.etag}:null,learningPolicy:s?me(s):null,...n.mode===`activate`?{serving:d}:{}};return n.mode!==`activate`&&delete v.serving,n.mode===`evaluate`&&delete v.acceptance,ge(e,t,i,v,a)}function ve({draft:e,options:t,loading:n,onChange:r}){let i=t?.sources.filter(t=>t.projectId===e.projectId)??[],a=i.filter(e=>[`active`,`paused`].includes(e.state)),o=a.length>0&&a.every(t=>e.sourceKeys.includes(X(t))),s=t=>r({...e,sourceKeys:t}),c=t?.graders.flatMap(e=>e?[e]:[])??[];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`fieldset`,{children:[(0,W.jsx)(`legend`,{children:`Source agents`}),(0,W.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:o,disabled:!a.length,ref:t=>{t&&(t.indeterminate=!o&&a.some(t=>e.sourceKeys.includes(X(t))))},onChange:t=>s(t.target.checked?[...new Set([...e.sourceKeys,...a.map(X)])]:e.sourceKeys.filter(e=>!a.some(t=>X(t)===e)))}),`Select all`,` `,(0,W.jsxs)(`small`,{children:[`(`,i.filter(t=>e.sourceKeys.includes(X(t))).length,` selected)`]})]}),(0,W.jsxs)(`div`,{className:`agent-learning-options`,"aria-label":`Source agents`,children:[i.map(t=>{let n=X(t),r=e.sourceKeys.includes(n),i=V.find(e=>e.id===(t.origin.startsWith(`native_`)?`openpond_chat`:t.origin)),a=t.origin===`native_chat`?`Ponder Pal Chat`:t.origin===`native_work`?`Ponder Pal Work`:i?.name??t.name;return(0,W.jsxs)(`label`,{className:`agent-learning-option`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:r,disabled:!r&&![`active`,`paused`].includes(t.state),onChange:t=>s(t.target.checked?[...new Set([...e.sourceKeys,n])]:e.sourceKeys.filter(e=>e!==n))}),i?(0,W.jsx)(`img`,{src:i.icon,alt:``}):null,(0,W.jsxs)(`span`,{children:[a,(0,W.jsx)(`small`,{children:t.sourceInstanceId?t.name===t.origin?`Local connection`:t.name:t.origin.startsWith(`native_`)?`Hosted conversations`:`Uploaded history`})]}),(0,W.jsx)(`small`,{children:t.state})]},n)}),i.length?null:(0,W.jsx)(`p`,{role:`status`,children:n?`Fetching source agents…`:`Connect or import an agent into this Project first.`})]}),(0,W.jsx)(`p`,{children:`Paused agents can use uploaded conversations. Selecting them leaves collection paused.`})]}),(0,W.jsxs)(`fieldset`,{children:[(0,W.jsx)(`legend`,{children:`Evaluation rubrics`}),e.configurationId?(0,W.jsx)(`p`,{children:`The training configuration pins the task definition and its rubrics. Choose grader selection in Preparation.`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,disabled:!c.length,checked:c.length>0&&c.every(t=>e.graderIds.includes(t.id)),onChange:t=>r({...e,graderIds:t.target.checked?c.map(e=>e.id):[]})}),`Select all `,(0,W.jsxs)(`small`,{children:[`(`,e.graderIds.length,` selected)`]})]}),(0,W.jsxs)(`div`,{className:`agent-learning-options`,"aria-label":`Evaluation rubrics`,children:[c.map(t=>(0,W.jsxs)(`label`,{className:`agent-learning-option`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:e.graderIds.includes(t.id),onChange:n=>r({...e,graderIds:n.target.checked?[...e.graderIds,t.id]:e.graderIds.filter(e=>e!==t.id)})}),(0,W.jsxs)(`span`,{children:[t.name,(0,W.jsxs)(`small`,{children:[`Version `,t.revision]})]})]},`${t.id}:${t.revision}`)),c.length?null:(0,W.jsx)(`p`,{role:`status`,children:n?`Fetching evaluation rubrics…`:`No owned evaluation rubrics are available.`})]}),e.definition&&!e.graderIds.length?(0,W.jsx)(`p`,{children:`The saved task definition and rubrics remain unchanged.`}):null,(0,W.jsxs)(`label`,{children:[`Existing task definition`,(0,W.jsxs)(`select`,{value:e.definition?.id??``,onChange:n=>{let i=t?.definitions.find(e=>e.id===n.target.value);r({...e,definition:i?{id:i.id,revision:i.revision,contentHash:i.contentHash}:null,graderIds:[]})},children:[(0,W.jsx)(`option`,{value:``,children:`Select a definition or choose rubrics above`}),e.definition&&!t?.definitions.some(t=>t.id===e.definition?.id)?(0,W.jsx)(`option`,{value:e.definition.id,children:`Saved task definition`}):null,t?.definitions.map(e=>(0,W.jsxs)(`option`,{value:e.id,children:[e.name,` (version `,e.revision,`)`]},e.id))]})]})]}),(0,W.jsxs)(`label`,{children:[`Minimum verified score`,(0,W.jsx)(`input`,{type:`number`,min:0,max:1,step:.01,value:e.minimumScore,onChange:t=>r({...e,minimumScore:Number(t.target.value)})})]})]})]})}function ye({draft:e,options:t,loading:n,onChange:r}){let i=t?.projects.find(t=>t.id===e.projectId)?.configurationIds??[],a=$(t,e.configurationId),o=e.graderSelection??{mode:`manual`};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{children:[`Mode`,(0,W.jsxs)(`select`,{value:e.mode,onChange:t=>r({...e,mode:t.target.value}),children:[(0,W.jsx)(`option`,{value:`evaluate`,children:`Evaluate only`}),(0,W.jsx)(`option`,{value:`train`,children:`Train automatically, approve candidate`}),(0,W.jsx)(`option`,{value:`activate`,children:`Train and activate automatically`})]})]}),(0,W.jsxs)(`label`,{children:[`Model to train`,(0,W.jsxs)(`select`,{value:e.configurationId,onChange:n=>{let i=n.target.value,a=$(t,i);r({...e,configurationId:i,trainingPolicyId:a.length===1?a[0].id:``,adapter:i?{kind:`reference_text`,inputPointer:`/prompt`,match:`contained`}:{kind:`complete_text`,qualitativeOnly:!0}})},children:[(0,W.jsx)(`option`,{value:``,children:n?`Fetching configurations…`:`Select configuration`}),t?.configurations.filter(e=>i.includes(e.id)).map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),e.mode===`evaluate`?null:(0,W.jsxs)(`label`,{children:[`Reviewed training setup`,(0,W.jsxs)(`select`,{value:e.trainingPolicyId,onChange:t=>r({...e,trainingPolicyId:t.target.value}),children:[(0,W.jsx)(`option`,{value:``,children:`Select reviewed setup`}),a.map(e=>(0,W.jsxs)(`option`,{value:e.id,children:[`Reviewed setup (version `,e.revision,`)`]},e.id))]})]}),e.configurationId?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{children:[`Task construction`,(0,W.jsxs)(`select`,{value:e.adapter.kind,onChange:t=>r({...e,adapter:t.target.value===`reference_text`?{kind:`reference_text`,inputPointer:`/prompt`,match:`contained`}:{kind:`complete_text`,qualitativeOnly:!0}}),children:[(0,W.jsx)(`option`,{value:`reference_text`,children:`Match a published executable task`}),(0,W.jsx)(`option`,{value:`complete_text`,children:`Complete text context and calibrated judges`})]})]}),e.adapter.kind===`reference_text`?(0,W.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,W.jsxs)(`label`,{children:[`Public task input field`,(0,W.jsx)(`input`,{value:e.adapter.inputPointer,onChange:t=>r({...e,adapter:{kind:`reference_text`,inputPointer:t.target.value,match:e.adapter.kind===`reference_text`?e.adapter.match:`contained`}})})]}),(0,W.jsxs)(`label`,{children:[`Reference matching`,(0,W.jsxs)(`select`,{value:e.adapter.match,onChange:t=>r({...e,adapter:{kind:`reference_text`,inputPointer:e.adapter.kind===`reference_text`?e.adapter.inputPointer:`/prompt`,match:t.target.value}}),children:[(0,W.jsx)(`option`,{value:`contained`,children:`Contained`}),(0,W.jsx)(`option`,{value:`exact`,children:`Exact`})]})]})]}):null,(0,W.jsxs)(`label`,{children:[`Grader selection`,(0,W.jsxs)(`select`,{value:o.mode,onChange:t=>r({...e,graderSelection:t.target.value===`auto`?{mode:`auto`,modelId:`gpt-6-luna`,sampleSize:8,maximumOutputTokens:2048,maximumSpendUsd:1}:{mode:`manual`}}),children:[(0,W.jsx)(`option`,{value:`auto`,children:`Choose compatible rubrics automatically`}),(0,W.jsx)(`option`,{value:`manual`,children:`Use the pinned rubrics`})]})]}),o.mode===`auto`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{children:[`Selection model`,(0,W.jsxs)(`select`,{value:o.modelId,onChange:t=>r({...e,graderSelection:{...o,modelId:t.target.value}}),children:[t?.generators.some(e=>e.id===o.modelId)?null:(0,W.jsx)(`option`,{value:o.modelId,children:o.modelId}),t?.generators.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,W.jsx)(`div`,{className:`agent-learning-columns`,children:[[`sampleSize`,`Sample examples`,1,30],[`maximumOutputTokens`,`Output token limit`,256,4096],[`maximumSpendUsd`,`Selection spending limit ($)`,.01,1e5]].map(([t,n,i,a])=>(0,W.jsxs)(`label`,{children:[n,(0,W.jsx)(`input`,{type:`number`,min:i,max:a,step:t===`maximumSpendUsd`?.01:1,value:o[t],onChange:n=>r({...e,graderSelection:{...o,[t]:Number(n.target.value)}})})]},t))})]}):null]}):null,(0,W.jsxs)(`label`,{children:[`Answer improvement model`,(0,W.jsxs)(`select`,{value:e.generator?.modelId??``,onChange:t=>r({...e,generator:t.target.value?{modelId:t.target.value,maximumOutputTokens:e.generator?.maximumOutputTokens??2048,maximumSpendUsd:e.generator?.maximumSpendUsd??.1}:null}),children:[(0,W.jsx)(`option`,{value:``,children:`Use recorded answers only`}),t?.generators.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),e.generator?(0,W.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,W.jsxs)(`label`,{children:[`Per improved answer limit ($)`,(0,W.jsx)(`input`,{type:`number`,min:.01,step:.01,value:e.generator.maximumSpendUsd,onChange:t=>r({...e,generator:{...e.generator,maximumSpendUsd:Number(t.target.value)}})})]}),(0,W.jsxs)(`label`,{children:[`Output token limit`,(0,W.jsx)(`input`,{type:`number`,min:256,max:16384,value:e.generator.maximumOutputTokens,onChange:t=>r({...e,generator:{...e.generator,maximumOutputTokens:Number(t.target.value)}})})]})]}):null,e.mode===`activate`?(0,W.jsxs)(`fieldset`,{children:[(0,W.jsx)(`legend`,{children:`Serving authorization`}),(0,W.jsxs)(`label`,{children:[`Serving target`,(0,W.jsxs)(`select`,{value:e.serving?.targetId??``,onChange:t=>r({...e,serving:{targetId:t.target.value,canarySeconds:e.serving?.canarySeconds??120,rollbackOnRuntimeFailure:!0}}),children:[(0,W.jsx)(`option`,{value:``,children:`Ponder in this Project`}),t?.servingTargets.filter(t=>t.projectId===e.projectId&&t.enabled).map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.hostedPonder?`Hosted Ponder`:`${e.role} / ${e.roleTargetId}`},e.id))]})]}),(0,W.jsxs)(`label`,{children:[`Runtime canary (seconds)`,(0,W.jsx)(`input`,{type:`number`,min:30,max:600,value:e.serving?.canarySeconds??120,onChange:t=>r({...e,serving:{targetId:e.serving?.targetId??``,canarySeconds:Number(t.target.value),rollbackOnRuntimeFailure:!0}})})]}),(0,W.jsx)(`p`,{children:`Saving authorizes the selected target. Failed runtime checks restore its prior model. Training runs only within the saved policy's schedule and limits.`})]}):null]})}var be=(e,t)=>e===void 0||t===void 0?``:`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`;function xe({draft:e,onChange:t}){let n=(n,r)=>t({...e,limits:{...e.limits,[n]:r}});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`fieldset`,{children:[(0,W.jsx)(`legend`,{children:`Run window`}),(0,W.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,W.jsxs)(`label`,{children:[`From`,(0,W.jsx)(`input`,{type:`time`,required:!0,value:be(e.schedule.hour,e.schedule.minute),onChange:n=>{let[r,i]=n.target.value.split(`:`).map(Number);t({...e,schedule:{...e.schedule,hour:r,minute:i}})}})]}),(0,W.jsxs)(`label`,{children:[`Until`,(0,W.jsx)(`input`,{type:`time`,value:be(e.schedule.endHour,e.schedule.endMinute),onChange:n=>{let[r,i]=n.target.value.split(`:`).map(Number),{endHour:a,endMinute:o,...s}=e.schedule;t({...e,schedule:n.target.value?{...s,endHour:r,endMinute:i}:s})}})]})]}),(0,W.jsxs)(`label`,{children:[`Timezone`,(0,W.jsx)(`input`,{required:!0,value:e.schedule.timezone,onChange:n=>t({...e,schedule:{...e.schedule,timezone:n.target.value}})})]}),(0,W.jsx)(`p`,{children:`Queued learning starts within this window. A run already started may finish afterward.`})]}),(0,W.jsxs)(`fieldset`,{children:[(0,W.jsx)(`legend`,{children:`Maximum spending`}),(0,W.jsx)(`p`,{children:`These are limits, not prices. Evaluation, answer improvements and training count toward them.`}),(0,W.jsx)(`div`,{className:`agent-learning-columns`,children:[[`perCycleUsd`,`Per run ($)`],[`dailyUsd`,`Per day ($)`],[`monthlyUsd`,`Per month ($)`]].map(([t,r])=>(0,W.jsxs)(`label`,{children:[r,(0,W.jsx)(`input`,{type:`number`,required:!0,min:.01,max:1e5,step:.01,value:e.limits[t],onChange:e=>n(t,Number(e.target.value))})]},t))})]}),(0,W.jsxs)(`details`,{children:[(0,W.jsx)(`summary`,{children:`Advanced limits`}),(0,W.jsxs)(`div`,{className:`agent-learning-columns`,children:[[[`gradeUsd`,`Per evaluation ceiling ($)`,0,1e3,.01],[`maximumTasks`,`Maximum tasks`,1,200,1],[`minimumExamples`,`Minimum training examples`,1,200,1],[`maximumAttempts`,`Maximum correction attempts`,1,5,1],[`lookbackDays`,`Uploaded history window (days)`,1,30,1]].map(([t,r,i,a,o])=>(0,W.jsxs)(`label`,{children:[r,(0,W.jsx)(`input`,{type:`number`,required:!0,min:i,max:a,step:o,value:e.limits[t],onChange:e=>n(t,Number(e.target.value))})]},t)),(0,W.jsxs)(`label`,{children:[`Maximum GPU session (hours)`,(0,W.jsx)(`input`,{type:`number`,required:!0,min:.01,max:3,step:.01,value:e.limits.maxGpuSeconds/3600,onChange:e=>n(`maxGpuSeconds`,Math.round(Number(e.target.value)*3600))})]}),(0,W.jsxs)(`label`,{children:[`Pause after failed cycles`,(0,W.jsx)(`input`,{type:`number`,required:!0,min:1,max:20,value:e.failurePolicy?.pauseAfterConsecutiveFailures??3,onChange:n=>t({...e,failurePolicy:{pauseAfterConsecutiveFailures:Number(n.target.value)}})})]})]}),(0,W.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:e.exceptions===`eligible_remainder`,onChange:n=>t({...e,exceptions:n.target.checked?`eligible_remainder`:`block`})}),`Use the independently verified remainder when exceptions occur`]})]}),(0,W.jsxs)(`details`,{children:[(0,W.jsx)(`summary`,{children:`Training data balance`}),(0,W.jsx)(`div`,{className:`agent-learning-columns`,children:[[`maximumSourceShare`,`Maximum from one agent`,100],[`maximumFailureShare`,`Maximum from one error type`,100],[`maximumLengthShare`,`Maximum from one conversation length`,100],[`replayFraction`,`Previously learned examples`,50],[`auditFraction`,`Examples checked for quality`,100]].map(([n,r,i])=>(0,W.jsxs)(`label`,{children:[r,` (%)`,(0,W.jsx)(`input`,{type:`number`,min:+!!n.startsWith(`maximum`),max:i,value:Math.round((e.selection?.[n]??0)*100),onChange:r=>t({...e,selection:{maximumSourceShare:1,maximumFailureShare:1,maximumLengthShare:1,replayFraction:.2,auditFraction:.1,...e.selection,[n]:Number(r.target.value)/100}})})]},n))})]}),e.mode===`evaluate`?null:(0,W.jsxs)(`details`,{children:[(0,W.jsx)(`summary`,{children:`Checks before using the trained model`}),(0,W.jsx)(`div`,{className:`agent-learning-columns`,children:[[`windowCasesPerCheck`,`New examples per quality check`,2,1e4],[`minimumCasesPerCheck`,`Minimum paired examples`,2,1e4],[`minimumImprovement`,`Required improvement`,1e-4,1]].map(([n,r,i,a])=>(0,W.jsxs)(`label`,{children:[r,(0,W.jsx)(`input`,{type:`number`,min:i,max:a,step:n===`minimumImprovement`?.01:1,value:e.acceptance?.[n]??i,onChange:r=>t({...e,acceptance:{minimumCasesPerCheck:20,windowCasesPerCheck:20,minimumImprovement:.05,...e.acceptance,[n]:Number(r.target.value)}})})]},n))}),(0,W.jsx)(`p`,{children:`Current and trained models use the same unseen examples. Insufficient evidence keeps the current model active.`})]})]})}function Se({connection:e,teamId:t,projectId:n,projectName:r,initialPolicy:i,bindings:a,query:o,onClose:s}){let[c,l]=(0,U.useState)(i),[u,d]=(0,U.useState)(()=>Q(n,i,i?[]:a)),[f,p]=(0,U.useState)(!!o.data),[m,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(i?.status===`enabled`||!i),[C,w]=(0,U.useState)(`sources`),[T,E]=(0,U.useState)(!1),[D,O]=(0,U.useState)(null),k=(0,U.useRef)(f);k.current=f;let A=o.data?.policies.filter(e=>e.configuration.projectId===n)??[];(0,U.useEffect)(()=>{if(!o.data||k.current)return;let e=o.data.policies.find(e=>e.configuration.projectId===n&&e.status===`enabled`)??o.data.policies.find(e=>e.configuration.projectId===n);l(e),d(Q(n,e,e?[]:a)),x(e?.status===`enabled`||!e),p(!0)},[o.data,n,a]);let j=()=>{g||(m?E(!0):s())},M=S(j);function P(e){let t=A.find(t=>t.id===e);t&&(l(t),d(Q(n,t)),x(t.status===`enabled`),h(!1),O(null),E(!1),y(null))}function F(e){d(e),h(!0)}async function I(){if(o.data&&f&&!g&&!o.isError){_(!0),y(null);try{await _e(e,t,u,o.data,c,b),await o.refresh(),h(!1),s()}catch(e){y(e instanceof Error?e.message:`Unable to save continuous learning.`)}finally{_(!1)}}}let L={draft:u,options:o.data,loading:o.isPending,onChange:F};return(0,W.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:j,children:(0,W.jsxs)(`section`,{ref:M,className:`git-dialog provider-details-dialog agent-learning-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Continuous learning`,onMouseDown:e=>e.stopPropagation(),children:[(0,W.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close continuous learning`,disabled:g,onClick:j,children:(0,W.jsx)(z,{size:16})}),(0,W.jsx)(`div`,{className:`provider-dialog-header`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{children:`Continuous learning`}),(0,W.jsx)(`span`,{children:r})]})}),T?(0,W.jsxs)(`div`,{className:`agent-learning-discard`,role:`alert`,children:[(0,W.jsx)(`p`,{children:`Discard unsaved policy changes?`}),(0,W.jsxs)(`div`,{className:`settings-button-row`,children:[(0,W.jsx)(`button`,{type:`button`,onClick:()=>{E(!1),O(null)},children:`Keep editing`}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>D?P(D):s(),children:`Discard changes`})]})]}):null,A.length>1?(0,W.jsxs)(`label`,{className:`agent-learning-policy-picker`,children:[`Learning policy`,(0,W.jsx)(`select`,{disabled:g,value:c?.id??``,onChange:e=>{m?(O(e.target.value),E(!0)):P(e.target.value)},children:A.map(e=>(0,W.jsxs)(`option`,{value:e.id,children:[e.configuration.name,` (`,e.status,`)`]},e.id))})]}):null,(0,W.jsx)(`div`,{className:`surface-tabs provider-agent-tabs`,role:`tablist`,"aria-label":`Continuous learning settings`,children:[[`sources`,`Sources & rubrics`],[`preparation`,`Preparation`],[`schedule`,`Run window & budget`]].map(([e,t])=>(0,W.jsx)(`button`,{type:`button`,id:`learning-tab-${e}`,role:`tab`,"aria-selected":C===e,"aria-controls":`learning-panel-${e}`,tabIndex:C===e?0:-1,onClick:()=>w(e),onKeyDown:t=>{let n=[`sources`,`preparation`,`schedule`],r=n.indexOf(e);if([`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=n[t.key===`Home`?0:t.key===`End`?2:(r+(t.key===`ArrowRight`?1:2))%3];w(e),document.getElementById(`learning-tab-${e}`)?.focus()}},children:t},e))}),(0,W.jsxs)(`form`,{className:`agent-learning-form`,onSubmit:e=>{e.preventDefault(),I()},children:[(0,W.jsx)(`fieldset`,{disabled:!f||g,children:(0,W.jsxs)(`label`,{children:[`Policy name`,(0,W.jsx)(`input`,{required:!0,maxLength:200,value:u.name,onChange:e=>F({...u,name:e.target.value})})]})}),(0,W.jsx)(`div`,{id:`learning-panel-${C}`,role:`tabpanel`,"aria-labelledby":`learning-tab-${C}`,children:(0,W.jsx)(`fieldset`,{disabled:!f||g,children:C===`sources`?(0,W.jsx)(ve,{...L}):C===`preparation`?(0,W.jsx)(ye,{...L}):(0,W.jsx)(xe,{...L})})}),o.isPending?(0,W.jsx)(`p`,{role:`status`,children:`Fetching available sources, rubrics and models…`}):null,o.isError?(0,W.jsx)(N,{error:o.error.message,children:(0,W.jsx)(`button`,{type:`button`,onClick:()=>void o.refetch(),children:`Retry settings`})}):null,v?(0,W.jsx)(N,{error:v}):null,(0,W.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:b,disabled:!f||g,onChange:e=>{x(e.target.checked),h(!0)}}),`Enable this policy after saving`]}),(0,W.jsx)(`p`,{children:`Saving enables only the reviewed sources, schedule and limits. No training is dispatched by opening this dialog.`}),(0,W.jsxs)(`div`,{className:`settings-button-row agent-learning-footer`,children:[(0,W.jsx)(`button`,{type:`button`,disabled:g,onClick:j,children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`primary`,disabled:!f||!o.data||o.isError||g||!u.sourceKeys.length,children:g?`Saving…`:b?`Save and enable`:`Save paused`})]})]})]})})}function Ce({agent:e,inventory:t,connection:n,teamId:r,projectId:i,projectName:a,query:o,signedIn:s}){let[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(``),v=(0,U.useMemo)(()=>new Set(t?.collector.connections.filter(t=>t.source===e.id&&t.teamId===r&&t.projectId===i&&t.state!==`disconnected`).map(e=>e.sourceInstanceId)??[]),[t,e.id,r,i]),y=o.data?.sources.filter(t=>t.projectId===i&&(e.id===`openpond_chat`?[`native_chat`,`native_work`].includes(t.origin)&&t.sourceInstanceId===null:t.origin===e.id&&t.sourceInstanceId!==null&&v.has(t.sourceInstanceId)))??[],b=[...new Set(y.flatMap(e=>e.sourceInstanceId?[e.sourceInstanceId]:[]))],x=b.includes(g)?g:b[0],S=y.filter(e=>e.sourceInstanceId===null||e.sourceInstanceId===x).map(e=>({origin:e.origin,sourceInstanceId:e.sourceInstanceId,enabled:!0})),C=o.data?.policies.filter(e=>e.configuration.projectId===i)??[],w=C.filter(e=>e.status===`enabled`&&e.configuration.sources.some(e=>e.enabled&&S.some(t=>X(t)===X(e)))),T=w[0]??C.find(e=>e.status===`enabled`)??C[0],E=!!(n&&r&&i&&s&&o.data?.projects.some(e=>e.id===i));async function D(e,t){if(!n||!r||!o.data)return;let a={...e.configuration,sources:e.configuration.sources.map(e=>S.some(t=>X(t)===X(e))?{...e,enabled:t}:e)};if(t)for(let e of S)a.sources.some(t=>X(t)===X(e))||a.sources.push(e);let s=o.data.servingTargets.find(e=>e.id===a.serving?.targetId);if(t&&a.mode===`activate`&&a.serving?.targetId&&(!s||!s.enabled||s.projectId!==i))throw Error(`Review the policy's serving target before adding a source.`);if(t&&a.mode===`activate`&&(!a.serving?.targetId||s?.hostedPonder)){let e=await Z(n,r,`serving-targets`,{action:`ensure_hosted_ponder`,projectId:i,bindingId:o.data.ponderBindingId});a={...a,serving:{targetId:e.id,canarySeconds:a.serving?.canarySeconds??120,rollbackOnRuntimeFailure:!0}}}return ge(n,r,e,a,a.sources.some(e=>e.enabled))}async function O(e){if(!f){p(!0),h(null);try{if(e){let e=C.find(e=>e.id===u);if(!e)throw Error(`Refresh the learning policy before joining.`);await D(e,!0),d(null)}else for(let e of w)await D(e,!1);await o.refresh()}catch(e){h(e instanceof Error?e.message:`Unable to update this learning source.`),await o.refresh()}finally{p(!1)}}}return(0,W.jsxs)(`div`,{className:`agent-learning-control`,children:[b.length>1?(0,W.jsxs)(`label`,{children:[`Learning connection`,(0,W.jsx)(`select`,{"aria-label":`${e.name} learning connection`,value:x,disabled:f,onChange:e=>_(e.target.value),children:b.map(e=>(0,W.jsx)(`option`,{value:e,children:y.find(t=>t.sourceInstanceId===e)?.name??`Local connection`},e))})]}):null,(0,W.jsxs)(`div`,{className:`agent-learning-control-row`,children:[(0,W.jsxs)(`label`,{className:`provider-toggle`,children:[(0,W.jsx)(`input`,{type:`checkbox`,"aria-label":`${e.name} continuous learning`,checked:w.length>0,disabled:!E||!S.length||o.isPending||o.isError||f,onChange:e=>{if(e.target.checked){let e=C.find(e=>e.status===`enabled`);e?d(e.id):l(!0)}else O(!1)}}),(0,W.jsx)(`span`,{"aria-hidden":`true`})]}),(0,W.jsx)(`button`,{type:`button`,className:`agent-learning-settings`,disabled:!n||!r||!i||!s||f,onClick:()=>l(!0),children:`Continuous learning`}),(0,W.jsx)(`small`,{children:o.isError?`Needs attention`:o.isPending?`Loading…`:w.length?`On schedule`:C.length?`Paused`:`Off`})]}),i&&!S.length&&o.data?(0,W.jsx)(`small`,{children:`Sync this agent to the selected Project to use its local connection.`}):null,m?(0,W.jsx)(N,{error:m}):null,c&&n&&r?(0,W.jsx)(Se,{connection:n,teamId:r,projectId:i,projectName:a,initialPolicy:T,bindings:S,query:o,onClose:()=>l(!1)},i):null,u?(0,W.jsx)(we,{policies:C.filter(e=>e.status===`enabled`),policyId:u,agentName:e.name,busy:f,error:m,onChoose:d,onClose:()=>{f||d(null)},onJoin:()=>void O(!0)}):null]})}function we({policies:e,policyId:t,agentName:n,busy:r,error:i,onChoose:a,onClose:o,onJoin:s}){let c=S(o),l=e.find(e=>e.id===t);return(0,W.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:o,children:(0,W.jsxs)(`section`,{ref:c,className:`git-dialog agent-learning-join`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add learning source`,onMouseDown:e=>e.stopPropagation(),children:[(0,W.jsx)(`button`,{type:`button`,className:`git-dialog-close`,disabled:r,"aria-label":`Cancel`,onClick:o,children:(0,W.jsx)(z,{size:16})}),(0,W.jsxs)(`h2`,{children:[`Add `,n,` to `,l?.configuration.name??`continuous learning`,`?`]}),(0,W.jsx)(`p`,{children:`This agent will contribute conversations to the existing model, schedule and spending limits. Collection settings stay unchanged.`}),e.length>1?(0,W.jsxs)(`label`,{children:[`Existing policy`,(0,W.jsx)(`select`,{value:t,disabled:r,onChange:e=>a(e.target.value),children:e.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.configuration.name},e.id))})]}):null,i?(0,W.jsx)(N,{error:i}):null,(0,W.jsxs)(`div`,{className:`settings-button-row`,children:[(0,W.jsx)(`button`,{type:`button`,disabled:r,onClick:o,children:`Cancel`}),(0,W.jsx)(`button`,{type:`button`,className:`primary`,disabled:r||!l,onClick:s,children:r?`Adding…`:`Add agent`})]})]})})}function Te({connection:e,payload:t,onPayload:n,onToast:r}){let{inventory:i,error:a,loading:o,refresh:s}=ne(e),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(0),m=`openpond-agent-cards:${JSON.stringify(t?.account.activeProfile??null)}`,[g,_]=(0,U.useState)(()=>{try{let e=JSON.parse(localStorage.getItem(m)??`null`);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&V.some(t=>t.id===e)):[`oh_my_pi`]}catch{return[`oh_my_pi`]}});(0,U.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify(g))}catch{}},[m,g]);let[v,y]=(0,U.useState)(!1),b=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!v)return;let e=e=>{b.current?.contains(e.target)||y(!1)},t=e=>{e.key===`Escape`&&(y(!1),b.current?.querySelector(`button`)?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[v]);let x=(0,U.useRef)({payload:t,onPayload:n});x.current={payload:t,onPayload:n};let S=(0,U.useRef)(!0);(0,U.useEffect)(()=>(S.current=!0,()=>{S.current=!1}),[]);let C=t?.account??null,O=t?.preferences.defaultTeamId??C?.accounts.find(e=>e.isActive)?.apiKeyAccess?.teamId??null,k=(0,U.useCallback)(e=>{l(e),e&&r?.(e,`error`)},[r]),A=(0,U.useCallback)(e=>{let t=x.current;S.current&&t.payload&&t.onPayload({...t.payload,providers:e})},[]),j=(0,U.useCallback)((e,t)=>{let n=x.current;if(!S.current||!n.payload)return;let r=n.payload.providers,i={...n.payload,providers:{...r,statuses:{...r.statuses,[e]:t.statuses[e]},modelCaches:{...r.modelCaches,[e]:t.modelCaches[e]}}};x.current={...n,payload:i},n.onPayload(i)},[]);ie(e,t?.providers,j,f);let M=(0,U.useCallback)(e=>{let t=x.current;t.payload&&t.onPayload({...t.payload,preferences:e.preferences})},[]),F=T({connection:e,onError:k,onPayload:n,onPreferences:M,onProviders:A,preferences:h(t?.preferences),providers:t?.providers}),I=le(e,C,O),{projects:L,projectId:z,loading:ee,error:B}=I,te=he(e,O,JSON.stringify([C?.activeProfile??null,C?.profile?.id??null]),C?.state===`signed_in`),H=C?.baseUrl??C?.activeProfile?.baseUrl,G=H&&O?`${H.replace(/\/$/u,``)}/console/connections?${new URLSearchParams({teamId:O,...z?{project:z}:{}})}`:null,K=u?.provider,q=K?t?.providers.statuses[K]:null,J=u?(0,W.jsx)(pe,{agent:u,inventory:i,connection:e,account:C,teamId:O,projects:L,projectId:z,onRefresh:s,learningUrl:G},u.id):null;return(0,W.jsxs)(`section`,{className:`connected-agents-view`,"aria-label":`Continuous learning`,children:[(0,W.jsxs)(`div`,{className:`agent-connections-heading`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{children:`Continuous learning`}),(0,W.jsx)(`p`,{children:`Sync conversations from your installed agents and configure continuous learning.`})]}),(0,W.jsxs)(`div`,{className:`agent-connections-actions`,children:[(0,W.jsx)(`button`,{type:`button`,disabled:o||!e,"aria-label":`Refresh agent connections`,onClick:()=>{s(),I.refresh(),p(e=>e+1)},children:(0,W.jsx)(D,{size:15})}),(0,W.jsxs)(`div`,{className:`agent-more`,ref:b,children:[(0,W.jsx)(`button`,{type:`button`,"aria-expanded":v,onClick:()=>y(e=>!e),children:`More agents`}),v?(0,W.jsxs)(`div`,{className:`agent-more-menu`,children:[V.filter(e=>g.includes(e.id)).map(e=>(0,W.jsxs)(`button`,{type:`button`,onClick:()=>{_(t=>t.filter(t=>t!==e.id)),y(!1)},children:[(0,W.jsx)(E,{size:14}),(0,W.jsx)(`span`,{children:e.name})]},e.id)),g.length===0?(0,W.jsx)(`span`,{children:`All agents shown`}):null]}):null]})]})]}),(0,W.jsxs)(`label`,{className:`agent-project-scope`,children:[`Project`,(0,W.jsx)(P,{label:`Connections project`,value:z,disabled:!L.length,onChange:I.select,searchable:!0,options:[{value:``,label:ee&&!L.length?`Fetching projects…`:`Select project`},...L.map(e=>({value:e.id,label:e.content.name}))]})]}),B?(0,W.jsx)(N,{error:B}):null,a?(0,W.jsx)(N,{error:a}):null,c?(0,W.jsx)(N,{error:c}):null,(0,W.jsx)(`div`,{className:`agent-connections-grid`,children:V.filter(e=>!g.includes(e.id)).map(n=>(0,W.jsx)(re,{agent:n,account:C,native:n.provider?t?.providers.statuses[n.provider]:null,inventory:i,projects:L,teamId:O,learningControl:(0,W.jsx)(Ce,{agent:n,inventory:i,connection:e,teamId:O,projectId:z,projectName:L.find(e=>e.id===z)?.content.name??`Selected Project`,query:te,signedIn:C?.state===`signed_in`}),connected:!!e,onHide:()=>_(e=>[...e,n.id]),onManage:()=>d(n)},`${JSON.stringify([C?.activeProfile,C?.profile?.id])}:${O}:${z}:${n.id}`))}),i?(0,W.jsxs)(`div`,{className:`agent-importer-footer`,children:[(0,W.jsx)(`span`,{children:i.collector.running?`Import in progress`:`No import running`}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>R({kind:`settings`,section:`conversation-imports`}),children:`Conversation import settings`})]}):null,u&&K&&q&&t?(0,W.jsx)(w,{checkNativeProvider:F.checkNativeProvider,connection:e,account:C,codex:t.codex,providerId:K,providerBusy:F.providerBusy,settings:t.providers,status:q,onClose:()=>d(null),onDeleteCredential:F.deleteProviderCredential,onRefreshModels:F.refreshProviderModels,onSaveConfig:F.saveProviderConfig,onSaveCredential:F.saveProviderCredential,onStartOpenAiSubscriptionAuth:F.startOpenAiSubscriptionAuth,onValidate:F.validateProvider,conversationPanel:J}):u?(0,W.jsx)(Ee,{agent:u,onClose:()=>d(null),children:J}):null]})}function Ee({agent:e,onClose:t,children:n}){let r=S(t);return(0,W.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:t,children:(0,W.jsxs)(`section`,{ref:r,className:`git-dialog provider-details-dialog agent-setup-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`${e.name} connection`,onMouseDown:e=>e.stopPropagation(),children:[(0,W.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close`,onClick:t,children:(0,W.jsx)(z,{size:16})}),(0,W.jsx)(`div`,{className:`provider-dialog-header`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{children:e.name}),(0,W.jsx)(`span`,{children:`Conversation syncing`})]})}),n]})})}var De=[`For agents`,`Featured`,`Productivity`,`Developer tools`],Oe=new Set([`slack`,`google`,`github`,`mcp`]);function ke({account:e,connection:t,defaultTeamId:n,onToast:r,payload:i,onPayload:a}){let[o,s]=(0,U.useState)(`apps`),c=(0,U.useId)(),[l,u]=(0,U.useState)(null),[d,f]=(0,U.useState)(``),[p,m]=(0,U.useState)(`For agents`),[h,g]=(0,U.useState)(()=>A()),[_,v]=(0,U.useState)(null),y=e?.baseUrl??e?.activeProfile?.baseUrl??null,b=Ae(n,_),x=(0,U.useMemo)(()=>h.filter(e=>Pe(e,p)).filter(e=>Fe(e,d)),[p,d,h]);(0,U.useEffect)(()=>{let e=!0;return!t||o!==`apps`?(g(A()),v(null),()=>{e=!1}):(I.connectedAppStatus(t,{status:`all`}).then(t=>{e&&(g(t.apps),v(t.teamId?.trim()||null))}).catch(t=>{e&&(console.warn(`Unable to load connected app status.`,t),g(A()),v(null))}),()=>{e=!1})},[t,o]);function S(e){Le(O({appId:e.id,baseUrl:y,teamId:b})).catch(e=>{r?.(e instanceof Error?e.message:String(e),`error`)})}return(0,W.jsxs)(`div`,{className:`apps-workspace-view`,children:[(0,W.jsx)(`div`,{className:`apps-page-tabs`,role:`tablist`,"aria-label":`Apps pages`,onKeyDown:e=>{if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=e.key===`Home`?`apps`:e.key===`End`?`agents`:o===`agents`?`apps`:`agents`;s(t),e.currentTarget.querySelector(`#${CSS.escape(`${c}-${t}`)}`)?.focus()},children:[{value:`apps`,label:`Apps`},{value:`agents`,label:`Continuous learning`}].map(e=>(0,W.jsx)(`button`,{type:`button`,role:`tab`,id:`${c}-${e.value}`,"aria-controls":`${c}-${e.value}-panel`,tabIndex:o===e.value?0:-1,"aria-selected":o===e.value,onClick:()=>s(e.value),children:e.label},e.value))}),(0,W.jsx)(`div`,{role:`tabpanel`,id:`${c}-${o}-panel`,"aria-labelledby":`${c}-${o}`,children:o===`agents`?(0,W.jsx)(Te,{connection:t,payload:i,onPayload:a,onToast:r},JSON.stringify([e?.activeProfile,n])):(0,W.jsxs)(`section`,{className:`connected-apps-view`,"aria-label":`Apps`,children:[(0,W.jsxs)(`div`,{className:`connected-apps-header`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{children:`Apps`}),(0,W.jsx)(`p`,{children:`Connect apps that agents can use for chat, knowledge, files, and workflow actions.`})]}),(0,W.jsxs)(`label`,{className:`connected-apps-search`,children:[(0,W.jsx)(ee,{size:15}),(0,W.jsx)(`input`,{"aria-label":`Search apps`,onChange:e=>f(e.target.value),placeholder:`Search apps`,type:`search`,value:d})]})]}),(0,W.jsxs)(`section`,{className:`connected-apps-hero`,"aria-label":`App context`,children:[(0,W.jsxs)(`div`,{className:`connected-apps-hero-copy`,children:[(0,W.jsx)(`span`,{className:`connected-apps-hero-icon`,children:(0,W.jsx)(Ne,{appId:`github`})}),(0,W.jsx)(`h2`,{children:`Work with your apps`}),(0,W.jsx)(`p`,{children:`Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond.`})]}),(0,W.jsxs)(`div`,{className:`connected-apps-context-card`,"aria-hidden":`true`,children:[(0,W.jsx)(`strong`,{children:`Agent context`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`files`,children:`Files`}),(0,W.jsx)(`span`,{className:`chat`,children:`Chat`}),(0,W.jsx)(`span`,{className:`oauth`,children:`OAuth`}),(0,W.jsx)(`span`,{className:`mcp`,children:`MCP`})]})]})]}),(0,W.jsx)(`div`,{className:`connected-apps-filters`,role:`tablist`,"aria-label":`App categories`,children:De.map(e=>(0,W.jsx)(`button`,{"aria-selected":p===e,className:p===e?`active`:``,onClick:()=>m(e),role:`tab`,type:`button`,children:e},e))}),(0,W.jsxs)(`div`,{className:`connected-apps-list`,children:[x.map(e=>(0,W.jsx)(je,{app:e,onSelect:()=>u(e)},e.id)),x.length===0?(0,W.jsx)(`div`,{className:`connected-apps-empty`,children:`No apps match the current search.`}):null]}),l?(0,W.jsx)(Me,{app:l,onClose:()=>u(null),onInstall:()=>S(l)}):null]})})]})}function Ae(e,t){return e?.trim()||t?.trim()||null}function je({app:e,onSelect:t}){return(0,W.jsxs)(`button`,{className:`connected-app-row`,onClick:t,type:`button`,children:[(0,W.jsxs)(`span`,{className:`connected-app-row-main`,children:[(0,W.jsx)(Ne,{appId:e.id}),(0,W.jsxs)(`span`,{className:`connected-app-copy`,children:[(0,W.jsxs)(`span`,{className:`connected-app-title`,children:[(0,W.jsx)(`strong`,{children:e.label}),(0,W.jsxs)(`span`,{children:[e.shortLabel===e.label?e.category:e.shortLabel,` / `,e.setupSurfaceLabel]})]}),(0,W.jsx)(`span`,{children:e.description}),(0,W.jsxs)(`span`,{className:`connected-app-capability-row`,children:[e.capabilityLabels.slice(0,2).map(e=>(0,W.jsx)(`span`,{children:e},e)),e.capabilityLabels.length>2?(0,W.jsxs)(`span`,{children:[`+`,e.capabilityLabels.length-2]}):null]})]})]}),(0,W.jsx)(`span`,{className:`connected-app-status-pill ${e.status}`,children:e.statusLabel}),(0,W.jsx)(x,{size:16})]})}function Me({app:e,onClose:n,onInstall:r}){let i=e.connections.filter(e=>e.status===`active`);return(0,W.jsx)(`div`,{className:`connected-app-dialog-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&n()},children:(0,W.jsxs)(`section`,{className:`connected-app-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`connected-app-dialog-title`,children:[(0,W.jsx)(`button`,{className:`connected-app-dialog-close`,type:`button`,"aria-label":`Close app details`,onClick:n,children:(0,W.jsx)(z,{size:17})}),(0,W.jsxs)(`div`,{className:`connected-app-dialog-identity`,children:[(0,W.jsx)(`span`,{className:`openpond-mark`,children:(0,W.jsx)(`img`,{alt:``,src:t})}),(0,W.jsxs)(`span`,{className:`connection-dots`,"aria-hidden":`true`,children:[(0,W.jsx)(`span`,{}),(0,W.jsx)(`span`,{}),(0,W.jsx)(`span`,{})]}),(0,W.jsx)(Ne,{appId:e.id})]}),(0,W.jsxs)(`h2`,{id:`connected-app-dialog-title`,children:[`Connect `,e.label]}),(0,W.jsxs)(`div`,{className:`connected-app-approval`,children:[(0,W.jsx)(k,{size:16}),(0,W.jsx)(`span`,{children:e.statusLabel})]}),(0,W.jsxs)(`div`,{className:`connected-app-dialog-body`,children:[(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:e.setupSurfaceLabel}),(0,W.jsx)(`p`,{children:`The web flow shows the provider account, workspace, and requested access before anything is connected.`})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Connected account`}),(0,W.jsx)(`p`,{children:Re(i)})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Available capabilities`}),(0,W.jsx)(`div`,{className:`connected-app-dialog-capabilities`,children:e.capabilities.map(e=>(0,W.jsx)(`span`,{children:e.label},e.id))})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Sandbox lease policy`}),(0,W.jsx)(`p`,{children:e.leasePolicy.leaseable?`Leaseable for ${e.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:`Managed as setup or tool discovery; no OAuth lease is required.`})]})]}),(0,W.jsxs)(`button`,{className:`connected-app-dialog-primary`,type:`button`,onClick:r,children:[(0,W.jsx)(`span`,{children:e.installLabel}),(0,W.jsx)(j,{size:15})]})]})})}function Ne({appId:e}){return(0,W.jsx)(`span`,{className:`connected-app-icon app-${e}`,children:(0,W.jsx)(`img`,{alt:``,src:Ie(e)})})}function Pe(e,t){return t===`For agents`?!0:t===`Featured`?Oe.has(e.id):t===`Productivity`?e.category===`Productivity`||e.category===`Chat`:e.category===`Developer tools`||e.id===`mcp`}function Fe(e,t){let n=t.trim().toLowerCase();return!n||[e.id,e.label,e.shortLabel,e.category,e.description,e.providerFamily,e.setupSurface].some(e=>e.toLowerCase().includes(n))}function Ie(e){return i(e)}async function Le(e){let t=window.openpond?.browser;if(t){let n=await t.openExternal({conversationId:`connected-apps`,url:e});if(!n.ok)throw Error(n.error??`Unable to open app setup.`)}else window.open(e,`_blank`,`noopener,noreferrer`)}function Re(e){return e.length===0?`No active OAuth connection for this setup surface.`:e.map(e=>{let t=e.accountLabel??`Connected account`;return e.workspaceLabel?`${t} / ${e.workspaceLabel}`:t}).join(`, `)}export{ke as AppsView};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import"./icons-kaq6k88m.js";import{t as r}from"./createLucideIcon-C4b2afqG.js";import{N as i,z as a}from"./training-model-data-CmVo80ZR.js";import{n as o}from"./AppToastContext-BB_2hRfw.js";import{Fn as s,Hn as c,_n as l,vn as u}from"./App-Yy3l2sdD.js";import{B as d,b as f,t as p,x as m}from"./MainPane-BpE7AKXu.js";var h=r(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),g=e(t(),1),_=n();function v({active:e,onBounds:t}){let n=(0,g.useRef)(null),r=(0,g.useRef)(null),i=(0,g.useRef)(null),a=(0,g.useCallback)(e=>{let n=e?`${e.x}:${e.y}:${e.width}:${e.height}`:`null`;r.current!==n&&(r.current=n,t(e))},[t]),o=(0,g.useCallback)(()=>{let t=n.current;if(!e||!t){a(null);return}let r=t.getBoundingClientRect(),i=Math.max(0,Math.round(r.width)),o=Math.max(0,Math.round(r.height));a(i===0||o===0?null:{x:Math.round(r.left),y:Math.round(r.top),width:i,height:o})},[e,a]),s=(0,g.useCallback)(()=>{i.current===null&&(i.current=window.requestAnimationFrame(()=>{i.current=null,o()}))},[o]);return(0,g.useLayoutEffect)(()=>{r.current=null,o();let t=n.current;if(!e||!t)return a(null),()=>a(null);let c=new ResizeObserver(s);return c.observe(t),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{i.current!==null&&(window.cancelAnimationFrame(i.current),i.current=null),c.disconnect(),window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0),a(null)}},[e,a,o,s]),(0,_.jsx)(`div`,{className:`browser-viewport`,ref:n,hidden:!e})}function y({available:e,busy:t,onCapture:n,onCancel:r}){let[i,a]=(0,g.useState)(!1),o=(0,g.useRef)(null);return(0,g.useEffect)(()=>{if(!i)return;let e=e=>{o.current?.contains(e.target)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[i]),(0,_.jsxs)(`div`,{className:`browser-menu-anchor`,ref:o,children:[(0,_.jsx)(`button`,{type:`button`,title:t?`Cancel snapshot`:`Take snapshot`,"aria-label":t?`Cancel snapshot`:`Take snapshot`,disabled:!e&&!t,"aria-haspopup":t?void 0:`menu`,"aria-expanded":i,onClick:()=>t?r():a(e=>!e),children:t?(0,_.jsx)(u,{size:15}):(0,_.jsx)(h,{size:15})}),i?(0,_.jsxs)(`div`,{className:`browser-options-menu browser-snapshot-menu`,role:`menu`,"aria-label":`Snapshot options`,children:[(0,_.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{a(!1),n(`page`)},children:`Full page snapshot`}),(0,_.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{a(!1),n(`node`)},children:`Select an element…`})]}):null]})}function b({image:e,onClose:t}){let n=o(),r=e.source?.length===64e3?`HTML excerpt`:`HTML`;async function s(){let t=`${e.selector.replace(/[^a-z0-9._-]+/gi,`-`).slice(0,80)||`snapshot`}.png`;if(window.openpond?.files?.saveImage){let r=await window.openpond.files.saveImage({url:e.dataUrl,suggestedName:t});!r.ok&&!r.canceled&&n?.(r.error??`Snapshot could not be saved.`,`error`)}else{let n=document.createElement(`a`);n.href=e.dataUrl,n.download=t,n.click()}}return(0,_.jsxs)(`section`,{className:`browser-snapshot-preview`,"aria-label":`Snapshot preview`,children:[(0,_.jsxs)(`div`,{className:`html-visual-toolbar`,children:[(0,_.jsxs)(`span`,{children:[e.selector,` · `,e.width,` × `,e.height]}),e.source?(0,_.jsx)(`button`,{type:`button`,"aria-label":`Copy ${r}`,title:`Copy ${r}`,onClick:()=>void i(e.source),children:(0,_.jsx)(a,{size:15})}):null,(0,_.jsx)(`button`,{type:`button`,"aria-label":`Save snapshot PNG`,title:`Save snapshot PNG`,onClick:()=>void s(),children:(0,_.jsx)(c,{size:15})}),(0,_.jsx)(`button`,{type:`button`,"aria-label":`Close snapshot`,title:`Close snapshot`,onClick:t,children:(0,_.jsx)(u,{size:15})})]}),(0,_.jsx)(`div`,{className:`browser-snapshot-image`,children:(0,_.jsx)(`img`,{src:e.dataUrl,alt:`Snapshot of ${e.selector}`})}),e.source?(0,_.jsxs)(`details`,{children:[(0,_.jsx)(`summary`,{children:r}),(0,_.jsx)(`pre`,{children:e.source})]}):null]})}function x(e,t,n,r){let[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(null),u=(0,g.useRef)(0),d=(0,g.useRef)(null),f=(0,g.useCallback)(()=>{u.current++,d.current?.(),d.current=null,a(null)},[]);return(0,g.useEffect)(()=>(s(null),l(null),f),[e,t,n,f]),(0,g.useEffect)(()=>{if(i!==`node`)return;let e=e=>{e.key===`Escape`&&f()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,f]),{busy:i,image:o,error:c,capture:(0,g.useCallback)(async i=>{f();let o=u.current;s(null),l(null),a(i);try{let a=window.openpond?.browser;if(!a)throw Error(`Snapshots are available in the desktop app.`);let c;if(n){let e=r.current;if(!e)throw Error(`Wait for the HTML page to finish loading.`);d.current=()=>e.cancel();let t=await e.capture(i);if(o!==u.current)return;c=await a.captureHtml(t)}else{if(!t)throw Error(`Open a browser page before taking a snapshot.`);let n={conversationId:e,tabId:t};d.current=()=>{a.cancelCapture(n)},c=await a.capturePage({...n,mode:i})}if(o!==u.current)return;c.ok?s(c.image):c.canceled||l(c.error)}catch(e){o===u.current&&!(e instanceof DOMException&&e.name===`AbortError`)&&l(e instanceof Error?e.message:`Snapshot failed.`)}finally{o===u.current&&(a(null),d.current=null)}},[f,e,t,n,r]),cancel:f,close:()=>s(null)}}function S({conversationId:e,expanded:t,onResizeStart:n,connection:r=null,visualTabs:i,leadingTabs:a}){let o=m(e),[c,u]=(0,g.useState)({}),h=i?.tabs.find(e=>e.publicationId===i.activeId),S=(0,g.useRef)(null),C=x(e,o.activeTab?.id??null,h?.publicationId??null,S),w=(i?.tabs??[]).map(e=>({id:e.publicationId,url:`${e.output.title}.html`,title:e.output.title,faviconUrl:null,loading:!1,canGoBack:!1,canGoForward:!1,error:null})),T=w.find(e=>e.id===h?.publicationId),E=(0,g.useCallback)(t=>{window.openpond?.browser?.setBounds({conversationId:e,bounds:t})},[e]),D=(0,g.useCallback)(e=>{i?.showBrowser(),o.open(e,{explicitFile:!0})},[o,i]),O=(0,g.useCallback)(()=>{window.confirm(`Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.`)&&o.clearData()},[o]);return(0,_.jsxs)(`aside`,{className:`workspace-diff-panel browser-sidebar-panel ${t?`expanded`:``} ${C.busy===`node`||C.error?`has-capture-status`:``}`,"aria-label":`Browser`,children:[!t&&(0,_.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize browser panel`,onPointerDown:n}),(0,_.jsx)(p,{leadingTabs:a,activeTabId:h?.publicationId??o.state.activeTabId,tabs:[...o.state.tabs,...w],onCloseTab:e=>{w.some(t=>t.id===e)?i?.close(e):o.closeTab(e)},onNewTab:()=>{i?.showBrowser(),o.newTab()},onSelectTab:e=>{w.some(t=>t.id===e)?i?.select(e):(i?.showBrowser(),o.selectTab(e))}}),(0,_.jsx)(f,{activeTab:T??o.activeTab,documentName:T?.url,available:o.available,snapshotActions:(0,_.jsx)(y,{available:!C.image&&!!(h?window.openpond?.browser?.captureHtml:o.activeTab&&!o.activeTab.loading&&window.openpond?.browser?.capturePage),busy:!!C.busy,onCapture:e=>void C.capture(e),onCancel:C.cancel}),onBack:()=>void o.back(),onClearData:O,onForward:()=>void o.forward(),onNavigate:D,onOpenExternal:()=>void o.openExternal(),onReload:()=>{h?u(e=>({...e,[h.publicationId]:(e[h.publicationId]??0)+1})):o.reload()},onStop:()=>void o.stop()}),C.busy===`node`?(0,_.jsx)(`p`,{className:`browser-snapshot-status`,role:`status`,children:`Hover to highlight an element, then click to capture it. Press Esc to cancel.`}):null,C.error?(0,_.jsx)(l,{error:C.error}):null,(0,_.jsxs)(`div`,{className:`browser-content`,children:[C.image?(0,_.jsx)(b,{image:C.image,onClose:C.close}):null,i?.tabs.map(e=>(0,_.jsx)(`div`,{className:`browser-visual-document`,role:`tabpanel`,"aria-label":e.output.title,hidden:!!C.image||e.publicationId!==h?.publicationId,children:(0,_.jsx)(d,{visual:e,connection:r,expanded:!0,snapshotRef:e.publicationId===h?.publicationId?S:void 0},c[e.publicationId]??0)},e.publicationId)),!h&&!o.available?(0,_.jsxs)(`div`,{className:`browser-empty-state`,children:[(0,_.jsx)(s,{size:18}),(0,_.jsx)(`span`,{children:`Desktop browser bridge unavailable.`})]}):!h&&o.state.tabs.length===0?(0,_.jsxs)(`div`,{className:`browser-empty-state`,children:[(0,_.jsx)(s,{size:18}),(0,_.jsx)(`span`,{children:`Enter a URL to open a browser tab for this conversation.`})]}):null,(0,_.jsx)(v,{active:!C.image&&!h&&o.available&&o.state.tabs.length>0,onBounds:E})]})]})}export{S as BrowserSidebar};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{rr as r}from"./App-Yy3l2sdD.js";import{N as i,V as a}from"./MainPane-BpE7AKXu.js";var o=e(t(),1);function s(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 c(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 l(e,t){let n=(0,o.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?s(e,n.current.ids,n.current.liveCutoff??void 0):new Set;return(0,o.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,c(e)??0):r.liveCutoff??Math.max(a,c(e)??0)}},[e,r,t]),i}var u=new Map,d=[200,600,1500];function f({connection:e,latestTurnId:t,sessionId:n,turnRunning:i}){let[a,s]=(0,o.useState)(()=>({sessionId:null,summaries:u}));return(0,o.useEffect)(()=>{if(!e||!n)return;let a=!1,o=null,c=i?null:t,l=e=>{let t=d[e];t===void 0||a||(o=setTimeout(()=>void u(e+1),t))},u=async t=>{try{let i=await r.usageTurnCache(e,n);if(a)return;let o=new Map(i.turns.map(e=>[e.turnId,e]));s({sessionId:n,summaries:o}),c&&!o.has(c)&&l(t)}catch{l(t)}};return u(0),()=>{a=!0,o!==null&&clearTimeout(o)}},[e,t,n,i]),a.sessionId===n?a.summaries:u}var p=n();function m({row:e,renderMessage:t}){let[n,r]=(0,o.useState)(!1),s=(0,o.useId)();return e.type===`thinking`?(0,p.jsx)(i,{}):e.type===`message`?t(e):(0,p.jsxs)(`div`,{className:`chat-work-history`,children:[(0,p.jsx)(a,{className:`chat-work-history-summary`,controls:s,expanded:n,onToggle:()=>r(e=>!e),children:e.label}),n?(0,p.jsx)(`div`,{className:`chat-work-history-content`,id:s,children:e.messages.map(e=>(0,p.jsx)(`div`,{children:t(e)},e.id))}):null]})}export{f as n,l as r,m as t};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{h as r,m as i}from"./app-models-BviS9b7U.js";import"./icons-kaq6k88m.js";import{K as a,On as o,Wn as s,er as c,jn as l,wn as u,xn as d,zn as f}from"./App-Yy3l2sdD.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)(u,{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)(d,{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)(s,{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)(o,{size:15}):e.savedForLater?(0,m.jsx)(c,{size:15}):(0,m.jsx)(l,{size:15}),(0,m.jsx)(`span`,{children:e.title}),(0,m.jsx)(`small`,{children:e.appName??a(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};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{o as r,r as i,t as a}from"./ComposerAttachments-BdjBddKf.js";import"./icons-kaq6k88m.js";import{F as o,x as s}from"./training-model-data-CmVo80ZR.js";import{i as c,n as l,r as u,t as d}from"./wifi-off-aVJ3AvT_.js";import{t as f}from"./paperclip-DSHxP9CY.js";import{t as p}from"./refresh-cw-NXOER_CD.js";import{r as m}from"./AppToastContext-BB_2hRfw.js";import{_n as h,vn as g,xn as _,yn as v}from"./App-Yy3l2sdD.js";import{Y as y,k as b,q as x}from"./MainPane-BpE7AKXu.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,m]=(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),m(!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{m(!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)(g,{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)(h,{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)(g,{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}){m(e.discoveryError),m(t.lostMembership?`Your membership changed. Refresh the community before continuing.`:null),m(e.previewError),m(e.membershipError?.message),m(t.channelsError,{prefix:`Channels`}),m(t.messagesError,{prefix:`Messages`}),m(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,h=(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?h.get(e.authorUserId)??null:null,own:e.authorUserId===n,attachmentsAccessible:!t.previewMode,membersById:h,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};
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import"./icons-kaq6k88m.js";import{T as r}from"./training-model-data-CmVo80ZR.js";import{jr as i,vn as a}from"./App-Yy3l2sdD.js";import{n as o,r as s,t as c}from"./AttachmentTypeIcon-DOAsVQjt.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,i]=(0,u.useState)(!1),f=(0,u.useRef)(null),p=(0,u.useCallback)(()=>{i(!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:()=>i(!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)(r,{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<=i.maxTextChars?e:`${e.slice(0,Math.max(0,i.maxTextChars-28))}
2
- [attachment text truncated]`}export{y as a,m as i,_ as n,v as o,g as r,h as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{g as n,m as r}from"./index-BsPUniZy.js";import{n as i}from"./create-pipeline-CyUZrbbO.js";import"./icons-kaq6k88m.js";import{I as a}from"./training-model-data-CmVo80ZR.js";import{t as o}from"./play-BPPQoqMl.js";import{t as s}from"./refresh-cw-NXOER_CD.js";import{Bn as c,Gn as l,Mn as u,Pn as d,qn as f,vn as p}from"./App-Yy3l2sdD.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)(l,{size:15}):D.state===`awaiting_questions`?(0,g.jsx)(d,{size:15}):C(D.state)?(0,g.jsx)(u,{className:`composer-create-spin`,size:15}):(0,g.jsx)(c,{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)(c,{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)(p,{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)(c,{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)(p,{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)(o,{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)(p,{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)(s,{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)(p,{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)(o,{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)(s,{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};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{n as r}from"./api-client-Dgz-fOMl.js";import{Xt as i,_n as a,un as o}from"./App-Yy3l2sdD.js";import{n as s,r as c,t as l}from"./useAgentInventory-BV4CUWzJ.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};
@@ -1,2 +0,0 @@
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-RXlFwNte.js","assets/index-BsPUniZy.js","assets/index-DUMDOdB2.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-BsPUniZy.js";import"./icons-kaq6k88m.js";import{Bn as i,_t as a}from"./App-Yy3l2sdD.js";var o=e(t(),1),s=`/assets/pdf.worker.min-CjEcRF4W.mjs`;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,o.useRef)(null),c=`word-preview-${(0,o.useId)().replace(/[^a-z0-9]/gi,``)}`,[d,f]=(0,o.useState)(!1),[p,m]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let i=n.current;if(!i||!e.content)return;let o=new AbortController,u=document.createElement(`div`);i.replaceChildren(u);let d=[];f(!1),m(!1);let p=()=>{let e=u.offsetWidth;if(!e)return;let n=u.scrollHeight,r=t?i.parentElement?.clientHeight??0:0,a=t&&r&&n?Math.min(i.clientWidth/e,r/n):i.clientWidth/e;u.style.zoom=String(a)},h=new ResizeObserver(p);h.observe(i),t&&i.parentElement&&h.observe(i.parentElement);let g=async()=>{let n=Uint8Array.from(atob(e.content),e=>e.charCodeAt(0));if(a(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(o.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:o.signal,renderMode:`slide`})}else if(/\.pdf$/i.test(e.path)){let e=await r(()=>import(`./pdf-RXlFwNte.js`),__vite__mapDeps([3,4,1,5]));if(o.signal.aborted)return;e.GlobalWorkerOptions.workerSrc=s;let t=e.getDocument({data:n});d.push(()=>{t.destroy().catch(()=>{})});let i=await t.promise;if(o.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),o.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())}o.signal.aborted||(p(),f(!0))};return(t?l(o.signal,g):g()).catch(()=>{o.signal.aborted||m(!0)}),()=>{o.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)(i,{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};
@@ -1 +0,0 @@
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,p as l,s as u}from"./index-BsPUniZy.js";import{a as d,n as f}from"./client-choice-storage-BuNdhYSV.js";import"./icons-kaq6k88m.js";import{U as p}from"./training-model-data-CmVo80ZR.js";import{t as m}from"./play-BPPQoqMl.js";import{Zt as h,tr as g,vn as _}from"./App-Yy3l2sdD.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)(h,{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)(g,{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)(_,{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}`:l(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:o,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:t,title:le,videoId:`play-all`,videoUrl:ae},M=O.map((e,t)=>({captionsUrl:n(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:r(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,r,i,a){let o=`courses/post-training/${t}`,s=`post-training-${t}`;return{captionsUrl:l(`${o}.vtt`),description:a,duration:i,eyebrow:r,id:s,lessonNumber:e,posterUrl:l(`${o}-poster.webp`),slug:t,title:n,videoUrl:T(s)}}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:l(`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:l(`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:c,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:u,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};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{c as t,g as n,m as r}from"./index-BsPUniZy.js";import{n as i}from"./api-client-Dgz-fOMl.js";import"./icons-kaq6k88m.js";import{t as a}from"./plus-D18vYzHF.js";import{Mn as o,Vn as s,Xt as c,Zt as l,_n as u,qn as d,rr as f,vn as p}from"./App-Yy3l2sdD.js";/* empty css */import{t as m}from"./useAccountSettings-Dqqt1vUY.js";/* empty css */var h=e(n(),1),g=r(),_={codex:{name:`Codex`,installUrl:`https://developers.openai.com/codex/cli`},"claude-code":{name:`Claude`,installUrl:`https://code.claude.com/docs/en/setup`}};function v({providerId:e,connection:t,config:n,onProviders:r}){let l=_[e],[u,p]=(0,h.useState)(null),[m,v]=(0,h.useState)(!0),[y,b]=(0,h.useState)(null),[x,S]=(0,h.useState)(null),C=(0,h.useRef)(null),w=(0,h.useRef)(!1),T=(0,h.useRef)(r);T.current=r,(0,h.useEffect)(()=>(w.current=!0,()=>{w.current=!1}),[]);let E=(0,h.useCallback)(async()=>{C.current?.abort();let n=new AbortController;C.current=n;let r=setTimeout(()=>n.abort(Error(`Connection check timed out. Try again.`)),45e3);v(!0),b(null),p(null);try{let r=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:n.signal});if(C.current!==n||n.signal.aborted)return;p(r),b(r.error),T.current(r.settings)}catch(e){C.current===n&&b(e instanceof Error?e.message:String(e))}finally{clearTimeout(r),C.current===n&&(C.current=null,v(!1))}},[t.serverUrl,t.token,e]);(0,h.useEffect)(()=>{x||E();function e(){!C.current&&!x&&E()}return window.addEventListener(`focus`,e),()=>{window.removeEventListener(`focus`,e);let t=C.current;C.current=null,t?.abort()}},[E,n?.binaryPath,n?.sourceHome,x]);async function D(){if(!m){v(!0),b(null);try{let n=await f.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(!w.current)return;T.current(n),await E()}catch(e){b(e instanceof Error?e.message:String(e)),v(!1)}}}async function O(){if(m)return;let r=new AbortController;C.current=r;let a=setTimeout(()=>r.abort(),1e4);v(!0),b(null);try{let a=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`login`}),signal:r.signal});if(C.current!==r||r.signal.aborted)return;if(!n?.enabled){let n=await f.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(C.current!==r||r.signal.aborted)return;T.current(n)}C.current===r&&!r.signal.aborted&&S(a.command)}catch(e){C.current===r&&b(e instanceof Error?e.message:String(e))}finally{clearTimeout(a),C.current===r&&(C.current=null,v(!1))}}let k=!y&&u?.status===`ready`;return(0,g.jsxs)(`li`,{className:`getting-started-card`,children:[(0,g.jsx)(`img`,{className:`getting-started-provider-icon`,src:`/agent-sources/${e}.svg`,alt:``}),(0,g.jsx)(`h3`,{children:l.name}),(0,g.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,"aria-live":`polite`,children:m?(0,g.jsx)(o,{className:`settings-spin`,size:20,"aria-label":`Checking ${l.name}`}):k&&n?.enabled?(0,g.jsxs)(`span`,{children:[(0,g.jsx)(d,{size:16}),` Connected`]}):k?(0,g.jsxs)(`button`,{type:`button`,"aria-label":`Connect ${l.name}`,onClick:()=>void D(),children:[(0,g.jsx)(a,{size:14}),` Connect`]}):u?.status===`missing`?(0,g.jsxs)(`a`,{href:l.installUrl,target:`_blank`,rel:`noreferrer`,children:[`Install `,l.name,` `,(0,g.jsx)(s,{size:12})]}):u?.status===`needs_login`?(0,g.jsx)(`button`,{type:`button`,"aria-label":`Log in to ${l.name}`,title:y??void 0,onClick:()=>void O(),children:`Log in`}):(0,g.jsx)(`button`,{type:`button`,"aria-label":`Retry ${l.name} connection`,title:y??`Check connection again`,onClick:()=>void E(),children:`Retry`})}),x?(0,g.jsx)(c,{modal:!0,connection:t,command:x,onComplete:()=>S(null),onClose:()=>S(null)}):null]})}var y=`https://www.openpond.ai/api-keys`;function b({connection:e,payload:n,onPayload:r,onClose:i}){let[a,o]=(0,h.useState)(!1),[c,f]=(0,h.useState)(``),[_,b]=(0,h.useState)(null),x=(0,h.useRef)(n);x.current=n;let S=m({connection:e,onPayload:r,onError:b});function C(e){r({...x.current,providers:e})}let w=n.account.state===`signed_in`;async function T(e){if(e.preventDefault(),c.trim()&&!S.saving)try{await S.saveAccount({apiKey:c,baseUrl:`https://www.openpond.ai`,apiBaseUrl:`https://api.openpond.ai`,environment:`production`}),f(``),o(!1)}catch{}}async function E(){b(null);try{let e=window.openpond?.browser;if(e?.openExternal){let t=await e.openExternal({conversationId:`openpond-get-started`,url:y});if(!t.ok)throw Error(t.error??`Could not open API keys in your browser.`)}else window.open(y,`_blank`,`noopener,noreferrer`)}catch(e){b(e instanceof Error?e.message:String(e))}}return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(l,{ariaLabel:`Get started with OpenPond`,backdropClassName:`git-dialog-backdrop`,className:`git-dialog getting-started-dialog`,onClose:i,children:[(0,g.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close get started`,title:`Close`,onClick:i,children:(0,g.jsx)(p,{size:16})}),(0,g.jsx)(`header`,{className:`getting-started-header`,children:(0,g.jsx)(`h2`,{children:`Get started with OpenPond`})}),(0,g.jsxs)(`ol`,{className:`getting-started-cards`,children:[(0,g.jsxs)(`li`,{className:`getting-started-card`,children:[(0,g.jsx)(`img`,{className:`getting-started-provider-icon`,src:t,alt:``}),(0,g.jsx)(`h3`,{children:`OpenPond account`}),(0,g.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,children:w?(0,g.jsxs)(`span`,{children:[(0,g.jsx)(d,{size:16}),` Connected`]}):(0,g.jsx)(`a`,{href:y,onClick:e=>{e.preventDefault(),b(null),o(!0)},children:`Connect account`})})]}),(0,g.jsx)(v,{providerId:`codex`,connection:e,config:n.providers.providers.codex,onProviders:C}),(0,g.jsx)(v,{providerId:`claude-code`,connection:e,config:n.providers.providers[`claude-code`],onProviders:C})]})]}),a?(0,g.jsxs)(l,{ariaLabel:`Connect OpenPond account`,backdropClassName:`git-dialog-backdrop getting-started-account-backdrop`,className:`git-dialog getting-started-account-dialog`,onClose:()=>o(!1),dismissDisabled:S.saving,children:[(0,g.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close account connection`,disabled:S.saving,onClick:()=>o(!1),children:(0,g.jsx)(p,{size:16})}),(0,g.jsx)(`h2`,{children:`Connect OpenPond`}),(0,g.jsxs)(`a`,{href:y,target:`_blank`,rel:`noreferrer`,className:`getting-started-key-link`,onClick:e=>{e.preventDefault(),E()},children:[`Create an API key `,(0,g.jsx)(s,{size:12})]}),(0,g.jsxs)(`form`,{onSubmit:e=>void T(e),children:[(0,g.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,g.jsx)(`span`,{children:`OpenPond API key`}),(0,g.jsx)(`input`,{"data-autofocus":!0,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:`opk_…`,value:c,disabled:S.saving,onChange:e=>{f(e.target.value),b(null)}})]}),_?(0,g.jsx)(u,{error:_}):null,(0,g.jsx)(`button`,{className:`git-dialog-primary`,type:`submit`,disabled:S.saving||!c.trim(),children:S.saving?`Connecting…`:`Connect account`})]})]}):null]})}export{b as GettingStartedDialog};
@@ -1 +0,0 @@
1
- .getting-started-dialog{outline:none;gap:24px;width:min(660px,100vw - 34px);max-height:calc(100dvh - 34px);padding:28px;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:12px;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:16px 10px;display:flex}.getting-started-provider-icon{object-fit:contain;width:30px;height:30px}.getting-started-card h3{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-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<=520px){.getting-started-dialog{padding:20px}.getting-started-cards{gap:8px}.getting-started-card{gap:12px;min-height:150px;padding:12px 6px}.getting-started-card h3{font-size:12px}.getting-started-card-status{font-size:11px}}
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{b as r,x as i}from"./contracts-BHTOD1nd.js";import{t as a}from"./api-client-Dgz-fOMl.js";import{Zt as o}from"./App-Yy3l2sdD.js";import{a as s,i as c,n as l,o as u,r as d}from"./LabsRoute-DOnw39du.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};