openpond 0.2.62 → 0.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/app-server.d.ts +1053 -63
- package/dist/app-server.js +1 -1
- package/dist/chunks/{acp-DYRBDJRU.js → acp-H3MJCPHX.js} +1 -1
- package/dist/chunks/{acp-agent-UTLP7C3I.js → acp-agent-DWA7272M.js} +1 -1
- package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
- package/dist/chunks/{app-layer-N2H3RBEN.js → app-layer-K7H2WJ56.js} +1 -1
- package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +2 -0
- package/dist/chunks/app-server-evaluations-XGMGS67X.js +2 -0
- package/dist/chunks/app-server-harness-services-BHD6S5II.js +2 -0
- package/dist/chunks/app-server-runtime-LFIL6F7D.js +2 -0
- package/dist/chunks/apps-QKAHJGQ4.js +2 -0
- package/dist/chunks/chunk-25XXZS3E.js +2 -0
- package/dist/chunks/chunk-27JGS3KB.js +12 -0
- package/dist/chunks/{chunk-7JBB4PXS.js → chunk-2HAWOMZK.js} +1 -1
- package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
- package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
- package/dist/chunks/{chunk-GEKORCMN.js → chunk-42V4NV2F.js} +1 -1
- package/dist/chunks/{chunk-VAJSRUAB.js → chunk-4FNCBA3Y.js} +1 -1
- package/dist/chunks/{chunk-F7D4BMTO.js → chunk-4L6DU6Z2.js} +1 -1
- package/dist/chunks/{chunk-SZKFNKWO.js → chunk-4SZ3HKHU.js} +1 -1
- package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
- package/dist/chunks/chunk-5FU5RLML.js +2 -0
- package/dist/chunks/{chunk-6SH4B7DV.js → chunk-5MHYGMJG.js} +1 -1
- package/dist/chunks/{chunk-MEK7DLX3.js → chunk-6EBCS57F.js} +1 -1
- package/dist/chunks/chunk-6RS4NAOY.js +2 -0
- package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
- package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
- package/dist/chunks/{chunk-P74RR2GB.js → chunk-7WYL2IDD.js} +1 -1
- package/dist/chunks/chunk-7YLXGILH.js +2 -0
- package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
- package/dist/chunks/{chunk-NWOK6NLE.js → chunk-AH26AQN7.js} +1 -1
- package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
- package/dist/chunks/chunk-B5R53U74.js +2 -0
- package/dist/chunks/{chunk-NKZNPTLA.js → chunk-BPZOABMC.js} +1 -1
- package/dist/chunks/{chunk-2IIBCCOK.js → chunk-BSPFY3Y5.js} +1 -1
- package/dist/chunks/{chunk-5OSM75X5.js → chunk-BU27SLZP.js} +2 -2
- package/dist/chunks/chunk-C2AXMKK4.js +2 -0
- package/dist/chunks/{chunk-AMO5DVKM.js → chunk-C2LAEGOW.js} +2 -2
- package/dist/chunks/{chunk-GNCEZ3UP.js → chunk-CZ5R4JXZ.js} +1 -1
- package/dist/chunks/{chunk-JIFUGA3U.js → chunk-DABBHWSF.js} +1 -1
- package/dist/chunks/{chunk-VK4TPZTA.js → chunk-DLANLLKH.js} +1 -1
- package/dist/chunks/{chunk-WGLVSGFA.js → chunk-DQI5TE6A.js} +2 -2
- package/dist/chunks/chunk-DTTFUANI.js +12 -0
- package/dist/chunks/{chunk-4TM75R7V.js → chunk-DUL6DXOI.js} +1 -1
- package/dist/chunks/{chunk-TGEGXTPR.js → chunk-ELX7VRSU.js} +1 -1
- package/dist/chunks/chunk-ERL2M773.js +3 -0
- package/dist/chunks/{chunk-4PZWGNX4.js → chunk-ERT32RZA.js} +4 -4
- package/dist/chunks/{chunk-RTJCELRR.js → chunk-EZRUWIP6.js} +1 -1
- package/dist/chunks/{chunk-LJDBR3RN.js → chunk-F6UQ6PPK.js} +1 -1
- package/dist/chunks/chunk-F7QTIHXX.js +2 -0
- package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
- package/dist/chunks/{chunk-FFWOTZQM.js → chunk-FVRII5XO.js} +1 -1
- package/dist/chunks/{chunk-C7M2WBWZ.js → chunk-FYYYECHE.js} +51 -49
- package/dist/chunks/chunk-G32BO6M5.js +4 -0
- package/dist/chunks/{chunk-NBE74GLF.js → chunk-G6OR5NB6.js} +1 -1
- package/dist/chunks/{chunk-GQGLPKU4.js → chunk-GGJUWIGR.js} +1 -1
- package/dist/chunks/{chunk-VSQXDS6H.js → chunk-GPL2Z65R.js} +1 -1
- package/dist/chunks/{chunk-INO67SEN.js → chunk-GS6ZUSIN.js} +2 -2
- package/dist/chunks/{chunk-47AXSBPV.js → chunk-GVARQXYI.js} +1 -1
- package/dist/chunks/chunk-GXCUH2VV.js +17 -0
- package/dist/chunks/{chunk-OCC43RSJ.js → chunk-GXZCMO6S.js} +1 -1
- package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
- package/dist/chunks/{chunk-HBLN4OLY.js → chunk-HUCBKXTU.js} +1 -1
- package/dist/chunks/{chunk-M5IX6VUA.js → chunk-IHB5GTOJ.js} +2 -2
- package/dist/chunks/{chunk-J3B2GM4A.js → chunk-IWWXIUAQ.js} +1 -1
- package/dist/chunks/chunk-J572ANHX.js +13 -0
- package/dist/chunks/{chunk-AKZPMKWP.js → chunk-J7ZTPXRQ.js} +1 -1
- package/dist/chunks/{chunk-CJUVHE4U.js → chunk-JORRZ4BB.js} +1 -1
- package/dist/chunks/chunk-JSQRLLN6.js +2 -0
- package/dist/chunks/chunk-KCOTDUGW.js +2 -0
- package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
- package/dist/chunks/{chunk-LRRBYIGH.js → chunk-LK2K3SPM.js} +2 -2
- package/dist/chunks/{chunk-557XSPVS.js → chunk-LKKMLBOH.js} +1 -1
- package/dist/chunks/{chunk-U456UP3N.js → chunk-LSZJ5M3X.js} +1 -1
- package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
- package/dist/chunks/{chunk-Y2KPHVZK.js → chunk-M3SCON53.js} +1 -1
- package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
- package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
- package/dist/chunks/{chunk-4RZBGKT7.js → chunk-N33D7KCW.js} +1 -1
- package/dist/chunks/chunk-N42HT64M.js +2 -0
- package/dist/chunks/{chunk-SD64CLJX.js → chunk-N4VHLJBZ.js} +1 -1
- package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
- package/dist/chunks/chunk-NG2L6D7G.js +2 -0
- package/dist/chunks/{chunk-GV3LFSMI.js → chunk-NLYZ5K7U.js} +1 -1
- package/dist/chunks/{chunk-F4TJ7WQV.js → chunk-NT7N6KLE.js} +1 -1
- package/dist/chunks/{chunk-PAE3PQEC.js → chunk-NZTCH6K5.js} +1 -1
- package/dist/chunks/{chunk-BEI4YULC.js → chunk-OG33QAG6.js} +1 -1
- package/dist/chunks/chunk-OTUBJV6C.js +6 -0
- package/dist/chunks/{chunk-RH43WLBX.js → chunk-PBTXLQAU.js} +1 -1
- package/dist/chunks/{chunk-3R4MSE2S.js → chunk-QJ6KUVAR.js} +1 -1
- package/dist/chunks/{chunk-7JXZNCBC.js → chunk-QU4UE73E.js} +1 -1
- package/dist/chunks/{chunk-WQMXEZVE.js → chunk-R6VJDOQM.js} +3 -3
- package/dist/chunks/{chunk-FUSCTBJI.js → chunk-R6WMY6AH.js} +1 -1
- package/dist/chunks/{chunk-EIX2V2KU.js → chunk-RDSVU6F6.js} +1 -1
- package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
- package/dist/chunks/{chunk-GW5SE3FM.js → chunk-RZUCVF2Q.js} +1 -1
- package/dist/chunks/{chunk-UC3FXTDL.js → chunk-SFKZITAG.js} +5 -5
- package/dist/chunks/{chunk-5A6ER3M2.js → chunk-SHJY5RLU.js} +1 -1
- package/dist/chunks/chunk-SI5W5LBV.js +2 -0
- package/dist/chunks/chunk-SO42ZB5K.js +2 -0
- package/dist/chunks/{chunk-2UDAKLJ4.js → chunk-TCOTXCV6.js} +1 -1
- package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
- package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
- package/dist/chunks/{chunk-X4ZT22SG.js → chunk-UPWJSNL5.js} +1 -1
- package/dist/chunks/chunk-URNMC46H.js +157 -0
- package/dist/chunks/{chunk-NLQ2UPN2.js → chunk-V7KR74NO.js} +1 -1
- package/dist/chunks/{chunk-HXZXDDKW.js → chunk-VHXDWAEH.js} +1 -1
- package/dist/chunks/{chunk-NE4ESZPT.js → chunk-W2TICQ62.js} +1 -1
- package/dist/chunks/chunk-WP2L2NY2.js +2 -0
- package/dist/chunks/chunk-WSOUMXH3.js +24 -0
- package/dist/chunks/chunk-WWQNMC7C.js +6 -0
- package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
- package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
- package/dist/chunks/{chunk-ZXT7V64X.js → chunk-XOB6FKQV.js} +1 -1
- package/dist/chunks/chunk-Y766IN7Y.js +2 -0
- package/dist/chunks/chunk-YCZZ62C2.js +2 -0
- package/dist/chunks/chunk-YM4PSVFW.js +4 -0
- package/dist/chunks/chunk-YNQWJWIC.js +10 -0
- package/dist/chunks/{chunk-GSWBNJGZ.js → chunk-Z3BWCFLV.js} +1 -1
- package/dist/chunks/{chunk-GOIKLFXK.js → chunk-ZG6353RM.js} +1 -1
- package/dist/chunks/{chunk-T6C5BNXK.js → chunk-ZPTKR3GB.js} +1 -1
- package/dist/chunks/{chunk-MNXNZDDW.js → chunk-ZYVHOVKL.js} +1 -1
- package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
- package/dist/chunks/cli-PSXMIJTF.js +2 -0
- package/dist/chunks/{configuration-command-BU2RPG33.js → configuration-command-XYKMXIWF.js} +1 -1
- package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
- package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
- package/dist/chunks/{connected-starting-assets-V5QXRK5Q.js → connected-starting-assets-JONPTII6.js} +1 -1
- package/dist/chunks/{continual-FLW6DAJK.js → continual-Z7MO2PF6.js} +1 -1
- package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
- package/dist/chunks/datasets-2PC2HP7N.js +2 -0
- package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
- package/dist/chunks/dist-47AYOIH6.js +2 -0
- package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
- package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
- package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
- package/dist/chunks/experiments-SZQYR6MH.js +2 -0
- package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
- package/dist/chunks/{help-PXUUREHZ.js → help-7HXFWIKS.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
- package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
- package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
- package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
- package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-2LSMZQNA.js +3 -0
- package/dist/chunks/{hosted-tasksets-X2YCFYEJ.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
- package/dist/chunks/human-review-M26UKGJL.js +2 -0
- package/dist/chunks/{import-JWZSZCE4.js → import-6SI4BEKS.js} +2 -2
- package/dist/chunks/learning-HM3NWOV5.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
- package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
- package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
- package/dist/chunks/opchat-AG4CWVY4.js +3 -0
- package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
- package/dist/chunks/organizations-KDKX77XZ.js +2 -0
- package/dist/chunks/{profile-ELE2D7HU.js → profile-O5HL5DTQ.js} +1 -1
- package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
- package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
- package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
- package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
- package/dist/chunks/{runtime-776NUSE7.js → runtime-XBA744HJ.js} +2 -2
- package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
- package/dist/chunks/{sandbox-template-WP6YCGBK.js → sandbox-template-27U3FQN7.js} +1 -1
- package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
- package/dist/chunks/{send-turn-RPB65PME.js → send-turn-FIPWOXWV.js} +1 -1
- package/dist/chunks/src-BLWX6DRG.js +424 -0
- package/dist/chunks/{src-2R4CMCJ5.js → src-PU7QTFO5.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
- package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-R62D2HD6.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
- package/dist/chunks/{store-conversation-serving-25O7BAR2.js → store-conversation-serving-K324SQTO.js} +1 -1
- package/dist/chunks/{store-create-improve-T5E2GUKK.js → store-create-improve-3LQMIYAP.js} +1 -1
- package/dist/chunks/{store-datasets-5Y4U5L3R.js → store-datasets-3KSX7RSO.js} +1 -1
- package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
- package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
- package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
- package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
- package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
- package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
- package/dist/chunks/{store-local-experiments-LOH4F4TF.js → store-local-experiments-QTVHJAEP.js} +1 -1
- package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
- package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
- package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
- package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
- package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
- package/dist/chunks/{store-preference-comparison-RNIFLJRW.js → store-preference-comparison-DWV5XSMY.js} +1 -1
- package/dist/chunks/{store-schedules-DVQ2PP4F.js → store-schedules-2KUY4T6M.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-LXWFFYCZ.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-4HH7LX6N.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
- package/dist/chunks/{store-subagents-JLW4GD4Q.js → store-subagents-UGVEFA6M.js} +1 -1
- package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
- package/dist/chunks/{store-task-inventory-NJXRXFLC.js → store-task-inventory-GEQIZELY.js} +1 -1
- package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
- package/dist/chunks/{store-training-VRLU6NFX.js → store-training-CQV7PL3V.js} +1 -1
- package/dist/chunks/{store-training-jobs-3ZHG4LGI.js → store-training-jobs-XKN6K66J.js} +18 -10
- package/dist/chunks/{store-training-models-KWQD5PRP.js → store-training-models-Q7DTTR4S.js} +1 -1
- package/dist/chunks/{store-usage-ZRS3ILF2.js → store-usage-XGAX7NLB.js} +1 -1
- package/dist/chunks/{taskset-QDMCQQDJ.js → taskset-ARKJQKYQ.js} +1 -1
- package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
- package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
- package/dist/chunks/{teams-bot-GF272RGC.js → teams-bot-UTQAJA6H.js} +1 -1
- package/dist/chunks/training-3IWW4256.js +2 -0
- package/dist/chunks/{training-DF5UEPY3.js → training-RVIESURJ.js} +1 -1
- package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
- package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
- package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
- package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
- package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
- package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
- package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
- package/dist/chunks/{web-search-5RUXYIOF.js → web-search-7FBUBZ66.js} +1 -1
- package/dist/chunks/{workspaces-JRY2IE7H.js → workspaces-G3CMY7ZA.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/url.d.ts +3 -1
- package/dist/skills/LICENSE +21 -0
- package/dist/skills/manifest.json +168 -0
- package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
- package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
- package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
- package/dist/skills/openpond-cli/SKILL.md +11 -7
- package/dist/skills/openpond-cli/references/experiments-and-training.md +1 -1
- package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
- package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
- package/dist/web/assets/App-DY2R8Z6r.js +53 -0
- package/dist/web/assets/{AppDialog-BurL61qE.js → AppDialog-8Y0FYalT.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
- package/dist/web/assets/{AppToastContext-DZLErwj0.js → AppToastContext-BiQbbVxq.js} +1 -1
- package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-CpMSfHCK.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
- package/dist/web/assets/{CartesianChart-CEbM980A.js → CartesianChart-J4ChOjvG.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
- package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
- package/dist/web/assets/{CollaborationTabs-DrKJmJZK.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
- package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
- package/dist/web/assets/{CommunityView-BzpIq1lD.js → CommunityView-Okydjpqm.js} +1 -1
- package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
- package/dist/web/assets/{ComposerCreateImproveStrip-ChplO9YP.js → ComposerCreateImproveStrip-CSngc8-V.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-DRHgc7j_.js → ConversationImportsSettings-DS73kyfj.js} +1 -1
- package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
- package/dist/web/assets/{GetStartedView-CaBk_mX6.js → GetStartedView-DGFPQ1We.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-JtFLyU3F.js → GettingStartedDialog-DFBYQdHz.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-hhcjDifK.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-CY8198Y1.js → HostedModelLearningSettings-CHaTHwC8.js} +1 -1
- package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
- package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
- package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-HibUEEko.js → LabSkillSidebar-BwtlThO7.js} +1 -1
- package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
- package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
- package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
- package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
- package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
- package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
- package/dist/web/assets/{NewProjectDialog-t9Imnb__.js → NewProjectDialog-CjrjgkTN.js} +1 -1
- package/dist/web/assets/{OutputsPage-CeGq_F1S.js → OutputsPage-jzx93QQ3.js} +1 -1
- package/dist/web/assets/{PageChrome-VHME5V8j.js → PageChrome-C1M13qG2.js} +1 -1
- package/dist/web/assets/{ProjectsPage-2TMZoEPB.js → ProjectsPage-DZrjlMp2.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
- package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
- package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
- package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
- package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
- package/dist/web/assets/{TerminalOverlay-DlhRpi-X.js → TerminalOverlay-d7A2F9Lx.js} +2 -2
- package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-BhhZPPuY.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
- package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
- package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
- package/dist/web/assets/{UsageSettingsSection-DTZslBeW.js → UsageSettingsSection-FhYymrfc.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-ChEeZffU.js → WorkspaceFileLocation-LrEWj4UK.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-D_RUXhTi.js → WorkspaceGitDialogs-NRIMXnkS.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BJxaiDrj.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
- package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
- package/dist/web/assets/{WorkspacePresentationPreview-A28Poeca.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
- package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
- package/dist/web/assets/bot-6OhUEmkE.js +1 -0
- package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
- package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
- package/dist/web/assets/{chevron-down-dYn0pd4Q.js → chevron-down-jmVA1BIf.js} +1 -1
- package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
- package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
- package/dist/web/assets/{chunk-ZFYI4P6C-BmsNtSkR.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
- package/dist/web/assets/{chunk-BYNVSWIQ-DWh9SmdB.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
- package/dist/web/assets/{client-choice-storage-DTTLbrYt.js → client-choice-storage-BdQ_YDuk.js} +1 -1
- package/dist/web/assets/{cloud-upload-CRMPCFnq.js → cloud-upload-Ck1ufAr8.js} +1 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
- package/dist/web/assets/{copy-DR4ielPn.js → copy-CPkbMfXt.js} +1 -1
- package/dist/web/assets/{createLucideIcon-DmttVQ_a.js → createLucideIcon-CXQny8HU.js} +1 -1
- package/dist/web/assets/{cssMode-d-2GuNvW.js → cssMode-CYxYl_om.js} +1 -1
- package/dist/web/assets/{external-link-B4rPiZEp.js → external-link-CDKOLG_v.js} +1 -1
- package/dist/web/assets/{folder-open-BrIUcUk_.js → folder-open-CEtOb_lK.js} +1 -1
- package/dist/web/assets/{folder-plus-DwImGEt-.js → folder-plus-CVMYZs3e.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-Ds1mkrlW.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
- package/dist/web/assets/{htmlMode-s15GR0Fn.js → htmlMode-DoY4V_j0.js} +1 -1
- package/dist/web/assets/icons-D7jkCa2d.js +1 -0
- package/dist/web/assets/{image-CY-sHbfQ.js → image-B-PjDSwU.js} +1 -1
- package/dist/web/assets/{index-DYrLeSyY.js → index-D9WbJMSq.js} +2 -2
- package/dist/web/assets/index-g7UqJhnX.css +1 -0
- package/dist/web/assets/{info-aSvM8YlJ.js → info-CCnw-K3b.js} +1 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
- package/dist/web/assets/{jsonMode-vos9H2hz.js → jsonMode-CeOpZdPj.js} +1 -1
- package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-pQmEaoMt.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
- package/dist/web/assets/{maximize-2-DgF6ZVOM.js → maximize-2-BZX38cpr.js} +1 -1
- package/dist/web/assets/message-square-CvgSecgD.js +1 -0
- package/dist/web/assets/{monaco.contribution-BPwsKvRB.js → monaco.contribution-CF2JDhi4.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CJlccVX3.js → monaco.contribution-cbDqt48m.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BbMpa0_-.js → monaco.contribution-m2ze2EsL.js} +2 -2
- package/dist/web/assets/{monaco.contribution-pWurLXbm.js → monaco.contribution-yeyow_-Q.js} +2 -2
- package/dist/web/assets/{monitor-DlEV241C.js → monitor-By0s4hxb.js} +1 -1
- package/dist/web/assets/{paperclip-fnRZSIRc.js → paperclip-BJ2QgJLa.js} +1 -1
- package/dist/web/assets/{pdf-CT3zVKCE.js → pdf-C4x-1jjP.js} +1 -1
- package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
- package/dist/web/assets/play-D_SuGDBM.js +1 -0
- package/dist/web/assets/plus-yw95Iaj8.js +1 -0
- package/dist/web/assets/{presentation-Bb8ecExR.js → presentation-I86G1Gd9.js} +1 -1
- package/dist/web/assets/{python-DXA1xp0A.js → python-CqFTPj8r.js} +1 -1
- package/dist/web/assets/{refresh-cw-B53QjxMO.js → refresh-cw-Dga35Eay.js} +1 -1
- package/dist/web/assets/requests-BCbaFiqV.js +1 -0
- package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
- package/dist/web/assets/{save-V1Q4Fcqa.js → save-BLKjYtzR.js} +1 -1
- package/dist/web/assets/settings-D7C-Auyi.js +21 -0
- package/dist/web/assets/{settings-lists-CtH1A57b.js → settings-lists-DMKA1lCN.js} +5 -5
- package/dist/web/assets/square-BY5lG2Ol.js +1 -0
- package/dist/web/assets/{square-terminal-Dmgkm5zY.js → square-terminal-B-n7vUex.js} +1 -1
- package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
- package/dist/web/assets/{toggleHighContrast-B-BD2K2Q.js → toggleHighContrast-BhmBE5XE.js} +1 -1
- package/dist/web/assets/training-QrdkRQZQ.js +2 -0
- package/dist/web/assets/{training-model-data-14942K_Z.js → training-model-data-DB-jg6L_.js} +12 -12
- package/dist/web/assets/{tsMode-DdgIcxK3.js → tsMode-BSWEII2p.js} +1 -1
- package/dist/web/assets/{upload-82Y6RjLi.js → upload-C4MPhQn8.js} +1 -1
- package/dist/web/assets/{useAccountSettings-BgHXNpq_.js → useAccountSettings-9oqWdRLs.js} +1 -1
- package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-CsKv22Hs.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
- package/dist/web/assets/{useQuery-CPC2wsWm.js → useQuery-BD0Uexmh.js} +1 -1
- package/dist/web/assets/{wifi-off-DXOoDN9l.js → wifi-off-Cloe0WuQ.js} +1 -1
- package/dist/web/assets/{workers-Clf4hKt5.js → workers-BXagz5eg.js} +1 -1
- package/dist/web/assets/x-Dqpel42h.js +1 -0
- package/dist/web/assets/{yaml-I1tf8Uxx.js → yaml-sBdvVbCc.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +22 -4
- package/package.json +5 -2
- package/dist/chunks/actions-command-6LF4Z4WK.js +0 -2
- package/dist/chunks/app-server-connected-apps-3T546FE7.js +0 -2
- package/dist/chunks/app-server-evaluations-TXD747QA.js +0 -2
- package/dist/chunks/app-server-harness-services-BBCDV5P3.js +0 -2
- package/dist/chunks/app-server-runtime-VEJPDAFP.js +0 -2
- package/dist/chunks/apps-CTT2XYRR.js +0 -2
- package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
- package/dist/chunks/chunk-4U2FNXQW.js +0 -2
- package/dist/chunks/chunk-547AUVKN.js +0 -2
- package/dist/chunks/chunk-557YG77L.js +0 -2
- package/dist/chunks/chunk-7KTARW23.js +0 -2
- package/dist/chunks/chunk-B42QQUZY.js +0 -2
- package/dist/chunks/chunk-EWOTDVDJ.js +0 -4
- package/dist/chunks/chunk-GAQLXFOT.js +0 -2
- package/dist/chunks/chunk-GLDYJM7O.js +0 -1
- package/dist/chunks/chunk-HKV7RX5E.js +0 -2
- package/dist/chunks/chunk-IWK3RTLR.js +0 -2
- package/dist/chunks/chunk-JX6OX6XE.js +0 -12
- package/dist/chunks/chunk-JY3YSI54.js +0 -2
- package/dist/chunks/chunk-LILXHGIA.js +0 -2
- package/dist/chunks/chunk-LJPO3TEL.js +0 -17
- package/dist/chunks/chunk-MNFW5WLD.js +0 -6
- package/dist/chunks/chunk-N5GPINVP.js +0 -2
- package/dist/chunks/chunk-N663LL27.js +0 -2
- package/dist/chunks/chunk-NOSBNHGC.js +0 -18
- package/dist/chunks/chunk-NR5VASQB.js +0 -2
- package/dist/chunks/chunk-O3MHHGC5.js +0 -151
- package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
- package/dist/chunks/chunk-PGO4FRHU.js +0 -10
- package/dist/chunks/chunk-QAVQJZCM.js +0 -2
- package/dist/chunks/chunk-RBDUMASL.js +0 -2
- package/dist/chunks/chunk-TM4VEMNN.js +0 -2
- package/dist/chunks/chunk-TUCKED4T.js +0 -4
- package/dist/chunks/chunk-TVTFEGTU.js +0 -2
- package/dist/chunks/chunk-TW3SRBLU.js +0 -22
- package/dist/chunks/chunk-UT6F6AIB.js +0 -12
- package/dist/chunks/chunk-VE6ZIGUQ.js +0 -2
- package/dist/chunks/chunk-VI32G77S.js +0 -2
- package/dist/chunks/chunk-VWRTE64Y.js +0 -2
- package/dist/chunks/chunk-XSB3T4JZ.js +0 -5
- package/dist/chunks/chunk-XWDFXM3S.js +0 -2
- package/dist/chunks/chunk-ZQHPGEYT.js +0 -2
- package/dist/chunks/cli-GCSO2OAI.js +0 -2
- package/dist/chunks/connected-app-executor-UDE7U4KG.js +0 -2
- package/dist/chunks/connected-evidence-GXIY2L7C.js +0 -2
- package/dist/chunks/core-commands-NJ6TGND4.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-IUXUQK3L.js +0 -4
- package/dist/chunks/datasets-AH56DKLZ.js +0 -2
- package/dist/chunks/desktop-test-PYUTEOWO.js +0 -3
- package/dist/chunks/dist-5267UT3V.js +0 -2
- package/dist/chunks/evaluation-coordination-3AUICOC5.js +0 -2
- package/dist/chunks/experiment-improvements-YS7GGPDW.js +0 -2
- package/dist/chunks/experiments-EJZK7FPT.js +0 -2
- package/dist/chunks/experiments-signal-NKUIJCIY.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +0 -2
- package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +0 -2
- package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +0 -3
- package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +0 -2
- package/dist/chunks/hosted-profile-candidate-DKEMVIYG.js +0 -3
- package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-ERCXAPZD.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-Q3AIIIB6.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +0 -3
- package/dist/chunks/human-review-5WM6MSON.js +0 -2
- package/dist/chunks/learning-KVLTMRLD.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +0 -2
- package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +0 -2
- package/dist/chunks/model-projects-H22KENI4.js +0 -2
- package/dist/chunks/opchat-3S6TSDZO.js +0 -3
- package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +0 -2
- package/dist/chunks/organizations-62YNTZTO.js +0 -2
- package/dist/chunks/project-action-payload-32F4X2BB.js +0 -2
- package/dist/chunks/project-agent-O4REKO6T.js +0 -2
- package/dist/chunks/published-experiment-source-DAOTJLIN.js +0 -2
- package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +0 -2
- package/dist/chunks/sandbox-command-UQ26NDIX.js +0 -2
- package/dist/chunks/saved-work-PG52WCRQ.js +0 -2
- package/dist/chunks/src-AU6LG7E6.js +0 -421
- package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +0 -2
- package/dist/chunks/store-chat-resources-T4LR7K25.js +0 -2
- package/dist/chunks/store-evaluation-results-WUVJWCFU.js +0 -7
- package/dist/chunks/store-harness-workspaces-IFEFY5CK.js +0 -2
- package/dist/chunks/store-human-review-ZQNLZRGG.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +0 -2
- package/dist/chunks/store-model-batch-review-QO4VVKWC.js +0 -2
- package/dist/chunks/store-model-configuration-C3HSOFD5.js +0 -3
- package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +0 -2
- package/dist/chunks/store-task-inbox-DL5RYFPO.js +0 -33
- package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +0 -9
- package/dist/chunks/taskset-packages-CBLJFWDQ.js +0 -2
- package/dist/chunks/training-error-L5V5IBX3.js +0 -2
- package/dist/chunks/training-hosted-I2NDBYGS.js +0 -2
- package/dist/chunks/training-hosted-report-4F25RZZ4.js +0 -2
- package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
- package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
- package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
- package/dist/web/assets/App-DHJVXTI2.js +0 -54
- package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +0 -2
- package/dist/web/assets/AppsView-ttlr9ckQ.js +0 -1
- package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-BITv20Ze.js +0 -1
- package/dist/web/assets/CommandMenu-6oj8FUr6.js +0 -1
- package/dist/web/assets/ComposerAttachments-6en7m_ov.js +0 -2
- package/dist/web/assets/FilePagePreview-CW4J_1u7.js +0 -2
- package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +0 -1
- package/dist/web/assets/LabsRoute-B61l1b8P.js +0 -101
- package/dist/web/assets/MainChatThread-egKi0gLk.js +0 -2
- package/dist/web/assets/MainPane-2dj6Dg4l.js +0 -95
- package/dist/web/assets/MainPane-BwHw3UYp.css +0 -1
- package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +0 -2
- package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +0 -1
- package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +0 -1
- package/dist/web/assets/SettingsView-D2bu3tK_.js +0 -5
- package/dist/web/assets/TeamChatView-CN17AsgA.js +0 -1
- package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +0 -1
- package/dist/web/assets/TrainingMetricWorkbench-DBy8F1xp.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +0 -35
- package/dist/web/assets/app-models-BviS9b7U.js +0 -1
- package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
- package/dist/web/assets/chat-resources-3SvnVeKv.js +0 -1
- package/dist/web/assets/chevron-right-sFx2xRvT.js +0 -1
- package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
- package/dist/web/assets/icons-CK5-nxVC.js +0 -1
- package/dist/web/assets/index-Dezj4Z2p.css +0 -1
- package/dist/web/assets/loader-circle-cyf35w3i.js +0 -1
- package/dist/web/assets/play-wI_3FLr4.js +0 -1
- package/dist/web/assets/plus-DoJe4fLj.js +0 -1
- package/dist/web/assets/settings-BKmRueaw.js +0 -21
- package/dist/web/assets/square-BqSK-hv9.js +0 -1
- package/dist/web/assets/submit-issue-command-DRgUboVW.js +0 -3
- package/dist/web/assets/training-managed-adapter-BXNwgd3P.js +0 -1
- package/dist/web/assets/useAgentInventory-B-LNn3up.js +0 -1
- package/dist/web/assets/x-IPhrr4ju.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TerminalOverlay-DlhRpi-X.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-DYrLeSyY.js","assets/index-Dezj4Z2p.css","assets/api-client-Dgz-fOMl.js","assets/icons-CK5-nxVC.js","assets/chevron-down-dYn0pd4Q.js","assets/createLucideIcon-DmttVQ_a.js","assets/plus-DoJe4fLj.js","assets/x-IPhrr4ju.js","assets/AppToastContext-DZLErwj0.js","assets/ui-theme.generated-D-mc26qt.js","assets/App-DHJVXTI2.js","assets/useQuery-CPC2wsWm.js","assets/schemas-lO3MoWQr.js","assets/common-BMjyKlX-.js","assets/settings-BKmRueaw.js","assets/client-choice-storage-DTTLbrYt.js","assets/app-models-BviS9b7U.js","assets/create-pipeline-CyUZrbbO.js","assets/profile-ref-DSNkG6Ol.js","assets/chunk-H3JZ3P5T-B0SCoPw4.js","assets/work-outputs-CK0nHe4g.js","assets/contracts-BHTOD1nd.js","assets/training-managed-adapter-BXNwgd3P.js","assets/chunk-ZFYI4P6C-BmsNtSkR.js","assets/reward-checks-5AOStF27.js","assets/chat-resources-3SvnVeKv.js","assets/ponder-desktop-Dm7tOkKo.js","assets/submit-issue-command-DRgUboVW.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-ujSvTf5h.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/chevron-right-sFx2xRvT.js","assets/copy-DR4ielPn.js","assets/external-link-B4rPiZEp.js","assets/loader-circle-cyf35w3i.js","assets/maximize-2-DgF6ZVOM.js","assets/refresh-cw-B53QjxMO.js","assets/square-terminal-Dmgkm5zY.js","assets/models-route-Bl_TmMl6.js","assets/NativeSetupTerminal-CNHTByLo.js","assets/AppDialog-BurL61qE.js","assets/PageChrome-VHME5V8j.js","assets/NativeSetupTerminal-3eR9D_R3.css","assets/organization-types-PP-yuR2J.js","assets/App-DpFKLxuA.css","assets/TerminalOverlay-DoUFGstN.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n,t as r}from"./index-DYrLeSyY.js";var i=e(t(),1),a=n(),o=(0,i.lazy)(()=>r(()=>import(`./TerminalOverlay-DlhRpi-X.js`).then(e=>({default:e.TerminalOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function s({open:e,connection:t,scope:n,tabs:r,onTabsChange:s,cwd:c,appId:l,workspaceName:u,queuedCommand:d,onClose:f}){let[p,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{e&&m(!0)},[e]),p?(0,a.jsx)(i.Suspense,{fallback:null,children:(0,a.jsx)(o,{open:e,connection:t,scope:n,tabs:r,onTabsChange:s,cwd:c,appId:l,workspaceName:u,queuedCommand:d,onClose:f})}):null}export{s as AppTerminalPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,l as n,m as r,s as i}from"./index-DYrLeSyY.js";import{T as a,t as o}from"./useQuery-CPC2wsWm.js";import{a as s,c,d as l,m as u,o as d,p as f,r as p,v as m}from"./schemas-lO3MoWQr.js";import{C as h}from"./app-models-BviS9b7U.js";import{d as g,h as _,i as v,p as y}from"./chunk-H3JZ3P5T-B0SCoPw4.js";import{n as b}from"./api-client-Dgz-fOMl.js";import"./icons-CK5-nxVC.js";import{t as x}from"./chevron-right-sFx2xRvT.js";import{t as S}from"./external-link-B4rPiZEp.js";import{a as C,i as w,n as T,t as E}from"./settings-lists-CtH1A57b.js";import{t as D}from"./plus-DoJe4fLj.js";import{t as O}from"./refresh-cw-B53QjxMO.js";import{t as k}from"./x-IPhrr4ju.js";import{t as A}from"./NativeSetupTerminal-CNHTByLo.js";import{Bt as j,Ft as M,Ht as N,Mt as P,jt as F,nr as I,pn as L,qt as R,tr as z,wn as ee}from"./App-DHJVXTI2.js";import{D as te,O as ne}from"./MainPane-2dj6Dg4l.js";import{n as B,r as V,t as re}from"./useAgentInventory-B-LNn3up.js";/* empty css */var H=e(t(),1),U=r();function ie({agent:e,account:t,native:n,inventory:r,projects:i,teamId:a,learningControl:o,connected:s,onHide:c,onManage:l}){let u=r?.collector.connections.filter(t=>t.source===e.id)??[],d=r?.sources.some(t=>t.source===e.id&&t.available&&t.capabilities.history);return(0,U.jsxs)(`article`,{className:`agent-connection-card`,"aria-label":e.name,children:[(0,U.jsxs)(`div`,{className:`agent-card-title`,children:[(0,U.jsx)(`img`,{src:e.icon,alt:``}),(0,U.jsx)(`span`,{children:e.name}),(0,U.jsx)(`button`,{type:`button`,className:`agent-hide`,"aria-label":`Hide ${e.name}`,onClick:c,children:(0,U.jsx)(k,{size:14})})]}),e.id===`openpond_chat`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`small`,{children:t?.state===`signed_in`?`Connected to OpenPond`:`Sign in to OpenPond`}),(0,U.jsx)(`p`,{children:`Use Ponder Pal from the sidebar.`}),(0,U.jsx)(`button`,{type:`button`,className:`agent-account-link`,onClick:()=>void M({kind:`settings`,section:`account`}),children:`Account setup`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`small`,{children:n?n.available?n.enabled?`Ready to chat`:`Installed · chat disabled`:n.lastError??`Check installation`:`Conversation import`}),(0,U.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:!s,onClick:l,children:n?.available||u.length?`Manage`:`Connect`}),(0,U.jsx)(`div`,{className:`agent-card-sync`,children:u.length?u.map(e=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{children:V(e,r.collector)}),(0,U.jsxs)(`small`,{children:[i.find(t=>t.id===e.projectId&&e.teamId===a)?.content.name??e.projectId,` `,`· `,e.admitted,` tasks`]}),e.teamId===a?null:(0,U.jsxs)(`small`,{children:[`Team: `,e.teamId]}),e.queued?(0,U.jsxs)(`small`,{children:[e.queued,` updates queued`]}):null,e.lastAdmissionAt?(0,U.jsxs)(`small`,{children:[`Last sync: `,new Date(e.lastAdmissionAt).toLocaleString()]}):null,e.error?(0,U.jsx)(N,{error:e.error}):null]},e.id)):(0,U.jsx)(`small`,{children:r?d?`History available · sync not connected`:`No local history found`:`Reading local setup…`})})]}),o]})}function ae(e,t,n,r){let i=(0,H.useRef)({providers:t,onProvider:n});i.current={providers:t,onProvider:n};let a=JSON.stringify([`claude-code`,`opencode`,`grok-build`].map(e=>{let n=t?.providers[e];return[e,n?.binaryPath,n?.sourceHome,n?.enabled]}));(0,H.useEffect)(()=>{if(!e||!i.current.providers)return;let t=!1,n=[`claude-code`,`opencode`,`grok-build`].map(n=>{let a=i.current.providers?.providers[n],o=new AbortController,s=r>0?{promise:b(e,`/v1/providers/${n}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:o.signal}),release:()=>o.abort()}:te(e,n,i.current.providers?.providers[n]);return s.promise.then(o=>{t||(r>0&&o.session&&!o.error&&ne(e,n,o,a),i.current.onProvider(n,o.settings))},()=>{}),s});return()=>{t=!0,n.forEach(e=>e.release())}},[e,a,r])}var W=m().trim().min(1).max(240),G=f().int().positive(),K=p([`dataset`,`evaluator`,`model`,`training_configuration`,`training_run`,`harness`,`environment`,`experiment`,`learning_policy`,`deployment`]),q=u({kind:K,resourceId:W,release:v.nullable(),role:p([`training`,`validation`,`holdout`,`target`,`reward`,`evaluation`,`serving`,`source`])}).strict(),oe=c(`kind`,[u({kind:l(`model`),providerId:W,modelId:W,artifact:v.nullable(),messages:s(u({role:p([`system`,`user`,`assistant`]),content:m().max(1e5)}).strict()).max(100)}).strict(),u({kind:l(`harness`),profileRepositoryId:W,source:_}).strict(),u({kind:l(`agent`),source:y}).strict(),u({kind:l(`suite`),profileRepositoryId:W,suiteId:W,sources:s(_).min(1).max(1e3)}).strict().superRefine((e,t)=>{let n=e.sources[0],r=new Set;for(let[i,a]of e.sources.entries())r.has(a.definitionId)&&t.addIssue({code:`custom`,path:[`sources`,i],message:`Suite definitions must be unique.`}),r.add(a.definitionId),(a.profileId!==n.profileId||a.sourceRevision!==n.sourceRevision||a.catalogHash!==n.catalogHash||g(a.harnessRelease)!==g(n.harnessRelease))&&t.addIssue({code:`custom`,path:[`sources`,i],message:`Suite checks must belong to the same pinned Profile source and Harness release.`})})]),se=u({name:m().trim().min(1).max(200),description:m().max(1e4),targets:s(u({id:W,name:m().trim().min(1).max(200),target:oe}).strict()).max(100),defaultTargetId:W.nullable(),resources:s(q).max(1e3)}).strict().superRefine((e,t)=>{new Set(e.targets.map(e=>e.id)).size!==e.targets.length&&t.addIssue({code:`custom`,path:[`targets`],message:`Target identities must be unique.`}),e.defaultTargetId&&!e.targets.some(t=>t.id===e.defaultTargetId)&&t.addIssue({code:`custom`,path:[`defaultTargetId`],message:`Default target must belong to this Project.`}),new Set(e.resources.map(e=>g(e))).size!==e.resources.length&&t.addIssue({code:`custom`,path:[`resources`],message:`Resource links must be unique.`})}),ce=u({schemaVersion:l(`openpond.trainingProject.v1`),id:W,teamId:W,creatorUserId:W,ownerScope:p([`workspace`,`personal`]).optional(),revision:G,content:se,archived:d(),createdAt:m().datetime(),updatedAt:m().datetime()}).strict();u({operationId:W,id:W,expectedRevision:f().int().nonnegative(),content:se,ownerScope:p([`workspace`,`personal`]).optional()}).strict(),u({operationId:W,expectedRevision:G,archived:d()}).strict();var le=u({teamId:W,projects:s(ce).max(100),nextCursor:W.nullable()}).strict();u({operation:p([`evaluate`,`train`,`enable_learning`,`accept_candidate`,`serve`]),support:p([`supported`,`unsupported`]),state:p([`ready`,`needs_setup`,`blocked`]),reasons:s(u({code:W,message:m().min(1).max(2e3),field:m().nullable(),action:p([`choose_target`,`choose_data`,`choose_evaluator`,`configure_runtime`,`request_access`,`configure_budget`,`wait`,`review_evidence`]).nullable()}).strict()).max(100)}).strict().superRefine((e,t)=>{e.state===`ready`&&(e.support!==`supported`||e.reasons.length)&&t.addIssue({code:`custom`,message:`Ready operations must be supported with no blockers.`}),e.state!==`ready`&&!e.reasons.length&&t.addIssue({code:`custom`,message:`Unavailable operations must explain the next step.`})});var J=new WeakMap;function ue(e,t,n){let r=JSON.stringify([t?.activeProfile,t?.profile?.id,n]),i=e?J.get(e)?.get(r):void 0,[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(0),p=t?.state===`signed_in`?a?.key===r&&a.connection===e?a.value:i:void 0;(0,H.useEffect)(()=>{if(!e||!n||t?.state!==`signed_in`)return;let i=new AbortController;u(!0),c(null);async function a(){let t=[],a=new Set,s;do{let r=le.parse(await b(e,`/v1/training/evaluation-workspace`,{method:`POST`,body:JSON.stringify({teamId:n,operation:`projects`,value:{cursor:s}}),signal:i.signal}));if(r.teamId!==n)throw Error(`The hosted project workspace changed. Refresh connections.`);if(t.push(...r.projects.filter(e=>!e.archived)),s=r.nextCursor??void 0,s&&a.has(s))throw Error(`Project pagination stalled. Refresh connections.`);s&&a.add(s)}while(s&&!i.signal.aborted);if(i.signal.aborted)return;let c=J.get(e);c||(c=new Map,J.set(e,c));let l=c.get(r)?.selected,u={projects:t,selected:l&&t.some(e=>e.id===l)?l:t.length===1?t[0].id:``};c.set(r,u),o({key:r,connection:e,value:u})}return a().catch(e=>{i.signal.aborted||c(e instanceof Error?e.message:`Unable to list hosted projects.`)}).finally(()=>{i.signal.aborted||u(!1)}),()=>i.abort()},[e,r,n,t?.state,d]);let m=(0,H.useCallback)(t=>{if(!e)return;let n=J.get(e)?.get(r);if(!n||!n.projects.some(e=>e.id===t))return;let i={...n,selected:t};J.get(e).set(r,i),o({key:r,connection:e,value:i})},[e,r]);return{projects:p?.projects??[],projectId:p?.selected??``,select:m,error:s,loading:l,refresh:()=>f(e=>e+1)}}var de=e(P(),1),fe=e(F(),1);function pe({connection:e,connectionId:t,disabled:n,projectName:r,onUpload:i,onClose:a}){let[o,s]=(0,H.useState)(``),[c,l]=(0,H.useState)(`all`),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(()=>new Map),[m,h]=(0,H.useState)(!0),[g,_]=(0,H.useState)(null),[v,y]=(0,H.useState)(0);w(e,g,()=>y(e=>e+1));let x=(0,H.useRef)(null),S=(0,H.useRef)(0);(0,H.useEffect)(()=>{let n=new AbortController;x.current?.abort(),x.current=n,h(!0),d(null),_(null);let r=window.setTimeout(()=>{let r=v!==S.current;S.current=v,b(e,`/v1/native-history/collector`,{method:`POST`,signal:n.signal,body:JSON.stringify({command:`conversations`,connectionId:t,query:o,range:c,refresh:r})}).then(e=>{n.signal.aborted||d(e)}).catch(e=>{n.signal.aborted||_(e instanceof Error?e.message:`Unable to list conversations.`)}).finally(()=>{n.signal.aborted||h(!1)})},200);return()=>{window.clearTimeout(r),n.abort(),x.current?.abort()}},[e,t,o,c,v]);async function C(){if(m||u?.nextOffset==null)return;let n=new AbortController;x.current=n,h(!0),_(null);try{let r=await b(e,`/v1/native-history/collector`,{method:`POST`,signal:n.signal,body:JSON.stringify({command:`conversations`,connectionId:t,query:o,range:c,offset:u.nextOffset})});n.signal.aborted||d(e=>({...r,items:[...new Map([...e?.items??[],...r.items].map(e=>[e.key,e])).values()]}))}catch(e){n.signal.aborted||_(e instanceof Error?e.message:`Unable to load more conversations.`)}finally{n.signal.aborted||h(!1)}}function T(e,t){p(n=>{let r=new Map(n);return t?r.set(e.key,e):r.delete(e.key),r})}let E=u?.items??[],D=E.filter(e=>!e.issue),O=D.length>0&&D.every(e=>f.has(e.key)),k=new Set(E.map(e=>e.key)),A=[...f.keys()].filter(e=>!k.has(e)).length;return(0,U.jsxs)(`section`,{className:`conversation-upload-picker`,"aria-label":`Choose conversations to upload`,children:[(0,U.jsx)(`h3`,{children:`Choose conversations`}),(0,U.jsxs)(`p`,{children:[`Upload to `,(0,U.jsx)(`strong`,{children:r}),`. This selection also sets which conversations later syncs update. Previously uploaded data stays in the project.`]}),(0,U.jsxs)(`div`,{className:`conversation-upload-toolbar`,children:[(0,U.jsx)(`input`,{autoFocus:!0,type:`search`,"aria-label":`Search conversations`,placeholder:`Search title, folder, or session ID`,value:o,disabled:n,onChange:e=>s(e.target.value)}),(0,U.jsx)(j,{label:`Conversation activity`,value:c,disabled:n,onChange:l,options:[{value:`all`,label:`All dates`},{value:`week`,label:`Active last week`},{value:`day`,label:`Active last day`}]})]}),(0,U.jsxs)(`div`,{className:`conversation-upload-selection`,role:`status`,children:[(0,U.jsxs)(`span`,{children:[f.size,` selected`,A?` · ${A} outside this view`:``,u?` · ${u.total} matching`:``]}),(0,U.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>y(e=>e+1),children:`Refresh`}),(0,U.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||!f.size,onClick:()=>p(new Map),children:`Clear selection`})]}),(0,U.jsx)(`div`,{className:`evaluation-table-scroll evaluation-table-frame conversation-upload-table`,children:(0,U.jsxs)(`table`,{className:`training-data-table evaluation-workspace-table`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:(0,U.jsx)(`input`,{type:`checkbox`,className:`training-chat-checkbox`,"aria-label":`Select visible conversations`,checked:O,disabled:n||m||!D.length,onChange:e=>{let t=e.target.checked;p(e=>{let n=new Map(e);return D.forEach(e=>{t?n.set(e.key,e):n.delete(e.key)}),n})}})}),(0,U.jsx)(`th`,{children:`Conversation`}),(0,U.jsx)(`th`,{children:`Last activity`})]})}),(0,U.jsxs)(`tbody`,{children:[E.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(`input`,{type:`checkbox`,className:`training-chat-checkbox`,"aria-label":`Select ${e.title}`,checked:f.has(e.key),disabled:n||!!e.issue,onChange:t=>T(e,t.target.checked)})}),(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`span`,{className:`conversation-upload-title`,title:e.title,children:e.title}),(0,U.jsx)(`small`,{title:e.cwd??e.nativeSessionId,children:e.cwd??e.nativeSessionId}),e.issue?(0,U.jsx)(`small`,{role:`status`,children:e.issue}):e.approved?(0,U.jsx)(`small`,{children:`Already approved for sync`}):null]}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`time`,{dateTime:e.updatedAt,children:new Date(e.updatedAt).toLocaleDateString()})})]},e.key)),m?(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{colSpan:3,role:`status`,children:`Loading conversations…`})}):!E.length&&!g?(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{colSpan:3,children:o.trim()||c!==`all`?`No conversations match these filters.`:`No saved conversations found in this installation.`})}):null]})]})}),g?(0,U.jsx)(N,{error:g,children:(0,U.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>y(e=>e+1),children:`Retry`})}):null,u?.nextOffset==null?null:(0,U.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n||m,onClick:()=>void C(),children:`Load more conversations`}),(0,U.jsx)(`p`,{children:`The complete selected conversations are uploaded, including their prompts, responses, and tool history. Date filters help you find conversations; they do not trim their contents.`}),(0,U.jsxs)(`div`,{className:`settings-button-row`,children:[(0,U.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:n||!f.size,onClick:()=>void i([...f.keys()]),children:`Upload ${f.size} conversation${f.size===1?``:`s`}`}),(0,U.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:n,onClick:a,children:`Cancel`})]})]})}de.default.extend(fe.default);function me({agent:e,inventory:t,connection:n,account:r,teamId:i,projects:a,projectId:o,onRefresh:s,learningUrl:c}){let l=t?.sources.filter(t=>t.source===e.id)??[],[u,d]=(0,H.useState)(l.length===1?l[0].instanceId:``),[f,p]=(0,H.useState)(o),[m,h]=(0,H.useState)(null),[g,_]=(0,H.useState)(null),[v,y]=(0,H.useState)(!1),[x,S]=(0,H.useState)(null),C=l.find(e=>e.instanceId===u)??(!u&&l.length===1?l[0]:void 0),w=t?.collector.connections.filter(t=>t.source===e.id)??[],T=r?.baseUrl??r?.activeProfile?.baseUrl,E=r?.apiBaseUrl;async function D(e,t,r){if(!(!n||v||g)){y(!0),S(null);try{let a=await b(n,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:e,...t?{connectionId:t}:{},...r?{sessionKeys:r}:{},...e===`connect`?{setup:{sourceInstanceId:C?.instanceId,teamId:i,projectId:f,accountBaseUrl:T,apiBaseUrl:E,range:`all`}}:{}})});a.command?_(a.command):await s()}catch(e){S(e instanceof Error?e.message:`Unable to update this connection.`)}finally{y(!1)}}}let O=v||g!==null,k=w.find(e=>e.id===m),P=g&&n?(0,U.jsx)(A,{connection:n,command:g,onComplete:()=>{_(null),h(null),s()},onClose:()=>{_(null),s()}}):null;return k&&n?(0,U.jsxs)(`div`,{className:`agent-conversation-setup provider-dialog-body`,children:[(0,U.jsx)(pe,{connection:n,connectionId:k.id,projectName:a.find(e=>e.id===k.projectId&&k.teamId===i)?.content.name??k.projectId,disabled:O||!!t?.collector.running,onClose:()=>h(null),onUpload:e=>D(`upload`,k.id,e)},k.id),x?(0,U.jsx)(N,{error:x}):null,P]}):(0,U.jsxs)(`div`,{className:`agent-conversation-setup provider-dialog-body`,children:[(0,U.jsxs)(`p`,{children:[`Sync saved `,e.name,` conversations to an existing OpenPond project. Connecting authorizes the destination. Choose conversations and confirm an upload when ready.`]}),w.map(n=>(0,U.jsxs)(`section`,{className:`agent-retained-connection`,"aria-label":`${e.name} sync connection`,children:[(0,U.jsx)(`strong`,{children:V(n,t.collector)}),(0,U.jsxs)(`span`,{children:[`Project:`,` `,n.teamId===i?a.find(e=>e.id===n.projectId)?.content.name??n.projectId:n.projectId,` `,`· Team: `,n.teamId]}),(0,U.jsx)(`small`,{children:n.accountBaseUrl??`Hosted destination`}),(0,U.jsx)(`small`,{className:`agent-source-path`,children:n.sourceRoot}),(0,U.jsxs)(`span`,{children:[n.admitted,` tasks imported · `,n.queued,` updates queued`]}),(0,U.jsx)(`small`,{children:n.selectedConversations===null?`All history approved for sync`:`${n.selectedConversations} conversations approved for sync`}),n.backfill.total>0&&n.backfill.stage!==`complete`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`progress`,{"aria-label":`History import progress`,value:n.backfill.admitted+n.backfill.skipped,max:n.backfill.total}),(0,U.jsxs)(`small`,{children:[n.backfill.admitted+n.backfill.skipped,` of`,` `,n.backfill.total,` conversations processed`]})]}):null,(0,U.jsx)(`small`,{children:n.lastAdmissionAt?`Last synced ${(0,de.default)(n.lastAdmissionAt).fromNow()}`:`No uploads acknowledged yet`}),n.error?(0,U.jsx)(N,{error:n.error}):null,(0,U.jsxs)(`div`,{className:`settings-button-row`,children:[(0,U.jsx)(`button`,{type:`button`,className:`agent-connect-button`,disabled:O||n.state!==`active`||t?.collector.running,onClick:()=>h(n.id),children:`Choose conversations…`}),n.state===`disconnected`?(0,U.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>void D(`reconnect`,n.id),children:`Reconnect`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>void D(n.state===`paused`?`resume`:`pause`,n.id),children:n.state===`paused`?`Resume`:`Pause`}),(0,U.jsx)(`button`,{type:`button`,disabled:O,onClick:()=>{window.confirm(`Disconnect this conversation source? Imported data stays in its project.`)&&D(`disconnect`,n.id)},children:`Disconnect`})]}),n.destinationLinks.tasks?(0,U.jsx)(`a`,{href:n.destinationLinks.tasks,target:`_blank`,rel:`noreferrer`,children:`View tasks`}):null,n.destinationLinks.conversations?(0,U.jsx)(`a`,{href:n.destinationLinks.conversations,target:`_blank`,rel:`noreferrer`,children:`View conversations`}):null]})]},n.id)),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),D(`connect`)},className:`agent-sync-form`,children:[(0,U.jsx)(`h3`,{children:w.length?`Add another connection`:`Connect conversations`}),(0,U.jsxs)(`label`,{className:`agent-source-field`,children:[`Source installation`,(0,U.jsx)(j,{label:`Source installation`,value:C?.instanceId??``,disabled:O,onChange:d,options:[{value:``,label:`Select installation`},...l.map(e=>({value:e.instanceId,label:e.root,disabled:!e.available||!e.capabilities.history}))]})]}),C?.reason?(0,U.jsx)(`small`,{children:C.reason}):null,l.some(e=>e.available&&e.capabilities.history)?null:(0,U.jsxs)(`small`,{children:[`No readable conversation history found.`,` `,e.provider?`Use Agent setup to check the installation, or create a conversation in this agent first.`:`Open this agent and create a conversation, then refresh connections.`]}),(0,U.jsxs)(`label`,{children:[`Project`,(0,U.jsx)(j,{label:`Upload destination project`,value:f,disabled:O||!i,onChange:p,searchable:!0,options:[{value:``,label:`Select project`},...a.map(e=>({value:e.id,label:e.content.name}))]})]}),(0,U.jsx)(`p`,{children:`No conversations are uploaded during setup. Continual imports are off by default and can be scheduled after choosing conversations.`}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>M({kind:`settings`,section:`conversation-imports`}),children:`Manage continual imports in Settings`}),r?.state!==`signed_in`||!i?(0,U.jsx)(`small`,{children:`Sign in and select a default team in Account settings to choose a hosted project.`}):null,(0,U.jsx)(`button`,{type:`submit`,className:`agent-connect-button`,disabled:O||!C?.available||!C.capabilities.history||!a.some(e=>e.id===f)||!i||!T||!E||r?.state!==`signed_in`,children:v?`Opening setup…`:`Connect conversations`})]}),c?(0,U.jsx)(`a`,{className:`agent-learning-link`,href:c,target:`_blank`,rel:`noreferrer`,children:`Configure continual learning in Console`}):null,t?(0,U.jsxs)(`details`,{children:[(0,U.jsx)(`summary`,{children:`CLI setup`}),(0,U.jsxs)(`small`,{className:`agent-source-path`,children:[`Importer directory: `,t.directory]}),(0,U.jsx)(`code`,{children:t.statusCommand})]}):null,x?(0,U.jsx)(N,{error:x}):null,P]})}var Y=e=>JSON.stringify([e.origin,e.sourceInstanceId]),he=e=>({id:e.id,revision:e.revision,contentHash:e.contentHash});function X(e,t,n,r,i){return b(e,`/v1/conversation-learning/${n}?${new URLSearchParams({teamId:t})}`,{method:r===void 0?`GET`:`POST`,...r===void 0?{}:{body:JSON.stringify(r)},signal:i})}function ge(e,t,n,r){let i=a(),s=[`native-conversation-learning`,e?.serverUrl,n,t];return{...o({queryKey:s,enabled:!!(e&&t&&r),queryFn:({signal:n})=>X(e,t,`options`,void 0,n),staleTime:15e3,refetchInterval:3e4}),refresh:()=>i.invalidateQueries({queryKey:s})}}function _e(e,t,n,r,i){return X(e,t,`policies`,{...n?{id:n.id}:{},expectedRevision:n?.revision??0,configuration:r,enabled:i})}function Z(e,t,n=[]){let r=t?.configuration;return{projectId:e,name:r?.name??`Continuous learning`,mode:r?.mode??`activate`,definition:r?.definition??null,configurationId:r?.configuration?.id??``,trainingPolicyId:r?.learningPolicy?.id??``,graderIds:[],sourceKeys:[...new Set([...r?.sources.filter(e=>e.enabled).map(Y)??[],...n.map(Y)])],adapter:r?.adapter??{kind:`complete_text`,qualitativeOnly:!0},generator:r?.generator??null,graderSelection:r?.graderSelection??(t?{mode:`manual`}:{mode:`auto`,modelId:`gpt-6-luna`,sampleSize:8,maximumOutputTokens:2048,maximumSpendUsd:1}),schedule:r?.schedule??{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hour:2,minute:0,endHour:6,endMinute:0},limits:r?.limits??{perCycleUsd:5,dailyUsd:5,monthlyUsd:25,gradeUsd:.2,maximumTasks:10,minimumExamples:5,maxGpuSeconds:10800,maximumAttempts:2,lookbackDays:30},exceptions:r?.exceptions??`block`,minimumScore:r?.minimumScore??.8,selection:r?.selection??{maximumSourceShare:1,maximumFailureShare:1,maximumLengthShare:1,replayFraction:.2,auditFraction:.1},acceptance:r?.acceptance??{minimumCasesPerCheck:20,minimumImprovement:.05,windowCasesPerCheck:20},failurePolicy:r?.failurePolicy??{pauseAfterConsecutiveFailures:3},...r?.serving?{serving:r.serving}:{serving:{targetId:``,canarySeconds:120,rollbackOnRuntimeFailure:!0}}}}function Q(e,t){let n=e?.configurations.find(e=>e.id===t);return e?.trainingPolicies.filter(e=>e.modelProjectId===n?.portableProjectId&&e.training.recipe.id===`model-recipe-${n?.etag}`&&!e.id.startsWith(`conversation-training-`))??[]}async function ve(e,t,n,r,i,a){let o=r.configurations.find(e=>e.id===n.configurationId),s=Q(r,n.configurationId).find(e=>e.id===n.trainingPolicyId);if(!n.name.trim())throw Error(`Enter a policy name.`);if(!r.projects.some(e=>e.id===n.projectId))throw Error(`This owned Project is unavailable for continuous learning.`);if(n.configurationId&&(!o||!r.projects.find(e=>e.id===n.projectId)?.configurationIds.includes(o.id)))throw Error(`Choose a model configuration attached to this Project.`);if(n.mode!==`evaluate`&&(!o||!s))throw Error(`Choose an owned model and its reviewed training setup.`);if(n.limits.perCycleUsd>n.limits.dailyUsd||n.limits.dailyUsd>n.limits.monthlyUsd)throw Error(`Daily and monthly spending limits must cover the run limit.`);if(n.limits.minimumExamples>n.limits.maximumTasks-Math.floor(n.limits.maximumTasks*(n.selection?.replayFraction??0)))throw Error(`Leave capacity for the minimum new examples after replay.`);let c=r.sources.filter(e=>e.projectId===n.projectId&&n.sourceKeys.includes(Y(e)));if(!c.length)throw Error(`Select a source agent for this Project.`);let l=[...(i?.configuration.sources??[]).filter(e=>!c.some(t=>Y(t)===Y(e))).map(e=>({...e,enabled:!1})),...c.map(e=>({origin:e.origin,sourceInstanceId:e.sourceInstanceId,enabled:!0}))],u=n.definition;if(o&&(i?.configuration.configuration?.id!==o.id||i.configuration.configuration.expectedEtag!==o.etag))u=await X(e,t,`definitions`,{projectId:n.projectId,configuration:{id:o.id,expectedRevision:o.revision,expectedEtag:o.etag}});else if(n.graderIds.length){let i=r.graders.flatMap(e=>e&&n.graderIds.includes(e.id)?[he(e)]:[]);u=await X(e,t,`definitions`,{projectId:n.projectId,graders:i})}if(!u)throw Error(`Select evaluation rubrics or an existing task definition.`);let d=n.serving,f=r.servingTargets.find(e=>e.id===d?.targetId);if(n.mode===`activate`&&d?.targetId&&(!f||!f.enabled||f.projectId!==n.projectId))throw Error(`Select an available serving target in this Project.`);if(n.mode===`activate`&&(!d?.targetId||f?.hostedPonder)&&(d={targetId:(await X(e,t,`serving-targets`,{action:`ensure_hosted_ponder`,projectId:n.projectId,bindingId:r.ponderBindingId})).id,canarySeconds:d?.canarySeconds??120,rollbackOnRuntimeFailure:!0}),n.mode===`activate`&&!d?.targetId)throw Error(`Choose a serving target, or enable the policy to register hosted Ponder.`);let{sourceKeys:p,configurationId:m,trainingPolicyId:h,graderIds:g,..._}=n,v={..._,name:n.name.trim(),definition:u,sources:l,configuration:o?{id:o.id,expectedRevision:o.revision,expectedEtag:o.etag}:null,learningPolicy:s?he(s):null,...n.mode===`activate`?{serving:d}:{}};return n.mode!==`activate`&&delete v.serving,n.mode===`evaluate`&&delete v.acceptance,_e(e,t,i,v,a)}function ye({draft:e,options:t,loading:n,onChange:r}){let i=t?.sources.filter(t=>t.projectId===e.projectId)??[],a=i.filter(e=>[`active`,`paused`].includes(e.state)),o=a.length>0&&a.every(t=>e.sourceKeys.includes(Y(t))),s=t=>r({...e,sourceKeys:t}),c=t?.graders.flatMap(e=>e?[e]:[])??[];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`fieldset`,{children:[(0,U.jsx)(`legend`,{children:`Source agents`}),(0,U.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:o,disabled:!a.length,ref:t=>{t&&(t.indeterminate=!o&&a.some(t=>e.sourceKeys.includes(Y(t))))},onChange:t=>s(t.target.checked?[...new Set([...e.sourceKeys,...a.map(Y)])]:e.sourceKeys.filter(e=>!a.some(t=>Y(t)===e)))}),`Select all`,` `,(0,U.jsxs)(`small`,{children:[`(`,i.filter(t=>e.sourceKeys.includes(Y(t))).length,` selected)`]})]}),(0,U.jsxs)(`div`,{className:`agent-learning-options`,"aria-label":`Source agents`,children:[i.map(t=>{let n=Y(t),r=e.sourceKeys.includes(n),i=B.find(e=>e.id===(t.origin.startsWith(`native_`)?`openpond_chat`:t.origin)),a=t.origin===`native_chat`?`Ponder Pal Chat`:t.origin===`native_work`?`Ponder Pal Work`:i?.name??t.name;return(0,U.jsxs)(`label`,{className:`agent-learning-option`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:r,disabled:!r&&![`active`,`paused`].includes(t.state),onChange:t=>s(t.target.checked?[...new Set([...e.sourceKeys,n])]:e.sourceKeys.filter(e=>e!==n))}),i?(0,U.jsx)(`img`,{src:i.icon,alt:``}):null,(0,U.jsxs)(`span`,{children:[a,(0,U.jsx)(`small`,{children:t.sourceInstanceId?t.name===t.origin?`Local connection`:t.name:t.origin.startsWith(`native_`)?`Hosted conversations`:`Uploaded history`})]}),(0,U.jsx)(`small`,{children:t.state})]},n)}),i.length?null:(0,U.jsx)(`p`,{role:`status`,children:n?`Fetching source agents…`:`Connect or import an agent into this Project first.`})]}),(0,U.jsx)(`p`,{children:`Paused agents can use uploaded conversations. Selecting them leaves collection paused.`})]}),(0,U.jsxs)(`fieldset`,{children:[(0,U.jsx)(`legend`,{children:`Evaluation rubrics`}),e.configurationId?(0,U.jsx)(`p`,{children:`The training configuration pins the task definition and its rubrics. Choose grader selection in Preparation.`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,U.jsx)(`input`,{type:`checkbox`,disabled:!c.length,checked:c.length>0&&c.every(t=>e.graderIds.includes(t.id)),onChange:t=>r({...e,graderIds:t.target.checked?c.map(e=>e.id):[]})}),`Select all `,(0,U.jsxs)(`small`,{children:[`(`,e.graderIds.length,` selected)`]})]}),(0,U.jsxs)(`div`,{className:`agent-learning-options`,"aria-label":`Evaluation rubrics`,children:[c.map(t=>(0,U.jsxs)(`label`,{className:`agent-learning-option`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:e.graderIds.includes(t.id),onChange:n=>r({...e,graderIds:n.target.checked?[...e.graderIds,t.id]:e.graderIds.filter(e=>e!==t.id)})}),(0,U.jsxs)(`span`,{children:[t.name,(0,U.jsxs)(`small`,{children:[`Version `,t.revision]})]})]},`${t.id}:${t.revision}`)),c.length?null:(0,U.jsx)(`p`,{role:`status`,children:n?`Fetching evaluation rubrics…`:`No owned evaluation rubrics are available.`})]}),e.definition&&!e.graderIds.length?(0,U.jsx)(`p`,{children:`The saved task definition and rubrics remain unchanged.`}):null,(0,U.jsxs)(`label`,{children:[`Existing task definition`,(0,U.jsxs)(`select`,{value:e.definition?.id??``,onChange:n=>{let i=t?.definitions.find(e=>e.id===n.target.value);r({...e,definition:i?{id:i.id,revision:i.revision,contentHash:i.contentHash}:null,graderIds:[]})},children:[(0,U.jsx)(`option`,{value:``,children:`Select a definition or choose rubrics above`}),e.definition&&!t?.definitions.some(t=>t.id===e.definition?.id)?(0,U.jsx)(`option`,{value:e.definition.id,children:`Saved task definition`}):null,t?.definitions.map(e=>(0,U.jsxs)(`option`,{value:e.id,children:[e.name,` (version `,e.revision,`)`]},e.id))]})]})]}),(0,U.jsxs)(`label`,{children:[`Minimum verified score`,(0,U.jsx)(`input`,{type:`number`,min:0,max:1,step:.01,value:e.minimumScore,onChange:t=>r({...e,minimumScore:Number(t.target.value)})})]})]})]})}function be({draft:e,options:t,loading:n,onChange:r}){let i=t?.projects.find(t=>t.id===e.projectId)?.configurationIds??[],a=Q(t,e.configurationId),o=e.graderSelection??{mode:`manual`};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{children:[`Mode`,(0,U.jsxs)(`select`,{value:e.mode,onChange:t=>r({...e,mode:t.target.value}),children:[(0,U.jsx)(`option`,{value:`evaluate`,children:`Evaluate only`}),(0,U.jsx)(`option`,{value:`train`,children:`Train automatically, approve candidate`}),(0,U.jsx)(`option`,{value:`activate`,children:`Train and activate automatically`})]})]}),(0,U.jsxs)(`label`,{children:[`Model to train`,(0,U.jsxs)(`select`,{value:e.configurationId,onChange:n=>{let i=n.target.value,a=Q(t,i);r({...e,configurationId:i,trainingPolicyId:a.length===1?a[0].id:``,adapter:i?{kind:`reference_text`,inputPointer:`/prompt`,match:`contained`}:{kind:`complete_text`,qualitativeOnly:!0}})},children:[(0,U.jsx)(`option`,{value:``,children:n?`Fetching configurations…`:`Select configuration`}),t?.configurations.filter(e=>i.includes(e.id)).map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),e.mode===`evaluate`?null:(0,U.jsxs)(`label`,{children:[`Reviewed training setup`,(0,U.jsxs)(`select`,{value:e.trainingPolicyId,onChange:t=>r({...e,trainingPolicyId:t.target.value}),children:[(0,U.jsx)(`option`,{value:``,children:`Select reviewed setup`}),a.map(e=>(0,U.jsxs)(`option`,{value:e.id,children:[`Reviewed setup (version `,e.revision,`)`]},e.id))]})]}),e.configurationId?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{children:[`Task construction`,(0,U.jsxs)(`select`,{value:e.adapter.kind,onChange:t=>r({...e,adapter:t.target.value===`reference_text`?{kind:`reference_text`,inputPointer:`/prompt`,match:`contained`}:{kind:`complete_text`,qualitativeOnly:!0}}),children:[(0,U.jsx)(`option`,{value:`reference_text`,children:`Match a published executable task`}),(0,U.jsx)(`option`,{value:`complete_text`,children:`Complete text context and calibrated judges`})]})]}),e.adapter.kind===`reference_text`?(0,U.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,U.jsxs)(`label`,{children:[`Public task input field`,(0,U.jsx)(`input`,{value:e.adapter.inputPointer,onChange:t=>r({...e,adapter:{kind:`reference_text`,inputPointer:t.target.value,match:e.adapter.kind===`reference_text`?e.adapter.match:`contained`}})})]}),(0,U.jsxs)(`label`,{children:[`Reference matching`,(0,U.jsxs)(`select`,{value:e.adapter.match,onChange:t=>r({...e,adapter:{kind:`reference_text`,inputPointer:e.adapter.kind===`reference_text`?e.adapter.inputPointer:`/prompt`,match:t.target.value}}),children:[(0,U.jsx)(`option`,{value:`contained`,children:`Contained`}),(0,U.jsx)(`option`,{value:`exact`,children:`Exact`})]})]})]}):null,(0,U.jsxs)(`label`,{children:[`Grader selection`,(0,U.jsxs)(`select`,{value:o.mode,onChange:t=>r({...e,graderSelection:t.target.value===`auto`?{mode:`auto`,modelId:`gpt-6-luna`,sampleSize:8,maximumOutputTokens:2048,maximumSpendUsd:1}:{mode:`manual`}}),children:[(0,U.jsx)(`option`,{value:`auto`,children:`Choose compatible rubrics automatically`}),(0,U.jsx)(`option`,{value:`manual`,children:`Use the pinned rubrics`})]})]}),o.mode===`auto`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{children:[`Selection model`,(0,U.jsxs)(`select`,{value:o.modelId,onChange:t=>r({...e,graderSelection:{...o,modelId:t.target.value}}),children:[t?.generators.some(e=>e.id===o.modelId)?null:(0,U.jsx)(`option`,{value:o.modelId,children:o.modelId}),t?.generators.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,U.jsx)(`div`,{className:`agent-learning-columns`,children:[[`sampleSize`,`Sample examples`,1,30],[`maximumOutputTokens`,`Output token limit`,256,4096],[`maximumSpendUsd`,`Selection spending limit ($)`,.01,1e5]].map(([t,n,i,a])=>(0,U.jsxs)(`label`,{children:[n,(0,U.jsx)(`input`,{type:`number`,min:i,max:a,step:t===`maximumSpendUsd`?.01:1,value:o[t],onChange:n=>r({...e,graderSelection:{...o,[t]:Number(n.target.value)}})})]},t))})]}):null]}):null,(0,U.jsxs)(`label`,{children:[`Answer improvement model`,(0,U.jsxs)(`select`,{value:e.generator?.modelId??``,onChange:t=>r({...e,generator:t.target.value?{modelId:t.target.value,maximumOutputTokens:e.generator?.maximumOutputTokens??2048,maximumSpendUsd:e.generator?.maximumSpendUsd??.1}:null}),children:[(0,U.jsx)(`option`,{value:``,children:`Use recorded answers only`}),t?.generators.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),e.generator?(0,U.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,U.jsxs)(`label`,{children:[`Per improved answer limit ($)`,(0,U.jsx)(`input`,{type:`number`,min:.01,step:.01,value:e.generator.maximumSpendUsd,onChange:t=>r({...e,generator:{...e.generator,maximumSpendUsd:Number(t.target.value)}})})]}),(0,U.jsxs)(`label`,{children:[`Output token limit`,(0,U.jsx)(`input`,{type:`number`,min:256,max:16384,value:e.generator.maximumOutputTokens,onChange:t=>r({...e,generator:{...e.generator,maximumOutputTokens:Number(t.target.value)}})})]})]}):null,e.mode===`activate`?(0,U.jsxs)(`fieldset`,{children:[(0,U.jsx)(`legend`,{children:`Serving authorization`}),(0,U.jsxs)(`label`,{children:[`Serving target`,(0,U.jsxs)(`select`,{value:e.serving?.targetId??``,onChange:t=>r({...e,serving:{targetId:t.target.value,canarySeconds:e.serving?.canarySeconds??120,rollbackOnRuntimeFailure:!0}}),children:[(0,U.jsx)(`option`,{value:``,children:`Ponder in this Project`}),t?.servingTargets.filter(t=>t.projectId===e.projectId&&t.enabled).map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.hostedPonder?`Hosted Ponder`:`${e.role} / ${e.roleTargetId}`},e.id))]})]}),(0,U.jsxs)(`label`,{children:[`Runtime canary (seconds)`,(0,U.jsx)(`input`,{type:`number`,min:30,max:600,value:e.serving?.canarySeconds??120,onChange:t=>r({...e,serving:{targetId:e.serving?.targetId??``,canarySeconds:Number(t.target.value),rollbackOnRuntimeFailure:!0}})})]}),(0,U.jsx)(`p`,{children:`Saving authorizes the selected target. Failed runtime checks restore its prior model. Training runs only within the saved policy's schedule and limits.`})]}):null]})}var xe=(e,t)=>e===void 0||t===void 0?``:`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`;function Se({draft:e,onChange:t}){let n=(n,r)=>t({...e,limits:{...e.limits,[n]:r}});return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`fieldset`,{children:[(0,U.jsx)(`legend`,{children:`Run window`}),(0,U.jsxs)(`div`,{className:`agent-learning-columns`,children:[(0,U.jsxs)(`label`,{children:[`From`,(0,U.jsx)(`input`,{type:`time`,required:!0,value:xe(e.schedule.hour,e.schedule.minute),onChange:n=>{let[r,i]=n.target.value.split(`:`).map(Number);t({...e,schedule:{...e.schedule,hour:r,minute:i}})}})]}),(0,U.jsxs)(`label`,{children:[`Until`,(0,U.jsx)(`input`,{type:`time`,value:xe(e.schedule.endHour,e.schedule.endMinute),onChange:n=>{let[r,i]=n.target.value.split(`:`).map(Number),{endHour:a,endMinute:o,...s}=e.schedule;t({...e,schedule:n.target.value?{...s,endHour:r,endMinute:i}:s})}})]})]}),(0,U.jsxs)(`label`,{children:[`Timezone`,(0,U.jsx)(`input`,{required:!0,value:e.schedule.timezone,onChange:n=>t({...e,schedule:{...e.schedule,timezone:n.target.value}})})]}),(0,U.jsx)(`p`,{children:`Queued learning starts within this window. A run already started may finish afterward.`})]}),(0,U.jsxs)(`fieldset`,{children:[(0,U.jsx)(`legend`,{children:`Maximum spending`}),(0,U.jsx)(`p`,{children:`These are limits, not prices. Evaluation, answer improvements and training count toward them.`}),(0,U.jsx)(`div`,{className:`agent-learning-columns`,children:[[`perCycleUsd`,`Per run ($)`],[`dailyUsd`,`Per day ($)`],[`monthlyUsd`,`Per month ($)`]].map(([t,r])=>(0,U.jsxs)(`label`,{children:[r,(0,U.jsx)(`input`,{type:`number`,required:!0,min:.01,max:1e5,step:.01,value:e.limits[t],onChange:e=>n(t,Number(e.target.value))})]},t))})]}),(0,U.jsxs)(`details`,{children:[(0,U.jsx)(`summary`,{children:`Advanced limits`}),(0,U.jsxs)(`div`,{className:`agent-learning-columns`,children:[[[`gradeUsd`,`Per evaluation ceiling ($)`,0,1e3,.01],[`maximumTasks`,`Maximum tasks`,1,200,1],[`minimumExamples`,`Minimum training examples`,1,200,1],[`maximumAttempts`,`Maximum correction attempts`,1,5,1],[`lookbackDays`,`Uploaded history window (days)`,1,30,1]].map(([t,r,i,a,o])=>(0,U.jsxs)(`label`,{children:[r,(0,U.jsx)(`input`,{type:`number`,required:!0,min:i,max:a,step:o,value:e.limits[t],onChange:e=>n(t,Number(e.target.value))})]},t)),(0,U.jsxs)(`label`,{children:[`Maximum GPU session (hours)`,(0,U.jsx)(`input`,{type:`number`,required:!0,min:.01,max:3,step:.01,value:e.limits.maxGpuSeconds/3600,onChange:e=>n(`maxGpuSeconds`,Math.round(Number(e.target.value)*3600))})]}),(0,U.jsxs)(`label`,{children:[`Pause after failed cycles`,(0,U.jsx)(`input`,{type:`number`,required:!0,min:1,max:20,value:e.failurePolicy?.pauseAfterConsecutiveFailures??3,onChange:n=>t({...e,failurePolicy:{pauseAfterConsecutiveFailures:Number(n.target.value)}})})]})]}),(0,U.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:e.exceptions===`eligible_remainder`,onChange:n=>t({...e,exceptions:n.target.checked?`eligible_remainder`:`block`})}),`Use the independently verified remainder when exceptions occur`]})]}),(0,U.jsxs)(`details`,{children:[(0,U.jsx)(`summary`,{children:`Training data balance`}),(0,U.jsx)(`div`,{className:`agent-learning-columns`,children:[[`maximumSourceShare`,`Maximum from one agent`,100],[`maximumFailureShare`,`Maximum from one error type`,100],[`maximumLengthShare`,`Maximum from one conversation length`,100],[`replayFraction`,`Previously learned examples`,50],[`auditFraction`,`Examples checked for quality`,100]].map(([n,r,i])=>(0,U.jsxs)(`label`,{children:[r,` (%)`,(0,U.jsx)(`input`,{type:`number`,min:+!!n.startsWith(`maximum`),max:i,value:Math.round((e.selection?.[n]??0)*100),onChange:r=>t({...e,selection:{maximumSourceShare:1,maximumFailureShare:1,maximumLengthShare:1,replayFraction:.2,auditFraction:.1,...e.selection,[n]:Number(r.target.value)/100}})})]},n))})]}),e.mode===`evaluate`?null:(0,U.jsxs)(`details`,{children:[(0,U.jsx)(`summary`,{children:`Checks before using the trained model`}),(0,U.jsx)(`div`,{className:`agent-learning-columns`,children:[[`windowCasesPerCheck`,`New examples per quality check`,2,1e4],[`minimumCasesPerCheck`,`Minimum paired examples`,2,1e4],[`minimumImprovement`,`Required improvement`,1e-4,1]].map(([n,r,i,a])=>(0,U.jsxs)(`label`,{children:[r,(0,U.jsx)(`input`,{type:`number`,min:i,max:a,step:n===`minimumImprovement`?.01:1,value:e.acceptance?.[n]??i,onChange:r=>t({...e,acceptance:{minimumCasesPerCheck:20,windowCasesPerCheck:20,minimumImprovement:.05,...e.acceptance,[n]:Number(r.target.value)}})})]},n))}),(0,U.jsx)(`p`,{children:`Current and trained models use the same unseen examples. Insufficient evidence keeps the current model active.`})]})]})}function Ce({connection:e,teamId:t,projectId:n,projectName:r,initialPolicy:i,bindings:a,query:o,onClose:s}){let[c,l]=(0,H.useState)(i),[u,d]=(0,H.useState)(()=>Z(n,i,i?[]:a)),[f,p]=(0,H.useState)(!!o.data),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(!1),[v,y]=(0,H.useState)(null),[b,x]=(0,H.useState)(i?.status===`enabled`||!i),[S,w]=(0,H.useState)(`sources`),[T,E]=(0,H.useState)(!1),[D,O]=(0,H.useState)(null),A=(0,H.useRef)(f);A.current=f;let j=o.data?.policies.filter(e=>e.configuration.projectId===n)??[];(0,H.useEffect)(()=>{if(!o.data||A.current)return;let e=o.data.policies.find(e=>e.configuration.projectId===n&&e.status===`enabled`)??o.data.policies.find(e=>e.configuration.projectId===n);l(e),d(Z(n,e,e?[]:a)),x(e?.status===`enabled`||!e),p(!0)},[o.data,n,a]);let M=()=>{g||(m?E(!0):s())},P=C(M);function F(e){let t=j.find(t=>t.id===e);t&&(l(t),d(Z(n,t)),x(t.status===`enabled`),h(!1),O(null),E(!1),y(null))}function I(e){d(e),h(!0)}async function L(){if(o.data&&f&&!g&&!o.isError){_(!0),y(null);try{await ve(e,t,u,o.data,c,b),await o.refresh(),h(!1),s()}catch(e){y(e instanceof Error?e.message:`Unable to save continuous learning.`)}finally{_(!1)}}}let R={draft:u,options:o.data,loading:o.isPending,onChange:I};return(0,U.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:M,children:(0,U.jsxs)(`section`,{ref:P,className:`git-dialog provider-details-dialog agent-learning-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Continuous learning`,onMouseDown:e=>e.stopPropagation(),children:[(0,U.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close continuous learning`,disabled:g,onClick:M,children:(0,U.jsx)(k,{size:16})}),(0,U.jsx)(`div`,{className:`provider-dialog-header`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{children:`Continuous learning`}),(0,U.jsx)(`span`,{children:r})]})}),T?(0,U.jsxs)(`div`,{className:`agent-learning-discard`,role:`alert`,children:[(0,U.jsx)(`p`,{children:`Discard unsaved policy changes?`}),(0,U.jsxs)(`div`,{className:`settings-button-row`,children:[(0,U.jsx)(`button`,{type:`button`,onClick:()=>{E(!1),O(null)},children:`Keep editing`}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>D?F(D):s(),children:`Discard changes`})]})]}):null,j.length>1?(0,U.jsxs)(`label`,{className:`agent-learning-policy-picker`,children:[`Learning policy`,(0,U.jsx)(`select`,{disabled:g,value:c?.id??``,onChange:e=>{m?(O(e.target.value),E(!0)):F(e.target.value)},children:j.map(e=>(0,U.jsxs)(`option`,{value:e.id,children:[e.configuration.name,` (`,e.status,`)`]},e.id))})]}):null,(0,U.jsx)(`div`,{className:`surface-tabs provider-agent-tabs`,role:`tablist`,"aria-label":`Continuous learning settings`,children:[[`sources`,`Sources & rubrics`],[`preparation`,`Preparation`],[`schedule`,`Run window & budget`]].map(([e,t])=>(0,U.jsx)(`button`,{type:`button`,id:`learning-tab-${e}`,role:`tab`,"aria-selected":S===e,"aria-controls":`learning-panel-${e}`,tabIndex:S===e?0:-1,onClick:()=>w(e),onKeyDown:t=>{let n=[`sources`,`preparation`,`schedule`],r=n.indexOf(e);if([`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=n[t.key===`Home`?0:t.key===`End`?2:(r+(t.key===`ArrowRight`?1:2))%3];w(e),document.getElementById(`learning-tab-${e}`)?.focus()}},children:t},e))}),(0,U.jsxs)(`form`,{className:`agent-learning-form`,onSubmit:e=>{e.preventDefault(),L()},children:[(0,U.jsx)(`fieldset`,{disabled:!f||g,children:(0,U.jsxs)(`label`,{children:[`Policy name`,(0,U.jsx)(`input`,{required:!0,maxLength:200,value:u.name,onChange:e=>I({...u,name:e.target.value})})]})}),(0,U.jsx)(`div`,{id:`learning-panel-${S}`,role:`tabpanel`,"aria-labelledby":`learning-tab-${S}`,children:(0,U.jsx)(`fieldset`,{disabled:!f||g,children:S===`sources`?(0,U.jsx)(ye,{...R}):S===`preparation`?(0,U.jsx)(be,{...R}):(0,U.jsx)(Se,{...R})})}),o.isPending?(0,U.jsx)(`p`,{role:`status`,children:`Fetching available sources, rubrics and models…`}):null,o.isError?(0,U.jsx)(N,{error:o.error.message,children:(0,U.jsx)(`button`,{type:`button`,onClick:()=>void o.refetch(),children:`Retry settings`})}):null,v?(0,U.jsx)(N,{error:v}):null,(0,U.jsxs)(`label`,{className:`agent-learning-check`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:b,disabled:!f||g,onChange:e=>{x(e.target.checked),h(!0)}}),`Enable this policy after saving`]}),(0,U.jsx)(`p`,{children:`Saving enables only the reviewed sources, schedule and limits. No training is dispatched by opening this dialog.`}),(0,U.jsxs)(`div`,{className:`settings-button-row agent-learning-footer`,children:[(0,U.jsx)(`button`,{type:`button`,disabled:g,onClick:M,children:`Cancel`}),(0,U.jsx)(`button`,{type:`submit`,className:`primary`,disabled:!f||!o.data||o.isError||g||!u.sourceKeys.length,children:g?`Saving…`:b?`Save and enable`:`Save paused`})]})]})]})})}function we({agent:e,inventory:t,connection:n,teamId:r,projectId:i,projectName:a,query:o,signedIn:s}){let[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(null),[g,_]=(0,H.useState)(``),v=(0,H.useMemo)(()=>new Set(t?.collector.connections.filter(t=>t.source===e.id&&t.teamId===r&&t.projectId===i&&t.state!==`disconnected`).map(e=>e.sourceInstanceId)??[]),[t,e.id,r,i]),y=o.data?.sources.filter(t=>t.projectId===i&&(e.id===`openpond_chat`?[`native_chat`,`native_work`].includes(t.origin)&&t.sourceInstanceId===null:t.origin===e.id&&t.sourceInstanceId!==null&&v.has(t.sourceInstanceId)))??[],b=[...new Set(y.flatMap(e=>e.sourceInstanceId?[e.sourceInstanceId]:[]))],x=b.includes(g)?g:b[0],S=y.filter(e=>e.sourceInstanceId===null||e.sourceInstanceId===x).map(e=>({origin:e.origin,sourceInstanceId:e.sourceInstanceId,enabled:!0})),C=o.data?.policies.filter(e=>e.configuration.projectId===i)??[],w=C.filter(e=>e.status===`enabled`&&e.configuration.sources.some(e=>e.enabled&&S.some(t=>Y(t)===Y(e)))),T=w[0]??C.find(e=>e.status===`enabled`)??C[0],E=!!(n&&r&&i&&s&&o.data?.projects.some(e=>e.id===i));async function D(e,t){if(!n||!r||!o.data)return;let a={...e.configuration,sources:e.configuration.sources.map(e=>S.some(t=>Y(t)===Y(e))?{...e,enabled:t}:e)};if(t)for(let e of S)a.sources.some(t=>Y(t)===Y(e))||a.sources.push(e);let s=o.data.servingTargets.find(e=>e.id===a.serving?.targetId);if(t&&a.mode===`activate`&&a.serving?.targetId&&(!s||!s.enabled||s.projectId!==i))throw Error(`Review the policy's serving target before adding a source.`);if(t&&a.mode===`activate`&&(!a.serving?.targetId||s?.hostedPonder)){let e=await X(n,r,`serving-targets`,{action:`ensure_hosted_ponder`,projectId:i,bindingId:o.data.ponderBindingId});a={...a,serving:{targetId:e.id,canarySeconds:a.serving?.canarySeconds??120,rollbackOnRuntimeFailure:!0}}}return _e(n,r,e,a,a.sources.some(e=>e.enabled))}async function O(e){if(!f){p(!0),h(null);try{if(e){let e=C.find(e=>e.id===u);if(!e)throw Error(`Refresh the learning policy before joining.`);await D(e,!0),d(null)}else for(let e of w)await D(e,!1);await o.refresh()}catch(e){h(e instanceof Error?e.message:`Unable to update this learning source.`),await o.refresh()}finally{p(!1)}}}return(0,U.jsxs)(`div`,{className:`agent-learning-control`,children:[b.length>1?(0,U.jsxs)(`label`,{children:[`Learning connection`,(0,U.jsx)(`select`,{"aria-label":`${e.name} learning connection`,value:x,disabled:f,onChange:e=>_(e.target.value),children:b.map(e=>(0,U.jsx)(`option`,{value:e,children:y.find(t=>t.sourceInstanceId===e)?.name??`Local connection`},e))})]}):null,(0,U.jsxs)(`div`,{className:`agent-learning-control-row`,children:[(0,U.jsxs)(`label`,{className:`provider-toggle`,children:[(0,U.jsx)(`input`,{type:`checkbox`,"aria-label":`${e.name} continuous learning`,checked:w.length>0,disabled:!E||!S.length||o.isPending||o.isError||f,onChange:e=>{if(e.target.checked){let e=C.find(e=>e.status===`enabled`);e?d(e.id):l(!0)}else O(!1)}}),(0,U.jsx)(`span`,{"aria-hidden":`true`})]}),(0,U.jsx)(`button`,{type:`button`,className:`agent-learning-settings`,disabled:!n||!r||!i||!s||f,onClick:()=>l(!0),children:`Continuous learning`}),(0,U.jsx)(`small`,{children:o.isError?`Needs attention`:o.isPending?`Loading…`:w.length?`On schedule`:C.length?`Paused`:`Off`})]}),i&&!S.length&&o.data?(0,U.jsx)(`small`,{children:`Sync this agent to the selected Project to use its local connection.`}):null,m?(0,U.jsx)(N,{error:m}):null,c&&n&&r?(0,U.jsx)(Ce,{connection:n,teamId:r,projectId:i,projectName:a,initialPolicy:T,bindings:S,query:o,onClose:()=>l(!1)},i):null,u?(0,U.jsx)(Te,{policies:C.filter(e=>e.status===`enabled`),policyId:u,agentName:e.name,busy:f,error:m,onChoose:d,onClose:()=>{f||d(null)},onJoin:()=>void O(!0)}):null]})}function Te({policies:e,policyId:t,agentName:n,busy:r,error:i,onChoose:a,onClose:o,onJoin:s}){let c=C(o),l=e.find(e=>e.id===t);return(0,U.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:o,children:(0,U.jsxs)(`section`,{ref:c,className:`git-dialog agent-learning-join`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add learning source`,onMouseDown:e=>e.stopPropagation(),children:[(0,U.jsx)(`button`,{type:`button`,className:`git-dialog-close`,disabled:r,"aria-label":`Cancel`,onClick:o,children:(0,U.jsx)(k,{size:16})}),(0,U.jsxs)(`h2`,{children:[`Add `,n,` to `,l?.configuration.name??`continuous learning`,`?`]}),(0,U.jsx)(`p`,{children:`This agent will contribute conversations to the existing model, schedule and spending limits. Collection settings stay unchanged.`}),e.length>1?(0,U.jsxs)(`label`,{children:[`Existing policy`,(0,U.jsx)(`select`,{value:t,disabled:r,onChange:e=>a(e.target.value),children:e.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.configuration.name},e.id))})]}):null,i?(0,U.jsx)(N,{error:i}):null,(0,U.jsxs)(`div`,{className:`settings-button-row`,children:[(0,U.jsx)(`button`,{type:`button`,disabled:r,onClick:o,children:`Cancel`}),(0,U.jsx)(`button`,{type:`button`,className:`primary`,disabled:r||!l,onClick:s,children:r?`Adding…`:`Add agent`})]})]})})}function Ee({connection:e,payload:t,onPayload:n,onToast:r}){let{inventory:i,error:a,loading:o,refresh:s}=re(e),[c,l]=(0,H.useState)(null),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(0),m=`openpond-agent-cards:${JSON.stringify(t?.account.activeProfile??null)}`,[g,_]=(0,H.useState)(()=>{try{let e=JSON.parse(localStorage.getItem(m)??`null`);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&B.some(t=>t.id===e)):[`oh_my_pi`]}catch{return[`oh_my_pi`]}});(0,H.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify(g))}catch{}},[m,g]);let[v,y]=(0,H.useState)(!1),b=(0,H.useRef)(null);(0,H.useEffect)(()=>{if(!v)return;let e=e=>{b.current?.contains(e.target)||y(!1)},t=e=>{e.key===`Escape`&&(y(!1),b.current?.querySelector(`button`)?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[v]);let x=(0,H.useRef)({payload:t,onPayload:n});x.current={payload:t,onPayload:n};let S=(0,H.useRef)(!0);(0,H.useEffect)(()=>(S.current=!0,()=>{S.current=!1}),[]);let C=t?.account??null,w=t?.preferences.defaultTeamId??C?.accounts.find(e=>e.isActive)?.apiKeyAccess?.teamId??null,k=(0,H.useCallback)(e=>{l(e),e&&r?.(e,`error`)},[r]),A=(0,H.useCallback)(e=>{let t=x.current;S.current&&t.payload&&t.onPayload({...t.payload,providers:e})},[]),P=(0,H.useCallback)((e,t)=>{let n=x.current;if(!S.current||!n.payload)return;let r=n.payload.providers,i={...n.payload,providers:{...r,statuses:{...r.statuses,[e]:t.statuses[e]},modelCaches:{...r.modelCaches,[e]:t.modelCaches[e]}}};x.current={...n,payload:i},n.onPayload(i)},[]);ae(e,t?.providers,P,f);let F=(0,H.useCallback)(e=>{let t=x.current;t.payload&&t.onPayload({...t.payload,preferences:e.preferences})},[]),I=E({connection:e,onError:k,onPayload:n,onPreferences:F,onProviders:A,preferences:h(t?.preferences),providers:t?.providers}),L=ue(e,C,w),{projects:R,projectId:z,loading:ee,error:te}=L,ne=ge(e,w,JSON.stringify([C?.activeProfile??null,C?.profile?.id??null]),C?.state===`signed_in`),V=C?.baseUrl??C?.activeProfile?.baseUrl,W=V&&w?`${V.replace(/\/$/u,``)}/console/connections?${new URLSearchParams({teamId:w,...z?{project:z}:{}})}`:null,G=u?.provider,K=G?t?.providers.statuses[G]:null,q=u?(0,U.jsx)(me,{agent:u,inventory:i,connection:e,account:C,teamId:w,projects:R,projectId:z,onRefresh:s,learningUrl:W},u.id):null;return(0,U.jsxs)(`section`,{className:`connected-agents-view`,"aria-label":`Continuous learning`,children:[(0,U.jsxs)(`div`,{className:`agent-connections-heading`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{children:`Continuous learning`}),(0,U.jsx)(`p`,{children:`Sync conversations from your installed agents and configure continuous learning.`})]}),(0,U.jsxs)(`div`,{className:`agent-connections-actions`,children:[(0,U.jsx)(`button`,{type:`button`,disabled:o||!e,"aria-label":`Refresh agent connections`,onClick:()=>{s(),L.refresh(),p(e=>e+1)},children:(0,U.jsx)(O,{size:15})}),(0,U.jsxs)(`div`,{className:`agent-more`,ref:b,children:[(0,U.jsx)(`button`,{type:`button`,"aria-expanded":v,onClick:()=>y(e=>!e),children:`More agents`}),v?(0,U.jsxs)(`div`,{className:`agent-more-menu`,children:[B.filter(e=>g.includes(e.id)).map(e=>(0,U.jsxs)(`button`,{type:`button`,onClick:()=>{_(t=>t.filter(t=>t!==e.id)),y(!1)},children:[(0,U.jsx)(D,{size:14}),(0,U.jsx)(`span`,{children:e.name})]},e.id)),g.length===0?(0,U.jsx)(`span`,{children:`All agents shown`}):null]}):null]})]})]}),(0,U.jsxs)(`label`,{className:`agent-project-scope`,children:[`Project`,(0,U.jsx)(j,{label:`Connections project`,value:z,disabled:!R.length,onChange:L.select,searchable:!0,options:[{value:``,label:ee&&!R.length?`Fetching projects…`:`Select project`},...R.map(e=>({value:e.id,label:e.content.name}))]})]}),te?(0,U.jsx)(N,{error:te}):null,a?(0,U.jsx)(N,{error:a}):null,c?(0,U.jsx)(N,{error:c}):null,(0,U.jsx)(`div`,{className:`agent-connections-grid`,children:B.filter(e=>!g.includes(e.id)).map(n=>(0,U.jsx)(ie,{agent:n,account:C,native:n.provider?t?.providers.statuses[n.provider]:null,inventory:i,projects:R,teamId:w,learningControl:(0,U.jsx)(we,{agent:n,inventory:i,connection:e,teamId:w,projectId:z,projectName:R.find(e=>e.id===z)?.content.name??`Selected Project`,query:ne,signedIn:C?.state===`signed_in`}),connected:!!e,onHide:()=>_(e=>[...e,n.id]),onManage:()=>d(n)},`${JSON.stringify([C?.activeProfile,C?.profile?.id])}:${w}:${z}:${n.id}`))}),i?(0,U.jsxs)(`div`,{className:`agent-importer-footer`,children:[(0,U.jsx)(`span`,{children:i.collector.running?`Import in progress`:`No import running`}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>M({kind:`settings`,section:`conversation-imports`}),children:`Conversation import settings`})]}):null,u&&G&&K&&t?(0,U.jsx)(T,{checkNativeProvider:I.checkNativeProvider,connection:e,account:C,codex:t.codex,providerId:G,providerBusy:I.providerBusy,settings:t.providers,status:K,onClose:()=>d(null),onDeleteCredential:I.deleteProviderCredential,onRefreshModels:I.refreshProviderModels,onSaveConfig:I.saveProviderConfig,onSaveCredential:I.saveProviderCredential,onStartOpenAiSubscriptionAuth:I.startOpenAiSubscriptionAuth,onValidate:I.validateProvider,conversationPanel:q}):u?(0,U.jsx)(De,{agent:u,onClose:()=>d(null),children:q}):null]})}function De({agent:e,onClose:t,children:n}){let r=C(t);return(0,U.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,onMouseDown:t,children:(0,U.jsxs)(`section`,{ref:r,className:`git-dialog provider-details-dialog agent-setup-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`${e.name} connection`,onMouseDown:e=>e.stopPropagation(),children:[(0,U.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close`,onClick:t,children:(0,U.jsx)(k,{size:16})}),(0,U.jsx)(`div`,{className:`provider-dialog-header`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{children:e.name}),(0,U.jsx)(`span`,{children:`Conversation syncing`})]})}),n]})})}var Oe=[`For agents`,`Featured`,`Productivity`,`Developer tools`],ke=new Set([`slack`,`google`,`github`,`mcp`]);function Ae({account:e,connection:t,defaultTeamId:n,onToast:r,payload:i,onPayload:a}){let[o,s]=(0,H.useState)(`apps`),c=(0,H.useId)(),[l,u]=(0,H.useState)(null),[d,f]=(0,H.useState)(``),[p,m]=(0,H.useState)(`For agents`),[h,g]=(0,H.useState)(()=>I()),[_,v]=(0,H.useState)(null),y=e?.baseUrl??e?.activeProfile?.baseUrl??null,b=je(n,_),x=(0,H.useMemo)(()=>h.filter(e=>Pe(e,p)).filter(e=>Fe(e,d)),[p,d,h]);(0,H.useEffect)(()=>{let e=!0;return!t||o!==`apps`?(g(I()),v(null),()=>{e=!1}):(ee.connectedAppStatus(t,{status:`all`}).then(t=>{e&&(g(t.apps),v(t.teamId?.trim()||null))}).catch(t=>{e&&(console.warn(`Unable to load connected app status.`,t),g(I()),v(null))}),()=>{e=!1})},[t,o]);function S(e){Le(z({appId:e.id,baseUrl:y,teamId:b})).catch(e=>{r?.(e instanceof Error?e.message:String(e),`error`)})}return(0,U.jsxs)(`div`,{className:`apps-workspace-view`,children:[(0,U.jsx)(`div`,{className:`apps-page-tabs`,role:`tablist`,"aria-label":`Apps pages`,onKeyDown:e=>{if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=e.key===`Home`?`apps`:e.key===`End`?`agents`:o===`agents`?`apps`:`agents`;s(t),e.currentTarget.querySelector(`#${CSS.escape(`${c}-${t}`)}`)?.focus()},children:[{value:`apps`,label:`Apps`},{value:`agents`,label:`Continuous learning`}].map(e=>(0,U.jsx)(`button`,{type:`button`,role:`tab`,id:`${c}-${e.value}`,"aria-controls":`${c}-${e.value}-panel`,tabIndex:o===e.value?0:-1,"aria-selected":o===e.value,onClick:()=>s(e.value),children:e.label},e.value))}),(0,U.jsx)(`div`,{role:`tabpanel`,id:`${c}-${o}-panel`,"aria-labelledby":`${c}-${o}`,children:o===`agents`?(0,U.jsx)(Ee,{connection:t,payload:i,onPayload:a,onToast:r},JSON.stringify([e?.activeProfile,n])):(0,U.jsxs)(`section`,{className:`connected-apps-view`,"aria-label":`Apps`,children:[(0,U.jsxs)(`div`,{className:`connected-apps-header`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h1`,{children:`Apps`}),(0,U.jsx)(`p`,{children:`Connect apps that agents can use for chat, knowledge, files, and workflow actions.`})]}),(0,U.jsxs)(`label`,{className:`connected-apps-search`,children:[(0,U.jsx)(R,{size:15}),(0,U.jsx)(`input`,{"aria-label":`Search apps`,onChange:e=>f(e.target.value),placeholder:`Search apps`,type:`search`,value:d})]})]}),(0,U.jsxs)(`section`,{className:`connected-apps-hero`,"aria-label":`App context`,children:[(0,U.jsxs)(`div`,{className:`connected-apps-hero-copy`,children:[(0,U.jsx)(`span`,{className:`connected-apps-hero-icon`,children:(0,U.jsx)($,{appId:`github`})}),(0,U.jsx)(`h2`,{children:`Work with your apps`}),(0,U.jsx)(`p`,{children:`Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond.`})]}),(0,U.jsxs)(`div`,{className:`connected-apps-context-card`,"aria-hidden":`true`,children:[(0,U.jsx)(`strong`,{children:`Agent context`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`files`,children:`Files`}),(0,U.jsx)(`span`,{className:`chat`,children:`Chat`}),(0,U.jsx)(`span`,{className:`oauth`,children:`OAuth`}),(0,U.jsx)(`span`,{className:`mcp`,children:`MCP`})]})]})]}),(0,U.jsx)(`div`,{className:`connected-apps-filters`,role:`tablist`,"aria-label":`App categories`,children:Oe.map(e=>(0,U.jsx)(`button`,{"aria-selected":p===e,className:p===e?`active`:``,onClick:()=>m(e),role:`tab`,type:`button`,children:e},e))}),(0,U.jsxs)(`div`,{className:`connected-apps-list`,children:[x.map(e=>(0,U.jsx)(Me,{app:e,onSelect:()=>u(e)},e.id)),x.length===0?(0,U.jsx)(`div`,{className:`connected-apps-empty`,children:`No apps match the current search.`}):null]}),l?(0,U.jsx)(Ne,{app:l,onClose:()=>u(null),onInstall:()=>S(l)}):null]})})]})}function je(e,t){return e?.trim()||t?.trim()||null}function Me({app:e,onSelect:t}){return(0,U.jsxs)(`button`,{className:`connected-app-row`,onClick:t,type:`button`,children:[(0,U.jsxs)(`span`,{className:`connected-app-row-main`,children:[(0,U.jsx)($,{appId:e.id}),(0,U.jsxs)(`span`,{className:`connected-app-copy`,children:[(0,U.jsxs)(`span`,{className:`connected-app-title`,children:[(0,U.jsx)(`strong`,{children:e.label}),(0,U.jsxs)(`span`,{children:[e.shortLabel===e.label?e.category:e.shortLabel,` / `,e.setupSurfaceLabel]})]}),(0,U.jsx)(`span`,{children:e.description}),(0,U.jsxs)(`span`,{className:`connected-app-capability-row`,children:[e.capabilityLabels.slice(0,2).map(e=>(0,U.jsx)(`span`,{children:e},e)),e.capabilityLabels.length>2?(0,U.jsxs)(`span`,{children:[`+`,e.capabilityLabels.length-2]}):null]})]})]}),(0,U.jsx)(`span`,{className:`connected-app-status-pill ${e.status}`,children:e.statusLabel}),(0,U.jsx)(x,{size:16})]})}function Ne({app:e,onClose:t,onInstall:n}){let r=e.connections.filter(e=>e.status===`active`);return(0,U.jsx)(`div`,{className:`connected-app-dialog-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&t()},children:(0,U.jsxs)(`section`,{className:`connected-app-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`connected-app-dialog-title`,children:[(0,U.jsx)(`button`,{className:`connected-app-dialog-close`,type:`button`,"aria-label":`Close app details`,onClick:t,children:(0,U.jsx)(k,{size:17})}),(0,U.jsxs)(`div`,{className:`connected-app-dialog-identity`,children:[(0,U.jsx)(`span`,{className:`openpond-mark`,children:(0,U.jsx)(`img`,{alt:``,src:i})}),(0,U.jsxs)(`span`,{className:`connection-dots`,"aria-hidden":`true`,children:[(0,U.jsx)(`span`,{}),(0,U.jsx)(`span`,{}),(0,U.jsx)(`span`,{})]}),(0,U.jsx)($,{appId:e.id})]}),(0,U.jsxs)(`h2`,{id:`connected-app-dialog-title`,children:[`Connect `,e.label]}),(0,U.jsxs)(`div`,{className:`connected-app-approval`,children:[(0,U.jsx)(L,{size:16}),(0,U.jsx)(`span`,{children:e.statusLabel})]}),(0,U.jsxs)(`div`,{className:`connected-app-dialog-body`,children:[(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{children:e.setupSurfaceLabel}),(0,U.jsx)(`p`,{children:`The web flow shows the provider account, workspace, and requested access before anything is connected.`})]}),(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{children:`Connected account`}),(0,U.jsx)(`p`,{children:Re(r)})]}),(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{children:`Available capabilities`}),(0,U.jsx)(`div`,{className:`connected-app-dialog-capabilities`,children:e.capabilities.map(e=>(0,U.jsx)(`span`,{children:e.label},e.id))})]}),(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{children:`Sandbox lease policy`}),(0,U.jsx)(`p`,{children:e.leasePolicy.leaseable?`Leaseable for ${e.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:`Managed as setup or tool discovery; no OAuth lease is required.`})]})]}),(0,U.jsxs)(`button`,{className:`connected-app-dialog-primary`,type:`button`,onClick:n,children:[(0,U.jsx)(`span`,{children:e.installLabel}),(0,U.jsx)(S,{size:15})]})]})})}function $({appId:e}){return(0,U.jsx)(`span`,{className:`connected-app-icon app-${e}`,children:(0,U.jsx)(`img`,{alt:``,src:Ie(e)})})}function Pe(e,t){return t===`For agents`?!0:t===`Featured`?ke.has(e.id):t===`Productivity`?e.category===`Productivity`||e.category===`Chat`:e.category===`Developer tools`||e.id===`mcp`}function Fe(e,t){let n=t.trim().toLowerCase();return!n||[e.id,e.label,e.shortLabel,e.category,e.description,e.providerFamily,e.setupSurface].some(e=>e.toLowerCase().includes(n))}function Ie(e){return n(e)}async function Le(e){let t=window.openpond?.browser;if(t){let n=await t.openExternal({conversationId:`connected-apps`,url:e});if(!n.ok)throw Error(n.error??`Unable to open app setup.`)}else window.open(e,`_blank`,`noopener,noreferrer`)}function Re(e){return e.length===0?`No active OAuth connection for this setup surface.`:e.map(e=>{let t=e.accountLabel??`Connected account`;return e.workspaceLabel?`${t} / ${e.workspaceLabel}`:t}).join(`, `)}export{Ae as AppsView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{t as r}from"./createLucideIcon-DmttVQ_a.js";import{N as i}from"./training-model-data-14942K_Z.js";import{t as a}from"./copy-DR4ielPn.js";import{t as o}from"./x-IPhrr4ju.js";import{n as s}from"./AppToastContext-DZLErwj0.js";import{Ht as c,ln as l,rn as u}from"./App-DHJVXTI2.js";import{B as d,b as f,t as p,x as m}from"./MainPane-2dj6Dg4l.js";var h=r(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),g=e(t(),1),_=n();function v({active:e,onBounds:t}){let n=(0,g.useRef)(null),r=(0,g.useRef)(null),i=(0,g.useRef)(null),a=(0,g.useCallback)(e=>{let n=e?`${e.x}:${e.y}:${e.width}:${e.height}`:`null`;r.current!==n&&(r.current=n,t(e))},[t]),o=(0,g.useCallback)(()=>{let t=n.current;if(!e||!t){a(null);return}let r=t.getBoundingClientRect(),i=Math.max(0,Math.round(r.width)),o=Math.max(0,Math.round(r.height));a(i===0||o===0?null:{x:Math.round(r.left),y:Math.round(r.top),width:i,height:o})},[e,a]),s=(0,g.useCallback)(()=>{i.current===null&&(i.current=window.requestAnimationFrame(()=>{i.current=null,o()}))},[o]);return(0,g.useLayoutEffect)(()=>{r.current=null,o();let t=n.current;if(!e||!t)return a(null),()=>a(null);let c=new ResizeObserver(s);return c.observe(t),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{i.current!==null&&(window.cancelAnimationFrame(i.current),i.current=null),c.disconnect(),window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0),a(null)}},[e,a,o,s]),(0,_.jsx)(`div`,{className:`browser-viewport`,ref:n,hidden:!e})}function y({available:e,busy:t,onCapture:n,onCancel:r}){let[i,a]=(0,g.useState)(!1),s=(0,g.useRef)(null);return(0,g.useEffect)(()=>{if(!i)return;let e=e=>{s.current?.contains(e.target)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[i]),(0,_.jsxs)(`div`,{className:`browser-menu-anchor`,ref:s,children:[(0,_.jsx)(`button`,{type:`button`,title:t?`Cancel snapshot`:`Take snapshot`,"aria-label":t?`Cancel snapshot`:`Take snapshot`,disabled:!e&&!t,"aria-haspopup":t?void 0:`menu`,"aria-expanded":i,onClick:()=>t?r():a(e=>!e),children:t?(0,_.jsx)(o,{size:15}):(0,_.jsx)(h,{size:15})}),i?(0,_.jsxs)(`div`,{className:`browser-options-menu browser-snapshot-menu`,role:`menu`,"aria-label":`Snapshot options`,children:[(0,_.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{a(!1),n(`page`)},children:`Full page snapshot`}),(0,_.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{a(!1),n(`node`)},children:`Select an element…`})]}):null]})}function b({image:e,onClose:t}){let n=s(),r=e.source?.length===64e3?`HTML excerpt`:`HTML`;async function c(){let t=`${e.selector.replace(/[^a-z0-9._-]+/gi,`-`).slice(0,80)||`snapshot`}.png`;if(window.openpond?.files?.saveImage){let r=await window.openpond.files.saveImage({url:e.dataUrl,suggestedName:t});!r.ok&&!r.canceled&&n?.(r.error??`Snapshot could not be saved.`,`error`)}else{let n=document.createElement(`a`);n.href=e.dataUrl,n.download=t,n.click()}}return(0,_.jsxs)(`section`,{className:`browser-snapshot-preview`,"aria-label":`Snapshot preview`,children:[(0,_.jsxs)(`div`,{className:`html-visual-toolbar`,children:[(0,_.jsxs)(`span`,{children:[e.selector,` · `,e.width,` × `,e.height]}),e.source?(0,_.jsx)(`button`,{type:`button`,"aria-label":`Copy ${r}`,title:`Copy ${r}`,onClick:()=>void i(e.source),children:(0,_.jsx)(a,{size:15})}):null,(0,_.jsx)(`button`,{type:`button`,"aria-label":`Save snapshot PNG`,title:`Save snapshot PNG`,onClick:()=>void c(),children:(0,_.jsx)(l,{size:15})}),(0,_.jsx)(`button`,{type:`button`,"aria-label":`Close snapshot`,title:`Close snapshot`,onClick:t,children:(0,_.jsx)(o,{size:15})})]}),(0,_.jsx)(`div`,{className:`browser-snapshot-image`,children:(0,_.jsx)(`img`,{src:e.dataUrl,alt:`Snapshot of ${e.selector}`})}),e.source?(0,_.jsxs)(`details`,{children:[(0,_.jsx)(`summary`,{children:r}),(0,_.jsx)(`pre`,{children:e.source})]}):null]})}function x(e,t,n,r){let[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(null),u=(0,g.useRef)(0),d=(0,g.useRef)(null),f=(0,g.useCallback)(()=>{u.current++,d.current?.(),d.current=null,a(null)},[]);return(0,g.useEffect)(()=>(s(null),l(null),f),[e,t,n,f]),(0,g.useEffect)(()=>{if(i!==`node`)return;let e=e=>{e.key===`Escape`&&f()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,f]),{busy:i,image:o,error:c,capture:(0,g.useCallback)(async i=>{f();let o=u.current;s(null),l(null),a(i);try{let a=window.openpond?.browser;if(!a)throw Error(`Snapshots are available in the desktop app.`);let c;if(n){let e=r.current;if(!e)throw Error(`Wait for the HTML page to finish loading.`);d.current=()=>e.cancel();let t=await e.capture(i);if(o!==u.current)return;c=await a.captureHtml(t)}else{if(!t)throw Error(`Open a browser page before taking a snapshot.`);let n={conversationId:e,tabId:t};d.current=()=>{a.cancelCapture(n)},c=await a.capturePage({...n,mode:i})}if(o!==u.current)return;c.ok?s(c.image):c.canceled||l(c.error)}catch(e){o===u.current&&!(e instanceof DOMException&&e.name===`AbortError`)&&l(e instanceof Error?e.message:`Snapshot failed.`)}finally{o===u.current&&(a(null),d.current=null)}},[f,e,t,n,r]),cancel:f,close:()=>s(null)}}function S({conversationId:e,expanded:t,onResizeStart:n,connection:r=null,visualTabs:i}){let a=m(e),[o,s]=(0,g.useState)({}),l=i?.tabs.find(e=>e.publicationId===i.activeId),h=(0,g.useRef)(null),S=x(e,a.activeTab?.id??null,l?.publicationId??null,h),C=(i?.tabs??[]).map(e=>({id:e.publicationId,url:`${e.output.title}.html`,title:e.output.title,faviconUrl:null,loading:!1,canGoBack:!1,canGoForward:!1,error:null})),w=C.find(e=>e.id===l?.publicationId),T=(0,g.useCallback)(t=>{window.openpond?.browser?.setBounds({conversationId:e,bounds:t})},[e]),E=(0,g.useCallback)(e=>{i?.showBrowser(),a.open(e,{explicitFile:!0})},[a,i]),D=(0,g.useCallback)(()=>{window.confirm(`Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.`)&&a.clearData()},[a]);return(0,_.jsxs)(`aside`,{className:`workspace-diff-panel browser-sidebar-panel ${t?`expanded`:``} ${S.busy===`node`||S.error?`has-capture-status`:``}`,"aria-label":`Browser`,children:[!t&&(0,_.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize browser panel`,onPointerDown:n}),(0,_.jsx)(p,{activeTabId:l?.publicationId??a.state.activeTabId,tabs:[...a.state.tabs,...C],onCloseTab:e=>{C.some(t=>t.id===e)?i?.close(e):a.closeTab(e)},onNewTab:()=>{i?.showBrowser(),a.newTab()},onSelectTab:e=>{C.some(t=>t.id===e)?i?.select(e):(i?.showBrowser(),a.selectTab(e))}}),(0,_.jsx)(f,{activeTab:w??a.activeTab,documentName:w?.url,available:a.available,snapshotActions:(0,_.jsx)(y,{available:!S.image&&!!(l?window.openpond?.browser?.captureHtml:a.activeTab&&!a.activeTab.loading&&window.openpond?.browser?.capturePage),busy:!!S.busy,onCapture:e=>void S.capture(e),onCancel:S.cancel}),onBack:()=>void a.back(),onClearData:D,onForward:()=>void a.forward(),onNavigate:E,onOpenExternal:()=>void a.openExternal(),onReload:()=>{l?s(e=>({...e,[l.publicationId]:(e[l.publicationId]??0)+1})):a.reload()},onStop:()=>void a.stop()}),S.busy===`node`?(0,_.jsx)(`p`,{className:`browser-snapshot-status`,role:`status`,children:`Hover to highlight an element, then click to capture it. Press Esc to cancel.`}):null,S.error?(0,_.jsx)(c,{error:S.error}):null,(0,_.jsxs)(`div`,{className:`browser-content`,children:[S.image?(0,_.jsx)(b,{image:S.image,onClose:S.close}):null,i?.tabs.map(e=>(0,_.jsx)(`div`,{className:`browser-visual-document`,role:`tabpanel`,"aria-label":e.output.title,hidden:!!S.image||e.publicationId!==l?.publicationId,children:(0,_.jsx)(d,{visual:e,connection:r,expanded:!0,snapshotRef:e.publicationId===l?.publicationId?h:void 0},o[e.publicationId]??0)},e.publicationId)),!l&&!a.available?(0,_.jsxs)(`div`,{className:`browser-empty-state`,children:[(0,_.jsx)(u,{size:18}),(0,_.jsx)(`span`,{children:`Desktop browser bridge unavailable.`})]}):!l&&a.state.tabs.length===0?(0,_.jsxs)(`div`,{className:`browser-empty-state`,children:[(0,_.jsx)(u,{size:18}),(0,_.jsx)(`span`,{children:`Enter a URL to open a browser tab for this conversation.`})]}):null,(0,_.jsx)(v,{active:!S.image&&!l&&a.available&&a.state.tabs.length>0,onBounds:T})]})]})}export{S as BrowserSidebar};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{wn as r}from"./App-DHJVXTI2.js";import{N as i,V as a}from"./MainPane-2dj6Dg4l.js";var o=e(t(),1);function s(e,t,n){return new Set(e.filter(e=>{if(t.has(e.id))return!1;if(n===void 0)return!0;if(typeof e.timestamp!=`string`)return!1;let r=Date.parse(e.timestamp);return Number.isFinite(r)&&r>=n}).map(e=>e.id))}function c(e){let t=null;for(let n of e){if(typeof n.timestamp!=`string`)continue;let e=Date.parse(n.timestamp);Number.isFinite(e)&&(t=t===null?e:Math.max(t,e))}return t}function l(e,t){let n=(0,o.useRef)({scopeKey:t,ids:new Set(e.map(e=>e.id)),initialized:!1,liveCutoff:null}),r=n.current.scopeKey===t,i=r&&n.current.initialized?s(e,n.current.ids,n.current.liveCutoff??void 0):new Set;return(0,o.useLayoutEffect)(()=>{let r=n.current,i=r.scopeKey!==t,a=Date.now();n.current={scopeKey:t,ids:new Set(e.map(e=>e.id)),initialized:!i,liveCutoff:i?Math.max(a,c(e)??0):r.liveCutoff??Math.max(a,c(e)??0)}},[e,r,t]),i}var u=new Map,d=[200,600,1500];function f({connection:e,latestTurnId:t,sessionId:n,turnRunning:i}){let[a,s]=(0,o.useState)(()=>({sessionId:null,summaries:u}));return(0,o.useEffect)(()=>{if(!e||!n)return;let a=!1,o=null,c=i?null:t,l=e=>{let t=d[e];t===void 0||a||(o=setTimeout(()=>void u(e+1),t))},u=async t=>{try{let i=await r.usageTurnCache(e,n);if(a)return;let o=new Map(i.turns.map(e=>[e.turnId,e]));s({sessionId:n,summaries:o}),c&&!o.has(c)&&l(t)}catch{l(t)}};return u(0),()=>{a=!0,o!==null&&clearTimeout(o)}},[e,t,n,i]),a.sessionId===n?a.summaries:u}var p=n();function m({row:e,renderMessage:t}){let[n,r]=(0,o.useState)(!1),s=(0,o.useId)();return e.type===`thinking`?(0,p.jsx)(i,{}):e.type===`message`?t(e):(0,p.jsxs)(`div`,{className:`chat-work-history`,children:[(0,p.jsx)(a,{className:`chat-work-history-summary`,controls:s,expanded:n,onToggle:()=>r(e=>!e),children:e.label}),n?(0,p.jsx)(`div`,{className:`chat-work-history-content`,id:s,children:e.messages.map(e=>(0,p.jsx)(`div`,{children:t(e)},e.id))}):null]})}export{f as n,l as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import{h as r,m as i}from"./app-models-BviS9b7U.js";import"./icons-CK5-nxVC.js";import{E as a,Wt as o,Zt as s,dn as c,en as l,qt as u,sn as d,xn as f}from"./App-DHJVXTI2.js";var p=e(t(),1),m=n();function h({open:e,query:t,projects:n,sessions:r,onQueryChange:h,onClose:v,onNewChat:x,onOpenProject:S,onOpenSession:C}){let w=t.trim().toLowerCase(),T=(0,p.useMemo)(()=>g(r,w,10),[w,r]),E=(0,p.useMemo)(()=>_(n,w,8),[w,n]);if(!e)return null;let D=()=>{let e=E[0];if(e){S(e);return}let t=T[0];t&&C(t)};return(0,m.jsx)(`div`,{className:`command-overlay`,role:`presentation`,onMouseDown:v,children:(0,m.jsxs)(`section`,{className:`command-menu`,role:`dialog`,"aria-modal":`true`,"aria-label":`Search chats and projects`,onMouseDown:e=>e.stopPropagation(),children:[(0,m.jsxs)(`div`,{className:`command-input-row`,children:[(0,m.jsx)(u,{size:17}),(0,m.jsx)(`input`,{autoFocus:!0,value:t,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),D()),e.key===`Escape`&&(e.preventDefault(),v())},placeholder:`Search chats and projects`}),(0,m.jsx)(`kbd`,{children:`Esc`})]}),(0,m.jsxs)(`div`,{className:`command-results`,children:[(0,m.jsxs)(`button`,{className:`command-result command-create`,onClick:x,children:[(0,m.jsx)(o,{size:15}),(0,m.jsx)(`span`,{children:`New local task`}),(0,m.jsx)(`small`,{children:`General`})]}),(0,m.jsxs)(b,{label:`Projects`,children:[E.map(e=>(0,m.jsxs)(`button`,{className:`command-result`,onClick:()=>S(e),children:[i(e)?(0,m.jsx)(c,{size:15}):(0,m.jsx)(d,{size:15}),(0,m.jsx)(`span`,{children:e.project.name}),(0,m.jsx)(`small`,{children:y(e)})]},e.project.id)),E.length===0&&(0,m.jsx)(`div`,{className:`command-empty`,children:`No projects found`})]}),(0,m.jsxs)(b,{label:`Chats`,children:[T.map(e=>(0,m.jsxs)(`button`,{className:`command-result`,onClick:()=>C(e),children:[e.pinned?(0,m.jsx)(s,{size:15}):e.savedForLater?(0,m.jsx)(f,{size:15}):(0,m.jsx)(l,{size:15}),(0,m.jsx)(`span`,{children:e.title}),(0,m.jsx)(`small`,{children:e.appName??a(e.updatedAt)})]},e.id)),T.length===0&&(0,m.jsx)(`div`,{className:`command-empty`,children:`No chats found`})]})]})]})})}function g(e,t,n){let r=[];for(let i of e)if((!t||`${i.title} ${i.appName??``}`.toLowerCase().includes(t))&&(r.push(i),r.length>=n))break;return r}function _(e,t,n){let r=[];for(let i of e)if((!t||v(i).toLowerCase().includes(t))&&(r.push(i),r.length>=n))break;return r}function v(e){return r(e)?`${e.project.name} ${e.project.path} ${e.project.workspacePath}`:`${e.project.name} ${e.project.sourceLabel??``} ${e.project.organizationName??``}`}function y(e){return i(e)?e.project.organizationName??`Cloud Project`:e.project.linkedOpenPondApp?`OpenPond project`:e.project.source===`git`?`Local Git`:`Local folder`}function b({label:e,children:t}){return(0,m.jsxs)(`div`,{className:`command-group`,children:[(0,m.jsx)(`div`,{className:`command-group-label`,children:e}),t]})}export{h as CommandMenu};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{T as r}from"./training-model-data-14942K_Z.js";import{t as i}from"./x-IPhrr4ju.js";import{Xn as a}from"./App-DHJVXTI2.js";import{n as o,r as s,t as c}from"./AttachmentTypeIcon-CpMSfHCK.js";function l(e){return e?(e.match(/\r\n|\r|\n/g)?.length??0)+ +!/(?:\r\n|\r|\n)$/.test(e):0}var u=e(t(),1),d=n(),f=new Set([`csv`,`css`,`html`,`js`,`json`,`jsx`,`log`,`md`,`mdx`,`py`,`sql`,`svg`,`ts`,`tsx`,`txt`,`xml`,`yaml`,`yml`]),p=/^Pasted text(?: (\d+))?\.txt$/;function m(e,t){if(e.length<2e3)return null;let n=new Set;for(let e of t){let t=p.exec(e.name);t&&n.add(t[1]?Number(t[1]):1)}let r=1;for(;n.has(r);)r+=1;let i=r===1?`Pasted text.txt`:`Pasted text ${r}.txt`;return new File([e],i,{type:`text/plain`})}function h({attachment:e,onRemove:t}){let[n,a]=(0,u.useState)(!1),f=(0,u.useRef)(null),p=(0,u.useCallback)(()=>{a(!1),f.current?.focus()},[]),[m,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(e.kind!==`text`)return;let t=!1;return e.file.text().then(e=>{t||h(l(e))},()=>void 0),()=>{t=!0}},[e.file,e.kind]);let g=e.kind!==`image`;return(0,d.jsxs)(`div`,{className:`composer-attachment-card ${e.kind}`,children:[e.kind===`image`&&e.previewUrl?(0,d.jsx)(`button`,{ref:f,type:`button`,className:`composer-attachment-thumb composer-attachment-preview`,"aria-label":`Preview ${e.name}`,title:`Preview ${e.name}`,onClick:()=>a(!0),children:(0,d.jsx)(`img`,{alt:``,decoding:`async`,src:e.previewUrl})}):(0,d.jsx)(`div`,{className:`composer-attachment-thumb`,"aria-hidden":`true`,children:(0,d.jsx)(c,{attachment:e,size:22})}),(0,d.jsx)(r,{open:n,src:e.previewUrl??null,title:e.name,onClose:p}),g?(0,d.jsxs)(`div`,{className:`composer-attachment-meta`,children:[(0,d.jsx)(`strong`,{children:e.name}),(0,d.jsx)(`span`,{children:e.kind===`text`&&m!==null?s(m):o(e)})]}):null,(0,d.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`Remove ${e.name}`,onClick:t,children:(0,d.jsx)(i,{size:14})})]})}function g(){return globalThis.crypto?.randomUUID?.()??`attachment-${Date.now()}-${Math.random().toString(36).slice(2)}`}function _(e){if(e.type.startsWith(`image/`))return`image`;if(e.type.startsWith(`text/`))return`text`;let t=e.name.split(`.`).pop()?.toLowerCase()??``;return f.has(t)?`text`:`file`}async function v(e){let[t,n]=await Promise.all([b(e.file),e.kind===`text`?x(e.file):Promise.resolve(void 0)]);return{id:e.id,name:e.name,mediaType:e.mediaType,sizeBytes:e.sizeBytes,kind:e.kind,...n===void 0?{}:{lineCount:l(n)},...e.relativePath?{relativePath:e.relativePath}:{},contentsBase64:t,...n?{text:S(n)}:{}}}function y(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=e/1024;for(let e of t){if(n<1024)return`${n.toFixed(n>=10?0:1)} ${e}`;n/=1024}return`${n.toFixed(0)} TB`}function b(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let[,e=``]=(typeof r.result==`string`?r.result:``).split(`,`,2);t(e)},r.onerror=()=>n(r.error??Error(`Failed to read file`)),r.readAsDataURL(e)})}function x(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(typeof r.result==`string`?r.result:``),r.onerror=()=>n(r.error??Error(`Failed to read file`)),r.readAsText(e)})}function S(e){return e.length<=a.maxTextChars?e:`${e.slice(0,Math.max(0,a.maxTextChars-28))}
|
|
2
|
-
[attachment text truncated]`}export{y as a,m as i,_ as n,v as o,g as r,h as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/aiden0z-pptx-renderer.es-Bo43EjzT.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/jszip.min-BWcKrrYP.js","assets/pdf-CT3zVKCE.js","assets/index-DYrLeSyY.js","assets/index-Dezj4Z2p.css","assets/docx-preview-Blk_WGfs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n,t as r}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{W as i,cn as a}from"./App-DHJVXTI2.js";var o=e(t(),1),s=`/assets/pdf.worker.min-CjEcRF4W.mjs`;function c(e=()=>new Promise(e=>setTimeout(e,0))){let t=Promise.resolve();return(n,r)=>{let i=t.then(async()=>{if(n.aborted||(await e(),n.aborted))return;let t=()=>{},i=new Promise(e=>{t=e,n.addEventListener(`abort`,t,{once:!0})});try{await Promise.race([r(),i])}finally{n.removeEventListener(`abort`,t)}});return t=i.catch(()=>{}),i}}var l=c(),u=n();function d({file:e,thumbnail:t=!0}){let n=(0,o.useRef)(null),c=`word-preview-${(0,o.useId)().replace(/[^a-z0-9]/gi,``)}`,[d,f]=(0,o.useState)(!1),[p,m]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let a=n.current;if(!a||!e.content)return;let o=new AbortController,u=document.createElement(`div`);a.replaceChildren(u);let d=[];f(!1),m(!1);let p=()=>{let e=u.offsetWidth;if(!e)return;let n=u.scrollHeight,r=t?a.parentElement?.clientHeight??0:0,i=t&&r&&n?Math.min(a.clientWidth/e,r/n):a.clientWidth/e;u.style.zoom=String(i)},h=new ResizeObserver(p);h.observe(a),t&&a.parentElement&&h.observe(a.parentElement);let g=async()=>{let n=Uint8Array.from(atob(e.content),e=>e.charCodeAt(0));if(i(e)){let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await r(async()=>{let{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}=await import(`./aiden0z-pptx-renderer.es-Bo43EjzT.js`);return{PptxViewer:e,RECOMMENDED_ZIP_LIMITS:t}},__vite__mapDeps([0,1,2]));if(o.signal.aborted)return;u.style.width=`320px`;let i=new e(u,{width:320,zipLimits:t,lazySlides:!0,lazyMedia:!0,pdfjs:!1});d.push(()=>i.destroy()),await i.open(n,{signal:o.signal,renderMode:`slide`})}else if(/\.pdf$/i.test(e.path)){let e=await r(()=>import(`./pdf-CT3zVKCE.js`),__vite__mapDeps([3,4,1,5]));if(o.signal.aborted)return;e.GlobalWorkerOptions.workerSrc=s;let t=e.getDocument({data:n});d.push(()=>{t.destroy().catch(()=>{})});let i=await t.promise;if(o.signal.aborted)return;let a=await i.getPage(1),c=a.getViewport({scale:320/a.getViewport({scale:1}).width}),l=document.createElement(`canvas`);l.width=c.width,l.height=c.height,u.style.width=`320px`,u.appendChild(l);let f=a.render({canvas:l,viewport:c});d.push(()=>f.cancel()),await f.promise}else{let[{renderAsync:e},{parseZipLazyMedia:i,RECOMMENDED_ZIP_LIMITS:a}]=await Promise.all([r(()=>import(`./docx-preview-Blk_WGfs.js`),__vite__mapDeps([6,1,2])),r(()=>import(`./aiden0z-pptx-renderer.es-Bo43EjzT.js`),__vite__mapDeps([0,1,2]))]);if(await i(n.buffer,a),o.signal.aborted)return;u.style.width=`816px`,await e(n,u,u,{className:c,inWrapper:!1,breakPages:!0,useBase64URL:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!t,renderEndnotes:!t}),t&&Array.from(u.querySelectorAll(`section.${c}`)).slice(1).forEach(e=>e.remove())}o.signal.aborted||(p(),f(!0))};return(t?l(o.signal,g):g()).catch(()=>{o.signal.aborted||m(!0)}),()=>{o.abort(),h.disconnect(),d.reverse().forEach(e=>e()),u.remove()}},[c,e.content,e.path,t]),(0,u.jsxs)(`div`,{className:`file-page-preview ${t?`thumbnail`:`document`}`,children:[d?null:(0,u.jsx)(`span`,{className:`file-page-preview-placeholder`,role:t?void 0:`status`,children:t?(0,u.jsx)(a,{size:28}):p?`Preview unavailable. Download the original document to open it.`:`Loading document…`}),(0,u.jsx)(`div`,{ref:n,className:`file-page-preview-content ${d&&!p?`ready`:``}`})]})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DYrLeSyY.js";import"./icons-CK5-nxVC.js";import{c as r,l as i,n as a,o,r as s,t as c}from"./training-model-data-14942K_Z.js";import{t as l}from"./chevron-down-dYn0pd4Q.js";import{t as u}from"./chevron-right-sFx2xRvT.js";import{t as d}from"./loader-circle-cyf35w3i.js";import{Ht as f,mn as p,tn as m,wn as h}from"./App-DHJVXTI2.js";import{l as g}from"./MainPane-2dj6Dg4l.js";import{C as _,S as v,_ as y,b,c as x,d as S,f as ee,g as C,h as w,l as te,m as ne,p as re,s as ie,u as ae,v as oe,x as T,y as E}from"./LabsRoute-B61l1b8P.js";var D=e(t(),1),O=n();function k({events:e}){let t=e.filter(e=>e.type===`metric`&&e.payload.metricKind===`rollout_trajectory`);return t.length?(0,O.jsx)(`div`,{className:`training-rollout-receipts`,children:t.map((e,t)=>{let n=e.payload.rewardEligible===!0,r=j(e.payload.reward),i=typeof e.payload.failureClass==`string`?e.payload.failureClass:null,a=typeof e.payload.failureCode==`string`?e.payload.failureCode:null;return(0,O.jsxs)(`details`,{children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsxs)(`span`,{children:[`Attempt `,t+1]}),(0,O.jsx)(`strong`,{children:n?`eligible`:`ineligible`}),(0,O.jsx)(`em`,{children:n&&r!=null?r.toFixed(3):a??i??`not reward eligible`})]}),(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)(A,{label:`Rollout`,value:M(e.payload.rolloutId)}),(0,O.jsx)(A,{label:`Group`,value:M(e.payload.rolloutGroupId)}),(0,O.jsx)(A,{label:`Policy`,value:`v${j(e.payload.policyVersion)??0}`}),(0,O.jsx)(A,{label:`Worker`,value:String((j(e.payload.workerSlot)??0)+1)}),(0,O.jsx)(A,{label:`Reward`,value:r==null?`Not eligible`:String(r)}),(0,O.jsx)(A,{label:`Failure class`,value:i??`None`}),(0,O.jsx)(A,{label:`Failure code`,value:a??`None`}),(0,O.jsx)(A,{label:`Components`,value:JSON.stringify(e.payload.rewardComponents??{})}),(0,O.jsx)(A,{label:`Tokens`,value:`${j(e.payload.inputTokens)??0} input · ${j(e.payload.outputTokens)??0} output`})]})]},e.id)})}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No managed attempts were recorded for this run.`})}function se({receipts:e}){let[t,n]=(0,D.useState)(!1);if(!e.length)return(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No on-policy rollout receipts were recorded for this run.`});let r=[...e].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),i=t?r:r.slice(0,24);return(0,O.jsxs)(`div`,{className:`training-rollout-receipts`,children:[e.length>24?(0,O.jsxs)(`div`,{className:`training-rollout-receipt-controls`,children:[(0,O.jsx)(`span`,{children:t?`Showing all ${e.length} receipts`:`Showing latest ${i.length} of ${e.length} receipts`}),(0,O.jsx)(`button`,{className:`training-text-button`,type:`button`,onClick:()=>n(e=>!e),children:t?`Show latest 24`:`Show all ${e.length}`})]}):null,i.map(e=>(0,O.jsxs)(`details`,{children:[(0,O.jsxs)(`summary`,{children:[(0,O.jsx)(`span`,{children:ce(e.providerTrace.rolloutId)}),(0,O.jsx)(`strong`,{children:e.status}),(0,O.jsx)(`em`,{children:e.reward.eligible&&e.reward.raw!=null?e.reward.raw.toFixed(3):e.failureClass??`not reward eligible`})]}),(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)(A,{label:`Correlation`,value:e.correlationId}),(0,O.jsx)(A,{label:`Task`,value:e.taskId}),(0,O.jsx)(A,{label:`Policy`,value:e.policy.modelId}),(0,O.jsx)(A,{label:`Checkpoint`,value:e.policy.checkpointId??`Provider initial policy`}),(0,O.jsx)(A,{label:`Environment`,value:`${e.environment.id}@${e.environment.version}`}),(0,O.jsx)(A,{label:`World`,value:`${e.environment.worldId} · ${e.environment.worldHash}`}),(0,O.jsx)(A,{label:`Raw reward`,value:e.reward.raw==null?`Not eligible`:String(e.reward.raw)}),(0,O.jsx)(A,{label:`Components`,value:JSON.stringify(e.reward.components)}),(0,O.jsx)(A,{label:`Outcome`,value:e.verifier?.outcome??e.failureClass??`Pending`}),(0,O.jsx)(A,{label:`Trace`,value:`${e.providerTrace.experimentId}/${e.providerTrace.rolloutId}`})]})]},e.id))]})}function A({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function j(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function M(e){return typeof e==`string`&&e?e:`Not recorded`}function ce(e){return e.replace(/^lineage_/,``).slice(0,18)}function le({detail:e,loading:t,pending:n=!1}){if(t&&!e)return(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`Loading evaluation results…`});let r=e?.evaluation;return r?(0,O.jsxs)(`div`,{className:`training-run-evaluation`,children:[(0,O.jsxs)(`div`,{className:`training-metric-summary`,children:[(0,O.jsx)(P,{label:`Base score`,value:ue(r.base.meanScore)}),(0,O.jsx)(P,{label:`Trained score`,value:ue(r.trained.meanScore)}),(0,O.jsx)(P,{label:`Score change`,value:fe(r.meanScoreDelta)}),(0,O.jsx)(P,{label:`Trained pass rate`,value:de(r.trained.passRate)})]}),r.base.count===0?(0,O.jsx)(`p`,{className:`training-muted`,children:`Base-model scoring was not imported for this earlier run. New runs retain both base and trained evaluations.`}):null,r.trained.count>0&&r.trained.scoredCount===0?(0,O.jsx)(`p`,{className:`training-muted`,children:`Outputs were captured, but the grader was unavailable, so this run has no evaluation score.`}):null,(0,O.jsx)(`div`,{className:`training-table-wrap`,children:(0,O.jsxs)(`table`,{className:`training-data-table training-evaluation-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Test example`}),(0,O.jsx)(`th`,{children:`Base`}),(0,O.jsx)(`th`,{children:`Trained`}),(0,O.jsx)(`th`,{children:`Result`})]})}),(0,O.jsx)(`tbody`,{children:r.examples.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:(0,O.jsxs)(`details`,{children:[(0,O.jsx)(`summary`,{children:e.taskId}),(0,O.jsx)(N,{input:e.input,baseOutput:e.baseOutput,trainedOutput:e.trainedOutput,baseGrade:e.baseGrade,trainedGrade:e.trainedGrade})]})}),(0,O.jsx)(`td`,{children:pe(e.baseGrade)}),(0,O.jsx)(`td`,{children:pe(e.trainedGrade)}),(0,O.jsx)(`td`,{children:F(e.baseGrade,e.trainedGrade)})]},e.taskId))})]})})]}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:n?`Evaluation will appear here after the first eligible checkpoint is scored.`:`No scored evaluation results are available for this run.`})}function N({input:e,baseOutput:t,trainedOutput:n,baseGrade:r,trainedGrade:i}){let a=[...new Set([...r?.feedback??[],...i?.feedback??[]])];return(0,O.jsxs)(`div`,{className:`training-evaluation-output`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Input`}),(0,O.jsx)(`pre`,{children:JSON.stringify(e,null,2)})]}),t?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Base output`}),(0,O.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]}):null,n?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Trained output`}),(0,O.jsx)(`pre`,{children:JSON.stringify(n,null,2)})]}):null,a.length?(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Grader feedback`}),(0,O.jsx)(`p`,{children:a.join(` `)})]}):null]})}function P({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(`strong`,{children:t})]})}function ue(e){return e==null?`Not recorded`:e.toFixed(3)}function de(e){return e==null?`Not recorded`:`${Math.round(e*100)}%`}function fe(e){return e==null?`Not comparable`:`${e>=0?`+`:``}${e.toFixed(3)}`}function pe(e){return e?.status===`unavailable`?`Unavailable`:e?.score==null?`Not scored`:e.score.toFixed(3)}function F(e,t){if(!t)return`Not evaluated`;if(t.status===`unavailable`)return`Unavailable`;if(!e||e.score==null||t.score==null)return t.passed?`Passed`:`Failed`;let n=t.score-e.score;return Math.abs(n)<5e-4?`No change`:n>0?`Improved ${n.toFixed(3)}`:`Regressed ${Math.abs(n).toFixed(3)}`}function me({connection:e,lineageId:t,jobId:n,onSaved:r}){let i=n??t,a=n?`jobs`:`models`,[o,s]=(0,D.useState)(null),[c,l]=(0,D.useState)(0),[u,d]=(0,D.useState)(!0),[p,m]=(0,D.useState)(!1),[g,_]=(0,D.useState)(!1),[v,y]=(0,D.useState)(null),[b,x]=(0,D.useState)(null),[S,ee]=(0,D.useState)(``),[C,w]=(0,D.useState)(null),[te,ne]=(0,D.useState)([]),[re,ie]=(0,D.useState)(!1);(0,D.useEffect)(()=>{if(!e){d(!1),m(!1),y(`Connect to OpenPond to review this candidate.`);return}let t=!0;return d(!0),m(!1),y(null),ne([]),(async()=>{try{if(a===`models`){let n=await h.candidateReview(e,i);t&&n&&s(n)}let n=await h.candidateReview(e,i,!0,a);t&&(s(n),m(!!n))}catch(e){t&&y(I(e))}finally{t&&d(!1)}})(),()=>{t=!1}},[e,i,a,c]);function ae(e){x(e),ee(``),w(null)}async function oe(){if(!e||!o||!b||!S.trim())return;let t=C&&C.reason===S.trim()&&C.decision===b?C:{schemaVersion:`openpond.trainingCandidateDecisionRequest.v1`,...o.target,decision:b,reason:S.trim(),idempotencyKey:crypto.randomUUID(),expectedDecision:o.decision?{id:o.decision.id,contentHash:o.decision.contentHash}:null};w(t),_(!0),y(null);try{s(await h.recordCandidateReview(e,i,t,a)),x(null),w(null),ne([]),await r()}catch(e){y(I(e))}finally{_(!1)}}let T=(te.at(-1)??o?.decision)?.request.expectedDecision;async function E(){if(e&&T){ie(!0),y(null);try{let t=await h.candidateReviewHistory(e,i,T,a);ne(e=>[...e,t])}catch(e){y(I(e))}finally{ie(!1)}}}let k=o?.decision;return(0,O.jsxs)(`section`,{className:`training-run-evaluation`,"aria-label":`Candidate review`,children:[(0,O.jsx)(`h3`,{children:`Candidate review`}),k?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:k.request.decision===`accepted`?`Accepted`:`Rejected`}),(0,O.jsx)(`p`,{children:k.request.reason}),(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Review `,k.revision,` · `,new Date(k.decidedAt).toLocaleString()]})]}):(0,O.jsx)(`p`,{className:`training-muted`,children:u?`Loading candidate review…`:o?`No candidate decision recorded.`:`Candidate review unavailable.`}),o?(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Last synced `,new Date(o.syncedAt).toLocaleString(),`. Acceptance keeps this candidate for later use; serving is activated separately.`]}):null,v?(0,O.jsx)(f,{error:v}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:u||g,onClick:()=>l(e=>e+1),children:`Refresh review`}),(0,O.jsx)(`button`,{className:`training-button`,type:`button`,disabled:!p||u||g||k?.request.decision===`accepted`,onClick:()=>ae(`accepted`),children:`Accept candidate`}),(0,O.jsx)(`button`,{className:`training-button danger`,type:`button`,disabled:!p||u||g||k?.request.decision===`rejected`,onClick:()=>ae(`rejected`),children:`Reject candidate`})]}),te.map(e=>(0,O.jsxs)(`details`,{className:`training-evidence`,children:[(0,O.jsxs)(`summary`,{children:[`Review `,e.revision,` · `,e.request.decision]}),(0,O.jsx)(`p`,{children:e.request.reason}),(0,O.jsx)(`p`,{children:new Date(e.decidedAt).toLocaleString()})]},e.id)),T?(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:re||g,onClick:()=>void E(),children:re?`Loading…`:`Earlier review`}):null,b?(0,O.jsx)(`div`,{className:`training-dialog-backdrop`,role:`presentation`,onMouseDown:()=>!g&&x(null),children:(0,O.jsxs)(`section`,{className:`training-dialog training-promotion-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Review candidate`,onMouseDown:e=>e.stopPropagation(),children:[(0,O.jsx)(`div`,{className:`training-dialog-header`,children:(0,O.jsx)(`h2`,{children:b===`accepted`?`Accept this candidate?`:`Reject this candidate?`})}),(0,O.jsx)(`p`,{children:`The adapter and its recorded evaluation remain in the candidate’s history.`}),(0,O.jsxs)(`label`,{className:`training-promotion-reason`,children:[(0,O.jsx)(`span`,{children:`Reason`}),(0,O.jsx)(`textarea`,{autoFocus:!0,maxLength:5e3,value:S,onChange:e=>ee(e.target.value)})]}),v?(0,O.jsx)(f,{error:v}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:g,onClick:()=>x(null),children:`Cancel`}),(0,O.jsx)(`button`,{className:`training-button ${b===`rejected`?`danger`:``}`,type:`button`,disabled:g||!S.trim(),onClick:()=>void oe(),children:g?`Saving…`:C?`Retry save`:`Save decision`})]})]})}):null]})}function I(e){return e instanceof Error?e.message:`Candidate review could not be loaded.`}function he({connection:e,jobId:t,evaluations:n}){let[r,i]=(0,D.useState)(null),a=n.filter(e=>e.reference),o=a.find(e=>e.reference?.id===r)??a.filter(e=>e.kind===`candidate`).at(-1)??a[0];return!e||!o?.reference?null:(0,O.jsxs)(`section`,{className:`training-run-evaluation`,"aria-label":`Retained evaluation answers`,children:[(0,O.jsxs)(`label`,{className:`training-taskset-selector`,children:[(0,O.jsx)(`span`,{children:`Evaluation answers`}),(0,O.jsx)(`select`,{value:o.reference.id,onChange:e=>i(e.target.value),children:a.map(e=>(0,O.jsxs)(`option`,{value:e.reference.id,children:[e.kind===`baseline`?`Baseline`:`Candidate`,` · policy `,e.policyVersion]},e.reference.id))})]}),(0,O.jsx)(ge,{connection:e,jobId:t,evaluation:o.reference},`${t}:${o.reference.id}:${o.reference.contentHash}`)]})}function ge({connection:e,jobId:t,evaluation:n}){let[r,i]=(0,D.useState)(),[a,o]=(0,D.useState)([]),[s,c]=(0,D.useState)(null),[l,u]=(0,D.useState)(null),[d,p]=(0,D.useState)(!0),[m,g]=(0,D.useState)(0),{id:_,contentHash:v}=n;return(0,D.useEffect)(()=>{let n=!0;return p(!0),u(null),c(null),h.trainingEvaluationTasks(e,t,{id:_,contentHash:v},r).then(e=>{n&&c(e)}).catch(e=>{n&&u(e instanceof Error?e.message:String(e))}).finally(()=>{n&&p(!1)}),()=>{n=!1}},[e,t,_,v,r,m]),(0,O.jsxs)(`div`,{className:`training-run-evaluation`,"aria-busy":d,children:[d?(0,O.jsx)(`p`,{className:`training-muted`,children:`Loading recorded answers…`}):null,l?(0,O.jsx)(f,{error:l,children:(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,onClick:()=>g(e=>e+1),children:`Retry answers`})}):null,s?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`p`,{className:`training-muted`,children:[`Tasks `,s.offset+1,`–`,s.offset+s.tasks.length,` of`,` `,s.total,`. Recorded outputs and scores are retained for this run.`]}),s.tasks.map((e,t)=>(0,O.jsxs)(`details`,{className:`training-evidence`,children:[(0,O.jsxs)(`summary`,{children:[`Example `,s.offset+t+1,` · score `,e.score.toFixed(3)]}),(0,O.jsxs)(`div`,{className:`training-evaluation-output`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Instruction`}),(0,O.jsx)(`pre`,{children:e.input.instruction})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Context`}),(0,O.jsx)(`pre`,{children:JSON.stringify(e.input.context,null,2)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`Recorded output`}),(0,O.jsx)(`pre`,{children:e.output})]})]})]},e.taskId))]}):null,(0,O.jsxs)(`div`,{className:`training-dialog-actions`,children:[(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:d||!a.length,onClick:()=>{i(a.at(-1)),o(e=>e.slice(0,-1))},children:`Previous tasks`}),(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,disabled:d||!s?.nextCursor,onClick:()=>{s?.nextCursor&&(o(e=>[...e,r]),i(s.nextCursor))},children:`Next tasks`})]})]})}var _e=new Set([`queued`,`starting`,`running`,`cancelling`,`reconciling`]),L=new WeakMap;function ve(e,t,n,r=!1){let[i,a]=(0,D.useState)(null),[o,s]=(0,D.useState)(!1),[c,l]=(0,D.useState)(null),u=(0,D.useRef)(t),d=(0,D.useRef)(null);u.current=t;let f=(0,D.useCallback)((n=r)=>{if(!e||!t)return Promise.resolve(null);let i=`${t}:${n?`full`:`live`}`;if(d.current?.key===i)return d.current.request;s(!0);let o=h.trainingRunDetail(e,t,{includeEvaluation:n}).then(r=>{let i=R(e),o=i.get(t),s=!n&&o?.includesEvaluation?{...r,evaluation:o.detail.evaluation}:r;return i.set(t,{detail:s,includesEvaluation:n||o?.includesEvaluation===!0}),u.current===t&&(a(s),l(null)),s}).catch(e=>(u.current===t&&l(e instanceof Error?e.message:String(e)),null)).finally(()=>{d.current?.request===o&&(d.current=null,s(!1))});return d.current={key:i,request:o},o},[e,r,t]);return(0,D.useEffect)(()=>{if(l(null),!e||!t){a(null);return}let n=R(e).get(t);a(n?.detail??null),f(r)},[e,r,t,n,f]),(0,D.useEffect)(()=>{if(!e||!t||!n||!_e.has(n))return;let r=window.setInterval(()=>void f(!1),2e3);return()=>window.clearInterval(r)},[e,t,n,f]),{detail:i,error:c,loading:o,refresh:f}}function R(e){let t=L.get(e);if(t)return t;let n=new Map;return L.set(e,n),n}function ye({title:e,status:t,statusValue:n,versionStatus:r,method:i,baseModel:a,taskset:o,compute:s,duration:c,output:l,reward:d,telemetry:f,evidence:p,configuration:m,children:h,failure:g,onOpenTaskset:v,showHeader:y=!0}){let b=f?.cost.providerReportedUsd??f?.cost.estimatedUsd??p?.cost.totalUsd??null;return(0,O.jsxs)(`div`,{className:`labs-model-run-summary`,children:[y?(0,O.jsx)(`section`,{className:`labs-run-outcome-card`,children:(0,O.jsx)(`header`,{children:(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`labs-run-title-row`,children:[(0,O.jsx)(`h2`,{children:e}),(0,O.jsx)(_,{label:t,value:n})]}),(0,O.jsxs)(`p`,{children:[U(i),` on `,a]})]})})}):null,h,(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Run setup`})}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(z,{label:`Training method`,value:i}),(0,O.jsx)(z,{label:`Base model`,value:a}),(0,O.jsx)(z,{label:`Compute`,value:s}),(0,O.jsx)(z,{label:`Output`,value:l}),r?(0,O.jsx)(z,{label:`Version status`,value:r}):null,(0,O.jsx)(z,{label:`Duration`,value:c}),(0,O.jsx)(z,{label:`Run cost`,value:b===null?`Not reported`:`$${b.toFixed(4)}`}),(0,O.jsx)(z,{label:`Final reward`,value:d===null?`Not reported`:d.toFixed(4)}),m.map(e=>(0,O.jsx)(z,{label:e.label,value:e.value},e.label)),f||p?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(B,{label:`GPU`,value:V(f,p)}),(0,O.jsx)(B,{label:`Tokens`,value:`${H(f?.usage.promptTokens??p?.usage.inputTokens??null)} prompt · ${H(f?.usage.generatedTokens??p?.usage.outputTokens??null)} generated`}),(0,O.jsx)(B,{label:`Trajectories`,value:`${H(f?.usage.successfulTrajectories??p?.reward.eligibleTrajectoryCount??null)} succeeded · ${H(f?.usage.failedTrajectories??(p?p.reward.trajectoryCount-p.reward.eligibleTrajectoryCount:null))} failed`}),(0,O.jsx)(B,{label:`Optimizer updates`,value:H(f?.usage.optimizerSteps??p?.progress.committedOptimizerSteps??null)}),(0,O.jsx)(B,{label:`GPU time`,value:f?.usage.gpuSeconds==null?`Not reported`:`${f.usage.gpuSeconds.toFixed(1)} seconds`})]}):(0,O.jsx)(z,{label:`Resource usage`,value:`Not retained for this run`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:`Taskset`}),(0,O.jsx)(`dd`,{children:v?(0,O.jsxs)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:v,children:[(0,O.jsx)(`span`,{children:o}),(0,O.jsx)(u,{"aria-hidden":`true`,size:14})]}):o})]})]})]}),g?(0,O.jsx)(`p`,{className:`labs-training-error`,children:g}):null]})}function z({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function B({label:e,value:t}){return(0,O.jsx)(z,{label:e,value:t})}function V(e,t){let n=e?.resource.gpuCount??t?.resource.gpuCount??null,r=e?.resource.gpuType??t?.resource.gpuType??null;return n===null&&r===null?`Not reported`:`${n??`Unknown`} × ${r?be(r):`Unreported`}`}function H(e){return e===null?`Not reported`:e.toLocaleString()}function U(e){return e===`RFT`?`Reinforcement fine-tuning`:`${e} training`}function be(e){return e.split(` · `).map(e=>e.replaceAll(`_`,` `).replace(/\b[a-z]/g,e=>e.toUpperCase())).join(` · `)}function W({receipt:e,onOpenConversation:t}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Inconclusive benchmark`})}),(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:e.reason}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(q,{label:`Held-out baseline tokens`,value:e.usage.baseline.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Adaptation baseline tokens`,value:e.usage.adaptation.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Refiner tokens`,value:e.usage.refiner.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Grader tokens`,value:e.usage.grader.totalTokens.toLocaleString()}),(0,O.jsx)(q,{label:`Observed / maximum spend`,value:`$${e.budget.observedSpendUsd.toFixed(4)} / $${e.budget.maximumSpendUsd.toFixed(2)}`}),(0,O.jsx)(q,{label:`Harness candidate`,value:e.stopReason===`candidate_harness_unchanged`?`Unchanged`:`Lineage invalid`}),(0,O.jsx)(q,{label:`Completed attempts`,value:e.attempts.length.toLocaleString()}),(0,O.jsx)(q,{label:`Candidate attempts`,value:`Skipped`})]})]}),e.attempts.length?(0,O.jsx)(K,{receipt:e,onOpenConversation:t}):null]})}function xe({run:e}){let t=[`baseline`,`adaptation`,`refiner`,`candidate_adaptation`,`candidate`,`comparison`],n={baseline:`Baseline`,adaptation:`Adaptation`,refiner:`Refiner`,candidate_adaptation:`Sequential adaptation`,candidate:`Candidate`,comparison:`Comparison`},r=Math.max(0,t.indexOf(e.evaluationProgress?.stage??`baseline`)),i=e.evaluationProgress?.completedAttempts??0,a=e.evaluationProgress?.totalAttempts??1;return(0,O.jsxs)(`div`,{className:`labs-benchmark-progress`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h3`,{children:`Benchmark progress`}),(0,O.jsxs)(`strong`,{children:[i,` of `,a,` attempts`]})]}),(0,O.jsx)(`div`,{className:`labs-benchmark-progress-track`,"aria-hidden":`true`,children:(0,O.jsx)(`span`,{style:{width:`${Math.min(100,i/a*100)}%`}})}),(0,O.jsx)(`ol`,{children:t.map((e,t)=>(0,O.jsxs)(`li`,{className:t<r?`complete`:t===r?`active`:void 0,children:[(0,O.jsx)(`span`,{}),n[e]]},e))})]})}function Se({receipt:e}){let t=T(e),n=t.pairs.filter(e=>e.cohort===`held_out`),r=t.pairs.filter(e=>e.cohort===`adaptation`),i=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0;return(0,O.jsxs)(`div`,{className:`labs-benchmark-attempt-charts`,children:[(0,O.jsx)(G,{title:`Held-out tokens by task`,baseline:n.map(e=>e.baseline.totalTokens),candidate:n.map(e=>e.refined.totalTokens),format:e=>Math.round(e).toLocaleString()}),(0,O.jsx)(G,{title:`Adaptation tokens by task`,baseline:r.map(e=>e.baseline.totalTokens),candidate:r.map(e=>e.refined.totalTokens),format:e=>Math.round(e).toLocaleString()}),(0,O.jsx)(G,{title:`Held-out quality by task`,baseline:n.map(e=>e.baseline.score),candidate:n.map(e=>e.refined.score),format:e=>e.toFixed(2),summarize:i}),(0,O.jsx)(G,{title:`Adaptation quality by task`,baseline:r.map(e=>e.baseline.score),candidate:r.map(e=>e.refined.score),format:e=>e.toFixed(2),summarize:i})]})}function Ce({receipt:e,run:t,tasksetName:n,onOpenTaskset:r}){let i=T(e),a=i.comparedTaskCount>0,s=i.passed,c=i.tokenDeltaPercent===null?`—`:`${i.tokenDeltaPercent>0?`+`:``}${i.tokenDeltaPercent.toFixed(2)}%`,l=e=>{let t=i.cohorts[e];return`${t.passedTaskCount}/${t.comparedTaskCount} passed`};return(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:`Token efficiency`})}),a?(0,O.jsxs)(`div`,{className:`labs-benchmark-efficiency-summary`,children:[(0,O.jsxs)(`strong`,{children:[i.passedTaskCount,` of `,i.comparedTaskCount,` tasks passed`]}),(0,O.jsxs)(`p`,{children:[`A task passes only when its refined token count is strictly lower than its own baseline. `,i.failedTaskCount,` failed this token-efficiency test; aggregate usage changed by `,c,`.`]})]}):(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:`Paired task-level token evidence is unavailable for this run.`}),(0,O.jsxs)(`dl`,{className:`labs-run-detail-list`,children:[(0,O.jsx)(q,{label:`Execution`,value:o(t.status)}),(0,O.jsx)(q,{label:`Token-efficiency result`,value:s?`Passed`:`Failed`}),(0,O.jsx)(q,{label:`Efficiency passes`,value:`${i.passedTaskCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`Efficiency failures`,value:`${i.failedTaskCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`All-task foreground tokens`,value:`${i.baselineTokens.toLocaleString()} → ${i.refinedTokens.toLocaleString()}`}),(0,O.jsx)(q,{label:`Aggregate token change`,value:c}),(0,O.jsx)(q,{label:`Adaptation replay`,value:l(`adaptation`)}),(0,O.jsx)(q,{label:`Held-out replay`,value:l(`held_out`)}),(0,O.jsx)(q,{label:`Task quality`,value:`${i.baselinePassedCount}/${i.comparedTaskCount} → ${i.refinedPassedCount}/${i.comparedTaskCount}`}),(0,O.jsx)(q,{label:`Result lineage`,value:e.lineage.valid?`Valid`:`Invalid`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:`Taskset`}),(0,O.jsx)(`dd`,{children:r?(0,O.jsx)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:r,children:n}):n})]})]})]})}function G({title:e,baseline:t,candidate:n,format:r,summarize:i=e=>e.reduce((e,t)=>e+t,0)}){let a=t.filter(e=>e!==null),o=n.filter(e=>e!==null),s=Math.max(1,...a,...o),c=Math.max(2,t.length,n.length),l=e=>{let t=[],n=[];return e.forEach((e,r)=>{if(e===null){n.length&&t.push(n.join(` `)),n=[];return}let i=6+r/(c-1)*88,a=44-e/s*36;n.push(`${i},${a}`)}),n.length&&t.push(n.join(` `)),t},u=e=>e.flatMap((e,t)=>e===null?[]:[{x:6+t/(c-1)*88,y:44-e/s*36}]);return(0,O.jsxs)(`section`,{className:`labs-benchmark-line-chart`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h4`,{children:e}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`span`,{children:[`Baseline `,r(i(a))]}),(0,O.jsxs)(`span`,{children:[`Refined `,r(i(o))]})]})]}),(0,O.jsxs)(`svg`,{"aria-label":e,role:`img`,viewBox:`0 0 100 50`,preserveAspectRatio:`none`,children:[(0,O.jsx)(`line`,{x1:`6`,x2:`94`,y1:`44`,y2:`44`}),l(t).map((e,t)=>(0,O.jsx)(`polyline`,{className:`baseline`,points:e},`baseline-${t}`)),l(n).map((e,t)=>(0,O.jsx)(`polyline`,{className:`candidate`,points:e},`candidate-${t}`)),u(t).map((e,t)=>(0,O.jsx)(`circle`,{className:`baseline`,cx:e.x,cy:e.y,r:`1`},`baseline-point-${t}`)),u(n).map((e,t)=>(0,O.jsx)(`circle`,{className:`candidate`,cx:e.x,cy:e.y,r:`1`},`candidate-point-${t}`))]})]})}function K({receipt:e,onOpenConversation:t}){let n=e.schemaVersion===`openpond.modelEvaluationReceipt.v1`?b(e.attempts??[]):e.attempts??[];return(0,O.jsxs)(`section`,{className:`labs-run-summary-card`,children:[(0,O.jsx)(`header`,{children:(0,O.jsx)(`h3`,{children:e.schemaVersion===`openpond.modelEvaluationReceipt.v1`?`Selected task results`:`Completed attempts`})}),(0,O.jsx)(`div`,{className:`training-table-wrap`,children:(0,O.jsxs)(`table`,{className:`training-data-table labs-benchmark-attempt-table`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`Task`}),(0,O.jsx)(`th`,{children:`Phase`}),(0,O.jsx)(`th`,{children:`Result`}),(0,O.jsx)(`th`,{children:`Score`}),(0,O.jsx)(`th`,{children:`Tokens`}),(0,O.jsx)(`th`,{children:`Work chat`})]})}),(0,O.jsx)(`tbody`,{children:n.map(e=>(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`td`,{children:we(e.taskId)}),(0,O.jsx)(`td`,{children:e.phase}),(0,O.jsx)(`td`,{children:(0,O.jsx)(_,{label:e.passed?`Passed`:`Failed`,value:e.passed?`succeeded`:`failed`})}),(0,O.jsx)(`td`,{children:e.score===null?`—`:e.score.toFixed(2)}),(0,O.jsx)(`td`,{children:e.totalTokens.toLocaleString()}),(0,O.jsx)(`td`,{children:e.sessionId?(0,O.jsx)(`button`,{className:`labs-run-taskset-link`,type:`button`,onClick:()=>t(e.sessionId),children:`Open chat`}):`Not retained`})]},`${e.phase}:${e.attemptId}`))})]})})]})}function we(e){return e.replace(/^(?:adaptation|frozen)-/,``).replaceAll(`-`,` `).replace(/^./,e=>e.toUpperCase())}function q({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function Te(e){let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(r===0?0:2)} ${t[r]}`}function Ee({error:e,events:t,loading:n,pending:r}){let[i,o]=(0,D.useState)(!1),[s,c]=(0,D.useState)({}),[u,f]=(0,D.useState)(!0),h=(0,D.useRef)(null),g=(0,D.useRef)(null),_=(0,D.useRef)(null),v=(0,D.useMemo)(()=>De(t),[t]),y=(0,D.useMemo)(()=>t.filter(e=>s[J(e)]??Y(J(e))),[t,s]),b=v.filter(e=>s[e.id]??Y(e.id)).length,x=v.length>0&&b===v.length,S=b>0&&!x;return(0,D.useEffect)(()=>{_.current&&(_.current.indeterminate=S)},[S]),(0,D.useEffect)(()=>{if(!i)return;let e=e=>{g.current?.contains(e.target)||o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[i]),(0,D.useLayoutEffect)(()=>{let e=h.current;e&&u&&(e.scrollTop=e.scrollHeight)},[e,u,r,y]),n&&!t.length?(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`Loading run events…`}):t.length?(0,O.jsxs)(`div`,{className:`training-event-log-shell`,children:[(0,O.jsxs)(`div`,{className:`training-event-log-toolbar`,children:[(0,O.jsx)(`div`,{children:(0,O.jsx)(`strong`,{children:`Activity log`})}),(0,O.jsxs)(`div`,{className:`training-event-filter`,ref:g,children:[(0,O.jsxs)(`button`,{"aria-expanded":i,"aria-haspopup":`menu`,className:`training-event-filter-trigger`,type:`button`,onClick:()=>o(e=>!e),children:[(0,O.jsx)(m,{"aria-hidden":`true`,size:14}),`Event types`,(0,O.jsxs)(`span`,{children:[b,`/`,v.length]}),(0,O.jsx)(l,{"aria-hidden":`true`,size:13})]}),i?(0,O.jsxs)(`div`,{"aria-label":`Filter training activity by event type`,className:`training-event-filter-menu`,role:`menu`,children:[(0,O.jsxs)(`label`,{className:`training-event-filter-option select-all`,children:[(0,O.jsx)(`input`,{checked:x,ref:_,type:`checkbox`,onChange:e=>{let t=e.currentTarget.checked;c(Object.fromEntries(v.map(e=>[e.id,t])))}}),(0,O.jsx)(`span`,{className:`training-event-filter-check`,children:(0,O.jsx)(p,{"aria-hidden":`true`,size:12})}),`Select all`]}),(0,O.jsx)(`div`,{className:`training-event-filter-options`,children:v.map(e=>{let t=s[e.id]??Y(e.id);return(0,O.jsxs)(`label`,{className:`training-event-filter-option`,children:[(0,O.jsx)(`input`,{checked:t,type:`checkbox`,onChange:t=>c(n=>({...n,[e.id]:t.currentTarget.checked}))}),(0,O.jsx)(`span`,{className:`training-event-filter-check`,children:(0,O.jsx)(p,{"aria-hidden":`true`,size:12})}),(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`small`,{children:e.count.toLocaleString()})]},e.id)})})]}):null]})]}),(0,O.jsxs)(`div`,{"aria-label":`Training activity log`,"aria-live":`polite`,className:`training-event-log`,ref:h,role:`log`,onScroll:e=>{let t=e.currentTarget,n=t.scrollHeight-t.scrollTop-t.clientHeight;f(n<=6)},children:[(0,O.jsxs)(`div`,{"aria-hidden":`true`,className:`training-event-log-header`,children:[(0,O.jsx)(`span`,{children:`Time`}),(0,O.jsx)(`span`,{children:`Event type`}),(0,O.jsx)(`span`,{children:`Details`})]}),y.map(e=>(0,O.jsxs)(`div`,{className:`training-event-log-line ${e.type}`,children:[(0,O.jsx)(`time`,{dateTime:e.timestamp,children:a(e.timestamp)}),(0,O.jsx)(`span`,{children:Oe(J(e))}),(0,O.jsx)(`code`,{children:X(e)})]},e.id)),r&&!e?(0,O.jsxs)(`div`,{className:`training-event-log-loading`,role:`status`,children:[(0,O.jsx)(d,{"aria-hidden":`true`,className:`spin`,size:14}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Waiting for new activity`})]}):null,y.length?null:(0,O.jsx)(`div`,{className:`training-event-log-empty`,children:`No events match the selected event types.`}),e?(0,O.jsxs)(`div`,{className:`training-event-log-line failure`,children:[(0,O.jsx)(`time`,{children:`—`}),(0,O.jsx)(`span`,{children:`Failure`}),(0,O.jsx)(`code`,{children:e})]}):null]})]}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:e??`No normalized run events were recorded.`})}function J(e){return typeof e.payload.remoteEventType==`string`&&e.payload.remoteEventType.trim()?e.payload.remoteEventType:typeof e.payload.telemetryType==`string`&&e.payload.telemetryType.trim()?e.payload.telemetryType:e.type}function De(e){let t=new Map;for(let n of e){let e=J(n);t.set(e,(t.get(e)??0)+1)}return[...t.entries()].map(([e,t])=>({id:e,count:t,label:Oe(e)})).sort((e,t)=>e.label.localeCompare(t.label))}function Y(e){return e!==`metric`&&!e.endsWith(`_metric`)}function Oe(e){return e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function X(e){let t=e.payload,n=Q(t.step),r=Q(t.maxSteps);if(typeof t.telemetryType==`string`){let e=typeof t.message==`string`?t.message:null,r=typeof t.errorCode==`string`?t.errorCode:null,i=typeof t.telemetrySource==`string`?` · ${t.telemetrySource}`:``;return`${e??t.telemetryType.replaceAll(`_`,` `)}${n==null?``:` · step ${n}`}${i}${r?` · ${r}`:``}`}if(typeof t.remoteEventType==`string`){let e=ke(t.remoteEventType),r=typeof t.remotePhase==`string`?Ae(t.remotePhase):null,i=typeof t.errorCode==`string`&&t.errorCode.trim()?t.errorCode.trim():null;return[e,r,n==null?null:`step ${n}`,i?`error ${i}`:null].filter(e=>!!e).join(` · `)}if(e.type===`start`)return typeof t.device==`string`?`Worker started on ${t.device}.`:`Worker started.`;if(e.type===`progress`&&n!=null)return r==null?`Step ${n}.`:`Step ${n} of ${r}.`;if(e.type===`metric`){let e=typeof t.metricKind==`string`?t.metricKind.replaceAll(`_`,` `):`metric`,r=[Z(`loss`,t.loss),Z(`reward`,t.meanReward??t.reward),Z(`policy loss`,t.policyLoss),Z(`value loss`,t.valueLoss),Z(`preference accuracy`,t.preferenceAccuracy,Me)].filter(e=>!!e),i=typeof t.failureClass==`string`?t.failureClass:null,a=typeof t.failureCode==`string`?t.failureCode:null,o=typeof t.metricId==`string`&&typeof t.value==`number`?` · ${t.metricId}: ${t.value.toPrecision(4)}`:``;return`${e}${n==null?``:` · step ${n}`}${o}${i?` · ${i}`:``}${a?` · ${a}`:``}${r.length?` · ${r.join(` · `)}`:``}`}if(e.type===`checkpoint`){let e=Q(t.policyVersion),n=Q(t.sizeBytes),r=[e==null?null:`policy ${e}`,n==null?null:Te(n),t.final===!0?`final`:null].filter(e=>!!e);return r.length?`Checkpoint committed · ${r.join(` · `)}.`:`Checkpoint committed.`}if(e.type===`complete`){let e=Q(t.artifactCount);return e==null?`Worker completed.`:`Worker completed with ${e} artifacts.`}return e.type===`failure`&&typeof t.message==`string`?t.message:Object.keys(t).length?JSON.stringify(t):`Recorded.`}function ke(e){return{drain:`Rollout drain`,infer:`Model inference`,materialize_checkpoint:`Checkpoint materialization`,optimizer_metric:`Optimizer metric`,provision_gpu:`GPU provisioning`,rollout_metric:`Rollout trajectory`,score_reward_model:`Reward scoring`,start_inference:`Policy server`,train_step:`Optimizer update`,upload_checkpoint:`Checkpoint upload`}[e]??je(e)}function Ae(e){return{committed:`committed`,completed:`completed`,eligible:`recorded`,failed:`failed`,running:`running`,succeeded:`succeeded`}[e]??je(e).toLocaleLowerCase()}function je(e){return e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function Z(e,t,n=e=>new Intl.NumberFormat(void 0,{maximumFractionDigits:4}).format(e)){let r=Q(t);return r==null?null:`${e} ${n(r)}`}function Q(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Me(e){return`${(e*100).toFixed(1)}%`}function Ne({connection:e,detailTab:t,onDetailTabChange:n,selectedEntryKey:a,workproduct:l,runs:u,training:d,onOpenDataset:f,onOpenConversation:p,detailKind:m}){let h=d.payload,[_,v]=(0,D.useState)(null),b=(0,D.useMemo)(()=>S(l,u,h),[u,h,l]),T=(0,D.useMemo)(()=>ne(l,u,h),[u,h,l]),E=(0,D.useMemo)(()=>ae(l,h),[h,l]),A=(0,D.useMemo)(()=>ee(l,u,h),[u,h,l]),j=(0,D.useMemo)(()=>new Map(A.map(e=>[e.id,e])),[A]),M=(0,D.useMemo)(()=>te(b,T),[b,T]).find(e=>e.key===a)??null,ce=a.startsWith(`model-run:`)?a.slice(10):null,N=ce?E.find(e=>e.id===ce)??null:M?.job?E.find(e=>e.id===M.job?.metadata.modelRunId)??null:null,P=M?.job??(N?h?.jobs.find(e=>e.id===N.id||e.metadata.modelRunId===N.id)??null:null),ue=h?.comparisonSeriesEntries.find(e=>e.modelRunId===N?.id||e.modelRunId===P?.metadata.modelRunId)??null,de=typeof P?.metadata.parentHostedArtifactId==`string`?`Prior hosted run`:Ue(h,ue),fe=(0,D.useMemo)(()=>{let e=ie(b,T,E);return x(e,N?.kind===`evaluation`?`evals`:`training`)},[b,E,N?.kind,T]),pe=fe.findIndex(e=>e.key===a||P!==null&&e.job?.id===P.id||N!==null&&e.lifecycleRun?.id===N.id),F=pe<0?null:fe.length-pe,I=M?.version??(N?.adapterArtifactLineageId?T.find(e=>e.lineage.id===N.adapterArtifactLineageId)??null:null),ge=(N?h?.modelVersions.find(e=>e.id===N.modelVersionId)?.baseModel.modelId:null)??h?.modelVersions.filter(e=>e.modelId===l.id&&e.kind===`base_reference`).sort((e,t)=>t.version-e.version)[0]?.baseModel.modelId??(typeof P?.metadata.baseModelId==`string`?P.metadata.baseModelId:null),_e=I?.lineage.frozenEvaluationArtifactId??null,L=I?.plan??(P?j.get(P.planId)??null:null),R=I?.taskset??re(h).find(e=>e.id===(N?.taskset.id??L?.tasksetId))??null,z=R?.name??(typeof P?.metadata.tasksetId==`string`?P.metadata.tasksetId:`Unavailable`),B=N?.method??L?.recipe.method??Re(P?.metadata),V=ve(e,P?.id??null,P?.status??null,t===`evaluation`),H=P?h?.rolloutReceipts.filter(e=>e.jobId===P.id)??[]:[],U=V.detail?.managedEvidence??null,be=V.detail?.events.some(e=>e.type===`metric`&&e.payload.metricKind===`rollout_trajectory`)??!1,W=oe({lifecycleRun:N,job:V.detail?.job??P}),xe=y(W),Se=N?.status===`failed`&&P?.metadata.phase===`artifact_collection_failed`,Ce=B===`grpo`,G=Fe(P?.metadata),K=(L&&(L.recipe.method===`sft`||L.recipe.method===`dpo`||L.recipe.method===`grpo`)?L.recipe.optimizer.maxSteps:null)??U?.progress.targetOptimizerSteps??null,we=K!==null&&typeof P?.metadata.progress==`number`&&Number.isFinite(P.metadata.progress)?Math.floor(Math.max(0,P.metadata.progress)*K):0,q=Math.max(0,G?.optimizerUpdatesApplied??0,we,V.detail?.policyMetrics.reduce((e,t)=>Math.max(e,t.step),0)??0,V.detail?.stepMetrics.reduce((e,t)=>Math.max(e,t.step),0)??0,U?.progress.committedOptimizerSteps??0),J=Pe(Ce&&G?G.groupsCompleted:q,Ce&&G?G.groupsTarget:K),De=m===`run`?{id:`details`,label:`Details`}:{id:`overview`,label:`Overview`},Y=[...m===`run`&&P?[{id:`metrics`,label:`Metrics`}]:[],De,...m===`version`&&P?[{id:`metrics`,label:`Metrics`}]:[],{id:`evaluation`,label:`Evaluation`},...H.length||be?[{id:`rollouts`,label:`Rollouts`}]:[],{id:`artifacts`,label:`Artifacts`},...P?[{id:`activity`,label:`Activity`}]:[]],Oe=t,X=Y.some(e=>e.id===Oe)?Oe:Y[0].id;return!M&&!N?(0,O.jsx)(`div`,{className:`labs-model-version-detail`,children:(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`This training attempt is no longer available.`})}):N?.kind===`evaluation`?(0,O.jsx)(Ie,{run:N,runNumber:F,tasksetName:R?.name??`Unavailable`,onOpenTaskset:R?()=>f(R.id):void 0,onOpenConversation:p}):(0,O.jsxs)(`div`,{className:`labs-model-version-detail`,children:[(0,O.jsx)(w,{title:N||P?F?`Run ${F}`:`Run details`:I?`Version ${I.number}`:`Run details`,description:`${i(B)} on ${Le(L,ge)}`,status:(0,O.jsx)(C,{status:W}),actions:xe&&(N||P)?(0,O.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:d.busyAction!==null||W===`cancelling`,onClick:async()=>{let e=N?.id??P.id,t=N?await d.actions.cancelModelRun(N.id):await d.actions.cancelJob(P.id);v({runId:e,message:t?`Cancellation requested. Waiting for the training service to confirm.`:`Cancellation could not be requested. Try again.`})},children:W===`cancelling`?`Cancelling…`:d.busyAction===`cancel-model-run`||d.busyAction===`cancel-job`?`Requesting cancellation…`:`Cancel run`}):Se&&N?(0,O.jsx)(`button`,{type:`button`,className:`training-button secondary`,disabled:d.busyAction!==null,onClick:async()=>{let e=await d.actions.retryModelRunCollection(N.id);v({runId:N.id,message:e?.state===`succeeded`?`Outputs collected from the completed training job.`:`Collection failed. The training job and its outputs are retained.`})},children:d.busyAction===`retry-model-run-collection`?`Collecting…`:`Retry collection`}):void 0,metrics:[{label:Ce?`Training tasks`:`Training steps`,value:J.value},{label:`Final reward`,value:Be(N?.reward?.raw??U?.reward.finalMean??null)},{label:`Duration`,value:N?s(N.startedAt,r(N.status,N.completedAt,N.updatedAt)):P?s(P.startedAt,r(P.status,P.completedAt,P.updatedAt)):`Not recorded`},{label:`Output`,value:I?`Version ${I.number}`:`No version`},{label:`Based on`,value:de},{label:`Taskset`,value:z,onSelect:R?()=>f(R.id):void 0,ariaLabel:R?`Open Taskset ${R.name}`:void 0}]}),_&&_.runId===(N?.id??P?.id)?(0,O.jsx)(`p`,{role:`status`,children:_.message}):null,(0,O.jsxs)(`section`,{className:`labs-run-detail-tabs`,children:[(0,O.jsx)(`div`,{className:`training-detail-tabs`,role:`tablist`,"aria-label":`Run details`,children:Y.map(e=>(0,O.jsx)(`button`,{"aria-controls":`run-detail-panel-${e.id}`,"aria-selected":X===e.id,className:X===e.id?`active`:void 0,id:`run-detail-tab-${e.id}`,role:`tab`,type:`button`,onClick:()=>n(e.id),children:e.label},e.id))}),(0,O.jsxs)(`div`,{"aria-labelledby":`run-detail-tab-${X}`,className:`labs-run-detail-tab-panel`,id:`run-detail-panel-${X}`,role:`tabpanel`,children:[X===De.id?(0,O.jsx)(ye,{baseModel:Le(L,ge),compute:N?c(N.destinationId??``):L?c(L.destinationId):P?c(P.destinationId):`Not recorded`,duration:N?s(N.startedAt,r(N.status,N.completedAt,N.updatedAt)):P?s(P.startedAt,r(P.status,P.completedAt,P.updatedAt)):`Not recorded`,failure:P?.error??N?.failure??null,configuration:[...He(h,ue),...Ve(L)],evidence:U,method:i(B),output:I?`Version ${I.number}`:`No version created`,reward:N?.reward?.raw??U?.reward.finalMean??null,status:N?o(N.status):P?o(P.status):`Imported`,statusValue:N?.status??P?.status??`imported`,taskset:z,telemetry:N?.receipt?.schemaVersion===`openpond.modelRunReceipt.v1`?N.receipt.telemetry:null,title:N||P?F?`Run ${F}`:`Run details`:I?`Version ${I.number}`:`Run details`,versionStatus:I?I.current?`Active`:`Available`:null,onOpenTaskset:R?()=>f(R.id):void 0,showHeader:!1}):null,X===`metrics`&&P?(0,O.jsx)(g,{detail:V.detail,error:V.error,loading:V.loading,taskset:R}):null,X===`artifacts`?(0,O.jsxs)(`dl`,{className:`training-configuration-list`,children:[(0,O.jsx)($,{label:`Training attempt`,value:P?.id??`Provider import`}),(0,O.jsx)($,{label:`Taskset`,value:z}),(0,O.jsx)($,{label:`Prepared data`,value:P?.bundleHash??`Provider managed`}),(0,O.jsx)($,{label:`Version ID`,value:I?.lineage.id??`No version created`}),U?.checkpoint?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)($,{label:`Checkpoint`,value:U.checkpoint.id}),(0,O.jsx)($,{label:`Checkpoint size`,value:U.checkpoint.sizeBytes==null?`Not reported`:Te(U.checkpoint.sizeBytes)}),(0,O.jsx)($,{label:`Checkpoint hash`,value:U.checkpoint.sha256??`Not reported`})]}):null,U?.canonicalPublication.state?(0,O.jsx)($,{label:`Registry publication`,value:Ge(U.canonicalPublication.state)}):null]}):null,X===`evaluation`?(0,O.jsxs)(`div`,{className:`training-run-evaluation`,children:[!U?.evaluations.length||V.detail?.evaluation?(0,O.jsx)(le,{detail:V.detail,loading:V.loading,pending:xe}):null,!V.detail?.evaluation&&U?.evaluations.length?(0,O.jsx)(`dl`,{className:`labs-inline-facts`,children:U.evaluations.map(e=>(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)($,{label:e.kind===`baseline`?`Baseline score`:`Candidate score`,value:e.score==null?`Not reported`:e.score.toFixed(6)}),(0,O.jsx)($,{label:e.kind===`baseline`?`Baseline coverage`:`Candidate coverage`,value:e.taskCount==null?`Not reported`:e.targetTaskCount==null?`${e.taskCount} ${e.taskCount===1?`task`:`tasks`} scored`:`${e.taskCount} of ${e.targetTaskCount} ${e.targetTaskCount===1?`task`:`tasks`} scored`})]},`${e.kind}:${e.policyVersion}`))}):null,I&&P?.destinationId===`openpond_managed`?(0,O.jsx)(me,{connection:e,lineageId:I.lineage.id,onSaved:d.refresh},I.lineage.id):null,!I&&P?.metadata.source===`hosted_model_project_import`&&P.status===`succeeded`?(0,O.jsx)(me,{connection:e,jobId:P.id,onSaved:d.refresh},`candidate:${P.id}`):null,P&&U?.evaluations.length?(0,O.jsx)(he,{connection:e,jobId:P.id,evaluations:U.evaluations},P.id):null,_e?(0,O.jsx)(`button`,{className:`training-button secondary`,type:`button`,onClick:()=>void d.actions.downloadArtifact(_e),children:`Download evaluation receipt`}):null]}):null,X===`rollouts`?H.length?(0,O.jsx)(se,{receipts:H}):(0,O.jsx)(k,{events:V.detail?.events??[]}):null,X===`activity`&&P?(0,O.jsx)(Ee,{error:P.error??V.error,events:V.detail?.events??[],loading:V.loading,pending:xe}):null]})]})]})}function Pe(e,t){let n=Math.max(0,Math.floor(e));if(t===null||!Number.isFinite(t)||t<=0)return{value:n.toLocaleString(),hint:n===1?`completed update`:`completed updates`};let r=Math.max(1,Math.floor(t));return{value:`${n.toLocaleString()} / ${r.toLocaleString()}`,hint:`completed / planned`}}function Fe(e){let t=e?.rolloutProgress;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;return[`groupsCompleted`,`groupsTarget`,`optimizerUpdatesApplied`,`optimizerUpdatesSkipped`].some(e=>typeof n[e]!=`number`||!Number.isInteger(n[e])||n[e]<0)?null:{groupsCompleted:n.groupsCompleted,groupsTarget:n.groupsTarget,optimizerUpdatesApplied:n.optimizerUpdatesApplied,optimizerUpdatesSkipped:n.optimizerUpdatesSkipped}}function Ie({run:e,runNumber:t,tasksetName:n,onOpenTaskset:r,onOpenConversation:i}){let[s,c]=(0,D.useState)(`results`),l=e.receipt?.schemaVersion===`openpond.modelEvaluationReceipt.v1`?e.receipt:null,u=e.receipt?.schemaVersion===`openpond.modelEvaluationStopReceipt.v1`?e.receipt:null,d=l?E(l):null,f=l?T(l):null;return(0,O.jsxs)(`div`,{className:`labs-model-version-detail labs-model-evaluation-detail`,children:[(0,O.jsx)(w,{title:t?`Eval ${t}`:`Evaluation run`,description:`Harness Refiner benchmark · ${n}`,status:(0,O.jsx)(_,{label:l?f?.comparedTaskCount?`${f.passedTaskCount}/${f.comparedTaskCount} passed`:`No paired result`:u?`Inconclusive`:o(e.status),value:l?f?.comparedTaskCount&&f.passed?`succeeded`:`neutral`:u?.terminalClassification??e.status}),metrics:[{label:`Baseline pass rate`,value:l?`${(l.quality.baselinePassRate*100).toFixed(1)}%`:`—`},{label:`Candidate pass rate`,value:l?`${(l.quality.candidatePassRate*100).toFixed(1)}%`:`—`},{label:`Scenarios`,value:l?.attempts?.length??0},{label:`Execution`,value:o(e.status)}]}),(0,O.jsx)(`div`,{className:`training-detail-tabs`,role:`tablist`,"aria-label":`Evaluation details`,children:[`results`,`scenarios`,`activity`].map(e=>(0,O.jsx)(`button`,{className:s===e?`active`:void 0,"aria-selected":s===e,role:`tab`,type:`button`,onClick:()=>c(e),children:e===`results`?`Results`:e===`scenarios`?`Scenarios`:`Activity`},e))}),s===`results`&&l?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(v,{series:[{id:`baseline`,label:`Held-out baseline`,inputTokens:d.baseline.inputTokens,outputTokens:d.baseline.outputTokens,tokens:d.baseline.totalTokens,passRate:l.quality.baselinePassRate,costUsd:d.baseline.costUsd},{id:`candidate`,label:`Held-out refined`,inputTokens:d.candidate.inputTokens,outputTokens:d.candidate.outputTokens,tokens:d.candidate.totalTokens,passRate:l.quality.candidatePassRate,costUsd:d.candidate.costUsd}]}),(0,O.jsx)(v,{series:[{id:`adaptation-baseline`,label:`Adaptation baseline`,inputTokens:d.adaptation.inputTokens,outputTokens:d.adaptation.outputTokens,tokens:d.adaptation.totalTokens,passRate:l.quality.adaptationBaselinePassRate,costUsd:d.adaptation.costUsd},{id:`adaptation-candidate`,label:`Adaptation replay`,inputTokens:d.candidate_adaptation.inputTokens,outputTokens:d.candidate_adaptation.outputTokens,tokens:d.candidate_adaptation.totalTokens,passRate:l.quality.adaptationCandidatePassRate,costUsd:d.candidate_adaptation.costUsd}]}),(0,O.jsx)(Ce,{receipt:l,run:e,tasksetName:n,onOpenTaskset:r})]}):s===`results`&&u?(0,O.jsx)(W,{receipt:u,onOpenConversation:i}):s===`results`?(0,O.jsx)(`section`,{className:`labs-run-summary-card`,children:e.failure?(0,O.jsx)(`p`,{className:`training-run-placeholder`,children:e.failure}):(0,O.jsx)(xe,{run:e})}):null,s===`scenarios`&&l?(0,O.jsxs)(O.Fragment,{children:[(l.attempts??[]).length?(0,O.jsx)(Se,{receipt:l}):null,(l.attempts??[]).length?(0,O.jsx)(K,{receipt:l,onOpenConversation:i}):(0,O.jsx)(`div`,{className:`training-run-placeholder`,children:`No per-scenario attempts were retained.`})]}):null,s===`activity`?(0,O.jsxs)(`dl`,{className:`labs-inline-facts`,children:[(0,O.jsx)($,{label:`Run ID`,value:e.id}),(0,O.jsx)($,{label:`Status`,value:o(e.status)}),(0,O.jsx)($,{label:`Started`,value:e.startedAt?a(e.startedAt):`Not started`}),(0,O.jsx)($,{label:`Completed`,value:e.completedAt?a(e.completedAt):`In progress`})]}):null]})}function Le(e,t=null){if(!e)return t?ze(t):`Not recorded`;let n=e.recipe.method===`sft`||e.recipe.method===`grpo`?e.recipe.baseModel:e.recipe.method===`dpo`?e.recipe.policyModel:e.recipe.method===`ppo`?e.recipe.policyOptimization.policyModel:null;return n?ze(n.id):`Not recorded`}function Re(e){let t=e?.trainingMethod;return t===`sft`||t===`dpo`||t===`grpo`||t===`ppo`||t===`sdft`||t===`opd`||t===`opsd`||t===`sdpo`?t:null}function ze(e){return e.split(`/`).at(-1)??e}function Be(e){return e===null?`Not reported`:e.toFixed(4)}function Ve(e){if(!e)return[];let t=e.recipe;return t.method===`grpo`?[{label:`LoRA rank`,value:String(t.lora.rank)},{label:`Learning rate`,value:We(t.optimizer.learningRate)},{label:`Optimizer steps`,value:String(t.optimizer.maxSteps)},{label:`Rollouts per update`,value:String(t.rollout.groupSize)},{label:`Rollout concurrency`,value:String(t.rollout.concurrency)},{label:`Max output tokens`,value:t.rollout.maxOutputTokens.toLocaleString()},{label:`Temperature`,value:String(t.rollout.temperature)},{label:`Top P`,value:String(t.rollout.topP)}]:t.method===`sft`||t.method===`dpo`?[{label:`LoRA rank`,value:String(t.lora.rank)},{label:`Learning rate`,value:We(t.optimizer.learningRate)},{label:`Optimizer steps`,value:String(t.optimizer.maxSteps)}]:[]}function He(e,t){if(!e||!t)return[];if(t.parent.kind===`base_model`)return[{label:`Starting checkpoint`,value:`Frozen base · ${t.parent.revision}`},{label:`Optimizer`,value:`Fresh`}];let n=e.modelVersions.find(e=>e.id===t.parent.id);return[{label:`Starting checkpoint`,value:[e.comparisonSeriesEntries.find(e=>e.seriesId===t.seriesId&&e.modelVersionId===t.parent.id)?.label??null,n?`Version ${n.version}`:t.parent.id].filter(e=>!!e).join(` · `)},{label:`Optimizer`,value:`Fresh`}]}function Ue(e,t){if(!e||!t||t.parent.kind===`base_model`)return`Frozen base`;let n=e.comparisonSeriesEntries.find(e=>e.seriesId===t.seriesId&&e.modelVersionId===t.parent.id),r=e.modelVersions.find(e=>e.id===t.parent.id);return[n?.label??`Prior checkpoint`,r?`Version ${r.version}`:null].filter(e=>!!e).join(` · `)}function We(e){return e===0?`0`:e.toExponential(2)}function $({label:e,value:t}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{children:e}),(0,O.jsx)(`dd`,{children:t})]})}function Ge(e){return e?e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase()):`Pending`}export{Ne as LabModelVersionDetailPage};
|