openpond 0.2.61 → 0.2.62

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 (420) hide show
  1. package/dist/app-server.d.ts +3264 -18
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{acp-FUAWCKBH.js → acp-DYRBDJRU.js} +1 -1
  4. package/dist/chunks/{acp-agent-XBSJ27KI.js → acp-agent-UTLP7C3I.js} +1 -1
  5. package/dist/chunks/{actions-command-LOHNQUWP.js → actions-command-6LF4Z4WK.js} +1 -1
  6. package/dist/chunks/{app-layer-4BFMOMKM.js → app-layer-N2H3RBEN.js} +1 -1
  7. package/dist/chunks/{app-server-connected-apps-Q2VWWJNX.js → app-server-connected-apps-3T546FE7.js} +1 -1
  8. package/dist/chunks/app-server-evaluations-TXD747QA.js +2 -0
  9. package/dist/chunks/{app-server-harness-services-2PSZBT7U.js → app-server-harness-services-BBCDV5P3.js} +1 -1
  10. package/dist/chunks/app-server-runtime-VEJPDAFP.js +2 -0
  11. package/dist/chunks/{apps-7PIBF32Q.js → apps-CTT2XYRR.js} +1 -1
  12. package/dist/chunks/{chunk-KK626T3Z.js → chunk-2EPR4HLF.js} +1 -1
  13. package/dist/chunks/{chunk-5VPU7OS7.js → chunk-2IIBCCOK.js} +1 -1
  14. package/dist/chunks/{chunk-ZISYLRH6.js → chunk-2UDAKLJ4.js} +1 -1
  15. package/dist/chunks/{chunk-BDCTN4PU.js → chunk-2V4LPUBH.js} +1 -1
  16. package/dist/chunks/{chunk-I3X6M6ZO.js → chunk-3R4MSE2S.js} +1 -1
  17. package/dist/chunks/{chunk-OFVUN4KI.js → chunk-47AXSBPV.js} +1 -1
  18. package/dist/chunks/{chunk-BFKYRQMA.js → chunk-4N4EH3RJ.js} +1 -1
  19. package/dist/chunks/chunk-4PZWGNX4.js +86 -0
  20. package/dist/chunks/{chunk-VFLSBDNZ.js → chunk-4RZBGKT7.js} +1 -1
  21. package/dist/chunks/{chunk-VBW2X42G.js → chunk-4TM75R7V.js} +1 -1
  22. package/dist/chunks/chunk-4U2FNXQW.js +2 -0
  23. package/dist/chunks/{chunk-SCCYSPQ5.js → chunk-4ZBOYWQ3.js} +1 -1
  24. package/dist/chunks/{chunk-VWJ5IYQP.js → chunk-547AUVKN.js} +1 -1
  25. package/dist/chunks/{chunk-FJ3HMHT6.js → chunk-557XSPVS.js} +1 -1
  26. package/dist/chunks/{chunk-ZHFH2TZN.js → chunk-557YG77L.js} +1 -1
  27. package/dist/chunks/{chunk-MF35MALN.js → chunk-5A6ER3M2.js} +1 -1
  28. package/dist/chunks/{chunk-U4HZD2GM.js → chunk-5OSM75X5.js} +1 -1
  29. package/dist/chunks/{chunk-TH6Y4K5Z.js → chunk-6SH4B7DV.js} +1 -1
  30. package/dist/chunks/chunk-6XSSM4WT.js +3 -0
  31. package/dist/chunks/{chunk-HN2ZK6EV.js → chunk-7JBB4PXS.js} +1 -1
  32. package/dist/chunks/{chunk-SID4X3YN.js → chunk-7JXZNCBC.js} +1 -1
  33. package/dist/chunks/chunk-7KTARW23.js +2 -0
  34. package/dist/chunks/{chunk-M6JRS5PA.js → chunk-ABF3W2MO.js} +1 -1
  35. package/dist/chunks/{chunk-CGAL7IHZ.js → chunk-AKZPMKWP.js} +1 -1
  36. package/dist/chunks/{chunk-SIV5P6JO.js → chunk-AMO5DVKM.js} +2 -2
  37. package/dist/chunks/chunk-AZ7BL5FL.js +2 -0
  38. package/dist/chunks/{chunk-4RHM4WN2.js → chunk-B42QQUZY.js} +1 -1
  39. package/dist/chunks/{chunk-3DVWJCOA.js → chunk-B4RKHHF7.js} +1 -1
  40. package/dist/chunks/{chunk-CQF6QZEL.js → chunk-BEI4YULC.js} +1 -1
  41. package/dist/chunks/chunk-BKEDG3A4.js +22 -0
  42. package/dist/chunks/{chunk-GEXKTGLY.js → chunk-C7M2WBWZ.js} +14 -14
  43. package/dist/chunks/{chunk-ELYRVTTG.js → chunk-CJUVHE4U.js} +1 -1
  44. package/dist/chunks/{chunk-ZUNG6YDO.js → chunk-EIX2V2KU.js} +1 -1
  45. package/dist/chunks/{chunk-AWPYTDH4.js → chunk-EWOTDVDJ.js} +1 -1
  46. package/dist/chunks/{chunk-B47JMAVW.js → chunk-F4TJ7WQV.js} +1 -1
  47. package/dist/chunks/{chunk-TXBIZDXG.js → chunk-F7D4BMTO.js} +1 -1
  48. package/dist/chunks/{chunk-BWY4D3BN.js → chunk-FFWOTZQM.js} +1 -1
  49. package/dist/chunks/{chunk-6RVF2J47.js → chunk-FUSCTBJI.js} +1 -1
  50. package/dist/chunks/{chunk-BN5AVRUG.js → chunk-GAQLXFOT.js} +1 -1
  51. package/dist/chunks/{chunk-LHENAWLH.js → chunk-GEKORCMN.js} +1 -1
  52. package/dist/chunks/{chunk-ORLJJGZZ.js → chunk-GNCEZ3UP.js} +1 -1
  53. package/dist/chunks/{chunk-WRQEYW3V.js → chunk-GOIKLFXK.js} +1 -1
  54. package/dist/chunks/{chunk-65SM7Y2G.js → chunk-GQGLPKU4.js} +1 -1
  55. package/dist/chunks/{chunk-LBBXVOVR.js → chunk-GSWBNJGZ.js} +1 -1
  56. package/dist/chunks/{chunk-7EAWLYYB.js → chunk-GV3LFSMI.js} +1 -1
  57. package/dist/chunks/{chunk-GQUS7MCH.js → chunk-GW5SE3FM.js} +1 -1
  58. package/dist/chunks/{chunk-I3W27VK4.js → chunk-HBLN4OLY.js} +1 -1
  59. package/dist/chunks/{chunk-SGK4GR44.js → chunk-HFJUXKT5.js} +1 -1
  60. package/dist/chunks/{chunk-4P3X2RXA.js → chunk-HKV7RX5E.js} +1 -1
  61. package/dist/chunks/{chunk-QDBYLJGH.js → chunk-HXZXDDKW.js} +1 -1
  62. package/dist/chunks/{chunk-LNRFRAV5.js → chunk-INO67SEN.js} +1 -1
  63. package/dist/chunks/{chunk-E67M5WGY.js → chunk-IWK3RTLR.js} +1 -1
  64. package/dist/chunks/{chunk-U447MS3Y.js → chunk-J3B2GM4A.js} +1 -1
  65. package/dist/chunks/chunk-JCLTFDVW.js +2 -0
  66. package/dist/chunks/{chunk-25RDE7DV.js → chunk-JEISPWWM.js} +1 -1
  67. package/dist/chunks/{chunk-D4JZALZ4.js → chunk-JIFUGA3U.js} +1 -1
  68. package/dist/chunks/{chunk-H2AUR7OT.js → chunk-JQRMDFF3.js} +1 -1
  69. package/dist/chunks/{chunk-FWIPHEVA.js → chunk-JX6OX6XE.js} +1 -1
  70. package/dist/chunks/{chunk-D5ADDBS5.js → chunk-JY3YSI54.js} +1 -1
  71. package/dist/chunks/{chunk-CM5USMXN.js → chunk-KOKX7PBS.js} +1 -1
  72. package/dist/chunks/{chunk-3ZWLRBYZ.js → chunk-KUPJNBWG.js} +1 -1
  73. package/dist/chunks/chunk-LILXHGIA.js +2 -0
  74. package/dist/chunks/{chunk-MCIIGQT7.js → chunk-LJDBR3RN.js} +1 -1
  75. package/dist/chunks/{chunk-3TYCIYW6.js → chunk-LJPO3TEL.js} +1 -1
  76. package/dist/chunks/{chunk-MHYI7ATG.js → chunk-LRRBYIGH.js} +2 -2
  77. package/dist/chunks/{chunk-P4XM7LUT.js → chunk-M5IX6VUA.js} +1 -1
  78. package/dist/chunks/chunk-MEK7DLX3.js +2 -0
  79. package/dist/chunks/{chunk-TYHCBVQT.js → chunk-MILEWROZ.js} +1 -1
  80. package/dist/chunks/{chunk-ZBBVRYU3.js → chunk-MNFW5WLD.js} +1 -1
  81. package/dist/chunks/{chunk-2VXL6AU3.js → chunk-MNXNZDDW.js} +1 -1
  82. package/dist/chunks/chunk-N5GPINVP.js +2 -0
  83. package/dist/chunks/{chunk-TSAW2QVU.js → chunk-NBE74GLF.js} +1 -1
  84. package/dist/chunks/{chunk-VZXZ6CHS.js → chunk-NE4ESZPT.js} +1 -1
  85. package/dist/chunks/{chunk-CO3OJFPU.js → chunk-NKZNPTLA.js} +1 -1
  86. package/dist/chunks/{chunk-WFVOG5PU.js → chunk-NLQ2UPN2.js} +1 -1
  87. package/dist/chunks/chunk-NOSBNHGC.js +18 -0
  88. package/dist/chunks/{chunk-TTN63EAM.js → chunk-NWOK6NLE.js} +1 -1
  89. package/dist/chunks/{chunk-6MWT6BVU.js → chunk-NWQL6FNF.js} +1 -1
  90. package/dist/chunks/chunk-O3MHHGC5.js +151 -0
  91. package/dist/chunks/{chunk-IUGK6BBY.js → chunk-OCC43RSJ.js} +1 -1
  92. package/dist/chunks/{chunk-BQUWZRWU.js → chunk-P74RR2GB.js} +1 -1
  93. package/dist/chunks/{chunk-PAZDQRYU.js → chunk-PAE3PQEC.js} +1 -1
  94. package/dist/chunks/{chunk-M4ZRCRJM.js → chunk-PGO4FRHU.js} +2 -2
  95. package/dist/chunks/chunk-Q34IF4PW.js +2 -0
  96. package/dist/chunks/{chunk-Q324ZA5M.js → chunk-QAVQJZCM.js} +1 -1
  97. package/dist/chunks/{chunk-EIIGTADO.js → chunk-RBDUMASL.js} +1 -1
  98. package/dist/chunks/{chunk-TMMFF6DO.js → chunk-RH43WLBX.js} +1 -1
  99. package/dist/chunks/{chunk-RPOD6I64.js → chunk-RTJCELRR.js} +1 -1
  100. package/dist/chunks/{chunk-L3GA2CQI.js → chunk-SD64CLJX.js} +1 -1
  101. package/dist/chunks/{chunk-TNHDD3LO.js → chunk-SXMR6E2W.js} +1 -1
  102. package/dist/chunks/{chunk-MLTKB5G3.js → chunk-SZKFNKWO.js} +1 -1
  103. package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
  104. package/dist/chunks/{chunk-PE7UKJXK.js → chunk-T6C5BNXK.js} +1 -1
  105. package/dist/chunks/{chunk-OMICIPPY.js → chunk-T6JN4PND.js} +1 -1
  106. package/dist/chunks/{chunk-OQUKSRU3.js → chunk-TGEGXTPR.js} +1 -1
  107. package/dist/chunks/chunk-TM4VEMNN.js +2 -0
  108. package/dist/chunks/chunk-TUCKED4T.js +4 -0
  109. package/dist/chunks/chunk-TVTFEGTU.js +2 -0
  110. package/dist/chunks/{chunk-HZLV773Y.js → chunk-TW3SRBLU.js} +1 -1
  111. package/dist/chunks/{chunk-BNZTJPK7.js → chunk-U456UP3N.js} +1 -1
  112. package/dist/chunks/chunk-UC3FXTDL.js +9 -0
  113. package/dist/chunks/{chunk-XLULTQLZ.js → chunk-UT6F6AIB.js} +1 -1
  114. package/dist/chunks/{chunk-OJFDI7VM.js → chunk-UTNGEMW5.js} +1 -1
  115. package/dist/chunks/{chunk-DW3GJRY3.js → chunk-VAJSRUAB.js} +1 -1
  116. package/dist/chunks/chunk-VE6ZIGUQ.js +2 -0
  117. package/dist/chunks/{chunk-GLVR74PX.js → chunk-VI32G77S.js} +1 -1
  118. package/dist/chunks/{chunk-ROE24PN5.js → chunk-VK4TPZTA.js} +1 -1
  119. package/dist/chunks/{chunk-Q66LWQGF.js → chunk-VSQXDS6H.js} +1 -1
  120. package/dist/chunks/{chunk-4GZ2FPB5.js → chunk-VWRTE64Y.js} +1 -1
  121. package/dist/chunks/{chunk-QRJPLZF7.js → chunk-W5W4IODW.js} +1 -1
  122. package/dist/chunks/{chunk-57RY3LSR.js → chunk-WGLVSGFA.js} +1 -1
  123. package/dist/chunks/{chunk-I7JCARVH.js → chunk-WQMXEZVE.js} +3 -3
  124. package/dist/chunks/chunk-X4ZT22SG.js +2 -0
  125. package/dist/chunks/{chunk-DGPGOBYZ.js → chunk-XSB3T4JZ.js} +1 -1
  126. package/dist/chunks/{chunk-ZZWAQBA2.js → chunk-XWDFXM3S.js} +1 -1
  127. package/dist/chunks/{chunk-4LZLO4OW.js → chunk-Y2KPHVZK.js} +1 -1
  128. package/dist/chunks/chunk-ZQHPGEYT.js +2 -0
  129. package/dist/chunks/{chunk-T4LLJC5N.js → chunk-ZXT7V64X.js} +1 -1
  130. package/dist/chunks/cli-GCSO2OAI.js +2 -0
  131. package/dist/chunks/{configuration-command-ONGI2BJD.js → configuration-command-BU2RPG33.js} +1 -1
  132. package/dist/chunks/connected-app-executor-UDE7U4KG.js +2 -0
  133. package/dist/chunks/{connected-evidence-4J3YXU4O.js → connected-evidence-GXIY2L7C.js} +1 -1
  134. package/dist/chunks/{connected-starting-assets-OXLT7S4O.js → connected-starting-assets-V5QXRK5Q.js} +1 -1
  135. package/dist/chunks/{connection-HJWE6SEW.js → connection-XMAAGMXJ.js} +1 -1
  136. package/dist/chunks/{continual-CJUZM5ZQ.js → continual-FLW6DAJK.js} +1 -1
  137. package/dist/chunks/{core-commands-JGXU6B4C.js → core-commands-NJ6TGND4.js} +1 -1
  138. package/dist/chunks/{dataset-preparation-authoring-DFGJBMVF.js → dataset-preparation-authoring-IUXUQK3L.js} +1 -1
  139. package/dist/chunks/{datasets-MNHZAZIB.js → datasets-AH56DKLZ.js} +1 -1
  140. package/dist/chunks/{desktop-test-P23MHAIG.js → desktop-test-PYUTEOWO.js} +1 -1
  141. package/dist/chunks/{dist-IIFTZWNR.js → dist-5267UT3V.js} +1 -1
  142. package/dist/chunks/{dist-X64FC6NA.js → dist-HSC43RG4.js} +1 -1
  143. package/dist/chunks/{evaluation-coordination-6NQEH5WU.js → evaluation-coordination-3AUICOC5.js} +1 -1
  144. package/dist/chunks/{experiment-improvements-M27Z5OF4.js → experiment-improvements-YS7GGPDW.js} +1 -1
  145. package/dist/chunks/experiments-EJZK7FPT.js +2 -0
  146. package/dist/chunks/{experiments-signal-R3NNH7WR.js → experiments-signal-NKUIJCIY.js} +1 -1
  147. package/dist/chunks/{extension-C33NUFDL.js → extension-ZM6NI5O5.js} +1 -1
  148. package/dist/chunks/{help-M2VQGPVC.js → help-PXUUREHZ.js} +1 -1
  149. package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +2 -0
  150. package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +2 -0
  151. package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +2 -0
  152. package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +3 -0
  153. package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +2 -0
  154. package/dist/chunks/{hosted-profile-candidate-37ZFY2LH.js → hosted-profile-candidate-DKEMVIYG.js} +1 -1
  155. package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +2 -0
  156. package/dist/chunks/{hosted-profile-evaluation-control-UQBMML6K.js → hosted-profile-evaluation-control-ERCXAPZD.js} +1 -1
  157. package/dist/chunks/{hosted-profile-evaluation-inspection-YASS4T6L.js → hosted-profile-evaluation-inspection-Q3AIIIB6.js} +1 -1
  158. package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +3 -0
  159. package/dist/chunks/{hosted-tasksets-CVUP7MS6.js → hosted-tasksets-X2YCFYEJ.js} +1 -1
  160. package/dist/chunks/{human-review-IJETDOWB.js → human-review-5WM6MSON.js} +1 -1
  161. package/dist/chunks/{import-WLLUIDS6.js → import-JWZSZCE4.js} +1 -1
  162. package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +2 -0
  163. package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +2 -0
  164. package/dist/chunks/{model-projects-AVBQDNYG.js → model-projects-H22KENI4.js} +1 -1
  165. package/dist/chunks/opchat-3S6TSDZO.js +3 -0
  166. package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +2 -0
  167. package/dist/chunks/{organizations-DJRJWC5I.js → organizations-62YNTZTO.js} +1 -1
  168. package/dist/chunks/{profile-JRS3JNRC.js → profile-ELE2D7HU.js} +1 -1
  169. package/dist/chunks/project-action-payload-32F4X2BB.js +2 -0
  170. package/dist/chunks/{project-agent-2KNJFNZI.js → project-agent-O4REKO6T.js} +1 -1
  171. package/dist/chunks/{published-experiment-source-LFYHKFAO.js → published-experiment-source-DAOTJLIN.js} +1 -1
  172. package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +2 -0
  173. package/dist/chunks/{runtime-CBJF5GMB.js → runtime-776NUSE7.js} +2 -2
  174. package/dist/chunks/{sandbox-command-IIGTPYN3.js → sandbox-command-UQ26NDIX.js} +1 -1
  175. package/dist/chunks/{sandbox-template-FTANKQIA.js → sandbox-template-WP6YCGBK.js} +1 -1
  176. package/dist/chunks/saved-work-PG52WCRQ.js +2 -0
  177. package/dist/chunks/{send-turn-5UB7ZBJV.js → send-turn-RPB65PME.js} +1 -1
  178. package/dist/chunks/{src-4YZF6L6H.js → src-2R4CMCJ5.js} +1 -1
  179. package/dist/chunks/src-AU6LG7E6.js +421 -0
  180. package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +2 -0
  181. package/dist/chunks/{store-chat-resources-CGW7PDCG.js → store-chat-resources-T4LR7K25.js} +1 -1
  182. package/dist/chunks/{store-continual-support-reviews-GWI2FRII.js → store-continual-support-reviews-R62D2HD6.js} +1 -1
  183. package/dist/chunks/{store-conversation-serving-637AHKBP.js → store-conversation-serving-25O7BAR2.js} +1 -1
  184. package/dist/chunks/{store-create-improve-ZG653Z63.js → store-create-improve-T5E2GUKK.js} +1 -1
  185. package/dist/chunks/{store-datasets-IW6F2QZM.js → store-datasets-5Y4U5L3R.js} +1 -1
  186. package/dist/chunks/{store-evaluation-results-V5J6L4NV.js → store-evaluation-results-WUVJWCFU.js} +1 -1
  187. package/dist/chunks/{store-harness-workspaces-HHMM6GNK.js → store-harness-workspaces-IFEFY5CK.js} +1 -1
  188. package/dist/chunks/{store-human-review-V5H4QDHR.js → store-human-review-ZQNLZRGG.js} +1 -1
  189. package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +2 -0
  190. package/dist/chunks/{store-local-experiments-A2UWYPVQ.js → store-local-experiments-LOH4F4TF.js} +1 -1
  191. package/dist/chunks/{store-model-batch-review-KMYPYWJR.js → store-model-batch-review-QO4VVKWC.js} +1 -1
  192. package/dist/chunks/{store-model-configuration-UXNC4PGY.js → store-model-configuration-C3HSOFD5.js} +1 -1
  193. package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +2 -0
  194. package/dist/chunks/{store-preference-comparison-HTOXLWKF.js → store-preference-comparison-RNIFLJRW.js} +1 -1
  195. package/dist/chunks/{store-schedules-QVWT7AEB.js → store-schedules-DVQ2PP4F.js} +1 -1
  196. package/dist/chunks/{store-sidebar-file-bookmarks-G5Z6NZWL.js → store-sidebar-file-bookmarks-LXWFFYCZ.js} +1 -1
  197. package/dist/chunks/{store-sidebar-preferences-27FFMUWU.js → store-sidebar-preferences-4HH7LX6N.js} +1 -1
  198. package/dist/chunks/{store-subagents-PK7ZWLPR.js → store-subagents-JLW4GD4Q.js} +1 -1
  199. package/dist/chunks/{store-task-inbox-LNDCZOYE.js → store-task-inbox-DL5RYFPO.js} +1 -1
  200. package/dist/chunks/{store-task-inventory-IG6HGWSQ.js → store-task-inventory-NJXRXFLC.js} +1 -1
  201. package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +9 -0
  202. package/dist/chunks/{store-training-NQRRPKEZ.js → store-training-VRLU6NFX.js} +1 -1
  203. package/dist/chunks/{store-training-jobs-F6Y2ZTXP.js → store-training-jobs-3ZHG4LGI.js} +1 -1
  204. package/dist/chunks/{store-training-models-NRSLSBEW.js → store-training-models-KWQD5PRP.js} +1 -1
  205. package/dist/chunks/{store-usage-GFHQYT34.js → store-usage-ZRS3ILF2.js} +1 -1
  206. package/dist/chunks/{taskset-NYLUYX6K.js → taskset-QDMCQQDJ.js} +1 -1
  207. package/dist/chunks/{taskset-packages-I7I5KBFP.js → taskset-packages-CBLJFWDQ.js} +1 -1
  208. package/dist/chunks/{teams-bot-FMAEDGSD.js → teams-bot-GF272RGC.js} +1 -1
  209. package/dist/chunks/{training-UBX6E7SK.js → training-DF5UEPY3.js} +1 -1
  210. package/dist/chunks/{training-error-AYOGHHL2.js → training-error-L5V5IBX3.js} +1 -1
  211. package/dist/chunks/training-hosted-I2NDBYGS.js +2 -0
  212. package/dist/chunks/training-hosted-report-4F25RZZ4.js +2 -0
  213. package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +2 -0
  214. package/dist/chunks/training-project-preparation-XWGRY5ME.js +3 -0
  215. package/dist/chunks/{web-search-Q4OQVUNH.js → web-search-5RUXYIOF.js} +1 -1
  216. package/dist/chunks/{workspaces-XREEVSTS.js → workspaces-JRY2IE7H.js} +1 -1
  217. package/dist/cli.js +2 -2
  218. package/dist/hosted-chat.d.ts +28 -0
  219. package/dist/index.js +1 -1
  220. package/dist/skills/openpond-cli/SKILL.md +15 -2
  221. package/dist/skills/openpond-cli/references/compact-resource-tables.md +3 -3
  222. package/dist/skills/openpond-cli/references/diagnose-and-improve.md +4 -2
  223. package/dist/skills/openpond-cli/references/experiments-and-training.md +155 -10
  224. package/dist/skills/openpond-taskset-authoring/SKILL.md +5 -4
  225. package/dist/skills/openpond-taskset-authoring/artifact.json +7 -7
  226. package/dist/skills/openpond-taskset-authoring/references/failure-diagnosis.md +52 -1
  227. package/dist/web/assets/App-DHJVXTI2.js +54 -0
  228. package/dist/web/assets/App-DpFKLxuA.css +1 -0
  229. package/dist/web/assets/AppDialog-BurL61qE.js +1 -0
  230. package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +2 -0
  231. package/dist/web/assets/{AppToastContext-BB_2hRfw.js → AppToastContext-DZLErwj0.js} +1 -1
  232. package/dist/web/assets/AppsView-ttlr9ckQ.js +1 -0
  233. package/dist/web/assets/{AttachmentTypeIcon-DOAsVQjt.js → AttachmentTypeIcon-CpMSfHCK.js} +1 -1
  234. package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +1 -0
  235. package/dist/web/assets/{CartesianChart-DO76yfJb.js → CartesianChart-CEbM980A.js} +1 -1
  236. package/dist/web/assets/{ChatTimelineEntry-IKzZsHoI.js → ChatTimelineEntry-BITv20Ze.js} +1 -1
  237. package/dist/web/assets/{CollaborationTabs-DNoknVMD.js → CollaborationTabs-DrKJmJZK.js} +1 -1
  238. package/dist/web/assets/{CommandMenu-CBY2AJxV.js → CommandMenu-6oj8FUr6.js} +1 -1
  239. package/dist/web/assets/CommunityView-BzpIq1lD.js +1 -0
  240. package/dist/web/assets/ComposerAttachments-6en7m_ov.js +2 -0
  241. package/dist/web/assets/ComposerCreateImproveStrip-ChplO9YP.js +1 -0
  242. package/dist/web/assets/ConversationImportsSettings-DRHgc7j_.js +1 -0
  243. package/dist/web/assets/FilePagePreview-CW4J_1u7.js +2 -0
  244. package/dist/web/assets/GetStartedView-CaBk_mX6.js +1 -0
  245. package/dist/web/assets/GettingStartedDialog-EsH-8Diz.css +1 -0
  246. package/dist/web/assets/GettingStartedDialog-JtFLyU3F.js +1 -0
  247. package/dist/web/assets/{HostedModelLearningReview-B0rbIVvn.js → HostedModelLearningReview-hhcjDifK.js} +1 -1
  248. package/dist/web/assets/HostedModelLearningSettings-CY8198Y1.js +1 -0
  249. package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +1 -0
  250. package/dist/web/assets/LabSkillSidebar-HibUEEko.js +1 -0
  251. package/dist/web/assets/{LabsRoute-DOnw39du.js → LabsRoute-B61l1b8P.js} +8 -8
  252. package/dist/web/assets/MainChatThread-egKi0gLk.js +2 -0
  253. package/dist/web/assets/MainPane-2dj6Dg4l.js +95 -0
  254. package/dist/web/assets/{MainPane-CuBUBA9F.css → MainPane-BwHw3UYp.css} +1 -1
  255. package/dist/web/assets/NativeSetupTerminal-3eR9D_R3.css +1 -0
  256. package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +2 -0
  257. package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +1 -0
  258. package/dist/web/assets/NewProjectDialog-t9Imnb__.js +1 -0
  259. package/dist/web/assets/OutputsPage-CeGq_F1S.js +1 -0
  260. package/dist/web/assets/{PageChrome-BBnWAENV.js → PageChrome-VHME5V8j.js} +1 -1
  261. package/dist/web/assets/ProjectsPage-2TMZoEPB.js +1 -0
  262. package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +1 -0
  263. package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +1 -0
  264. package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +1 -0
  265. package/dist/web/assets/SettingsView-D2bu3tK_.js +5 -0
  266. package/dist/web/assets/TeamChatView-CN17AsgA.js +1 -0
  267. package/dist/web/assets/TerminalOverlay-DlhRpi-X.js +16 -0
  268. package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +1 -0
  269. package/dist/web/assets/{TrainingDraftPanel-HznyNCJ4.js → TrainingDraftPanel-BhhZPPuY.js} +1 -1
  270. package/dist/web/assets/{TrainingMetricWorkbench-BmzHLwIP.js → TrainingMetricWorkbench-DBy8F1xp.js} +1 -1
  271. package/dist/web/assets/{UsageSettingsSection-C3oZ1UEP.js → UsageSettingsSection-DTZslBeW.js} +2 -2
  272. package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +1 -0
  273. package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +11 -0
  274. package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +35 -0
  275. package/dist/web/assets/WorkspaceFileLocation-ChEeZffU.js +1 -0
  276. package/dist/web/assets/WorkspaceGitDialogs-D_RUXhTi.js +1 -0
  277. package/dist/web/assets/{WorkspaceMonacoEditor-DfsL1WIi.js → WorkspaceMonacoEditor-BJxaiDrj.js} +3 -3
  278. package/dist/web/assets/{WorkspacePresentationPreview-WuS_B45u.js → WorkspacePresentationPreview-A28Poeca.js} +1 -1
  279. package/dist/web/assets/{chat-resources-CItQ4mZD.js → chat-resources-3SvnVeKv.js} +1 -1
  280. package/dist/web/assets/{chevron-down-Bnma8EMP.js → chevron-down-dYn0pd4Q.js} +1 -1
  281. package/dist/web/assets/chevron-right-sFx2xRvT.js +1 -0
  282. package/dist/web/assets/{chunk-24N6A6SF-BUjzKvRC.js → chunk-BYNVSWIQ-DWh9SmdB.js} +1 -1
  283. package/dist/web/assets/{chunk-GAIDBPFY-BLuHpurI.js → chunk-ZFYI4P6C-BmsNtSkR.js} +1 -1
  284. package/dist/web/assets/{client-choice-storage-BuNdhYSV.js → client-choice-storage-DTTLbrYt.js} +1 -1
  285. package/dist/web/assets/{cloud-upload-DOftANif.js → cloud-upload-CRMPCFnq.js} +1 -1
  286. package/dist/web/assets/connected-app-mentions-D3wRZLwI.js +1 -0
  287. package/dist/web/assets/copy-DR4ielPn.js +1 -0
  288. package/dist/web/assets/{createLucideIcon-C4b2afqG.js → createLucideIcon-DmttVQ_a.js} +1 -1
  289. package/dist/web/assets/{cssMode-0Hn7tCrE.js → cssMode-d-2GuNvW.js} +1 -1
  290. package/dist/web/assets/external-link-B4rPiZEp.js +1 -0
  291. package/dist/web/assets/{folder-open-wJwCoIDs.js → folder-open-BrIUcUk_.js} +1 -1
  292. package/dist/web/assets/{folder-plus-DnTN6mcP.js → folder-plus-DwImGEt-.js} +1 -1
  293. package/dist/web/assets/{git-commit-horizontal-98y7PP6G.js → git-commit-horizontal-Ds1mkrlW.js} +1 -1
  294. package/dist/web/assets/{htmlMode-JO_QluNH.js → htmlMode-s15GR0Fn.js} +1 -1
  295. package/dist/web/assets/icons-CK5-nxVC.js +1 -0
  296. package/dist/web/assets/{image-C7HVlg3X.js → image-CY-sHbfQ.js} +1 -1
  297. package/dist/web/assets/{index-BsPUniZy.js → index-DYrLeSyY.js} +2 -2
  298. package/dist/web/assets/index-Dezj4Z2p.css +1 -0
  299. package/dist/web/assets/{info-BLWDShaz.js → info-aSvM8YlJ.js} +1 -1
  300. package/dist/web/assets/{jsonMode-BfTXJted.js → jsonMode-vos9H2hz.js} +1 -1
  301. package/dist/web/assets/loader-circle-cyf35w3i.js +1 -0
  302. package/dist/web/assets/{lspLanguageFeatures-68cAgnuv.js → lspLanguageFeatures-pQmEaoMt.js} +1 -1
  303. package/dist/web/assets/{maximize-2-DUWvLap6.js → maximize-2-DgF6ZVOM.js} +1 -1
  304. package/dist/web/assets/{monaco.contribution-_3aU1TTb.js → monaco.contribution-BPwsKvRB.js} +2 -2
  305. package/dist/web/assets/{monaco.contribution-h8U8HXFT.js → monaco.contribution-BbMpa0_-.js} +2 -2
  306. package/dist/web/assets/{monaco.contribution-CWeY6ia1.js → monaco.contribution-CJlccVX3.js} +2 -2
  307. package/dist/web/assets/{monaco.contribution-DOiiDDen.js → monaco.contribution-pWurLXbm.js} +2 -2
  308. package/dist/web/assets/{monitor-B6OuAu13.js → monitor-DlEV241C.js} +1 -1
  309. package/dist/web/assets/{paperclip-DSHxP9CY.js → paperclip-fnRZSIRc.js} +1 -1
  310. package/dist/web/assets/{pdf-RXlFwNte.js → pdf-CT3zVKCE.js} +1 -1
  311. package/dist/web/assets/play-wI_3FLr4.js +1 -0
  312. package/dist/web/assets/plus-DoJe4fLj.js +1 -0
  313. package/dist/web/assets/{presentation-C9WnPDVr.js → presentation-Bb8ecExR.js} +1 -1
  314. package/dist/web/assets/profile-agent-labels-Duh96b8x.js +1 -0
  315. package/dist/web/assets/{python-BQXo7wMt.js → python-DXA1xp0A.js} +1 -1
  316. package/dist/web/assets/{refresh-cw-NXOER_CD.js → refresh-cw-B53QjxMO.js} +1 -1
  317. package/dist/web/assets/{save-BxXc21N6.js → save-V1Q4Fcqa.js} +1 -1
  318. package/dist/web/assets/settings-lists-CtH1A57b.js +5 -0
  319. package/dist/web/assets/square-BqSK-hv9.js +1 -0
  320. package/dist/web/assets/square-terminal-Dmgkm5zY.js +1 -0
  321. package/dist/web/assets/submit-issue-command-DRgUboVW.js +3 -0
  322. package/dist/web/assets/{toggleHighContrast-Di1cRuQ4.js → toggleHighContrast-B-BD2K2Q.js} +1 -1
  323. package/dist/web/assets/{training-managed-adapter-81RrdT1k.js → training-managed-adapter-BXNwgd3P.js} +1 -1
  324. package/dist/web/assets/{training-model-data-CmVo80ZR.js → training-model-data-14942K_Z.js} +5 -5
  325. package/dist/web/assets/{tsMode-PxisJRYB.js → tsMode-DdgIcxK3.js} +1 -1
  326. package/dist/web/assets/ui-theme.generated-D-mc26qt.js +144 -0
  327. package/dist/web/assets/{upload-NXasN1wU.js → upload-82Y6RjLi.js} +1 -1
  328. package/dist/web/assets/{useAccountSettings-Dqqt1vUY.js → useAccountSettings-BgHXNpq_.js} +1 -1
  329. package/dist/web/assets/{useAgentInventory-BV4CUWzJ.js → useAgentInventory-B-LNn3up.js} +1 -1
  330. package/dist/web/assets/{useLocalAgentSchedules-Cc0M_qax.js → useLocalAgentSchedules-CsKv22Hs.js} +1 -1
  331. package/dist/web/assets/{useQuery-ByaRC9SK.js → useQuery-CPC2wsWm.js} +1 -1
  332. package/dist/web/assets/{wifi-off-aVJ3AvT_.js → wifi-off-DXOoDN9l.js} +1 -1
  333. package/dist/web/assets/{workers-u92Boudu.js → workers-Clf4hKt5.js} +1 -1
  334. package/dist/web/assets/x-IPhrr4ju.js +1 -0
  335. package/dist/web/assets/{yaml-BxQUS0ew.js → yaml-I1tf8Uxx.js} +1 -1
  336. package/dist/web/index.html +12 -3
  337. package/docs/command-reference.md +28 -2
  338. package/package.json +2 -1
  339. package/dist/chunks/app-server-evaluations-HAAYVEXB.js +0 -2
  340. package/dist/chunks/app-server-runtime-B6BAJA6L.js +0 -2
  341. package/dist/chunks/chunk-4N3UF3U5.js +0 -2
  342. package/dist/chunks/chunk-6DCXAXVD.js +0 -22
  343. package/dist/chunks/chunk-BLKTUFGB.js +0 -2
  344. package/dist/chunks/chunk-E3EKBPCB.js +0 -2
  345. package/dist/chunks/chunk-F5JDBDYL.js +0 -2
  346. package/dist/chunks/chunk-JEVA7YQL.js +0 -3
  347. package/dist/chunks/chunk-KC7I6E6W.js +0 -2
  348. package/dist/chunks/chunk-OJSK4NSW.js +0 -151
  349. package/dist/chunks/chunk-UBCLPZSQ.js +0 -4
  350. package/dist/chunks/chunk-UJBEWIR3.js +0 -8
  351. package/dist/chunks/chunk-V67IFV26.js +0 -86
  352. package/dist/chunks/chunk-VSUHJ46L.js +0 -18
  353. package/dist/chunks/chunk-X3WEQL3O.js +0 -2
  354. package/dist/chunks/chunk-XK7SPL63.js +0 -2
  355. package/dist/chunks/chunk-YR5ID2SS.js +0 -2
  356. package/dist/chunks/cli-WC45SI7E.js +0 -2
  357. package/dist/chunks/connected-app-executor-TZJB25UZ.js +0 -2
  358. package/dist/chunks/experiments-IWSCFDBB.js +0 -2
  359. package/dist/chunks/host-profile-evaluation-tools-EFB2YIK2.js +0 -2
  360. package/dist/chunks/host-profile-external-dataset-KSNREH3Q.js +0 -2
  361. package/dist/chunks/hosted-app-server-composition-VV545TYL.js +0 -2
  362. package/dist/chunks/hosted-experiment-improvement-NYLADI7S.js +0 -3
  363. package/dist/chunks/hosted-harness-runtime-Z54E5MD7.js +0 -2
  364. package/dist/chunks/hosted-profile-compiler-SW2RWTDZ.js +0 -2
  365. package/dist/chunks/hosted-profile-evaluation-preparation-ZAOGDQXO.js +0 -3
  366. package/dist/chunks/local-harness-improvement-runtime-KB4OP3SM.js +0 -2
  367. package/dist/chunks/local-harness-taskset-review-SUDEUGUU.js +0 -2
  368. package/dist/chunks/opchat-KSOJEL4W.js +0 -3
  369. package/dist/chunks/project-action-payload-SQ5BSQHY.js +0 -2
  370. package/dist/chunks/refiner-profile-service-UWI4NAZ3.js +0 -2
  371. package/dist/chunks/saved-work-QA46KCME.js +0 -2
  372. package/dist/chunks/src-E7NWAN5B.js +0 -420
  373. package/dist/chunks/standalone-experiment-turn-owner-SQJ5HXDZ.js +0 -2
  374. package/dist/chunks/store-learned-preference-migration-validation-KOCW5NOZ.js +0 -2
  375. package/dist/chunks/store-taskset-drafts-TA6X245D.js +0 -9
  376. package/dist/chunks/training-hosted-4R4QTSAN.js +0 -2
  377. package/dist/chunks/training-hosted-report-UQVK6FTG.js +0 -2
  378. package/dist/web/assets/App-Df7uYQGj.css +0 -1
  379. package/dist/web/assets/App-Yy3l2sdD.js +0 -56
  380. package/dist/web/assets/AppTerminalPanel-Dqr6VS3I.js +0 -2
  381. package/dist/web/assets/AppsView-27Fl_-49.js +0 -1
  382. package/dist/web/assets/BrowserSidebar-bnI3sSZO.js +0 -1
  383. package/dist/web/assets/CommunityView-CFKM7FTY.js +0 -1
  384. package/dist/web/assets/ComposerAttachments-BdjBddKf.js +0 -2
  385. package/dist/web/assets/ComposerCreateImproveStrip-ViJ5E0We.js +0 -1
  386. package/dist/web/assets/ConversationImportsSettings-xLl-7G9R.js +0 -1
  387. package/dist/web/assets/FilePagePreview-CTHuPzJt.js +0 -2
  388. package/dist/web/assets/GetStartedView-DvV_RMgM.js +0 -1
  389. package/dist/web/assets/GettingStartedDialog-B1jFmfgd.js +0 -1
  390. package/dist/web/assets/GettingStartedDialog-C73Bdcz2.css +0 -1
  391. package/dist/web/assets/HostedModelLearningSettings-DzAiutjq.js +0 -1
  392. package/dist/web/assets/LabModelVersionDetailPage-CF8FkRUY.js +0 -1
  393. package/dist/web/assets/LabSkillSidebar-gjbl9Nlv.js +0 -1
  394. package/dist/web/assets/MainChatThread-BUKup-JB.js +0 -2
  395. package/dist/web/assets/MainPane-BpE7AKXu.js +0 -92
  396. package/dist/web/assets/NativeSkillSidebar-Br5Lk6iU.js +0 -1
  397. package/dist/web/assets/NewProjectDialog-DyuKPOvF.js +0 -1
  398. package/dist/web/assets/OutputsPage-Dl63CVrw.js +0 -1
  399. package/dist/web/assets/ProjectsPage-BNF1TiyR.js +0 -1
  400. package/dist/web/assets/RightChatPanelStack-CxVAAbp-.js +0 -1
  401. package/dist/web/assets/RightSidebarHomePanel-D46ktZg-.js +0 -1
  402. package/dist/web/assets/ScheduledWorkPage-Cp0Hf-hs.js +0 -1
  403. package/dist/web/assets/SettingsView-BT57Q5Wx.js +0 -5
  404. package/dist/web/assets/TeamChatView-BmxTJ9E5.js +0 -1
  405. package/dist/web/assets/TerminalOverlay-D-Yq8av_.js +0 -16
  406. package/dist/web/assets/TrainingCreationPanel-CwfNPj_G.js +0 -1
  407. package/dist/web/assets/WorkSidebarPanel-myTA9tsh.js +0 -1
  408. package/dist/web/assets/WorkspaceDiffPanel-D0dzFgzW.js +0 -11
  409. package/dist/web/assets/WorkspaceEnvironmentMenu-AUzME1eX.js +0 -35
  410. package/dist/web/assets/WorkspaceFileLocation-Ai8Tz2Mz.js +0 -1
  411. package/dist/web/assets/WorkspaceGitDialogs-D-UCCckC.js +0 -1
  412. package/dist/web/assets/chevron-right-Cxv_xBz5.js +0 -1
  413. package/dist/web/assets/git-dialogs-C631EFyO.css +0 -1
  414. package/dist/web/assets/icons-kaq6k88m.js +0 -1
  415. package/dist/web/assets/index-DUMDOdB2.css +0 -1
  416. package/dist/web/assets/play-BPPQoqMl.js +0 -1
  417. package/dist/web/assets/plus-D18vYzHF.js +0 -1
  418. package/dist/web/assets/settings-lists-DMNPkGYk.js +0 -5
  419. package/dist/web/assets/square-Da8RuqW4.js +0 -1
  420. package/dist/web/assets/ui-theme.generated-R0MY_Jy0.js +0 -136
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{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
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{wn as r}from"./App-DHJVXTI2.js";import{N as i,V as a}from"./MainPane-2dj6Dg4l.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 +1 @@
1
- import{m as e}from"./index-BsPUniZy.js";import"./icons-kaq6k88m.js";import{Fn as t}from"./App-Yy3l2sdD.js";var n=e();function r({onSelect:e,view:r}){return(0,n.jsxs)(`nav`,{className:`collaboration-tabs`,"aria-label":`Collaboration`,children:[(0,n.jsx)(`button`,{"aria-current":r===`team`?`page`:void 0,className:r===`team`?`active`:``,onClick:()=>e(`team`),type:`button`,children:(0,n.jsx)(`span`,{children:`Team chat`})}),(0,n.jsxs)(`button`,{"aria-current":r===`community`?`page`:void 0,className:r===`community`?`active`:``,onClick:()=>e(`community`),type:`button`,children:[(0,n.jsx)(t,{size:15}),(0,n.jsx)(`span`,{children:`Communities`})]})]})}export{r as CollaborationTabs};
1
+ import{m as e}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{rn as t}from"./App-DHJVXTI2.js";var n=e();function r({onSelect:e,view:r}){return(0,n.jsxs)(`nav`,{className:`collaboration-tabs`,"aria-label":`Collaboration`,children:[(0,n.jsx)(`button`,{"aria-current":r===`team`?`page`:void 0,className:r===`team`?`active`:``,onClick:()=>e(`team`),type:`button`,children:(0,n.jsx)(`span`,{children:`Team chat`})}),(0,n.jsxs)(`button`,{"aria-current":r===`community`?`page`:void 0,className:r===`community`?`active`:``,onClick:()=>e(`community`),type:`button`,children:[(0,n.jsx)(t,{size:15}),(0,n.jsx)(`span`,{children:`Communities`})]})]})}export{r as CollaborationTabs};
@@ -1 +1 @@
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
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{h as r,m as i}from"./app-models-BviS9b7U.js";import"./icons-CK5-nxVC.js";import{E as a,Wt as o,Zt as s,dn as c,en as l,qt as u,sn as d,xn as f}from"./App-DHJVXTI2.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)(o,{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)(c,{size:15}):(0,m.jsx)(d,{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)(s,{size:15}):e.savedForLater?(0,m.jsx)(f,{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};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{o as r,r as i,t as a}from"./ComposerAttachments-6en7m_ov.js";import"./icons-CK5-nxVC.js";import{F as o,x as s}from"./training-model-data-14942K_Z.js";import{i as c,n as l,r as u,t as d}from"./wifi-off-DXOoDN9l.js";import{t as f}from"./paperclip-fnRZSIRc.js";import{t as p}from"./refresh-cw-B53QjxMO.js";import{t as m}from"./x-IPhrr4ju.js";import{r as h}from"./AppToastContext-DZLErwj0.js";import{Ht as g,Ut as _,Wt as v}from"./App-DHJVXTI2.js";import{Y as y,k as b,q as x}from"./MainPane-2dj6Dg4l.js";var S=e(t(),1),C=n(),w=2e4,T=10,E=12582912,D=new Set([`image/png`,`image/jpeg`,`image/webp`,`image/gif`]);function O(e){let[t,n]=(0,S.useState)(``),[o,s]=(0,S.useState)(0),[c,l]=(0,S.useState)([]),[u,d]=(0,S.useState)(null),[p,h]=(0,S.useState)(!1),[_,v]=(0,S.useState)([]),[x,O]=(0,S.useState)(0),[N,P]=(0,S.useState)(null),F=(0,S.useRef)(null),I=(0,S.useRef)(null),L=(0,S.useRef)(c);L.current=c;let R=(0,S.useMemo)(()=>k(t,o),[t,o]),z=R?`${R.start}:${R.end}:${R.query}`:null,B=R?.query??null,V=(0,S.useMemo)(()=>{if(!R)return[];let t=new Map;for(let n of[...e.members,..._])t.set(n.userId,n);let n=R.query.toLowerCase();return[...t.values()].filter(e=>`${e.handle??``} ${e.name??``}`.toLowerCase().includes(n)).slice(0,8)},[R,e.members,_]),H=!!(R&&z!==N&&V.length>0),U=!!(e.disabled||e.busy||p),W=!U&&(!!t.trim()||c.length>0);(0,S.useEffect)(()=>{if(B==null){v([]);return}let t=!0,n=window.setTimeout(()=>{e.onSearchMembers(B).then(e=>{t&&v(e)},()=>{t&&v([])})},150);return()=>{t=!1,window.clearTimeout(n)}},[B,e.onSearchMembers]),(0,S.useEffect)(()=>{O(0)},[z]),(0,S.useEffect)(()=>()=>M(L.current),[]);async function G(i){if(i?.preventDefault(),W){d(null),h(!0);try{let i=await Promise.all(c.map(r));if(!await e.onSend({body:t,mentionUserIds:A(t,e.members),attachments:i,replyToMessageId:e.replyTo?.id??null}))return;M(c),n(``),s(0),l([]),e.onCancelReply()}catch(e){d(e instanceof Error?e.message:String(e))}finally{h(!1)}}}function K(e){if(H){if(e.key===`ArrowDown`){e.preventDefault(),O(e=>(e+1)%V.length);return}if(e.key===`ArrowUp`){e.preventDefault(),O(e=>(e-1+V.length)%V.length);return}if(e.key===`Enter`||e.key===`Tab`){e.preventDefault(),X(V[x]??V[0]);return}if(e.key===`Escape`){e.preventDefault(),P(z);return}}e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),G())}function q(e){if(!e)return;d(null);let t=Math.max(0,T-c.length);if(t===0){d(`You can attach up to ${T} images.`),Y();return}let n=[...e],r=n.slice(0,t),a=r.find(e=>!D.has(e.type)),o=r.find(e=>e.size<=0||e.size>E);if(a){d(`${a.name} is not a supported image type.`),Y();return}if(o){d(`${o.name} must be smaller than 12 MB.`),Y();return}let s=r.map(e=>({id:i(),file:e,name:e.name,mediaType:e.type,sizeBytes:e.size,kind:`image`,previewUrl:URL.createObjectURL(e)}));l(e=>[...e,...s]),n.length>t&&d(`Only ${T} images can be attached to one message.`),Y()}function J(e){l(t=>{let n=t.find(t=>t.id===e);return n?.previewUrl&&URL.revokeObjectURL(n.previewUrl),t.filter(t=>t.id!==e)})}function Y(){F.current&&(F.current.value=``)}function X(e){if(!R)return;let r=`@${j(e)} `,i=`${t.slice(0,R.start)}${r}${t.slice(R.end)}`,a=R.start+r.length;n(i),s(a),P(null),window.requestAnimationFrame(()=>I.current?.focusAtPromptIndex(a))}return(0,C.jsxs)(`form`,{className:`composer dock community-composer${c.length>0?` has-attachments`:``}${u?` has-attachment-error`:``}`,onSubmit:G,children:[e.replyTo?(0,C.jsxs)(`div`,{className:`community-composer-reply`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:`Replying to`}),e.replyTo.body.slice(0,100)||`message`]}),(0,C.jsx)(`button`,{type:`button`,"aria-label":`Cancel reply`,onClick:e.onCancelReply,children:(0,C.jsx)(m,{size:13})})]}):null,H?(0,C.jsx)(`div`,{className:`community-mention-menu`,role:`listbox`,"aria-label":`Community members`,children:V.map((e,t)=>(0,C.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===x,onMouseDown:e=>e.preventDefault(),onClick:()=>X(e),children:[(0,C.jsx)(`strong`,{children:e.name??e.handle??`Community member`}),e.handle?(0,C.jsxs)(`small`,{children:[`@`,e.handle]}):null]},e.userId))}):null,(0,C.jsxs)(`div`,{className:`composer-input-shell`,children:[c.length>0?(0,C.jsx)(`div`,{className:`composer-attachments`,"aria-label":`Selected attachments`,children:c.map(e=>(0,C.jsx)(a,{attachment:e,onRemove:()=>J(e.id)},e.id))}):null,u?(0,C.jsx)(g,{error:u}):null,(0,C.jsx)(`div`,{className:`composer-textarea-frame`,onClick:e=>{e.target===e.currentTarget&&I.current?.focusAtPromptIndex(o)},children:(0,C.jsx)(b,{ref:I,disabled:U,onCursorChange:s,onKeyDown:K,onPromptChange:(e,t)=>{let r=e.slice(0,w);n(r),s(Math.min(t,r.length))},onTokenPositionChange:()=>void 0,placeholder:e.disabled?`Accept the community rules to post`:`Message community`,prompt:t,token:null})}),(0,C.jsxs)(`div`,{className:`composer-primary-controls team-chat-composer-controls`,children:[(0,C.jsx)(`input`,{ref:F,className:`composer-file-input`,hidden:!0,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,onChange:e=>q(e.currentTarget.files)}),(0,C.jsx)(`button`,{type:`button`,className:`composer-icon`,"aria-label":`Attach images`,disabled:U||c.length>=T,onClick:()=>F.current?.click(),children:(0,C.jsx)(f,{size:17})}),(0,C.jsx)(`div`,{className:`composer-spacer`}),(0,C.jsx)(`button`,{type:`submit`,className:`send-button`,"aria-label":`Send message`,disabled:!W,children:(0,C.jsx)(y,{size:17})})]})]})]})}function k(e,t=e.length){let n=Math.max(0,Math.min(t,e.length)),r=/(?:^|\s)@([\w-]*)$/.exec(e.slice(0,n));return!r||r.index==null?null:{start:r.index+r[0].indexOf(`@`),end:n,query:r[1]??``}}function A(e,t){let n=new Set([...e.matchAll(/(?:^|\s)@([\w-]+)/g)].map(e=>e[1]?.toLowerCase()));return t.filter(e=>n.has(j(e).toLowerCase())).map(e=>e.userId)}function j(e){return e.handle??e.name?.replace(/[^\w-]/g,``)??e.userId}function M(e){for(let t of e)t.previewUrl&&URL.revokeObjectURL(t.previewUrl)}function N(e){let[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(e.message.body),a=e.message.refs.find(e=>e.refType===`message_reply`),c=a?e.messagesById.get(a.refId)??null:null,l=c?.authorUserId?e.membersById.get(c.authorUserId)??null:null;return(0,C.jsxs)(`article`,{className:`community-message${e.own?` own`:``}`,id:`community-message-${e.message.id}`,children:[(0,C.jsx)(`div`,{className:`community-avatar`,children:P(e.author?.name??e.author?.handle??`?`)}),(0,C.jsxs)(`div`,{className:`community-message-content`,children:[(0,C.jsxs)(`header`,{children:[(0,C.jsx)(`strong`,{children:e.author?.name??e.author?.handle??`Community member`}),(0,C.jsx)(`time`,{dateTime:e.message.createdAt,children:F(e.message.createdAt)}),e.message.editedAt?(0,C.jsx)(`span`,{children:`edited`}):null,e.message.deletedAt?null:(0,C.jsxs)(`div`,{className:`community-message-actions`,children:[(0,C.jsx)(`button`,{type:`button`,"aria-label":`Reply`,onClick:()=>e.onReply(e.message),children:(0,C.jsx)(x,{size:13})}),e.own?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Edit`,onClick:()=>n(!0),children:(0,C.jsx)(v,{size:13})}):null,e.own?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Delete`,onClick:()=>void e.onDelete(e.message.id),children:(0,C.jsx)(o,{size:13})}):null]})]}),a?(0,C.jsxs)(`button`,{type:`button`,className:`community-reply-quote`,onClick:()=>document.getElementById(`community-message-${a.refId}`)?.scrollIntoView({behavior:`smooth`,block:`center`}),children:[(0,C.jsx)(`strong`,{children:l?.name??`Community member`}),(0,C.jsx)(`span`,{children:c?.deletedAt?`Message deleted`:c?.body??String(a.preview.body??`Earlier message`)})]}):null,t?(0,C.jsxs)(`form`,{className:`community-message-edit`,onSubmit:t=>{t.preventDefault(),e.onEdit(e.message.id,r).then(e=>{e&&n(!1)})},children:[(0,C.jsx)(`textarea`,{autoFocus:!0,value:r,onChange:e=>i(e.currentTarget.value)}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),(0,C.jsx)(`button`,{type:`submit`,disabled:!r.trim(),children:`Save`})]})]}):e.message.deletedAt?(0,C.jsx)(`div`,{className:`community-message-deleted`,children:`Message deleted`}):(0,C.jsx)(s,{content:e.message.body}),!e.message.deletedAt&&e.message.attachments.length>0?(0,C.jsx)(`div`,{className:`community-message-attachments`,children:e.message.attachments.map(t=>e.attachmentsAccessible?(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void e.onDownloadAttachment(t.id),children:[(0,C.jsx)(`span`,{children:t.name}),(0,C.jsx)(`small`,{children:I(t.sizeBytes)})]},t.id):(0,C.jsxs)(`div`,{className:`community-attachment-placeholder`,children:[(0,C.jsx)(`span`,{children:t.name}),(0,C.jsxs)(`small`,{children:[`Join to view · `,I(t.sizeBytes)]})]},t.id))}):null]})]})}function P(e){return e.split(/\s+/).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)||`?`}function F(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function I(e){return e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function L(e){let[t,n]=(0,S.useState)(!1),r=(0,S.useRef)(null),i=(0,S.useRef)(e.onClose);(0,S.useEffect)(()=>n(!1),[e.rules.id]),(0,S.useEffect)(()=>{i.current=e.onClose},[e.onClose]),(0,S.useEffect)(()=>{let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=r.current,n=()=>[...t?.querySelectorAll(`button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])`)??[]];n()[0]?.focus();let a=e=>{if(e.key===`Escape`){e.preventDefault(),i.current();return}if(e.key!==`Tab`)return;let r=n();if(r.length===0){e.preventDefault(),t?.focus();return}let a=r[0],o=r.at(-1);e.shiftKey&&document.activeElement===a?(e.preventDefault(),o.focus()):!e.shiftKey&&document.activeElement===o&&(e.preventDefault(),a.focus())};return document.addEventListener(`keydown`,a),()=>{document.removeEventListener(`keydown`,a),e?.focus()}},[]);let a=e.mode!==`review`;return(0,C.jsx)(`div`,{className:`community-dialog-backdrop`,role:`presentation`,onMouseDown:e.onClose,children:(0,C.jsxs)(`section`,{ref:r,className:`community-rules-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`community-rules-title`,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),children:[(0,C.jsxs)(`header`,{children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`small`,{children:[`Community rules · version `,e.rules.version]}),(0,C.jsx)(`h2`,{id:`community-rules-title`,children:e.rules.title})]}),(0,C.jsx)(`button`,{type:`button`,"aria-label":`Close rules`,onClick:e.onClose,children:(0,C.jsx)(m,{size:16})})]}),(0,C.jsx)(`div`,{className:`community-rules-body`,children:(0,C.jsx)(s,{content:e.rules.bodyMarkdown})}),(0,C.jsxs)(`footer`,{children:[a?(0,C.jsxs)(`label`,{className:`community-rules-acceptance`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.currentTarget.checked)}),(0,C.jsx)(`span`,{children:`I have read and agree to follow these rules.`})]}):(0,C.jsx)(`span`,{}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{type:`button`,className:`secondary`,onClick:e.onClose,children:`Cancel`}),a?(0,C.jsx)(`button`,{type:`button`,disabled:!t||e.busy,onClick:()=>void e.onAccept().then(t=>{t&&e.onClose()}),children:e.busy?`Saving…`:e.mode===`join`?`Agree and join`:`Accept updated rules`}):null]})]})]})})}function R({communities:e,chat:t,currentUserId:n}){h(e.discoveryError),h(t.lostMembership?`Your membership changed. Refresh the community before continuing.`:null),h(e.previewError),h(e.membershipError?.message),h(t.channelsError,{prefix:`Channels`}),h(t.messagesError,{prefix:`Messages`}),h(t.actionError);let[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null),s=(0,S.useRef)(null),c=e.preview,u=c?.membership?.status===`active`,f=!!c?.capabilities.requiresRulesAcceptance,m=(0,S.useMemo)(()=>new Map(t.members.map(e=>[e.userId,e])),[t.members]),g=(0,S.useMemo)(()=>new Map(t.messages.map(e=>[e.id,e])),[t.messages]),v=t.messages.at(-1)?.sequence??0;if((0,S.useEffect)(()=>{let e=s.current;e&&(e.scrollTop=e.scrollHeight)},[t.selectedChannelId,v]),(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)(_,{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)(_,{size:14}),` `,c.memberCount.toLocaleString()]}),y?(0,C.jsxs)(`button`,{type:`button`,className:`secondary`,onClick:()=>i(`review`),children:[(0,C.jsx)(l,{size:14}),` Rules`]}):null,u?(0,C.jsx)(z,{mode:c.membership?.notificationMode??`mentions`,busy:e.membershipBusy,onMode:e.updateNotifications,onLeave:e.leave}):null]})]}),(0,C.jsxs)(`div`,{className:`community-chat-main conversation-surface-main`,children:[(0,C.jsxs)(`div`,{className:`community-chat-notices`,children:[u?f?(0,C.jsxs)(`div`,{className:`community-preview-banner warning`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`strong`,{children:`The rules have changed`}),(0,C.jsx)(`span`,{children:`Accept the current rules to continue reading live updates and posting.`})]}),(0,C.jsx)(`button`,{type:`button`,disabled:!y||e.membershipBusy,onClick:()=>i(`reaccept`),children:`Review updated rules`})]}):null:(0,C.jsxs)(`div`,{className:`community-preview-banner`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`strong`,{children:[`Previewing `,c.displayName]}),(0,C.jsx)(`span`,{children:`Read the public conversation, then accept the rules to join and post.`})]}),(0,C.jsx)(`button`,{type:`button`,disabled:!y||e.membershipBusy,onClick:()=>i(`join`),children:`Join community`})]}),t.realtimeError&&u&&!f?(0,C.jsxs)(`div`,{className:`community-realtime-state`,children:[(0,C.jsx)(d,{size:14}),(0,C.jsx)(`span`,{children:`Live updates are reconnecting. Loaded messages are still available.`})]}):null,t.channelsError?(0,C.jsx)(`button`,{type:`button`,className:`community-state`,onClick:()=>void t.loadChannels(),children:`Retry loading channels`}):null]}),(0,C.jsxs)(`div`,{className:`community-message-pane conversation-message-scroll`,ref:s,role:`log`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-busy":t.messagesLoading,"aria-label":t.selectedChannel?`${c.displayName}, ${t.selectedChannel.displayName}`:c.displayName,tabIndex:0,children:[t.hasMoreBefore?(0,C.jsx)(`button`,{type:`button`,className:`community-load-older`,disabled:t.olderMessagesLoading,onClick:()=>void t.loadOlder(),children:t.olderMessagesLoading?`Loading…`:`Load earlier messages`}):null,t.messagesLoading&&t.messages.length===0?(0,C.jsx)(`div`,{className:`community-message-state`,children:`Loading messages…`}):null,t.messagesError?(0,C.jsxs)(`div`,{className:`community-message-state`,children:[`Messages are unavailable. `,(0,C.jsx)(`button`,{type:`button`,onClick:()=>void t.loadMessages(),children:`Retry`})]}):null,!t.messagesLoading&&!t.messagesError&&t.messages.length===0?(0,C.jsx)(`div`,{className:`community-message-state`,children:`No messages in this channel yet.`}):null,t.messages.map(e=>(0,C.jsx)(N,{message:e,author:e.authorUserId?m.get(e.authorUserId)??null:null,own:e.authorUserId===n,attachmentsAccessible:!t.previewMode,membersById:m,messagesById:g,onReply:o,onEdit:t.editMessage,onDelete:t.deleteMessage,onDownloadAttachment:t.downloadAttachment},e.id))]}),u?(0,C.jsxs)(`div`,{className:`community-composer-wrap conversation-composer-shell`,children:[t.failedSend?(0,C.jsxs)(`div`,{className:`community-failed-send`,children:[(0,C.jsx)(`span`,{children:`Message not sent.`}),(0,C.jsx)(`button`,{type:`button`,disabled:t.sending,onClick:()=>void t.retrySend(),children:`Retry`}),(0,C.jsx)(`button`,{type:`button`,onClick:t.dismissFailedSend,children:`Dismiss`})]}):null,(0,C.jsx)(O,{members:t.members,replyTo:a,busy:t.sending,disabled:f||t.lostMembership||!t.selectedChannel||t.selectedChannel.postingPolicy===`admins`&&c.membership?.role===`member`,onCancelReply:()=>o(null),onSearchMembers:t.searchMembers,onSend:t.sendMessage})]}):null]}),r&&y?(0,C.jsx)(L,{rules:y,mode:r,busy:e.membershipBusy,onAccept:r===`join`?e.join:e.acceptRules,onClose:()=>i(null)}):null]})}function z(e){let[t,n]=(0,S.useState)(!1);return(0,C.jsxs)(`div`,{className:`community-membership-menu`,children:[(0,C.jsxs)(`button`,{type:`button`,className:`secondary`,"aria-expanded":t,onClick:()=>n(e=>!e),children:[e.mode===`none`?(0,C.jsx)(u,{size:14}):(0,C.jsx)(c,{size:14}),` Joined`]}),t?(0,C.jsxs)(`div`,{className:`community-membership-popover`,children:[(0,C.jsx)(`strong`,{children:`Notifications`}),[`mentions`,`all`,`none`].map(t=>(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`radio`,name:`community-notifications`,checked:e.mode===t,disabled:e.busy,onChange:()=>void e.onMode(t)}),` `,t===`mentions`?`Mentions`:t===`all`?`All messages`:`Nothing`]},t)),(0,C.jsx)(`button`,{type:`button`,className:`danger`,disabled:e.busy,onClick:()=>{window.confirm(`Leave this community? You can join again later by accepting the current rules.`)&&e.onLeave().then(e=>{e&&n(!1)})},children:`Leave community`})]}):null]})}function B({name:e,imageUrl:t}){return t?(0,C.jsx)(`img`,{className:`community-icon`,src:t,alt:``}):(0,C.jsx)(`span`,{className:`community-icon fallback`,children:e.slice(0,2).toUpperCase()})}export{R as CommunityView};
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{T as r}from"./training-model-data-14942K_Z.js";import{t as i}from"./x-IPhrr4ju.js";import{Xn as a}from"./App-DHJVXTI2.js";import{n as o,r as s,t as c}from"./AttachmentTypeIcon-CpMSfHCK.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,a]=(0,u.useState)(!1),f=(0,u.useRef)(null),p=(0,u.useCallback)(()=>{a(!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:()=>a(!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)(i,{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<=a.maxTextChars?e:`${e.slice(0,Math.max(0,a.maxTextChars-28))}
2
+ [attachment text truncated]`}export{y as a,m as i,_ as n,v as o,g as r,h as t};
@@ -0,0 +1 @@
1
+ import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{g as n,m as r}from"./index-DYrLeSyY.js";import{n as i}from"./create-pipeline-CyUZrbbO.js";import"./icons-CK5-nxVC.js";import{I as a}from"./training-model-data-14942K_Z.js";import{t as o}from"./loader-circle-cyf35w3i.js";import{t as s}from"./play-wI_3FLr4.js";import{t as c}from"./refresh-cw-B53QjxMO.js";import{t as l}from"./x-IPhrr4ju.js";import{cn as u,fn as d,mn as f,nn as p}from"./App-DHJVXTI2.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)(d,{size:15}):D.state===`awaiting_questions`?(0,g.jsx)(p,{size:15}):C(D.state)?(0,g.jsx)(o,{className:`composer-create-spin`,size:15}):(0,g.jsx)(u,{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)(u,{size:13}),(0,g.jsx)(`span`,{children:m===`revise`?`Saving`:`Save revision`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>n(!1),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:`Close`})]})]})]}):(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`approve`,()=>e.onApprove?e.onApprove(A):Promise.resolve()),children:[(0,g.jsx)(f,{size:13}),(0,g.jsx)(`span`,{children:m===`approve`?`Confirming`:`Confirm plan`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>n(!0),children:[(0,g.jsx)(u,{size:13}),(0,g.jsx)(`span`,{children:`Edit plan`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`cancel`,()=>e.onCancel?e.onCancel(A):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`cancel`?`Cancelling`:`Cancel`})]})]})]}):D.state===`paused`?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:`This work is paused. Resume it when you are ready to continue.`}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`resume`,()=>e.onResume?e.onResume(A):Promise.resolve()),children:[(0,g.jsx)(s,{size:13}),(0,g.jsx)(`span`,{children:m===`resume`?`Resuming`:`Resume`})]})]}):D.state===`awaiting_promotion`&&M?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:E(D,M.id)}),(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m||!T(D,M.id),onClick:()=>void P(`apply-candidate`,()=>e.onApplyCandidate?e.onApplyCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(f,{size:13}),(0,g.jsx)(`span`,{children:m===`apply-candidate`?`Applying`:`Apply update`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reject-candidate`,()=>e.onRejectCandidate?e.onRejectCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`reject-candidate`?`Keeping current version`:`Keep current version`})]})]})]}):D.state===`pull_request_open`&&M&&N?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:D.target.kind===`agent`?`An Agent update review is open. Finish or close it, then refresh its status.`:`An external review is open. Merge or close it, then refresh its status.`}),(0,g.jsxs)(`div`,{className:`composer-create-actions`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reconcile-pr`,()=>e.onReconcilePullRequest?e.onReconcilePullRequest(A,M.id):Promise.resolve()),children:[(0,g.jsx)(c,{size:13}),(0,g.jsx)(`span`,{children:m===`reconcile-pr`?`Checking`:`Refresh review`})]}),(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reject-candidate`,()=>e.onRejectCandidate?e.onRejectCandidate(A,M.id):Promise.resolve()),children:[(0,g.jsx)(l,{size:13}),(0,g.jsx)(`span`,{children:m===`reject-candidate`?`Closing`:`Close review`})]})]})]}):D.state===`blocked`||D.state===`failed`||D.state===`cancelled`?(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:D.blockedReason??`This work stopped before it was ready.`}),D.state===`blocked`&&M?.git?.worktreePath&&[`draft`,`checking`].includes(M.status)?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`resume`,()=>e.onResume?e.onResume(A):Promise.resolve()),children:[(0,g.jsx)(s,{size:13}),(0,g.jsx)(`span`,{children:m===`resume`?`Continuing`:`Continue update`})]}):D.state===`blocked`&&M?.git?.pullRequest?.state===`merged`?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`reconcile-pr`,()=>e.onReconcilePullRequest?e.onReconcilePullRequest(A,M.id):Promise.resolve()),children:[(0,g.jsx)(c,{size:13}),(0,g.jsx)(`span`,{children:m===`reconcile-pr`?`Checking`:`Re-run verification`})]}):null]}):D.state===`released`||D.state===`rejected`||D.state===`ready_local`||D.state===`ready`||D.state===`published_hosted`?(0,g.jsxs)(`div`,{className:`composer-create-status-body composer-create-status-body-reveals`,children:[(0,g.jsx)(`p`,{children:D.state===`released`?`The Agent update is saved and its Evals passed.`:D.state===`rejected`?`The Agent update was not applied.`:D.state===`published_hosted`?`Published to the hosted Profile.`:`The Agent and its actions are ready to use.`}),(0,g.jsx)(`div`,{className:`composer-create-hover-details`,children:(0,g.jsx)(y,{run:D})})]}):(0,g.jsxs)(`div`,{className:`composer-create-status-body`,children:[(0,g.jsx)(`p`,{children:x(D)}),(0,g.jsx)(y,{run:D}),D.executionPolicy.pauseAllowed&&e.onPause?(0,g.jsxs)(`button`,{type:`button`,disabled:!!m,onClick:()=>void P(`pause`,()=>e.onPause?.(A)??Promise.resolve()),children:[(0,g.jsx)(a,{size:13}),(0,g.jsx)(`span`,{children:m===`pause`?`Pausing`:`Pause`})]}):null]})]})}function v(e){return e.questions.find(e=>e.status===`pending`&&e.required)??e.questions.find(e=>e.status===`pending`)??null}function y({run:e}){let t=e.plan,n=e.target.kind===`agent`,r=n?null:e.sourceRefs[0]??t?.sourcePlan[0]?.path??null,a=e.checkRefs.length||t?.checks.length||0,o=n?0:t?.requirements.length??0,s=n?[]:[...e.sourceRefs,...e.checkRefs].slice(0,4),c=i(t?.metadata);return!r&&a===0&&o===0&&s.length===0&&!c?null:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`composer-create-facts`,children:[c?(0,g.jsx)(`span`,{title:c.detail,children:c.label}):null,r?(0,g.jsx)(`span`,{title:r,children:r}):null,a?(0,g.jsx)(`span`,{children:n?`${a} Evals`:e.checkRefs.length?`${e.checkRefs.length} check refs`:`${a} checks`}):null,o?(0,g.jsxs)(`span`,{children:[o,` setup rows`]}):null]}),s.length?(0,g.jsx)(`ul`,{className:`composer-create-refs`,"aria-label":`Source and check refs`,children:s.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(`code`,{title:e,children:e})},e))}):null]})}function b(e){let t=e.target.kind===`agent`;return e.state===`awaiting_questions`?`Question`:e.state===`awaiting_plan_approval`?`Plan`:e.state===`applying_source`?t?`Saving Agent`:`Applying source`:e.state===`running_checks`?`Running Evals`:e.state===`evaluating`?t?`Checking Agent`:`Evaluating`:e.state===`awaiting_promotion`?t?`Update ready`:`Candidate ready`:e.state===`opening_pull_request`?`Opening review`:e.state===`pull_request_open`?`Review open`:e.state===`reconciling_release`?t?`Applying update`:`Merging change`:e.state===`released`?t?`Agent updated`:`Released`:e.state===`rejected`?t?`Current Agent kept`:`Rejected`:e.state===`paused`?`Paused`:e.state===`ready`||e.state===`ready_local`?`Ready`:e.state===`published_hosted`?`Published`:e.state===`cancelled`?`Cancelled`:e.state===`blocked`?`Blocked`:e.state===`failed`?`Failed`:e.operation===`improve`?`Improve`:`Create`}function x(e){let t=e.state,n=e.target.kind===`agent`;return t===`applying_source`?n?`Saving the approved Agent plan.`:`Applying the approved source changes.`:t===`running_checks`?n?`Running Evals against the Agent.`:`Running checks against the candidate.`:t===`evaluating`?n?`Checking the Agent's behavior.`:`Evaluating the candidate against its Evals.`:t===`opening_pull_request`?n?`Preparing the Agent update review.`:`Opening the candidate review.`:t===`reconciling_release`?`Applying the change and verifying the active Profile.`:t===`pushing_hosted`?`Pushing the Profile source.`:t===`running_hosted_checks`?n?`Running hosted Evals.`:`Running hosted checks.`:`Preparing the work.`}function S(e){return[`released`,`ready`,`ready_local`,`published_hosted`].includes(e)?`success`:[`rejected`,`blocked`,`failed`,`cancelled`].includes(e)?`danger`:[`awaiting_questions`,`awaiting_plan_approval`,`awaiting_promotion`,`pull_request_open`,`paused`].includes(e)?`warning`:`info`}function C(e){return[`planning`,`applying_source`,`running_checks`,`evaluating`,`opening_pull_request`,`reconciling_release`,`pushing_hosted`,`running_hosted_checks`].includes(e)}function w(e){return[...e.candidates].reverse().find(e=>e.target.kind===`agent`)??null}function T(e,t){let n=e.evaluationReceipts.filter(e=>e.candidateId===t&&e.subject===`candidate`);return n.length>0&&n.every(e=>e.status===`passed`&&e.publishGate!==`failed`)}function E(e,t){let n=e.evaluationReceipts.find(e=>e.candidateId===t&&e.subject===`active`),r=e.evaluationReceipts.find(e=>e.candidateId===t&&e.subject===`candidate`),i=e=>e?.summaryCounts?`${e.summaryCounts.passed}/${e.summaryCounts.total}`:e?.status??`not run`;return e.target.kind===`agent`?`Current Agent: ${i(n)} Evals passed. Updated Agent: ${i(r)} Evals passed.`:`Base Evals: ${i(n)} passed. Candidate Evals: ${i(r)} passed.`}export{m as n,_ as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{n as r}from"./api-client-Dgz-fOMl.js";import{t as i}from"./NativeSetupTerminal-CNHTByLo.js";import{Ft as a,Ht as o}from"./App-DHJVXTI2.js";import{n as s,r as c,t as l}from"./useAgentInventory-B-LNn3up.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)(o,{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:()=>a({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 o=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:o?.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":`${o?.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:o?.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:()=>a({kind:`view`,view:`apps`}),children:`Choose conversations in Connections`}),e.state===`disconnected`?(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(`reconnect`,e.id),children:`Reconnect`}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(e.state===`paused`?`resume`:`pause`,e.id),children:e.state===`paused`?`Resume source`:`Pause source`}),(0,d.jsx)(`button`,{className:`settings-secondary`,type:`button`,disabled:n,onClick:()=>r(`disconnect`,e.id),children:`Disconnect`})]})]})]})}export{h as ConversationImportsSettings};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/aiden0z-pptx-renderer.es-Bo43EjzT.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/jszip.min-BWcKrrYP.js","assets/pdf-CT3zVKCE.js","assets/index-DYrLeSyY.js","assets/index-Dezj4Z2p.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-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{W as i,cn as a}from"./App-DHJVXTI2.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 a=n.current;if(!a||!e.content)return;let o=new AbortController,u=document.createElement(`div`);a.replaceChildren(u);let d=[];f(!1),m(!1);let p=()=>{let e=u.offsetWidth;if(!e)return;let n=u.scrollHeight,r=t?a.parentElement?.clientHeight??0:0,i=t&&r&&n?Math.min(a.clientWidth/e,r/n):a.clientWidth/e;u.style.zoom=String(i)},h=new ResizeObserver(p);h.observe(a),t&&a.parentElement&&h.observe(a.parentElement);let g=async()=>{let n=Uint8Array.from(atob(e.content),e=>e.charCodeAt(0));if(i(e)){let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await r(async()=>{let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await import(`./aiden0z-pptx-renderer.es-Bo43EjzT.js`);return{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}},__vite__mapDeps([0,1,2]));if(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-CT3zVKCE.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)(a,{size:28}):p?`Preview unavailable. Download the original document to open it.`:`Loading document…`}),(0,u.jsx)(`div`,{ref:n,className:`file-page-preview-content ${d&&!p?`ready`:``}`})]})}export{d as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t,d as n,f as r,g as i,h as a,i as o,m as s,o as c,r as l,u}from"./index-DYrLeSyY.js";import{a as d,n as f}from"./client-choice-storage-DTTLbrYt.js";import"./icons-CK5-nxVC.js";import{H as p}from"./training-model-data-14942K_Z.js";import{t as m}from"./play-wI_3FLr4.js";import{t as h}from"./x-IPhrr4ju.js";import{t as g}from"./AppDialog-BurL61qE.js";import{Sn as _}from"./App-DHJVXTI2.js";var v=e(i(),1),ee=a(),y=s();function te({badge:e,onPlay:t,titleElement:n=`h3`,video:r}){let[i,a]=(0,v.useState)(!1),o=(0,v.useRef)(null),s=n,c=`${r.id}-title`;function l(){if(t){t();return}(0,ee.flushSync)(()=>a(!0));let e=o.current;e&&(e.load(),e.play().catch(()=>void 0))}return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`article`,{className:`get-started-course-card`,"aria-labelledby":c,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Play ${r.title}`,className:`get-started-course-open`,onClick:l,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-course-media`,children:[(0,y.jsx)(`img`,{alt:``,className:`get-started-course-poster`,decoding:`async`,src:r.posterUrl}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,"aria-hidden":`true`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),e?(0,y.jsx)(`span`,{className:`get-started-course-badge`,"aria-hidden":`true`,children:e}):null]}),(0,y.jsxs)(`div`,{className:`get-started-course-copy`,children:[(0,y.jsx)(s,{id:c,children:r.title}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,"aria-label":`${r.title} details`,children:[(0,y.jsx)(`span`,{children:r.eyebrow}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:r.duration})]}),r.description?(0,y.jsx)(`p`,{children:r.description}):null]})]}),i&&!t?(0,y.jsx)(b,{onClose:()=>a(!1),video:r,videoRef:o}):null]})}function b({autoAdvance:e=!1,contained:t=!1,inertExclusionSelector:n,navigation:r,onEnded:i,onClose:a,onPause:o,onTimeUpdate:s,video:c,videoRef:l}){return(0,y.jsxs)(g,{ariaLabel:`${c.title} player`,backdropClassName:`get-started-course-player-backdrop`,className:`get-started-course-player`,contained:t,inertExclusionSelector:n,onClose:a,children:[(0,y.jsxs)(`header`,{className:`get-started-course-player-header`,children:[(0,y.jsxs)(`div`,{className:`get-started-course-player-copy`,children:[(0,y.jsx)(`strong`,{children:c.title}),(0,y.jsxs)(`span`,{children:[r?`Lesson ${r.currentIndex+1} of ${r.total}`:c.eyebrow,` · `,c.duration]})]}),(0,y.jsxs)(`div`,{className:`get-started-course-player-actions`,children:[r?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`button`,{"aria-label":`Previous lesson`,disabled:!r.onPrevious,onClick:r.onPrevious,title:`Previous lesson`,type:`button`,children:(0,y.jsx)(_,{size:17})}),(0,y.jsx)(`button`,{"aria-label":`Next lesson`,disabled:!r.onNext,onClick:r.onNext,title:`Next lesson`,type:`button`,children:(0,y.jsx)(p,{size:17})})]}):null,(0,y.jsx)(`button`,{"aria-label":`Close video player`,"data-autofocus":!0,onClick:a,title:`Close`,type:`button`,children:(0,y.jsx)(h,{size:18})})]})]}),(0,y.jsx)(`div`,{className:`get-started-course-player-body`,children:(0,y.jsx)(`div`,{className:`get-started-course-player-media`,children:(0,y.jsx)(`div`,{className:`get-started-course-player-stage`,children:(0,y.jsx)(`video`,{"aria-label":`${c.title} video`,className:`get-started-course-player-video`,controls:!0,"data-auto-advance":e?`true`:void 0,onEnded:e=>i?.(e.currentTarget),onPause:e=>o?.(e.currentTarget),onTimeUpdate:e=>s?.(e.currentTarget),playsInline:!0,poster:c.posterUrl,preload:`metadata`,ref:l,src:c.videoUrl,children:c.captionsUrl?(0,y.jsx)(`track`,{kind:`captions`,label:`English`,src:c.captionsUrl,srcLang:`en`}):null},c.id)})})})]})}var x={schemaVersion:`openpond.publicVideoManifest.v1`,playlists:[{id:`post-training-from-first-principles`,fullVideoId:`post-training-full-course`,status:`draft`,title:`Post-training from first principles`,videoIds:[`post-training-01-how-post-training-works`,`post-training-02-definitions`,`post-training-03-on-policy-off-policy`,`post-training-04-rewards-credit-assignment`,`post-training-05-verifiable-rewards-rlvr`,`post-training-06-ppo-grpo`,`post-training-07-distillation`,`post-training-08-opsd-sdft-sdpo`,`post-training-09-credible-experiments`,`post-training-10-technical-appendix`]},{id:`how-to-make-an-agent`,status:`published`,title:`Agents`,playAllVideoId:`make-agent-tutorial`,videoIds:[`make-agent-tutorial-create`,`make-agent-tutorial-use`,`make-agent-tutorial-improve`]}],videos:[{id:`post-training-01-how-post-training-works`,localPath:`courses/post-training/01-how-post-training-works.mp4`,objectKey:`media/videos/aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a.mp4`,sha256:`aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a`,sizeBytes:2114638,durationSeconds:64.967},{id:`post-training-02-definitions`,localPath:`courses/post-training/02-definitions.mp4`,objectKey:`media/videos/c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc.mp4`,sha256:`c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc`,sizeBytes:11956956,durationSeconds:374.367},{id:`post-training-03-on-policy-off-policy`,localPath:`courses/post-training/03-on-policy-off-policy.mp4`,objectKey:`media/videos/a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762.mp4`,sha256:`a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762`,sizeBytes:2291518,durationSeconds:66.367},{id:`post-training-04-rewards-credit-assignment`,localPath:`courses/post-training/04-rewards-credit-assignment.mp4`,objectKey:`media/videos/685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f.mp4`,sha256:`685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f`,sizeBytes:5677418,durationSeconds:179.834},{id:`post-training-05-verifiable-rewards-rlvr`,localPath:`courses/post-training/05-verifiable-rewards-rlvr.mp4`,objectKey:`media/videos/0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a.mp4`,sha256:`0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a`,sizeBytes:5666892,durationSeconds:172.534},{id:`post-training-06-ppo-grpo`,localPath:`courses/post-training/06-ppo-grpo.mp4`,objectKey:`media/videos/66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3.mp4`,sha256:`66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3`,sizeBytes:5519257,durationSeconds:173.6},{id:`post-training-07-distillation`,localPath:`courses/post-training/07-distillation.mp4`,objectKey:`media/videos/3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466.mp4`,sha256:`3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466`,sizeBytes:4687640,durationSeconds:161.667},{id:`post-training-08-opsd-sdft-sdpo`,localPath:`courses/post-training/08-opsd-sdft-sdpo.mp4`,objectKey:`media/videos/3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031.mp4`,sha256:`3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031`,sizeBytes:5439835,durationSeconds:163.134},{id:`post-training-09-credible-experiments`,localPath:`courses/post-training/09-credible-experiments.mp4`,objectKey:`media/videos/fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023.mp4`,sha256:`fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023`,sizeBytes:6909405,durationSeconds:211.934},{id:`post-training-10-technical-appendix`,localPath:`courses/post-training/10-technical-appendix.mp4`,objectKey:`media/videos/17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21.mp4`,sha256:`17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21`,sizeBytes:5481950,durationSeconds:191.767},{id:`post-training-full-course`,localPath:`courses/post-training/full-course.mp4`,objectKey:`media/videos/d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f.mp4`,sha256:`d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f`,sizeBytes:55740426,durationSeconds:1760.192},{id:`openpond-agent-overview`,localPath:`tutorials/what-is-an-openpond-agent.mp4`,objectKey:`media/videos/421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7.mp4`,sha256:`421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7`,sizeBytes:5259848,durationSeconds:77.467},{id:`make-agent-tutorial`,localPath:`tutorials/how-to-make-an-agent.mp4`,objectKey:`media/videos/252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255.mp4`,sha256:`252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255`,sizeBytes:17339101,durationSeconds:273.067},{id:`make-agent-tutorial-create`,localPath:`tutorials/how-to-make-an-agent-create.mp4`,objectKey:`media/videos/322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44.mp4`,sha256:`322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44`,sizeBytes:6050301,durationSeconds:100.4},{id:`make-agent-tutorial-use`,localPath:`tutorials/how-to-make-an-agent-use.mp4`,objectKey:`media/videos/6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1.mp4`,sha256:`6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1`,sizeBytes:5084394,durationSeconds:75.1},{id:`make-agent-tutorial-improve`,localPath:`tutorials/how-to-make-an-agent-improve.mp4`,objectKey:`media/videos/fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d.mp4`,sha256:`fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d`,sizeBytes:6255324,durationSeconds:108.634}]},S=`https://media.openpond.ai`,C=x,ne=new Map(C.playlists.map(e=>[e.id,e])),re=new Map(C.videos.map(e=>[e.id,e]));function w(e){let t=ne.get(e);if(!t)throw Error(`Public video manifest is missing playlist ${e}`);return t}function ie(e,t){return t?`${S}/${e.objectKey}`:r(e.localPath)}function T(e){let t=re.get(e);if(!t)throw Error(`Public video manifest is missing ${e}`);return ie(t,!0)}var ae=T(`make-agent-tutorial`),E=T(`openpond-agent-overview`);function oe(e){return T(`make-agent-tutorial-${e}`)}var D={schemaVersion:`openpond.tutorialFrames.v2`,tutorial:{title:`How to make an agent`,subtitle:`Create, run, improve, and verify an Account Health Agent.`,outroTitle:`Agent shared from the hosted Profile`,outroSubtitle:`Available to teammates and hosted sandboxes. · Synthetic tutorial data · AI-generated narration`,narration:{model:`gpt-4o-mini-tts-2025-12-15`,voice:`cedar`,speed:1.12,responseFormat:`wav`,instructions:`Warm, clear product tutorial narration. Speak at a calm conversational pace with practical emphasis on user choices, evidence, approvals, and results. Pronounce OpenPond as open pond, P1 as P one, CSV as C S V, JSON as jay son, and Taskset as task set. Finish each sentence cleanly. Avoid hype, sales cadence, dramatic delivery, or imitation of any real person.`,leadInSeconds:.55,tailSeconds:.7,audioTitle:`AI-generated narration`,audioCredit:`OpenAI Speech · Cedar voice`}},chapters:[{id:`create`,label:`Create`,title:`Create an Agent`,subtitle:`Turn a plain-language purpose into a working Account Health Agent.`,outroTitle:`Account Health Agent created`,outroSubtitle:`The agent is ready to use. · AI-generated narration`,cardDuration:1.5},{id:`use`,label:`Use`,title:`Use the Agent`,subtitle:`Chat with the Account Health Agent and run its actions with approval.`,outroTitle:`First agent run complete`,outroSubtitle:`The result and supporting evidence are ready to review. · AI-generated narration`,cardDuration:1.5},{id:`improve`,label:`Improve`,title:`Improve the Agent`,subtitle:`Use real run evidence and Evals to make the Account Health Agent better.`,outroTitle:`Account Health Agent improved`,outroSubtitle:`The updated agent passed its Evals. · AI-generated narration`,cardDuration:1.5}],transitionDuration:.33,frames:[{id:`C01`,file:`C01-account-agent-lab-create-menu.png`,chapter:`create`,label:`Start in Profile`,caption:`Open Profile, choose Agent, and start the guided creation flow.`,placement:`bottom-left`,narration:`Open Profile, choose Agent, and start the guided creation flow.`,focus:{x:.84,y:.06,width:.145,height:.31,zoom:1.55}},{id:`C02`,file:`C02-source-choice-wide.png`,chapter:`create`,label:`Start from a prompt or chats`,caption:`Choose From prompt to describe the Agent directly, or From chats to include examples of the work it should handle.`,placement:`bottom-left`,narration:`Choose From prompt to describe the Agent directly, or From chats to include examples of the work it should handle.`,focus:{x:.31,y:.34,width:.38,height:.31,zoom:1.42}},{id:`C04`,file:`C04-from-chats-wide.png`,chapter:`create`,label:`Add purpose and chats`,caption:`This synthetic example starts with three chats: Acme has renewal blockers, Northstar is expanding, and the team needs a weekly account review. Add them with the Agent purpose.`,placement:`top-left`,narration:`This synthetic example starts with three chats: Acme has renewal blockers, Northstar is expanding, and the team needs a weekly account review. Add them with the Agent purpose.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`C06`,file:`C06-disclosure.png`,chapter:`create`,label:`See how chats build the plan`,caption:`Review the selected excerpts as examples. OpenPond turns their recurring goals, decisions, corrections, and answer patterns into the first Agent plan.`,placement:`bottom-left`,narration:`Review the selected excerpts as examples. OpenPond turns their recurring goals, decisions, corrections, and answer patterns into the first Agent plan.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`C07`,file:`C07-agent-review.png`,chapter:`create`,label:`Review the Agent`,caption:`The draft converts those examples into the Agent's purpose, chat behavior, runnable actions, output formats, and Evals for your review.`,placement:`bottom-left`,narration:`The draft converts those examples into the Agent's purpose, chat behavior, runnable actions, output formats, and Evals for your review.`,focus:{x:.31,y:.04,width:.38,height:.76,zoom:1.27}},{id:`C08`,file:`C08-right-chat-question.png`,chapter:`create`,label:`Answer the planning question`,caption:`The right side panel asks how the Agent should prioritize conflicting account risks.`,placement:`top-left`,narration:`The right side panel asks how the Agent should prioritize conflicting account risks.`,focus:{x:.715,y:.19,width:.265,height:.72,zoom:1.42}},{id:`C09`,file:`C09-right-chat-plan.png`,chapter:`create`,label:`Confirm the plan`,caption:`Before creation, review the proposed name, chat endpoint, runnable actions, Evals, and output formats.`,placement:`top-left`,narration:`Before creation, review the proposed name, chat endpoint, runnable actions, Evals, and output formats.`,focus:{x:.715,y:.18,width:.265,height:.72,zoom:1.42}},{id:`C09A`,file:`C09A-edit-plan.png`,chapter:`create`,label:`Edit the plan`,caption:`If the plan misses a requirement, open Edit plan and describe the change in plain language before any Agent source is created.`,placement:`top-left`,narration:`If the plan misses a requirement, open Edit plan and describe the change in plain language before any Agent source is created.`,focus:{x:.73,y:.66,width:.24,height:.24,zoom:1.45}},{id:`C09B`,file:`C09B-revised-plan.png`,chapter:`create`,label:`Create from the revised plan`,caption:`Review the revised plan, then click Confirm plan to create the Agent and run its Evals.`,placement:`top-left`,narration:`Review the revised plan, then click Confirm plan to create the Agent and run its Evals.`,focus:{x:.72,y:.7,width:.25,height:.2,zoom:1.45}},{id:`C10`,file:`C10-candidate-evaluation.png`,chapter:`create`,label:`Review the Evals`,caption:`This is the creation result: OpenPond built the Agent and passed its behavior Evals against the Account Health examples.`,placement:`bottom-left`,narration:`This is the creation result: OpenPond built the Agent and passed its behavior Evals against the Account Health examples.`,focus:{x:.19,y:.18,width:.5,height:.22,zoom:1.36}},{id:`C11`,file:`C11-local-source-applied.png`,chapter:`create`,label:`Save the Agent`,caption:`After the Evals pass, the Agent is saved to your Profile and is ready to use.`,placement:`bottom-left`,narration:`After the Evals pass, the Agent is saved to your Profile and is ready to use.`,focus:{x:.19,y:.16,width:.5,height:.14,zoom:1.38}},{id:`C12`,file:`C12-ready-local-detail.png`,chapter:`create`,label:`Use the Agent`,caption:`The Agent page shows its purpose, chat entrypoint, and runnable account actions.`,placement:`bottom-left`,narration:`The Agent page shows its purpose, chat entrypoint, and runnable account actions.`,focus:{x:.19,y:.17,width:.5,height:.13,zoom:1.38}},{id:`C13Q`,file:`C13Q-chat-acme-prompt.png`,chapter:`use`,label:`Ask the chat endpoint`,caption:`Use opens a normal chat with the Agent attached. Type a natural-language question about Acme before sending it.`,placement:`top-left`,narration:`Use opens a normal chat with the Agent attached. Type a natural-language question about Acme before sending it.`,focus:{x:.245,y:.84,width:.39,height:.14,zoom:1.48}},{id:`C13`,file:`C13-chat-acme.png`,chapter:`use`,label:`Ask about Acme`,caption:`Acme is the at-risk example: the Agent answers in chat with renewal timing, usage decline, the disputed invoice, and the open P1 case.`,placement:`top-left`,narration:`Acme is the at-risk example: the Agent answers in chat with renewal timing, usage decline, the disputed invoice, and the open P1 case.`,focus:{x:.2,y:.08,width:.48,height:.32,zoom:1.34}},{id:`C14`,file:`C14-chat-follow-up.png`,chapter:`use`,label:`Ask a follow-up`,caption:`A follow-up keeps Acme context and assigns the first actions to Revenue Operations and Support instead of restarting the conversation.`,placement:`top-left`,narration:`A follow-up keeps Acme context and assigns the first actions to Revenue Operations and Support instead of restarting the conversation.`,focus:{x:.2,y:.08,width:.48,height:.36,zoom:1.32}},{id:`C15`,file:`C15-action-picker.png`,chapter:`use`,label:`Choose a direct action`,caption:`The action picker offers chat plus each runnable account action, so you can choose conversation or a focused task.`,placement:`top-left`,narration:`The action picker offers chat plus each runnable account action, so you can choose conversation or a focused task.`,focus:{x:.245,y:.84,width:.39,height:.14,zoom:1.48}},{id:`C16`,file:`C16-northstar-summary.png`,chapter:`use`,label:`Summarize Northstar`,caption:`Northstar is the healthy expansion example from the source chats. Its direct summary identifies rising usage and the request for twenty-five more seats.`,placement:`top-left`,narration:`Northstar is the healthy expansion example from the source chats. Its direct summary identifies rising usage and the request for twenty-five more seats.`,focus:{x:.2,y:.37,width:.48,height:.2,zoom:1.38}},{id:`C17`,file:`C17-acme-triage.png`,chapter:`use`,label:`Triage Acme`,caption:`Running renewal triage for Acme returns high risk, cites the billing and support blockers, and orders the next steps.`,placement:`top-left`,narration:`Running renewal triage for Acme returns high risk, cites the billing and support blockers, and orders the next steps.`,focus:{x:.2,y:.57,width:.48,height:.15,zoom:1.4}},{id:`C18`,file:`C18-weekly-review-artifacts.png`,chapter:`use`,label:`Build the weekly review`,caption:`The weekly review action combines the portfolio and returns visible Markdown, CSV, and JSON artifacts for downstream use.`,placement:`top-left`,narration:`The weekly review action combines the portfolio and returns visible Markdown, CSV, and JSON artifacts for downstream use.`,focus:{x:.2,y:.68,width:.48,height:.19,zoom:1.36}},{id:`C19`,file:`C19-after-restart.png`,chapter:`use`,label:`Verify persistence`,caption:`After restarting OpenPond, the same Agent, chat history, and actions remain available.`,placement:`bottom-left`,narration:`After restarting OpenPond, the same Agent, chat history, and actions remain available.`,focus:{x:.19,y:.16,width:.5,height:.15,zoom:1.38}},{id:`I00`,file:`I00-current-priority-gap.png`,chapter:`improve`,label:`Identify the behavior gap`,caption:`The current Agent finds the right facts, but buries the priority after the account summary. Improve will make the billing and P1 decision lead every high-risk result.`,placement:`top-left`,narration:`The current Agent finds the right facts, but buries the priority after the account summary. Improve will make the billing and P1 decision lead every high-risk result.`,focus:{x:.38,y:.06,width:.42,height:.18,zoom:1.4}},{id:`I01`,file:`I01-improve-source-choice.png`,chapter:`improve`,label:`Start Improve`,caption:`Open Improve agent on the existing Agent, then choose whether to describe the correction directly or include a chat that demonstrates it.`,placement:`bottom-left`,narration:`Open Improve agent on the existing Agent, then choose whether to describe the correction directly or include a chat that demonstrates it.`,focus:{x:.31,y:.34,width:.38,height:.31,zoom:1.42}},{id:`I02`,file:`I02-improve-from-chats.png`,chapter:`improve`,label:`Add the correction chat`,caption:`Choose From chats, ask every high-risk response to lead with the billing and P1 decision, and attach the correction conversation that demonstrates it.`,placement:`top-left`,narration:`Choose From chats, ask every high-risk response to lead with the billing and P1 decision, and attach the correction conversation that demonstrates it.`,focus:{x:.31,y:.2,width:.38,height:.6,zoom:1.32}},{id:`I03`,file:`I03-improve-review.png`,chapter:`improve`,label:`Review the improvement`,caption:`Review the new lead-with-priority behavior, the existing capabilities that must stay intact, and the Evals OpenPond will rerun.`,placement:`bottom-left`,narration:`Review the new lead-with-priority behavior, the existing capabilities that must stay intact, and the Evals OpenPond will rerun.`,focus:{x:.31,y:.04,width:.38,height:.76,zoom:1.27}},{id:`I04`,file:`I04-improve-right-chat-plan.png`,chapter:`improve`,label:`Confirm the Improve plan`,caption:`Review the planned change and confirm that it preserves citations and every existing action.`,placement:`top-left`,narration:`Review the planned change and confirm that it preserves citations and every existing action.`,focus:{x:.715,y:.18,width:.265,height:.72,zoom:1.42}},{id:`I05`,file:`I05-improve-comparison.png`,chapter:`improve`,label:`Compare the results`,caption:`The same locked Evals make the decision clear: the current Agent misses the new lead sentence, while the updated Agent passes every original and new Eval.`,placement:`bottom-left`,narration:`The same locked Evals make the decision clear: the current Agent misses the new lead sentence, while the updated Agent passes every original and new Eval.`,focus:{x:.745,y:.8,width:.22,height:.13,zoom:1.5}},{id:`I06`,file:`I06-improved-release.png`,chapter:`improve`,label:`Save the improvement`,caption:`Apply the update only after that comparison. The existing Agent updates in place, with the successful Evals recorded.`,placement:`bottom-left`,narration:`Apply the update only after that comparison. The existing Agent updates in place, with the successful Evals recorded.`,focus:{x:.71,y:.16,width:.28,height:.22,zoom:1.45}},{id:`I07`,file:`I07-improved-chat.png`,chapter:`improve`,label:`Verify improved chat`,caption:`The improved chat now places disputed billing and the open P1 case ahead of adoption decline while preserving source citations.`,placement:`top-left`,narration:`The improved chat now places disputed billing and the open P1 case ahead of adoption decline while preserving source citations.`,focus:{x:.2,y:.08,width:.48,height:.16,zoom:1.4}},{id:`I08`,file:`I08-improved-triage.png`,chapter:`improve`,label:`Verify improved triage`,caption:`The direct triage action repeats the billing-first result, proving the change works outside chat without breaking the existing workflow.`,placement:`top-left`,narration:`The direct triage action repeats the billing-first result, proving the change works outside chat without breaking the existing workflow.`,focus:{x:.2,y:.27,width:.48,height:.16,zoom:1.4}},{id:`I09`,file:`I09-profile-commit-dialog.png`,chapter:`improve`,label:`Commit the Profile source`,caption:`Commit the final Agent source with a clear Git message so the exact Profile version remains reviewable and shareable.`,placement:`bottom-left`,narration:`Commit the final Agent source with a clear Git message so the exact Profile version remains reviewable and shareable.`,focus:{x:.37,y:.36,width:.26,height:.29,zoom:1.45}},{id:`I10`,file:`I10-profile-sync-dialog.png`,chapter:`improve`,label:`Review the hosted sync`,caption:`Open Sync to review the committed Profile changes. Confirm sync publishes this version so teammates can use the Agent in chat and hosted sandboxes can attach the same source.`,placement:`bottom-left`,narration:`Open Sync to review the committed Profile changes. Confirm sync publishes this version so teammates can use the Agent in chat and hosted sandboxes can attach the same source.`,focus:{x:.5,y:.61,width:.11,height:.07,zoom:1.55}}],frameMinimumDuration:5.2,focusStyle:{borderColor:`#22d3ee`,borderWidth:5,dimOpacity:.32,zoomDelaySeconds:.8,zoomDurationSeconds:1.2}},se=w(`how-to-make-an-agent`),O=D.chapters,ce={create:`1:24`,use:`1:05`,improve:`1:10`},k=se.title,le=D.tutorial.title,A=`4:33`,j={captionsUrl:l,chapterIds:O.map(e=>e.id),description:`Create, use, and improve an Account Health Agent in one continuous walkthrough.`,duration:A,eyebrow:`Play all`,id:`make-agent-tutorial`,lessonNumber:null,posterUrl:o,title:le,videoId:`play-all`,videoUrl:ae},M=O.map((e,t)=>({captionsUrl:u(e.id),chapterIds:[e.id],description:e.subtitle,duration:ce[e.id],eyebrow:`Lesson ${t+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:t+1,posterUrl:n(e.id),title:e.title,videoId:e.id,videoUrl:oe(e.id)})),ue=[j,...M];function N(e){return ue.find(t=>t.videoId===e)??j}function de(e){let t=M.findIndex(t=>t.videoId===e);return t<0?null:M[t+1]?.videoId??null}var fe=[2,1,0];function pe({activeVideoId:e=`play-all`,autoplay:t=!0,onClose:n,onOpen:r,onSelectVideo:i,open:a=!1,playRequestId:o=0}={}){let s=(0,v.useRef)(null),c=N(e);(0,v.useEffect)(()=>{if(!a)return;let e=s.current;e&&(e.load(),o>0&&e.play().catch(()=>void 0))},[c.id,a,o]);function l(){if(!t||!i)return;let n=de(e);n&&i(n)}return(0,y.jsxs)(`section`,{className:`get-started-series`,"aria-label":k,children:[(0,y.jsxs)(`article`,{className:`get-started-playlist-card`,"aria-labelledby":`make-agent-series-title`,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Open ${k} playlist`,className:`get-started-playlist-open`,onClick:r,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-playlist-stack`,"aria-hidden":`true`,children:[fe.map((e,t)=>{let n=M[e];return(0,y.jsx)(`div`,{className:`get-started-playlist-poster layer-${t+1}`,children:(0,y.jsx)(`img`,{alt:``,decoding:`async`,src:n.posterUrl})},n.id)}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),(0,y.jsxs)(`span`,{className:`get-started-playlist-count`,children:[M.length,` lessons`]})]}),(0,y.jsxs)(`div`,{className:`get-started-playlist-copy`,children:[(0,y.jsx)(`h1`,{id:`make-agent-series-title`,children:k}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,children:[(0,y.jsx)(`span`,{children:`Walkthrough playlist`}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:A})]}),(0,y.jsx)(`p`,{children:`Create, use, and improve an Account Health Agent, or play the full walkthrough.`})]})]}),a&&n&&i?(0,y.jsx)(me,{activeVideoId:e,autoplay:t,contained:!0,inertExclusionSelector:`.get-started-learning-panel`,onClose:n,onEnded:l,onSelectVideo:i,videoRef:s}):null]})}function me({activeVideoId:e=`play-all`,autoplay:t=!0,contained:n=!1,inertExclusionSelector:r,onClose:i,onEnded:a,onSelectVideo:o=()=>void 0,videoRef:s}){let c=N(e),l=M.findIndex(t=>t.videoId===e),u=l>=0?M[l+1]?.videoId:void 0,d=l>0?M[l-1]?.videoId:void 0;return(0,y.jsx)(b,{autoAdvance:t&&l>=0,contained:n,inertExclusionSelector:r,navigation:l>=0?{currentIndex:l,onNext:u?()=>o(u):void 0,onPrevious:d?()=>o(d):void 0,total:M.length}:void 0,onClose:i,onEnded:a?()=>a():void 0,video:c,videoRef:s})}var P=w(`post-training-from-first-principles`),F=P.title,he=P.status;function I(e,t,n,i,a,o){let s=`courses/post-training/${t}`,c=`post-training-${t}`;return{captionsUrl:r(`${s}.vtt`),description:o,duration:a,eyebrow:i,id:c,lessonNumber:e,posterUrl:r(`${s}-poster.webp`),slug:t,title:n,videoUrl:T(c)}}var L=[I(1,`01-how-post-training-works`,`How post-training works`,`Start here`,`1:05`,`The choose, judge, and update loop behind every method in this series.`),I(2,`02-definitions`,`Definitions`,`Reference`,`6:14`,`Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series.`),I(3,`03-on-policy-off-policy`,`On-policy and off-policy data`,`Data source`,`1:06`,`Why learner rollouts and teacher or stored data support different updates.`),I(4,`04-rewards-credit-assignment`,`Rewards and credit assignment`,`RL foundation`,`3:00`,`Follow a code-repair trajectory from actions and observations to advantage.`),I(5,`05-verifiable-rewards-rlvr`,`Verifiable rewards`,`RLVR`,`2:53`,`See how tests create scalable rewards—and how a model can exploit the checker.`),I(6,`06-ppo-grpo`,`PPO and GRPO`,`Policy updates`,`2:54`,`Compare PPO's learned critic with GRPO's sibling-response baseline.`),I(7,`07-distillation`,`Distillation`,`Teacher targets`,`2:42`,`Transfer a teacher's token distribution instead of copying one final answer.`),I(8,`08-opsd-sdft-sdpo`,`OPSD, SDFT, and SDPO`,`Teacher evidence`,`2:43`,`Compare trusted solutions, demonstrations, and failure feedback at one prefix.`),I(9,`09-credible-experiments`,`Credible experiments`,`Research design`,`3:32`,`Build versioned datasets, fair baselines, and claims that survive scrutiny.`),I(10,`10-technical-appendix`,`Technical appendix`,`Advanced details`,`3:12`,`Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.`)],ge=`29 min`,R=P.fullVideoId;if(!R)throw Error(`Post-training playlist is missing its full video`);var z={captionsUrl:r(`courses/post-training/full-course.vtt`),description:`All ten lessons in one continuous video for watching, sharing, or uploading.`,duration:`29:20`,eyebrow:`Full course`,id:R,posterUrl:r(`courses/post-training/full-course-poster.webp`),title:F,videoUrl:T(R)};function B(e){let t=e+1;return t<L.length?t:null}var V=`Subject to change, lesson work in progress`;function _e(){let e=he===`draft`?`Draft`:`Published`;return(0,y.jsx)(`span`,{"aria-label":`${e}: ${V}`,className:`get-started-playlist-status app-tooltip`,"data-tooltip":V,tabIndex:0,children:e})}var H=`openpond.post-training-progress.v1`,U=Object.freeze({}),ve=1e3,W=new Set,G=null,K=null,q=!1;function J(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function ye(e){if(!e||typeof e!=`object`||Array.isArray(e))return U;let t={};for(let[n,r]of Object.entries(e)){if(!n||!r||typeof r!=`object`||Array.isArray(r))continue;let e=r,i=J(e.duration),a=J(e.currentTime),o=J(e.updatedAt);if(i===null||i<=0||a===null)continue;let s=e.completed===!0;t[n]={completed:s,currentTime:s?i:Math.min(i,Math.max(0,a)),duration:i,updatedAt:o===null?0:Math.max(0,o)}}return Object.keys(t).length>0?t:U}function be(e){if(!e)return U;try{return ye(JSON.parse(e))}catch{return U}}function Y(){if(typeof window>`u`)return U;try{return be(f.getItem(H))}catch{return U}}function X(){if(typeof window<`u`&&K!==null&&window.clearTimeout(K),K=null,typeof window<`u`&&G!==null)try{f.setItem(H,JSON.stringify(G))}catch{}}function xe(){typeof window<`u`&&K===null&&(K=window.setTimeout(X,ve))}function Se(){typeof window>`u`||q||(q=!0,window.addEventListener(`pagehide`,X),d(()=>{G=Y(),W.forEach(e=>e())}))}function Z(){return G===null&&(G=Y()),Se(),G}function Q({completed:e=!1,currentTime:t,duration:n,lessonId:r}){if(!r||!Number.isFinite(n)||n<=0||!Number.isFinite(t))return;let i=Z(),a=i[r],o=!!(a?.completed||e),s=o?n:Math.min(n,Math.max(0,t));a&&a.completed===o&&Math.abs(a.currentTime-s)<.25&&Math.abs(a.duration-n)<.25||(G={...i,[r]:{completed:o,currentTime:s,duration:n,updatedAt:Date.now()}},xe(),W.forEach(e=>e()))}function Ce(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}var $=F,we=[2,1,0];function Te({activeLessonIndex:e,fullCourseSelected:t=!1,autoplay:n=!0,open:r,onClose:i,onOpen:a,onSelectLesson:o,playRequestId:s=0}){let c=(0,v.useRef)(null),l=(0,v.useRef)(null),u=L[e]??L[0],d=t?z:u;(0,v.useEffect)(()=>{if(!r)return;let e=c.current;if(!e)return;let t=!1;l.current=null,e.load();let n=()=>{if(t)return;let n=Ce(Z()[d.id]);n>0&&(e.currentTime=n),s>0&&e.play().catch(()=>void 0)};return e.readyState>=HTMLMediaElement.HAVE_METADATA?n():e.addEventListener(`loadedmetadata`,n,{once:!0}),()=>{t=!0,e.removeEventListener(`loadedmetadata`,n),Number.isFinite(e.duration)&&e.duration>0&&e.currentTime>0&&Q({completed:e.ended,currentTime:e.currentTime,duration:e.duration,lessonId:d.id})}},[d.id,r,s]);function f(e,t=!1){!Number.isFinite(e.duration)||e.duration<=0||Q({completed:t,currentTime:t?e.duration:e.currentTime,duration:e.duration,lessonId:d.id})}function p(e){if(!Number.isFinite(e.duration)||e.duration<=0)return;let t=Math.min(99,Math.floor(e.currentTime/e.duration*100)),n=l.current;(n?.lessonId!==d.id||n.percent!==t)&&(l.current={lessonId:d.id,percent:t},f(e))}function h(e){f(e,!0),n&&!t&&g()}function g(){let t=B(e);t!==null&&o(t)}return(0,y.jsxs)(`section`,{className:`get-started-series`,"aria-label":$,children:[(0,y.jsxs)(`article`,{className:`get-started-playlist-card`,"aria-labelledby":`post-training-series-title`,children:[(0,y.jsx)(`button`,{"aria-haspopup":`dialog`,"aria-label":`Open ${$} playlist`,className:`get-started-playlist-open`,onClick:a,type:`button`}),(0,y.jsxs)(`div`,{className:`get-started-playlist-stack`,"aria-hidden":`true`,children:[we.map((e,t)=>{let n=L[e];return(0,y.jsx)(`div`,{className:`get-started-playlist-poster layer-${t+1}`,children:(0,y.jsx)(`img`,{alt:``,decoding:`async`,src:n.posterUrl})},n.id)}),(0,y.jsx)(`span`,{className:`get-started-course-play-icon`,children:(0,y.jsx)(m,{fill:`currentColor`,size:19})}),(0,y.jsxs)(`span`,{className:`get-started-playlist-count`,children:[L.length,` lessons`]})]}),(0,y.jsxs)(`div`,{className:`get-started-playlist-copy`,children:[(0,y.jsxs)(`div`,{className:`get-started-playlist-title`,children:[(0,y.jsx)(`h1`,{id:`post-training-series-title`,children:$}),(0,y.jsx)(_e,{})]}),(0,y.jsxs)(`div`,{className:`get-started-course-meta`,children:[(0,y.jsx)(`span`,{children:`Learning series`}),(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,y.jsx)(`span`,{children:ge})]}),(0,y.jsx)(`p`,{children:`Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix.`})]})]}),r?(0,y.jsx)(Ee,{activeLessonIndex:e,autoplay:n,fullCourseSelected:t,onClose:i,onEnded:h,onPause:f,onSelectLesson:o,onTimeUpdate:p,videoRef:c}):null]})}function Ee({activeLessonIndex:e,autoplay:t,fullCourseSelected:n,onClose:r,onEnded:i,onPause:a,onSelectLesson:o,onTimeUpdate:s,videoRef:c}){let l=L[e]??L[0],u=B(e),d=n?z:l;return(0,y.jsx)(b,{autoAdvance:t&&!n,contained:!0,inertExclusionSelector:`.get-started-learning-panel`,navigation:n?void 0:{currentIndex:e,onNext:u===null?void 0:()=>o(u),onPrevious:e>0?()=>o(e-1):void 0,total:L.length},onClose:r,onEnded:i,onPause:a,onTimeUpdate:s,video:d,videoRef:c})}var De={captionsUrl:t,description:`See how Profile Agents combine chat, direct actions, shared runtime surfaces, and Evals.`,duration:`1:16`,eyebrow:`Agent overview`,id:`openpond-agent-overview`,posterUrl:c,title:`What is an OpenPond Agent?`,videoUrl:E};function Oe(e={}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),a=e.makeAgentTutorial===void 0?t:e.makeAgentTutorial,o=e.postTrainingCourse===void 0?r:e.postTrainingCourse,s=!!(o||a);function c(){e.onOpenMakeAgentTutorial?e.onOpenMakeAgentTutorial():(i(null),n({autoplay:!0,playRequestId:0,videoId:`create`}))}function l(){e.onCloseMakeAgentTutorial?e.onCloseMakeAgentTutorial():n(null)}function u(t){e.onSelectMakeAgentTutorialVideo?e.onSelectMakeAgentTutorialVideo(t):n(e=>e&&{...e,playRequestId:e.playRequestId+1,videoId:t})}function d(){e.onOpenPostTrainingCourse?e.onOpenPostTrainingCourse():(n(null),i({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0}))}function f(){e.onClosePostTrainingCourse?e.onClosePostTrainingCourse():i(null)}function p(t){e.onSelectPostTrainingLesson?e.onSelectPostTrainingLesson(t):i(e=>e&&{...e,fullCourseSelected:!1,lessonIndex:t,playRequestId:e.playRequestId+1})}return(0,y.jsx)(`section`,{className:`get-started-view ${s?`course-player-open`:``}`,"aria-label":`Walkthroughs`,children:(0,y.jsxs)(`div`,{className:`get-started-shell`,children:[(0,y.jsxs)(`section`,{className:`get-started-start-here`,"aria-labelledby":`get-started-start-here-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-start-here-title`,children:`Start here`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(te,{titleElement:`h1`,video:De})})]}),(0,y.jsxs)(`section`,{className:`get-started-walkthroughs`,"aria-labelledby":`get-started-walkthroughs-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-walkthroughs-title`,children:`Walkthroughs`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(pe,{activeVideoId:a?.videoId??`create`,autoplay:a?.autoplay??!0,onClose:l,onOpen:c,onSelectVideo:u,open:!!a,playRequestId:a?.playRequestId??0})})]}),(0,y.jsxs)(`section`,{className:`get-started-learn`,"aria-labelledby":`get-started-learn-title`,children:[(0,y.jsx)(`header`,{className:`get-started-section-heading`,children:(0,y.jsx)(`h2`,{id:`get-started-learn-title`,children:`Learn deeper`})}),(0,y.jsx)(`div`,{className:`get-started-learning-grid`,children:(0,y.jsx)(Te,{activeLessonIndex:o?.lessonIndex??0,autoplay:o?.autoplay??!0,fullCourseSelected:o?.fullCourseSelected??!1,open:!!o,onClose:f,onOpen:d,onSelectLesson:p,playRequestId:o?.playRequestId??0})})]})]})})}export{Oe as GetStartedView};
@@ -0,0 +1 @@
1
+ .git-dialog.getting-started-dialog{outline:none;gap:32px;width:min(800px,100vw - 34px);max-height:calc(100dvh - 34px);padding:36px;overflow-y:auto}.getting-started-header{gap:10px;padding-right:20px;display:grid}.getting-started-header h2{letter-spacing:-.5px;margin:0;font-size:23px;font-weight:500}.getting-started-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none;display:grid}.getting-started-card{aspect-ratio:1;border:1px solid var(--border-default);background:var(--surface-panel);text-align:center;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:16px;min-width:0;padding:24px 16px;display:flex}.getting-started-provider-icon{object-fit:contain;width:30px;height:30px}.getting-started-card h3{white-space:nowrap;margin:0;font-size:14px;font-weight:500}.getting-started-card-status{min-height:26px;color:var(--accent-primary);justify-content:center;align-items:center;font-size:12px;display:flex}.getting-started-card-status span,.getting-started-card-status a,.getting-started-card-status button{justify-content:center;align-items:center;gap:5px;display:inline-flex}.getting-started-card-status a,.getting-started-key-link{color:var(--accent-primary);text-decoration:none}.getting-started-card-status a:hover,.getting-started-key-link:hover{text-decoration:underline}.getting-started-card-status button{border:1px solid var(--border-strong);color:var(--accent-primary);font:inherit;cursor:pointer;background:0 0;border-radius:7px;padding:4px 10px}.getting-started-card-status button:hover{background:var(--state-hover)}.getting-started-card-status .getting-started-login{border-color:var(--action-cayenne);background:var(--action-cayenne);color:var(--text-on-accent)}.getting-started-card-status .getting-started-login:hover{border-color:var(--action-cayenne-hover);background:var(--action-cayenne-hover)}.getting-started-account-backdrop{z-index:100}.getting-started-account-dialog form{gap:16px;display:grid}.getting-started-account-dialog form>button{justify-self:end}.getting-started-key-link{align-items:center;gap:5px;font-size:13px;display:inline-flex}.getting-started-account-dialog .getting-started-error{color:var(--accent-primary);margin:0;font-size:12px;line-height:1.5}.getting-started-dialog :is(button,a):focus-visible{outline:2px solid var(--accent-primary);outline-offset:3px}@media (width<=620px){.git-dialog.getting-started-dialog{gap:24px;padding:24px}.getting-started-cards{grid-template-columns:1fr;gap:12px}.getting-started-card{aspect-ratio:auto;gap:12px;min-height:180px;padding:24px 16px}}
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n,s as r}from"./index-DYrLeSyY.js";import{n as i}from"./api-client-Dgz-fOMl.js";import"./icons-CK5-nxVC.js";import{t as a}from"./external-link-B4rPiZEp.js";import{t as o}from"./loader-circle-cyf35w3i.js";import{t as s}from"./plus-DoJe4fLj.js";import{t as c}from"./x-IPhrr4ju.js";import{t as l}from"./NativeSetupTerminal-CNHTByLo.js";import{t as u}from"./AppDialog-BurL61qE.js";import{Ht as d,mn as f,t as p,wn as m}from"./App-DHJVXTI2.js";/* empty css */import{t as h}from"./useAccountSettings-BgHXNpq_.js";var g=e(t(),1),_=n(),v={codex:{name:`Codex`,installUrl:`https://developers.openai.com/codex/cli`},"claude-code":{name:`Claude`,installUrl:`https://code.claude.com/docs/en/setup`}};function y({providerId:e,connection:t,config:n,onProviders:r}){let c=v[e],u=p(),d=(0,g.useRef)(u.active);d.current=u.active;let[h,y]=(0,g.useState)(null),[b,x]=(0,g.useState)(!0),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(null),E=(0,g.useRef)(null),D=(0,g.useRef)(!1),O=(0,g.useRef)(r);O.current=r,(0,g.useEffect)(()=>(D.current=!0,()=>{D.current=!1}),[]);let k=(0,g.useCallback)(async()=>{E.current?.abort();let n=new AbortController;E.current=n;let r=setTimeout(()=>n.abort(Error(`Connection check timed out. Try again.`)),45e3);x(!0),C(null),y(null);try{let r=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:n.signal});if(E.current!==n||n.signal.aborted)return;y(r),C(r.error),O.current(r.settings)}catch(e){E.current===n&&C(e instanceof Error?e.message:String(e))}finally{clearTimeout(r),E.current===n&&(E.current=null,x(!1))}},[t.serverUrl,t.token,e]);(0,g.useEffect)(()=>{!w&&!(e===`claude-code`&&d.current)&&k();function t(){!E.current&&!w&&!(e===`claude-code`&&d.current)&&k()}return window.addEventListener(`focus`,t),()=>{window.removeEventListener(`focus`,t);let e=E.current;E.current=null,e?.abort()}},[k,n?.binaryPath,n?.sourceHome,w,e]);async function A(){if(!b){x(!0),C(null);try{let n=await m.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(!D.current)return;O.current(n),await k()}catch(e){C(e instanceof Error?e.message:String(e)),x(!1)}}}async function j(){if(b)return;let r=new AbortController;E.current=r;let a=setTimeout(()=>r.abort(),1e4);x(!0),C(null);try{let a=await i(t,`/v1/providers/${e}/native-setup`,{method:`POST`,body:JSON.stringify({action:`login`}),signal:r.signal});if(E.current!==r||r.signal.aborted)return;if(!n?.enabled){let n=await m.saveProviderSettings(t,{providers:{[e]:{enabled:!0}}});if(E.current!==r||r.signal.aborted)return;O.current(n)}E.current===r&&!r.signal.aborted&&(e===`claude-code`?u.start(a):T(a))}catch(e){E.current===r&&C(e instanceof Error?e.message:String(e))}finally{clearTimeout(a),E.current===r&&(E.current=null,x(!1))}}(0,g.useEffect)(()=>{if(e!==`claude-code`||!u.result)return;let t=u.result.settings.providers[e];(t?.binaryPath||null)===(n?.binaryPath||null)&&(t?.sourceHome||null)===(n?.sourceHome||null)&&(x(!1),y(u.result),C(u.result.status===`unavailable`?u.result.error:null))},[u.result,e,n?.binaryPath,n?.sourceHome]);let M=!S&&h?.status===`ready`;return(0,_.jsxs)(`li`,{className:`getting-started-card`,children:[(0,_.jsx)(`img`,{className:`getting-started-provider-icon`,src:`/agent-sources/${e}.svg`,alt:``}),(0,_.jsx)(`h3`,{children:c.name}),(0,_.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,"aria-live":`polite`,children:e===`claude-code`&&u.active?(0,_.jsx)(`button`,{type:`button`,onClick:u.resume,children:`Continue sign-in`}):b?(0,_.jsx)(o,{className:`settings-spin`,size:20,"aria-label":`Checking ${c.name}`}):M&&n?.enabled?(0,_.jsxs)(`span`,{children:[(0,_.jsx)(f,{size:16}),` Connected`]}):M?(0,_.jsxs)(`button`,{type:`button`,"aria-label":`Connect ${c.name}`,onClick:()=>void A(),children:[(0,_.jsx)(s,{size:14}),` Connect`]}):h?.status===`missing`?(0,_.jsxs)(`a`,{href:c.installUrl,target:`_blank`,rel:`noreferrer`,children:[`Install `,c.name,` `,(0,_.jsx)(a,{size:12})]}):h?.status===`needs_login`?(0,_.jsx)(`button`,{type:`button`,className:`getting-started-login`,"aria-label":`Log in to ${c.name}`,title:S??void 0,onClick:()=>void j(),children:`Log in`}):(0,_.jsx)(`button`,{type:`button`,"aria-label":`Retry ${c.name} connection`,title:S??`Check connection again`,onClick:()=>void k(),children:`Retry`})}),w?(0,_.jsx)(l,{modal:!0,connection:t,command:w.command,displayCommand:w.displayCommand,onComplete:()=>T(null),onClose:()=>T(null)}):null]})}var b=`https://www.openpond.ai/api-keys`;function x({connection:e,payload:t,onPayload:n,onClose:i}){let[o,s]=(0,g.useState)(!1),[l,p]=(0,g.useState)(``),[m,v]=(0,g.useState)(null),x=(0,g.useRef)(t);x.current=t;let S=h({connection:e,onPayload:n,onError:v});function C(e){n({...x.current,providers:e})}let w=t.account.state===`signed_in`;async function T(e){if(e.preventDefault(),l.trim()&&!S.saving)try{await S.saveAccount({apiKey:l,baseUrl:`https://www.openpond.ai`,apiBaseUrl:`https://api.openpond.ai`,environment:`production`}),p(``),s(!1)}catch{}}async function E(){v(null);try{let e=window.openpond?.browser;if(e?.openExternal){let t=await e.openExternal({conversationId:`openpond-get-started`,url:b});if(!t.ok)throw Error(t.error??`Could not open API keys in your browser.`)}else window.open(b,`_blank`,`noopener,noreferrer`)}catch(e){v(e instanceof Error?e.message:String(e))}}return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(u,{inertExclusionSelector:`.native-login-session`,ariaLabel:`Get started with OpenPond`,backdropClassName:`git-dialog-backdrop`,className:`git-dialog getting-started-dialog`,onClose:i,children:[(0,_.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close get started`,title:`Close`,onClick:i,children:(0,_.jsx)(c,{size:16})}),(0,_.jsx)(`header`,{className:`getting-started-header`,children:(0,_.jsx)(`h2`,{children:`Get started with OpenPond`})}),(0,_.jsxs)(`ol`,{className:`getting-started-cards`,children:[(0,_.jsxs)(`li`,{className:`getting-started-card`,children:[(0,_.jsx)(`img`,{className:`getting-started-provider-icon`,src:r,alt:``}),(0,_.jsx)(`h3`,{children:`OpenPond account`}),(0,_.jsx)(`div`,{className:`getting-started-card-status`,role:`status`,children:w?(0,_.jsxs)(`span`,{children:[(0,_.jsx)(f,{size:16}),` Connected`]}):(0,_.jsx)(`a`,{href:b,onClick:e=>{e.preventDefault(),v(null),s(!0)},children:`Connect account`})})]}),(0,_.jsx)(y,{providerId:`codex`,connection:e,config:t.providers.providers.codex,onProviders:C}),(0,_.jsx)(y,{providerId:`claude-code`,connection:e,config:t.providers.providers[`claude-code`],onProviders:C})]})]}),o?(0,_.jsxs)(u,{ariaLabel:`Connect OpenPond account`,backdropClassName:`git-dialog-backdrop getting-started-account-backdrop`,className:`git-dialog getting-started-account-dialog`,onClose:()=>s(!1),dismissDisabled:S.saving,children:[(0,_.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close account connection`,disabled:S.saving,onClick:()=>s(!1),children:(0,_.jsx)(c,{size:16})}),(0,_.jsx)(`h2`,{children:`Connect OpenPond`}),(0,_.jsxs)(`a`,{href:b,target:`_blank`,rel:`noreferrer`,className:`getting-started-key-link`,onClick:e=>{e.preventDefault(),E()},children:[`Create an API key `,(0,_.jsx)(a,{size:12})]}),(0,_.jsxs)(`form`,{onSubmit:e=>void T(e),children:[(0,_.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,_.jsx)(`span`,{children:`OpenPond API key`}),(0,_.jsx)(`input`,{"data-autofocus":!0,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:`opk_…`,value:l,disabled:S.saving,onChange:e=>{p(e.target.value),v(null)}})]}),m?(0,_.jsx)(d,{error:m}):null,(0,_.jsx)(`button`,{className:`git-dialog-primary`,type:`submit`,disabled:S.saving||!l.trim(),children:S.saving?`Connecting…`:`Connect account`})]})]}):null]})}export{x as GettingStartedDialog};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-BsPUniZy.js";import{pn as r}from"./App-Yy3l2sdD.js";import{t as i}from"./LabsRoute-DOnw39du.js";var a=e(t(),1),o=n();function s({api:e,policyId:t,sourceId:n,onBack:s}){let c=(0,a.useMemo)(()=>e.reviewClient(t,n),[e,t,n]),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null);return(0,o.jsxs)(`section`,{"aria-label":`Hosted example review`,children:[(0,o.jsx)(`button`,{type:`button`,className:`training-button secondary`,onClick:()=>{r(s)},children:`Back to continual learning`}),(0,o.jsx)(`p`,{children:`Reviewing hosted examples. Approved tasks become eligible for this policy's next training check.`}),(0,o.jsx)(i,{client:c,selectedId:l,after:d,sourceId:n,onSelect:e=>{r(()=>u(e))},onPage:f})]})}export{s as HostedModelLearningReview};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{Rt as r}from"./App-DHJVXTI2.js";import{t as i}from"./LabsRoute-B61l1b8P.js";var a=e(t(),1),o=n();function s({api:e,policyId:t,sourceId:n,onBack:s}){let c=(0,a.useMemo)(()=>e.reviewClient(t,n),[e,t,n]),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null);return(0,o.jsxs)(`section`,{"aria-label":`Hosted example review`,children:[(0,o.jsx)(`button`,{type:`button`,className:`training-button secondary`,onClick:()=>{r(s)},children:`Back to continual learning`}),(0,o.jsx)(`p`,{children:`Reviewing hosted examples. Approved tasks become eligible for this policy's next training check.`}),(0,o.jsx)(i,{client:c,selectedId:l,after:d,sourceId:n,onSelect:e=>{r(()=>u(e))},onPage:f})]})}export{s as HostedModelLearningReview};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{b as r,x as i}from"./contracts-BHTOD1nd.js";import{t as a}from"./api-client-Dgz-fOMl.js";import{t as o}from"./AppDialog-BurL61qE.js";import{a as s,i as c,n as l,o as u,r as d}from"./LabsRoute-B61l1b8P.js";var f=e(t(),1),p=n();function m({client:e,project:t,policy:n,onClose:m}){let[h]=(0,f.useState)(()=>n?.id??`policy-${crypto.randomUUID()}`),[g]=(0,f.useState)(()=>s(t,n)),[_,v]=(0,f.useState)(g.enabled),[y,b]=(0,f.useState)(g.scheduled),[x,S]=(0,f.useState)(!n),[C,w]=(0,f.useState)(g.humanReviewRequired),[T,E]=(0,f.useState)(n?.sources??[]),[D,O]=(0,f.useState)(n?.taskDefinition??null),[k,A]=(0,f.useState)({interval:String(g.intervalSeconds/60),minimum:String(g.minimumApprovedExamples),batch:String(g.maxBatchExamples),spend:String(g.maxIterationSpendUsd),daily:String(g.maxDailySpendUsd),cooldown:String(g.cooldownSeconds/60),retries:String(g.maxRetries),backlog:String(g.maxBacklogExamples)}),[j,M]=(0,f.useState)(!1),[N,P]=(0,f.useState)(!1),[F,I]=(0,f.useState)(null),[L,R]=(0,f.useState)(),[z,B]=(0,f.useState)(null),[V,H]=(0,f.useState)(null),U=(0,f.useRef)(null),W=(0,f.useRef)(!1);(0,f.useEffect)(()=>{let t=!1;return e.sources(L).then(e=>{t||(B({after:L,data:e}),H(null))},e=>{t||H(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[e,L]);let G=z&&z.after===L?z.data:null,K=x?t.trainingSetup.rewardBindingRef:n?.rewardBinding;function q(e){let t=T.some(t=>t.id===e.id);E(t?T.filter(t=>t.id!==e.id):[...T,r(e)]),O(t&&T.length===1?null:D??e.taskDefinition),M(!0)}async function J(){if(W.current)return!1;W.current=!0,P(!0),I(null);try{if(!U.current){if(!D||!T.length||!K)throw Error(`Select task sources and a Model Reward before saving.`);let e=c({project:t,previous:n,policyId:h,applyModelConfiguration:x,sources:T,taskDefinition:D,settings:{enabled:_,scheduled:y,humanReviewRequired:C,intervalSeconds:Number(k.interval)*60,minimumApprovedExamples:Number(k.minimum),maxBatchExamples:Number(k.batch),maxIterationSpendUsd:Number(k.spend),maxDailySpendUsd:Number(k.daily),cooldownSeconds:Number(k.cooldown)*60,maxRetries:Number(k.retries),maxBacklogExamples:Number(k.backlog)}});U.current={action:`publish`,kind:`policy`,operationId:crypto.randomUUID(),expectedRevision:n?.revision??0,content:e}}return await e.command(U.current),U.current=null,M(!1),!0}catch(e){return e instanceof a&&e.status>=400&&e.status<500&&![408,429].includes(e.status)&&(U.current=null),I(e instanceof Error?e.message:`Unable to save learning settings.`),!1}finally{W.current=!1,P(!1)}}let Y=u({name:`learning settings`,dirty:j,busy:N,save:J});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(o,{ariaLabel:`Continual learning settings`,className:`labs-rename-dialog learning-workspace hosted-learning-settings`,backdropClassName:`labs-rename-backdrop`,dismissDisabled:N,onClose:()=>{Y.requestLeave(m)},children:[(0,p.jsx)(`h2`,{children:`Continual learning settings`}),(0,p.jsxs)(`p`,{children:[`Train `,t.name,` from approved tasks. Acceptance and serving remain separate decisions.`]}),(0,p.jsx)(l,{error:F??V}),(0,p.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),await J()&&(Y.allowNextNavigation(),m())},children:[(0,p.jsxs)(`fieldset`,{disabled:N||!!U.current,onChange:()=>M(!0),children:[(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),` Enable learning`]}),(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:C,disabled:C,onChange:()=>w(!0)}),` Human review required`]}),(0,p.jsx)(`p`,{children:`New policies require human review. Qualified automatic admission cannot be configured here yet.`}),n?(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>S(e.target.checked)}),` Use the Model’s current training configuration`]}):null,(0,p.jsxs)(`fieldset`,{children:[(0,p.jsx)(`legend`,{children:`Task sources`}),!G&&!V?(0,p.jsx)(`p`,{children:`Loading sources…`}):null,G?.sources.items.map(e=>{let t=G.definitions.find(t=>i(r(t),e.taskDefinition)),n=!!(K&&t&&i(K,t.rewardBinding)&&(!D||i(D,e.taskDefinition))),a=T.find(t=>t.id===e.id);return(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:!!a,disabled:!a&&(!e.enabled||!n),onChange:()=>q(e)}),` `,e.name,a&&a.revision!==e.revision?(0,p.jsxs)(`small`,{children:[`Using saved revision `,a.revision,`; clear and reselect to update.`]}):n?null:(0,p.jsx)(`small`,{children:`Different task format or Reward.`})]},e.id)}),(0,p.jsxs)(`p`,{children:[T.length,` sources selected. `,(0,p.jsx)(`button`,{type:`button`,onClick:()=>{E([]),O(null),M(!0)},children:`Clear selection`})]}),(0,p.jsx)(d,{after:L,next:G?.sources.nextCursor,onPage:e=>R(e??void 0)})]}),(0,p.jsxs)(`label`,{children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked)}),` Schedule training`]}),Object.keys(k).filter(e=>e!==`interval`||y).map(e=>(0,p.jsxs)(`label`,{children:[{interval:`Check interval (minutes)`,minimum:`Minimum approved examples`,batch:`Maximum examples per batch`,spend:`Maximum spend per iteration ($)`,daily:`Maximum daily spend ($)`,cooldown:`Cooldown (minutes)`,retries:`Automatic retries`,backlog:`Maximum backlog`}[e],(0,p.jsx)(`input`,{type:`number`,value:k[e],min:`0`,step:e===`spend`||e===`daily`?`0.01`:`1`,onChange:t=>A(n=>({...n,[e]:t.target.value}))})]},e))]}),(0,p.jsxs)(`div`,{className:`model-build-actions`,children:[(0,p.jsx)(`button`,{type:`submit`,className:`training-button`,disabled:N,children:N?`Saving…`:U.current?`Retry save`:`Save settings`}),(0,p.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:N,onClick:()=>{Y.requestLeave(m)},children:`Cancel`})]})]})]}),Y.dialog]})}export{m as HostedModelLearningSettings};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{c as r,l as i,n as a,o,r as s,t as c}from"./training-model-data-14942K_Z.js";import{t as l}from"./chevron-down-dYn0pd4Q.js";import{t as u}from"./chevron-right-sFx2xRvT.js";import{t as d}from"./loader-circle-cyf35w3i.js";import{Ht as f,mn as p,tn as m,wn as h}from"./App-DHJVXTI2.js";import{l as g}from"./MainPane-2dj6Dg4l.js";import{C as _,S as v,_ as y,b,c as x,d as S,f as ee,g as C,h as w,l as te,m as ne,p as re,s as ie,u as ae,v as oe,x as T,y as E}from"./LabsRoute-B61l1b8P.js";var D=e(t(),1),O=n();function k({events:e}){let t=e.filter(e=>e.type===`metric`&&e.payload.metricKind===`rollout_trajectory`);return t.length?(0,O.jsx)(`div`,{className:`training-rollout-receipts`,children:t.map((e,t)=>{let n=e.payload.rewardEligible===!0,r=j(e.payload.reward),i=typeof e.payload.failureClass==`string`?e.payload.failureClass:null,a=typeof e.payload.failureCode==`string`?e.payload.failureCode:null;return(0,O.jsxs)(`details`,{children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsxs)(`span`,{children:[`Attempt `,t+1]}),(0,O.jsx)(`strong`,{children:n?`eligible`:`ineligible`}),(0,O.jsx)(`em`,{children:n&&r!=null?r.toFixed(3):a??i??`not reward eligible`})]}),(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)(A,{label:`Rollout`,value:M(e.payload.rolloutId)}),(0,O.jsx)(A,{label:`Group`,value:M(e.payload.rolloutGroupId)}),(0,O.jsx)(A,{label:`Policy`,value:`v${j(e.payload.policyVersion)??0}`}),(0,O.jsx)(A,{label:`Worker`,value:String((j(e.payload.workerSlot)??0)+1)}),(0,O.jsx)(A,{label:`Reward`,value:r==null?`Not eligible`:String(r)}),(0,O.jsx)(A,{label:`Failure class`,value:i??`None`}),(0,O.jsx)(A,{label:`Failure code`,value:a??`None`}),(0,O.jsx)(A,{label:`Components`,value:JSON.stringify(e.payload.rewardComponents??{})}),(0,O.jsx)(A,{label:`Tokens`,value:`${j(e.payload.inputTokens)??0} input · ${j(e.payload.outputTokens)??0} output`})]})]},e.id)})}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No managed attempts were recorded for this run.`})}function se({receipts:e}){let[t,n]=(0,D.useState)(!1);if(!e.length)return(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No on-policy rollout receipts were recorded for this run.`});let r=[...e].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),i=t?r:r.slice(0,24);return(0,O.jsxs)(`div`,{className:`training-rollout-receipts`,children:[e.length>24?(0,O.jsxs)(`div`,{className:`training-rollout-receipt-controls`,children:[(0,O.jsx)(`span`,{children:t?`Showing all ${e.length} receipts`:`Showing latest ${i.length} of ${e.length} receipts`}),(0,O.jsx)(`button`,{className:`training-text-button`,type:`button`,onClick:()=>n(e=>!e),children:t?`Show latest 24`:`Show all ${e.length}`})]}):null,i.map(e=>(0,O.jsxs)(`details`,{children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(`span`,{children:ce(e.providerTrace.rolloutId)}),(0,O.jsx)(`strong`,{children:e.status}),(0,O.jsx)(`em`,{children:e.reward.eligible&&e.reward.raw!=null?e.reward.raw.toFixed(3):e.failureClass??`not reward eligible`})]}),(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)(A,{label:`Correlation`,value:e.correlationId}),(0,O.jsx)(A,{label:`Task`,value:e.taskId}),(0,O.jsx)(A,{label:`Policy`,value:e.policy.modelId}),(0,O.jsx)(A,{label:`Checkpoint`,value:e.policy.checkpointId??`Provider initial policy`}),(0,O.jsx)(A,{label:`Environment`,value:`${e.environment.id}@${e.environment.version}`}),(0,O.jsx)(A,{label:`World`,value:`${e.environment.worldId} · ${e.environment.worldHash}`}),(0,O.jsx)(A,{label:`Raw reward`,value:e.reward.raw==null?`Not eligible`:String(e.reward.raw)}),(0,O.jsx)(A,{label:`Components`,value:JSON.stringify(e.reward.components)}),(0,O.jsx)(A,{label:`Outcome`,value:e.verifier?.outcome??e.failureClass??`Pending`}),(0,O.jsx)(A,{label:`Trace`,value:`${e.providerTrace.experimentId}/${e.providerTrace.rolloutId}`})]})]},e.id))]})}function A({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function j(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function M(e){return typeof e==`string`&&e?e:`Not recorded`}function ce(e){return e.replace(/^lineage_/,``).slice(0,18)}function le({detail:e,loading:t,pending:n=!1}){if(t&&!e)return(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`Loading evaluation results…`});let r=e?.evaluation;return r?(0,O.jsxs)(`div`,{className:`training-run-evaluation`,children:[(0,O.jsxs)(`div`,{className:`training-metric-summary`,children:[(0,O.jsx)(P,{label:`Base score`,value:ue(r.base.meanScore)}),(0,O.jsx)(P,{label:`Trained score`,value:ue(r.trained.meanScore)}),(0,O.jsx)(P,{label:`Score change`,value:fe(r.meanScoreDelta)}),(0,O.jsx)(P,{label:`Trained pass rate`,value:de(r.trained.passRate)})]}),r.base.count===0?(0,O.jsx)(`p`,{className:`training-muted`,children:`Base-model scoring was not imported for this earlier run. New runs retain both base and trained evaluations.`}):null,r.trained.count>0&&r.trained.scoredCount===0?(0,O.jsx)(`p`,{className:`training-muted`,children:`Outputs were captured, but the grader was unavailable, so this run has no evaluation score.`}):null,(0,O.jsx)(`div`,{className:`training-table-wrap`,children:(0,O.jsxs)(`table`,{className:`training-data-table training-evaluation-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Test example`}),(0,O.jsx)(`th`,{children:`Base`}),(0,O.jsx)(`th`,{children:`Trained`}),(0,O.jsx)(`th`,{children:`Result`})]})}),(0,O.jsx)(`tbody`,{children:r.examples.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:e.taskId}),(0,O.jsx)(N,{input:e.input,baseOutput:e.baseOutput,trainedOutput:e.trainedOutput,baseGrade:e.baseGrade,trainedGrade:e.trainedGrade})]})}),(0,O.jsx)(`td`,{children:pe(e.baseGrade)}),(0,O.jsx)(`td`,{children:pe(e.trainedGrade)}),(0,O.jsx)(`td`,{children:F(e.baseGrade,e.trainedGrade)})]},e.taskId))})]})})]}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:n?`Evaluation will appear here after the first eligible checkpoint is scored.`:`No scored evaluation results are available for this run.`})}function N({input:e,baseOutput:t,trainedOutput:n,baseGrade:r,trainedGrade:i}){let a=[...new Set([...r?.feedback??[],...i?.feedback??[]])];return(0,O.jsxs)(`div`,{className:`training-evaluation-output`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Input`}),(0,O.jsx)(`pre`,{children:JSON.stringify(e,null,2)})]}),t?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Base output`}),(0,O.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]}):null,n?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Trained output`}),(0,O.jsx)(`pre`,{children:JSON.stringify(n,null,2)})]}):null,a.length?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Grader feedback`}),(0,O.jsx)(`p`,{children:a.join(` `)})]}):null]})}function P({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`strong`,{children:t})]})}function ue(e){return e==null?`Not recorded`:e.toFixed(3)}function de(e){return e==null?`Not recorded`:`${Math.round(e*100)}%`}function fe(e){return e==null?`Not comparable`:`${e>=0?`+`:``}${e.toFixed(3)}`}function pe(e){return e?.status===`unavailable`?`Unavailable`:e?.score==null?`Not scored`:e.score.toFixed(3)}function F(e,t){if(!t)return`Not evaluated`;if(t.status===`unavailable`)return`Unavailable`;if(!e||e.score==null||t.score==null)return t.passed?`Passed`:`Failed`;let n=t.score-e.score;return Math.abs(n)<5e-4?`No change`:n>0?`Improved ${n.toFixed(3)}`:`Regressed ${Math.abs(n).toFixed(3)}`}function me({connection:e,lineageId:t,jobId:n,onSaved:r}){let i=n??t,a=n?`jobs`:`models`,[o,s]=(0,D.useState)(null),[c,l]=(0,D.useState)(0),[u,d]=(0,D.useState)(!0),[p,m]=(0,D.useState)(!1),[g,_]=(0,D.useState)(!1),[v,y]=(0,D.useState)(null),[b,x]=(0,D.useState)(null),[S,ee]=(0,D.useState)(``),[C,w]=(0,D.useState)(null),[te,ne]=(0,D.useState)([]),[re,ie]=(0,D.useState)(!1);(0,D.useEffect)(()=>{if(!e){d(!1),m(!1),y(`Connect to OpenPond to review this candidate.`);return}let t=!0;return d(!0),m(!1),y(null),ne([]),(async()=>{try{if(a===`models`){let n=await h.candidateReview(e,i);t&&n&&s(n)}let n=await h.candidateReview(e,i,!0,a);t&&(s(n),m(!!n))}catch(e){t&&y(I(e))}finally{t&&d(!1)}})(),()=>{t=!1}},[e,i,a,c]);function ae(e){x(e),ee(``),w(null)}async function oe(){if(!e||!o||!b||!S.trim())return;let t=C&&C.reason===S.trim()&&C.decision===b?C:{schemaVersion:`openpond.trainingCandidateDecisionRequest.v1`,...o.target,decision:b,reason:S.trim(),idempotencyKey:crypto.randomUUID(),expectedDecision:o.decision?{id:o.decision.id,contentHash:o.decision.contentHash}:null};w(t),_(!0),y(null);try{s(await h.recordCandidateReview(e,i,t,a)),x(null),w(null),ne([]),await r()}catch(e){y(I(e))}finally{_(!1)}}let T=(te.at(-1)??o?.decision)?.request.expectedDecision;async function E(){if(e&&T){ie(!0),y(null);try{let t=await h.candidateReviewHistory(e,i,T,a);ne(e=>[...e,t])}catch(e){y(I(e))}finally{ie(!1)}}}let k=o?.decision;return(0,O.jsxs)(`section`,{className:`training-run-evaluation`,"aria-label":`Candidate review`,children:[(0,O.jsx)(`h3`,{children:`Candidate review`}),k?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:k.request.decision===`accepted`?`Accepted`:`Rejected`}),(0,O.jsx)(`p`,{children:k.request.reason}),(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Review `,k.revision,` · `,new Date(k.decidedAt).toLocaleString()]})]}):(0,O.jsx)(`p`,{className:`training-muted`,children:u?`Loading candidate review…`:o?`No candidate decision recorded.`:`Candidate review unavailable.`}),o?(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Last synced `,new Date(o.syncedAt).toLocaleString(),`. Acceptance keeps this candidate for later use; serving is activated separately.`]}):null,v?(0,O.jsx)(f,{error:v}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:u||g,onClick:()=>l(e=>e+1),children:`Refresh review`}),(0,O.jsx)(`button`,{className:`training-button`,type:`button`,disabled:!p||u||g||k?.request.decision===`accepted`,onClick:()=>ae(`accepted`),children:`Accept candidate`}),(0,O.jsx)(`button`,{className:`training-button danger`,type:`button`,disabled:!p||u||g||k?.request.decision===`rejected`,onClick:()=>ae(`rejected`),children:`Reject candidate`})]}),te.map(e=>(0,O.jsxs)(`details`,{className:`training-evidence`,children:[(0,O.jsxs)(`summary`,{children:[`Review `,e.revision,` · `,e.request.decision]}),(0,O.jsx)(`p`,{children:e.request.reason}),(0,O.jsx)(`p`,{children:new Date(e.decidedAt).toLocaleString()})]},e.id)),T?(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:re||g,onClick:()=>void E(),children:re?`Loading…`:`Earlier review`}):null,b?(0,O.jsx)(`div`,{className:`training-dialog-backdrop`,role:`presentation`,onMouseDown:()=>!g&&x(null),children:(0,O.jsxs)(`section`,{className:`training-dialog training-promotion-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Review candidate`,onMouseDown:e=>e.stopPropagation(),children:[(0,O.jsx)(`div`,{className:`training-dialog-header`,children:(0,O.jsx)(`h2`,{children:b===`accepted`?`Accept this candidate?`:`Reject this candidate?`})}),(0,O.jsx)(`p`,{children:`The adapter and its recorded evaluation remain in the candidate’s history.`}),(0,O.jsxs)(`label`,{className:`training-promotion-reason`,children:[(0,O.jsx)(`span`,{children:`Reason`}),(0,O.jsx)(`textarea`,{autoFocus:!0,maxLength:5e3,value:S,onChange:e=>ee(e.target.value)})]}),v?(0,O.jsx)(f,{error:v}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:g,onClick:()=>x(null),children:`Cancel`}),(0,O.jsx)(`button`,{className:`training-button ${b===`rejected`?`danger`:``}`,type:`button`,disabled:g||!S.trim(),onClick:()=>void oe(),children:g?`Saving…`:C?`Retry save`:`Save decision`})]})]})}):null]})}function I(e){return e instanceof Error?e.message:`Candidate review could not be loaded.`}function he({connection:e,jobId:t,evaluations:n}){let[r,i]=(0,D.useState)(null),a=n.filter(e=>e.reference),o=a.find(e=>e.reference?.id===r)??a.filter(e=>e.kind===`candidate`).at(-1)??a[0];return!e||!o?.reference?null:(0,O.jsxs)(`section`,{className:`training-run-evaluation`,"aria-label":`Retained evaluation answers`,children:[(0,O.jsxs)(`label`,{className:`training-taskset-selector`,children:[(0,O.jsx)(`span`,{children:`Evaluation answers`}),(0,O.jsx)(`select`,{value:o.reference.id,onChange:e=>i(e.target.value),children:a.map(e=>(0,O.jsxs)(`option`,{value:e.reference.id,children:[e.kind===`baseline`?`Baseline`:`Candidate`,` · policy `,e.policyVersion]},e.reference.id))})]}),(0,O.jsx)(ge,{connection:e,jobId:t,evaluation:o.reference},`${t}:${o.reference.id}:${o.reference.contentHash}`)]})}function ge({connection:e,jobId:t,evaluation:n}){let[r,i]=(0,D.useState)(),[a,o]=(0,D.useState)([]),[s,c]=(0,D.useState)(null),[l,u]=(0,D.useState)(null),[d,p]=(0,D.useState)(!0),[m,g]=(0,D.useState)(0),{id:_,contentHash:v}=n;return(0,D.useEffect)(()=>{let n=!0;return p(!0),u(null),c(null),h.trainingEvaluationTasks(e,t,{id:_,contentHash:v},r).then(e=>{n&&c(e)}).catch(e=>{n&&u(e instanceof Error?e.message:String(e))}).finally(()=>{n&&p(!1)}),()=>{n=!1}},[e,t,_,v,r,m]),(0,O.jsxs)(`div`,{className:`training-run-evaluation`,"aria-busy":d,children:[d?(0,O.jsx)(`p`,{className:`training-muted`,children:`Loading recorded answers…`}):null,l?(0,O.jsx)(f,{error:l,children:(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,onClick:()=>g(e=>e+1),children:`Retry answers`})}):null,s?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Tasks `,s.offset+1,`–`,s.offset+s.tasks.length,` of`,` `,s.total,`. Recorded outputs and scores are retained for this run.`]}),s.tasks.map((e,t)=>(0,O.jsxs)(`details`,{className:`training-evidence`,children:[(0,O.jsxs)(`summary`,{children:[`Example `,s.offset+t+1,` · score `,e.score.toFixed(3)]}),(0,O.jsxs)(`div`,{className:`training-evaluation-output`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Instruction`}),(0,O.jsx)(`pre`,{children:e.input.instruction})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Context`}),(0,O.jsx)(`pre`,{children:JSON.stringify(e.input.context,null,2)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Recorded output`}),(0,O.jsx)(`pre`,{children:e.output})]})]})]},e.taskId))]}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:d||!a.length,onClick:()=>{i(a.at(-1)),o(e=>e.slice(0,-1))},children:`Previous tasks`}),(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:d||!s?.nextCursor,onClick:()=>{s?.nextCursor&&(o(e=>[...e,r]),i(s.nextCursor))},children:`Next tasks`})]})]})}var _e=new Set([`queued`,`starting`,`running`,`cancelling`,`reconciling`]),L=new WeakMap;function ve(e,t,n,r=!1){let[i,a]=(0,D.useState)(null),[o,s]=(0,D.useState)(!1),[c,l]=(0,D.useState)(null),u=(0,D.useRef)(t),d=(0,D.useRef)(null);u.current=t;let f=(0,D.useCallback)((n=r)=>{if(!e||!t)return Promise.resolve(null);let i=`${t}:${n?`full`:`live`}`;if(d.current?.key===i)return d.current.request;s(!0);let o=h.trainingRunDetail(e,t,{includeEvaluation:n}).then(r=>{let i=R(e),o=i.get(t),s=!n&&o?.includesEvaluation?{...r,evaluation:o.detail.evaluation}:r;return i.set(t,{detail:s,includesEvaluation:n||o?.includesEvaluation===!0}),u.current===t&&(a(s),l(null)),s}).catch(e=>(u.current===t&&l(e instanceof Error?e.message:String(e)),null)).finally(()=>{d.current?.request===o&&(d.current=null,s(!1))});return d.current={key:i,request:o},o},[e,r,t]);return(0,D.useEffect)(()=>{if(l(null),!e||!t){a(null);return}let n=R(e).get(t);a(n?.detail??null),f(r)},[e,r,t,n,f]),(0,D.useEffect)(()=>{if(!e||!t||!n||!_e.has(n))return;let r=window.setInterval(()=>void f(!1),2e3);return()=>window.clearInterval(r)},[e,t,n,f]),{detail:i,error:c,loading:o,refresh:f}}function R(e){let t=L.get(e);if(t)return t;let n=new Map;return L.set(e,n),n}function ye({title:e,status:t,statusValue:n,versionStatus:r,method:i,baseModel:a,taskset:o,compute:s,duration:c,output:l,reward:d,telemetry:f,evidence:p,configuration:m,children:h,failure:g,onOpenTaskset:v,showHeader:y=!0}){let b=f?.cost.providerReportedUsd??f?.cost.estimatedUsd??p?.cost.totalUsd??null;return(0,O.jsxs)(`div`,{className:`labs-model-run-summary`,children:[y?(0,O.jsx)(`section`,{className:`labs-run-outcome-card`,children:(0,O.jsx)(`header`,{children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`labs-run-title-row`,children:[(0,O.jsx)(`h2`,{children:e}),(0,O.jsx)(_,{label:t,value:n})]}),(0,O.jsxs)(`p`,{children:[U(i),` on `,a]})]})})}):null,h,(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Run setup`})}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(z,{label:`Training method`,value:i}),(0,O.jsx)(z,{label:`Base model`,value:a}),(0,O.jsx)(z,{label:`Compute`,value:s}),(0,O.jsx)(z,{label:`Output`,value:l}),r?(0,O.jsx)(z,{label:`Version status`,value:r}):null,(0,O.jsx)(z,{label:`Duration`,value:c}),(0,O.jsx)(z,{label:`Run cost`,value:b===null?`Not reported`:`$${b.toFixed(4)}`}),(0,O.jsx)(z,{label:`Final reward`,value:d===null?`Not reported`:d.toFixed(4)}),m.map(e=>(0,O.jsx)(z,{label:e.label,value:e.value},e.label)),f||p?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(B,{label:`GPU`,value:V(f,p)}),(0,O.jsx)(B,{label:`Tokens`,value:`${H(f?.usage.promptTokens??p?.usage.inputTokens??null)} prompt · ${H(f?.usage.generatedTokens??p?.usage.outputTokens??null)} generated`}),(0,O.jsx)(B,{label:`Trajectories`,value:`${H(f?.usage.successfulTrajectories??p?.reward.eligibleTrajectoryCount??null)} succeeded · ${H(f?.usage.failedTrajectories??(p?p.reward.trajectoryCount-p.reward.eligibleTrajectoryCount:null))} failed`}),(0,O.jsx)(B,{label:`Optimizer updates`,value:H(f?.usage.optimizerSteps??p?.progress.committedOptimizerSteps??null)}),(0,O.jsx)(B,{label:`GPU time`,value:f?.usage.gpuSeconds==null?`Not reported`:`${f.usage.gpuSeconds.toFixed(1)} seconds`})]}):(0,O.jsx)(z,{label:`Resource usage`,value:`Not retained for this run`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:`Taskset`}),(0,O.jsx)(`dd`,{children:v?(0,O.jsxs)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:v,children:[(0,O.jsx)(`span`,{children:o}),(0,O.jsx)(u,{"aria-hidden":`true`,size:14})]}):o})]})]})]}),g?(0,O.jsx)(`p`,{className:`labs-training-error`,children:g}):null]})}function z({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function B({label:e,value:t}){return(0,O.jsx)(z,{label:e,value:t})}function V(e,t){let n=e?.resource.gpuCount??t?.resource.gpuCount??null,r=e?.resource.gpuType??t?.resource.gpuType??null;return n===null&&r===null?`Not reported`:`${n??`Unknown`} × ${r?be(r):`Unreported`}`}function H(e){return e===null?`Not reported`:e.toLocaleString()}function U(e){return e===`RFT`?`Reinforcement fine-tuning`:`${e} training`}function be(e){return e.split(` · `).map(e=>e.replaceAll(`_`,` `).replace(/\b[a-z]/g,e=>e.toUpperCase())).join(` · `)}function W({receipt:e,onOpenConversation:t}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Inconclusive benchmark`})}),(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:e.reason}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(q,{label:`Held-out baseline tokens`,value:e.usage.baseline.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Adaptation baseline tokens`,value:e.usage.adaptation.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Refiner tokens`,value:e.usage.refiner.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Grader tokens`,value:e.usage.grader.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Observed / maximum spend`,value:`$${e.budget.observedSpendUsd.toFixed(4)} / $${e.budget.maximumSpendUsd.toFixed(2)}`}),(0,O.jsx)(q,{label:`Harness candidate`,value:e.stopReason===`candidate_harness_unchanged`?`Unchanged`:`Lineage invalid`}),(0,O.jsx)(q,{label:`Completed attempts`,value:e.attempts.length.toLocaleString()}),(0,O.jsx)(q,{label:`Candidate attempts`,value:`Skipped`})]})]}),e.attempts.length?(0,O.jsx)(K,{receipt:e,onOpenConversation:t}):null]})}function xe({run:e}){let t=[`baseline`,`adaptation`,`refiner`,`candidate_adaptation`,`candidate`,`comparison`],n={baseline:`Baseline`,adaptation:`Adaptation`,refiner:`Refiner`,candidate_adaptation:`Sequential adaptation`,candidate:`Candidate`,comparison:`Comparison`},r=Math.max(0,t.indexOf(e.evaluationProgress?.stage??`baseline`)),i=e.evaluationProgress?.completedAttempts??0,a=e.evaluationProgress?.totalAttempts??1;return(0,O.jsxs)(`div`,{className:`labs-benchmark-progress`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h3`,{children:`Benchmark progress`}),(0,O.jsxs)(`strong`,{children:[i,` of `,a,` attempts`]})]}),(0,O.jsx)(`div`,{className:`labs-benchmark-progress-track`,"aria-hidden":`true`,children:(0,O.jsx)(`span`,{style:{width:`${Math.min(100,i/a*100)}%`}})}),(0,O.jsx)(`ol`,{children:t.map((e,t)=>(0,O.jsxs)(`li`,{className:t<r?`complete`:t===r?`active`:void 0,children:[(0,O.jsx)(`span`,{}),n[e]]},e))})]})}function Se({receipt:e}){let t=T(e),n=t.pairs.filter(e=>e.cohort===`held_out`),r=t.pairs.filter(e=>e.cohort===`adaptation`),i=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0;return(0,O.jsxs)(`div`,{className:`labs-benchmark-attempt-charts`,children:[(0,O.jsx)(G,{title:`Held-out tokens by task`,baseline:n.map(e=>e.baseline.totalTokens),candidate:n.map(e=>e.refined.totalTokens),format:e=>Math.round(e).toLocaleString()}),(0,O.jsx)(G,{title:`Adaptation tokens by task`,baseline:r.map(e=>e.baseline.totalTokens),candidate:r.map(e=>e.refined.totalTokens),format:e=>Math.round(e).toLocaleString()}),(0,O.jsx)(G,{title:`Held-out quality by task`,baseline:n.map(e=>e.baseline.score),candidate:n.map(e=>e.refined.score),format:e=>e.toFixed(2),summarize:i}),(0,O.jsx)(G,{title:`Adaptation quality by task`,baseline:r.map(e=>e.baseline.score),candidate:r.map(e=>e.refined.score),format:e=>e.toFixed(2),summarize:i})]})}function Ce({receipt:e,run:t,tasksetName:n,onOpenTaskset:r}){let i=T(e),a=i.comparedTaskCount>0,s=i.passed,c=i.tokenDeltaPercent===null?`—`:`${i.tokenDeltaPercent>0?`+`:``}${i.tokenDeltaPercent.toFixed(2)}%`,l=e=>{let t=i.cohorts[e];return`${t.passedTaskCount}/${t.comparedTaskCount} passed`};return(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Token efficiency`})}),a?(0,O.jsxs)(`div`,{className:`labs-benchmark-efficiency-summary`,children:[(0,O.jsxs)(`strong`,{children:[i.passedTaskCount,` of `,i.comparedTaskCount,` tasks passed`]}),(0,O.jsxs)(`p`,{children:[`A task passes only when its refined token count is strictly lower than its own baseline. `,i.failedTaskCount,` failed this token-efficiency test; aggregate usage changed by `,c,`.`]})]}):(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:`Paired task-level token evidence is unavailable for this run.`}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(q,{label:`Execution`,value:o(t.status)}),(0,O.jsx)(q,{label:`Token-efficiency result`,value:s?`Passed`:`Failed`}),(0,O.jsx)(q,{label:`Efficiency passes`,value:`${i.passedTaskCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`Efficiency failures`,value:`${i.failedTaskCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`All-task foreground tokens`,value:`${i.baselineTokens.toLocaleString()} → ${i.refinedTokens.toLocaleString()}`}),(0,O.jsx)(q,{label:`Aggregate token change`,value:c}),(0,O.jsx)(q,{label:`Adaptation replay`,value:l(`adaptation`)}),(0,O.jsx)(q,{label:`Held-out replay`,value:l(`held_out`)}),(0,O.jsx)(q,{label:`Task quality`,value:`${i.baselinePassedCount}/${i.comparedTaskCount} → ${i.refinedPassedCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`Result lineage`,value:e.lineage.valid?`Valid`:`Invalid`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:`Taskset`}),(0,O.jsx)(`dd`,{children:r?(0,O.jsx)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:r,children:n}):n})]})]})]})}function G({title:e,baseline:t,candidate:n,format:r,summarize:i=e=>e.reduce((e,t)=>e+t,0)}){let a=t.filter(e=>e!==null),o=n.filter(e=>e!==null),s=Math.max(1,...a,...o),c=Math.max(2,t.length,n.length),l=e=>{let t=[],n=[];return e.forEach((e,r)=>{if(e===null){n.length&&t.push(n.join(` `)),n=[];return}let i=6+r/(c-1)*88,a=44-e/s*36;n.push(`${i},${a}`)}),n.length&&t.push(n.join(` `)),t},u=e=>e.flatMap((e,t)=>e===null?[]:[{x:6+t/(c-1)*88,y:44-e/s*36}]);return(0,O.jsxs)(`section`,{className:`labs-benchmark-line-chart`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h4`,{children:e}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`span`,{children:[`Baseline `,r(i(a))]}),(0,O.jsxs)(`span`,{children:[`Refined `,r(i(o))]})]})]}),(0,O.jsxs)(`svg`,{"aria-label":e,role:`img`,viewBox:`0 0 100 50`,preserveAspectRatio:`none`,children:[(0,O.jsx)(`line`,{x1:`6`,x2:`94`,y1:`44`,y2:`44`}),l(t).map((e,t)=>(0,O.jsx)(`polyline`,{className:`baseline`,points:e},`baseline-${t}`)),l(n).map((e,t)=>(0,O.jsx)(`polyline`,{className:`candidate`,points:e},`candidate-${t}`)),u(t).map((e,t)=>(0,O.jsx)(`circle`,{className:`baseline`,cx:e.x,cy:e.y,r:`1`},`baseline-point-${t}`)),u(n).map((e,t)=>(0,O.jsx)(`circle`,{className:`candidate`,cx:e.x,cy:e.y,r:`1`},`candidate-point-${t}`))]})]})}function K({receipt:e,onOpenConversation:t}){let n=e.schemaVersion===`openpond.modelEvaluationReceipt.v1`?b(e.attempts??[]):e.attempts??[];return(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:e.schemaVersion===`openpond.modelEvaluationReceipt.v1`?`Selected task results`:`Completed attempts`})}),(0,O.jsx)(`div`,{className:`training-table-wrap`,children:(0,O.jsxs)(`table`,{className:`training-data-table labs-benchmark-attempt-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Task`}),(0,O.jsx)(`th`,{children:`Phase`}),(0,O.jsx)(`th`,{children:`Result`}),(0,O.jsx)(`th`,{children:`Score`}),(0,O.jsx)(`th`,{children:`Tokens`}),(0,O.jsx)(`th`,{children:`Work chat`})]})}),(0,O.jsx)(`tbody`,{children:n.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:we(e.taskId)}),(0,O.jsx)(`td`,{children:e.phase}),(0,O.jsx)(`td`,{children:(0,O.jsx)(_,{label:e.passed?`Passed`:`Failed`,value:e.passed?`succeeded`:`failed`})}),(0,O.jsx)(`td`,{children:e.score===null?`—`:e.score.toFixed(2)}),(0,O.jsx)(`td`,{children:e.totalTokens.toLocaleString()}),(0,O.jsx)(`td`,{children:e.sessionId?(0,O.jsx)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:()=>t(e.sessionId),children:`Open chat`}):`Not retained`})]},`${e.phase}:${e.attemptId}`))})]})})]})}function we(e){return e.replace(/^(?:adaptation|frozen)-/,``).replaceAll(`-`,` `).replace(/^./,e=>e.toUpperCase())}function q({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function Te(e){let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(r===0?0:2)} ${t[r]}`}function Ee({error:e,events:t,loading:n,pending:r}){let[i,o]=(0,D.useState)(!1),[s,c]=(0,D.useState)({}),[u,f]=(0,D.useState)(!0),h=(0,D.useRef)(null),g=(0,D.useRef)(null),_=(0,D.useRef)(null),v=(0,D.useMemo)(()=>De(t),[t]),y=(0,D.useMemo)(()=>t.filter(e=>s[J(e)]??Y(J(e))),[t,s]),b=v.filter(e=>s[e.id]??Y(e.id)).length,x=v.length>0&&b===v.length,S=b>0&&!x;return(0,D.useEffect)(()=>{_.current&&(_.current.indeterminate=S)},[S]),(0,D.useEffect)(()=>{if(!i)return;let e=e=>{g.current?.contains(e.target)||o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[i]),(0,D.useLayoutEffect)(()=>{let e=h.current;e&&u&&(e.scrollTop=e.scrollHeight)},[e,u,r,y]),n&&!t.length?(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`Loading run events…`}):t.length?(0,O.jsxs)(`div`,{className:`training-event-log-shell`,children:[(0,O.jsxs)(`div`,{className:`training-event-log-toolbar`,children:[(0,O.jsx)(`div`,{children:(0,O.jsx)(`strong`,{children:`Activity log`})}),(0,O.jsxs)(`div`,{className:`training-event-filter`,ref:g,children:[(0,O.jsxs)(`button`,{"aria-expanded":i,"aria-haspopup":`menu`,className:`training-event-filter-trigger`,type:`button`,onClick:()=>o(e=>!e),children:[(0,O.jsx)(m,{"aria-hidden":`true`,size:14}),`Event types`,(0,O.jsxs)(`span`,{children:[b,`/`,v.length]}),(0,O.jsx)(l,{"aria-hidden":`true`,size:13})]}),i?(0,O.jsxs)(`div`,{"aria-label":`Filter training activity by event type`,className:`training-event-filter-menu`,role:`menu`,children:[(0,O.jsxs)(`label`,{className:`training-event-filter-option select-all`,children:[(0,O.jsx)(`input`,{checked:x,ref:_,type:`checkbox`,onChange:e=>{let t=e.currentTarget.checked;c(Object.fromEntries(v.map(e=>[e.id,t])))}}),(0,O.jsx)(`span`,{className:`training-event-filter-check`,children:(0,O.jsx)(p,{"aria-hidden":`true`,size:12})}),`Select all`]}),(0,O.jsx)(`div`,{className:`training-event-filter-options`,children:v.map(e=>{let t=s[e.id]??Y(e.id);return(0,O.jsxs)(`label`,{className:`training-event-filter-option`,children:[(0,O.jsx)(`input`,{checked:t,type:`checkbox`,onChange:t=>c(n=>({...n,[e.id]:t.currentTarget.checked}))}),(0,O.jsx)(`span`,{className:`training-event-filter-check`,children:(0,O.jsx)(p,{"aria-hidden":`true`,size:12})}),(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`small`,{children:e.count.toLocaleString()})]},e.id)})})]}):null]})]}),(0,O.jsxs)(`div`,{"aria-label":`Training activity log`,"aria-live":`polite`,className:`training-event-log`,ref:h,role:`log`,onScroll:e=>{let t=e.currentTarget,n=t.scrollHeight-t.scrollTop-t.clientHeight;f(n<=6)},children:[(0,O.jsxs)(`div`,{"aria-hidden":`true`,className:`training-event-log-header`,children:[(0,O.jsx)(`span`,{children:`Time`}),(0,O.jsx)(`span`,{children:`Event type`}),(0,O.jsx)(`span`,{children:`Details`})]}),y.map(e=>(0,O.jsxs)(`div`,{className:`training-event-log-line ${e.type}`,children:[(0,O.jsx)(`time`,{dateTime:e.timestamp,children:a(e.timestamp)}),(0,O.jsx)(`span`,{children:Oe(J(e))}),(0,O.jsx)(`code`,{children:X(e)})]},e.id)),r&&!e?(0,O.jsxs)(`div`,{className:`training-event-log-loading`,role:`status`,children:[(0,O.jsx)(d,{"aria-hidden":`true`,className:`spin`,size:14}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Waiting for new activity`})]}):null,y.length?null:(0,O.jsx)(`div`,{className:`training-event-log-empty`,children:`No events match the selected event types.`}),e?(0,O.jsxs)(`div`,{className:`training-event-log-line failure`,children:[(0,O.jsx)(`time`,{children:`—`}),(0,O.jsx)(`span`,{children:`Failure`}),(0,O.jsx)(`code`,{children:e})]}):null]})]}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:e??`No normalized run events were recorded.`})}function J(e){return typeof e.payload.remoteEventType==`string`&&e.payload.remoteEventType.trim()?e.payload.remoteEventType:typeof e.payload.telemetryType==`string`&&e.payload.telemetryType.trim()?e.payload.telemetryType:e.type}function De(e){let t=new Map;for(let n of e){let e=J(n);t.set(e,(t.get(e)??0)+1)}return[...t.entries()].map(([e,t])=>({id:e,count:t,label:Oe(e)})).sort((e,t)=>e.label.localeCompare(t.label))}function Y(e){return e!==`metric`&&!e.endsWith(`_metric`)}function Oe(e){return e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function X(e){let t=e.payload,n=Q(t.step),r=Q(t.maxSteps);if(typeof t.telemetryType==`string`){let e=typeof t.message==`string`?t.message:null,r=typeof t.errorCode==`string`?t.errorCode:null,i=typeof t.telemetrySource==`string`?` · ${t.telemetrySource}`:``;return`${e??t.telemetryType.replaceAll(`_`,` `)}${n==null?``:` · step ${n}`}${i}${r?` · ${r}`:``}`}if(typeof t.remoteEventType==`string`){let e=ke(t.remoteEventType),r=typeof t.remotePhase==`string`?Ae(t.remotePhase):null,i=typeof t.errorCode==`string`&&t.errorCode.trim()?t.errorCode.trim():null;return[e,r,n==null?null:`step ${n}`,i?`error ${i}`:null].filter(e=>!!e).join(` · `)}if(e.type===`start`)return typeof t.device==`string`?`Worker started on ${t.device}.`:`Worker started.`;if(e.type===`progress`&&n!=null)return r==null?`Step ${n}.`:`Step ${n} of ${r}.`;if(e.type===`metric`){let e=typeof t.metricKind==`string`?t.metricKind.replaceAll(`_`,` `):`metric`,r=[Z(`loss`,t.loss),Z(`reward`,t.meanReward??t.reward),Z(`policy loss`,t.policyLoss),Z(`value loss`,t.valueLoss),Z(`preference accuracy`,t.preferenceAccuracy,Me)].filter(e=>!!e),i=typeof t.failureClass==`string`?t.failureClass:null,a=typeof t.failureCode==`string`?t.failureCode:null,o=typeof t.metricId==`string`&&typeof t.value==`number`?` · ${t.metricId}: ${t.value.toPrecision(4)}`:``;return`${e}${n==null?``:` · step ${n}`}${o}${i?` · ${i}`:``}${a?` · ${a}`:``}${r.length?` · ${r.join(` · `)}`:``}`}if(e.type===`checkpoint`){let e=Q(t.policyVersion),n=Q(t.sizeBytes),r=[e==null?null:`policy ${e}`,n==null?null:Te(n),t.final===!0?`final`:null].filter(e=>!!e);return r.length?`Checkpoint committed · ${r.join(` · `)}.`:`Checkpoint committed.`}if(e.type===`complete`){let e=Q(t.artifactCount);return e==null?`Worker completed.`:`Worker completed with ${e} artifacts.`}return e.type===`failure`&&typeof t.message==`string`?t.message:Object.keys(t).length?JSON.stringify(t):`Recorded.`}function ke(e){return{drain:`Rollout drain`,infer:`Model inference`,materialize_checkpoint:`Checkpoint materialization`,optimizer_metric:`Optimizer metric`,provision_gpu:`GPU provisioning`,rollout_metric:`Rollout trajectory`,score_reward_model:`Reward scoring`,start_inference:`Policy server`,train_step:`Optimizer update`,upload_checkpoint:`Checkpoint upload`}[e]??je(e)}function Ae(e){return{committed:`committed`,completed:`completed`,eligible:`recorded`,failed:`failed`,running:`running`,succeeded:`succeeded`}[e]??je(e).toLocaleLowerCase()}function je(e){return e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function Z(e,t,n=e=>new Intl.NumberFormat(void 0,{maximumFractionDigits:4}).format(e)){let r=Q(t);return r==null?null:`${e} ${n(r)}`}function Q(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Me(e){return`${(e*100).toFixed(1)}%`}function Ne({connection:e,detailTab:t,onDetailTabChange:n,selectedEntryKey:a,workproduct:l,runs:u,training:d,onOpenDataset:f,onOpenConversation:p,detailKind:m}){let h=d.payload,[_,v]=(0,D.useState)(null),b=(0,D.useMemo)(()=>S(l,u,h),[u,h,l]),T=(0,D.useMemo)(()=>ne(l,u,h),[u,h,l]),E=(0,D.useMemo)(()=>ae(l,h),[h,l]),A=(0,D.useMemo)(()=>ee(l,u,h),[u,h,l]),j=(0,D.useMemo)(()=>new Map(A.map(e=>[e.id,e])),[A]),M=(0,D.useMemo)(()=>te(b,T),[b,T]).find(e=>e.key===a)??null,ce=a.startsWith(`model-run:`)?a.slice(10):null,N=ce?E.find(e=>e.id===ce)??null:M?.job?E.find(e=>e.id===M.job?.metadata.modelRunId)??null:null,P=M?.job??(N?h?.jobs.find(e=>e.id===N.id||e.metadata.modelRunId===N.id)??null:null),ue=h?.comparisonSeriesEntries.find(e=>e.modelRunId===N?.id||e.modelRunId===P?.metadata.modelRunId)??null,de=typeof P?.metadata.parentHostedArtifactId==`string`?`Prior hosted run`:Ue(h,ue),fe=(0,D.useMemo)(()=>{let e=ie(b,T,E);return x(e,N?.kind===`evaluation`?`evals`:`training`)},[b,E,N?.kind,T]),pe=fe.findIndex(e=>e.key===a||P!==null&&e.job?.id===P.id||N!==null&&e.lifecycleRun?.id===N.id),F=pe<0?null:fe.length-pe,I=M?.version??(N?.adapterArtifactLineageId?T.find(e=>e.lineage.id===N.adapterArtifactLineageId)??null:null),ge=(N?h?.modelVersions.find(e=>e.id===N.modelVersionId)?.baseModel.modelId:null)??h?.modelVersions.filter(e=>e.modelId===l.id&&e.kind===`base_reference`).sort((e,t)=>t.version-e.version)[0]?.baseModel.modelId??(typeof P?.metadata.baseModelId==`string`?P.metadata.baseModelId:null),_e=I?.lineage.frozenEvaluationArtifactId??null,L=I?.plan??(P?j.get(P.planId)??null:null),R=I?.taskset??re(h).find(e=>e.id===(N?.taskset.id??L?.tasksetId))??null,z=R?.name??(typeof P?.metadata.tasksetId==`string`?P.metadata.tasksetId:`Unavailable`),B=N?.method??L?.recipe.method??Re(P?.metadata),V=ve(e,P?.id??null,P?.status??null,t===`evaluation`),H=P?h?.rolloutReceipts.filter(e=>e.jobId===P.id)??[]:[],U=V.detail?.managedEvidence??null,be=V.detail?.events.some(e=>e.type===`metric`&&e.payload.metricKind===`rollout_trajectory`)??!1,W=oe({lifecycleRun:N,job:V.detail?.job??P}),xe=y(W),Se=N?.status===`failed`&&P?.metadata.phase===`artifact_collection_failed`,Ce=B===`grpo`,G=Fe(P?.metadata),K=(L&&(L.recipe.method===`sft`||L.recipe.method===`dpo`||L.recipe.method===`grpo`)?L.recipe.optimizer.maxSteps:null)??U?.progress.targetOptimizerSteps??null,we=K!==null&&typeof P?.metadata.progress==`number`&&Number.isFinite(P.metadata.progress)?Math.floor(Math.max(0,P.metadata.progress)*K):0,q=Math.max(0,G?.optimizerUpdatesApplied??0,we,V.detail?.policyMetrics.reduce((e,t)=>Math.max(e,t.step),0)??0,V.detail?.stepMetrics.reduce((e,t)=>Math.max(e,t.step),0)??0,U?.progress.committedOptimizerSteps??0),J=Pe(Ce&&G?G.groupsCompleted:q,Ce&&G?G.groupsTarget:K),De=m===`run`?{id:`details`,label:`Details`}:{id:`overview`,label:`Overview`},Y=[...m===`run`&&P?[{id:`metrics`,label:`Metrics`}]:[],De,...m===`version`&&P?[{id:`metrics`,label:`Metrics`}]:[],{id:`evaluation`,label:`Evaluation`},...H.length||be?[{id:`rollouts`,label:`Rollouts`}]:[],{id:`artifacts`,label:`Artifacts`},...P?[{id:`activity`,label:`Activity`}]:[]],Oe=t,X=Y.some(e=>e.id===Oe)?Oe:Y[0].id;return!M&&!N?(0,O.jsx)(`div`,{className:`labs-model-version-detail`,children:(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`This training attempt is no longer available.`})}):N?.kind===`evaluation`?(0,O.jsx)(Ie,{run:N,runNumber:F,tasksetName:R?.name??`Unavailable`,onOpenTaskset:R?()=>f(R.id):void 0,onOpenConversation:p}):(0,O.jsxs)(`div`,{className:`labs-model-version-detail`,children:[(0,O.jsx)(w,{title:N||P?F?`Run ${F}`:`Run details`:I?`Version ${I.number}`:`Run details`,description:`${i(B)} on ${Le(L,ge)}`,status:(0,O.jsx)(C,{status:W}),actions:xe&&(N||P)?(0,O.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:d.busyAction!==null||W===`cancelling`,onClick:async()=>{let e=N?.id??P.id,t=N?await d.actions.cancelModelRun(N.id):await d.actions.cancelJob(P.id);v({runId:e,message:t?`Cancellation requested. Waiting for the training service to confirm.`:`Cancellation could not be requested. Try again.`})},children:W===`cancelling`?`Cancelling…`:d.busyAction===`cancel-model-run`||d.busyAction===`cancel-job`?`Requesting cancellation…`:`Cancel run`}):Se&&N?(0,O.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:d.busyAction!==null,onClick:async()=>{let e=await d.actions.retryModelRunCollection(N.id);v({runId:N.id,message:e?.state===`succeeded`?`Outputs collected from the completed training job.`:`Collection failed. The training job and its outputs are retained.`})},children:d.busyAction===`retry-model-run-collection`?`Collecting…`:`Retry collection`}):void 0,metrics:[{label:Ce?`Training tasks`:`Training steps`,value:J.value},{label:`Final reward`,value:Be(N?.reward?.raw??U?.reward.finalMean??null)},{label:`Duration`,value:N?s(N.startedAt,r(N.status,N.completedAt,N.updatedAt)):P?s(P.startedAt,r(P.status,P.completedAt,P.updatedAt)):`Not recorded`},{label:`Output`,value:I?`Version ${I.number}`:`No version`},{label:`Based on`,value:de},{label:`Taskset`,value:z,onSelect:R?()=>f(R.id):void 0,ariaLabel:R?`Open Taskset ${R.name}`:void 0}]}),_&&_.runId===(N?.id??P?.id)?(0,O.jsx)(`p`,{role:`status`,children:_.message}):null,(0,O.jsxs)(`section`,{className:`labs-run-detail-tabs`,children:[(0,O.jsx)(`div`,{className:`training-detail-tabs`,role:`tablist`,"aria-label":`Run details`,children:Y.map(e=>(0,O.jsx)(`button`,{"aria-controls":`run-detail-panel-${e.id}`,"aria-selected":X===e.id,className:X===e.id?`active`:void 0,id:`run-detail-tab-${e.id}`,role:`tab`,type:`button`,onClick:()=>n(e.id),children:e.label},e.id))}),(0,O.jsxs)(`div`,{"aria-labelledby":`run-detail-tab-${X}`,className:`labs-run-detail-tab-panel`,id:`run-detail-panel-${X}`,role:`tabpanel`,children:[X===De.id?(0,O.jsx)(ye,{baseModel:Le(L,ge),compute:N?c(N.destinationId??``):L?c(L.destinationId):P?c(P.destinationId):`Not recorded`,duration:N?s(N.startedAt,r(N.status,N.completedAt,N.updatedAt)):P?s(P.startedAt,r(P.status,P.completedAt,P.updatedAt)):`Not recorded`,failure:P?.error??N?.failure??null,configuration:[...He(h,ue),...Ve(L)],evidence:U,method:i(B),output:I?`Version ${I.number}`:`No version created`,reward:N?.reward?.raw??U?.reward.finalMean??null,status:N?o(N.status):P?o(P.status):`Imported`,statusValue:N?.status??P?.status??`imported`,taskset:z,telemetry:N?.receipt?.schemaVersion===`openpond.modelRunReceipt.v1`?N.receipt.telemetry:null,title:N||P?F?`Run ${F}`:`Run details`:I?`Version ${I.number}`:`Run details`,versionStatus:I?I.current?`Active`:`Available`:null,onOpenTaskset:R?()=>f(R.id):void 0,showHeader:!1}):null,X===`metrics`&&P?(0,O.jsx)(g,{detail:V.detail,error:V.error,loading:V.loading,taskset:R}):null,X===`artifacts`?(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)($,{label:`Training attempt`,value:P?.id??`Provider import`}),(0,O.jsx)($,{label:`Taskset`,value:z}),(0,O.jsx)($,{label:`Prepared data`,value:P?.bundleHash??`Provider managed`}),(0,O.jsx)($,{label:`Version ID`,value:I?.lineage.id??`No version created`}),U?.checkpoint?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)($,{label:`Checkpoint`,value:U.checkpoint.id}),(0,O.jsx)($,{label:`Checkpoint size`,value:U.checkpoint.sizeBytes==null?`Not reported`:Te(U.checkpoint.sizeBytes)}),(0,O.jsx)($,{label:`Checkpoint hash`,value:U.checkpoint.sha256??`Not reported`})]}):null,U?.canonicalPublication.state?(0,O.jsx)($,{label:`Registry publication`,value:Ge(U.canonicalPublication.state)}):null]}):null,X===`evaluation`?(0,O.jsxs)(`div`,{className:`training-run-evaluation`,children:[!U?.evaluations.length||V.detail?.evaluation?(0,O.jsx)(le,{detail:V.detail,loading:V.loading,pending:xe}):null,!V.detail?.evaluation&&U?.evaluations.length?(0,O.jsx)(`dl`,{className:`labs-inline-facts`,children:U.evaluations.map(e=>(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)($,{label:e.kind===`baseline`?`Baseline score`:`Candidate score`,value:e.score==null?`Not reported`:e.score.toFixed(6)}),(0,O.jsx)($,{label:e.kind===`baseline`?`Baseline coverage`:`Candidate coverage`,value:e.taskCount==null?`Not reported`:e.targetTaskCount==null?`${e.taskCount} ${e.taskCount===1?`task`:`tasks`} scored`:`${e.taskCount} of ${e.targetTaskCount} ${e.targetTaskCount===1?`task`:`tasks`} scored`})]},`${e.kind}:${e.policyVersion}`))}):null,I&&P?.destinationId===`openpond_managed`?(0,O.jsx)(me,{connection:e,lineageId:I.lineage.id,onSaved:d.refresh},I.lineage.id):null,!I&&P?.metadata.source===`hosted_model_project_import`&&P.status===`succeeded`?(0,O.jsx)(me,{connection:e,jobId:P.id,onSaved:d.refresh},`candidate:${P.id}`):null,P&&U?.evaluations.length?(0,O.jsx)(he,{connection:e,jobId:P.id,evaluations:U.evaluations},P.id):null,_e?(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,onClick:()=>void d.actions.downloadArtifact(_e),children:`Download evaluation receipt`}):null]}):null,X===`rollouts`?H.length?(0,O.jsx)(se,{receipts:H}):(0,O.jsx)(k,{events:V.detail?.events??[]}):null,X===`activity`&&P?(0,O.jsx)(Ee,{error:P.error??V.error,events:V.detail?.events??[],loading:V.loading,pending:xe}):null]})]})]})}function Pe(e,t){let n=Math.max(0,Math.floor(e));if(t===null||!Number.isFinite(t)||t<=0)return{value:n.toLocaleString(),hint:n===1?`completed update`:`completed updates`};let r=Math.max(1,Math.floor(t));return{value:`${n.toLocaleString()} / ${r.toLocaleString()}`,hint:`completed / planned`}}function Fe(e){let t=e?.rolloutProgress;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;return[`groupsCompleted`,`groupsTarget`,`optimizerUpdatesApplied`,`optimizerUpdatesSkipped`].some(e=>typeof n[e]!=`number`||!Number.isInteger(n[e])||n[e]<0)?null:{groupsCompleted:n.groupsCompleted,groupsTarget:n.groupsTarget,optimizerUpdatesApplied:n.optimizerUpdatesApplied,optimizerUpdatesSkipped:n.optimizerUpdatesSkipped}}function Ie({run:e,runNumber:t,tasksetName:n,onOpenTaskset:r,onOpenConversation:i}){let[s,c]=(0,D.useState)(`results`),l=e.receipt?.schemaVersion===`openpond.modelEvaluationReceipt.v1`?e.receipt:null,u=e.receipt?.schemaVersion===`openpond.modelEvaluationStopReceipt.v1`?e.receipt:null,d=l?E(l):null,f=l?T(l):null;return(0,O.jsxs)(`div`,{className:`labs-model-version-detail labs-model-evaluation-detail`,children:[(0,O.jsx)(w,{title:t?`Eval ${t}`:`Evaluation run`,description:`Harness Refiner benchmark · ${n}`,status:(0,O.jsx)(_,{label:l?f?.comparedTaskCount?`${f.passedTaskCount}/${f.comparedTaskCount} passed`:`No paired result`:u?`Inconclusive`:o(e.status),value:l?f?.comparedTaskCount&&f.passed?`succeeded`:`neutral`:u?.terminalClassification??e.status}),metrics:[{label:`Baseline pass rate`,value:l?`${(l.quality.baselinePassRate*100).toFixed(1)}%`:`—`},{label:`Candidate pass rate`,value:l?`${(l.quality.candidatePassRate*100).toFixed(1)}%`:`—`},{label:`Scenarios`,value:l?.attempts?.length??0},{label:`Execution`,value:o(e.status)}]}),(0,O.jsx)(`div`,{className:`training-detail-tabs`,role:`tablist`,"aria-label":`Evaluation details`,children:[`results`,`scenarios`,`activity`].map(e=>(0,O.jsx)(`button`,{className:s===e?`active`:void 0,"aria-selected":s===e,role:`tab`,type:`button`,onClick:()=>c(e),children:e===`results`?`Results`:e===`scenarios`?`Scenarios`:`Activity`},e))}),s===`results`&&l?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(v,{series:[{id:`baseline`,label:`Held-out baseline`,inputTokens:d.baseline.inputTokens,outputTokens:d.baseline.outputTokens,tokens:d.baseline.totalTokens,passRate:l.quality.baselinePassRate,costUsd:d.baseline.costUsd},{id:`candidate`,label:`Held-out refined`,inputTokens:d.candidate.inputTokens,outputTokens:d.candidate.outputTokens,tokens:d.candidate.totalTokens,passRate:l.quality.candidatePassRate,costUsd:d.candidate.costUsd}]}),(0,O.jsx)(v,{series:[{id:`adaptation-baseline`,label:`Adaptation baseline`,inputTokens:d.adaptation.inputTokens,outputTokens:d.adaptation.outputTokens,tokens:d.adaptation.totalTokens,passRate:l.quality.adaptationBaselinePassRate,costUsd:d.adaptation.costUsd},{id:`adaptation-candidate`,label:`Adaptation replay`,inputTokens:d.candidate_adaptation.inputTokens,outputTokens:d.candidate_adaptation.outputTokens,tokens:d.candidate_adaptation.totalTokens,passRate:l.quality.adaptationCandidatePassRate,costUsd:d.candidate_adaptation.costUsd}]}),(0,O.jsx)(Ce,{receipt:l,run:e,tasksetName:n,onOpenTaskset:r})]}):s===`results`&&u?(0,O.jsx)(W,{receipt:u,onOpenConversation:i}):s===`results`?(0,O.jsx)(`section`,{className:`labs-run-summary-card`,children:e.failure?(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:e.failure}):(0,O.jsx)(xe,{run:e})}):null,s===`scenarios`&&l?(0,O.jsxs)(O.Fragment,{children:[(l.attempts??[]).length?(0,O.jsx)(Se,{receipt:l}):null,(l.attempts??[]).length?(0,O.jsx)(K,{receipt:l,onOpenConversation:i}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No per-scenario attempts were retained.`})]}):null,s===`activity`?(0,O.jsxs)(`dl`,{className:`labs-inline-facts`,children:[(0,O.jsx)($,{label:`Run ID`,value:e.id}),(0,O.jsx)($,{label:`Status`,value:o(e.status)}),(0,O.jsx)($,{label:`Started`,value:e.startedAt?a(e.startedAt):`Not started`}),(0,O.jsx)($,{label:`Completed`,value:e.completedAt?a(e.completedAt):`In progress`})]}):null]})}function Le(e,t=null){if(!e)return t?ze(t):`Not recorded`;let n=e.recipe.method===`sft`||e.recipe.method===`grpo`?e.recipe.baseModel:e.recipe.method===`dpo`?e.recipe.policyModel:e.recipe.method===`ppo`?e.recipe.policyOptimization.policyModel:null;return n?ze(n.id):`Not recorded`}function Re(e){let t=e?.trainingMethod;return t===`sft`||t===`dpo`||t===`grpo`||t===`ppo`||t===`sdft`||t===`opd`||t===`opsd`||t===`sdpo`?t:null}function ze(e){return e.split(`/`).at(-1)??e}function Be(e){return e===null?`Not reported`:e.toFixed(4)}function Ve(e){if(!e)return[];let t=e.recipe;return t.method===`grpo`?[{label:`LoRA rank`,value:String(t.lora.rank)},{label:`Learning rate`,value:We(t.optimizer.learningRate)},{label:`Optimizer steps`,value:String(t.optimizer.maxSteps)},{label:`Rollouts per update`,value:String(t.rollout.groupSize)},{label:`Rollout concurrency`,value:String(t.rollout.concurrency)},{label:`Max output tokens`,value:t.rollout.maxOutputTokens.toLocaleString()},{label:`Temperature`,value:String(t.rollout.temperature)},{label:`Top P`,value:String(t.rollout.topP)}]:t.method===`sft`||t.method===`dpo`?[{label:`LoRA rank`,value:String(t.lora.rank)},{label:`Learning rate`,value:We(t.optimizer.learningRate)},{label:`Optimizer steps`,value:String(t.optimizer.maxSteps)}]:[]}function He(e,t){if(!e||!t)return[];if(t.parent.kind===`base_model`)return[{label:`Starting checkpoint`,value:`Frozen base · ${t.parent.revision}`},{label:`Optimizer`,value:`Fresh`}];let n=e.modelVersions.find(e=>e.id===t.parent.id);return[{label:`Starting checkpoint`,value:[e.comparisonSeriesEntries.find(e=>e.seriesId===t.seriesId&&e.modelVersionId===t.parent.id)?.label??null,n?`Version ${n.version}`:t.parent.id].filter(e=>!!e).join(` · `)},{label:`Optimizer`,value:`Fresh`}]}function Ue(e,t){if(!e||!t||t.parent.kind===`base_model`)return`Frozen base`;let n=e.comparisonSeriesEntries.find(e=>e.seriesId===t.seriesId&&e.modelVersionId===t.parent.id),r=e.modelVersions.find(e=>e.id===t.parent.id);return[n?.label??`Prior checkpoint`,r?`Version ${r.version}`:null].filter(e=>!!e).join(` · `)}function We(e){return e===0?`0`:e.toExponential(2)}function $({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function Ge(e){return e?e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase()):`Pending`}export{Ne as LabModelVersionDetailPage};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{L as r,R as i}from"./training-model-data-14942K_Z.js";import{t as a}from"./image-CY-sHbfQ.js";import{t as o}from"./loader-circle-cyf35w3i.js";import{t as s}from"./maximize-2-DgF6ZVOM.js";import{t as c}from"./x-IPhrr4ju.js";import{Ht as l,cn as u,wn as d}from"./App-DHJVXTI2.js";var f=e(t(),1),p=n();function m({connection:e,expanded:t,selection:n,onClose:i,onResizeStart:u,onToggleExpanded:m}){let v=`${n.scope}:${n.name}`,[y,b]=(0,f.useState)({selectionKey:v,path:n.files[0]??`SKILL.md`}),x=y.selectionKey===v&&n.files.includes(y.path)?y.path:n.files[0]??`SKILL.md`,[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),[E,D]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(!e){C(null),T(`Connect to the local OpenPond server to load this skill source.`);return}let t=!1;return D(!0),T(null),C(null),d.skillSourceFile(e,n.scope,n.name,x).then(e=>{t||C(e)}).catch(e=>{t||T(e instanceof Error?e.message:String(e))}).finally(()=>{t||D(!1)}),()=>{t=!0}},[e,x,n.name,n.scope]);let O=x.split(`/`).at(-1)??x;return(0,p.jsxs)(`aside`,{className:`workspace-diff-panel native-skill-sidebar lab-skill-sidebar ${t?`expanded`:``}`,"aria-label":`Skill package source: ${n.name}`,children:[t?null:(0,p.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize skill source`,onPointerDown:u}),(0,p.jsxs)(`div`,{className:`workspace-diff-topbar native-skill-sidebar-topbar`,children:[(0,p.jsx)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Selected skill file`,children:(0,p.jsxs)(`button`,{className:`workspace-diff-tab active`,type:`button`,role:`tab`,"aria-selected":!0,children:[(0,p.jsx)(g,{path:x}),(0,p.jsx)(`span`,{children:O})]})}),(0,p.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,p.jsx)(`button`,{className:`diff-icon-button`,type:`button`,title:t?`Dock sidebar`:`Expand sidebar`,"aria-label":t?`Dock sidebar`:`Expand sidebar`,onClick:m,children:t?(0,p.jsx)(r,{size:14}):(0,p.jsx)(s,{size:14})}),(0,p.jsx)(`button`,{className:`diff-icon-button`,type:`button`,title:`Close skill source`,"aria-label":`Close skill source`,onClick:i,children:(0,p.jsx)(c,{size:14})})]})]}),(0,p.jsxs)(`div`,{className:`lab-skill-source-layout`,children:[(0,p.jsxs)(`nav`,{className:`lab-skill-file-list`,"aria-label":`${n.name} package files`,children:[(0,p.jsx)(`div`,{className:`lab-skill-file-list-heading`,children:`Package files`}),n.files.map(e=>(0,p.jsxs)(`button`,{"aria-current":e===x?`page`:void 0,className:e===x?`active`:void 0,type:`button`,title:e,onClick:()=>b({selectionKey:v,path:e}),children:[(0,p.jsx)(g,{path:e}),(0,p.jsx)(`span`,{children:e})]},e))]}),(0,p.jsxs)(`div`,{className:`native-skill-sidebar-body lab-skill-source-body`,children:[(0,p.jsxs)(`header`,{className:`native-skill-source-header`,children:[(0,p.jsxs)(`div`,{className:`lab-skill-source-title-row`,children:[(0,p.jsx)(`h2`,{children:n.name}),(0,p.jsx)(`span`,{children:h(n.scope)})]}),(0,p.jsx)(`p`,{children:n.description}),(0,p.jsx)(`code`,{children:n.packagePath})]}),E?(0,p.jsxs)(`div`,{className:`lab-skill-source-state`,children:[(0,p.jsx)(o,{className:`spin`,size:16}),` Loading source…`]}):w?(0,p.jsx)(l,{error:w}):S?.isBinary?(0,p.jsxs)(`div`,{className:`lab-skill-source-state`,children:[(0,p.jsx)(a,{size:18}),`Binary asset · `,_(S.byteSize)]}):(0,p.jsx)(`pre`,{className:`native-skill-markdown-source`,"aria-label":`${O} source`,children:(0,p.jsx)(`code`,{children:S?.content??``})})]})]})]})}function h(e){return e===`codex`?`Codex skill`:e===`extension`?`GitHub extension`:`OpenPond skill`}function g({path:e}){let t=e.split(`.`).at(-1)?.toLowerCase();return[`avif`,`gif`,`jpeg`,`jpg`,`png`,`webp`].includes(t??``)?(0,p.jsx)(a,{size:14}):[`md`,`txt`,`yaml`,`yml`].includes(t??``)?(0,p.jsx)(u,{size:14}):(0,p.jsx)(i,{size:14})}function _(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}export{m as LabSkillSidebar};