openpond 0.2.54 → 0.2.56
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/dist/app-server.d.ts +10823 -9118
- package/dist/app-server.js +1 -1
- package/dist/chunks/actions-command-QU4H53OG.js +2 -0
- package/dist/chunks/{app-layer-I7MZYVLL.js → app-layer-NSTE5HIT.js} +1 -1
- package/dist/chunks/app-server-connected-apps-JHGWLBXT.js +2 -0
- package/dist/chunks/app-server-evaluations-GJPFWIDA.js +2 -0
- package/dist/chunks/app-server-harness-services-IH4G6POY.js +2 -0
- package/dist/chunks/app-server-runtime-DVKOZ5B6.js +2 -0
- package/dist/chunks/apps-BKTOR4F7.js +2 -0
- package/dist/chunks/chunk-25MBPJVY.js +2 -0
- package/dist/chunks/chunk-2D4Y3HNW.js +2 -0
- package/dist/chunks/chunk-2IHO4GDJ.js +2 -0
- package/dist/chunks/chunk-2QUCCP6Z.js +2 -0
- package/dist/chunks/chunk-3K4VVB7S.js +6 -0
- package/dist/chunks/chunk-3QIB5FXI.js +10 -0
- package/dist/chunks/chunk-3RCRSMWZ.js +17 -0
- package/dist/chunks/chunk-3VUATFZD.js +2 -0
- package/dist/chunks/chunk-3Z47M3YY.js +2 -0
- package/dist/chunks/{chunk-GXSTZBM6.js → chunk-4D7HWVWD.js} +1 -1
- package/dist/chunks/chunk-4EPSHPZL.js +2 -0
- package/dist/chunks/chunk-4NESNOK5.js +2 -0
- package/dist/chunks/chunk-523TE4BI.js +2 -0
- package/dist/chunks/chunk-5MCNZCVQ.js +2 -0
- package/dist/chunks/chunk-6QSSIT62.js +2 -0
- package/dist/chunks/chunk-6ZFPQYHG.js +2 -0
- package/dist/chunks/chunk-74IIXVAE.js +2 -0
- package/dist/chunks/chunk-74ZXXBGN.js +6 -0
- package/dist/chunks/chunk-773TH7FN.js +2 -0
- package/dist/chunks/chunk-7E6T7GP5.js +2 -0
- package/dist/chunks/chunk-7ED24PP6.js +2 -0
- package/dist/chunks/chunk-7HPDGZOR.js +86 -0
- package/dist/chunks/chunk-7KWD2I6W.js +2 -0
- package/dist/chunks/chunk-7PXZ4X4P.js +2 -0
- package/dist/chunks/chunk-A6USMRWK.js +2 -0
- package/dist/chunks/chunk-ABD5M2D2.js +2 -0
- package/dist/chunks/chunk-ACYFMLWG.js +10 -0
- package/dist/chunks/chunk-AN525SPP.js +6 -0
- package/dist/chunks/chunk-APB2STJK.js +2 -0
- package/dist/chunks/chunk-AY64VY4E.js +2 -0
- package/dist/chunks/{chunk-UJ5EFSEC.js → chunk-B7RFL4N2.js} +1 -1
- package/dist/chunks/chunk-BFKYRQMA.js +2 -0
- package/dist/chunks/chunk-BLXEAZCQ.js +12 -0
- package/dist/chunks/chunk-D74JEERO.js +5 -0
- package/dist/chunks/{chunk-PA7XP42P.js → chunk-DARVPBZ4.js} +1 -1
- package/dist/chunks/chunk-DBK66CJP.js +8 -0
- package/dist/chunks/chunk-DDMZSZFL.js +1 -0
- package/dist/chunks/chunk-DIO5CB6U.js +2 -0
- package/dist/chunks/chunk-DMFUEUAZ.js +5 -0
- package/dist/chunks/chunk-DMVD2RFZ.js +2 -0
- package/dist/chunks/chunk-DUURYZOI.js +2 -0
- package/dist/chunks/chunk-DZUAT3TP.js +1 -0
- package/dist/chunks/chunk-EIEZHFIW.js +6 -0
- package/dist/chunks/chunk-EIRYMSEG.js +19 -0
- package/dist/chunks/{chunk-JDLAHVAJ.js → chunk-EKM2D7JU.js} +1 -1
- package/dist/chunks/chunk-EQFGBL3O.js +2 -0
- package/dist/chunks/chunk-EYPCBBMS.js +2 -0
- package/dist/chunks/chunk-F4KOGISR.js +10 -0
- package/dist/chunks/chunk-F74GBN6K.js +2 -0
- package/dist/chunks/chunk-FEAKTSRS.js +2 -0
- package/dist/chunks/chunk-FFRFSDBM.js +2 -0
- package/dist/chunks/chunk-FTEOCCPB.js +23 -0
- package/dist/chunks/chunk-FUOEIDMA.js +8 -0
- package/dist/chunks/{chunk-AH22RHPS.js → chunk-FV2R5RUN.js} +2 -2
- package/dist/chunks/chunk-FWIPHEVA.js +12 -0
- package/dist/chunks/chunk-FY5KHLMW.js +2 -0
- package/dist/chunks/chunk-G3RXYI2L.js +6 -0
- package/dist/chunks/chunk-GJ2ZJFDD.js +2 -0
- package/dist/chunks/chunk-GLDYJM7O.js +1 -0
- package/dist/chunks/chunk-GPVCOEUH.js +2 -0
- package/dist/chunks/chunk-GW766ZSO.js +5 -0
- package/dist/chunks/chunk-GWCHDF2C.js +4 -0
- package/dist/chunks/chunk-GZ7M5XBP.js +2 -0
- package/dist/chunks/chunk-H6IW2R22.js +140 -0
- package/dist/chunks/chunk-HCYX6RHP.js +2 -0
- package/dist/chunks/chunk-HDL5YSAA.js +2 -0
- package/dist/chunks/chunk-HIOKCIL7.js +2 -0
- package/dist/chunks/chunk-HY3GOBFJ.js +58 -0
- package/dist/chunks/chunk-HZEIRHEB.js +2 -0
- package/dist/chunks/chunk-I2NXNMRZ.js +2 -0
- package/dist/chunks/chunk-I7AQMAQI.js +33 -0
- package/dist/chunks/chunk-IZ6DLEVY.js +2 -0
- package/dist/chunks/chunk-J2TWKFML.js +1871 -0
- package/dist/chunks/chunk-JDEEWOD7.js +2 -0
- package/dist/chunks/chunk-JFXWI3EN.js +6 -0
- package/dist/chunks/chunk-JYKRR7E5.js +5 -0
- package/dist/chunks/chunk-KCJVFLBB.js +2 -0
- package/dist/chunks/{chunk-5CMKGD43.js → chunk-KG325WTN.js} +1 -1
- package/dist/chunks/chunk-KGNCKIFP.js +3 -0
- package/dist/chunks/chunk-KUERKVEU.js +3 -0
- package/dist/chunks/chunk-KVTBX2UP.js +2 -0
- package/dist/chunks/chunk-L6K7ERG5.js +2 -0
- package/dist/chunks/{chunk-N5QNXMIS.js → chunk-LQQNBVEB.js} +1 -1
- package/dist/chunks/{chunk-YJ4PNAST.js → chunk-M4JWQSV7.js} +1 -1
- package/dist/chunks/chunk-MQULU465.js +2 -0
- package/dist/chunks/chunk-N4FFQPLR.js +2 -0
- package/dist/chunks/chunk-N73MU2C3.js +2 -0
- package/dist/chunks/chunk-NHQ36THU.js +3 -0
- package/dist/chunks/{chunk-4SHKI3BH.js → chunk-O6ULLQJ6.js} +1 -1
- package/dist/chunks/chunk-O72BSKSO.js +2 -0
- package/dist/chunks/chunk-OGDADQGH.js +143 -0
- package/dist/chunks/chunk-OIUTWU6K.js +2 -0
- package/dist/chunks/chunk-OLLLZVHF.js +2 -0
- package/dist/chunks/{chunk-XM26DGML.js → chunk-OPNRWESL.js} +1 -1
- package/dist/chunks/chunk-OQKJGTTO.js +4 -0
- package/dist/chunks/chunk-OQPJ7FJF.js +9 -0
- package/dist/chunks/{chunk-R3XFY7VL.js → chunk-OS3LO5J3.js} +1 -1
- package/dist/chunks/{chunk-T5LE6R5S.js → chunk-OSIO7PLX.js} +1 -1
- package/dist/chunks/chunk-OUVIWDL2.js +2 -0
- package/dist/chunks/chunk-PCSIOUHF.js +7 -0
- package/dist/chunks/chunk-PF5R6CMP.js +21 -0
- package/dist/chunks/chunk-PPAPVGJP.js +3 -0
- package/dist/chunks/chunk-PRGBLQVH.js +2 -0
- package/dist/chunks/chunk-PSGGOZFM.js +2 -0
- package/dist/chunks/chunk-PUZQU66L.js +2 -0
- package/dist/chunks/{chunk-WITSXYEW.js → chunk-Q2QL6UWN.js} +1 -1
- package/dist/chunks/chunk-Q4TBTRIG.js +2 -0
- package/dist/chunks/chunk-Q5LEXXJG.js +16 -0
- package/dist/chunks/{chunk-YL6VFJ4P.js → chunk-QDC4OW3S.js} +1 -1
- package/dist/chunks/chunk-QEFHOJFE.js +7 -0
- package/dist/chunks/chunk-QHWGQ3A4.js +5 -0
- package/dist/chunks/chunk-QIKWJ2AA.js +11 -0
- package/dist/chunks/chunk-QNG27G3T.js +6 -0
- package/dist/chunks/chunk-QOGJAQDO.js +3 -0
- package/dist/chunks/chunk-QOTVNQDI.js +4 -0
- package/dist/chunks/{chunk-N3DEA6PG.js → chunk-RAXOSUSW.js} +1 -1
- package/dist/chunks/chunk-RNIAFXMB.js +50 -0
- package/dist/chunks/chunk-S5ESN275.js +42 -0
- package/dist/chunks/chunk-SDAUS5PY.js +2 -0
- package/dist/chunks/chunk-SDXFLO7J.js +5 -0
- package/dist/chunks/chunk-SH5CBAFC.js +2 -0
- package/dist/chunks/chunk-SWUEFLOH.js +2 -0
- package/dist/chunks/chunk-SYUKES6H.js +3 -0
- package/dist/chunks/chunk-T5AACNJI.js +2 -0
- package/dist/chunks/chunk-TRQQNFMO.js +4 -0
- package/dist/chunks/chunk-TVQAPBLZ.js +2 -0
- package/dist/chunks/chunk-UCPGRPWY.js +2 -0
- package/dist/chunks/chunk-UGL7WF3W.js +2 -0
- package/dist/chunks/chunk-UHFZHBGW.js +2 -0
- package/dist/chunks/chunk-UKMA4R6X.js +6 -0
- package/dist/chunks/{chunk-7ZG3IT7C.js → chunk-VRIEKBBH.js} +6 -6
- package/dist/chunks/chunk-VYLGI3IH.js +13 -0
- package/dist/chunks/chunk-W45RKGM6.js +1 -0
- package/dist/chunks/chunk-WJ43MJ3F.js +2 -0
- package/dist/chunks/chunk-WMKYHXVM.js +3 -0
- package/dist/chunks/chunk-WN3V6KDN.js +3 -0
- package/dist/chunks/chunk-X4OSOOSU.js +3 -0
- package/dist/chunks/chunk-XDQMGUWL.js +2 -0
- package/dist/chunks/chunk-XTFPDQMH.js +3 -0
- package/dist/chunks/chunk-XVDFJ3ZF.js +2 -0
- package/dist/chunks/chunk-XW6HGSIT.js +8 -0
- package/dist/chunks/chunk-XXYGGNVM.js +2 -0
- package/dist/chunks/chunk-Y4OWBBDD.js +184 -0
- package/dist/chunks/chunk-YBT2NB32.js +2 -0
- package/dist/chunks/chunk-YCJO3YVD.js +10 -0
- package/dist/chunks/{chunk-YD55Z5H3.js → chunk-YOBN7KTF.js} +11 -11
- package/dist/chunks/chunk-YOQRYNLP.js +2 -0
- package/dist/chunks/chunk-YR5ID2SS.js +2 -0
- package/dist/chunks/chunk-YY7LEQGP.js +2 -0
- package/dist/chunks/chunk-Z4Z5UOZM.js +22 -0
- package/dist/chunks/chunk-Z54O534A.js +3 -0
- package/dist/chunks/chunk-ZCHXGRRU.js +2 -0
- package/dist/chunks/chunk-ZFSHBFG5.js +40 -0
- package/dist/chunks/chunk-ZGTOK7ZK.js +12 -0
- package/dist/chunks/{chunk-NAZ26IZL.js → chunk-ZRDGQDZL.js} +1 -1
- package/dist/chunks/chunk-ZUJ3XUCP.js +2 -0
- package/dist/chunks/chunk-ZZWAQBA2.js +2 -0
- package/dist/chunks/cli-X25RSO2X.js +2 -0
- package/dist/chunks/configuration-command-6C5UO7GE.js +2 -0
- package/dist/chunks/connected-app-executor-IVLGQP65.js +2 -0
- package/dist/chunks/connected-evidence-GH2ATNEX.js +2 -0
- package/dist/chunks/connection-HTF6CC7M.js +2 -0
- package/dist/chunks/{continual-PKK2BOTB.js → continual-6CQAMTTR.js} +3 -3
- package/dist/chunks/core-commands-A2DGGIPS.js +2 -0
- package/dist/chunks/datasets-7BNMVJOY.js +2 -0
- package/dist/chunks/desktop-test-3CUHVLXV.js +3 -0
- package/dist/chunks/dist-OMGUJYPD.js +2 -0
- package/dist/chunks/{chunk-6VF3Q6QJ.js → dist-SKYG5LZO.js} +2 -4
- package/dist/chunks/dist-VYC5VMQB.js +2 -0
- package/dist/chunks/dist-ZVJPJLXR.js +2 -0
- package/dist/chunks/enclave-QS4BUNDU.js +2 -0
- package/dist/chunks/evaluation-coordination-XEF5L7KZ.js +2 -0
- package/dist/chunks/experiment-improvements-KRX2DP27.js +2 -0
- package/dist/chunks/experiments-DFGQYA4O.js +2 -0
- package/dist/chunks/experiments-VFQGE4HC.js +2 -0
- package/dist/chunks/extension-XKXXOP5N.js +4 -0
- package/dist/chunks/{help-WLKSACLZ.js → help-S7THC6IE.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-JJQWJUBT.js +2 -0
- package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +2 -0
- package/dist/chunks/hosted-app-server-composition-BCOO5ANF.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-NFSVS5TU.js +3 -0
- package/dist/chunks/hosted-harness-runtime-723S5ZSH.js +2 -0
- package/dist/chunks/hosted-profile-candidate-2S5LFUWD.js +3 -0
- package/dist/chunks/hosted-profile-compiler-2DQIFSXW.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-76BTRTYD.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-V6Z3A5XJ.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-IDJYREW3.js +3 -0
- package/dist/chunks/hosted-tasksets-ANAE2PIW.js +2 -0
- package/dist/chunks/human-review-WR777ODH.js +2 -0
- package/dist/chunks/import-MLZUHITH.js +4 -0
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +2 -0
- package/dist/chunks/learning-ACEVFL5M.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-JIQ6ZVDW.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XVYTGAGK.js +2 -0
- package/dist/chunks/local-scope-HVF2GZ5W.js +2 -0
- package/dist/chunks/model-projects-QPO22JPA.js +2 -0
- package/dist/chunks/opchat-T4QTNEIY.js +3 -0
- package/dist/chunks/organizations-75L5DZDV.js +2 -0
- package/dist/chunks/profile-TFZMUEDR.js +3 -0
- package/dist/chunks/profile-training-source-6GOT7AHM.js +2 -0
- package/dist/chunks/project-action-payload-7VGL7OER.js +2 -0
- package/dist/chunks/project-agent-6RRO233B.js +2 -0
- package/dist/chunks/published-experiment-source-DZFENAQA.js +2 -0
- package/dist/chunks/refiner-profile-service-UUIWFJVT.js +2 -0
- package/dist/chunks/runtime-A7OZXM43.js +6 -0
- package/dist/chunks/sandbox-command-IU5XFTJP.js +2 -0
- package/dist/chunks/{sandbox-template-BBGGPJMI.js → sandbox-template-C4V6T36U.js} +1 -1
- package/dist/chunks/saved-work-6BMBFP43.js +2 -0
- package/dist/chunks/send-turn-XTAIS2JN.js +2 -0
- package/dist/chunks/sql-execution-process-source-B4HQM6ZV.js +2 -0
- package/dist/chunks/src-CJM6HY5Y.js +326 -0
- package/dist/chunks/{src-CR6UZYTX.js → src-LMC3K6LH.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +2 -0
- package/dist/chunks/store-chat-workflows-S72HZXQR.js +18 -0
- package/dist/chunks/store-continual-support-reviews-HHA6NX7K.js +7 -0
- package/dist/chunks/store-conversation-serving-KPC62UEY.js +2 -0
- package/dist/chunks/store-create-improve-QV54XIZW.js +40 -0
- package/dist/chunks/store-datasets-RXJ33SUN.js +86 -0
- package/dist/chunks/store-evaluation-results-3F3P527G.js +7 -0
- package/dist/chunks/store-harness-evaluation-review-settings-I2R3HPO3.js +29 -0
- package/dist/chunks/store-harness-memory-VINCZ4GK.js +17 -0
- package/dist/chunks/store-harness-refinement-candidates-EA5KFQPH.js +21 -0
- package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +2 -0
- package/dist/chunks/store-human-review-RAH7WMIP.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-4CI2IRUF.js +2 -0
- package/dist/chunks/store-learning-WLG6KFIO.js +2 -0
- package/dist/chunks/store-learning-credentials-WZQJ4HPJ.js +2 -0
- package/dist/chunks/store-local-experiments-5LUJR7GI.js +97 -0
- package/dist/chunks/store-model-batch-review-YEGX327M.js +2 -0
- package/dist/chunks/store-model-configuration-5ZURQATB.js +3 -0
- package/dist/chunks/store-preference-comparison-LV32MHVL.js +6 -0
- package/dist/chunks/store-schedules-VGTEQVKH.js +53 -0
- package/dist/chunks/store-sidebar-file-bookmarks-VB5GTLFY.js +18 -0
- package/dist/chunks/store-sidebar-preferences-GWIOG2NH.js +16 -0
- package/dist/chunks/store-subagents-T7R2Z6TB.js +67 -0
- package/dist/chunks/store-task-inbox-JJTBW76C.js +33 -0
- package/dist/chunks/store-task-inventory-OB3F2APC.js +10 -0
- package/dist/chunks/store-taskset-drafts-EKQWWFYQ.js +9 -0
- package/dist/chunks/store-training-G6YLFSIR.js +70 -0
- package/dist/chunks/store-training-jobs-RC46YBF6.js +19 -0
- package/dist/chunks/store-training-models-6BA43IPP.js +49 -0
- package/dist/chunks/store-usage-IE2U2FD3.js +63 -0
- package/dist/chunks/store-work-evidence-QQDKM5AQ.js +8 -0
- package/dist/chunks/taskset-EQRFQBYM.js +2 -0
- package/dist/chunks/taskset-packages-XC6HEE3K.js +2 -0
- package/dist/chunks/{teams-bot-7I4BAUVO.js → teams-bot-EAPGPTHZ.js} +1 -1
- package/dist/chunks/training-UF6RPI4T.js +2 -0
- package/dist/chunks/web-search-CZ3NCLPY.js +2 -0
- package/dist/chunks/workspaces-EKKE5NAC.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/web/assets/App-CaRMZoxo.css +1 -0
- package/dist/web/assets/App-s-CJswyt.js +154 -0
- package/dist/web/assets/{AppDialog-BdusXgU0.js → AppDialog-t2Fx5tK3.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-C4uRpnBz.js → AppTerminalPanel-Dj1Y32oI.js} +2 -2
- package/dist/web/assets/AppsView-BYE5EBDJ.js +1 -0
- package/dist/web/assets/{BrowserSidebar-Bl7V6YO2.js → BrowserSidebar-jhWi4rVm.js} +1 -1
- package/dist/web/assets/{CartesianChart-BstFbsdn.js → CartesianChart-C1DIx0Ia.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-B8YAf0c1.js → CollaborationTabs-Bdr-HmOL.js} +1 -1
- package/dist/web/assets/{CommandMenu-DZct7zUJ.js → CommandMenu-Ux2yOHAc.js} +1 -1
- package/dist/web/assets/{CommunityView-CR0-W-uG.js → CommunityView-DPEeVKFn.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DR-Qo7b4.js → ComposerCreateImproveStrip-CEgh4OtN.js} +1 -1
- package/dist/web/assets/{GetStartedView-xqQoMMei.js → GetStartedView-CFHP0AaI.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-D8BGTPVN.js +1 -0
- package/dist/web/assets/{HostedModelLearningSettings-De3i9wF4.js → HostedModelLearningSettings-JS1S7vNO.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-DAY1MmqP.js → LabModelVersionDetailPage-Dx5Q3xV2.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-DLnIgnry.js → LabSkillSidebar-BxffN-pN.js} +1 -1
- package/dist/web/assets/LabsRoute-CyYF8-dw.js +99 -0
- package/dist/web/assets/MainChatThread-DZpcFRFl.js +2 -0
- package/dist/web/assets/MainPane-5DTtwVCk.js +65 -0
- package/dist/web/assets/MainPane-BIM_UJ3q.css +1 -0
- package/dist/web/assets/{MarkdownText-gJMuefaJ.js → MarkdownText-BR4V6lNO.js} +24 -24
- package/dist/web/assets/{NativeSkillSidebar-Dlxb8iOC.js → NativeSkillSidebar-DU9IEgIO.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-DM-cqJ-K.js → NewExperienceSwitcher-mIy6FzCj.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cu1q75gq.js → NewProjectDialog-RfTZTHxl.js} +1 -1
- package/dist/web/assets/{OutputsPage-DiXMkasl.js → OutputsPage-Cr1Spf7S.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DqiBHiCB.js → ProjectsPage-CE6QUB-b.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-T6VRWuHo.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-CK0rP3WT.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-vOrYv8pp.js +1 -0
- package/dist/web/assets/SettingsView-DCKVrfjj.js +5 -0
- package/dist/web/assets/SettingsView-Dulr_xlq.css +1 -0
- package/dist/web/assets/{TeamChatView-DM0adMtj.js → TeamChatView-Bwrjr-vk.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-CFlH51DD.js → TerminalOverlay-DhPoKZAq.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-Bbo3RRie.js → TrainingDraftPanel-C9cRX5qf.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CSRjJUSa.js → UsageSettingsSection-CrdcSGeW.js} +1 -1
- package/dist/web/assets/{WorkSidebarPanel-DwlEMEoG.js → WorkSidebarPanel-DSSikNFQ.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-BAFo0CPN.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-BVHAhwnJ.js +63 -0
- package/dist/web/assets/WorkspaceGitDialogs-CwVoiDQ2.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-BR4qxMgU.js → WorkspaceMonacoEditor-TxLyhzNp.js} +3 -3
- package/dist/web/assets/arrow-up-right-C9aE8Mfz.js +1 -0
- package/dist/web/assets/chunk-P3BRSSRD-DUGfuKA8.js +1 -0
- package/dist/web/assets/{clipboard-BZzZ82Bk.js → clipboard-Dk158Qp4.js} +1 -1
- package/dist/web/assets/{cloud-upload-CJPYPVl8.js → cloud-upload-k9eqBsHr.js} +1 -1
- package/dist/web/assets/{cssMode-WC4Rg1l-.js → cssMode-CO35ARZp.js} +1 -1
- package/dist/web/assets/{folder-open-sLZJxLQy.js → folder-open-sYgceW_f.js} +1 -1
- package/dist/web/assets/folder-plus-CS0R49m9.js +1 -0
- package/dist/web/assets/{git-commit-horizontal-Cotm7KEC.js → git-commit-horizontal-DrGxH2h4.js} +1 -1
- package/dist/web/assets/{htmlMode-C6oZGeaB.js → htmlMode-REMmzdfq.js} +1 -1
- package/dist/web/assets/index-3iPNbbER.css +1 -0
- package/dist/web/assets/{index-BxWTVKtn.js → index-C8aCGagb.js} +2 -2
- package/dist/web/assets/info-DLdbiUrh.js +1 -0
- package/dist/web/assets/{jsonMode-BET4LQIn.js → jsonMode-KEdMfkIf.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-BPxA_-Kg.js → lspLanguageFeatures-5KZwEoxW.js} +1 -1
- package/dist/web/assets/minimize-2-CqcI4zcM.js +1 -0
- package/dist/web/assets/{monaco.contribution-DFzEyaHi.js → monaco.contribution-BJGj65F9.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DXzyQfVi.js → monaco.contribution-Cly9Wt7L.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BH6kkO4b.js → monaco.contribution-DO10L0zW.js} +2 -2
- package/dist/web/assets/{monaco.contribution-7AUuf2NS.js → monaco.contribution-omszXBEj.js} +2 -2
- package/dist/web/assets/monitor-BFVCcbxp.js +1 -0
- package/dist/web/assets/play-C469pVZq.js +1 -0
- package/dist/web/assets/{python-PzBkTjWx.js → python-Dw0YcVy9.js} +1 -1
- package/dist/web/assets/{save-DpezrtH2.js → save-CtSjPydi.js} +1 -1
- package/dist/web/assets/square-BuImvLhT.js +1 -0
- package/dist/web/assets/{toggleHighContrast-Cto-fOXm.js → toggleHighContrast-DjCO9lIP.js} +1 -1
- package/dist/web/assets/{tsMode-BYA4LNc6.js → tsMode-BAOnxKd6.js} +1 -1
- package/dist/web/assets/{upload-C5YFNgtS.js → upload-2JkFZo3h.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CnyTsqlf.js → useLocalAgentSchedules-BNqAisfS.js} +1 -1
- package/dist/web/assets/useProviderSettings-C4L4wDoh.js +5 -0
- package/dist/web/assets/{useProviderSettings-Bw-csWbH.css → useProviderSettings-CmL_BaxP.css} +1 -1
- package/dist/web/assets/{useSessionTurnCache-DICuJSJW.js → useSessionTurnCache-BHU2-Jmz.js} +1 -1
- package/dist/web/assets/{wifi-off-nzHj7JXp.js → wifi-off-CpOAH62M.js} +1 -1
- package/dist/web/assets/{workers-Dboaw6f_.js → workers-0QvlA2T5.js} +1 -1
- package/dist/web/assets/{yaml-uuY5JmO8.js → yaml-BK3qxo7D.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +3 -3
- package/dist/chunks/actions-command-DSO6YOEE.js +0 -2
- package/dist/chunks/app-server-runtime-7AXV6JZI.js +0 -2
- package/dist/chunks/apps-TM74FFQB.js +0 -2
- package/dist/chunks/chunk-2JO2KWT3.js +0 -5
- package/dist/chunks/chunk-2SPZYBDN.js +0 -16
- package/dist/chunks/chunk-37DXASQL.js +0 -191
- package/dist/chunks/chunk-4EEH7MEC.js +0 -2
- package/dist/chunks/chunk-4TZHH5FC.js +0 -2409
- package/dist/chunks/chunk-5TNDPNS3.js +0 -2
- package/dist/chunks/chunk-6JAN4RMN.js +0 -42
- package/dist/chunks/chunk-7QEE4PBI.js +0 -8
- package/dist/chunks/chunk-BX4J2VDU.js +0 -2
- package/dist/chunks/chunk-DALJMSJG.js +0 -33
- package/dist/chunks/chunk-EMKZVP7Z.js +0 -2
- package/dist/chunks/chunk-FPUUZQUP.js +0 -6
- package/dist/chunks/chunk-GCOUYYHG.js +0 -5
- package/dist/chunks/chunk-GS2NKNKG.js +0 -4
- package/dist/chunks/chunk-H2VT22JK.js +0 -2
- package/dist/chunks/chunk-HA7EFTPF.js +0 -23
- package/dist/chunks/chunk-IKWDL3RB.js +0 -17
- package/dist/chunks/chunk-NHFGEVVH.js +0 -518
- package/dist/chunks/chunk-NNF6KCHD.js +0 -3
- package/dist/chunks/chunk-PJM2G7SG.js +0 -21
- package/dist/chunks/chunk-PQHTZ5CP.js +0 -2
- package/dist/chunks/chunk-PYABBF53.js +0 -53
- package/dist/chunks/chunk-QRWPEW3Z.js +0 -24
- package/dist/chunks/chunk-QXVIIM4T.js +0 -2
- package/dist/chunks/chunk-SDEDAHV6.js +0 -160
- package/dist/chunks/chunk-TGIB24K4.js +0 -22
- package/dist/chunks/chunk-UE3DMPGM.js +0 -3
- package/dist/chunks/chunk-USKE34VR.js +0 -9
- package/dist/chunks/chunk-USMZT5FZ.js +0 -18
- package/dist/chunks/chunk-WV2APYWG.js +0 -2
- package/dist/chunks/chunk-YIB3J4RC.js +0 -2
- package/dist/chunks/chunk-Z3D4C7BG.js +0 -12
- package/dist/chunks/cli-JVB345H2.js +0 -2
- package/dist/chunks/configuration-command-MATM4XR5.js +0 -2
- package/dist/chunks/connected-evidence-YDPGNHLP.js +0 -2
- package/dist/chunks/core-commands-MTV4EKXY.js +0 -2
- package/dist/chunks/datasets-CP3IT47T.js +0 -2
- package/dist/chunks/desktop-test-IAZC5MAH.js +0 -3
- package/dist/chunks/dist-4HV2W6V4.js +0 -2
- package/dist/chunks/dist-SAABJU5F.js +0 -2
- package/dist/chunks/evaluation-coordination-EPHLZXYM.js +0 -2
- package/dist/chunks/experiment-improvements-6JTOPA74.js +0 -2
- package/dist/chunks/experiments-XHPFGECH.js +0 -2
- package/dist/chunks/extension-GX7DLW2X.js +0 -4
- package/dist/chunks/hosted-experiment-improvement-HAB3UE6A.js +0 -3
- package/dist/chunks/hosted-harness-runtime-YM23QNDK.js +0 -2
- package/dist/chunks/hosted-profile-candidate-EOBGKQAS.js +0 -3
- package/dist/chunks/hosted-profile-compiler-SCVJI2CP.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-RJ6XJZCS.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-OC4XNGL2.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-ZD4FM3FD.js +0 -3
- package/dist/chunks/human-review-AAVMISBF.js +0 -2
- package/dist/chunks/import-V3HUGRHR.js +0 -4
- package/dist/chunks/learning-FNBEIAY6.js +0 -2
- package/dist/chunks/opchat-QK43DXTY.js +0 -3
- package/dist/chunks/organizations-SRPAWKC7.js +0 -2
- package/dist/chunks/profile-C6CQNVYE.js +0 -3
- package/dist/chunks/project-agent-GZV5HNYI.js +0 -2
- package/dist/chunks/sandbox-command-4TJXQTKT.js +0 -2
- package/dist/chunks/src-NE6R4XC6.js +0 -329
- package/dist/chunks/taskset-LUG3ZU6J.js +0 -2
- package/dist/chunks/training-XHE6FVII.js +0 -2
- package/dist/chunks/workspaces-MFZ3OO6O.js +0 -2
- package/dist/web/assets/App-CO2F717V.css +0 -1
- package/dist/web/assets/App-CuhaCsfb.js +0 -235
- package/dist/web/assets/AppsView-BS1czXUP.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-CHxxf_Lu.js +0 -1
- package/dist/web/assets/LabsRoute-CXJRJMhr.js +0 -99
- package/dist/web/assets/MainChatThread-BwAla81W.js +0 -2
- package/dist/web/assets/MainPane-CakOBCHw.js +0 -19
- package/dist/web/assets/MainPane-DOWsSew1.css +0 -1
- package/dist/web/assets/RightChatPanelStack-VaOOmxwd.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-CeSFJM5s.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-D1jRQxFs.js +0 -1
- package/dist/web/assets/SettingsView-BnANbPLS.css +0 -1
- package/dist/web/assets/SettingsView-RA9OXgcu.js +0 -5
- package/dist/web/assets/TrainingCreationPanel-CgIBVGha.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-pGVezNMw.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-Byjngd9V.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-Dgmg-6XG.js +0 -1
- package/dist/web/assets/arrow-up-right-H0pvnH2s.js +0 -1
- package/dist/web/assets/chunk-UHVJOMWN-BqXRe639.js +0 -1
- package/dist/web/assets/folder-plus-C84wrpt_.js +0 -1
- package/dist/web/assets/index-dSmk3FLJ.css +0 -1
- package/dist/web/assets/info-Dc81lEfw.js +0 -1
- package/dist/web/assets/minimize-2-Bs7MVN3C.js +0 -1
- package/dist/web/assets/monitor-DXL019Wf.js +0 -1
- package/dist/web/assets/play-CXkxUZeU.js +0 -1
- package/dist/web/assets/square-oy7f5Ce6.js +0 -1
- package/dist/web/assets/useProviderSettings-B_KeQjE5.js +0 -5
- /package/dist/chunks/{chunk-OGPHXXCD.js → chunk-BT5YNE5U.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as H,f as te,h as ae,i as ie}from"./chunk-6VF3Q6QJ.js";import{g as se}from"./chunk-USKE34VR.js";import{F as re,H as oe}from"./chunk-7ZG3IT7C.js";import{U as X,ba as Y,ca as Z,ga as ee}from"./chunk-4TZHH5FC.js";import{L as K,da as b}from"./chunk-2JO2KWT3.js";import{Ca as g,Ta as U,pc as Q,xa as P}from"./chunk-QRWPEW3Z.js";import{s as G,t as F,u as T}from"./chunk-WV2APYWG.js";import{Qa as L,na as N,oa as y,qa as W,wa as $}from"./chunk-PJM2G7SG.js";import{Fa as _}from"./chunk-SDEDAHV6.js";import{b as R,c as v,d as J,l as S,m as n,o as j,r as q}from"./chunk-NNF6KCHD.js";import{b as h}from"./chunk-ES2ISFJC.js";import{a as d}from"./chunk-FTQLQJQV.js";import{randomUUID as V,createHash as fe}from"node:crypto";import{mkdtemp as ue,mkdir as pe,writeFile as D,rm as me}from"node:fs/promises";import he from"node:os";import E from"node:path";var ne=d(async e=>{let a=g(e.packageValue);if(e.grader.runtime!=="sandbox_process")throw new Error("Select the sandbox process runtime for a local file grader.");if(!a.taskset.graders.some(r=>n(r)===n(e.grader)))throw new Error("The private grader differs from its package.");if(!a.taskset.tasks.some(r=>n(r)===n(e.task)))throw new Error("The private case differs from its package.");await e.authorize(),e.signal?.throwIfAborted();let i=await ue(E.join(he.tmpdir(),"profile-private-grade-")),t=V();try{for(let f of a.files.filter(l=>l.asset.visibility!=="policy")){let l=f.asset.path;if(E.isAbsolute(l)||l.split(/[\\/]/).some(u=>!u||u==="."||u===".."))throw new Error("Private grader asset path invalid.");let m=E.join(i,"package",l);await pe(E.dirname(m),{recursive:!0,mode:448}),await D(m,P(f),{mode:256})}await D(E.join(i,"request.json"),JSON.stringify({task:e.task,attempt:e.evidence,input:e.task.input,output:e.evidence.output,artifacts:"artifacts"in e.evidence?e.evidence.artifacts:[],expectedOutput:e.task.expectedOutput}),{mode:256});let r=`import fs from 'node:fs/promises'; const module=await import(${JSON.stringify("./package/"+e.grader.verifierRef.path)}); const result=await module[${JSON.stringify(e.grader.exportName??"verify")}](JSON.parse(await fs.readFile('request.json','utf8'))); console.log(JSON.stringify(result));`;await D(E.join(i,"runner.mjs"),r,{mode:256});let s=await ie({authorize:d(async()=>(await e.authorize(),e.signal?.throwIfAborted(),{candidateId:t,candidateRevision:1,ownerId:t,sessionId:t,turnId:t,sourceRoot:i,writablePaths:[]}),"authorize")})({candidateId:t,sessionId:t,turnId:t,expectedRevision:1,command:"/runtime/node --max-old-space-size=512 runner.mjs",timeoutMs:e.grader.timeoutMs,maxOutputBytes:7e4,signal:e.signal});if(await e.authorize(),e.signal?.throwIfAborted(),s.code!==0||s.timedOut||s.stdoutTruncated||s.stderrTruncated)throw new Error("Private grading sandbox did not complete.");return H.parse(JSON.parse(s.stdout))}finally{await me(i,{recursive:!0,force:!0})}},"executeLocalProfileVerifier");function Me(e){return async a=>{if(!a.manifest)throw new Error("The hosted grader requires its admitted manifest.");await a.authorize(),a.signal?.throwIfAborted();let i="artifacts"in a.evidence&&Array.isArray(a.evidence.artifacts)?a.evidence.artifacts.map(({reference:l,title:m,contentType:u})=>({reference:l,title:m,contentType:u})):[],t="caseOwner"in a.evidence?a.evidence.caseOwner:null;if(!t?.sessionId||!t.turnId)throw new Error("The private grader has no sealed case owner.");let r=Buffer.from(JSON.stringify({manifest:a.manifest,packageValue:a.packageValue,graderId:a.grader.id,taskId:a.task.id,evidence:{...a.evidence,artifacts:i}}));if(r.length>2e7)throw new Error("The private grading package exceeds its transport limit.");let o={callId:V(),sessionId:t.sessionId,turnId:t.turnId,sha256:fe("sha256").update(r).digest("hex"),sizeBytes:r.length,timeoutMs:a.grader.timeoutMs},s=d((l,m=12e4)=>e.request(oe.parse({contractVersion:re,requestId:V(),operation:"profile-evaluations/grade",params:l}),m),"request");for(let l=0;l<r.length;l+=98304)await a.authorize(),a.signal?.throwIfAborted(),await s({...o,action:"upload",offset:l,contentsBase64:r.subarray(l,l+98304).toString("base64")});let f=await s({...o,action:"execute"},a.grader.timeoutMs+12e4);return await a.authorize(),a.signal?.throwIfAborted(),H.parse(f)}}d(Me,"createHostedProfileVerifier");async function ge(e,a){let i=g(e);for(let r of i.taskset.graders){if(r.kind==="model_judge"&&(!a||r.calibrationStatus!=="passed"))throw new Error("This Profile requires its current calibrated judge and bounded private provider owner.");let o="verifierRef"in r?r.verifierRef:"rubricRef"in r?r.rubricRef:null;o&&A(i,o)}let t=i.taskset.metrics?.customAggregator;if(t){let r=i.files.find(o=>o.asset.path===t.module);if(!r||r.asset.visibility==="policy"||S(P(r))!==t.contentHash)throw new Error("The authored aggregate metric is not its exact private release.");new TextDecoder("utf8",{fatal:!0}).decode(P(r))}}d(ge,"preflightProfilePrivateGrading");function A(e,a){let i=e.files.find(t=>t.asset.id===a.id);if(!i||i.asset.visibility==="policy"||n(i.asset)!==n(a))throw new Error("The exact private grader asset is unavailable.");return new TextDecoder("utf8",{fatal:!0}).decode(P(i))}d(A,"readPrivate");async function $e(e){let a=g(e.packageValue);if(a.contentHash!==e.manifest.packageHash||a.taskset.contentHash!==e.manifest.tasksetRelease.contentHash)throw new Error("The private grading package changed its frozen Run identity.");await e.authorize(),await ge(a,!!e.executeBudgetedJudge),await e.authorize();let i=d(async({grader:o,task:s,evidence:f})=>{let l=e.signal;await e.authorize(),l?.throwIfAborted();let m={manifest:e.manifest,packageValue:a,grader:o,task:s,evidence:f,signal:l,authorize:e.authorize},u=e.executeSandboxVerifier?await e.executeSandboxVerifier(m):o.runtime==="sandbox_process"?await ne(m):await te({source:A(a,o.verifierRef),exportName:o.exportName,runtime:o.runtime,timeoutMs:o.timeoutMs,signal:l,value:{task:s,attempt:f,input:s.input,output:f.output,artifacts:"artifacts"in f?f.artifacts:[],expectedOutput:s.expectedOutput,infrastructureError:f.infrastructureError??null}});return await e.authorize(),l?.throwIfAborted(),{score:u.score,passed:u.passed,rewardEligible:o.rewardEligible,failureClass:null,feedback:[u.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:u.evidenceRefs}},"customVerifier"),t=a.taskset.metrics?.customAggregator,r=t?new TextDecoder("utf8",{fatal:!0}).decode(P(a.files.find(o=>o.asset.path===t.module))):void 0;return{authorize:e.authorize,customVerifier:i,...e.executeBudgetedJudge?{modelJudge:L({readRubric:d(async o=>{await e.authorize();let s=A(a,o);return await e.authorize(),s},"readRubric"),executeBudgeted:d(async(o,s)=>{await e.authorize(),s?.throwIfAborted();let f=await e.executeBudgetedJudge(o,s);return await e.authorize(),s?.throwIfAborted(),f},"executeBudgeted")})}:{},...r!==void 0?{metricSource:r,metricExecutor:d(async o=>{await e.authorize(),o.signal?.throwIfAborted();let s=await ae(o);return await e.authorize(),o.signal?.throwIfAborted(),s},"metricExecutor")}:{}}}d($e,"createProfilePrivateGradingOwner");import{promises as ve}from"node:fs";import ke from"node:path";async function at(e){let a=e.definition.tasksetRelease,i=await se(e.store,e.harnessRelease);if(!i)throw new Error("Evaluation Profile Harness release is unavailable.");let t=await Re({...e,runtime:i});if(t)return t;let r=await e.store.listTasksetRevisions(e.profileId);for(let o of r){if(a.id!==o.id&&a.id!==`taskset-release-${o.id}-r${o.revision}`)continue;let s=await we(e.storeDir,o);if(s.taskset.id===a.id&&s.taskset.contentHash===a.contentHash)return s}throw new Error(`Released Taskset ${a.id} is unavailable in Profile ${e.profileId}.`)}d(at,"loadLocalProfileEvaluationTaskset");async function we(e,a){let i=a.metadata.importedPackageHash;if(typeof i=="string"){let o=await Z(e,i);if(o.taskset.id!==a.id||o.taskset.revision!==a.revision)throw new Error("Imported evaluation Taskset differs from its local Profile revision.");return o}if(U(a)!==a.contentHash)throw new Error("Authored evaluation Taskset differs from its immutable revision.");let t=Q({taskset:a,adapterId:X(a)}),r=await ee({storeDir:e,taskset:a,content:{schemaVersion:"openpond.tasksetPackage.v1",taskset:t.tasksetRelease,environment:t.environmentRelease,verifierSet:t.verifierSetRelease}});return await Y(e,r),r}d(we,"loadCandidate");async function Re(e){let a=e.definition.tasksetRelease,i=e.runtime;if(i.release.harnessRelease.id!==e.harnessRelease.id||i.release.harnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("Evaluation Taskset runtime differs from its requested release.");let t=`evals/tasksets/${a.contentHash}.json`,r=i.release.harnessRelease.files.find(o=>o.path===t);if(r){if(r.visibility!=="verifier")throw new Error("Evaluation Taskset package is not verifier-private.");let o=await ve.readFile(ke.join(i.release.bundlePath,"source",...t.split("/")));if(S(o)!==r.contentHash)throw new Error("Released evaluation Taskset package bytes differ from their source receipt.");let s=g(JSON.parse(o.toString("utf8")));if(s.taskset.id!==a.id||s.taskset.contentHash!==a.contentHash)throw new Error("Released evaluation Taskset package differs from its definition.");return s}return null}d(Re,"loadReleasedProfileEvaluationTaskset");function C(e){return{id:W(e),label:"Selected Dataset evaluation",description:"Explicit sealed external Dataset evaluation recipe.",target:e.target,tasksetRelease:{id:e.dataset.id,contentHash:e.dataset.contentHash},split:e.split,taskIds:[...new Set(e.population.map(a=>a.taskId))],seeds:[...new Set(e.population.map(a=>a.seed))],criterion:e.criterion}}d(C,"externalProfileEvaluationDefinition");async function lt(e){let a=e.manifest.profileEvaluation,i=a?.externalDatasetBinding?y(a.externalDatasetBinding):null;if(!i)return null;if(!e.resolveExternalDataset)throw new Error("This owner has no authorized external Dataset resolver.");let t=await e.resolveExternalDataset(i,e.selected);await t.authorize();let r=g(t.packageValue),o=await e.loadCatalog({ref:e.selected.profileRef,sourceRevision:e.selected.sourceRevision,harnessRelease:e.selected.harnessRelease});if(n(t.binding)!==n(i)||i.profileId!==e.selected.profileRef.profileId||i.declaredProfileCatalogHash!==o.catalogHash||r.contentHash!==i.packageHash||n(r.taskset)!==n(e.taskset)||i.environmentHash!==n(r.taskset.environment)||i.privateDatasetClosureHash!==n(r.files.filter(l=>l.asset.visibility!=="policy").map(l=>l.asset)))throw new Error("External Dataset admission changed its actual Profile, package or private closure.");let s=C(i),f={schemaVersion:"openpond.profileEvaluations.v1",definitions:[s],suites:[]};if(T(e.manifest,e.taskset,f),!a||a.catalogHash!==n(f)||a.definitionHash!==n(s)||n(a.target)!==n(i.target))throw new Error("External Dataset manifest changed its derived definition.");return await t.authorize(),{...t,packageValue:r,definition:s,catalog:f}}d(lt,"admitProfileExternalDataset");var Pe=h.object({id:R,createdAt:J,definitionId:R,externalDatasetBinding:N.optional(),profileRef:K.optional(),profileSource:h.object({sourceRevision:h.string().min(1).max(500),harnessRelease:h.object({id:R,contentHash:v}).strict()}).strict().optional(),modelRef:q,hostModelConfigurationHash:v.optional(),hostArtifactHash:v.optional(),maximumSpendUsd:h.number().positive().max(1e4).optional(),expectedManifestHash:v.optional(),hostExperiment:h.object({definition:h.object({id:R,revision:h.number().int().positive(),contentHash:v}).strict().nullable(),configurationHash:v,project:h.object({id:R,revision:h.number().int().positive(),contentHash:v,targetId:R.nullable()}).strict().optional()}).strict().optional()}).strict();function vt(e){return async(a,i)=>{let t=Pe.parse(a);if(i?.requireExpectedManifestHash&&!t.expectedManifestHash)throw new Error("Profile evaluation execution requires the reviewed manifest hash.");if(t.profileSource&&!t.profileRef)throw new Error("An exact Profile source requires its accepted Profile reference.");let r=i?.selectedWorkflows??await e.selectedWorkflows(t.profileRef,t.profileSource);if(t.profileRef&&n(t.profileRef)!==n(r.profileRef))throw new Error("Profile preparation did not resolve the explicitly selected Profile.");if(t.profileSource&&(r.sourceRevision!==t.profileSource.sourceRevision||n(r.harnessRelease)!==n(t.profileSource.harnessRelease)))throw new Error("Profile preparation changed its explicitly pinned source.");let o=t.externalDatasetBinding?y(t.externalDatasetBinding):null,s=o?await(e.resolveExternalDataset?e.resolveExternalDataset(o,r):Promise.reject(new Error("This host has not qualified external Dataset Profile execution."))):null;if(s&&(await s.authorize(),n(y(s.binding))!==n(o)))throw new Error("External Dataset admission differs from the actual authorized recipe.");let f=await e.loadCatalog({ref:r.profileRef,sourceRevision:r.sourceRevision,harnessRelease:r.harnessRelease});if(o&&o.declaredProfileCatalogHash!==f.catalogHash)throw new Error("The original Profile verifier catalog changed.");let l=o?C(o):null;if(l&&t.definitionId!==l.id)throw new Error("Use the external recipe's own definition identity.");let m={schemaVersion:"openpond.profileEvaluations.v1",definitions:l?[l]:f.definitions,suites:l?[]:f.suites},u=l??f.definitions.find(c=>c.id===t.definitionId);if(!u)throw new Error(`Evaluation ${t.definitionId} is absent from the selected Profile release.`);let k=u.target,z=k.kind==="workflow"?r.workflows.find(c=>c.binding.workflowId===k.workflowId)?.binding:_.parse({schemaVersion:"openpond.profileComponentBinding.v1",profileId:r.profileRef.profileId,sourceRevision:r.sourceRevision,harnessRelease:r.harnessRelease,target:k});if(!z)throw new Error(`Evaluation workflow ${k.kind==="workflow"?k.workflowId:""} is absent from the selected Profile release.`);let w=g(s?.packageValue??await e.loadTasksetPackage(u,r.profileRef.profileId,r.harnessRelease)),p=w.taskset;if(p.id!==u.tasksetRelease.id||p.contentHash!==u.tasksetRelease.contentHash)throw new Error("Evaluation Taskset package differs from its released definition.");let le=p.environment.kind==="text"&&p.tools.length===0,M=p.environment.kind==="work"&&p.environment.entrypoint==="openpond-work-v1"&&p.tools.every(c=>["work_exec","work_save_output"].includes(c.name));if(!le&&!M)throw new Error("Profile evaluation supports text cases or Work cases with the built-in execution and output tools.");if(t.maximumSpendUsd!==void 0&&M&&!e.boundedWorkComputeAvailable)throw new Error("This host has not admitted budgeted Work compute.");if(p.tasks.some(c=>c.artifactRefs.length>b.maxAttachments||c.artifactRefs.some(x=>x.visibility!=="policy"||x.mediaType!=="application/pdf"||x.sizeBytes>b.maxAttachmentBytes)))throw new Error("Profile evaluation accepts only bounded policy-visible PDF task attachments.");if(!o&&!e.privateGradingPreflight&&(p.graders.some(c=>c.kind==="model_judge"||c.kind==="custom_verifier")||p.metrics?.aggregation==="custom"))throw new Error("Profile evaluation cannot run this Taskset's model judge, custom verifier, or custom metric in the current app-server runtime.");await e.privateGradingPreflight?.(w);let B={adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",placement:e.placement,runtimeVersion:"app-server-v1",capabilityReceipt:n({adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",packageHash:w.contentHash,connectedAppScopes:p.policy.connectedAppScopes})},ce={...$({catalog:m,definitionId:u.id,profileId:r.profileRef.profileId,sourceRevision:r.sourceRevision,harnessRelease:r.harnessRelease,environmentHash:n({packageHash:w.contentHash,runtimeTarget:B})}),...o?{externalDatasetBinding:o}:{},...e.sourceCandidate?{sourceCandidate:e.sourceCandidate}:{}};if(o&&(o.packageHash!==w.contentHash||o.environmentHash!==n(p.environment)||o.privateDatasetClosureHash!==n(w.files.filter(c=>c.asset.visibility!=="policy").map(c=>c.asset))))throw new Error("External Dataset package/environment/private closure changed.");let de=j.parse({provider:t.modelRef.providerId,model:t.modelRef.modelId,revision:null,artifactHash:t.hostArtifactHash??null,tokenizerRevision:null,chatTemplateHash:null}),O=await e.modelConfigurationHash(t.modelRef,t),I=G({schemaVersion:"openpond.tasksetRunManifest.v1",id:t.id,tasksetRelease:u.tasksetRelease,packageHash:w.contentHash,execution:{kind:"harness",harnessRelease:r.harnessRelease},profileEvaluation:ce,policy:{kind:"model",model:de,configurationHash:O},gradingRole:"evaluation",metricPolicy:F(p),population:o?o.population.map(c=>({...c,receiptId:`evaluation-${n([t.id,c.taskId,c.seed,c.fixtureId]).slice(0,32)}`})):u.taskIds.flatMap(c=>u.seeds.map(x=>({receiptId:`evaluation-${n([t.id,c,x]).slice(0,32)}`,taskId:c,seed:x,fixtureId:null}))),runtimeTarget:B,limits:{maxTurns:128,timeoutMs:p.environment.defaultTimeoutMs,maxOutputBytes:25e7,maximumSpendUsd:t.maximumSpendUsd??null},createdAt:t.createdAt,metadata:{sourceTasksetId:p.metadata.sourceTasksetId??p.id,...r.profileRef.source==="openpond_git"?{profileRepositoryId:r.profileRef.repositoryId}:{},...t.hostExperiment?{experimentDefinition:t.hostExperiment.definition,experimentConfigurationHash:t.hostExperiment.configurationHash,...t.hostExperiment.project?{project:t.hostExperiment.project}:{}}:{}}});if(T(I,p,m),s&&await s.authorize(),t.expectedManifestHash&&I.contentHash!==t.expectedManifestHash)throw new Error("Profile evaluation setup changed since preview; prepare the run again.");return{manifest:I,taskset:p,profileRef:r.profileRef,binding:z,modelRef:t.modelRef,modelConfigurationHash:O}}}d(vt,"createProfileEvaluationRunPreparationService");export{ne as a,Me as b,ge as c,$e as d,at as e,Re as f,lt as g,vt as h};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as Oe,c as He,e as ee,f as _e,l as Ue,m as Me,p as Ne,q as qe}from"./chunk-PQHTZ5CP.js";import{i as Ce,o as ke,q as Ae}from"./chunk-FPUUZQUP.js";import{F as b,J as Ee}from"./chunk-7ZG3IT7C.js";import{a as Q,b as Pe,h as xe}from"./chunk-5CMKGD43.js";import{Cd as _,Fd as W,Gd as Te,I as H,J as Ie,M as F,N,a as $}from"./chunk-2JO2KWT3.js";import{va as oe}from"./chunk-SDEDAHV6.js";import{X as he,Y as ve,_ as Z,b as le,ba as we,c as ue,ea as be,fa as V,ja as Se,la as ye,ma as Re,p as ce,r as pe,s as de,t as me,u as ge,w as fe}from"./chunk-DALJMSJG.js";import{y as M}from"./chunk-TGIB24K4.js";import{b as o}from"./chunk-ES2ISFJC.js";import{c as ie,d as B,f as ae,h as U}from"./chunk-H7IWJN7L.js";import{a}from"./chunk-FTQLQJQV.js";import{promises as re}from"node:fs";import pt from"node:os";import dt from"node:path";import{createServer as mt}from"node:http";import{randomBytes as gt}from"node:crypto";var st=o.discriminatedUnion("op",[o.strictObject({op:o.literal("set"),path:o.array(o.string().min(1)).min(1),value:o.unknown()}),o.strictObject({op:o.literal("unset"),path:o.array(o.string().min(1)).min(1)})]),ot=o.discriminatedUnion("action",[o.strictObject({action:o.literal("patch"),expectedRevision:o.string(),operations:o.array(st).max(100)}),o.strictObject({action:o.literal("replace"),expectedRevision:o.string(),text:o.string().max(1048576)}),o.strictObject({action:o.literal("validate"),text:o.string().max(1048576)}),o.strictObject({action:o.literal("restore"),expectedRevision:o.string(),revision:o.string()}),o.strictObject({action:o.literal("trust"),root:o.string(),accountId:o.string(),trusted:o.boolean()}),o.strictObject({action:o.literal("client-state"),owner:o.string(),patch:Se,importOnly:o.boolean().optional()})]);function De(n){let e=null;async function t(s,i){let l=U(n).config,c=null,p=null,u=null;try{c=await ue(l),u=await V(n,{projectRoot:s,accountId:i}),s||(e=u)}catch(w){p=B(w,l)}let g=u??(s?null:e);return{path:l,text:c,rawRevision:le(c),issue:p,effective:g,usingLastValid:!u&&!!g,applies:"next_turn",recoverableRevisions:await pe(n),clientState:p?null:await ye(n)}}a(t,"status");async function r(s){let i=ot.parse(s);return i.action==="validate"?{valid:!0,document:ce(i.text,U(n).config)}:(i.action==="patch"&&await fe(n,i.expectedRevision,i.operations),i.action==="replace"&&await de(n,i.expectedRevision,i.text),i.action==="restore"&&await me(n,i.revision,i.expectedRevision),i.action==="trust"&&await be(n,i.root,i.accountId,i.trusted),i.action==="client-state"?Re(n,i.owner,i.patch,i.importOnly):t())}return a(r,"mutate"),{status:t,mutate:r,schema:ge}}a(De,"createConfigurationPayloads");import{Buffer as Be}from"node:buffer";var G={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id, idempotency-key","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},it=25*1024*1024,j=class extends Error{constructor(t,r,s){super(s);this.status=t;this.code=r;this.name="HttpBodyError"}status;code;static{a(this,"HttpBodyError")}};function je(n,e,t={}){for(let[s,i]of Object.entries(G))e.setHeader(s,i);let r=Ve(n.headers.origin);return r?(e.setHeader("Vary",ct(e.getHeader("Vary"))),at(r,t)?(e.setHeader("Access-Control-Allow-Origin",r),{allowed:!0,origin:r}):{allowed:!1,origin:r}):{allowed:!0,origin:null}}a(je,"applyCorsHeaders");function at(n,e={}){if(n==="null")return!0;let t=Fe(n);return t?ut(t)?!0:new Set((e.allowedOrigins??[]).map(s=>s?Fe(s):null).filter(s=>!!s)).has(t):!1}a(at,"isAllowedCorsOrigin");function P(n,e,t){n.writeHead(e,{"Content-Type":"application/json",...G}),n.end(JSON.stringify(t))}a(P,"sendJson");function zt(n,e,t){n.writeHead(e,{"Content-Type":"text/plain; charset=utf-8",...G}),n.end(t)}a(zt,"sendText");function Yt(n,e,t,r){n.writeHead(e,{"Content-Type":r,"Content-Length":String(t.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...G}),n.end(t)}a(Yt,"sendBinary");async function te(n,e={}){let t=e.maxBytes??it,r=Ve(n.headers["content-type"]),s=[],i=0;for await(let c of n){let p=Be.from(c);if(i+=p.byteLength,i>t)throw new j(413,"request_body_too_large",`JSON request body exceeds ${t} bytes.`);s.push(p)}let l=Be.concat(s).toString("utf8").trim();if(!l)return{};if(!lt(r))throw new j(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(l)}catch{throw new j(400,"invalid_json","Request body is not valid JSON.")}}a(te,"readJson");function Le(n,e,t){let r=n.headers.authorization;return(typeof r=="string"&&r.startsWith("Bearer ")?r.slice(7):null)===t}a(Le,"hasAuth");function Ve(n){return Array.isArray(n)?n[0]??null:n??null}a(Ve,"headerValue");function lt(n){if(!n)return!1;let e=n.split(";")[0]?.trim().toLowerCase();return e==="application/json"||!!e?.endsWith("+json")}a(lt,"isJsonContentType");function Fe(n){try{let e=new URL(n);return e.protocol!=="http:"&&e.protocol!=="https:"?null:e.origin}catch{return null}}a(Fe,"normalizeOrigin");function ut(n){let e=new URL(n);return e.hostname==="localhost"||e.hostname==="127.0.0.1"||e.hostname==="::1"||e.hostname==="[::1]"}a(ut,"isLoopbackOrigin");function ct(n){let t=(Array.isArray(n)?n.join(", "):n?String(n):"").split(",").map(r=>r.trim()).filter(Boolean);return t.some(r=>r.toLowerCase()==="origin")||t.push("Origin"),t.join(", ")}a(ct,"appendVaryOrigin");function $e(n){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
|
|
3
|
-
<style nonce="${n}">body{font:16px system-ui;background:#171819;color:#eee;max-width:850px;margin:6vh auto;padding:24px}textarea{box-sizing:border-box;width:100%;min-height:280px;background:#222;color:#eee;padding:14px;border:1px solid #777;border-radius:8px;font:14px monospace}button,input,select{font:inherit;margin:6px;padding:8px}pre{white-space:pre-wrap}code{overflow-wrap:anywhere}button{cursor:pointer}p{line-height:1.5}</style>
|
|
4
|
-
<h1>OpenPond needs a storage repair</h1><p id="issue" role="alert">Loading recovery details\u2026</p><p><code id="file"></code></p>
|
|
5
|
-
<p id="action"></p><p>Migration backups and the source installation remain available. Execution services are stopped while recovery is open.</p>
|
|
6
|
-
<details id="editor"><summary>Edit configuration</summary><textarea id="text" aria-label="Configuration TOML" spellcheck="false"></textarea><button id="save">Validate and save</button><button id="reload">Reload file</button><select id="revisions" aria-label="Restore a verified configuration revision"><option value="">Restore a verified revision\u2026</option></select></details>
|
|
7
|
-
<details><summary>Migration sources and diagnostics</summary><pre id="migration"></pre><label>Previous app home <input id="appHome"></label><label>Previous account config <input id="configSource"></label><label>Configuration conflict choices (JSON from the preview) <textarea id="resolutions" aria-label="Migration conflict choices" spellcheck="false" placeholder='[{"path":["chat","steer_active_responses"],"choice":"existing"}]'></textarea></label><button id="preview">Preview migration</button><button id="migrate">Use these sources</button><button id="restart">Restart failed preparation</button><button id="diagnostics">Export diagnostics</button></details>
|
|
8
|
-
<button id="retry">Retry startup</button><p id="message" role="status"></p>
|
|
9
|
-
<script nonce="${n}">
|
|
10
|
-
let token='',state=null,editing=false,revision=null;
|
|
11
|
-
const el=id=>document.getElementById(id);
|
|
12
|
-
async function request(route,body){const r=await fetch(route,{method:body?'POST':'GET',headers:{'Content-Type':'application/json',Authorization:'Bearer '+token},body:body?JSON.stringify(body):undefined});const v=await r.json();if(!r.ok)throw Error(v.error||'Recovery request failed');return v;}
|
|
13
|
-
function message(error){el('message').textContent=error instanceof Error?error.message:String(error);}
|
|
14
|
-
async function load(){state=await request('/v1/recovery');el('issue').textContent=state.issue.message;el('action').textContent=state.issue.action;el('file').textContent=state.issue.path;el('migration').textContent=JSON.stringify(state.migration,null,2);if(!editing){el('text').value=state.config.text||'schema_version = 1\\n';revision=state.config.rawRevision;}el('revisions').replaceChildren(new Option('Restore a verified revision\u2026',''),...state.config.recoverableRevisions.map(r=>new Option(r.createdAt,r.revision)));el('editor').hidden=!state.configEditable;}
|
|
15
|
-
el('text').oninput=()=>{editing=true};
|
|
16
|
-
el('reload').onclick=()=>{editing=false;load().catch(message)};
|
|
17
|
-
el('save').onclick=async()=>{try{await request('/v1/configuration',{action:'replace',text:el('text').value,expectedRevision:revision});editing=false;await load();message('Configuration saved. Retry startup when ready.')}catch(e){message(e)}};
|
|
18
|
-
el('revisions').onchange=async e=>{if(!e.target.value)return;try{await request('/v1/configuration',{action:'restore',revision:e.target.value,expectedRevision:state.config.rawRevision});editing=false;await load();message('Verified revision restored.')}catch(e){message(e)}};
|
|
19
|
-
for(const [id,action] of [['preview','preview'],['migrate','migrate'],['restart','restart']])el(id).onclick=async()=>{try{const result=await request('/v1/recovery',{action,sourceAppHome:el('appHome').value||undefined,sourceConfig:el('configSource').value||undefined,resolutions:el('resolutions').value?JSON.parse(el('resolutions').value):undefined});el('migration').textContent=JSON.stringify(result,null,2);message(action==='preview'?'Review the source paths above.':'Migration operation completed; retry startup.')}catch(e){message(e)}};
|
|
20
|
-
el('diagnostics').onclick=()=>{if(!state)return;const blob=new Blob([JSON.stringify({issue:state.issue,migration:state.migration,config:{path:state.config.path,rawRevision:state.config.rawRevision,issue:state.config.issue}},null,2)],{type:'application/json'});const a=document.createElement('a');a.href=URL.createObjectURL(blob);a.download='openpond-recovery-diagnostics.json';a.click();URL.revokeObjectURL(a.href)};
|
|
21
|
-
el('retry').onclick=async()=>{try{await request('/v1/recovery',{action:'retry'});message('Starting OpenPond\u2026');const timer=setInterval(async()=>{try{const h=await(await fetch('/health')).json();if(!h.recovery){clearInterval(timer);const next=new URLSearchParams(location.hash.slice(1)).get('returnTo');if(next){const u=new URL(next);if(['localhost','127.0.0.1','[::1]'].includes(u.hostname)){location.replace(u.toString());return}}location.reload();}}catch{}},500)}catch(e){message(e)}};
|
|
22
|
-
(async()=>{const params=new URLSearchParams(location.hash.slice(1));token=params.get('openpondToken')||'';if(!token&&window.openpond?.getConnection)token=(await window.openpond.getConnection()).token;if(!token){message('Open the authenticated recovery URL from the launcher.');return}await load()})().catch(message);
|
|
23
|
-
</script></html>`}a($e,"startupRecoveryPage");var ft=o.strictObject({action:o.enum(["preview","migrate","restart","retry"]),sourceAppHome:o.string().optional(),sourceConfig:o.string().optional(),resolutions:he.optional()});function We(n){return n instanceof ie&&/^(PRIVATE_STORAGE_|UNSAFE_STORAGE_|INVALID_CONFIG|CONFIG_|MIGRATION_|SOURCE_CHANGED_|CREDENTIAL_|UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|INVALID_ACCOUNT_|MISSING_INSTRUCTION_|INVALID_PROFILE_|DATABASE_RECOVERY_)/.test(n.issue.code)}a(We,"isRecoverableStartupError");async function Ge(n,e,t){let r=/^(UNSUPPORTED_STORAGE_|INVALID_MIGRATION_|UNSAFE_STORAGE_|PRIVATE_STORAGE_)/.test(t.issue.code),s=r?await re.mkdtemp(dt.join(pt.tmpdir(),"openpond-recovery-")):n;return Oe(s,async()=>{let{token:i,tokenFile:l}=await Ue(s),c=De(n),p=t.issue,u,g=new Promise(f=>{u=f}),w=mt((f,h)=>{(async()=>{let S=new URL(f.url??"/","http://127.0.0.1");if(!je(f,h).allowed){P(h,403,{error:"Origin not allowed"});return}if(f.method==="OPTIONS"){P(h,204,{});return}if(f.method==="GET"&&S.pathname==="/health"){P(h,200,{ok:!0,server:"openpond-app-server",version:Pe,recovery:!0});return}if(f.method==="GET"&&S.pathname==="/"){let v=gt(18).toString("base64");h.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store","Content-Security-Policy":`default-src 'none'; script-src 'nonce-${v}'; style-src 'nonce-${v}'; connect-src 'self'; base-uri 'none'; frame-ancestors 'none'`}),h.end($e(v));return}if(!Le(f,S,i)){P(h,401,{error:"Unauthorized"});return}let T=!r;if(f.method==="GET"&&S.pathname==="/v1/recovery"){P(h,200,{issue:p,configEditable:T,config:r?{path:U(n).config,text:null,rawRevision:"unavailable",issue:p,recoverableRevisions:[]}:await c.status(),migration:await ve(n).catch(v=>({issue:B(v,n)}))});return}if(f.method==="POST"&&S.pathname==="/v1/configuration"&&T){P(h,200,await c.mutate(await te(f)));return}if(f.method==="POST"&&S.pathname==="/v1/recovery"){let v=ft.parse(await te(f));if(r&&v.action!=="retry"&&v.action!=="preview")throw t;if(v.action==="restart"){P(h,200,await we(n));return}if(v.action==="preview"||v.action==="migrate"){P(h,200,await Z(n,{sourceAppHome:v.sourceAppHome,sourceConfig:v.sourceConfig,resolutions:v.resolutions,dryRun:v.action==="preview"}));return}await Z(n),await V(n),P(h,200,{ready:!0}),u();return}P(h,503,{error:`${p.message} ${p.action}`,issue:p,recovery:!0})})().catch(S=>{p=B(S,n),P(h,422,{error:`${p.message} ${p.action}`,issue:p})})});await new Promise((f,h)=>{w.once("error",h),w.listen(e,"127.0.0.1",()=>{w.off("error",h),f()})});let x=w.address().port,k=`http://127.0.0.1:${x}`;return await He(s,k,"startup-recovery"),{url:k,port:x,token:i,tokenFile:l,storePath:U(n).database,repaired:g,close:a(async()=>{w.closeIdleConnections(),await new Promise((f,h)=>w.close(S=>S?h(S):f())),r&&await re.rm(s,{recursive:!0,force:!0})},"close")}}).catch(async i=>{throw r&&await re.rm(s,{recursive:!0,force:!0}),i})}a(Ge,"startRecoveryServer");import{createHash as Ht}from"node:crypto";import{createHash as ht,randomUUID as Je}from"node:crypto";var vt=o.object({updatedAt:o.string(),id:o.string().min(1)}).strict(),wt=o.object({entries:o.array(H).max(200),nextBefore:vt.nullable()}).strict(),bt=o.object({run:H,replayed:o.boolean()}).strict(),J=class{constructor(e){this.client=e}client;static{a(this,"HostedCreateImproveStorage")}async getCreateImproveRun(e){let t=await this.client.request({contractVersion:b,requestId:Je(),operation:"create-improve/execute",params:{action:"get",runId:e}});return t===null?null:H.parse(t)}async listCreateImproveRuns(e={}){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit??250))),r=Array.isArray(e.state)?[...e.state]:e.state?[e.state]:[],s=[],i=null;for(;s.length<t;){let l=wt.parse(await this.client.request({contractVersion:b,requestId:Je(),operation:"create-improve/execute",params:{action:"page",query:{profileId:e.profileId??null,targetKind:e.targetKind??null,targetId:e.targetId??null,state:r},before:i,limit:Math.min(50,t-s.length)}}));if(e.conversationId&&l.entries.some(c=>c.scope.conversationId!==e.conversationId))throw new Error("Hosted Create/Improve page crossed its conversation scope.");if(s.push(...l.entries),!l.nextBefore)break;if(l.entries.length===0||i&&(l.nextBefore.updatedAt>i.updatedAt||l.nextBefore.updatedAt===i.updatedAt&&l.nextBefore.id>=i.id))throw new Error("Hosted Create/Improve cursor did not advance.");i=l.nextBefore}return s}async upsertCreateImproveRun(e){let t=H.parse(e),r=`create-improve:${ht("sha256").update(JSON.stringify(t)).digest("hex")}`,s=await this.client.request({contractVersion:b,requestId:r,operation:"create-improve/execute",params:{action:"put",run:t}});return H.parse(o.object({run:o.unknown()}).strict().parse(s).run)}async mutateCreateImproveRun(e,t){let r=Ie.parse(e),s=await this.getCreateImproveRun(r.runId);if(!s)throw new Error(`Create/Improve run not found: ${r.runId}`);if(s.appliedActionIds.includes(r.actionId))return{run:s,replayed:!0};if(s.revision!==r.expectedRevision)throw new Error(`Create/Improve run changed from revision ${r.expectedRevision} to ${s.revision}. Refresh and try again.`);let i=H.parse(t(s));if(i.id!==s.id||i.revision!==s.revision+1||!i.appliedActionIds.includes(r.actionId))throw new Error("Create/Improve mutation must preserve identity, advance one revision and record its action.");return bt.parse(await this.client.request({contractVersion:b,requestId:r.actionId,operation:"create-improve/execute",params:{action:"mutate",mutation:r,next:i}}))}};import{randomUUID as yt}from"node:crypto";async function L(n,e){let t=n;for(;;)try{return await e(t)}catch(r){if(!St(r)||t<=1)throw r;t=Math.max(1,Math.floor(t/2))}}a(L,"hostedBoundedPage");function St(n){return n instanceof Error?n.message==="Host storage response is too large."||n.message==="Host storage request failed: host_storage_response_too_large":!1}a(St,"isOversizeResponse");var Rt=o.object({entries:o.array(o.object({sequence:o.number().int().positive(),event:$})).max(200),totalMatchingEvents:o.number().int().nonnegative(),remainingMatchingEvents:o.number().int().nonnegative()}).strict(),z=class{constructor(e){this.client=e}client;static{a(this,"HostedRuntimeEventStorage")}async runtimeEventsForSession(e,t={}){let r=t.limit==null?1e4:Math.max(0,Math.trunc(t.limit));if(r===0)return[];let s=Math.min(r,1e4),i=[],l=Math.max(0,t.afterSequence??0),c=0,p=t.names?new Set(t.names):null;for(;i.length<=s;){let u=await this.runtimeEventPageRows({sessionId:e,afterSequence:l,beforeSequence:null,limit:Math.min(200,s+1-i.length),excludeReasoningDeltas:t.excludeReasoningDeltas});for(let g of u.entries){if(g.sequence<=l)throw new Error("Host event cursor did not advance.");if(l=g.sequence,c+=1,c>1e4)throw new Error("Hosted runtime event scan exceeds 10,000 rows; use a narrower query.");(!p||p.has(g.event.name))&&i.push(g.event)}if(u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break}if(i.length>s||t.limit==null&&r===1e4&&i.length===s)throw new Error("Hosted runtime event read exceeds 10,000 rows; use a bounded cursor query.");return i}async persistedRuntimeEventsForSession(e,t={}){return this.runtimeEventsForSession(e,t)}async appendRuntimeEvent(e){let t=$.parse(e),r=await this.client.request({contractVersion:b,requestId:t.id,operation:"event/append",params:{event:t}});return o.object({event:$}).strict().parse(r).event}async runtimeEventPageRows(e){let t=Math.max(1,Math.min(1e3,Math.trunc(e.limit))),r=Math.max(0,Math.trunc(e.afterSequence)),s=e.beforeSequence,i=[],l=0,c=0;for(;i.length<t;){let p=Math.min(200,t-i.length),u=await L(p,async g=>Rt.parse(await this.client.request({contractVersion:b,requestId:`event-page:${yt()}`,operation:"events/page",params:{sessionId:e.sessionId,afterSequence:r,beforeSequence:s,limit:g,...e.excludeReasoningDeltas?{excludeReasoningDeltas:!0}:{}}})));if(i.length===0&&(l=u.totalMatchingEvents,c=u.remainingMatchingEvents),i=s===null?[...i,...u.entries]:[...u.entries,...i],u.entries.length===0||u.remainingMatchingEvents<=u.entries.length)break;if(s===null){let g=u.entries.at(-1).sequence;if(g<=r)throw new Error("Host event cursor did not advance.");r=g}else{let g=u.entries[0].sequence;if(g>=s)throw new Error("Host event cursor did not advance.");s=g}}return{entries:i,totalMatchingEvents:l,remainingMatchingEvents:c}}};import{randomUUID as I}from"node:crypto";var ze=o.object({revision:o.number().int().min(1),session:F}).strict(),Ye=o.object({revision:o.number().int().min(1),turn:N}).strict(),It=o.object({sessions:o.array(F).max(200),nextAfterId:o.string().min(1).nullable()}).strict(),Tt=o.object({turns:o.array(N).max(200),nextBeforeSortIndex:o.number().int().nonnegative().nullable()}).strict(),Y=class{constructor(e){this.client=e}client;static{a(this,"HostedSessionStorage")}async count(){let e=await this.client.request({contractVersion:b,requestId:I(),operation:"session/count",params:{}});return o.object({count:o.number().int().nonnegative()}).strict().parse(e).count}async get(e){let t=await this.client.request({contractVersion:b,requestId:I(),operation:"session/get",params:{sessionId:e}});return t===null?null:ze.parse(t)}async sessionCount(){return this.count()}async sessionShells(){let e=[],t=null;do{let r=await L(Math.min(10,1001-e.length),async s=>It.parse(await this.client.request({contractVersion:b,requestId:I(),operation:"session/page",params:{afterId:t,limit:s}})));if(e.push(...r.sessions),e.length>1e3)throw new Error("Hosted session list exceeds 1,000 rows; use a scoped page query.");if(r.nextAfterId!==null&&(r.sessions.length===0||t!==null&&r.nextAfterId<=t))throw new Error("Host session cursor did not advance.");t=r.nextAfterId}while(t!==null);return e}async getSession(e){return(await this.get(e))?.session??null}async insertSessionAtFront(e){await this.put({session:e,expectedRevision:null,requestId:I()})}async updateSession(e,t){let r=await this.get(e);if(!r)return null;let s=F.parse(t(r.session));if(s.id!==e)throw new Error("A session update cannot change its identity.");return(await this.put({session:s,expectedRevision:r.revision,requestId:I()})).session}async put(e){let t=F.parse(e.session);return ze.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"session/put",params:{sessionId:t.id,expectedRevision:e.expectedRevision,session:t}}))}async readTurn(e){let t=await this.client.request({contractVersion:b,requestId:I(),operation:"turn/get",params:{turnId:e}});return t===null?null:Ye.parse(t)}async getTurn(e){return(await this.readTurn(e))?.turn??null}async turnsForSession(e,t=50){let r=Math.max(1,Math.min(1e3,Math.trunc(t))),s=[],i=null;for(;s.length<r;){let l=await L(Math.min(200,r-s.length),async c=>Tt.parse(await this.client.request({contractVersion:b,requestId:I(),operation:"turn/page",params:{sessionId:e,beforeSortIndex:i,limit:c}})));if(s.push(...l.turns),l.nextBeforeSortIndex===null)break;if(i!==null&&l.nextBeforeSortIndex>=i)throw new Error("Host turn cursor did not advance.");i=l.nextBeforeSortIndex}return s}async countTurnsForSession(e){let t=await this.client.request({contractVersion:b,requestId:I(),operation:"turn/count",params:{sessionId:e}});return o.object({count:o.number().int().nonnegative()}).strict().parse(t).count}async hasSubagentParentWakeTurn(e,t){return await this.wakeCount(e,"messageId",t)>0}async countSubagentParentWakeTurns(e,t){return this.wakeCount(e,"fromRunId",t)}async latestAssistantTextForSession(e){let t=await this.client.request({contractVersion:b,requestId:I(),operation:"events/latestAssistantText",params:{sessionId:e}});return o.object({text:o.string().nullable()}).strict().parse(t).text}async wakeCount(e,t,r){let s=await this.client.request({contractVersion:b,requestId:I(),operation:"turn/wakeCount",params:{sessionId:e,key:t,value:r}});return o.object({count:o.number().int().nonnegative()}).strict().parse(s).count}async latestTurnForSession(e,t){let r=await this.client.request({contractVersion:b,requestId:I(),operation:"turn/latest",params:{sessionId:e,status:t??null}});return r===null?null:N.parse(r)}async latestPersistedTurnForSession(e,t){return this.latestTurnForSession(e,t)}async insertTurn(e){await this.putTurn({turn:e,expectedRevision:null,requestId:I()})}async updateTurn(e,t){let r=await this.readTurn(e);if(!r)return null;let s=N.parse(t(r.turn));if(s.id!==e||s.sessionId!==r.turn.sessionId)throw new Error("A turn update cannot change its identity.");return(await this.putTurn({turn:s,expectedRevision:r.revision,requestId:I()})).turn}async putTurn(e){let t=N.parse(e.turn);return Ye.parse(await this.client.request({contractVersion:b,requestId:e.requestId,operation:"turn/put",params:{sessionId:t.sessionId,turnId:t.id,expectedRevision:e.expectedRevision,turn:t}}))}};import{createHash as Pt,randomUUID as xt}from"node:crypto";var C=o.object({ok:o.literal(!0)}).strict(),K=o.array(_),Et=o.array(o.string()),Ct=o.object({turnId:o.string(),run:M}).strict(),kt=o.object({inputs:o.array(_).max(10),hasMore:o.boolean()}).strict(),At=o.object({items:o.array(W).max(10),hasMore:o.boolean()}).strict(),Ot=o.object({items:o.array(o.string()).max(200),hasMore:o.boolean()}).strict();function X(n,e){return`inbox:${n}:${Pt("sha256").update(JSON.stringify(e)).digest("hex")}`}a(X,"retryKey");var q=class{constructor(e){this.client=e}client;static{a(this,"HostedTaskInboxStorage")}async call(e,t,r=xt()){let s=await this.client.request({contractVersion:b,requestId:r,operation:"task-inbox/execute",params:e});return t.parse(s)}async inputPages(e,t=Number.MAX_SAFE_INTEGER){let r=[],s=0;for(;r.length<t;){let i=await this.call(e(s),kt);for(let l of i.inputs){if(l.sequence<=s)throw new Error("Host task input cursor did not advance.");if(s=l.sequence,r.push(l),r.length>=t)break}if(!i.hasMore)return r;if(i.inputs.length===0)throw new Error("Host task input page made no progress.")}return r}async recoverTaskInboxOwners(e){return this.call({action:"recoverTaskInboxOwners",ownerId:e},o.array(o.object({sessionId:o.string(),turnId:o.string()}).strict()))}async hasTaskCompletion(e){return this.call({action:"hasTaskCompletion",turnId:e},o.boolean())}async taskInboxSnapshot(e){let t=await this.call({action:"taskInboxSnapshot",sessionId:e},Te),[r,s]=await Promise.all([this.inputPages(i=>({action:"taskInboxSnapshotInputs",sessionId:e,afterSequence:i})),this.taskWaitsForSession(e)]);return{...t,inputs:r,waits:s}}async declareTaskWork(e,t,r,s){await this.call({action:"declareTaskWork",sessionId:e,turnId:t,ownerId:r,areas:s},C)}async taskWorkAreas(e){return this.call({action:"taskWorkAreas",sessionId:e},Et)}async admitTaskInput(e){return this.call({action:"admitTaskInput",input:e},_)}async admitTaskInputs(e){return this.call({action:"admitTaskInputs",inputs:e},K)}async rejectTaskInput(e,t){await this.call({action:"rejectTaskInput",id:e,error:t},C)}async getTaskInput(e){return this.call({action:"getTaskInput",id:e},_.nullable())}async taskInputsForSession(e,t={}){let r=Math.max(1,Math.min(500,t.limit??128)),s=[],i=t.afterSequence??0;for(;s.length<r;){let l=Math.min(10,r-s.length),c=await this.call({action:"taskInputsForSession",sessionId:e,query:{afterSequence:i,pendingOnly:t.pendingOnly,limit:l}},K);if(!c.length)break;for(let p of c){if(p.sequence<=i)throw new Error("Host task input cursor did not advance.");i=p.sequence,s.push(p)}if(c.length<l)break}return s}async mutateTaskInput(e,t,r){return this.call({action:"mutateTaskInput",sessionId:e,inputId:t,change:r},_,X("mutate",{sessionId:e,inputId:t,change:r}))}async openTaskInboxTurn(e,t,r){await this.call({action:"openTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},C,X("open",{sessionId:e,turnId:t,ownerId:r}))}async renewTaskInboxTurn(e,t,r){await this.call({action:"renewTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},C)}async pendingTaskInputs(e,t){return this.inputPages(r=>({action:"pendingTaskInputs",sessionId:e,turnId:t,afterSequence:r}))}async taskAssignmentInputs(e){return this.inputPages(t=>({action:"taskAssignmentInputs",turnId:e,afterSequence:t}))}async pauseTaskInboxTurn(e,t,r){await this.call({action:"pauseTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},C)}async includeTaskInputs(e,t,r,s){return this.call({action:"includeTaskInputs",sessionId:e,turnId:t,ownerId:r,requestId:s},K,X("include",{sessionId:e,turnId:t,ownerId:r,requestId:s}))}async settleTaskInputRequest(e,t){await this.call({action:"settleTaskInputRequest",requestId:e,outcome:t},C)}async sealTaskInboxTurn(e,t,r){return this.call({action:"sealTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},o.boolean())}async sealNativeTaskInboxTurn(e,t,r){return this.call({action:"sealNativeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r},K)}async closeTaskInboxTurn(e,t,r,s){await this.call({action:"closeTaskInboxTurn",sessionId:e,turnId:t,ownerId:r,outcome:s},C)}async taskInboxPaused(e){return this.call({action:"taskInboxPaused",sessionId:e},o.boolean())}async reserveTaskFollowup(e,t,r){return this.call({action:"reserveTaskFollowup",sessionId:e,turnId:t,ownerId:r},_.nullable(),X("reserve",{sessionId:e,turnId:t,ownerId:r}))}async taskInboxWakeTargets(){let e=[],t="";for(;;){let r=await this.call({action:"taskInboxWakeTargets",afterSessionId:t},Ot);for(let s of r.items){if(s<=t)throw new Error("Host task wake cursor did not advance.");t=s,e.push(s)}if(!r.hasMore)return e;if(!r.items.length)throw new Error("Host task wake page made no progress.")}}async createTaskWait(e){return this.call({action:"createTaskWait",value:e},W)}async settleTaskWait(e,t){return this.call({action:"settleTaskWait",id:e,state:t},W)}async taskWaitsForSession(e){let t=[],r="";for(;;){let s=await this.call({action:"taskWaitsForSession",sessionId:e,afterId:r},At);for(let i of s.items){if(i.id<=r)throw new Error("Host task wait cursor did not advance.");r=i.id,t.push(i)}if(!s.hasMore)return t;if(!s.items.length)throw new Error("Host task wait page made no progress.")}}async commitSubagentCompletion(e,t){await this.call({action:"commitSubagentCompletion",value:e,turnId:t},C)}async pendingTaskCompletions(e=""){let t=[],r=e;for(;t.length<100;){let s=await this.call({action:"pendingTaskCompletions",afterTurnId:r},o.array(Ct).max(10));for(let i of s){if(i.turnId<=r)throw new Error("Host task completion cursor did not advance.");r=i.turnId,t.push(i)}if(s.length<10)break}return t}async settleTaskCompletion(e,t){await this.call({action:"settleTaskCompletion",turnId:e,inputId:t},C)}async upsertSubagentRun(e){return this.call({action:"upsertSubagentRun",value:M.parse(e)},M)}async getSubagentRun(e){return this.call({action:"getSubagentRun",id:e},M.nullable())}async listSubagentRuns(e={}){let r=[],s="",i=e.status?Array.isArray(e.status)?[...e.status]:[e.status]:null;for(;;){let l=await this.call({action:"listSubagentRuns",query:{parentSessionId:e.parentSessionId,childSessionId:e.childSessionId,status:i,afterId:s,limit:10}},o.array(M).max(10));for(let c of l){if(c.id<=s)throw new Error("Host subagent run cursor did not advance.");if(s=c.id,r.push(c),r.length>1e3)throw new Error("Hosted subagent run list exceeds 1,000 rows; use a narrower session or status query.")}if(l.length<10)break}return r.sort((l,c)=>(c.updatedAt??c.createdAt).localeCompare(l.updatedAt??l.createdAt)),e.limit===void 0?r:r.slice(0,Math.max(1,Math.min(1e3,e.limit)))}async listActiveSubagentRuns(e={}){return this.listSubagentRuns({...e,status:e.status??["queued","running","needs_resume"]})}};var ne=class extends q{static{a(this,"HostedTurnRepository")}sessions;events;approvals;usage;createImprove;constructor(e){super(e),this.sessions=new Y(e),this.events=new z(e),this.approvals=new Ne(e),this.usage=new qe(e),this.createImprove=new J(e)}sessionShells(){return this.sessions.sessionShells()}sessionCount(){return this.sessions.sessionCount()}getSession(e){return this.sessions.getSession(e)}insertSessionAtFront(e){return this.sessions.insertSessionAtFront(e)}updateSession(e,t){return this.sessions.updateSession(e,t)}getTurn(e){return this.sessions.getTurn(e)}insertTurn(e){return this.sessions.insertTurn(e)}updateTurn(e,t){return this.sessions.updateTurn(e,t)}latestTurnForSession(e,t){return this.sessions.latestTurnForSession(e,t)}latestPersistedTurnForSession(e,t){return this.sessions.latestPersistedTurnForSession(e,t)}turnsForSession(e,t){return this.sessions.turnsForSession(e,t)}countTurnsForSession(e){return this.sessions.countTurnsForSession(e)}hasSubagentParentWakeTurn(e,t){return this.sessions.hasSubagentParentWakeTurn(e,t)}countSubagentParentWakeTurns(e,t){return this.sessions.countSubagentParentWakeTurns(e,t)}latestAssistantTextForSession(e){return this.sessions.latestAssistantTextForSession(e)}appendRuntimeEvent(e){return this.events.appendRuntimeEvent(e)}runtimeEventsForSession(e,t){return this.events.runtimeEventsForSession(e,t)}persistedRuntimeEventsForSession(e,t){return this.events.persistedRuntimeEventsForSession(e,t)}async runtimeEventsForTurn(e,t){let r=await this.getTurn(e);if(!r)return[];let s=(await this.events.runtimeEventsForSession(r.sessionId)).filter(i=>i.turnId===e&&(!t?.names||t.names.includes(i.name)));return t?.limit==null?s:s.slice(0,Math.max(0,t.limit))}runtimeEventPageRows(e){return this.events.runtimeEventPageRows(e)}getApproval(e){return this.approvals.getApproval(e)}async upsertApproval(e){let t=await this.approvals.readApproval(e.id);t&&JSON.stringify(t.approval)===JSON.stringify(e)||await this.approvals.putApproval({approval:e,expectedRevision:t?.revision??null,requestId:`approval:${Ht("sha256").update(JSON.stringify({approval:e,revision:t?.revision??null})).digest("hex")}`})}upsertModelUsageRecord(e){return this.usage.upsertModelUsageRecord(e)}listModelUsageRecords(e){return this.usage.listModelUsageRecords(e)}getCreateImproveRun(e){return this.createImprove.getCreateImproveRun(e)}listCreateImproveRuns(e){return this.createImprove.listCreateImproveRuns(e)}upsertCreateImproveRun(e){return this.createImprove.upsertCreateImproveRun(e)}mutateCreateImproveRun(e,t){return this.createImprove.mutateCreateImproveRun(e,t)}};function Ke(n){return new ne(n)}a(Ke,"createHostedRuntimeCoreStorage");function se(n=process.env){let e=n.OPENPOND_API_KEY?.trim(),t=n.OPENPOND_OPCHAT_API_URL?.trim(),r=n.OPENPOND_HOSTED_MODEL_ID?.trim();if(!e||!t||!r)throw new Error("Hosted model stream requires a host credential, API URL, and admitted model.");let s=new URL(t);if(s.protocol!=="https:"||s.username||s.password||s.search||s.hash)throw new Error("Hosted model stream API URL is invalid.");return a(async function*(l){if(l.model!==r)throw new Error("Hosted model selection changed outside host admission.");yield*Ce({...l,apiBaseUrl:s.toString(),token:e,model:r})},"streamHostedModel")}a(se,"createHostedModelStreamFromEnvironment");import{existsSync as _t}from"node:fs";import{lstat as Ut,readFile as Mt,realpath as Nt}from"node:fs/promises";import y from"node:path";import{fileURLToPath as qt}from"node:url";var Xe=y.dirname(qt(import.meta.url));function R(n,e,t){let r=n[e+1];if(!r||r.startsWith("--"))throw new Error(`${t} requires a value.`);return r}a(R,"requireValue");function Ze(n,e){let t=Number.parseInt(n,10);if(!Number.isFinite(t)||t<0||t>65535)throw new Error(`${e} must be a port from 0 to 65535.`);return t}a(Ze,"parsePort");function tt(n){let e="serve",t=Q,r=17874,s=null,i=!1,l=!1,c=null,p,u=!1,g,w,x,k=null,f=null,h=null,S=null,T,v="sqlite_bundle",A=0,E=n[0];if(E&&!E.startsWith("-")){if(E==="serve"||E==="server")e="serve";else if(E==="app-server")e="app-server";else if(E==="web")e="web";else{if(E==="help")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:l,storeDir:c,runtimeStorage:v,help:!0};throw new Error(`Unknown command: ${E}`)}A=1}for(let m=A;m<n.length;m+=1){let d=n[m];if(d==="--help"||d==="-h")return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:l,storeDir:c,runtimeStorage:v,help:!0};if(d==="--listen"){let O=xe(R(n,m,d));t=O.host,r=Ze(String(O.port),d),m+=1}else if(d==="--hostname"||d==="--host")t=R(n,m,d),m+=1;else if(d==="--port")r=Ze(R(n,m,d),d),m+=1;else if(d==="--web-root")s=y.resolve(R(n,m,d)),m+=1;else if(d==="--source-browser-state")x=y.resolve(R(n,m,d)),m+=1;else{if(d==="--store-dir")throw new Error("--store-dir has been replaced by --home. Use --home <directory> or OPENPOND_HOME.");if(d==="--home")c=y.resolve(R(n,m,d)),m+=1;else if(d==="--hosted-cache-home")p=y.resolve(R(n,m,d)),m+=1;else if(d==="--experiment-owner")u=!0;else if(d==="--experiment-harness-package"){if(g)throw new Error("Duplicate Experiment Harness source package.");g=y.resolve(R(n,m,d)),m+=1}else if(d==="--runtime-storage"){if(R(n,m,d)!=="hosted-postgres")throw new Error("Unsupported app-server runtime storage.");v="hosted_postgres",m+=1}else if(d==="--profile-external-dataset-package"){if(w)throw new Error("Duplicate private external Dataset package.");w=y.resolve(R(n,m,d)),m+=1}else if(d==="--profile-source-root")k=y.resolve(R(n,m,d)),m+=1;else if(d==="--profile-repository-id")f=R(n,m,d),m+=1;else if(d==="--profile-id")h=R(n,m,d),m+=1;else if(d==="--profile-revision")S=R(n,m,d),m+=1;else if(d==="--hosted-profile-release"){if(T)throw new Error("Duplicate hosted Profile release descriptor.");let O=R(n,m,d);if(O.length>16e3||!/^[A-Za-z0-9_-]+$/.test(O))throw new Error("Invalid hosted Profile release descriptor.");try{T=Me.parse(JSON.parse(Buffer.from(O,"base64url").toString("utf8")))}catch{throw new Error("Invalid hosted Profile release descriptor.")}m+=1}else if(d==="--open-browser")i=!0;else if(d==="--print-access-url")l=!0;else throw new Error(`Unknown option: ${d}`)}}if(i&&l)throw new Error("--open-browser and --print-access-url cannot be used together.");if(e!=="web"&&(i||l))throw new Error("Browser options are only available in web mode.");let D=[k,f,h,S].filter(Boolean).length;if(D&&(D!==4||e!=="app-server"))throw new Error("Profile source flags require app-server mode and --profile-source-root, --profile-repository-id, --profile-id, and --profile-revision together.");if(v==="hosted_postgres"&&(e!=="app-server"||c||D))throw new Error("Hosted Postgres app-server cannot use --home or local Profile source flags.");if(T&&v!=="hosted_postgres")throw new Error("Hosted Profile release requires hosted Postgres app-server mode.");if(p&&v!=="hosted_postgres")throw new Error("Hosted cache home requires hosted Postgres mode.");if(u&&(e!=="app-server"||v!=="sqlite_bundle"||D||!c))throw new Error("Experiment owner mode requires an isolated app-server home without Profile selection.");if(g&&(!u||y.dirname(g)!==c))throw new Error("Experiment Harness source must be provisioned directly inside its isolated owner home.");return{mode:e,host:t,port:r,webRoot:s,openBrowser:i,printAccessUrl:l,storeDir:c,runtimeStorage:v,sourceBrowserState:x,...w?{profileExternalDatasetPackage:w}:{},...D?{profileSource:{repoPath:k,repositoryId:f,profileId:h,sourceRevision:S}}:{},...T?{admittedProfileRelease:T}:{},...p?{hostedCacheHome:p}:{},...u?{experimentOwner:!0}:{},...g?{experimentHarnessPackage:g}:{},help:!1}}a(tt,"parseCliArgs");function Dt(){return[process.env.OPENPOND_WEB_ROOT,y.resolve(process.cwd(),"apps/web/dist"),y.resolve(Xe,"../../web/dist"),y.resolve(process.cwd(),"web"),y.resolve(Xe,"../web")].filter(n=>!!n)}a(Dt,"defaultWebRootCandidates");function Bt(n){let e=n?[n]:Dt();for(let t of e){let r=y.resolve(t);if(_t(y.join(r,"index.html")))return r}return null}a(Bt,"resolveWebRoot");function Ft(n){let e=n==="0.0.0.0"||n==="::"?"127.0.0.1":n;return e.includes(":")&&!e.startsWith("[")?`[${e}]`:e}a(Ft,"formatHostForUrl");function jt(n){return`http://${Ft(n.status.host)}:${n.status.port}`}a(jt,"browserBaseUrl");function Lt(n,e){let t=new URL(n),r=new URLSearchParams;return r.set("openpondServerUrl",n),r.set("openpondToken",e),t.hash=r.toString(),t.toString()}a(Lt,"tokenizedWebUrl");async function Qe(n,e=Ae){let t=Lt(n.baseUrl,n.token);if(n.printAccessUrl)return{stdout:[`OpenPond access URL: ${t}`],stderr:[]};if(!n.openBrowser)return{stdout:[`OpenPond web UI: ${n.baseUrl}`],stderr:[]};let r=await e(t);return r.opened?{stdout:[`Opened OpenPond in your browser: ${n.baseUrl}`],stderr:[]}:{stdout:[`OpenPond access URL: ${t}`],stderr:[`Could not open the system browser: ${r.error}`]}}a(Qe,"resolveWebLaunchMessages");function rt(){console.log(`Usage:
|
|
24
|
-
openpond-app-server serve [--hostname HOST] [--port PORT]
|
|
25
|
-
openpond-app-server app-server [--home DIR]
|
|
26
|
-
openpond-app-server web [--hostname HOST] [--port PORT] [--web-root DIR]
|
|
27
|
-
|
|
28
|
-
Options:
|
|
29
|
-
--listen HOST:PORT Set host and port together
|
|
30
|
-
--hostname HOST Bind host (default ${Q})
|
|
31
|
-
--port PORT Bind port, or 0 for any free port (default ${17874})
|
|
32
|
-
--web-root DIR Directory containing the built web UI for web mode
|
|
33
|
-
--home DIR Local app-server state directory
|
|
34
|
-
--runtime-storage hosted-postgres Host-admitted Postgres app-server mode
|
|
35
|
-
--hosted-profile-release BASE64URL Host-admitted immutable Profile release descriptor
|
|
36
|
-
--profile-source-root DIR Authorized Profile repository source for app-server
|
|
37
|
-
--profile-repository-id ID Source repository identity supplied by the host
|
|
38
|
-
--profile-id ID Profile within that source
|
|
39
|
-
--profile-revision REV Accepted immutable source revision
|
|
40
|
-
--open-browser Open the authenticated web URL in the system browser
|
|
41
|
-
--print-access-url Print the authenticated URL instead of opening it
|
|
42
|
-
`)}a(rt,"printHelp");async function wn(n){let e=tt(process.argv.slice(2));if(e.help){rt();return}let t=e.mode==="web"?Bt(e.webRoot):null;if(e.mode==="web"&&!t)throw new Error("Could not find a built OpenPond web UI. Run `pnpm build:web` or pass --web-root.");if(e.mode==="app-server"){await nt(n.createOpenPondAppServer,e.storeDir,e.profileSource,e.runtimeStorage,e.admittedProfileRelease,e.hostedCacheHome,e.experimentOwner,e.experimentHarnessPackage,e.profileExternalDatasetPackage);return}e.storeDir&&(process.env.OPENPOND_HOME=e.storeDir);let r,s=e.port;for(;;)try{r=await n.createOpenPondServer({host:e.host,port:s,webRoot:t,sourceBrowserState:e.sourceBrowserState,...e.storeDir?{storeDir:e.storeDir}:{},httpEnabled:!0});break}catch(p){if(!We(p))throw p;let u=await Ge(ae({home:e.storeDir??void 0}),s,p);s=u.port,console.log(`OPENPOND_APP_SERVER_READY ${JSON.stringify({mode:"recovery",url:u.url,tokenFile:u.tokenFile,storePath:u.storePath})}`),console.error(`${p.issue.code}: ${p.issue.message} ${p.issue.action}`);let g=await Qe({baseUrl:u.url,openBrowser:e.openBrowser,printAccessUrl:e.printAccessUrl,token:u.token});for(let x of g.stdout)console.log(x);for(let x of g.stderr)console.error(x);let w=a(()=>{u.close().finally(()=>process.exit(0))},"close");process.once("SIGINT",w),process.once("SIGTERM",w);try{await u.repaired}finally{process.off("SIGINT",w),process.off("SIGTERM",w),await u.close()}}let i=e.mode==="web"?jt(r):null;if(console.log(`OPENPOND_APP_SERVER_READY ${JSON.stringify({mode:e.mode,url:r.url,webUrl:null,webRoot:t,tokenFile:r.tokenFile,storePath:r.storePath,runtime:ke()})}`),i){let p=await Qe({baseUrl:i,openBrowser:e.openBrowser,printAccessUrl:e.printAccessUrl,token:r.token});for(let u of p.stderr)console.error(u);for(let u of p.stdout)console.log(u)}else console.log(`OpenPond API server: ${r.url}`);let l=!1,c=a(async()=>{l||(l=!0,await r.close(),process.exit(0))},"shutdown");process.on("SIGINT",()=>{c()}),process.on("SIGTERM",()=>{c()}),await new Promise(()=>{})}a(wn,"runOpenPondServerCli");async function bn(n){let e=process.argv.slice(2),t=tt(!e[0]||e[0].startsWith("-")?["app-server",...e]:e);if(t.help){rt();return}if(t.mode!=="app-server")throw new Error("The app-server entrypoint only accepts the app-server command.");await nt(n,t.storeDir,t.profileSource,t.runtimeStorage,t.admittedProfileRelease,t.hostedCacheHome,t.experimentOwner,t.experimentHarnessPackage,t.profileExternalDatasetPackage)}a(bn,"runOpenPondAppServerCli");async function nt(n,e,t,r="sqlite_bundle",s,i,l=!1,c,p){let u=new Ee;if(r==="hosted_postgres"){if(e||t)throw new Error("Hosted Postgres app-server cannot use local storage sources.");await ee({appServer:a(()=>n({...i?{storeDir:i}:{},hostStorageClient:u,runtimeStorage:{kind:"hosted_postgres",client:u,core:Ke(u),inbox:new q(u),...s?{admittedProfileRelease:s}:{}},streamOpenPondHostedChatTurn:se()}),"appServer"),readable:process.stdin,writable:process.stdout,hostStorageClient:u});return}e&&(process.env.OPENPOND_HOME=e);let g;if(c){if(!l||!e||y.dirname(c)!==e||await Nt(c)!==c)throw new Error("Experiment Harness source escaped its isolated owner home.");let f=await Ut(c);if(!f.isFile()||f.size>67108864)throw new Error("Experiment Harness source package is not a bounded regular file.");g={ownerId:"host-experiment-case",sourcePackage:oe(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(await Mt(c))))}}let w=p?await(e&&t&&!l?_e(p,e):Promise.reject(new Error("External Dataset bootstrap requires a private explicit Profile owner."))):void 0,x=w?se():void 0,k=await n({...e?{storeDir:e}:{},...t?{profileSource:t}:{},...w?{profileExternalDataset:w,profileExternalDatasetClient:u,streamOpenPondHostedChatTurn:a(async function*(f){let h=a(async()=>{await u.request({contractVersion:1,requestId:crypto.randomUUID(),operation:"profile.externalDataset.authorize",params:{bindingHash:w.binding.contentHash}})},"fence");await h();let S=new AbortController,T=!1,v=setInterval(()=>{T||S.signal.aborted||(T=!0,h().catch(A=>S.abort(A)).finally(()=>{T=!1}))},2e3);try{let A=AbortSignal.any([...f.signal?[f.signal]:[],S.signal]);A.throwIfAborted();for await(let E of x({...f,signal:A}))await h(),A.throwIfAborted(),yield E}finally{clearInterval(v),S.abort()}},"streamOpenPondHostedChatTurn"),services:{webSearch:!1,scheduling:!1,connectedApps:!1,tasksets:!1,projectActions:!1,profileActions:!1,backgroundReview:!1}}:{},...g?{experimentHarnessSource:g}:{},...l?{experimentPolicyClient:u,services:{webSearch:!1,scheduling:!1,connectedApps:!1,tasksets:!1,projectActions:!1,profileActions:!1,backgroundReview:!1}}:{},hostStorageClient:u});await ee({appServer:k,readable:process.stdin,writable:process.stdout,hostStorageClient:u})}a(nt,"runAgentServer");export{De as a,j as b,je as c,P as d,zt as e,Yt as f,te as g,Le as h,Qe as i,wn as j,bn as k};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{$a as N,Qa as z,Sa as P,Va as x,Ya as G,ab as J,bb as U,db as W,kb as $}from"./chunk-QRWPEW3Z.js";import{U as V,e as C,f as O,fa as M,g as F,ha as B,vb as L}from"./chunk-PJM2G7SG.js";import{k as E,l as H,m as h}from"./chunk-NNF6KCHD.js";import{a as l}from"./chunk-FTQLQJQV.js";import{constants as Q}from"node:fs";import{lstat as ie,open as ce,readdir as le}from"node:fs/promises";import A from"node:path";import{createHash as q}from"node:crypto";import{mkdir as K,readdir as ae,readFile as I,writeFile as X}from"node:fs/promises";import d from"node:path";async function je(e,t){let a=x.parse(e),r=["tasks","assets","environment","graders","rubrics","comparisons","metrics","fixtures"];await Promise.all(r.map(g=>K(d.join(t,g),{recursive:!0})));let o=await re(a,t);if(a.metrics.customAggregator){let g=d.join(t,a.metrics.customAggregator.module),k=q("sha256").update(await I(g)).digest("hex");a=x.parse({...a,metrics:{...a.metrics,customAggregator:{...a.metrics.customAggregator,contentHash:k}}})}let n=d.join(t,"taskset.json"),s=d.join(t,"tasks","tasks.jsonl"),f=d.join(t,"graders","graders.json"),i=d.join(t,"fixtures","grader-fixtures.json"),u=d.join(t,"metrics","policy.json"),c=d.join(t,"assets","manifest.json"),m=d.join(t,"environment","contract.json"),w=d.join(t,"rubrics","preference-review.md"),v=d.join(t,"comparisons","policy.json");return await Promise.all([...J(a)].map(([g,k])=>X(d.join(t,g),k,"utf8"))),{directory:t,files:[n,s,c,m,f,w,v,u,i,...o],draft:a}}l(je,"writeTasksetDraftPackage");async function Re(e){let t=await se(e),a=q("sha256");for(let r of t)a.update(d.relative(e,r).replaceAll(d.sep,"/")),a.update("\0"),a.update(await I(r)),a.update("\0");return a.digest("hex")}l(Re,"hashTasksetDraftPackage");async function Y(e,t){let a=d.basename(e)==="taskset.json"?e:d.join(e,"taskset.json"),r=d.dirname(a),o=l(async f=>{if(!t)return I(f,"utf8");let i=t.get(d.relative(r,f).replaceAll(d.sep,"/"));if(!i)throw Object.assign(new Error("Authored file is absent."),{code:"ENOENT"});return new TextDecoder("utf-8",{fatal:!0}).decode(i)},"read"),n=JSON.parse(await o(a)),s=x.safeParse(n);if(s.success){let[f,i,u,c,m,w]=await Promise.all([ne(d.join(r,"tasks","tasks.jsonl"),o),S(d.join(r,"graders","graders.json"),o),S(d.join(r,"fixtures","grader-fixtures.json"),o),S(d.join(r,"metrics","policy.json"),o),S(d.join(r,"environment","contract.json"),o),S(d.join(r,"comparisons","policy.json"),o)]);return x.parse({...s.data,...f===null?{}:{tasks:f},...i===null?{}:{graders:i},...u===null?{}:{graderFixtures:u},...c===null?{}:{metrics:c},...m===null?{}:{environment:m},...w===null?{}:{review:w}})}return $(n)}l(Y,"readTasksetDraftPackage");async function re(e,t){let a=N(e),r=[];for(let o of a){let n=d.join(t,o.relativePath);await K(d.dirname(n),{recursive:!0});try{await X(n,o.source,{encoding:"utf8",flag:"wx"})}catch(s){if(!oe(s))throw s}r.push(n)}return r}l(re,"writeConfiguredStarterCode");async function se(e){let t=[];async function a(r){let o=await ae(r,{withFileTypes:!0});o.sort((n,s)=>n.name.localeCompare(s.name));for(let n of o){let s=d.join(r,n.name);if(n.isSymbolicLink())throw new Error(`Taskset workspaces cannot contain symbolic links: ${s}`);n.isDirectory()?await a(s):n.isFile()&&t.push(s)}}return l(a,"visit"),await a(e),t}l(se,"packageFiles");async function S(e,t=a=>I(a,"utf8")){try{return JSON.parse(await t(e))}catch(a){if(Z(a))return null;throw a}}l(S,"readOptionalJson");async function ne(e,t=a=>I(a,"utf8")){try{return(await t(e)).split(/\r?\n/).map(r=>r.trim()).filter(Boolean).map(r=>JSON.parse(r))}catch(a){if(Z(a))return null;throw a}}l(ne,"readOptionalJsonLines");function Z(e){return e instanceof Error&&"code"in e&&e.code==="ENOENT"}l(Z,"isMissingFile");function oe(e){return e instanceof Error&&"code"in e&&e.code==="EEXIST"}l(oe,"isFileExists");async function Oe(e){let t=A.resolve(e.directory);if(!(await ie(t)).isDirectory())throw new Error("Dataset upload requires a regular authored folder.");let a=new Map,r=0;async function o(c,m){if(m>30)throw new Error("Dataset folder nesting exceeds 30 levels.");for(let w of(await le(c,{withFileTypes:!0})).sort((v,g)=>v.name<g.name?-1:v.name>g.name?1:0)){if(w.name.startsWith("."))throw new Error("Dataset folders cannot include hidden files or directories.");if(w.isSymbolicLink()||!w.isDirectory()&&!w.isFile())throw new Error("Dataset folders can contain only regular files and directories.");let v=A.join(c,w.name);if(w.isDirectory()){await o(v,m+1);continue}if(a.size>=1e4)throw new Error("Dataset folder exceeds 10,000 files.");let g=await ce(v,Q.O_RDONLY|Q.O_NOFOLLOW);try{let k=await g.stat();if(!k.isFile()||k.size>U-r)throw new Error("Dataset folder exceeds the 64 MiB capture limit.");let j=new Uint8Array(k.size),R=0;for(;R<j.length;){let D=await g.read(j,R,j.length-R,R);if(!D.bytesRead)throw new Error("Dataset file changed during capture.");R+=D.bytesRead}let _=await g.stat();if(_.size!==k.size||_.mtimeMs!==k.mtimeMs||_.ctimeMs!==k.ctimeMs)throw new Error("Dataset file changed during capture.");r+=j.length,a.set(A.relative(t,v).replaceAll(A.sep,"/"),j)}finally{await g.close()}}}l(o,"visit"),await o(t,0);let n=await Y(t,a),s=[...a].map(([c,m])=>({path:c,contentHash:H(m),sizeBytes:m.byteLength})),f=h(s),i=x.parse({...n,id:e.datasetId??n.id,profileId:e.teamId,revision:e.expectedRevision+1,modelScope:null,status:"draft",publishedTasksetRef:null,metadata:{...n.metadata,importedTasksetPackage:{packageHash:f}}});return{workspace:W({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:i,files:[...a].filter(([c])=>!G(c)).map(([c,m])=>({path:c,base64:Buffer.from(m).toString("base64"),contentHash:H(m),sizeBytes:m.byteLength}))}),sourceHash:f,sourceFiles:s,capturedBytes:r}}l(Oe,"captureTasksetDraftWorkspace");async function ee(e){let{binding:t,rewards:a}=e.learning,r=M(t,a);if(e.graders.length!==r.length||r.some(({source:i,reward:u})=>!e.graders.some(c=>c.id===i.graderId&&c.version===String(u.revision)&&h(c.metadata.rewardBinding)===h(L(t)))))throw new Error("Prepared Taskset graders do not match their immutable Reward binding.");let o=V.parse({id:e.task.id,clusterKey:e.task.clusterKey,split:e.task.split,input:e.task.input,expectedOutput:e.task.expectedOutput,policyVisibleContext:e.task.policyVisibleContext,privilegedContextRef:e.task.privilegedContextRef,artifactRefs:[],tags:e.task.tags}),n=await B({binding:t,rewards:a,task:o,signal:e.signal,evidence:{output:e.attempt.output,artifactRefs:e.attempt.artifactRefs,runtimeEventRefs:e.attempt.runtimeEventRefs,infrastructureError:e.attempt.infrastructureError},customVerifier:e.customVerifier?async({grader:i})=>{let u=e.graders.find(m=>m.id===i.id);if(u?.kind!=="custom_verifier")throw new Error("Bound verifier projection is missing.");let c=await e.customVerifier({grader:u,task:e.task,attempt:e.attempt,signal:e.signal});return{score:c.score,passed:c.passed,rewardEligible:i.rewardEligible,failureClass:null,feedback:[c.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:c.evidenceRefs??[]}}:void 0,modelJudge:e.modelJudge?async({grader:i})=>{let u=e.graders.find(m=>m.id===i.id);if(u?.kind!=="model_judge")throw new Error("Bound judge projection is missing.");let c=await e.modelJudge({grader:u,task:e.task,attempt:e.attempt});return{score:c.score,passed:c.passed,rewardEligible:i.rewardEligible,failureClass:null,feedback:[c.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:c.evidenceRefs??[]}}:void 0}),s=n.training.status==="not_configured"?n.evaluation:n.training,f=h(e.graders);return{schemaVersion:"openpond.gradeResult.v1",id:`grade_${h([e.attempt.id,n.contentHash]).slice(0,24)}`,attemptId:e.attempt.id,graderSetHash:f,score:s.score,passed:s.passed===!0,components:n.results.map(i=>{let u=t.sources.find(m=>m.graderId===i.graderId),c=e.graders.find(m=>m.id===i.graderId);return{graderId:i.graderId,graderVersion:c.version,score:i.normalizedScore,passed:i.passed===!0,hardGate:u.hardGate,rewardEligible:u.role==="training"&&i.status==="scored",feedback:i.message?.trim()||null,evidenceRefs:i.evidenceHashes,judge:c.kind==="model_judge"?c.judge:null,calibrationStatus:c.kind==="model_judge"?c.calibrationStatus:"not_applicable"}}),failureClass:e.attempt.infrastructureError?"infrastructure_failure":s.status!=="scored"?"grader_failure":s.passed?null:"policy_failure",feedback:n.results.flatMap(i=>i.message?.trim()?[i.message.trim()]:[]),rewardEligible:n.training.status==="scored",rewardComposition:n,createdAt:e.now?.()??new Date().toISOString()}}l(ee,"gradeLearningBatchAttempt");async function at(e){if(e.learning)return ee({...e,learning:e.learning});if(e.graders.some(o=>o.metadata.rewardBinding!==void 0))throw new Error("This Taskset requires its immutable public Reward binding to grade an attempt.");let t=h(e.graders),a=[];for(let o of e.graders)e.signal?.throwIfAborted(),a.push(e.attempt.infrastructureError?b(o,null,!1,"Infrastructure failure; no reward was produced.",[],!1):await me(o,e.task,e.attempt,e.modelJudge,e.customVerifier,e.signal));let r=F({graders:e.graders,infrastructureError:e.attempt.infrastructureError,components:a.map(o=>({...o,failureClass:o.score===null?"grader_failure":o.passed?null:"policy_failure"}))});return{schemaVersion:"openpond.gradeResult.v1",id:`grade_${h([e.attempt.id,t,a]).slice(0,24)}`,attemptId:e.attempt.id,graderSetHash:t,score:r.score,passed:r.passed,components:a,failureClass:r.failureClass,feedback:e.attempt.infrastructureError?[e.attempt.infrastructureError]:a.flatMap(o=>o.feedback?[o.feedback]:[]),rewardEligible:r.rewardEligible,createdAt:e.now?.()??new Date().toISOString()}}l(at,"gradeAttempt");async function me(e,t,a,r,o,n){if(e.kind==="model_judge"){if(!r)return b(e,null,!1,"Model judge runner is unavailable.",[],!1);if(e.calibrationStatus!=="passed")return b(e,null,!1,"Model judge calibration has not passed.",[],!1);let f=await r({grader:e,task:t,attempt:a});return b(e,f.score,f.passed,f.feedback,f.evidenceRefs??[])}if(e.kind==="human")return b(e,null,!1,"Human review is pending.",[],!1);if(e.kind==="custom_verifier"){if(!o)return b(e,null,!1,"Sandboxed verifier runner is unavailable.",[],!1);let f=await o({grader:e,task:t,attempt:a,signal:n});return b(e,f.score,f.passed,f.feedback,f.evidenceRefs??[])}let s=C({grader:O(e),task:t,evidence:a});return b(e,s.score,s.passed,s.feedback,[...a.artifactRefs,...a.runtimeEventRefs])}l(me,"runGrader");function b(e,t,a,r,o,n=e.rewardEligible){let s=t!==null&&Number.isFinite(t)?Math.max(0,Math.min(1,t)):null;return{graderId:e.id,graderVersion:e.version,score:s,passed:s!==null&&a,hardGate:e.hardGate,rewardEligible:s!==null&&n,feedback:r,evidenceRefs:o,judge:e.kind==="model_judge"?e.judge:null,calibrationStatus:e.kind==="model_judge"?e.calibrationStatus:"not_applicable"}}l(b,"component");import{access as ue,mkdir as T,readFile as Vt,writeFile as y}from"node:fs/promises";import p from"node:path";async function Gt(e,t,a={}){let r=z.parse(e),o=P(r);if(!o.valid)throw new Error(o.issues.map(s=>`${s.code}: ${s.message}`).join(`
|
|
3
|
-
`));await T(p.join(t,"data"),{recursive:!0}),await T(p.join(t,"graders"),{recursive:!0}),await T(p.join(t,"environment"),{recursive:!0}),await T(p.join(t,"fixtures"),{recursive:!0});let n=[p.join(t,"taskset.json"),p.join(t,"capabilities.json"),p.join(t,"data","tasks.jsonl"),p.join(t,"graders","graders.json"),p.join(t,"fixtures","grader-fixtures.json"),p.join(t,"environment","taskset.ts")];await y(n[0],E(r),"utf8"),await y(n[1],E(r.capabilities),"utf8"),await y(n[2],r.tasks.map(s=>JSON.stringify(s)).join(`
|
|
4
|
-
`)+`
|
|
5
|
-
`,"utf8"),await y(n[3],E(r.graders),"utf8"),await y(n[4],E(r.graderFixtures),"utf8"),await y(n[5],pe(r),"utf8");for(let s of a.generatedFiles??[]){let f=te(s.path,s.role),i=p.join(t,f);await T(p.dirname(i),{recursive:!0}),await y(i,s.content,"utf8"),n.push(i)}for(let s of r.graders){if(s.kind!=="custom_verifier")continue;let f=te(s.module,"verifier");try{await ue(p.join(t,f))}catch{throw new Error(`Custom verifier ${s.id} is missing generated source ${f}.`)}}return{directory:t,files:n,taskset:r}}l(Gt,"buildTaskset");function te(e,t){let a=e.replaceAll("\\","/");if(p.posix.isAbsolute(a)||a.split("/").includes(".."))throw new Error(`Generated ${t} path must stay inside the Taskset: ${e}.`);let r=t==="verifier"?"graders/":t==="environment"?"environment/":"fixtures/";if(!a.startsWith(r))throw new Error(`Generated ${t} path must start with ${r}.`);return a}l(te,"safeGeneratedPath");function pe(e){return`// Generated by @openpond/taskset-sdk.
|
|
6
|
-
export const environment = ${JSON.stringify(e.environment,null,2)} as const;
|
|
7
|
-
export const tasks = ${JSON.stringify(e.tasks.map(t=>({id:t.id,input:t.input,split:t.split})),null,2)} as const;
|
|
8
|
-
`}l(pe,"generatedEnvironmentSource");export{je as a,Re as b,Y as c,Oe as d,at as e,Gt as f};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as e}from"./chunk-FTQLQJQV.js";import{createHash as d,randomUUID as u}from"node:crypto";function l(n){let t=n.explicitKey?.trim();if(t)return t;let r=n.sourceHead?.trim()||"unknown-source",s=n.targetProjectId?.trim()||"no-target-project",c=a(n.input).slice(0,16),i=`profile-push-run:${n.localHead}:${r}:${n.runtimeAgentId}:${s}:${c}`;return n.retry?`${i}:retry:${(n.randomId??u)()}`:i}e(l,"buildHostedRunIdempotencyKey");function a(n){return d("sha256").update(o(n)).digest("hex")}e(a,"hashStableJson");function o(n){return n===void 0?"undefined":n===null||typeof n!="object"?JSON.stringify(n)??"null":Array.isArray(n)?`[${n.map(t=>o(t)).join(",")}]`:`{${Object.entries(n).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>`${JSON.stringify(t)}:${o(r)}`).join(",")}}`}e(o,"stableJsonStringify");export{l as a};
|