openpond 0.2.58 → 0.2.59

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 (290) hide show
  1. package/dist/app-server.d.ts +1 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{actions-command-QU4H53OG.js → actions-command-JJ3CU7J6.js} +1 -1
  4. package/dist/chunks/{app-layer-NSTE5HIT.js → app-layer-KAUZAHGE.js} +1 -1
  5. package/dist/chunks/{app-server-connected-apps-JHGWLBXT.js → app-server-connected-apps-SXGZOUJJ.js} +1 -1
  6. package/dist/chunks/{app-server-evaluations-K52NAQLP.js → app-server-evaluations-N4OMTPCI.js} +1 -1
  7. package/dist/chunks/{app-server-harness-services-QMUOEYOA.js → app-server-harness-services-DDFUMNYC.js} +1 -1
  8. package/dist/chunks/app-server-runtime-SVB6L26M.js +2 -0
  9. package/dist/chunks/{apps-BKTOR4F7.js → apps-EZB56RHV.js} +1 -1
  10. package/dist/chunks/{chunk-SDXFLO7J.js → chunk-22VMH6JV.js} +1 -1
  11. package/dist/chunks/{chunk-FTEOCCPB.js → chunk-25JDHAZ5.js} +1 -1
  12. package/dist/chunks/{chunk-HDGTHRY7.js → chunk-2G4BEISF.js} +1 -1
  13. package/dist/chunks/{chunk-O72BSKSO.js → chunk-2L5XWJJ5.js} +1 -1
  14. package/dist/chunks/{chunk-QL4OIPEZ.js → chunk-2RNQQNB7.js} +2 -2
  15. package/dist/chunks/{chunk-O6ULLQJ6.js → chunk-2WKUBGIF.js} +1 -1
  16. package/dist/chunks/{chunk-F4KOGISR.js → chunk-37MWETFU.js} +1 -1
  17. package/dist/chunks/{chunk-D74JEERO.js → chunk-3CDEBKSU.js} +1 -1
  18. package/dist/chunks/{chunk-APB4O67E.js → chunk-4EDIRCD3.js} +1 -1
  19. package/dist/chunks/{chunk-JYKRR7E5.js → chunk-4GPXTISD.js} +1 -1
  20. package/dist/chunks/chunk-57TRXBLT.js +3 -0
  21. package/dist/chunks/{chunk-LQQNBVEB.js → chunk-76M2MEHV.js} +1 -1
  22. package/dist/chunks/{chunk-HCYX6RHP.js → chunk-776WNDV2.js} +1 -1
  23. package/dist/chunks/{chunk-RWWE5OXU.js → chunk-7AVNZF36.js} +1 -1
  24. package/dist/chunks/{chunk-65PL62KH.js → chunk-7K7O3CKY.js} +1 -1
  25. package/dist/chunks/chunk-7UH4YDA7.js +3 -0
  26. package/dist/chunks/{chunk-IIZ4CWBX.js → chunk-ABZ2ZOLU.js} +1 -1
  27. package/dist/chunks/{chunk-ZRDGQDZL.js → chunk-ANFDRKUU.js} +1 -1
  28. package/dist/chunks/{chunk-JUHZ5S3R.js → chunk-AQD7K4Z5.js} +1 -1
  29. package/dist/chunks/{chunk-4D7HWVWD.js → chunk-ARLOVWQ3.js} +1 -1
  30. package/dist/chunks/{chunk-7SC46OFC.js → chunk-ATAOHSFR.js} +1 -1
  31. package/dist/chunks/{chunk-TTVS6JMC.js → chunk-BE6SS65L.js} +2 -2
  32. package/dist/chunks/{chunk-Z54O534A.js → chunk-BGJYITVI.js} +1 -1
  33. package/dist/chunks/{chunk-BLXEAZCQ.js → chunk-BL3YH2QU.js} +1 -1
  34. package/dist/chunks/{chunk-2D4Y3HNW.js → chunk-BO5JZYWG.js} +1 -1
  35. package/dist/chunks/{chunk-ZGTOK7ZK.js → chunk-BQS7Z4AP.js} +1 -1
  36. package/dist/chunks/{chunk-NH6UUX5S.js → chunk-BRORSFJX.js} +3 -3
  37. package/dist/chunks/{chunk-HPBQ4VTW.js → chunk-BVQWVIGK.js} +1 -1
  38. package/dist/chunks/{chunk-SWUEFLOH.js → chunk-C37PUHA6.js} +1 -1
  39. package/dist/chunks/{chunk-3VUATFZD.js → chunk-CGWA54LE.js} +1 -1
  40. package/dist/chunks/{chunk-NC27T4AB.js → chunk-CKMSBAI2.js} +1 -1
  41. package/dist/chunks/{chunk-TJ6GVTYB.js → chunk-COHMDT7A.js} +7 -7
  42. package/dist/chunks/{chunk-JDEEWOD7.js → chunk-DPHAN6N3.js} +1 -1
  43. package/dist/chunks/{chunk-YOQRYNLP.js → chunk-DZUN5YWB.js} +1 -1
  44. package/dist/chunks/{chunk-ROGF26KV.js → chunk-E72UU4VX.js} +1 -1
  45. package/dist/chunks/{chunk-ABD5M2D2.js → chunk-EOBHQ3JT.js} +1 -1
  46. package/dist/chunks/chunk-EQOV34UH.js +2 -0
  47. package/dist/chunks/chunk-EUMXMT3S.js +2 -0
  48. package/dist/chunks/{chunk-773TH7FN.js → chunk-EWOSLZDX.js} +1 -1
  49. package/dist/chunks/{chunk-HIOKCIL7.js → chunk-FAYASU7Z.js} +1 -1
  50. package/dist/chunks/{chunk-EIRYMSEG.js → chunk-FKJHEZCW.js} +1 -1
  51. package/dist/chunks/{chunk-Q2QL6UWN.js → chunk-GL3NX3F3.js} +1 -1
  52. package/dist/chunks/{chunk-UKMA4R6X.js → chunk-GOPFFQZU.js} +1 -1
  53. package/dist/chunks/{chunk-RAXOSUSW.js → chunk-GUOLMLZN.js} +1 -1
  54. package/dist/chunks/{chunk-YNH3NMPF.js → chunk-GVZLGS2U.js} +1 -1
  55. package/dist/chunks/chunk-GYJQKCEO.js +5 -0
  56. package/dist/chunks/{chunk-XDQMGUWL.js → chunk-H7ATCPPB.js} +1 -1
  57. package/dist/chunks/{chunk-XX6SMFDY.js → chunk-IFDALGZE.js} +4 -4
  58. package/dist/chunks/{chunk-H4QHIHMK.js → chunk-IRV6GWGG.js} +3 -3
  59. package/dist/chunks/chunk-JFXINDOQ.js +3 -0
  60. package/dist/chunks/{chunk-PRGBLQVH.js → chunk-JMBQYBPI.js} +1 -1
  61. package/dist/chunks/{chunk-DBK66CJP.js → chunk-JQKSXCAJ.js} +1 -1
  62. package/dist/chunks/{chunk-DARVPBZ4.js → chunk-JUQMSHNR.js} +1 -1
  63. package/dist/chunks/{chunk-3Z47M3YY.js → chunk-K44RHALX.js} +1 -1
  64. package/dist/chunks/{chunk-4EPSHPZL.js → chunk-KO3HNMLJ.js} +1 -1
  65. package/dist/chunks/{chunk-4NESNOK5.js → chunk-LNCHFVHT.js} +1 -1
  66. package/dist/chunks/{chunk-7E6T7GP5.js → chunk-LPWBIGKW.js} +1 -1
  67. package/dist/chunks/{chunk-X2HIHF2I.js → chunk-MFMYWZK2.js} +1 -1
  68. package/dist/chunks/{chunk-A6USMRWK.js → chunk-MMQRHR3V.js} +1 -1
  69. package/dist/chunks/{chunk-I7AQMAQI.js → chunk-MNC4YUDI.js} +6 -6
  70. package/dist/chunks/{chunk-RNQF63ZR.js → chunk-N6ENLEMY.js} +2 -2
  71. package/dist/chunks/{chunk-JAJ46T5X.js → chunk-NTB2O4RP.js} +1 -1
  72. package/dist/chunks/{chunk-OQKJGTTO.js → chunk-O3RF72BT.js} +1 -1
  73. package/dist/chunks/{chunk-JE7RJZOA.js → chunk-O4VIXU7A.js} +1 -1
  74. package/dist/chunks/{chunk-5MCNZCVQ.js → chunk-OLDK2LKJ.js} +1 -1
  75. package/dist/chunks/{chunk-VVCKLCF3.js → chunk-OX3XZKGK.js} +2 -2
  76. package/dist/chunks/{chunk-SDAUS5PY.js → chunk-P2RSBSCT.js} +1 -1
  77. package/dist/chunks/{chunk-EKM2D7JU.js → chunk-PFSMXKTI.js} +1 -1
  78. package/dist/chunks/{chunk-FUOEIDMA.js → chunk-PH6IORGZ.js} +1 -1
  79. package/dist/chunks/{chunk-L3KCP52O.js → chunk-PQJTYOR2.js} +1 -1
  80. package/dist/chunks/{chunk-OLLLZVHF.js → chunk-PY6K2JRH.js} +1 -1
  81. package/dist/chunks/{chunk-EYPCBBMS.js → chunk-RBZH6A6M.js} +1 -1
  82. package/dist/chunks/{chunk-6QSSIT62.js → chunk-RZUEVS64.js} +1 -1
  83. package/dist/chunks/{chunk-Q5LEXXJG.js → chunk-SF5HJ7PL.js} +4 -4
  84. package/dist/chunks/{chunk-NHQ36THU.js → chunk-TG7P7BSV.js} +1 -1
  85. package/dist/chunks/{chunk-G3RXYI2L.js → chunk-TIHXUKFD.js} +1 -1
  86. package/dist/chunks/{chunk-QOGJAQDO.js → chunk-TKLBP3MM.js} +1 -1
  87. package/dist/chunks/{chunk-M4JWQSV7.js → chunk-U2MAPON2.js} +1 -1
  88. package/dist/chunks/chunk-U5FKRYJO.js +86 -0
  89. package/dist/chunks/{chunk-QNG27G3T.js → chunk-V34H7Y2T.js} +2 -2
  90. package/dist/chunks/chunk-VGRMAGOK.js +9 -0
  91. package/dist/chunks/chunk-VRODAXFS.js +145 -0
  92. package/dist/chunks/{chunk-EIEZHFIW.js → chunk-WC42WOLG.js} +1 -1
  93. package/dist/chunks/{chunk-OS3LO5J3.js → chunk-WRI4XKSK.js} +1 -1
  94. package/dist/chunks/{chunk-4EQA2M7K.js → chunk-XJZSIXEO.js} +2 -2
  95. package/dist/chunks/{chunk-25MBPJVY.js → chunk-XMKCCLGB.js} +1 -1
  96. package/dist/chunks/{chunk-HZEIRHEB.js → chunk-XMWXH7TS.js} +1 -1
  97. package/dist/chunks/chunk-YCQSVHCD.js +9 -0
  98. package/dist/chunks/{chunk-B7RFL4N2.js → chunk-YHHF4Q7Y.js} +1 -1
  99. package/dist/chunks/{chunk-DMVD2RFZ.js → chunk-ZAN4DYLH.js} +1 -1
  100. package/dist/chunks/{chunk-5IPFI25K.js → chunk-ZH3K7LKQ.js} +1 -1
  101. package/dist/chunks/cli-5DFVQL5Y.js +2 -0
  102. package/dist/chunks/{configuration-command-6C5UO7GE.js → configuration-command-JS6U3RMC.js} +1 -1
  103. package/dist/chunks/connected-app-executor-UBMGMV76.js +2 -0
  104. package/dist/chunks/{connected-evidence-GH2ATNEX.js → connected-evidence-NLAIEVQ3.js} +1 -1
  105. package/dist/chunks/connection-NZSD3U5O.js +2 -0
  106. package/dist/chunks/{continual-6CQAMTTR.js → continual-WFPIDWPH.js} +1 -1
  107. package/dist/chunks/core-commands-U4IBRRY5.js +2 -0
  108. package/dist/chunks/{datasets-7BNMVJOY.js → datasets-UX47DTTB.js} +1 -1
  109. package/dist/chunks/{desktop-test-3CUHVLXV.js → desktop-test-UUU7PD4P.js} +1 -1
  110. package/dist/chunks/{dist-VYC5VMQB.js → dist-OGLX76LL.js} +1 -1
  111. package/dist/chunks/{dist-ZVJPJLXR.js → dist-W5MJYSPF.js} +1 -1
  112. package/dist/chunks/{evaluation-coordination-XEF5L7KZ.js → evaluation-coordination-3YQN5JQW.js} +1 -1
  113. package/dist/chunks/{experiment-improvements-KRX2DP27.js → experiment-improvements-ZRVD2AGY.js} +1 -1
  114. package/dist/chunks/{experiments-DFGQYA4O.js → experiments-JEB5A2N5.js} +1 -1
  115. package/dist/chunks/{extension-XKXXOP5N.js → extension-JCUA3RWV.js} +1 -1
  116. package/dist/chunks/{help-S7THC6IE.js → help-KA4OINP5.js} +1 -1
  117. package/dist/chunks/host-profile-evaluation-tools-2URLU5SG.js +2 -0
  118. package/dist/chunks/host-profile-external-dataset-B2AQNSDR.js +2 -0
  119. package/dist/chunks/{hosted-app-server-composition-T5IWGOTA.js → hosted-app-server-composition-VJQ3FM4I.js} +1 -1
  120. package/dist/chunks/{hosted-experiment-improvement-HVMDGS75.js → hosted-experiment-improvement-42YWXB3P.js} +1 -1
  121. package/dist/chunks/hosted-harness-runtime-BM4WONJN.js +2 -0
  122. package/dist/chunks/{hosted-profile-candidate-EXNN6MVN.js → hosted-profile-candidate-HVVC43XQ.js} +1 -1
  123. package/dist/chunks/hosted-profile-compiler-RKDWHYK3.js +2 -0
  124. package/dist/chunks/{hosted-profile-evaluation-control-TJVER3NW.js → hosted-profile-evaluation-control-57V24UGU.js} +1 -1
  125. package/dist/chunks/{hosted-profile-evaluation-inspection-ZUANDYZ6.js → hosted-profile-evaluation-inspection-BUWLCKCD.js} +1 -1
  126. package/dist/chunks/{hosted-profile-evaluation-preparation-ORVZ6MBD.js → hosted-profile-evaluation-preparation-3XLRR6UH.js} +1 -1
  127. package/dist/chunks/{hosted-tasksets-ANAE2PIW.js → hosted-tasksets-THKM5QY5.js} +1 -1
  128. package/dist/chunks/{human-review-WR777ODH.js → human-review-CSYAW4PC.js} +1 -1
  129. package/dist/chunks/import-CBDJ4DME.js +3 -0
  130. package/dist/chunks/local-harness-improvement-runtime-3T6E7I5Q.js +2 -0
  131. package/dist/chunks/local-harness-taskset-review-LQPQBALH.js +2 -0
  132. package/dist/chunks/{opchat-T4QTNEIY.js → opchat-6ADSONAD.js} +1 -1
  133. package/dist/chunks/{organizations-75L5DZDV.js → organizations-GT24ZTCN.js} +1 -1
  134. package/dist/chunks/{profile-TFZMUEDR.js → profile-Y2MCSOUK.js} +1 -1
  135. package/dist/chunks/project-action-payload-GHSLE7K3.js +2 -0
  136. package/dist/chunks/{project-agent-6RRO233B.js → project-agent-YYSQIHVE.js} +1 -1
  137. package/dist/chunks/{published-experiment-source-HVP5IGRH.js → published-experiment-source-5TMGLKDM.js} +1 -1
  138. package/dist/chunks/refiner-profile-service-ZK7KAFP5.js +2 -0
  139. package/dist/chunks/{runtime-A7OZXM43.js → runtime-QFXCXSVB.js} +2 -2
  140. package/dist/chunks/{sandbox-command-IU5XFTJP.js → sandbox-command-U6346TVJ.js} +1 -1
  141. package/dist/chunks/{sandbox-template-C4V6T36U.js → sandbox-template-XWWPWWNR.js} +1 -1
  142. package/dist/chunks/saved-work-SWHZ4OLO.js +2 -0
  143. package/dist/chunks/{send-turn-XTAIS2JN.js → send-turn-SIXOZUVJ.js} +1 -1
  144. package/dist/chunks/{src-DZL5T2MT.js → src-6SHCCYEN.js} +1 -1
  145. package/dist/chunks/{src-R36AGJY7.js → src-EZAKCCUV.js} +103 -103
  146. package/dist/chunks/standalone-experiment-turn-owner-LIAQWTGI.js +2 -0
  147. package/dist/chunks/{store-continual-support-reviews-LJPNG4SP.js → store-continual-support-reviews-GDX6CSUU.js} +1 -1
  148. package/dist/chunks/{store-conversation-serving-KPC62UEY.js → store-conversation-serving-W55XMDH4.js} +1 -1
  149. package/dist/chunks/{store-create-improve-SW5FTBTL.js → store-create-improve-A7E7CUPZ.js} +1 -1
  150. package/dist/chunks/{store-datasets-WMA7AJKN.js → store-datasets-HKF3EO7B.js} +1 -1
  151. package/dist/chunks/{store-evaluation-results-ZO6R653G.js → store-evaluation-results-645RFBGR.js} +1 -1
  152. package/dist/chunks/{store-human-review-7QQ7ZQ6P.js → store-human-review-F5KESW52.js} +1 -1
  153. package/dist/chunks/{store-learned-preference-migration-validation-NADPXOTG.js → store-learned-preference-migration-validation-V27XD4I7.js} +1 -1
  154. package/dist/chunks/{store-local-experiments-SAULQSBN.js → store-local-experiments-HWQWNTIU.js} +1 -1
  155. package/dist/chunks/{store-model-batch-review-VKLDYGH3.js → store-model-batch-review-TOCSDVAP.js} +1 -1
  156. package/dist/chunks/{store-model-configuration-BYRJUR3C.js → store-model-configuration-6543ASY2.js} +1 -1
  157. package/dist/chunks/{store-sidebar-file-bookmarks-VB5GTLFY.js → store-sidebar-file-bookmarks-53B7QIGS.js} +1 -1
  158. package/dist/chunks/{store-sidebar-preferences-GWIOG2NH.js → store-sidebar-preferences-YXGEJVUO.js} +1 -1
  159. package/dist/chunks/{store-subagents-T7R2Z6TB.js → store-subagents-HRCAK7VZ.js} +1 -1
  160. package/dist/chunks/{store-task-inbox-QPE44OSS.js → store-task-inbox-WF74W4U2.js} +1 -1
  161. package/dist/chunks/{store-task-inventory-I3RDRI52.js → store-task-inventory-KHCTEZVK.js} +1 -1
  162. package/dist/chunks/{store-taskset-drafts-2IULRV2W.js → store-taskset-drafts-3ACG5AVX.js} +1 -1
  163. package/dist/chunks/{store-training-B2TW2MLA.js → store-training-R46WOGXB.js} +1 -1
  164. package/dist/chunks/{store-training-jobs-VBNG23RL.js → store-training-jobs-D4LECE7O.js} +1 -1
  165. package/dist/chunks/{store-training-models-OMV5FIC4.js → store-training-models-EQVNXOVB.js} +1 -1
  166. package/dist/chunks/{taskset-EQRFQBYM.js → taskset-NR2X2UOK.js} +1 -1
  167. package/dist/chunks/{taskset-packages-XC6HEE3K.js → taskset-packages-ONULEIVI.js} +1 -1
  168. package/dist/chunks/{teams-bot-EAPGPTHZ.js → teams-bot-CHUYMD6K.js} +1 -1
  169. package/dist/chunks/{training-UF6RPI4T.js → training-IDSGYGU2.js} +1 -1
  170. package/dist/chunks/{web-search-CZ3NCLPY.js → web-search-BPON7H5N.js} +1 -1
  171. package/dist/chunks/{workspaces-EKKE5NAC.js → workspaces-2TJRDM5K.js} +1 -1
  172. package/dist/cli.js +1 -1
  173. package/dist/index.js +1 -1
  174. package/dist/web/assets/App-pcwmC4IR.js +154 -0
  175. package/dist/web/assets/{AppDialog-t2Fx5tK3.js → AppDialog-CdHad7GT.js} +1 -1
  176. package/dist/web/assets/{AppTerminalPanel-Dj1Y32oI.js → AppTerminalPanel-CrmoOgd4.js} +2 -2
  177. package/dist/web/assets/AppsView-0P6cBsD4.js +1 -0
  178. package/dist/web/assets/{BrowserSidebar-jhWi4rVm.js → BrowserSidebar-Cb6edJw6.js} +1 -1
  179. package/dist/web/assets/{CartesianChart-C1DIx0Ia.js → CartesianChart-B2Sxi0lv.js} +1 -1
  180. package/dist/web/assets/{CollaborationTabs-Bdr-HmOL.js → CollaborationTabs-PP0AIXhb.js} +1 -1
  181. package/dist/web/assets/{CommandMenu-Ux2yOHAc.js → CommandMenu-GfQIMe6W.js} +1 -1
  182. package/dist/web/assets/{CommunityView-DPEeVKFn.js → CommunityView-V6KmMl5n.js} +1 -1
  183. package/dist/web/assets/ComposerCreateImproveStrip-oeVeyhPX.js +1 -0
  184. package/dist/web/assets/ConversationImportsSettings-CuQcvVgE.js +1 -0
  185. package/dist/web/assets/ConversationImportsSettings-PfUa8V7X.css +1 -0
  186. package/dist/web/assets/{GetStartedView-CFHP0AaI.js → GetStartedView-2oZ068h_.js} +1 -1
  187. package/dist/web/assets/{HostedModelLearningReview-D8BGTPVN.js → HostedModelLearningReview-DLzak_Vf.js} +1 -1
  188. package/dist/web/assets/{HostedModelLearningSettings-JS1S7vNO.js → HostedModelLearningSettings-Eca6Pd9R.js} +1 -1
  189. package/dist/web/assets/{LabModelVersionDetailPage-Dx5Q3xV2.js → LabModelVersionDetailPage-DsBblnMp.js} +1 -1
  190. package/dist/web/assets/LabSkillSidebar-DDknttrB.js +1 -0
  191. package/dist/web/assets/{LabsRoute-CyYF8-dw.js → LabsRoute-CgNiUHsy.js} +4 -4
  192. package/dist/web/assets/MainChatThread-yCVg99LU.js +2 -0
  193. package/dist/web/assets/MainPane-C86le7UF.js +65 -0
  194. package/dist/web/assets/{MarkdownText-BR4V6lNO.js → MarkdownText-BBVriBCj.js} +1 -1
  195. package/dist/web/assets/{NativeSkillSidebar-DU9IEgIO.js → NativeSkillSidebar-D2uVZkqh.js} +1 -1
  196. package/dist/web/assets/{NewExperienceSwitcher-mIy6FzCj.js → NewExperienceSwitcher-DuD6GScJ.js} +1 -1
  197. package/dist/web/assets/{NewProjectDialog-RfTZTHxl.js → NewProjectDialog-B6XZkJrU.js} +1 -1
  198. package/dist/web/assets/OutputsPage-PUlmcWjv.js +1 -0
  199. package/dist/web/assets/{ProjectsPage-CE6QUB-b.js → ProjectsPage-DWBRmej6.js} +1 -1
  200. package/dist/web/assets/RightChatPanelStack-HaCVep4t.js +1 -0
  201. package/dist/web/assets/{RightSidebarHomePanel-CK0rP3WT.js → RightSidebarHomePanel-BUtdPb2L.js} +1 -1
  202. package/dist/web/assets/{ScheduledWorkPage-vOrYv8pp.js → ScheduledWorkPage-Dg9GkGrT.js} +1 -1
  203. package/dist/web/assets/SettingsView-DjjnCnlb.css +1 -0
  204. package/dist/web/assets/{SettingsView-DCKVrfjj.js → SettingsView-DtldfnV-.js} +4 -4
  205. package/dist/web/assets/{TeamChatView-Bwrjr-vk.js → TeamChatView-C71JX4je.js} +2 -2
  206. package/dist/web/assets/{TerminalOverlay-DhPoKZAq.js → TerminalOverlay-B4F6Q36s.js} +1 -1
  207. package/dist/web/assets/TrainingCreationPanel-B9MxFzQx.js +1 -0
  208. package/dist/web/assets/{TrainingDraftPanel-C9cRX5qf.js → TrainingDraftPanel-7C48sHfC.js} +1 -1
  209. package/dist/web/assets/{UsageSettingsSection-CrdcSGeW.js → UsageSettingsSection-CC57FcUB.js} +1 -1
  210. package/dist/web/assets/{WorkSidebarPanel-DSSikNFQ.js → WorkSidebarPanel-Cto1usLM.js} +1 -1
  211. package/dist/web/assets/{WorkspaceDiffPanel-BAFo0CPN.js → WorkspaceDiffPanel-CL7wi3kp.js} +3 -3
  212. package/dist/web/assets/{WorkspaceEnvironmentMenu-BVHAhwnJ.js → WorkspaceEnvironmentMenu-zdzSDofs.js} +18 -18
  213. package/dist/web/assets/{WorkspaceGitDialogs-CwVoiDQ2.js → WorkspaceGitDialogs-CZSmjnrc.js} +1 -1
  214. package/dist/web/assets/{WorkspaceMonacoEditor-TxLyhzNp.js → WorkspaceMonacoEditor-TrUDJMKb.js} +3 -3
  215. package/dist/web/assets/agent-connections-4Dza2mDg.js +1 -0
  216. package/dist/web/assets/{arrow-up-right-C9aE8Mfz.js → arrow-up-right-xKb5kWQJ.js} +1 -1
  217. package/dist/web/assets/{chunk-P3BRSSRD-DUGfuKA8.js → chunk-P3BRSSRD-BsGTkgyC.js} +1 -1
  218. package/dist/web/assets/{clipboard-Dk158Qp4.js → clipboard-BgjV3aCx.js} +1 -1
  219. package/dist/web/assets/{cloud-upload-k9eqBsHr.js → cloud-upload-Bw9XUsKQ.js} +1 -1
  220. package/dist/web/assets/{cssMode-CO35ARZp.js → cssMode-DxsFJGb-.js} +1 -1
  221. package/dist/web/assets/{folder-open-sYgceW_f.js → folder-open-CbmUjIYS.js} +1 -1
  222. package/dist/web/assets/{folder-plus-CS0R49m9.js → folder-plus-slsst7Ct.js} +1 -1
  223. package/dist/web/assets/{git-commit-horizontal-DrGxH2h4.js → git-commit-horizontal-BIS-8MuS.js} +1 -1
  224. package/dist/web/assets/{htmlMode-REMmzdfq.js → htmlMode-BE4VOrZo.js} +1 -1
  225. package/dist/web/assets/{index-C8aCGagb.js → index-DEg0S7Qk.js} +2 -2
  226. package/dist/web/assets/index-erq7hUne.css +1 -0
  227. package/dist/web/assets/{info-DLdbiUrh.js → info-5bL9xSSf.js} +1 -1
  228. package/dist/web/assets/{jsonMode-KEdMfkIf.js → jsonMode-CYimnBhD.js} +1 -1
  229. package/dist/web/assets/{lspLanguageFeatures-5KZwEoxW.js → lspLanguageFeatures-CiFuk-P7.js} +1 -1
  230. package/dist/web/assets/{minimize-2-CqcI4zcM.js → minimize-2-BGVWKvTg.js} +1 -1
  231. package/dist/web/assets/{monaco.contribution-omszXBEj.js → monaco.contribution-BTY4dJ0f.js} +2 -2
  232. package/dist/web/assets/{monaco.contribution-BJGj65F9.js → monaco.contribution-C7sMrcos.js} +2 -2
  233. package/dist/web/assets/{monaco.contribution-DO10L0zW.js → monaco.contribution-DUE3CQph.js} +2 -2
  234. package/dist/web/assets/{monaco.contribution-Cly9Wt7L.js → monaco.contribution-DkLVGT8N.js} +2 -2
  235. package/dist/web/assets/{monitor-BFVCcbxp.js → monitor-B5hx_tzp.js} +1 -1
  236. package/dist/web/assets/{play-C469pVZq.js → play-pmSO95Qg.js} +1 -1
  237. package/dist/web/assets/{python-Dw0YcVy9.js → python-CiZvL3LX.js} +1 -1
  238. package/dist/web/assets/{save-CtSjPydi.js → save-CvYL4DUg.js} +1 -1
  239. package/dist/web/assets/{square-BuImvLhT.js → square-DT_uFOml.js} +1 -1
  240. package/dist/web/assets/{toggleHighContrast-DjCO9lIP.js → toggleHighContrast-CrE1_HY0.js} +1 -1
  241. package/dist/web/assets/{tsMode-BAOnxKd6.js → tsMode-CI_PdZmj.js} +1 -1
  242. package/dist/web/assets/{upload-2JkFZo3h.js → upload-PVi8vC3T.js} +1 -1
  243. package/dist/web/assets/{useLocalAgentSchedules-BNqAisfS.js → useLocalAgentSchedules-BHJNVf42.js} +1 -1
  244. package/dist/web/assets/useProviderSettings-CU3zXyie.js +5 -0
  245. package/dist/web/assets/{useProviderSettings-CmL_BaxP.css → useProviderSettings-Cktvzinz.css} +1 -1
  246. package/dist/web/assets/{useSessionTurnCache-BHU2-Jmz.js → useSessionTurnCache-BE7cipLX.js} +1 -1
  247. package/dist/web/assets/{wifi-off-CpOAH62M.js → wifi-off-7WiFuOhD.js} +1 -1
  248. package/dist/web/assets/{workers-0QvlA2T5.js → workers-Cv8r4CvM.js} +1 -1
  249. package/dist/web/assets/{yaml-BK3qxo7D.js → yaml-Bj7mdkV2.js} +1 -1
  250. package/dist/web/index.html +2 -2
  251. package/docs/command-reference.md +10 -3
  252. package/docs/conversation-imports.md +57 -0
  253. package/package.json +1 -1
  254. package/dist/chunks/app-server-runtime-ISGGLQHU.js +0 -2
  255. package/dist/chunks/chunk-6UDGARFC.js +0 -143
  256. package/dist/chunks/chunk-FV2R5RUN.js +0 -3
  257. package/dist/chunks/chunk-HY3GOBFJ.js +0 -58
  258. package/dist/chunks/chunk-I3HZKJB3.js +0 -2
  259. package/dist/chunks/chunk-I3VVWNUW.js +0 -5
  260. package/dist/chunks/chunk-KG325WTN.js +0 -2
  261. package/dist/chunks/chunk-VRIEKBBH.js +0 -9
  262. package/dist/chunks/chunk-WJ43MJ3F.js +0 -2
  263. package/dist/chunks/chunk-ZTNHW2K7.js +0 -10
  264. package/dist/chunks/cli-XZENDZ7Z.js +0 -2
  265. package/dist/chunks/connected-app-executor-LQNIU5NR.js +0 -2
  266. package/dist/chunks/connection-HTF6CC7M.js +0 -2
  267. package/dist/chunks/core-commands-A2DGGIPS.js +0 -2
  268. package/dist/chunks/host-profile-evaluation-tools-JOFBL5OF.js +0 -2
  269. package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +0 -2
  270. package/dist/chunks/hosted-harness-runtime-YCKB6NBI.js +0 -2
  271. package/dist/chunks/hosted-profile-compiler-IYLLHCRY.js +0 -2
  272. package/dist/chunks/import-MLZUHITH.js +0 -4
  273. package/dist/chunks/local-harness-improvement-runtime-QRFGPFRM.js +0 -2
  274. package/dist/chunks/local-harness-taskset-review-HR7KLY4B.js +0 -2
  275. package/dist/chunks/project-action-payload-JDS6OQAW.js +0 -2
  276. package/dist/chunks/refiner-profile-service-FDTQKY33.js +0 -2
  277. package/dist/chunks/saved-work-SHEEDZ6Z.js +0 -2
  278. package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +0 -2
  279. package/dist/web/assets/App-s-CJswyt.js +0 -154
  280. package/dist/web/assets/AppsView-BYE5EBDJ.js +0 -1
  281. package/dist/web/assets/ComposerCreateImproveStrip-CEgh4OtN.js +0 -1
  282. package/dist/web/assets/LabSkillSidebar-BxffN-pN.js +0 -1
  283. package/dist/web/assets/MainChatThread-DZpcFRFl.js +0 -2
  284. package/dist/web/assets/MainPane-5DTtwVCk.js +0 -65
  285. package/dist/web/assets/OutputsPage-Cr1Spf7S.js +0 -1
  286. package/dist/web/assets/RightChatPanelStack-T6VRWuHo.js +0 -1
  287. package/dist/web/assets/SettingsView-Dulr_xlq.css +0 -1
  288. package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +0 -1
  289. package/dist/web/assets/index-3iPNbbER.css +0 -1
  290. package/dist/web/assets/useProviderSettings-C4L4wDoh.js +0 -5
@@ -1 +1 @@
1
- import{j as a}from"./index-C8aCGagb.js";import{aJ as n}from"./App-s-CJswyt.js";function s({onSelect:o,view:t}){return a.jsxs("nav",{className:"collaboration-tabs","aria-label":"Collaboration",children:[a.jsx("button",{"aria-current":t==="team"?"page":void 0,className:t==="team"?"active":"",onClick:()=>o("team"),type:"button",children:a.jsx("span",{children:"Team chat"})}),a.jsxs("button",{"aria-current":t==="community"?"page":void 0,className:t==="community"?"active":"",onClick:()=>o("community"),type:"button",children:[a.jsx(n,{size:15}),a.jsx("span",{children:"Communities"})]})]})}export{s as CollaborationTabs};
1
+ import{j as a}from"./index-DEg0S7Qk.js";import{aK as n}from"./App-pcwmC4IR.js";function s({onSelect:o,view:t}){return a.jsxs("nav",{className:"collaboration-tabs","aria-label":"Collaboration",children:[a.jsx("button",{"aria-current":t==="team"?"page":void 0,className:t==="team"?"active":"",onClick:()=>o("team"),type:"button",children:a.jsx("span",{children:"Team chat"})}),a.jsxs("button",{"aria-current":t==="community"?"page":void 0,className:t==="community"?"active":"",onClick:()=>o("community"),type:"button",children:[a.jsx(n,{size:15}),a.jsx("span",{children:"Communities"})]})]})}export{s as CollaborationTabs};
@@ -1 +1 @@
1
- import{r as j,j as e}from"./index-C8aCGagb.js";import{aI as N,aG as g,b5 as f,y as k,F as C,b6 as v,b7 as P,b8 as M,b9 as w,ba as L}from"./App-s-CJswyt.js";function F({open:s,query:r,projects:n,sessions:o,onQueryChange:t,onClose:d,onNewChat:x,onOpenProject:u,onOpenSession:m}){const c=r.trim().toLowerCase(),l=j.useMemo(()=>S(o,c,10),[c,o]),i=j.useMemo(()=>z(n,c,8),[c,n]);if(!s)return null;const b=()=>{const a=i[0];if(a){u(a);return}const p=l[0];p&&m(p)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(N,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),b()),a.key==="Escape"&&(a.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:x,children:[e.jsx(g,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>u(a),children:[f(a)?e.jsx(k,{size:15}):e.jsx(C,{size:15}),e.jsx("span",{children:a.project.name}),e.jsx("small",{children:y(a)})]},a.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>m(a),children:[a.pinned?e.jsx(v,{size:15}):a.savedForLater?e.jsx(P,{size:15}):e.jsx(M,{size:15}),e.jsx("span",{children:a.title}),e.jsx("small",{children:a.appName??w(a.updatedAt)})]},a.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function S(s,r,n){const o=[];for(const t of s)if((!r||`${t.title} ${t.appName??""}`.toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function z(s,r,n){const o=[];for(const t of s)if((!r||$(t).toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function $(s){return L(s)?`${s.project.name} ${s.project.path} ${s.project.workspacePath}`:`${s.project.name} ${s.project.sourceLabel??""} ${s.project.organizationName??""}`}function y(s){return f(s)?s.project.organizationName??"Cloud Project":s.project.linkedOpenPondApp?"OpenPond project":s.project.source==="git"?"Local Git":"Local folder"}function h({label:s,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:s}),r]})}export{F as CommandMenu};
1
+ import{r as j,j as e}from"./index-DEg0S7Qk.js";import{aJ as N,aH as g,b6 as f,z as k,F as C,b7 as v,b8 as P,b9 as M,ba as w,bb as z}from"./App-pcwmC4IR.js";function y({open:s,query:r,projects:n,sessions:o,onQueryChange:t,onClose:d,onNewChat:x,onOpenProject:u,onOpenSession:m}){const c=r.trim().toLowerCase(),l=j.useMemo(()=>L(o,c,10),[c,o]),i=j.useMemo(()=>S(n,c,8),[c,n]);if(!s)return null;const b=()=>{const a=i[0];if(a){u(a);return}const p=l[0];p&&m(p)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(N,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),b()),a.key==="Escape"&&(a.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:x,children:[e.jsx(g,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>u(a),children:[f(a)?e.jsx(k,{size:15}):e.jsx(C,{size:15}),e.jsx("span",{children:a.project.name}),e.jsx("small",{children:D(a)})]},a.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>m(a),children:[a.pinned?e.jsx(v,{size:15}):a.savedForLater?e.jsx(P,{size:15}):e.jsx(M,{size:15}),e.jsx("span",{children:a.title}),e.jsx("small",{children:a.appName??w(a.updatedAt)})]},a.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function L(s,r,n){const o=[];for(const t of s)if((!r||`${t.title} ${t.appName??""}`.toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function S(s,r,n){const o=[];for(const t of s)if((!r||$(t).toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function $(s){return z(s)?`${s.project.name} ${s.project.path} ${s.project.workspacePath}`:`${s.project.name} ${s.project.sourceLabel??""} ${s.project.organizationName??""}`}function D(s){return f(s)?s.project.organizationName??"Cloud Project":s.project.linkedOpenPondApp?"OpenPond project":s.project.source==="git"?"Local Git":"Local folder"}function h({label:s,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:s}),r]})}export{y as CommandMenu};
@@ -1 +1 @@
1
- import{r as l,j as e}from"./index-C8aCGagb.js";import{S as Z,W as ee,B as se,a as ne}from"./wifi-off-CpOAH62M.js";import{X as H,aG as te,bd as M,fx as O,aA as F}from"./App-s-CJswyt.js";import{n as ie,o as ae,P as le,p as oe,r as re,b as ce,R as de}from"./MainPane-5DTtwVCk.js";import{T as me,M as J}from"./MarkdownText-BR4V6lNO.js";import"./cloud-upload-k9eqBsHr.js";import"./arrow-up-right-C9aE8Mfz.js";import"./square-BuImvLhT.js";import"./folder-open-sYgceW_f.js";import"./play-C469pVZq.js";const ue=2e4,R=10,he=12*1024*1024,ye=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function ge(s){const[n,m]=l.useState(""),[a,y]=l.useState(0),[c,u]=l.useState([]),[f,i]=l.useState(null),[b,h]=l.useState(!1),[p,C]=l.useState([]),[N,v]=l.useState(0),[o,I]=l.useState(null),k=l.useRef(null),E=l.useRef(null),D=l.useRef(c);D.current=c;const g=l.useMemo(()=>xe(n,a),[n,a]),S=g?`${g.start}:${g.end}:${g.query}`:null,T=g?.query??null,w=l.useMemo(()=>{if(!g)return[];const t=new Map;for(const d of[...s.members,...p])t.set(d.userId,d);const r=g.query.toLowerCase();return[...t.values()].filter(d=>`${d.handle??""} ${d.name??""}`.toLowerCase().includes(r)).slice(0,8)},[g,s.members,p]),B=!!(g&&S!==o&&w.length>0),L=!!(s.disabled||s.busy||b),U=!L&&(!!n.trim()||c.length>0);l.useEffect(()=>{if(T==null){C([]);return}let t=!0;const r=window.setTimeout(()=>{s.onSearchMembers(T).then(d=>{t&&C(d)},()=>{t&&C([])})},150);return()=>{t=!1,window.clearTimeout(r)}},[T,s.onSearchMembers]),l.useEffect(()=>{v(0)},[S]),l.useEffect(()=>()=>K(D.current),[]);async function $(t){if(t?.preventDefault(),!!U){i(null),h(!0);try{const r=await Promise.all(c.map(re));if(!await s.onSend({body:n,mentionUserIds:fe(n,s.members),attachments:r,replyToMessageId:s.replyTo?.id??null}))return;K(c),m(""),y(0),u([]),s.onCancelReply()}catch(r){i(r instanceof Error?r.message:String(r))}finally{h(!1)}}}function G(t){if(B){if(t.key==="ArrowDown"){t.preventDefault(),v(r=>(r+1)%w.length);return}if(t.key==="ArrowUp"){t.preventDefault(),v(r=>(r-1+w.length)%w.length);return}if(t.key==="Enter"||t.key==="Tab"){t.preventDefault(),z(w[N]??w[0]);return}if(t.key==="Escape"){t.preventDefault(),I(S);return}}t.key!=="Enter"||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),$())}function V(t){if(!t)return;i(null);const r=Math.max(0,R-c.length);if(r===0){i(`You can attach up to ${R} images.`),A();return}const d=[...t],j=d.slice(0,r),P=j.find(x=>!ye.has(x.type)),q=j.find(x=>x.size<=0||x.size>he);if(P){i(`${P.name} is not a supported image type.`),A();return}if(q){i(`${q.name} must be smaller than 12 MB.`),A();return}const Q=j.map(x=>({id:ce(),file:x,name:x.name,mediaType:x.type,sizeBytes:x.size,kind:"image",previewUrl:URL.createObjectURL(x)}));u(x=>[...x,...Q]),d.length>r&&i(`Only ${R} images can be attached to one message.`),A()}function W(t){u(r=>{const d=r.find(j=>j.id===t);return d?.previewUrl&&URL.revokeObjectURL(d.previewUrl),r.filter(j=>j.id!==t)})}function A(){k.current&&(k.current.value="")}function z(t){if(!g)return;const r=`@${X(t)} `,d=`${n.slice(0,g.start)}${r}${n.slice(g.end)}`,j=g.start+r.length;m(d),y(j),I(null),window.requestAnimationFrame(()=>E.current?.focusAtPromptIndex(j))}return e.jsxs("form",{className:`composer dock community-composer${c.length>0?" has-attachments":""}${f?" has-attachment-error":""}`,onSubmit:$,children:[s.replyTo?e.jsxs("div",{className:"community-composer-reply",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Replying to"}),s.replyTo.body.slice(0,100)||"message"]}),e.jsx("button",{type:"button","aria-label":"Cancel reply",onClick:s.onCancelReply,children:e.jsx(H,{size:13})})]}):null,B?e.jsx("div",{className:"community-mention-menu",role:"listbox","aria-label":"Community members",children:w.map((t,r)=>e.jsxs("button",{type:"button",role:"option","aria-selected":r===N,onMouseDown:d=>d.preventDefault(),onClick:()=>z(t),children:[e.jsx("strong",{children:t.name??t.handle??"Community member"}),t.handle?e.jsxs("small",{children:["@",t.handle]}):null]},t.userId))}):null,e.jsxs("div",{className:"composer-input-shell",children:[c.length>0?e.jsx("div",{className:"composer-attachments","aria-label":"Selected attachments",children:c.map(t=>e.jsx(ie,{attachment:t,onRemove:()=>W(t.id)},t.id))}):null,f?e.jsx("div",{className:"composer-attachment-error",role:"status",children:f}):null,e.jsx("div",{className:"composer-textarea-frame",onClick:t=>{t.target===t.currentTarget&&E.current?.focusAtPromptIndex(a)},children:e.jsx(ae,{ref:E,disabled:L,onCursorChange:y,onKeyDown:G,onPromptChange:(t,r)=>{const d=t.slice(0,ue);m(d),y(Math.min(r,d.length))},onTokenPositionChange:()=>{},placeholder:s.disabled?"Accept the community rules to post":"Message community",prompt:n,token:null})}),e.jsxs("div",{className:"composer-primary-controls team-chat-composer-controls",children:[e.jsx("input",{ref:k,className:"composer-file-input",hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,onChange:t=>V(t.currentTarget.files)}),e.jsx("button",{type:"button",className:"composer-icon","aria-label":"Attach images",disabled:L||c.length>=R,onClick:()=>k.current?.click(),children:e.jsx(le,{size:17})}),e.jsx("div",{className:"composer-spacer"}),e.jsx("button",{type:"submit",className:"send-button","aria-label":"Send message",disabled:!U,children:e.jsx(oe,{size:17})})]})]})]})}function xe(s,n=s.length){const m=Math.max(0,Math.min(n,s.length)),a=/(?:^|\s)@([\w-]*)$/.exec(s.slice(0,m));return!a||a.index==null?null:{start:a.index+a[0].indexOf("@"),end:m,query:a[1]??""}}function fe(s,n){const m=new Set([...s.matchAll(/(?:^|\s)@([\w-]+)/g)].map(a=>a[1]?.toLowerCase()));return n.filter(a=>m.has(X(a).toLowerCase())).map(a=>a.userId)}function X(s){return s.handle??s.name?.replace(/[^\w-]/g,"")??s.userId}function K(s){for(const n of s)n.previewUrl&&URL.revokeObjectURL(n.previewUrl)}function be(s){const[n,m]=l.useState(!1),[a,y]=l.useState(s.message.body),c=s.message.refs.find(i=>i.refType==="message_reply"),u=c?s.messagesById.get(c.refId)??null:null,f=u?.authorUserId?s.membersById.get(u.authorUserId)??null:null;return e.jsxs("article",{className:`community-message${s.own?" own":""}`,id:`community-message-${s.message.id}`,children:[e.jsx("div",{className:"community-avatar",children:je(s.author?.name??s.author?.handle??"?")}),e.jsxs("div",{className:"community-message-content",children:[e.jsxs("header",{children:[e.jsx("strong",{children:s.author?.name??s.author?.handle??"Community member"}),e.jsx("time",{dateTime:s.message.createdAt,children:pe(s.message.createdAt)}),s.message.editedAt?e.jsx("span",{children:"edited"}):null,s.message.deletedAt?null:e.jsxs("div",{className:"community-message-actions",children:[e.jsx("button",{type:"button","aria-label":"Reply",onClick:()=>s.onReply(s.message),children:e.jsx(de,{size:13})}),s.own?e.jsx("button",{type:"button","aria-label":"Edit",onClick:()=>m(!0),children:e.jsx(te,{size:13})}):null,s.own?e.jsx("button",{type:"button","aria-label":"Delete",onClick:()=>{s.onDelete(s.message.id)},children:e.jsx(me,{size:13})}):null]})]}),c?e.jsxs("button",{type:"button",className:"community-reply-quote",onClick:()=>document.getElementById(`community-message-${c.refId}`)?.scrollIntoView({behavior:"smooth",block:"center"}),children:[e.jsx("strong",{children:f?.name??"Community member"}),e.jsx("span",{children:u?.deletedAt?"Message deleted":u?.body??String(c.preview.body??"Earlier message")})]}):null,n?e.jsxs("form",{className:"community-message-edit",onSubmit:i=>{i.preventDefault(),s.onEdit(s.message.id,a).then(b=>{b&&m(!1)})},children:[e.jsx("textarea",{autoFocus:!0,value:a,onChange:i=>y(i.currentTarget.value)}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>m(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!a.trim(),children:"Save"})]})]}):s.message.deletedAt?e.jsx("div",{className:"community-message-deleted",children:"Message deleted"}):e.jsx(J,{content:s.message.body}),!s.message.deletedAt&&s.message.attachments.length>0?e.jsx("div",{className:"community-message-attachments",children:s.message.attachments.map(i=>s.attachmentsAccessible?e.jsxs("button",{type:"button",onClick:()=>{s.onDownloadAttachment(i.id)},children:[e.jsx("span",{children:i.name}),e.jsx("small",{children:_(i.sizeBytes)})]},i.id):e.jsxs("div",{className:"community-attachment-placeholder",children:[e.jsx("span",{children:i.name}),e.jsxs("small",{children:["Join to view · ",_(i.sizeBytes)]})]},i.id))}):null]})]})}function je(s){return s.split(/\s+/).slice(0,2).map(n=>n[0]?.toUpperCase()??"").join("")||"?"}function pe(s){const n=new Date(s);return Number.isNaN(n.getTime())?"":n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function _(s){return s<1024?`${s} B`:s<1024*1024?`${Math.round(s/1024)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function ve(s){const[n,m]=l.useState(!1),a=l.useRef(null),y=l.useRef(s.onClose);l.useEffect(()=>m(!1),[s.rules.id]),l.useEffect(()=>{y.current=s.onClose},[s.onClose]),l.useEffect(()=>{const u=document.activeElement instanceof HTMLElement?document.activeElement:null,f=a.current,i=()=>[...f?.querySelectorAll('button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')??[]];i()[0]?.focus();const b=h=>{if(h.key==="Escape"){h.preventDefault(),y.current();return}if(h.key!=="Tab")return;const p=i();if(p.length===0){h.preventDefault(),f?.focus();return}const C=p[0],N=p.at(-1);h.shiftKey&&document.activeElement===C?(h.preventDefault(),N.focus()):!h.shiftKey&&document.activeElement===N&&(h.preventDefault(),C.focus())};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),u?.focus()}},[]);const c=s.mode!=="review";return e.jsx("div",{className:"community-dialog-backdrop",role:"presentation",onMouseDown:s.onClose,children:e.jsxs("section",{ref:a,className:"community-rules-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"community-rules-title",tabIndex:-1,onMouseDown:u=>u.stopPropagation(),children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("small",{children:["Community rules · version ",s.rules.version]}),e.jsx("h2",{id:"community-rules-title",children:s.rules.title})]}),e.jsx("button",{type:"button","aria-label":"Close rules",onClick:s.onClose,children:e.jsx(H,{size:16})})]}),e.jsx("div",{className:"community-rules-body",children:e.jsx(J,{content:s.rules.bodyMarkdown})}),e.jsxs("footer",{children:[c?e.jsxs("label",{className:"community-rules-acceptance",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:u=>m(u.currentTarget.checked)}),e.jsx("span",{children:"I have read and agree to follow these rules."})]}):e.jsx("span",{}),e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"secondary",onClick:s.onClose,children:"Cancel"}),c?e.jsx("button",{type:"button",disabled:!n||s.busy,onClick:()=>{s.onAccept().then(u=>{u&&s.onClose()})},children:s.busy?"Saving…":s.mode==="join"?"Agree and join":"Accept updated rules"}):null]})]})]})})}function Ie({communities:s,chat:n,currentUserId:m}){M(s.discoveryError),M(s.previewError),M(s.membershipError?.message),M(n.channelsError,{prefix:"Channels"}),M(n.messagesError,{prefix:"Messages"}),M(n.actionError);const[a,y]=l.useState(null),[c,u]=l.useState(null),f=l.useRef(null),i=s.preview,b=i?.membership?.status==="active",h=!!i?.capabilities.requiresRulesAcceptance,p=l.useMemo(()=>new Map(n.members.map(o=>[o.userId,o])),[n.members]),C=l.useMemo(()=>new Map(n.messages.map(o=>[o.id,o])),[n.messages]),N=n.messages.at(-1)?.sequence??0;if(l.useEffect(()=>{const o=f.current;o&&(o.scrollTop=o.scrollHeight)},[n.selectedChannelId,N]),l.useEffect(()=>{u(null),h&&i?.currentRules&&y("reaccept")},[i?.currentRules,h]),!s.selectedSummary)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-discovery-card",children:[e.jsx(O,{size:30}),e.jsx("h1",{children:"Discover communities"}),e.jsx("p",{children:s.discoveryLoading&&s.items.length===0?"Finding communities…":"Preview public conversations and join after accepting each community's rules."}),s.items.length>0?e.jsx("div",{className:"community-discovery-list",children:s.items.map(o=>e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(o.id),children:[e.jsx(Y,{name:o.displayName,imageUrl:o.imageUrl}),e.jsxs("span",{children:[e.jsx("strong",{children:o.displayName}),e.jsx("small",{children:o.description})]}),e.jsx("em",{children:o.membership?.status==="active"?"Joined":o.featuredAt?"Featured":`${o.memberCount.toLocaleString()} members`})]},o.id))}):s.discoveryLoading?null:e.jsx("div",{className:"community-state",children:"No public communities are available yet."}),e.jsxs("div",{className:"community-discovery-actions",children:[e.jsxs("button",{type:"button",onClick:()=>{s.refresh()},disabled:s.discoveryLoading,children:[e.jsx(F,{size:14})," Refresh"]}),s.nextCursor?e.jsx("button",{type:"button",className:"secondary",onClick:()=>{s.loadMore()},disabled:s.discoveryLoading,children:"Load more"}):null]})]})});if(!i&&s.previewLoading)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("span",{className:"community-spinner"})," Loading community…"]})});if(!i)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("h1",{children:s.selectedSummary.displayName}),e.jsx("div",{className:"community-state",children:"This community preview is unavailable."}),e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(s.selectedSummary.id),children:[e.jsx(F,{size:14})," Retry preview"]})]})});const v=i.currentRules;return e.jsxs("section",{className:"community-view",children:[e.jsxs("header",{className:"community-header",children:[e.jsxs("div",{className:"community-heading",children:[e.jsx(Y,{name:i.displayName,imageUrl:i.imageUrl}),e.jsxs("div",{children:[e.jsx("small",{children:i.displayName}),e.jsx("h1",{children:n.selectedChannel?`# ${n.selectedChannel.displayName}`:i.displayName}),e.jsx("p",{children:n.selectedChannel?.topic||i.description})]})]}),e.jsxs("div",{className:"community-header-actions",children:[e.jsxs("span",{className:"community-member-count",children:[e.jsx(O,{size:14})," ",i.memberCount.toLocaleString()]}),v?e.jsxs("button",{type:"button",className:"secondary",onClick:()=>y("review"),children:[e.jsx(Z,{size:14})," Rules"]}):null,b?e.jsx(Ce,{mode:i.membership?.notificationMode??"mentions",busy:s.membershipBusy,onMode:s.updateNotifications,onLeave:s.leave}):null]})]}),e.jsxs("div",{className:"community-chat-main conversation-surface-main",children:[e.jsxs("div",{className:"community-chat-notices",children:[b?h?e.jsxs("div",{className:"community-preview-banner warning",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"The rules have changed"}),e.jsx("span",{children:"Accept the current rules to continue reading live updates and posting."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("reaccept"),children:"Review updated rules"})]}):null:e.jsxs("div",{className:"community-preview-banner",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Previewing ",i.displayName]}),e.jsx("span",{children:"Read the public conversation, then accept the rules to join and post."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("join"),children:"Join community"})]}),n.realtimeError&&b&&!h?e.jsxs("div",{className:"community-realtime-state",children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Live updates are reconnecting. Loaded messages are still available."})]}):null,n.lostMembership?e.jsx("div",{className:"community-state error",children:"Your membership changed. Refresh the community before continuing."}):null,n.channelsError?e.jsx("button",{type:"button",className:"community-state",onClick:()=>{n.loadChannels()},children:"Retry loading channels"}):null]}),e.jsxs("div",{className:"community-message-pane conversation-message-scroll",ref:f,role:"log","aria-live":"polite","aria-relevant":"additions text","aria-busy":n.messagesLoading,"aria-label":n.selectedChannel?`${i.displayName}, ${n.selectedChannel.displayName}`:i.displayName,tabIndex:0,children:[n.hasMoreBefore?e.jsx("button",{type:"button",className:"community-load-older",disabled:n.olderMessagesLoading,onClick:()=>{n.loadOlder()},children:n.olderMessagesLoading?"Loading…":"Load earlier messages"}):null,n.messagesLoading&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"Loading messages…"}):null,n.messagesError?e.jsxs("div",{className:"community-message-state",children:["Messages are unavailable. ",e.jsx("button",{type:"button",onClick:()=>{n.loadMessages()},children:"Retry"})]}):null,!n.messagesLoading&&!n.messagesError&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"No messages in this channel yet."}):null,n.messages.map(o=>e.jsx(be,{message:o,author:o.authorUserId?p.get(o.authorUserId)??null:null,own:o.authorUserId===m,attachmentsAccessible:!n.previewMode,membersById:p,messagesById:C,onReply:u,onEdit:n.editMessage,onDelete:n.deleteMessage,onDownloadAttachment:n.downloadAttachment},o.id))]}),b?e.jsxs("div",{className:"community-composer-wrap conversation-composer-shell",children:[n.failedSend?e.jsxs("div",{className:"community-failed-send",children:[e.jsx("span",{children:"Message not sent."}),e.jsx("button",{type:"button",disabled:n.sending,onClick:()=>{n.retrySend()},children:"Retry"}),e.jsx("button",{type:"button",onClick:n.dismissFailedSend,children:"Dismiss"})]}):null,e.jsx(ge,{members:n.members,replyTo:c,busy:n.sending,disabled:h||n.lostMembership||!n.selectedChannel||n.selectedChannel.postingPolicy==="admins"&&i.membership?.role==="member",onCancelReply:()=>u(null),onSearchMembers:n.searchMembers,onSend:n.sendMessage})]}):null]}),a&&v?e.jsx(ve,{rules:v,mode:a,busy:s.membershipBusy,onAccept:a==="join"?s.join:s.acceptRules,onClose:()=>y(null)}):null]})}function Ce(s){const[n,m]=l.useState(!1);return e.jsxs("div",{className:"community-membership-menu",children:[e.jsxs("button",{type:"button",className:"secondary","aria-expanded":n,onClick:()=>m(a=>!a),children:[s.mode==="none"?e.jsx(se,{size:14}):e.jsx(ne,{size:14})," Joined"]}),n?e.jsxs("div",{className:"community-membership-popover",children:[e.jsx("strong",{children:"Notifications"}),["mentions","all","none"].map(a=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"community-notifications",checked:s.mode===a,disabled:s.busy,onChange:()=>{s.onMode(a)}})," ",a==="mentions"?"Mentions":a==="all"?"All messages":"Nothing"]},a)),e.jsx("button",{type:"button",className:"danger",disabled:s.busy,onClick:()=>{window.confirm("Leave this community? You can join again later by accepting the current rules.")&&s.onLeave().then(a=>{a&&m(!1)})},children:"Leave community"})]}):null]})}function Y({name:s,imageUrl:n}){return n?e.jsx("img",{className:"community-icon",src:n,alt:""}):e.jsx("span",{className:"community-icon fallback",children:s.slice(0,2).toUpperCase()})}export{Ie as CommunityView};
1
+ import{r as l,j as e}from"./index-DEg0S7Qk.js";import{S as Z,W as ee,B as se,a as ne}from"./wifi-off-7WiFuOhD.js";import{X as Y,aH as te,be as M,fy as O,aB as F}from"./App-pcwmC4IR.js";import{l as ie,m as ae,P as le,n as oe,r as re,b as ce,R as de}from"./MainPane-C86le7UF.js";import{T as me,M as J}from"./MarkdownText-BBVriBCj.js";import"./arrow-up-right-xKb5kWQJ.js";import"./cloud-upload-Bw9XUsKQ.js";import"./square-DT_uFOml.js";import"./folder-open-CbmUjIYS.js";import"./play-pmSO95Qg.js";const ue=2e4,R=10,he=12*1024*1024,ye=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function ge(s){const[n,m]=l.useState(""),[a,y]=l.useState(0),[c,u]=l.useState([]),[f,i]=l.useState(null),[b,h]=l.useState(!1),[p,C]=l.useState([]),[N,v]=l.useState(0),[o,I]=l.useState(null),k=l.useRef(null),E=l.useRef(null),D=l.useRef(c);D.current=c;const g=l.useMemo(()=>xe(n,a),[n,a]),S=g?`${g.start}:${g.end}:${g.query}`:null,T=g?.query??null,w=l.useMemo(()=>{if(!g)return[];const t=new Map;for(const d of[...s.members,...p])t.set(d.userId,d);const r=g.query.toLowerCase();return[...t.values()].filter(d=>`${d.handle??""} ${d.name??""}`.toLowerCase().includes(r)).slice(0,8)},[g,s.members,p]),B=!!(g&&S!==o&&w.length>0),L=!!(s.disabled||s.busy||b),U=!L&&(!!n.trim()||c.length>0);l.useEffect(()=>{if(T==null){C([]);return}let t=!0;const r=window.setTimeout(()=>{s.onSearchMembers(T).then(d=>{t&&C(d)},()=>{t&&C([])})},150);return()=>{t=!1,window.clearTimeout(r)}},[T,s.onSearchMembers]),l.useEffect(()=>{v(0)},[S]),l.useEffect(()=>()=>K(D.current),[]);async function $(t){if(t?.preventDefault(),!!U){i(null),h(!0);try{const r=await Promise.all(c.map(re));if(!await s.onSend({body:n,mentionUserIds:fe(n,s.members),attachments:r,replyToMessageId:s.replyTo?.id??null}))return;K(c),m(""),y(0),u([]),s.onCancelReply()}catch(r){i(r instanceof Error?r.message:String(r))}finally{h(!1)}}}function V(t){if(B){if(t.key==="ArrowDown"){t.preventDefault(),v(r=>(r+1)%w.length);return}if(t.key==="ArrowUp"){t.preventDefault(),v(r=>(r-1+w.length)%w.length);return}if(t.key==="Enter"||t.key==="Tab"){t.preventDefault(),z(w[N]??w[0]);return}if(t.key==="Escape"){t.preventDefault(),I(S);return}}t.key!=="Enter"||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),$())}function G(t){if(!t)return;i(null);const r=Math.max(0,R-c.length);if(r===0){i(`You can attach up to ${R} images.`),A();return}const d=[...t],j=d.slice(0,r),P=j.find(x=>!ye.has(x.type)),q=j.find(x=>x.size<=0||x.size>he);if(P){i(`${P.name} is not a supported image type.`),A();return}if(q){i(`${q.name} must be smaller than 12 MB.`),A();return}const Q=j.map(x=>({id:ce(),file:x,name:x.name,mediaType:x.type,sizeBytes:x.size,kind:"image",previewUrl:URL.createObjectURL(x)}));u(x=>[...x,...Q]),d.length>r&&i(`Only ${R} images can be attached to one message.`),A()}function W(t){u(r=>{const d=r.find(j=>j.id===t);return d?.previewUrl&&URL.revokeObjectURL(d.previewUrl),r.filter(j=>j.id!==t)})}function A(){k.current&&(k.current.value="")}function z(t){if(!g)return;const r=`@${X(t)} `,d=`${n.slice(0,g.start)}${r}${n.slice(g.end)}`,j=g.start+r.length;m(d),y(j),I(null),window.requestAnimationFrame(()=>E.current?.focusAtPromptIndex(j))}return e.jsxs("form",{className:`composer dock community-composer${c.length>0?" has-attachments":""}${f?" has-attachment-error":""}`,onSubmit:$,children:[s.replyTo?e.jsxs("div",{className:"community-composer-reply",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Replying to"}),s.replyTo.body.slice(0,100)||"message"]}),e.jsx("button",{type:"button","aria-label":"Cancel reply",onClick:s.onCancelReply,children:e.jsx(Y,{size:13})})]}):null,B?e.jsx("div",{className:"community-mention-menu",role:"listbox","aria-label":"Community members",children:w.map((t,r)=>e.jsxs("button",{type:"button",role:"option","aria-selected":r===N,onMouseDown:d=>d.preventDefault(),onClick:()=>z(t),children:[e.jsx("strong",{children:t.name??t.handle??"Community member"}),t.handle?e.jsxs("small",{children:["@",t.handle]}):null]},t.userId))}):null,e.jsxs("div",{className:"composer-input-shell",children:[c.length>0?e.jsx("div",{className:"composer-attachments","aria-label":"Selected attachments",children:c.map(t=>e.jsx(ie,{attachment:t,onRemove:()=>W(t.id)},t.id))}):null,f?e.jsx("div",{className:"composer-attachment-error",role:"status",children:f}):null,e.jsx("div",{className:"composer-textarea-frame",onClick:t=>{t.target===t.currentTarget&&E.current?.focusAtPromptIndex(a)},children:e.jsx(ae,{ref:E,disabled:L,onCursorChange:y,onKeyDown:V,onPromptChange:(t,r)=>{const d=t.slice(0,ue);m(d),y(Math.min(r,d.length))},onTokenPositionChange:()=>{},placeholder:s.disabled?"Accept the community rules to post":"Message community",prompt:n,token:null})}),e.jsxs("div",{className:"composer-primary-controls team-chat-composer-controls",children:[e.jsx("input",{ref:k,className:"composer-file-input",hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,onChange:t=>G(t.currentTarget.files)}),e.jsx("button",{type:"button",className:"composer-icon","aria-label":"Attach images",disabled:L||c.length>=R,onClick:()=>k.current?.click(),children:e.jsx(le,{size:17})}),e.jsx("div",{className:"composer-spacer"}),e.jsx("button",{type:"submit",className:"send-button","aria-label":"Send message",disabled:!U,children:e.jsx(oe,{size:17})})]})]})]})}function xe(s,n=s.length){const m=Math.max(0,Math.min(n,s.length)),a=/(?:^|\s)@([\w-]*)$/.exec(s.slice(0,m));return!a||a.index==null?null:{start:a.index+a[0].indexOf("@"),end:m,query:a[1]??""}}function fe(s,n){const m=new Set([...s.matchAll(/(?:^|\s)@([\w-]+)/g)].map(a=>a[1]?.toLowerCase()));return n.filter(a=>m.has(X(a).toLowerCase())).map(a=>a.userId)}function X(s){return s.handle??s.name?.replace(/[^\w-]/g,"")??s.userId}function K(s){for(const n of s)n.previewUrl&&URL.revokeObjectURL(n.previewUrl)}function be(s){const[n,m]=l.useState(!1),[a,y]=l.useState(s.message.body),c=s.message.refs.find(i=>i.refType==="message_reply"),u=c?s.messagesById.get(c.refId)??null:null,f=u?.authorUserId?s.membersById.get(u.authorUserId)??null:null;return e.jsxs("article",{className:`community-message${s.own?" own":""}`,id:`community-message-${s.message.id}`,children:[e.jsx("div",{className:"community-avatar",children:je(s.author?.name??s.author?.handle??"?")}),e.jsxs("div",{className:"community-message-content",children:[e.jsxs("header",{children:[e.jsx("strong",{children:s.author?.name??s.author?.handle??"Community member"}),e.jsx("time",{dateTime:s.message.createdAt,children:pe(s.message.createdAt)}),s.message.editedAt?e.jsx("span",{children:"edited"}):null,s.message.deletedAt?null:e.jsxs("div",{className:"community-message-actions",children:[e.jsx("button",{type:"button","aria-label":"Reply",onClick:()=>s.onReply(s.message),children:e.jsx(de,{size:13})}),s.own?e.jsx("button",{type:"button","aria-label":"Edit",onClick:()=>m(!0),children:e.jsx(te,{size:13})}):null,s.own?e.jsx("button",{type:"button","aria-label":"Delete",onClick:()=>{s.onDelete(s.message.id)},children:e.jsx(me,{size:13})}):null]})]}),c?e.jsxs("button",{type:"button",className:"community-reply-quote",onClick:()=>document.getElementById(`community-message-${c.refId}`)?.scrollIntoView({behavior:"smooth",block:"center"}),children:[e.jsx("strong",{children:f?.name??"Community member"}),e.jsx("span",{children:u?.deletedAt?"Message deleted":u?.body??String(c.preview.body??"Earlier message")})]}):null,n?e.jsxs("form",{className:"community-message-edit",onSubmit:i=>{i.preventDefault(),s.onEdit(s.message.id,a).then(b=>{b&&m(!1)})},children:[e.jsx("textarea",{autoFocus:!0,value:a,onChange:i=>y(i.currentTarget.value)}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>m(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!a.trim(),children:"Save"})]})]}):s.message.deletedAt?e.jsx("div",{className:"community-message-deleted",children:"Message deleted"}):e.jsx(J,{content:s.message.body}),!s.message.deletedAt&&s.message.attachments.length>0?e.jsx("div",{className:"community-message-attachments",children:s.message.attachments.map(i=>s.attachmentsAccessible?e.jsxs("button",{type:"button",onClick:()=>{s.onDownloadAttachment(i.id)},children:[e.jsx("span",{children:i.name}),e.jsx("small",{children:_(i.sizeBytes)})]},i.id):e.jsxs("div",{className:"community-attachment-placeholder",children:[e.jsx("span",{children:i.name}),e.jsxs("small",{children:["Join to view · ",_(i.sizeBytes)]})]},i.id))}):null]})]})}function je(s){return s.split(/\s+/).slice(0,2).map(n=>n[0]?.toUpperCase()??"").join("")||"?"}function pe(s){const n=new Date(s);return Number.isNaN(n.getTime())?"":n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function _(s){return s<1024?`${s} B`:s<1024*1024?`${Math.round(s/1024)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function ve(s){const[n,m]=l.useState(!1),a=l.useRef(null),y=l.useRef(s.onClose);l.useEffect(()=>m(!1),[s.rules.id]),l.useEffect(()=>{y.current=s.onClose},[s.onClose]),l.useEffect(()=>{const u=document.activeElement instanceof HTMLElement?document.activeElement:null,f=a.current,i=()=>[...f?.querySelectorAll('button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')??[]];i()[0]?.focus();const b=h=>{if(h.key==="Escape"){h.preventDefault(),y.current();return}if(h.key!=="Tab")return;const p=i();if(p.length===0){h.preventDefault(),f?.focus();return}const C=p[0],N=p.at(-1);h.shiftKey&&document.activeElement===C?(h.preventDefault(),N.focus()):!h.shiftKey&&document.activeElement===N&&(h.preventDefault(),C.focus())};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),u?.focus()}},[]);const c=s.mode!=="review";return e.jsx("div",{className:"community-dialog-backdrop",role:"presentation",onMouseDown:s.onClose,children:e.jsxs("section",{ref:a,className:"community-rules-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"community-rules-title",tabIndex:-1,onMouseDown:u=>u.stopPropagation(),children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("small",{children:["Community rules · version ",s.rules.version]}),e.jsx("h2",{id:"community-rules-title",children:s.rules.title})]}),e.jsx("button",{type:"button","aria-label":"Close rules",onClick:s.onClose,children:e.jsx(Y,{size:16})})]}),e.jsx("div",{className:"community-rules-body",children:e.jsx(J,{content:s.rules.bodyMarkdown})}),e.jsxs("footer",{children:[c?e.jsxs("label",{className:"community-rules-acceptance",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:u=>m(u.currentTarget.checked)}),e.jsx("span",{children:"I have read and agree to follow these rules."})]}):e.jsx("span",{}),e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"secondary",onClick:s.onClose,children:"Cancel"}),c?e.jsx("button",{type:"button",disabled:!n||s.busy,onClick:()=>{s.onAccept().then(u=>{u&&s.onClose()})},children:s.busy?"Saving…":s.mode==="join"?"Agree and join":"Accept updated rules"}):null]})]})]})})}function Ie({communities:s,chat:n,currentUserId:m}){M(s.discoveryError),M(s.previewError),M(s.membershipError?.message),M(n.channelsError,{prefix:"Channels"}),M(n.messagesError,{prefix:"Messages"}),M(n.actionError);const[a,y]=l.useState(null),[c,u]=l.useState(null),f=l.useRef(null),i=s.preview,b=i?.membership?.status==="active",h=!!i?.capabilities.requiresRulesAcceptance,p=l.useMemo(()=>new Map(n.members.map(o=>[o.userId,o])),[n.members]),C=l.useMemo(()=>new Map(n.messages.map(o=>[o.id,o])),[n.messages]),N=n.messages.at(-1)?.sequence??0;if(l.useEffect(()=>{const o=f.current;o&&(o.scrollTop=o.scrollHeight)},[n.selectedChannelId,N]),l.useEffect(()=>{u(null),h&&i?.currentRules&&y("reaccept")},[i?.currentRules,h]),!s.selectedSummary)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-discovery-card",children:[e.jsx(O,{size:30}),e.jsx("h1",{children:"Discover communities"}),e.jsx("p",{children:s.discoveryLoading&&s.items.length===0?"Finding communities…":"Preview public conversations and join after accepting each community's rules."}),s.items.length>0?e.jsx("div",{className:"community-discovery-list",children:s.items.map(o=>e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(o.id),children:[e.jsx(H,{name:o.displayName,imageUrl:o.imageUrl}),e.jsxs("span",{children:[e.jsx("strong",{children:o.displayName}),e.jsx("small",{children:o.description})]}),e.jsx("em",{children:o.membership?.status==="active"?"Joined":o.featuredAt?"Featured":`${o.memberCount.toLocaleString()} members`})]},o.id))}):s.discoveryLoading?null:e.jsx("div",{className:"community-state",children:"No public communities are available yet."}),e.jsxs("div",{className:"community-discovery-actions",children:[e.jsxs("button",{type:"button",onClick:()=>{s.refresh()},disabled:s.discoveryLoading,children:[e.jsx(F,{size:14})," Refresh"]}),s.nextCursor?e.jsx("button",{type:"button",className:"secondary",onClick:()=>{s.loadMore()},disabled:s.discoveryLoading,children:"Load more"}):null]})]})});if(!i&&s.previewLoading)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("span",{className:"community-spinner"})," Loading community…"]})});if(!i)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("h1",{children:s.selectedSummary.displayName}),e.jsx("div",{className:"community-state",children:"This community preview is unavailable."}),e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(s.selectedSummary.id),children:[e.jsx(F,{size:14})," Retry preview"]})]})});const v=i.currentRules;return e.jsxs("section",{className:"community-view",children:[e.jsxs("header",{className:"community-header",children:[e.jsxs("div",{className:"community-heading",children:[e.jsx(H,{name:i.displayName,imageUrl:i.imageUrl}),e.jsxs("div",{children:[e.jsx("small",{children:i.displayName}),e.jsx("h1",{children:n.selectedChannel?`# ${n.selectedChannel.displayName}`:i.displayName}),e.jsx("p",{children:n.selectedChannel?.topic||i.description})]})]}),e.jsxs("div",{className:"community-header-actions",children:[e.jsxs("span",{className:"community-member-count",children:[e.jsx(O,{size:14})," ",i.memberCount.toLocaleString()]}),v?e.jsxs("button",{type:"button",className:"secondary",onClick:()=>y("review"),children:[e.jsx(Z,{size:14})," Rules"]}):null,b?e.jsx(Ce,{mode:i.membership?.notificationMode??"mentions",busy:s.membershipBusy,onMode:s.updateNotifications,onLeave:s.leave}):null]})]}),e.jsxs("div",{className:"community-chat-main conversation-surface-main",children:[e.jsxs("div",{className:"community-chat-notices",children:[b?h?e.jsxs("div",{className:"community-preview-banner warning",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"The rules have changed"}),e.jsx("span",{children:"Accept the current rules to continue reading live updates and posting."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("reaccept"),children:"Review updated rules"})]}):null:e.jsxs("div",{className:"community-preview-banner",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Previewing ",i.displayName]}),e.jsx("span",{children:"Read the public conversation, then accept the rules to join and post."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("join"),children:"Join community"})]}),n.realtimeError&&b&&!h?e.jsxs("div",{className:"community-realtime-state",children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Live updates are reconnecting. Loaded messages are still available."})]}):null,n.lostMembership?e.jsx("div",{className:"community-state error",children:"Your membership changed. Refresh the community before continuing."}):null,n.channelsError?e.jsx("button",{type:"button",className:"community-state",onClick:()=>{n.loadChannels()},children:"Retry loading channels"}):null]}),e.jsxs("div",{className:"community-message-pane conversation-message-scroll",ref:f,role:"log","aria-live":"polite","aria-relevant":"additions text","aria-busy":n.messagesLoading,"aria-label":n.selectedChannel?`${i.displayName}, ${n.selectedChannel.displayName}`:i.displayName,tabIndex:0,children:[n.hasMoreBefore?e.jsx("button",{type:"button",className:"community-load-older",disabled:n.olderMessagesLoading,onClick:()=>{n.loadOlder()},children:n.olderMessagesLoading?"Loading…":"Load earlier messages"}):null,n.messagesLoading&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"Loading messages…"}):null,n.messagesError?e.jsxs("div",{className:"community-message-state",children:["Messages are unavailable. ",e.jsx("button",{type:"button",onClick:()=>{n.loadMessages()},children:"Retry"})]}):null,!n.messagesLoading&&!n.messagesError&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"No messages in this channel yet."}):null,n.messages.map(o=>e.jsx(be,{message:o,author:o.authorUserId?p.get(o.authorUserId)??null:null,own:o.authorUserId===m,attachmentsAccessible:!n.previewMode,membersById:p,messagesById:C,onReply:u,onEdit:n.editMessage,onDelete:n.deleteMessage,onDownloadAttachment:n.downloadAttachment},o.id))]}),b?e.jsxs("div",{className:"community-composer-wrap conversation-composer-shell",children:[n.failedSend?e.jsxs("div",{className:"community-failed-send",children:[e.jsx("span",{children:"Message not sent."}),e.jsx("button",{type:"button",disabled:n.sending,onClick:()=>{n.retrySend()},children:"Retry"}),e.jsx("button",{type:"button",onClick:n.dismissFailedSend,children:"Dismiss"})]}):null,e.jsx(ge,{members:n.members,replyTo:c,busy:n.sending,disabled:h||n.lostMembership||!n.selectedChannel||n.selectedChannel.postingPolicy==="admins"&&i.membership?.role==="member",onCancelReply:()=>u(null),onSearchMembers:n.searchMembers,onSend:n.sendMessage})]}):null]}),a&&v?e.jsx(ve,{rules:v,mode:a,busy:s.membershipBusy,onAccept:a==="join"?s.join:s.acceptRules,onClose:()=>y(null)}):null]})}function Ce(s){const[n,m]=l.useState(!1);return e.jsxs("div",{className:"community-membership-menu",children:[e.jsxs("button",{type:"button",className:"secondary","aria-expanded":n,onClick:()=>m(a=>!a),children:[s.mode==="none"?e.jsx(se,{size:14}):e.jsx(ne,{size:14})," Joined"]}),n?e.jsxs("div",{className:"community-membership-popover",children:[e.jsx("strong",{children:"Notifications"}),["mentions","all","none"].map(a=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"community-notifications",checked:s.mode===a,disabled:s.busy,onChange:()=>{s.onMode(a)}})," ",a==="mentions"?"Mentions":a==="all"?"All messages":"Nothing"]},a)),e.jsx("button",{type:"button",className:"danger",disabled:s.busy,onClick:()=>{window.confirm("Leave this community? You can join again later by accepting the current rules.")&&s.onLeave().then(a=>{a&&m(!1)})},children:"Leave community"})]}):null]})}function H({name:s,imageUrl:n}){return n?e.jsx("img",{className:"community-icon",src:n,alt:""}):e.jsx("span",{className:"community-icon fallback",children:s.slice(0,2).toUpperCase()})}export{Ie as CommunityView};
@@ -0,0 +1 @@
1
+ import{r as v,j as e}from"./index-DEg0S7Qk.js";import{aG as _,aO as A,bA as P,L as x,X as j,y,aB as C,aL as w}from"./App-pcwmC4IR.js";import{P as q}from"./MarkdownText-BBVriBCj.js";import{P as k}from"./play-pmSO95Qg.js";function L({runtime:s}){const[a,i]=v.useState(!1),[o,l]=v.useState(""),[n,u]=v.useState(null),t=s.run,h=t.plan,g=N(t),c={run:t},f=E(t.state),r=S(t),R=r?.git?.pullRequest??t.releaseOutcome.pullRequest;v.useEffect(()=>{i(!1),l(""),u(null)},[t.id,t.revision,t.state,h?.id,g?.id]);async function d(p,b){if(!(!b||n)){u(p);try{await b()}finally{u(null)}}}return e.jsxs("section",{className:`composer-create-strip ${f}`,"aria-label":"Create or improve status",children:[e.jsxs("div",{className:"composer-create-strip-heading",children:[f==="danger"?e.jsx(_,{size:15}):t.state==="awaiting_questions"?e.jsx(A,{size:15}):I(t.state)?e.jsx(P,{className:"composer-create-spin",size:15}):e.jsx(x,{size:15}),e.jsx("span",{children:B(t)}),e.jsx("small",{children:t.target.kind})]}),t.state==="awaiting_questions"&&g?e.jsxs("div",{className:"composer-create-question",children:[e.jsx("p",{children:g.prompt}),e.jsx("div",{className:"composer-create-options",children:g.options.map(p=>e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d(`answer:${p.id}`,()=>s.onAnswerQuestion?s.onAnswerQuestion(c,g.id,p.value):Promise.resolve())},children:[e.jsx("span",{children:n===`answer:${p.id}`?"Saving":p.label}),p.description?e.jsx("small",{children:p.description}):null]},p.id))})]}):t.state==="awaiting_plan_approval"&&h?e.jsxs("div",{className:"composer-create-plan-summary",children:[e.jsx("p",{children:h.summary}),e.jsx(m,{run:t}),a?e.jsxs("div",{className:"composer-create-revision",children:[e.jsx("textarea",{rows:2,value:o,placeholder:"Describe the plan revision",onChange:p=>l(p.currentTarget.value)}),e.jsxs("div",{children:[e.jsxs("button",{type:"button",disabled:!o.trim()||!!n,onClick:()=>{d("revise",()=>s.onRevise?s.onRevise(c,o):Promise.resolve())},children:[e.jsx(x,{size:13}),e.jsx("span",{children:n==="revise"?"Saving":"Save revision"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!1),children:[e.jsx(j,{size:13}),e.jsx("span",{children:"Close"})]})]})]}):e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("approve",()=>s.onApprove?s.onApprove(c):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="approve"?"Confirming":"Confirm plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!0),children:[e.jsx(x,{size:13}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("cancel",()=>s.onCancel?s.onCancel(c):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="cancel"?"Cancelling":"Cancel"})]})]})]}):t.state==="paused"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:"This work is paused. Resume it when you are ready to continue."}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="resume"?"Resuming":"Resume"})]})]}):t.state==="awaiting_promotion"&&r?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:T(t,r.id)}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n||!$(t,r.id),onClick:()=>{d("apply-candidate",()=>s.onApplyCandidate?s.onApplyCandidate(c,r.id):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="apply-candidate"?"Applying":"Apply update"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Keeping current version":"Keep current version"})]})]})]}):t.state==="pull_request_open"&&r&&R?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.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."}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Refresh review"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Closing":"Close review"})]})]})]}):t.state==="blocked"||t.state==="failed"||t.state==="cancelled"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.blockedReason??"This work stopped before it was ready."}),t.state==="blocked"&&r?.git?.worktreePath&&["draft","checking"].includes(r.status)?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="resume"?"Continuing":"Continue update"})]}):t.state==="blocked"&&r?.git?.pullRequest?.state==="merged"?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Re-run verification"})]}):null]}):t.state==="released"||t.state==="rejected"||t.state==="ready_local"||t.state==="ready"||t.state==="published_hosted"?e.jsxs("div",{className:"composer-create-status-body composer-create-status-body-reveals",children:[e.jsx("p",{children:t.state==="released"?"The Agent update is saved and its Evals passed.":t.state==="rejected"?"The Agent update was not applied.":t.state==="published_hosted"?"Published to the hosted Profile.":"The Agent and its actions are ready to use."}),e.jsx("div",{className:"composer-create-hover-details",children:e.jsx(m,{run:t})})]}):e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:z(t)}),e.jsx(m,{run:t}),t.executionPolicy.pauseAllowed&&s.onPause?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("pause",()=>s.onPause?.(c)??Promise.resolve())},children:[e.jsx(q,{size:13}),e.jsx("span",{children:n==="pause"?"Pausing":"Pause"})]}):null]})]})}function N(s){return s.questions.find(a=>a.status==="pending"&&a.required)??s.questions.find(a=>a.status==="pending")??null}function m({run:s}){const a=s.plan,i=s.target.kind==="agent",o=i?null:s.sourceRefs[0]??a?.sourcePlan[0]?.path??null,l=s.checkRefs.length||a?.checks.length||0,n=i?0:a?.requirements.length??0,u=i?[]:[...s.sourceRefs,...s.checkRefs].slice(0,4),t=w(a?.metadata);return!o&&l===0&&n===0&&u.length===0&&!t?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"composer-create-facts",children:[t?e.jsx("span",{title:t.detail,children:t.label}):null,o?e.jsx("span",{title:o,children:o}):null,l?e.jsx("span",{children:i?`${l} Evals`:s.checkRefs.length?`${s.checkRefs.length} check refs`:`${l} checks`}):null,n?e.jsxs("span",{children:[n," setup rows"]}):null]}),u.length?e.jsx("ul",{className:"composer-create-refs","aria-label":"Source and check refs",children:u.map(h=>e.jsx("li",{children:e.jsx("code",{title:h,children:h})},h))}):null]})}function B(s){const a=s.target.kind==="agent";return s.state==="awaiting_questions"?"Question":s.state==="awaiting_plan_approval"?"Plan":s.state==="applying_source"?a?"Saving Agent":"Applying source":s.state==="running_checks"?"Running Evals":s.state==="evaluating"?a?"Checking Agent":"Evaluating":s.state==="awaiting_promotion"?a?"Update ready":"Candidate ready":s.state==="opening_pull_request"?"Opening review":s.state==="pull_request_open"?"Review open":s.state==="reconciling_release"?a?"Applying update":"Merging change":s.state==="released"?a?"Agent updated":"Released":s.state==="rejected"?a?"Current Agent kept":"Rejected":s.state==="paused"?"Paused":s.state==="ready"||s.state==="ready_local"?"Ready":s.state==="published_hosted"?"Published":s.state==="cancelled"?"Cancelled":s.state==="blocked"?"Blocked":s.state==="failed"?"Failed":s.operation==="improve"?"Improve":"Create"}function z(s){const a=s.state,i=s.target.kind==="agent";return a==="applying_source"?i?"Saving the approved Agent plan.":"Applying the approved source changes.":a==="running_checks"?i?"Running Evals against the Agent.":"Running checks against the candidate.":a==="evaluating"?i?"Checking the Agent's behavior.":"Evaluating the candidate against its Evals.":a==="opening_pull_request"?i?"Preparing the Agent update review.":"Opening the candidate review.":a==="reconciling_release"?"Applying the change and verifying the active Profile.":a==="pushing_hosted"?"Pushing the Profile source.":a==="running_hosted_checks"?i?"Running hosted Evals.":"Running hosted checks.":"Preparing the work."}function E(s){return["released","ready","ready_local","published_hosted"].includes(s)?"success":["rejected","blocked","failed","cancelled"].includes(s)?"danger":["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(s)?"warning":"info"}function I(s){return["planning","applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(s)}function S(s){return[...s.candidates].reverse().find(a=>a.target.kind==="agent")??null}function $(s,a){const i=s.evaluationReceipts.filter(o=>o.candidateId===a&&o.subject==="candidate");return i.length>0&&i.every(o=>o.status==="passed"&&o.publishGate!=="failed")}function T(s,a){const i=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="active"),o=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="candidate"),l=n=>n?.summaryCounts?`${n.summaryCounts.passed}/${n.summaryCounts.total}`:n?.status??"not run";return s.target.kind==="agent"?`Current Agent: ${l(i)} Evals passed. Updated Agent: ${l(o)} Evals passed.`:`Base Evals: ${l(i)} passed. Candidate Evals: ${l(o)} passed.`}export{L as ComposerCreateImproveStrip};
@@ -0,0 +1 @@
1
+ import{r as g,j as e}from"./index-DEg0S7Qk.js";import{bH as C,cq as S,g as N}from"./App-pcwmC4IR.js";import{u as k,A as q,c as w}from"./agent-connections-4Dza2mDg.js";const D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function I({schedule:n,name:s,disabled:i,disconnected:l,onSave:p}){const[u,r]=g.useState(null),c=u??{enabled:!!n,frequency:n?.frequency??"daily",time:n?.frequency==="daily"||n?.frequency==="weekly"?n.time:"00:00",day:n?.frequency==="weekly"?n.day:1,expression:n?.frequency==="cron"?n.expression:"0 * * * *"},{enabled:a,frequency:o,time:x,day:v,expression:j}=c,d=a?o==="cron"?{frequency:o,expression:j.trim()}:o==="hourly"?{frequency:o}:o==="weekly"?{frequency:o,time:x,day:v}:{frequency:o,time:x}:null,m=JSON.stringify(d)!==JSON.stringify(n),y=i||!a||l,h=o==="daily"||o==="weekly";return e.jsxs("form",{className:"conversation-import-schedule",onSubmit:t=>{t.preventDefault(),p(d).then(()=>r(null)).catch(()=>{})},children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a,disabled:i||l&&!a,onChange:t=>r({...c,enabled:t.target.checked})}),"Continual imports"]}),e.jsxs("label",{children:["Frequency",e.jsxs("select",{"aria-label":`${s} import frequency`,value:o,disabled:y,onChange:t=>r({...c,frequency:t.target.value}),children:[e.jsx("option",{value:"hourly",children:"Hourly"}),e.jsx("option",{value:"daily",children:"Daily"}),e.jsx("option",{value:"weekly",children:"Weekly"}),e.jsx("option",{value:"cron",children:"Custom cron"})]})]}),o==="weekly"?e.jsxs("label",{children:["Day",e.jsx("select",{"aria-label":`${s} import day`,value:v,disabled:y,onChange:t=>r({...c,day:Number(t.target.value)}),children:D.map((t,b)=>e.jsx("option",{value:b,children:t},t))})]}):null,h?e.jsxs("label",{children:["Sync time",e.jsx("input",{"aria-label":`${s} sync time`,type:"time",required:a,value:x,disabled:y,onChange:t=>r({...c,time:t.target.value})})]}):null,o==="cron"?e.jsxs("label",{children:["Cron expression",e.jsx("input",{"aria-label":`${s} cron expression`,type:"text",required:a,maxLength:512,value:j,placeholder:"0 * * * *",disabled:y,onChange:t=>r({...c,expression:t.target.value})})]}):null,e.jsx("button",{className:"settings-secondary",type:"submit",disabled:i||!m||a&&(h?!x:o==="cron"&&!j.trim()),children:a?"Save schedule":"Disable continual imports"}),e.jsxs("small",{children:[o==="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. ":o==="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."]})]})}const f=(n,s)=>n?new Date(n).toLocaleString(void 0,{timeZone:s}):"Not yet";function T({connection:n}){const{inventory:s,loading:i,error:l,refresh:p}=k(n),[u,r]=g.useState(!1),[c,a]=g.useState(null),[o,x]=g.useState(null);async function v(d,m,y){if(!(!n||u)){r(!0),a(null);try{const h=await N(n,"/v1/native-history/collector",{method:"POST",body:JSON.stringify({command:d,connectionId:m,...y!==void 0?{schedule:y}:{}})});h.command&&x(h.command),await p()}catch(h){throw a(h instanceof Error?h.message:"Unable to update conversation imports."),h}finally{r(!1)}}}const j=(d,m)=>{v(d,m).catch(()=>{})};return e.jsxs("section",{className:"account-settings conversation-imports",children:[e.jsxs("div",{className:"conversation-imports-heading",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Conversation imports"}),e.jsx("p",{children:"Import saved conversations once, or choose a separate recurring schedule for each source."})]}),e.jsx("button",{className:"settings-secondary",type:"button",disabled:i,onClick:()=>{p()},children:"Refresh"})]}),e.jsxs("p",{children:["Continual imports use this computer’s local time",s?` (${s.collector.timezone})`:"",". If it is off or asleep, that run is skipped. The next scheduled run picks up changes from missed days."]}),e.jsx("p",{children:"Imports do not enable continual learning or change model training schedules."}),l||c?e.jsx("p",{role:"alert",children:c??l}):null,n?null:e.jsx("p",{children:"Connect to a desktop runtime to manage imports."}),i&&!s?e.jsx("p",{role:"status",children:"Loading conversation imports…"}):null,s?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"conversation-imports-toolbar",children:[e.jsx("strong",{role:"status",children:s.collector.running?"Import in progress":"No import running"}),s.collector.running?e.jsx("button",{className:"settings-secondary",type:"button",disabled:u,onClick:()=>j("stop"),children:"Cancel current run"}):null]}),s.collector.connections.length?s.collector.connections.map(d=>e.jsx(R,{item:d,status:s.collector,disabled:u||o!==null,onAction:j,onSchedule:m=>v("schedule",d.id,m)},d.id)):e.jsxs("div",{className:"conversation-imports-empty",children:[e.jsx("p",{children:"No conversation sources connected. Choose a source in Connections and import its recent history."}),e.jsx("button",{className:"settings-secondary",type:"button",onClick:()=>C({kind:"view",view:"apps"}),children:"Open Connections"})]}),e.jsxs("details",{children:[e.jsx("summary",{children:"CLI and local state"}),e.jsx("p",{children:s.directory}),e.jsx("code",{children:s.statusCommand})]})]}):null,o&&n?e.jsx(S,{connection:n,command:o,onComplete:()=>{p()},onClose:()=>{x(null),p()}}):null]})}function R({item:n,status:s,disabled:i,onAction:l,onSchedule:p}){const u=q.find(a=>a.id===n.source),r=n.run,c=s.running&&r?.state==="running";return e.jsxs("article",{className:"conversation-import-card",children:[e.jsxs("div",{className:"conversation-import-card-heading",children:[e.jsx("h3",{children:u?.name??n.source}),e.jsx("span",{children:w(n,s)})]}),e.jsxs("dl",{className:"conversation-import-details",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Destination"}),e.jsx("dd",{children:n.accountBaseUrl??"Hosted destination"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Project"}),e.jsx("dd",{children:n.projectId})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Source"}),e.jsx("dd",{children:n.sourceRoot})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Initial history"}),e.jsx("dd",{children:n.since?`Since ${f(n.since,s.timezone)}`:"All history"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Last successful sync"}),e.jsx("dd",{children:f(n.lastSuccessfulSyncAt,s.timezone)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Next sync"}),e.jsx("dd",{children:n.nextRunAt?f(n.nextRunAt,s.timezone):n.schedule?"Source paused or disconnected":"Manual only"})]})]}),c&&r?e.jsxs("div",{role:"status",className:"conversation-import-progress",children:[e.jsxs("span",{children:[r.phase==="uploading"?"Uploading conversations":r.phase==="discovering"?"Finding conversations":"Reading conversations"," · ",r.processed," of ",r.discovered," checked"]}),r.discovered>0?e.jsx("progress",{value:r.processed,max:r.discovered,"aria-label":`${u?.name??n.source} import progress`}):e.jsx("progress",{"aria-label":"Finding conversations"}),e.jsxs("small",{children:[r.uploaded," turns uploaded · ",n.queued," updates queued"]})]}):e.jsxs("p",{children:[n.admitted," turns imported · ",n.queued," updates queued",r?.state==="cancelled"?" · Last run cancelled":""]}),n.error||r?.state==="failed"?e.jsx("p",{role:"alert",children:n.error??r?.error}):null,e.jsx(I,{schedule:n.schedule,name:u?.name??n.source,disabled:i,disconnected:n.state==="disconnected",onSave:p}),e.jsxs("div",{className:"settings-button-row",children:[e.jsx("button",{className:"settings-secondary",type:"button",disabled:i||s.running||n.state!=="active",onClick:()=>l("sync",n.id),children:"Sync now"}),n.state==="disconnected"?e.jsx("button",{className:"settings-secondary",type:"button",disabled:i,onClick:()=>l("reconnect",n.id),children:"Reconnect"}):e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"settings-secondary",type:"button",disabled:i,onClick:()=>l(n.state==="paused"?"resume":"pause",n.id),children:n.state==="paused"?"Resume source":"Pause source"}),e.jsx("button",{className:"settings-secondary",type:"button",disabled:i,onClick:()=>l("disconnect",n.id),children:"Disconnect"})]})]})]})}export{T as ConversationImportsSettings};
@@ -0,0 +1 @@
1
+ .conversation-imports{display:flex;flex-direction:column;gap:18px}.conversation-imports p{margin:0;color:var(--muted, #9b9b9b);line-height:1.5}.conversation-imports-toolbar,.conversation-import-card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.conversation-import-card{border:1px solid var(--border);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:16px}.conversation-import-card h3{margin:0}.conversation-import-card-heading>span{color:var(--muted, #9b9b9b);font-size:12px}.conversation-import-details{margin:0;display:grid;gap:10px}.conversation-import-details>div{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px}.conversation-import-details dt{color:var(--muted, #9b9b9b);font-size:12px}.conversation-import-details dd{margin:0;overflow-wrap:anywhere;font-size:13px}.conversation-import-schedule{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding-top:16px;border-top:1px solid var(--border)}.conversation-import-schedule label{display:flex;align-items:center;gap:8px}.conversation-import-schedule small{flex-basis:100%;color:var(--muted, #9b9b9b);line-height:1.5}.conversation-import-progress{display:flex;flex-direction:column;gap:8px}.conversation-import-progress progress{width:100%}.conversation-imports details{font-size:12px;overflow-wrap:anywhere}.conversation-imports [role=alert]{color:var(--danger, #db6464)}@media(max-width:640px){.conversation-import-details>div{grid-template-columns:1fr;gap:4px}.conversation-import-card-heading{align-items:flex-start}}.conversation-imports-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.conversation-imports-heading h1{margin:0 0 12px}.conversation-import-schedule input[type=time],.conversation-import-schedule input[type=text],.conversation-import-schedule select{border:1px solid var(--border);background:#202020;color:inherit;border-radius:8px;padding:8px;color-scheme:dark}
@@ -1 +1 @@
1
- import{r as x,j as t}from"./index-C8aCGagb.js";import{P as k}from"./play-C469pVZq.js";import{aD as ae,w as se,X as ne,bJ as I,cv as ie,cw as re,cx as oe,cy as de,W as D,cz as le,cA as ce,cB as ue}from"./App-s-CJswyt.js";import{A as pe}from"./AppDialog-t2Fx5tK3.js";import{a as fe}from"./MarkdownText-BR4V6lNO.js";function ge({badge:e,onPlay:a,titleElement:i="h3",video:s}){const[d,n]=x.useState(!1),r=x.useRef(null),u=i,l=`${s.id}-title`;function p(){if(a){a();return}ae.flushSync(()=>n(!0));const c=r.current;c&&(c.load(),c.play().catch(()=>{}))}return t.jsxs(t.Fragment,{children:[t.jsxs("article",{className:"get-started-course-card","aria-labelledby":l,children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Play ${s.title}`,className:"get-started-course-open",onClick:p,type:"button"}),t.jsxs("div",{className:"get-started-course-media",children:[t.jsx("img",{alt:"",className:"get-started-course-poster",decoding:"async",src:s.posterUrl}),t.jsx("span",{className:"get-started-course-play-icon","aria-hidden":"true",children:t.jsx(k,{fill:"currentColor",size:19})}),e?t.jsx("span",{className:"get-started-course-badge","aria-hidden":"true",children:e}):null]}),t.jsxs("div",{className:"get-started-course-copy",children:[t.jsx(u,{id:l,children:s.title}),t.jsxs("div",{className:"get-started-course-meta","aria-label":`${s.title} details`,children:[t.jsx("span",{children:s.eyebrow}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:s.duration})]}),s.description?t.jsx("p",{children:s.description}):null]})]}),d&&!a?t.jsx(L,{onClose:()=>n(!1),video:s,videoRef:r}):null]})}function L({autoAdvance:e=!1,contained:a=!1,inertExclusionSelector:i,navigation:s,onEnded:d,onClose:n,onPause:r,onTimeUpdate:u,video:l,videoRef:p}){return t.jsxs(pe,{ariaLabel:`${l.title} player`,backdropClassName:"get-started-course-player-backdrop",className:"get-started-course-player",contained:a,inertExclusionSelector:i,onClose:n,children:[t.jsxs("header",{className:"get-started-course-player-header",children:[t.jsxs("div",{className:"get-started-course-player-copy",children:[t.jsx("strong",{children:l.title}),t.jsxs("span",{children:[s?`Lesson ${s.currentIndex+1} of ${s.total}`:l.eyebrow," · ",l.duration]})]}),t.jsxs("div",{className:"get-started-course-player-actions",children:[s?t.jsxs(t.Fragment,{children:[t.jsx("button",{"aria-label":"Previous lesson",disabled:!s.onPrevious,onClick:s.onPrevious,title:"Previous lesson",type:"button",children:t.jsx(se,{size:17})}),t.jsx("button",{"aria-label":"Next lesson",disabled:!s.onNext,onClick:s.onNext,title:"Next lesson",type:"button",children:t.jsx(fe,{size:17})})]}):null,t.jsx("button",{"aria-label":"Close video player","data-autofocus":!0,onClick:n,title:"Close",type:"button",children:t.jsx(ne,{size:18})})]})]}),t.jsx("div",{className:"get-started-course-player-body",children:t.jsx("div",{className:"get-started-course-player-media",children:t.jsx("div",{className:"get-started-course-player-stage",children:t.jsx("video",{"aria-label":`${l.title} video`,className:"get-started-course-player-video",controls:!0,"data-auto-advance":e?"true":void 0,onEnded:c=>d?.(c.currentTarget),onPause:c=>r?.(c.currentTarget),onTimeUpdate:c=>u?.(c.currentTarget),playsInline:!0,poster:l.posterUrl,preload:"metadata",ref:p,src:l.videoUrl,children:l.captionsUrl?t.jsx("track",{kind:"captions",label:"English",src:l.captionsUrl,srcLang:"en"}):null},l.id)})})})]})}const me=[{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"]}],he=[{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}],be={playlists:me,videos:he},ye="https://media.openpond.ai",K=be,Te=new Map(K.playlists.map(e=>[e.id,e])),xe=new Map(K.videos.map(e=>[e.id,e]));function z(e){const a=Te.get(e);if(!a)throw new Error(`Public video manifest is missing playlist ${e}`);return a}function Ae(e,a){return a?`${ye}/${e.objectKey}`:I(e.localPath)}function E(e){const a=xe.get(e);if(!a)throw new Error(`Public video manifest is missing ${e}`);return Ae(a,!0)}const ve=E("make-agent-tutorial"),Pe=E("openpond-agent-overview");function je(e){return E(`make-agent-tutorial-${e}`)}const Ne={title:"How to make an agent"},Ie=[{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}],$={tutorial:Ne,chapters:Ie},Ee=z("how-to-make-an-agent"),B=$.chapters,Se={create:"1:24",use:"1:05",improve:"1:10"},w=Ee.title,we=$.tutorial.title,F="4:33",H={captionsUrl:re,chapterIds:B.map(e=>e.id),description:"Create, use, and improve an Account Health Agent in one continuous walkthrough.",duration:F,eyebrow:"Play all",id:"make-agent-tutorial",lessonNumber:null,posterUrl:ie,title:we,videoId:"play-all",videoUrl:ve},T=B.map((e,a)=>({captionsUrl:de(e.id),chapterIds:[e.id],description:e.subtitle,duration:Se[e.id],eyebrow:`Lesson ${a+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:a+1,posterUrl:oe(e.id),title:e.title,videoId:e.id,videoUrl:je(e.id)})),Re=[H,...T];function W(e){return Re.find(a=>a.videoId===e)??H}function _e(e){const a=T.findIndex(i=>i.videoId===e);return a<0?null:T[a+1]?.videoId??null}const Oe=[2,1,0];function ke({activeVideoId:e="play-all",autoplay:a=!0,onClose:i,onOpen:s,onSelectVideo:d,open:n=!1,playRequestId:r=0}={}){const u=x.useRef(null),l=W(e);x.useEffect(()=>{if(!n)return;const c=u.current;c&&(c.load(),r>0&&c.play().catch(()=>{}))},[l.id,n,r]);function p(){if(!a||!d)return;const c=_e(e);c&&d(c)}return t.jsxs("section",{className:"get-started-series","aria-label":w,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"make-agent-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${w} playlist`,className:"get-started-playlist-open",onClick:s,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Oe.map((c,f)=>{const m=T[c];return t.jsx("div",{className:`get-started-playlist-poster layer-${f+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:m.posterUrl})},m.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[T.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsx("h1",{id:"make-agent-series-title",children:w}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Walkthrough playlist"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:F})]}),t.jsx("p",{children:"Create, use, and improve an Account Health Agent, or play the full walkthrough."})]})]}),n&&i&&d?t.jsx(Le,{activeVideoId:e,autoplay:a,contained:!0,inertExclusionSelector:".get-started-learning-panel",onClose:i,onEnded:p,onSelectVideo:d,videoRef:u}):null]})}function Le({activeVideoId:e="play-all",autoplay:a=!0,contained:i=!1,inertExclusionSelector:s,onClose:d,onEnded:n,onSelectVideo:r=()=>{},videoRef:u}){const l=W(e),p=T.findIndex(m=>m.videoId===e),c=p>=0?T[p+1]?.videoId:void 0,f=p>0?T[p-1]?.videoId:void 0;return t.jsx(L,{autoAdvance:a&&p>=0,contained:i,inertExclusionSelector:s,navigation:p>=0?{currentIndex:p,onNext:c?()=>r(c):void 0,onPrevious:f?()=>r(f):void 0,total:T.length}:void 0,onClose:d,onEnded:n?()=>n():void 0,video:l,videoRef:u})}const U=z("post-training-from-first-principles"),q=U.title,Ue=U.status;function b(e,a,i,s,d,n){const r=`courses/post-training/${a}`,u=`post-training-${a}`;return{captionsUrl:I(`${r}.vtt`),description:n,duration:d,eyebrow:s,id:u,lessonNumber:e,posterUrl:I(`${r}-poster.webp`),slug:a,title:i,videoUrl:E(u)}}const A=[b(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."),b(2,"02-definitions","Definitions","Reference","6:14","Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series."),b(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."),b(4,"04-rewards-credit-assignment","Rewards and credit assignment","RL foundation","3:00","Follow a code-repair trajectory from actions and observations to advantage."),b(5,"05-verifiable-rewards-rlvr","Verifiable rewards","RLVR","2:53","See how tests create scalable rewards—and how a model can exploit the checker."),b(6,"06-ppo-grpo","PPO and GRPO","Policy updates","2:54","Compare PPO's learned critic with GRPO's sibling-response baseline."),b(7,"07-distillation","Distillation","Teacher targets","2:42","Transfer a teacher's token distribution instead of copying one final answer."),b(8,"08-opsd-sdft-sdpo","OPSD, SDFT, and SDPO","Teacher evidence","2:43","Compare trusted solutions, demonstrations, and failure feedback at one prefix."),b(9,"09-credible-experiments","Credible experiments","Research design","3:32","Build versioned datasets, fair baselines, and claims that survive scrutiny."),b(10,"10-technical-appendix","Technical appendix","Advanced details","3:12","Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.")],Ce="29 min",O=U.fullVideoId;if(!O)throw new Error("Post-training playlist is missing its full video");const Y={captionsUrl:I("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:O,posterUrl:I("courses/post-training/full-course-poster.webp"),title:q,videoUrl:E(O)};function J(e){const a=e+1;return a<A.length?a:null}const M="Subject to change, lesson work in progress";function Me(){const e=Ue==="draft"?"Draft":"Published";return t.jsx("span",{"aria-label":`${e}: ${M}`,className:"get-started-playlist-status app-tooltip","data-tooltip":M,tabIndex:0,children:e})}const X="openpond.post-training-progress.v1",j=Object.freeze({}),Ve=1e3,Q=new Set;let P=null,N=null,V=!1;function R(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Ge(e){if(!e||typeof e!="object"||Array.isArray(e))return j;const a={};for(const[i,s]of Object.entries(e)){if(!i||!s||typeof s!="object"||Array.isArray(s))continue;const d=s,n=R(d.duration),r=R(d.currentTime),u=R(d.updatedAt);if(n===null||n<=0||r===null)continue;const l=d.completed===!0;a[i]={completed:l,currentTime:l?n:Math.min(n,Math.max(0,r)),duration:n,updatedAt:u===null?0:Math.max(0,u)}}return Object.keys(a).length>0?a:j}function De(e){if(!e)return j;try{return Ge(JSON.parse(e))}catch{return j}}function Z(){if(typeof window>"u")return j;try{return De(D.getItem(X))}catch{return j}}function ee(){if(typeof window<"u"&&N!==null&&window.clearTimeout(N),N=null,!(typeof window>"u"||P===null))try{D.setItem(X,JSON.stringify(P))}catch{}}function Ke(){typeof window>"u"||N!==null||(N=window.setTimeout(ee,Ve))}function ze(){typeof window>"u"||V||(V=!0,window.addEventListener("pagehide",ee),le(()=>{P=Z(),Q.forEach(e=>e())}))}function te(){return P===null&&(P=Z()),ze(),P}function G({completed:e=!1,currentTime:a,duration:i,lessonId:s}){if(!s||!Number.isFinite(i)||i<=0||!Number.isFinite(a))return;const d=te(),n=d[s],r=!!(n?.completed||e),u=r?i:Math.min(i,Math.max(0,a));n&&n.completed===r&&Math.abs(n.currentTime-u)<.25&&Math.abs(n.duration-i)<.25||(P={...d,[s]:{completed:r,currentTime:u,duration:i,updatedAt:Date.now()}},Ke(),Q.forEach(l=>l()))}function $e(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}const _=q,Be=[2,1,0];function Fe({activeLessonIndex:e,fullCourseSelected:a=!1,autoplay:i=!0,open:s,onClose:d,onOpen:n,onSelectLesson:r,playRequestId:u=0}){const l=x.useRef(null),p=x.useRef(null),c=A[e]??A[0],f=a?Y:c;x.useEffect(()=>{if(!s)return;const o=l.current;if(!o)return;let h=!1;p.current=null,o.load();const y=()=>{if(h)return;const C=$e(te()[f.id]);C>0&&(o.currentTime=C),u>0&&o.play().catch(()=>{})};return o.readyState>=HTMLMediaElement.HAVE_METADATA?y():o.addEventListener("loadedmetadata",y,{once:!0}),()=>{h=!0,o.removeEventListener("loadedmetadata",y),Number.isFinite(o.duration)&&o.duration>0&&o.currentTime>0&&G({completed:o.ended,currentTime:o.currentTime,duration:o.duration,lessonId:f.id})}},[f.id,s,u]);function m(o,h=!1){!Number.isFinite(o.duration)||o.duration<=0||G({completed:h,currentTime:h?o.duration:o.currentTime,duration:o.duration,lessonId:f.id})}function S(o){if(!Number.isFinite(o.duration)||o.duration<=0)return;const h=Math.min(99,Math.floor(o.currentTime/o.duration*100)),y=p.current;y?.lessonId===f.id&&y.percent===h||(p.current={lessonId:f.id,percent:h},m(o))}function v(o){m(o,!0),i&&!a&&g()}function g(){const o=J(e);o!==null&&r(o)}return t.jsxs("section",{className:"get-started-series","aria-label":_,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"post-training-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${_} playlist`,className:"get-started-playlist-open",onClick:n,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Be.map((o,h)=>{const y=A[o];return t.jsx("div",{className:`get-started-playlist-poster layer-${h+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:y.posterUrl})},y.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[A.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsxs("div",{className:"get-started-playlist-title",children:[t.jsx("h1",{id:"post-training-series-title",children:_}),t.jsx(Me,{})]}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Learning series"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:Ce})]}),t.jsx("p",{children:"Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix."})]})]}),s?t.jsx(He,{activeLessonIndex:e,autoplay:i,fullCourseSelected:a,onClose:d,onEnded:v,onPause:m,onSelectLesson:r,onTimeUpdate:S,videoRef:l}):null]})}function He({activeLessonIndex:e,autoplay:a,fullCourseSelected:i,onClose:s,onEnded:d,onPause:n,onSelectLesson:r,onTimeUpdate:u,videoRef:l}){const p=A[e]??A[0],c=J(e),f=i?Y:p;return t.jsx(L,{autoAdvance:a&&!i,contained:!0,inertExclusionSelector:".get-started-learning-panel",navigation:i?void 0:{currentIndex:e,onNext:c!==null?()=>r(c):void 0,onPrevious:e>0?()=>r(e-1):void 0,total:A.length},onClose:s,onEnded:d,onPause:n,onTimeUpdate:u,video:f,videoRef:l})}const We={captionsUrl:ue,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:ce,title:"What is an OpenPond Agent?",videoUrl:Pe};function Ze(e={}){const[a,i]=x.useState(null),[s,d]=x.useState(null),n=e.makeAgentTutorial===void 0?a:e.makeAgentTutorial,r=e.postTrainingCourse===void 0?s:e.postTrainingCourse,u=!!(r||n);function l(){if(e.onOpenMakeAgentTutorial){e.onOpenMakeAgentTutorial();return}d(null),i({autoplay:!0,playRequestId:0,videoId:"create"})}function p(){if(e.onCloseMakeAgentTutorial){e.onCloseMakeAgentTutorial();return}i(null)}function c(v){if(e.onSelectMakeAgentTutorialVideo){e.onSelectMakeAgentTutorialVideo(v);return}i(g=>g&&{...g,playRequestId:g.playRequestId+1,videoId:v})}function f(){if(e.onOpenPostTrainingCourse){e.onOpenPostTrainingCourse();return}i(null),d({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0})}function m(){if(e.onClosePostTrainingCourse){e.onClosePostTrainingCourse();return}d(null)}function S(v){if(e.onSelectPostTrainingLesson){e.onSelectPostTrainingLesson(v);return}d(g=>g&&{...g,fullCourseSelected:!1,lessonIndex:v,playRequestId:g.playRequestId+1})}return t.jsx("section",{className:`get-started-view ${u?"course-player-open":""}`,"aria-label":"Walkthroughs",children:t.jsxs("div",{className:"get-started-shell",children:[t.jsxs("section",{className:"get-started-start-here","aria-labelledby":"get-started-start-here-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-start-here-title",children:"Start here"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(ge,{titleElement:"h1",video:We})})]}),t.jsxs("section",{className:"get-started-walkthroughs","aria-labelledby":"get-started-walkthroughs-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-walkthroughs-title",children:"Walkthroughs"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(ke,{activeVideoId:n?.videoId??"create",autoplay:n?.autoplay??!0,onClose:p,onOpen:l,onSelectVideo:c,open:!!n,playRequestId:n?.playRequestId??0})})]}),t.jsxs("section",{className:"get-started-learn","aria-labelledby":"get-started-learn-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-learn-title",children:"Learn deeper"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(Fe,{activeLessonIndex:r?.lessonIndex??0,autoplay:r?.autoplay??!0,fullCourseSelected:r?.fullCourseSelected??!1,open:!!r,onClose:m,onOpen:f,onSelectLesson:S,playRequestId:r?.playRequestId??0})})]})]})})}export{Ze as GetStartedView};
1
+ import{r as x,j as t}from"./index-DEg0S7Qk.js";import{P as k}from"./play-pmSO95Qg.js";import{aE as ae,x as se,X as ne,bK as I,cw as ie,cx as re,cy as oe,cz as de,Y as D,cA as le,cB as ce,cC as ue}from"./App-pcwmC4IR.js";import{A as pe}from"./AppDialog-CdHad7GT.js";import{a as fe}from"./MarkdownText-BBVriBCj.js";function ge({badge:e,onPlay:a,titleElement:i="h3",video:s}){const[d,n]=x.useState(!1),r=x.useRef(null),u=i,l=`${s.id}-title`;function p(){if(a){a();return}ae.flushSync(()=>n(!0));const c=r.current;c&&(c.load(),c.play().catch(()=>{}))}return t.jsxs(t.Fragment,{children:[t.jsxs("article",{className:"get-started-course-card","aria-labelledby":l,children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Play ${s.title}`,className:"get-started-course-open",onClick:p,type:"button"}),t.jsxs("div",{className:"get-started-course-media",children:[t.jsx("img",{alt:"",className:"get-started-course-poster",decoding:"async",src:s.posterUrl}),t.jsx("span",{className:"get-started-course-play-icon","aria-hidden":"true",children:t.jsx(k,{fill:"currentColor",size:19})}),e?t.jsx("span",{className:"get-started-course-badge","aria-hidden":"true",children:e}):null]}),t.jsxs("div",{className:"get-started-course-copy",children:[t.jsx(u,{id:l,children:s.title}),t.jsxs("div",{className:"get-started-course-meta","aria-label":`${s.title} details`,children:[t.jsx("span",{children:s.eyebrow}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:s.duration})]}),s.description?t.jsx("p",{children:s.description}):null]})]}),d&&!a?t.jsx(L,{onClose:()=>n(!1),video:s,videoRef:r}):null]})}function L({autoAdvance:e=!1,contained:a=!1,inertExclusionSelector:i,navigation:s,onEnded:d,onClose:n,onPause:r,onTimeUpdate:u,video:l,videoRef:p}){return t.jsxs(pe,{ariaLabel:`${l.title} player`,backdropClassName:"get-started-course-player-backdrop",className:"get-started-course-player",contained:a,inertExclusionSelector:i,onClose:n,children:[t.jsxs("header",{className:"get-started-course-player-header",children:[t.jsxs("div",{className:"get-started-course-player-copy",children:[t.jsx("strong",{children:l.title}),t.jsxs("span",{children:[s?`Lesson ${s.currentIndex+1} of ${s.total}`:l.eyebrow," · ",l.duration]})]}),t.jsxs("div",{className:"get-started-course-player-actions",children:[s?t.jsxs(t.Fragment,{children:[t.jsx("button",{"aria-label":"Previous lesson",disabled:!s.onPrevious,onClick:s.onPrevious,title:"Previous lesson",type:"button",children:t.jsx(se,{size:17})}),t.jsx("button",{"aria-label":"Next lesson",disabled:!s.onNext,onClick:s.onNext,title:"Next lesson",type:"button",children:t.jsx(fe,{size:17})})]}):null,t.jsx("button",{"aria-label":"Close video player","data-autofocus":!0,onClick:n,title:"Close",type:"button",children:t.jsx(ne,{size:18})})]})]}),t.jsx("div",{className:"get-started-course-player-body",children:t.jsx("div",{className:"get-started-course-player-media",children:t.jsx("div",{className:"get-started-course-player-stage",children:t.jsx("video",{"aria-label":`${l.title} video`,className:"get-started-course-player-video",controls:!0,"data-auto-advance":e?"true":void 0,onEnded:c=>d?.(c.currentTarget),onPause:c=>r?.(c.currentTarget),onTimeUpdate:c=>u?.(c.currentTarget),playsInline:!0,poster:l.posterUrl,preload:"metadata",ref:p,src:l.videoUrl,children:l.captionsUrl?t.jsx("track",{kind:"captions",label:"English",src:l.captionsUrl,srcLang:"en"}):null},l.id)})})})]})}const me=[{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"]}],he=[{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}],be={playlists:me,videos:he},ye="https://media.openpond.ai",K=be,Te=new Map(K.playlists.map(e=>[e.id,e])),xe=new Map(K.videos.map(e=>[e.id,e]));function z(e){const a=Te.get(e);if(!a)throw new Error(`Public video manifest is missing playlist ${e}`);return a}function Ae(e,a){return a?`${ye}/${e.objectKey}`:I(e.localPath)}function E(e){const a=xe.get(e);if(!a)throw new Error(`Public video manifest is missing ${e}`);return Ae(a,!0)}const ve=E("make-agent-tutorial"),Pe=E("openpond-agent-overview");function je(e){return E(`make-agent-tutorial-${e}`)}const Ne={title:"How to make an agent"},Ie=[{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}],$={tutorial:Ne,chapters:Ie},Ee=z("how-to-make-an-agent"),B=$.chapters,Se={create:"1:24",use:"1:05",improve:"1:10"},w=Ee.title,we=$.tutorial.title,F="4:33",H={captionsUrl:re,chapterIds:B.map(e=>e.id),description:"Create, use, and improve an Account Health Agent in one continuous walkthrough.",duration:F,eyebrow:"Play all",id:"make-agent-tutorial",lessonNumber:null,posterUrl:ie,title:we,videoId:"play-all",videoUrl:ve},T=B.map((e,a)=>({captionsUrl:de(e.id),chapterIds:[e.id],description:e.subtitle,duration:Se[e.id],eyebrow:`Lesson ${a+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:a+1,posterUrl:oe(e.id),title:e.title,videoId:e.id,videoUrl:je(e.id)})),Re=[H,...T];function W(e){return Re.find(a=>a.videoId===e)??H}function _e(e){const a=T.findIndex(i=>i.videoId===e);return a<0?null:T[a+1]?.videoId??null}const Oe=[2,1,0];function ke({activeVideoId:e="play-all",autoplay:a=!0,onClose:i,onOpen:s,onSelectVideo:d,open:n=!1,playRequestId:r=0}={}){const u=x.useRef(null),l=W(e);x.useEffect(()=>{if(!n)return;const c=u.current;c&&(c.load(),r>0&&c.play().catch(()=>{}))},[l.id,n,r]);function p(){if(!a||!d)return;const c=_e(e);c&&d(c)}return t.jsxs("section",{className:"get-started-series","aria-label":w,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"make-agent-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${w} playlist`,className:"get-started-playlist-open",onClick:s,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Oe.map((c,f)=>{const m=T[c];return t.jsx("div",{className:`get-started-playlist-poster layer-${f+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:m.posterUrl})},m.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[T.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsx("h1",{id:"make-agent-series-title",children:w}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Walkthrough playlist"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:F})]}),t.jsx("p",{children:"Create, use, and improve an Account Health Agent, or play the full walkthrough."})]})]}),n&&i&&d?t.jsx(Le,{activeVideoId:e,autoplay:a,contained:!0,inertExclusionSelector:".get-started-learning-panel",onClose:i,onEnded:p,onSelectVideo:d,videoRef:u}):null]})}function Le({activeVideoId:e="play-all",autoplay:a=!0,contained:i=!1,inertExclusionSelector:s,onClose:d,onEnded:n,onSelectVideo:r=()=>{},videoRef:u}){const l=W(e),p=T.findIndex(m=>m.videoId===e),c=p>=0?T[p+1]?.videoId:void 0,f=p>0?T[p-1]?.videoId:void 0;return t.jsx(L,{autoAdvance:a&&p>=0,contained:i,inertExclusionSelector:s,navigation:p>=0?{currentIndex:p,onNext:c?()=>r(c):void 0,onPrevious:f?()=>r(f):void 0,total:T.length}:void 0,onClose:d,onEnded:n?()=>n():void 0,video:l,videoRef:u})}const U=z("post-training-from-first-principles"),Y=U.title,Ue=U.status;function b(e,a,i,s,d,n){const r=`courses/post-training/${a}`,u=`post-training-${a}`;return{captionsUrl:I(`${r}.vtt`),description:n,duration:d,eyebrow:s,id:u,lessonNumber:e,posterUrl:I(`${r}-poster.webp`),slug:a,title:i,videoUrl:E(u)}}const A=[b(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."),b(2,"02-definitions","Definitions","Reference","6:14","Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series."),b(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."),b(4,"04-rewards-credit-assignment","Rewards and credit assignment","RL foundation","3:00","Follow a code-repair trajectory from actions and observations to advantage."),b(5,"05-verifiable-rewards-rlvr","Verifiable rewards","RLVR","2:53","See how tests create scalable rewards—and how a model can exploit the checker."),b(6,"06-ppo-grpo","PPO and GRPO","Policy updates","2:54","Compare PPO's learned critic with GRPO's sibling-response baseline."),b(7,"07-distillation","Distillation","Teacher targets","2:42","Transfer a teacher's token distribution instead of copying one final answer."),b(8,"08-opsd-sdft-sdpo","OPSD, SDFT, and SDPO","Teacher evidence","2:43","Compare trusted solutions, demonstrations, and failure feedback at one prefix."),b(9,"09-credible-experiments","Credible experiments","Research design","3:32","Build versioned datasets, fair baselines, and claims that survive scrutiny."),b(10,"10-technical-appendix","Technical appendix","Advanced details","3:12","Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.")],Ce="29 min",O=U.fullVideoId;if(!O)throw new Error("Post-training playlist is missing its full video");const q={captionsUrl:I("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:O,posterUrl:I("courses/post-training/full-course-poster.webp"),title:Y,videoUrl:E(O)};function J(e){const a=e+1;return a<A.length?a:null}const M="Subject to change, lesson work in progress";function Me(){const e=Ue==="draft"?"Draft":"Published";return t.jsx("span",{"aria-label":`${e}: ${M}`,className:"get-started-playlist-status app-tooltip","data-tooltip":M,tabIndex:0,children:e})}const X="openpond.post-training-progress.v1",j=Object.freeze({}),Ve=1e3,Q=new Set;let P=null,N=null,V=!1;function R(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Ge(e){if(!e||typeof e!="object"||Array.isArray(e))return j;const a={};for(const[i,s]of Object.entries(e)){if(!i||!s||typeof s!="object"||Array.isArray(s))continue;const d=s,n=R(d.duration),r=R(d.currentTime),u=R(d.updatedAt);if(n===null||n<=0||r===null)continue;const l=d.completed===!0;a[i]={completed:l,currentTime:l?n:Math.min(n,Math.max(0,r)),duration:n,updatedAt:u===null?0:Math.max(0,u)}}return Object.keys(a).length>0?a:j}function De(e){if(!e)return j;try{return Ge(JSON.parse(e))}catch{return j}}function Z(){if(typeof window>"u")return j;try{return De(D.getItem(X))}catch{return j}}function ee(){if(typeof window<"u"&&N!==null&&window.clearTimeout(N),N=null,!(typeof window>"u"||P===null))try{D.setItem(X,JSON.stringify(P))}catch{}}function Ke(){typeof window>"u"||N!==null||(N=window.setTimeout(ee,Ve))}function ze(){typeof window>"u"||V||(V=!0,window.addEventListener("pagehide",ee),le(()=>{P=Z(),Q.forEach(e=>e())}))}function te(){return P===null&&(P=Z()),ze(),P}function G({completed:e=!1,currentTime:a,duration:i,lessonId:s}){if(!s||!Number.isFinite(i)||i<=0||!Number.isFinite(a))return;const d=te(),n=d[s],r=!!(n?.completed||e),u=r?i:Math.min(i,Math.max(0,a));n&&n.completed===r&&Math.abs(n.currentTime-u)<.25&&Math.abs(n.duration-i)<.25||(P={...d,[s]:{completed:r,currentTime:u,duration:i,updatedAt:Date.now()}},Ke(),Q.forEach(l=>l()))}function $e(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}const _=Y,Be=[2,1,0];function Fe({activeLessonIndex:e,fullCourseSelected:a=!1,autoplay:i=!0,open:s,onClose:d,onOpen:n,onSelectLesson:r,playRequestId:u=0}){const l=x.useRef(null),p=x.useRef(null),c=A[e]??A[0],f=a?q:c;x.useEffect(()=>{if(!s)return;const o=l.current;if(!o)return;let h=!1;p.current=null,o.load();const y=()=>{if(h)return;const C=$e(te()[f.id]);C>0&&(o.currentTime=C),u>0&&o.play().catch(()=>{})};return o.readyState>=HTMLMediaElement.HAVE_METADATA?y():o.addEventListener("loadedmetadata",y,{once:!0}),()=>{h=!0,o.removeEventListener("loadedmetadata",y),Number.isFinite(o.duration)&&o.duration>0&&o.currentTime>0&&G({completed:o.ended,currentTime:o.currentTime,duration:o.duration,lessonId:f.id})}},[f.id,s,u]);function m(o,h=!1){!Number.isFinite(o.duration)||o.duration<=0||G({completed:h,currentTime:h?o.duration:o.currentTime,duration:o.duration,lessonId:f.id})}function S(o){if(!Number.isFinite(o.duration)||o.duration<=0)return;const h=Math.min(99,Math.floor(o.currentTime/o.duration*100)),y=p.current;y?.lessonId===f.id&&y.percent===h||(p.current={lessonId:f.id,percent:h},m(o))}function v(o){m(o,!0),i&&!a&&g()}function g(){const o=J(e);o!==null&&r(o)}return t.jsxs("section",{className:"get-started-series","aria-label":_,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"post-training-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${_} playlist`,className:"get-started-playlist-open",onClick:n,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Be.map((o,h)=>{const y=A[o];return t.jsx("div",{className:`get-started-playlist-poster layer-${h+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:y.posterUrl})},y.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[A.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsxs("div",{className:"get-started-playlist-title",children:[t.jsx("h1",{id:"post-training-series-title",children:_}),t.jsx(Me,{})]}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Learning series"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:Ce})]}),t.jsx("p",{children:"Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix."})]})]}),s?t.jsx(He,{activeLessonIndex:e,autoplay:i,fullCourseSelected:a,onClose:d,onEnded:v,onPause:m,onSelectLesson:r,onTimeUpdate:S,videoRef:l}):null]})}function He({activeLessonIndex:e,autoplay:a,fullCourseSelected:i,onClose:s,onEnded:d,onPause:n,onSelectLesson:r,onTimeUpdate:u,videoRef:l}){const p=A[e]??A[0],c=J(e),f=i?q:p;return t.jsx(L,{autoAdvance:a&&!i,contained:!0,inertExclusionSelector:".get-started-learning-panel",navigation:i?void 0:{currentIndex:e,onNext:c!==null?()=>r(c):void 0,onPrevious:e>0?()=>r(e-1):void 0,total:A.length},onClose:s,onEnded:d,onPause:n,onTimeUpdate:u,video:f,videoRef:l})}const We={captionsUrl:ue,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:ce,title:"What is an OpenPond Agent?",videoUrl:Pe};function Ze(e={}){const[a,i]=x.useState(null),[s,d]=x.useState(null),n=e.makeAgentTutorial===void 0?a:e.makeAgentTutorial,r=e.postTrainingCourse===void 0?s:e.postTrainingCourse,u=!!(r||n);function l(){if(e.onOpenMakeAgentTutorial){e.onOpenMakeAgentTutorial();return}d(null),i({autoplay:!0,playRequestId:0,videoId:"create"})}function p(){if(e.onCloseMakeAgentTutorial){e.onCloseMakeAgentTutorial();return}i(null)}function c(v){if(e.onSelectMakeAgentTutorialVideo){e.onSelectMakeAgentTutorialVideo(v);return}i(g=>g&&{...g,playRequestId:g.playRequestId+1,videoId:v})}function f(){if(e.onOpenPostTrainingCourse){e.onOpenPostTrainingCourse();return}i(null),d({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0})}function m(){if(e.onClosePostTrainingCourse){e.onClosePostTrainingCourse();return}d(null)}function S(v){if(e.onSelectPostTrainingLesson){e.onSelectPostTrainingLesson(v);return}d(g=>g&&{...g,fullCourseSelected:!1,lessonIndex:v,playRequestId:g.playRequestId+1})}return t.jsx("section",{className:`get-started-view ${u?"course-player-open":""}`,"aria-label":"Walkthroughs",children:t.jsxs("div",{className:"get-started-shell",children:[t.jsxs("section",{className:"get-started-start-here","aria-labelledby":"get-started-start-here-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-start-here-title",children:"Start here"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(ge,{titleElement:"h1",video:We})})]}),t.jsxs("section",{className:"get-started-walkthroughs","aria-labelledby":"get-started-walkthroughs-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-walkthroughs-title",children:"Walkthroughs"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(ke,{activeVideoId:n?.videoId??"create",autoplay:n?.autoplay??!0,onClose:p,onOpen:l,onSelectVideo:c,open:!!n,playRequestId:n?.playRequestId??0})})]}),t.jsxs("section",{className:"get-started-learn","aria-labelledby":"get-started-learn-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-learn-title",children:"Learn deeper"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(Fe,{activeLessonIndex:r?.lessonIndex??0,autoplay:r?.autoplay??!0,fullCourseSelected:r?.fullCourseSelected??!1,open:!!r,onClose:m,onOpen:f,onSelectLesson:S,playRequestId:r?.playRequestId??0})})]})]})})}export{Ze as GetStartedView};
@@ -1 +1 @@
1
- import{r as i,j as e}from"./index-C8aCGagb.js";import{s as u}from"./LabsRoute-CyYF8-dw.js";import{e1 as n}from"./App-s-CJswyt.js";import"./chunk-P3BRSSRD-DUGfuKA8.js";import"./AppDialog-t2Fx5tK3.js";import"./cloud-upload-k9eqBsHr.js";import"./MainPane-5DTtwVCk.js";import"./MarkdownText-BR4V6lNO.js";import"./arrow-up-right-C9aE8Mfz.js";import"./square-BuImvLhT.js";import"./folder-open-sYgceW_f.js";import"./play-C469pVZq.js";import"./training-model-data-CKOkpBBL.js";import"./info-DLdbiUrh.js";/* empty css */import"./ComposerCreateImproveStrip-CEgh4OtN.js";function L({api:o,policyId:r,sourceId:t,onBack:s}){const a=i.useMemo(()=>o.reviewClient(r,t),[o,r,t]),[m,p]=i.useState(null),[l,c]=i.useState(null);return e.jsxs("section",{"aria-label":"Hosted example review",children:[e.jsx("button",{type:"button",className:"training-button secondary",onClick:()=>{n(s)},children:"Back to continual learning"}),e.jsx("p",{children:"Reviewing hosted examples. Approved tasks become eligible for this policy's next training check."}),e.jsx(u,{client:a,selectedId:m,after:l,sourceId:t,onSelect:d=>{n(()=>p(d))},onPage:c})]})}export{L as HostedModelLearningReview};
1
+ import{r as i,j as e}from"./index-DEg0S7Qk.js";import{s as u}from"./LabsRoute-CgNiUHsy.js";import{e2 as n}from"./App-pcwmC4IR.js";import"./chunk-P3BRSSRD-BsGTkgyC.js";import"./AppDialog-CdHad7GT.js";import"./cloud-upload-Bw9XUsKQ.js";import"./MainPane-C86le7UF.js";import"./MarkdownText-BBVriBCj.js";import"./arrow-up-right-xKb5kWQJ.js";import"./square-DT_uFOml.js";import"./folder-open-CbmUjIYS.js";import"./play-pmSO95Qg.js";import"./training-model-data-CKOkpBBL.js";import"./info-5bL9xSSf.js";/* empty css */import"./ComposerCreateImproveStrip-oeVeyhPX.js";function L({api:o,policyId:r,sourceId:t,onBack:s}){const a=i.useMemo(()=>o.reviewClient(r,t),[o,r,t]),[m,p]=i.useState(null),[l,c]=i.useState(null);return e.jsxs("section",{"aria-label":"Hosted example review",children:[e.jsx("button",{type:"button",className:"training-button secondary",onClick:()=>{n(s)},children:"Back to continual learning"}),e.jsx("p",{children:"Reviewing hosted examples. Approved tasks become eligible for this policy's next training check."}),e.jsx(u,{client:a,selectedId:m,after:l,sourceId:t,onSelect:d=>{n(()=>p(d))},onPage:c})]})}export{L as HostedModelLearningReview};
@@ -1 +1 @@
1
- import{r as t,j as n}from"./index-C8aCGagb.js";import{n as V,u as W,o as X,p as Y,q as Z}from"./LabsRoute-CyYF8-dw.js";import{cU as D,dr as I,A as _}from"./App-s-CJswyt.js";import{A as ee}from"./AppDialog-t2Fx5tK3.js";import"./chunk-P3BRSSRD-DUGfuKA8.js";import"./cloud-upload-k9eqBsHr.js";import"./MainPane-5DTtwVCk.js";import"./MarkdownText-BR4V6lNO.js";import"./arrow-up-right-C9aE8Mfz.js";import"./square-BuImvLhT.js";import"./folder-open-sYgceW_f.js";import"./play-C469pVZq.js";import"./training-model-data-CKOkpBBL.js";import"./info-DLdbiUrh.js";/* empty css */import"./ComposerCreateImproveStrip-CEgh4OtN.js";function xe({client:b,project:g,policy:r,onClose:v}){const[H]=t.useState(()=>r?.id??`policy-${crypto.randomUUID()}`),[a]=t.useState(()=>V(g,r)),[N,P]=t.useState(a.enabled),[S,$]=t.useState(a.scheduled),[j,F]=t.useState(!r),[k,T]=t.useState(a.humanReviewRequired),[o,R]=t.useState(r?.sources??[]),[u,U]=t.useState(r?.taskDefinition??null),[i,O]=t.useState({interval:String(a.intervalSeconds/60),minimum:String(a.minimumApprovedExamples),batch:String(a.maxBatchExamples),spend:String(a.maxIterationSpendUsd),daily:String(a.maxDailySpendUsd),cooldown:String(a.cooldownSeconds/60),retries:String(a.maxRetries),backlog:String(a.maxBacklogExamples)}),[Q,h]=t.useState(!1),[c,B]=t.useState(!1),[z,M]=t.useState(null),[m,G]=t.useState(),[y,J]=t.useState(null),[A,L]=t.useState(null),d=t.useRef(null),w=t.useRef(!1);t.useEffect(()=>{let e=!1;return b.sources(m).then(s=>{e||(J({after:m,data:s}),L(null))},s=>{e||L(s instanceof Error?s.message:String(s))}),()=>{e=!0}},[b,m]);const f=y&&y.after===m?y.data:null,C=j?g.trainingSetup.rewardBindingRef:r?.rewardBinding;function K(e){const s=o.some(l=>l.id===e.id);R(s?o.filter(l=>l.id!==e.id):[...o,I(e)]),U(s&&o.length===1?null:u??e.taskDefinition),h(!0)}async function q(){if(w.current)return!1;w.current=!0,B(!0),M(null);try{if(!d.current){if(!u||!o.length||!C)throw new Error("Select task sources and a Model Reward before saving.");const e=Z({project:g,previous:r,policyId:H,applyModelConfiguration:j,sources:o,taskDefinition:u,settings:{enabled:N,scheduled:S,humanReviewRequired:k,intervalSeconds:Number(i.interval)*60,minimumApprovedExamples:Number(i.minimum),maxBatchExamples:Number(i.batch),maxIterationSpendUsd:Number(i.spend),maxDailySpendUsd:Number(i.daily),cooldownSeconds:Number(i.cooldown)*60,maxRetries:Number(i.retries),maxBacklogExamples:Number(i.backlog)}});d.current={action:"publish",kind:"policy",operationId:crypto.randomUUID(),expectedRevision:r?.revision??0,content:e}}return await b.command(d.current),d.current=null,h(!1),!0}catch(e){return e instanceof _&&e.status>=400&&e.status<500&&![408,429].includes(e.status)&&(d.current=null),M(e instanceof Error?e.message:"Unable to save learning settings."),!1}finally{w.current=!1,B(!1)}}const x=W({name:"learning settings",dirty:Q,busy:c,save:q});return n.jsxs(n.Fragment,{children:[n.jsxs(ee,{ariaLabel:"Continual learning settings",className:"labs-rename-dialog learning-workspace hosted-learning-settings",backdropClassName:"labs-rename-backdrop",dismissDisabled:c,onClose:()=>{x.requestLeave(v)},children:[n.jsx("h2",{children:"Continual learning settings"}),n.jsxs("p",{children:["Train ",g.name," from approved tasks. Acceptance and serving remain separate decisions."]}),n.jsx(X,{error:z??A}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault(),await q()&&(x.allowNextNavigation(),v())},children:[n.jsxs("fieldset",{disabled:c||!!d.current,onChange:()=>h(!0),children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:N,onChange:e=>P(e.target.checked)})," Enable learning"]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:k,disabled:k,onChange:()=>T(!0)})," Human review required"]}),n.jsx("p",{children:"New policies require human review. Qualified automatic admission cannot be configured here yet."}),r?n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:j,onChange:e=>F(e.target.checked)})," Use the Model’s current training configuration"]}):null,n.jsxs("fieldset",{children:[n.jsx("legend",{children:"Task sources"}),!f&&!A?n.jsx("p",{children:"Loading sources…"}):null,f?.sources.items.map(e=>{const s=f.definitions.find(E=>D(I(E),e.taskDefinition)),l=!!(C&&s&&D(C,s.rewardBinding)&&(!u||D(u,e.taskDefinition))),p=o.find(E=>E.id===e.id);return n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:!!p,disabled:!p&&(!e.enabled||!l),onChange:()=>K(e)})," ",e.name,p&&p.revision!==e.revision?n.jsxs("small",{children:["Using saved revision ",p.revision,"; clear and reselect to update."]}):l?null:n.jsx("small",{children:"Different task format or Reward."})]},e.id)}),n.jsxs("p",{children:[o.length," sources selected. ",n.jsx("button",{type:"button",onClick:()=>{R([]),U(null),h(!0)},children:"Clear selection"})]}),n.jsx(Y,{after:m,next:f?.sources.nextCursor,onPage:e=>G(e??void 0)})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:S,onChange:e=>$(e.target.checked)})," Schedule training"]}),Object.keys(i).filter(e=>e!=="interval"||S).map(e=>n.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],n.jsx("input",{type:"number",value:i[e],min:"0",step:e==="spend"||e==="daily"?"0.01":"1",onChange:s=>O(l=>({...l,[e]:s.target.value}))})]},e))]}),n.jsxs("div",{className:"model-build-actions",children:[n.jsx("button",{type:"submit",className:"training-button",disabled:c,children:c?"Saving…":d.current?"Retry save":"Save settings"}),n.jsx("button",{type:"button",className:"training-button secondary",disabled:c,onClick:()=>{x.requestLeave(v)},children:"Cancel"})]})]})]}),x.dialog]})}export{xe as HostedModelLearningSettings};
1
+ import{r as t,j as n}from"./index-DEg0S7Qk.js";import{n as K,u as W,o as X,p as Y,q as Z}from"./LabsRoute-CgNiUHsy.js";import{cV as D,ds as I,A as _}from"./App-pcwmC4IR.js";import{A as ee}from"./AppDialog-CdHad7GT.js";import"./chunk-P3BRSSRD-BsGTkgyC.js";import"./cloud-upload-Bw9XUsKQ.js";import"./MainPane-C86le7UF.js";import"./MarkdownText-BBVriBCj.js";import"./arrow-up-right-xKb5kWQJ.js";import"./square-DT_uFOml.js";import"./folder-open-CbmUjIYS.js";import"./play-pmSO95Qg.js";import"./training-model-data-CKOkpBBL.js";import"./info-5bL9xSSf.js";/* empty css */import"./ComposerCreateImproveStrip-oeVeyhPX.js";function xe({client:b,project:g,policy:r,onClose:v}){const[H]=t.useState(()=>r?.id??`policy-${crypto.randomUUID()}`),[a]=t.useState(()=>K(g,r)),[N,P]=t.useState(a.enabled),[S,$]=t.useState(a.scheduled),[j,F]=t.useState(!r),[k,T]=t.useState(a.humanReviewRequired),[o,R]=t.useState(r?.sources??[]),[u,B]=t.useState(r?.taskDefinition??null),[i,O]=t.useState({interval:String(a.intervalSeconds/60),minimum:String(a.minimumApprovedExamples),batch:String(a.maxBatchExamples),spend:String(a.maxIterationSpendUsd),daily:String(a.maxDailySpendUsd),cooldown:String(a.cooldownSeconds/60),retries:String(a.maxRetries),backlog:String(a.maxBacklogExamples)}),[Q,h]=t.useState(!1),[c,M]=t.useState(!1),[V,U]=t.useState(null),[m,z]=t.useState(),[y,G]=t.useState(null),[A,L]=t.useState(null),d=t.useRef(null),w=t.useRef(!1);t.useEffect(()=>{let e=!1;return b.sources(m).then(s=>{e||(G({after:m,data:s}),L(null))},s=>{e||L(s instanceof Error?s.message:String(s))}),()=>{e=!0}},[b,m]);const f=y&&y.after===m?y.data:null,C=j?g.trainingSetup.rewardBindingRef:r?.rewardBinding;function J(e){const s=o.some(l=>l.id===e.id);R(s?o.filter(l=>l.id!==e.id):[...o,I(e)]),B(s&&o.length===1?null:u??e.taskDefinition),h(!0)}async function q(){if(w.current)return!1;w.current=!0,M(!0),U(null);try{if(!d.current){if(!u||!o.length||!C)throw new Error("Select task sources and a Model Reward before saving.");const e=Z({project:g,previous:r,policyId:H,applyModelConfiguration:j,sources:o,taskDefinition:u,settings:{enabled:N,scheduled:S,humanReviewRequired:k,intervalSeconds:Number(i.interval)*60,minimumApprovedExamples:Number(i.minimum),maxBatchExamples:Number(i.batch),maxIterationSpendUsd:Number(i.spend),maxDailySpendUsd:Number(i.daily),cooldownSeconds:Number(i.cooldown)*60,maxRetries:Number(i.retries),maxBacklogExamples:Number(i.backlog)}});d.current={action:"publish",kind:"policy",operationId:crypto.randomUUID(),expectedRevision:r?.revision??0,content:e}}return await b.command(d.current),d.current=null,h(!1),!0}catch(e){return e instanceof _&&e.status>=400&&e.status<500&&![408,429].includes(e.status)&&(d.current=null),U(e instanceof Error?e.message:"Unable to save learning settings."),!1}finally{w.current=!1,M(!1)}}const x=W({name:"learning settings",dirty:Q,busy:c,save:q});return n.jsxs(n.Fragment,{children:[n.jsxs(ee,{ariaLabel:"Continual learning settings",className:"labs-rename-dialog learning-workspace hosted-learning-settings",backdropClassName:"labs-rename-backdrop",dismissDisabled:c,onClose:()=>{x.requestLeave(v)},children:[n.jsx("h2",{children:"Continual learning settings"}),n.jsxs("p",{children:["Train ",g.name," from approved tasks. Acceptance and serving remain separate decisions."]}),n.jsx(X,{error:V??A}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault(),await q()&&(x.allowNextNavigation(),v())},children:[n.jsxs("fieldset",{disabled:c||!!d.current,onChange:()=>h(!0),children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:N,onChange:e=>P(e.target.checked)})," Enable learning"]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:k,disabled:k,onChange:()=>T(!0)})," Human review required"]}),n.jsx("p",{children:"New policies require human review. Qualified automatic admission cannot be configured here yet."}),r?n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:j,onChange:e=>F(e.target.checked)})," Use the Model’s current training configuration"]}):null,n.jsxs("fieldset",{children:[n.jsx("legend",{children:"Task sources"}),!f&&!A?n.jsx("p",{children:"Loading sources…"}):null,f?.sources.items.map(e=>{const s=f.definitions.find(E=>D(I(E),e.taskDefinition)),l=!!(C&&s&&D(C,s.rewardBinding)&&(!u||D(u,e.taskDefinition))),p=o.find(E=>E.id===e.id);return n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:!!p,disabled:!p&&(!e.enabled||!l),onChange:()=>J(e)})," ",e.name,p&&p.revision!==e.revision?n.jsxs("small",{children:["Using saved revision ",p.revision,"; clear and reselect to update."]}):l?null:n.jsx("small",{children:"Different task format or Reward."})]},e.id)}),n.jsxs("p",{children:[o.length," sources selected. ",n.jsx("button",{type:"button",onClick:()=>{R([]),B(null),h(!0)},children:"Clear selection"})]}),n.jsx(Y,{after:m,next:f?.sources.nextCursor,onPage:e=>z(e??void 0)})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:S,onChange:e=>$(e.target.checked)})," Schedule training"]}),Object.keys(i).filter(e=>e!=="interval"||S).map(e=>n.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],n.jsx("input",{type:"number",value:i[e],min:"0",step:e==="spend"||e==="daily"?"0.01":"1",onChange:s=>O(l=>({...l,[e]:s.target.value}))})]},e))]}),n.jsxs("div",{className:"model-build-actions",children:[n.jsx("button",{type:"submit",className:"training-button",disabled:c,children:c?"Saving…":d.current?"Retry save":"Save settings"}),n.jsx("button",{type:"button",className:"training-button secondary",disabled:c,onClick:()=>{x.requestLeave(v)},children:"Cancel"})]})]})]}),x.dialog]})}export{xe as HostedModelLearningSettings};