openpond 0.2.63 → 0.2.64
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 +76 -2
- package/dist/app-server.js +1 -1
- package/dist/chunks/account-context-TIJOM22A.js +12 -0
- package/dist/chunks/acp-G5GCLP44.js +2 -0
- package/dist/chunks/acp-agent-JM5THNMF.js +19 -0
- package/dist/chunks/actions-command-VLKMHCMI.js +2 -0
- package/dist/chunks/app-layer-DZHMJUBC.js +3 -0
- package/dist/chunks/app-server-connected-apps-IB6M35NS.js +2 -0
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +2 -0
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +2 -0
- package/dist/chunks/app-server-runtime-6LCX46RF.js +2 -0
- package/dist/chunks/apps-7LPKIYRY.js +2 -0
- package/dist/chunks/{chunk-NZTCH6K5.js → chunk-2GJD23CM.js} +1 -1
- package/dist/chunks/{chunk-BKEDG3A4.js → chunk-2MEOUS24.js} +1 -1
- package/dist/chunks/{chunk-DUL6DXOI.js → chunk-2W22IXHB.js} +1 -1
- package/dist/chunks/{chunk-GGJUWIGR.js → chunk-36FNNR5N.js} +1 -1
- package/dist/chunks/chunk-3BJ7LPE3.js +2 -0
- package/dist/chunks/chunk-3MVKXAH7.js +2 -0
- package/dist/chunks/{chunk-UTNGEMW5.js → chunk-3WJQ4IGK.js} +1 -1
- package/dist/chunks/{chunk-G6OR5NB6.js → chunk-4D3CICBG.js} +1 -1
- package/dist/chunks/chunk-4DYWVGVS.js +2 -0
- package/dist/chunks/{chunk-KUPJNBWG.js → chunk-4JYTFEND.js} +1 -1
- package/dist/chunks/chunk-4MQHIFZL.js +2 -0
- package/dist/chunks/chunk-4TO743HO.js +4 -0
- package/dist/chunks/{chunk-B4RKHHF7.js → chunk-4TTXNVCE.js} +1 -1
- package/dist/chunks/{chunk-3YXYBYWK.js → chunk-4V73I4OL.js} +1 -1
- package/dist/chunks/chunk-55Q64WWF.js +2 -0
- package/dist/chunks/{chunk-F7QTIHXX.js → chunk-5AU5Y6KS.js} +1 -1
- package/dist/chunks/chunk-5HPZGLOL.js +2 -0
- package/dist/chunks/{chunk-LCSBCCYC.js → chunk-5JVJQA5H.js} +1 -1
- package/dist/chunks/chunk-5KJMFK65.js +2 -0
- package/dist/chunks/{chunk-BSPFY3Y5.js → chunk-5KWKSR4P.js} +1 -1
- package/dist/chunks/chunk-5WPMI6QX.js +2 -0
- package/dist/chunks/{chunk-SHJY5RLU.js → chunk-5Z3AU5CL.js} +1 -1
- package/dist/chunks/{chunk-DQI5TE6A.js → chunk-66HFW4OU.js} +1 -1
- package/dist/chunks/{chunk-NT7N6KLE.js → chunk-67HXM6AL.js} +1 -1
- package/dist/chunks/{chunk-J7ZTPXRQ.js → chunk-6C3CXME7.js} +1 -1
- package/dist/chunks/{chunk-PWK5Z5S3.js → chunk-6ESBAHWK.js} +1 -1
- package/dist/chunks/{chunk-XNOMIWEY.js → chunk-6I5AUTVO.js} +1 -1
- package/dist/chunks/{chunk-OG33QAG6.js → chunk-6S2MWJVD.js} +1 -1
- package/dist/chunks/{chunk-KCOTDUGW.js → chunk-6TRVEA3T.js} +1 -1
- package/dist/chunks/chunk-6ZTP6CUJ.js +2 -0
- package/dist/chunks/{chunk-4L6DU6Z2.js → chunk-7FBWUVX7.js} +1 -1
- package/dist/chunks/{chunk-GPL2Z65R.js → chunk-7P5SH3CI.js} +2 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +2 -0
- package/dist/chunks/chunk-7XOUM6RK.js +2 -0
- package/dist/chunks/chunk-A77DLBR4.js +2 -0
- package/dist/chunks/chunk-AF3AVDPP.js +2 -0
- package/dist/chunks/{chunk-RV7PUSI2.js → chunk-AJXWJLZA.js} +1 -1
- package/dist/chunks/chunk-AMC4Z7G4.js +2 -0
- package/dist/chunks/chunk-ANG2YMMD.js +2 -0
- package/dist/chunks/{chunk-ZPTKR3GB.js → chunk-B32CW3NT.js} +1 -1
- package/dist/chunks/{chunk-Y766IN7Y.js → chunk-B666Z2NS.js} +1 -1
- package/dist/chunks/chunk-BJXPQIVD.js +2 -0
- package/dist/chunks/{chunk-WBUK73ST.js → chunk-BL3CZWWD.js} +1 -1
- package/dist/chunks/{chunk-XMHIQ3SK.js → chunk-BTJACFU3.js} +2 -2
- package/dist/chunks/{chunk-25XXZS3E.js → chunk-C5B3FMV3.js} +1 -1
- package/dist/chunks/chunk-CRDKBFRN.js +2 -0
- package/dist/chunks/chunk-CYQLXS2U.js +2 -0
- package/dist/chunks/{chunk-N4VHLJBZ.js → chunk-D7R2AAX2.js} +1 -1
- package/dist/chunks/{chunk-LSZJ5M3X.js → chunk-DAEUVT2I.js} +1 -1
- package/dist/chunks/{chunk-ELX7VRSU.js → chunk-DIDQHTAX.js} +1 -1
- package/dist/chunks/chunk-DMO3UIS7.js +6 -0
- package/dist/chunks/{chunk-4BJGUCHY.js → chunk-DRMOHADV.js} +1 -1
- package/dist/chunks/{chunk-FYYYECHE.js → chunk-DSJZS77R.js} +4 -4
- package/dist/chunks/{chunk-7HRLWPPZ.js → chunk-DXA2UHBE.js} +1 -1
- package/dist/chunks/{chunk-T6JN4PND.js → chunk-EBOTNBUS.js} +1 -1
- package/dist/chunks/chunk-ECOH24MC.js +9 -0
- package/dist/chunks/{chunk-6PKXJEJM.js → chunk-EICS777E.js} +1 -1
- package/dist/chunks/{chunk-4SZ3HKHU.js → chunk-EVQISX7M.js} +1 -1
- package/dist/chunks/{chunk-2HAWOMZK.js → chunk-EW7CD7OA.js} +1 -1
- package/dist/chunks/chunk-FEQ7HNJR.js +2 -0
- package/dist/chunks/{chunk-IWWXIUAQ.js → chunk-FHLSLOKH.js} +8 -8
- package/dist/chunks/{chunk-BU27SLZP.js → chunk-FS2VKOT7.js} +1 -1
- package/dist/chunks/{chunk-4FNCBA3Y.js → chunk-FUFI4THX.js} +1 -1
- package/dist/chunks/{chunk-W5W4IODW.js → chunk-FYWQWKVS.js} +1 -1
- package/dist/chunks/{chunk-IZ56L2ZK.js → chunk-G4747MOW.js} +1 -1
- package/dist/chunks/{chunk-J572ANHX.js → chunk-G4E3WGLM.js} +4 -4
- package/dist/chunks/{chunk-P7HRF4FM.js → chunk-GD3RCUDH.js} +1 -1
- package/dist/chunks/{chunk-HUCBKXTU.js → chunk-GDJ4X2ZN.js} +1 -1
- package/dist/chunks/{chunk-JHR3LF2F.js → chunk-GF55VEMR.js} +1 -1
- package/dist/chunks/{chunk-GXCUH2VV.js → chunk-GFAI2MCJ.js} +3 -3
- package/dist/chunks/{chunk-KOKX7PBS.js → chunk-GI7LTJV3.js} +1 -1
- package/dist/chunks/{chunk-TCOTXCV6.js → chunk-GIU3Z45P.js} +1 -1
- package/dist/chunks/chunk-GKLZQN6P.js +161 -0
- package/dist/chunks/{chunk-GXZCMO6S.js → chunk-GRLQHYAU.js} +2 -2
- package/dist/chunks/{chunk-M3SCON53.js → chunk-GUG2SWRZ.js} +1 -1
- package/dist/chunks/{chunk-JQRMDFF3.js → chunk-H42UW6IF.js} +1 -1
- package/dist/chunks/{chunk-EZRUWIP6.js → chunk-H5ML7735.js} +1 -1
- package/dist/chunks/{chunk-VNJAAYNQ.js → chunk-HIQPGYVH.js} +1 -1
- package/dist/chunks/{chunk-DLANLLKH.js → chunk-HNDAGZCF.js} +1 -1
- package/dist/chunks/{chunk-OE22TAXP.js → chunk-HNQPEOJD.js} +1 -1
- package/dist/chunks/chunk-HORMGT2Q.js +2 -0
- package/dist/chunks/{chunk-2V4LPUBH.js → chunk-HPTEJBP4.js} +1 -1
- package/dist/chunks/{chunk-R6VJDOQM.js → chunk-HQQJKWZY.js} +4 -4
- package/dist/chunks/{chunk-UWHIU24L.js → chunk-HVM2GUM3.js} +1 -1
- package/dist/chunks/{chunk-NEJLJ2XY.js → chunk-HX6GXMDK.js} +1 -1
- package/dist/chunks/chunk-I3NYYOSS.js +2 -0
- package/dist/chunks/{chunk-LV3CQ72P.js → chunk-I6VMRQF4.js} +1 -1
- package/dist/chunks/{chunk-QU4UE73E.js → chunk-IEVJLG3V.js} +1 -1
- package/dist/chunks/chunk-IOSBGCRT.js +2 -0
- package/dist/chunks/{chunk-SO42ZB5K.js → chunk-JBFPTEVE.js} +1 -1
- package/dist/chunks/{chunk-G32BO6M5.js → chunk-JD76ANPN.js} +1 -1
- package/dist/chunks/{chunk-ERJV5BMC.js → chunk-JFZ6USNQ.js} +1 -1
- package/dist/chunks/{chunk-UPWJSNL5.js → chunk-JLW5BQVO.js} +1 -1
- package/dist/chunks/chunk-JRGECNP3.js +2 -0
- package/dist/chunks/{chunk-DABBHWSF.js → chunk-KAWXVMHI.js} +1 -1
- package/dist/chunks/chunk-KGUPAPGR.js +2 -0
- package/dist/chunks/{chunk-AHOBCBVZ.js → chunk-KOKBDIGR.js} +1 -1
- package/dist/chunks/chunk-KTIBXRWQ.js +2 -0
- package/dist/chunks/chunk-L4EJ5R3B.js +23 -0
- package/dist/chunks/{chunk-SI5W5LBV.js → chunk-LARJARMS.js} +1 -1
- package/dist/chunks/{chunk-MPNJ2BB4.js → chunk-LE75SVEL.js} +1 -1
- package/dist/chunks/{chunk-ERT32RZA.js → chunk-LI3FTPAH.js} +5 -5
- package/dist/chunks/chunk-LK77GI6M.js +2 -0
- package/dist/chunks/chunk-LOIYNRBC.js +33 -0
- package/dist/chunks/{chunk-7WYL2IDD.js → chunk-LXZLLTYQ.js} +1 -1
- package/dist/chunks/{chunk-RZUCVF2Q.js → chunk-LYVHYT3L.js} +1 -1
- package/dist/chunks/{chunk-MWXW2CA6.js → chunk-LZPCA6DH.js} +1 -1
- package/dist/chunks/{chunk-GVARQXYI.js → chunk-M5QPL5NO.js} +1 -1
- package/dist/chunks/{chunk-WWQNMC7C.js → chunk-MCBRB5D6.js} +1 -1
- package/dist/chunks/chunk-MHPCVQOE.js +2 -0
- package/dist/chunks/chunk-MMJU6PZV.js +2 -0
- package/dist/chunks/chunk-MVPKU72J.js +4 -0
- package/dist/chunks/{chunk-AGVOGPAZ.js → chunk-MWS2NAHJ.js} +1 -1
- package/dist/chunks/{chunk-R6WMY6AH.js → chunk-NTM3KQ25.js} +1 -1
- package/dist/chunks/chunk-NXN7GJOH.js +2 -0
- package/dist/chunks/chunk-O6ZYDHEJ.js +3 -0
- package/dist/chunks/chunk-OKEC2EIE.js +2 -0
- package/dist/chunks/{chunk-KCV5VN4X.js → chunk-OKKNDQJF.js} +1 -1
- package/dist/chunks/{chunk-ZYVHOVKL.js → chunk-OPTJYDZN.js} +1 -1
- package/dist/chunks/{chunk-NJLULBTM.js → chunk-OTDDXEQ6.js} +1 -1
- package/dist/chunks/{chunk-RDSVU6F6.js → chunk-OTUS7NTQ.js} +1 -1
- package/dist/chunks/{chunk-UH4JSSRL.js → chunk-OTXGAKFH.js} +8 -8
- package/dist/chunks/chunk-OW3EOC5Q.js +4 -0
- package/dist/chunks/chunk-OXRVILDW.js +2 -0
- package/dist/chunks/{chunk-JEISPWWM.js → chunk-PWKJ5KLZ.js} +1 -1
- package/dist/chunks/{chunk-RFMME46Z.js → chunk-PYNW5OFA.js} +1 -1
- package/dist/chunks/{chunk-AKGCM53D.js → chunk-Q3WXB465.js} +1 -1
- package/dist/chunks/{chunk-KHTAAVC2.js → chunk-Q4AXZY2P.js} +1 -1
- package/dist/chunks/{chunk-QJ6KUVAR.js → chunk-QAEZNFAM.js} +1 -1
- package/dist/chunks/{chunk-ABF3W2MO.js → chunk-QAFXQHHG.js} +2 -2
- package/dist/chunks/chunk-QCJY6FTC.js +3 -0
- package/dist/chunks/{chunk-5MHYGMJG.js → chunk-QJJNHKLT.js} +1 -1
- package/dist/chunks/{chunk-ERL2M773.js → chunk-QYQZQVVN.js} +1 -1
- package/dist/chunks/{chunk-VVNV4NNW.js → chunk-RCT3O3HQ.js} +1 -1
- package/dist/chunks/{chunk-7R56WC7L.js → chunk-RHMULF56.js} +1 -1
- package/dist/chunks/chunk-RRWL5BHZ.js +2 -0
- package/dist/chunks/{chunk-RG3NH6YQ.js → chunk-S4WILIRA.js} +1 -1
- package/dist/chunks/{chunk-N33D7KCW.js → chunk-S6UCVXBC.js} +1 -1
- package/dist/chunks/{chunk-IHB5GTOJ.js → chunk-SAZTOGX6.js} +3 -3
- package/dist/chunks/{chunk-2EPR4HLF.js → chunk-SH7POUVX.js} +6 -6
- package/dist/chunks/chunk-SQX22LQT.js +10 -0
- package/dist/chunks/{chunk-NLYZ5K7U.js → chunk-SSJV3VX7.js} +1 -1
- package/dist/chunks/chunk-TBODQT4W.js +2 -0
- package/dist/chunks/chunk-TGULVWPV.js +2 -0
- package/dist/chunks/{chunk-HIYQPZ7C.js → chunk-TPOAAJKA.js} +1 -1
- package/dist/chunks/{chunk-42V4NV2F.js → chunk-TVDZXDQW.js} +1 -1
- package/dist/chunks/{chunk-FVRII5XO.js → chunk-U2BD545L.js} +1 -1
- package/dist/chunks/chunk-UK5LGSGT.js +2 -0
- package/dist/chunks/{chunk-HFJUXKT5.js → chunk-ULJZ7NUF.js} +1 -1
- package/dist/chunks/chunk-UN2LKLGV.js +2 -0
- package/dist/chunks/{chunk-4NXEYPPX.js → chunk-UOFDKMRU.js} +1 -1
- package/dist/chunks/{chunk-2ITZW2CN.js → chunk-UTIELP6F.js} +1 -1
- package/dist/chunks/{chunk-NWQL6FNF.js → chunk-V3KEG6MI.js} +1 -1
- package/dist/chunks/{chunk-BPZOABMC.js → chunk-V3S2B6WU.js} +2 -2
- package/dist/chunks/{chunk-ZG6353RM.js → chunk-VD2TQCMH.js} +1 -1
- package/dist/chunks/{chunk-4ZBOYWQ3.js → chunk-VS2LOUCT.js} +1 -1
- package/dist/chunks/{chunk-V7KR74NO.js → chunk-VS3AMJEK.js} +1 -1
- package/dist/chunks/{chunk-YCZZ62C2.js → chunk-W22KWKF6.js} +1 -1
- package/dist/chunks/chunk-W7NXFRHN.js +2 -0
- package/dist/chunks/{chunk-DTTFUANI.js → chunk-WBO6FQHR.js} +2 -2
- package/dist/chunks/{chunk-5ZBLCWEJ.js → chunk-WJSJXK2N.js} +1 -1
- package/dist/chunks/{chunk-C2LAEGOW.js → chunk-WKHGXLJD.js} +2 -2
- package/dist/chunks/{chunk-H6C4MAUN.js → chunk-WLQEONBF.js} +1 -1
- package/dist/chunks/chunk-WLZJOCLA.js +10 -0
- package/dist/chunks/chunk-WMBOXX7G.js +2 -0
- package/dist/chunks/{chunk-PF56N7ZY.js → chunk-X2J2P5ZT.js} +5 -5
- package/dist/chunks/{chunk-AH26AQN7.js → chunk-XHBMK6LC.js} +1 -1
- package/dist/chunks/{chunk-ZZHXQCNB.js → chunk-Y3B6ZUE6.js} +1 -1
- package/dist/chunks/{chunk-WP2L2NY2.js → chunk-YBKDEEEH.js} +1 -1
- package/dist/chunks/chunk-YRDPVTEI.js +3 -0
- package/dist/chunks/{chunk-JORRZ4BB.js → chunk-YU4JYWCA.js} +1 -1
- package/dist/chunks/{chunk-CZ5R4JXZ.js → chunk-Z2TOBS3P.js} +1 -1
- package/dist/chunks/chunk-ZFJWA4JK.js +1 -0
- package/dist/chunks/chunk-ZSZXA7WB.js +2 -0
- package/dist/chunks/{chunk-LK2K3SPM.js → chunk-ZU3YBRXS.js} +2 -2
- package/dist/chunks/{chunk-5FU5RLML.js → chunk-ZUT4EM64.js} +1 -1
- package/dist/chunks/chunk-ZWW227M3.js +2 -0
- package/dist/chunks/chunk-ZY32SZ2P.js +3 -0
- package/dist/chunks/cli-TE7RP5H7.js +2 -0
- package/dist/chunks/client-I5MYOJEJ.js +2 -0
- package/dist/chunks/command-NDHFZAKA.js +13 -0
- package/dist/chunks/configuration-command-HPMGH7WR.js +2 -0
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +2 -0
- package/dist/chunks/connected-evidence-FNHTBUDG.js +2 -0
- package/dist/chunks/{connected-starting-assets-JONPTII6.js → connected-starting-assets-O4X6D6BG.js} +1 -1
- package/dist/chunks/connection-GDWPMHPC.js +2 -0
- package/dist/chunks/{continual-Z7MO2PF6.js → continual-HQCFY7GN.js} +3 -3
- package/dist/chunks/core-commands-LEFFBKR7.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +4 -0
- package/dist/chunks/datasets-BWHI23IB.js +2 -0
- package/dist/chunks/desktop-test-XROQ7K5H.js +3 -0
- package/dist/chunks/dist-GR56E3QK.js +2 -0
- package/dist/chunks/dist-J4KHAVO3.js +2 -0
- package/dist/chunks/dist-O7HXZUBW.js +2 -0
- package/dist/chunks/enclave-7VLABNIX.js +2 -0
- package/dist/chunks/evaluation-coordination-JTQIKHW6.js +2 -0
- package/dist/chunks/experiment-improvements-2TV2DA3K.js +2 -0
- package/dist/chunks/experiments-VOCZ4DW3.js +2 -0
- package/dist/chunks/experiments-VUJ4SEMG.js +2 -0
- package/dist/chunks/experiments-signal-TSTEBORD.js +2 -0
- package/dist/chunks/{extension-ZM6NI5O5.js → extension-UH34ZF7N.js} +1 -1
- package/dist/chunks/{help-7HXFWIKS.js → help-OPN36XRA.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +2 -0
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +2 -0
- package/dist/chunks/hosted-app-server-composition-7WZ4RIX2.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +3 -0
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +2 -0
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +3 -0
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +3 -0
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +2 -0
- package/dist/chunks/human-review-NVKBEYG5.js +2 -0
- package/dist/chunks/{import-6SI4BEKS.js → import-P5DCYMQ6.js} +2 -2
- package/dist/chunks/learning-NJLTGZFQ.js +2 -0
- package/dist/chunks/learning-XTY5VOTK.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +2 -0
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +2 -0
- package/dist/chunks/local-scope-X3737QXT.js +2 -0
- package/dist/chunks/model-projects-GHWCKDON.js +2 -0
- package/dist/chunks/opchat-ZJ5DO4RT.js +3 -0
- package/dist/chunks/opchat-bounded-chat-JVZ5LRH2.js +2 -0
- package/dist/chunks/organizations-UKXORVYS.js +2 -0
- package/dist/chunks/{profile-O5HL5DTQ.js → profile-XL5LABHR.js} +1 -1
- package/dist/chunks/profile-training-source-VIND2MM2.js +2 -0
- package/dist/chunks/project-action-payload-2G57RL74.js +2 -0
- package/dist/chunks/project-agent-CCGEMNR7.js +2 -0
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +2 -0
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +2 -0
- package/dist/chunks/{runtime-XBA744HJ.js → runtime-VSOOPNYN.js} +2 -2
- package/dist/chunks/sandbox-command-L6BMKDGY.js +2 -0
- package/dist/chunks/{sandbox-template-27U3FQN7.js → sandbox-template-QL5ID5GJ.js} +1 -1
- package/dist/chunks/saved-work-LAVTNKPT.js +2 -0
- package/dist/chunks/send-turn-D3GTSSHI.js +2 -0
- package/dist/chunks/setup-HSRCZ3WR.js +2 -0
- package/dist/chunks/{src-PU7QTFO5.js → src-662QOKNP.js} +1 -1
- package/dist/chunks/{src-BLWX6DRG.js → src-KWOSLOBH.js} +117 -117
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +2 -0
- package/dist/chunks/stdio-Z65UIX55.js +2 -0
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-FOMYYS25.js → store-continual-support-reviews-7PDLGRWF.js} +1 -1
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +2 -0
- package/dist/chunks/{store-create-improve-3LQMIYAP.js → store-create-improve-G46KIUVT.js} +1 -1
- package/dist/chunks/{store-datasets-3KSX7RSO.js → store-datasets-O67F75BL.js} +1 -1
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +7 -0
- package/dist/chunks/{store-harness-memory-2L7ARBR4.js → store-harness-memory-4XEUITXE.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-3PHL3BUY.js → store-harness-refinement-candidates-LCN4NV23.js} +1 -1
- package/dist/chunks/store-harness-workspaces-PJJQ74G6.js +2 -0
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +2 -0
- package/dist/chunks/store-learning-6P6IS7GH.js +2 -0
- package/dist/chunks/store-learning-credentials-EGJ2WTZI.js +2 -0
- package/dist/chunks/{store-local-experiments-QTVHJAEP.js → store-local-experiments-CBJA56X2.js} +1 -1
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +2 -0
- package/dist/chunks/{store-model-configuration-3SU73CMS.js → store-model-configuration-T6XJJDAB.js} +2 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +2 -0
- package/dist/chunks/{store-preference-comparison-DWV5XSMY.js → store-preference-comparison-XQFTLMGH.js} +1 -1
- package/dist/chunks/{store-schedules-2KUY4T6M.js → store-schedules-JPFVWL3Q.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-A4XCS7RM.js → store-sidebar-file-bookmarks-J3JEVAYR.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-V2PKRXUZ.js → store-sidebar-preferences-2JHTFXJK.js} +1 -1
- package/dist/chunks/{store-subagents-UGVEFA6M.js → store-subagents-PUBQVWSU.js} +1 -1
- package/dist/chunks/{store-task-inbox-QABI4ZAH.js → store-task-inbox-VVXZUJIO.js} +1 -1
- package/dist/chunks/{store-task-inventory-GEQIZELY.js → store-task-inventory-MQX44AI6.js} +1 -1
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +9 -0
- package/dist/chunks/{store-training-CQV7PL3V.js → store-training-DUVIDYK5.js} +1 -1
- package/dist/chunks/{store-training-jobs-XKN6K66J.js → store-training-jobs-HHFH3V5O.js} +1 -1
- package/dist/chunks/{store-training-models-Q7DTTR4S.js → store-training-models-C7UUZDTO.js} +1 -1
- package/dist/chunks/{store-usage-XGAX7NLB.js → store-usage-6DMZM7WV.js} +1 -1
- package/dist/chunks/{store-work-evidence-VSLLZ6UF.js → store-work-evidence-77B36LRC.js} +1 -1
- package/dist/chunks/taskset-7FQCJ55X.js +2 -0
- package/dist/chunks/taskset-packages-NRRPON7B.js +2 -0
- package/dist/chunks/taskset-packages-RW4SFGDU.js +2 -0
- package/dist/chunks/{teams-bot-UTQAJA6H.js → teams-bot-LGV7UKX2.js} +1 -1
- package/dist/chunks/tool-learning-NGO7QHYK.js +2 -0
- package/dist/chunks/training-XFM3OOPN.js +2 -0
- package/dist/chunks/training-XILDD5RG.js +2 -0
- package/dist/chunks/training-error-LQKCOQDJ.js +2 -0
- package/dist/chunks/training-hardware-ESXRWUIK.js +3 -0
- package/dist/chunks/training-hosted-6BX2IASC.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +2 -0
- package/dist/chunks/training-hosted-learning-YN5VD3PW.js +2 -0
- package/dist/chunks/training-hosted-serving-N2MHWGZN.js +2 -0
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +2 -0
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +2 -0
- package/dist/chunks/training-model-start-E5MP3URL.js +2 -0
- package/dist/chunks/web-search-56QRZGPR.js +2 -0
- package/dist/chunks/workspaces-MCS2AQX6.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/App-BZuSv1XM.js +53 -0
- package/dist/web/assets/{AppDialog-8Y0FYalT.js → AppDialog-BILEK4np.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-BvxZ8bwD.js +2 -0
- package/dist/web/assets/{AppToastContext-BiQbbVxq.js → AppToastContext-C-FsCKXW.js} +1 -1
- package/dist/web/assets/{AppsView-Dtte4h6e.js → AppsView-BMaq5oxx.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DgADV7dn.js → AttachmentTypeIcon-Bh7Ft_UL.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BUqDvEv9.js → BrowserSidebar-BG2MLJ9I.js} +1 -1
- package/dist/web/assets/{CartesianChart-J4ChOjvG.js → CartesianChart-CS6ES_XT.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-Dr5X_XyN.js +8 -0
- package/dist/web/assets/{ChatTimelineEntry-DztFb85D.css → ChatTimelineEntry-vs8RaEGD.css} +1 -1
- package/dist/web/assets/{CollaborationTabs-CFCpk2Ck.js → CollaborationTabs-CPJ2w67F.js} +1 -1
- package/dist/web/assets/{CommandMenu-EPPjB14H.js → CommandMenu-Fe1V7NJd.js} +1 -1
- package/dist/web/assets/{CommunityView-Okydjpqm.js → CommunityView-DHTcmOnI.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-RXCiE88M.js → ComposerAttachments-Ck9VWD6o.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-CSngc8-V.js → ComposerCreateImproveStrip-yiXO7cf8.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-DS73kyfj.js → ConversationImportsSettings-_VLzUnHQ.js} +1 -1
- package/dist/web/assets/{FilePagePreview-Qc4B0vue.js → FilePagePreview-BpcM1DfE.js} +2 -2
- package/dist/web/assets/{GetStartedView-DGFPQ1We.js → GetStartedView-BH-WJ-rW.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-DFBYQdHz.js → GettingStartedDialog-CdQfj7RA.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-BDu3FlcU.js → HostedModelLearningReview-C3GsOlu9.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-CHaTHwC8.js → HostedModelLearningSettings-SSMst6dl.js} +1 -1
- package/dist/web/assets/{HtmlVisual-D9Mh7xds.js → HtmlVisual-CH0tb3fv.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-DgY7lAu5.js → LabModelVersionDetailPage-J2t9yILv.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BwtlThO7.js → LabSkillSidebar-DdDYvfj2.js} +1 -1
- package/dist/web/assets/LabsRoute-MJwIjSKg.js +101 -0
- package/dist/web/assets/MainChatThread-BcwtaTDZ.js +2 -0
- package/dist/web/assets/MainPane-DDO6diPt.js +10 -0
- package/dist/web/assets/NativeSetupTerminal-BPSUFpRm.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-BEJvt5_H.js → NativeSkillSidebar-DPYavzau.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CjrjgkTN.js → NewProjectDialog-BtmvE9Sp.js} +1 -1
- package/dist/web/assets/{OutputsPage-jzx93QQ3.js → OutputsPage-BMRY7RK2.js} +1 -1
- package/dist/web/assets/{PageChrome-C1M13qG2.js → PageChrome-5VRxH6Rp.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DZrjlMp2.js → ProjectsPage-1LHqxOMo.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-D_7KgExz.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-iznJwDMf.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-Cw1ja2GF.js → ScheduledWorkPage-Dtz4zJ0T.js} +1 -1
- package/dist/web/assets/{SettingsView-CckoIki3.js → SettingsView-BeDYNPcD.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-ByC8bDjp.js → TasksetDraftEditorPrimitives-CcvKO3YA.js} +1 -1
- package/dist/web/assets/{TeamChatView-OprnSKLF.js → TeamChatView-DaXxOkTe.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-d7A2F9Lx.js → TerminalOverlay-CF8uB4qA.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-Cyn6R6I6.js → TrainingCreationPanel-DmMO7x5T.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-Mpb5e7t5.js → TrainingDraftPanel-DCHbXjSx.js} +1 -1
- package/dist/web/assets/{TrainingRunLineage-VcKz7dIR.js → TrainingRunLineage-CwisTWs_.js} +1 -1
- package/dist/web/assets/UsageSettingsSection-Drt7gwRb.js +7 -0
- package/dist/web/assets/WorkSidebarPanel-BrIIRtGW.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-Dmbrg0-y.js +11 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-C8y3537a.js → WorkspaceEnvironmentMenu-KEZm1gdb.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-LrEWj4UK.js → WorkspaceFileLocation-ChbOKrPO.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-NRIMXnkS.js → WorkspaceGitDialogs-BS2JQKNQ.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CvDGjKAL.js → WorkspaceMonacoEditor-CN1hE_C4.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-BZ0BbnHv.js → WorkspacePdfPreview-Clb4m0le.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DJrjrvT0.js → WorkspacePresentationPreview-CwQsdvAR.js} +1 -1
- package/dist/web/assets/app-models-Cz3yxq4x.js +1 -0
- package/dist/web/assets/{bot-6OhUEmkE.js → bot-BNFltD5O.js} +1 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +1 -0
- package/dist/web/assets/{chevron-down-jmVA1BIf.js → chevron-down-BnnT0tnM.js} +1 -1
- package/dist/web/assets/chevron-right-C8K5PZj7.js +1 -0
- package/dist/web/assets/{chevron-up-CstyLXH3.js → chevron-up-BAnwJJN3.js} +1 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +9 -0
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +1 -0
- package/dist/web/assets/{client-choice-storage-BdQ_YDuk.js → client-choice-storage-Iuzoszas.js} +1 -1
- package/dist/web/assets/{cloud-upload-Ck1ufAr8.js → cloud-upload-CdSXJ7ms.js} +1 -1
- package/dist/web/assets/{copy-CPkbMfXt.js → copy-CBFg6m0d.js} +1 -1
- package/dist/web/assets/{createLucideIcon-CXQny8HU.js → createLucideIcon-DF2VR6WA.js} +1 -1
- package/dist/web/assets/{cssMode-CYxYl_om.js → cssMode-BSQUZhUO.js} +1 -1
- package/dist/web/assets/{external-link-CDKOLG_v.js → external-link-Cql9bKdv.js} +1 -1
- package/dist/web/assets/{folder-open-CEtOb_lK.js → folder-open-BXdVB5J1.js} +1 -1
- package/dist/web/assets/{folder-plus-CVMYZs3e.js → folder-plus-Cma2HulC.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DDyhPjxS.js → git-commit-horizontal-eF--16ps.js} +1 -1
- package/dist/web/assets/{htmlMode-DoY4V_j0.js → htmlMode-aLPlQtyU.js} +1 -1
- package/dist/web/assets/icons-c3vt7y6n.js +1 -0
- package/dist/web/assets/{image-B-PjDSwU.js → image-CqKPwnBn.js} +1 -1
- package/dist/web/assets/{index-D9WbJMSq.js → index-CM0IRu1U.js} +2 -2
- package/dist/web/assets/{info-CCnw-K3b.js → info-CqeYEqG0.js} +1 -1
- package/dist/web/assets/{jsonMode-CeOpZdPj.js → jsonMode-fu7bEcHB.js} +1 -1
- package/dist/web/assets/loader-circle-pxp89T5x.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DAbgLCqZ.js → lspLanguageFeatures-DraXQA4w.js} +1 -1
- package/dist/web/assets/{maximize-2-BZX38cpr.js → maximize-2-yMp8X9ts.js} +1 -1
- package/dist/web/assets/{message-square-CvgSecgD.js → message-square-DbIMQqfj.js} +1 -1
- package/dist/web/assets/model-display-zPvC4L2B.js +1 -0
- package/dist/web/assets/models-route-CWcJuOd0.js +1 -0
- package/dist/web/assets/{monaco.contribution-cbDqt48m.js → monaco.contribution-BQhp1CJs.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CF2JDhi4.js → monaco.contribution-Bd8EqYGR.js} +2 -2
- package/dist/web/assets/{monaco.contribution-m2ze2EsL.js → monaco.contribution-CYWKnVxQ.js} +2 -2
- package/dist/web/assets/{monaco.contribution-yeyow_-Q.js → monaco.contribution-CmbWO0tB.js} +2 -2
- package/dist/web/assets/{monitor-By0s4hxb.js → monitor-DFE2fTkT.js} +1 -1
- package/dist/web/assets/{paperclip-BJ2QgJLa.js → paperclip-D_qsKbVs.js} +1 -1
- package/dist/web/assets/{pdf-C4x-1jjP.js → pdf-DkQRsi4n.js} +1 -1
- package/dist/web/assets/play-BtlX2stU.js +1 -0
- package/dist/web/assets/plus-DbASL_gy.js +1 -0
- package/dist/web/assets/{presentation-I86G1Gd9.js → presentation-BN_kIBPL.js} +1 -1
- package/dist/web/assets/{python-CqFTPj8r.js → python-DB9pj5Hr.js} +1 -1
- package/dist/web/assets/{refresh-cw-Dga35Eay.js → refresh-cw-B27ohHfn.js} +1 -1
- package/dist/web/assets/{save-BLKjYtzR.js → save-D-rwjKop.js} +1 -1
- package/dist/web/assets/settings-lists-DgSaJQA4.js +5 -0
- package/dist/web/assets/square-C2caJ3NG.js +1 -0
- package/dist/web/assets/{square-terminal-B-n7vUex.js → square-terminal-CeoK51wH.js} +1 -1
- package/dist/web/assets/{submit-issue-command-B7Hrt2tU.js → submit-issue-command-DZNW7Evj.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BhmBE5XE.js → toggleHighContrast-Bs8L1gx0.js} +1 -1
- package/dist/web/assets/{training-QrdkRQZQ.js → training-DCdoHJ0Y.js} +2 -2
- package/dist/web/assets/{training-model-data-DB-jg6L_.js → training-model-data-wHvE7xL1.js} +1 -1
- package/dist/web/assets/{tsMode-BSWEII2p.js → tsMode-C7EqshxC.js} +1 -1
- package/dist/web/assets/{upload-C4MPhQn8.js → upload-BWgjC2Jf.js} +1 -1
- package/dist/web/assets/{useAccountSettings-9oqWdRLs.js → useAccountSettings-Dva1MpsJ.js} +1 -1
- package/dist/web/assets/{useAgentInventory-isO79ui9.js → useAgentInventory-CrjIOmvb.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CZX6PxoK.js → useLocalAgentSchedules-P-UaUKMb.js} +1 -1
- package/dist/web/assets/{useQuery-BD0Uexmh.js → useQuery-Bn3KqR4r.js} +1 -1
- package/dist/web/assets/{wifi-off-Cloe0WuQ.js → wifi-off--mKrSPFc.js} +1 -1
- package/dist/web/assets/{workers-BXagz5eg.js → workers-p0Kn2KMK.js} +1 -1
- package/dist/web/assets/x-D9GTV9ke.js +1 -0
- package/dist/web/assets/{yaml-sBdvVbCc.js → yaml-BeIdC4tu.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +44 -2
- package/package.json +1 -1
- package/dist/chunks/acp-H3MJCPHX.js +0 -2
- package/dist/chunks/acp-agent-DWA7272M.js +0 -21
- package/dist/chunks/actions-command-IIYOO4LL.js +0 -2
- package/dist/chunks/app-layer-K7H2WJ56.js +0 -3
- package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +0 -2
- package/dist/chunks/app-server-evaluations-XGMGS67X.js +0 -2
- package/dist/chunks/app-server-harness-services-BHD6S5II.js +0 -2
- package/dist/chunks/app-server-runtime-LFIL6F7D.js +0 -2
- package/dist/chunks/apps-QKAHJGQ4.js +0 -2
- package/dist/chunks/chunk-5EP2DZLJ.js +0 -2
- package/dist/chunks/chunk-6EBCS57F.js +0 -2
- package/dist/chunks/chunk-6RS4NAOY.js +0 -2
- package/dist/chunks/chunk-7O6Z3VOZ.js +0 -2
- package/dist/chunks/chunk-7YLXGILH.js +0 -2
- package/dist/chunks/chunk-7ZLXFKRI.js +0 -2
- package/dist/chunks/chunk-B5R53U74.js +0 -2
- package/dist/chunks/chunk-C2AXMKK4.js +0 -2
- package/dist/chunks/chunk-F6UQ6PPK.js +0 -2
- package/dist/chunks/chunk-GS6ZUSIN.js +0 -3
- package/dist/chunks/chunk-JSQRLLN6.js +0 -2
- package/dist/chunks/chunk-LAOLJDVB.js +0 -2
- package/dist/chunks/chunk-LKKMLBOH.js +0 -3
- package/dist/chunks/chunk-M3FLEZ4E.js +0 -4
- package/dist/chunks/chunk-MEGKXGW3.js +0 -2
- package/dist/chunks/chunk-MILEWROZ.js +0 -2
- package/dist/chunks/chunk-N42HT64M.js +0 -2
- package/dist/chunks/chunk-NG2L6D7G.js +0 -2
- package/dist/chunks/chunk-OSVGNONV.js +0 -2
- package/dist/chunks/chunk-OTUBJV6C.js +0 -6
- package/dist/chunks/chunk-PBTXLQAU.js +0 -2
- package/dist/chunks/chunk-PBZCXPPC.js +0 -10
- package/dist/chunks/chunk-SFKZITAG.js +0 -9
- package/dist/chunks/chunk-SXMR6E2W.js +0 -2
- package/dist/chunks/chunk-U2K7QJCG.js +0 -2
- package/dist/chunks/chunk-URNMC46H.js +0 -157
- package/dist/chunks/chunk-VHXDWAEH.js +0 -2
- package/dist/chunks/chunk-W2TICQ62.js +0 -2
- package/dist/chunks/chunk-WSOUMXH3.js +0 -24
- package/dist/chunks/chunk-XOB6FKQV.js +0 -2
- package/dist/chunks/chunk-YBNKGA5C.js +0 -2
- package/dist/chunks/chunk-YM4PSVFW.js +0 -4
- package/dist/chunks/chunk-YNQWJWIC.js +0 -10
- package/dist/chunks/chunk-Z3BWCFLV.js +0 -2
- package/dist/chunks/cli-PSXMIJTF.js +0 -2
- package/dist/chunks/configuration-command-XYKMXIWF.js +0 -2
- package/dist/chunks/connected-app-executor-6G2LA3PQ.js +0 -2
- package/dist/chunks/connected-evidence-IRXYN6YD.js +0 -2
- package/dist/chunks/connection-XMAAGMXJ.js +0 -2
- package/dist/chunks/core-commands-WWN7X3XC.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +0 -4
- package/dist/chunks/datasets-2PC2HP7N.js +0 -2
- package/dist/chunks/desktop-test-VU6AFAMO.js +0 -3
- package/dist/chunks/dist-47AYOIH6.js +0 -2
- package/dist/chunks/dist-HSC43RG4.js +0 -2
- package/dist/chunks/dist-MXBEBM4D.js +0 -2
- package/dist/chunks/enclave-VURYNILU.js +0 -2
- package/dist/chunks/evaluation-coordination-UOWZHHC5.js +0 -2
- package/dist/chunks/experiment-improvements-EB2CV5RA.js +0 -2
- package/dist/chunks/experiments-CLXGM3TZ.js +0 -2
- package/dist/chunks/experiments-SZQYR6MH.js +0 -2
- package/dist/chunks/experiments-signal-2KJCP25D.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +0 -2
- package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +0 -2
- package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +0 -3
- package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +0 -2
- package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +0 -3
- package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-2LSMZQNA.js +0 -3
- package/dist/chunks/hosted-tasksets-WGXGXJ7E.js +0 -2
- package/dist/chunks/human-review-M26UKGJL.js +0 -2
- package/dist/chunks/learning-HM3NWOV5.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +0 -2
- package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +0 -2
- package/dist/chunks/local-scope-62GWHDXS.js +0 -2
- package/dist/chunks/model-projects-YUAMBQTO.js +0 -2
- package/dist/chunks/opchat-AG4CWVY4.js +0 -3
- package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +0 -2
- package/dist/chunks/organizations-KDKX77XZ.js +0 -2
- package/dist/chunks/profile-training-source-3DXFM2XI.js +0 -2
- package/dist/chunks/project-action-payload-QA24HYGF.js +0 -2
- package/dist/chunks/project-agent-XBOOM5TS.js +0 -2
- package/dist/chunks/published-experiment-source-GZGN354O.js +0 -2
- package/dist/chunks/refiner-profile-service-BJMOYKTC.js +0 -2
- package/dist/chunks/sandbox-command-5ECGS7DG.js +0 -2
- package/dist/chunks/saved-work-KUNVTJ7O.js +0 -2
- package/dist/chunks/send-turn-FIPWOXWV.js +0 -2
- package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +0 -2
- package/dist/chunks/store-chat-resources-YOEJ2BI6.js +0 -2
- package/dist/chunks/store-conversation-serving-K324SQTO.js +0 -2
- package/dist/chunks/store-evaluation-results-LHCCNNE6.js +0 -7
- package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +0 -2
- package/dist/chunks/store-human-review-QJY3ZPPF.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +0 -2
- package/dist/chunks/store-learning-DW3QLQXU.js +0 -2
- package/dist/chunks/store-learning-credentials-67QNTPA7.js +0 -2
- package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +0 -2
- package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +0 -2
- package/dist/chunks/store-taskset-drafts-GXABQR5G.js +0 -9
- package/dist/chunks/taskset-ARKJQKYQ.js +0 -2
- package/dist/chunks/taskset-packages-X4K65DTW.js +0 -2
- package/dist/chunks/taskset-packages-XK7FSD45.js +0 -2
- package/dist/chunks/training-3IWW4256.js +0 -2
- package/dist/chunks/training-RVIESURJ.js +0 -2
- package/dist/chunks/training-error-2EWDOQ4G.js +0 -2
- package/dist/chunks/training-hosted-PFJHYTEU.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +0 -2
- package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +0 -2
- package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +0 -2
- package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +0 -2
- package/dist/chunks/training-hosted-workers-LST4ZUXN.js +0 -2
- package/dist/chunks/training-model-start-ROLS3E4V.js +0 -2
- package/dist/chunks/web-search-7FBUBZ66.js +0 -2
- package/dist/chunks/workspaces-G3CMY7ZA.js +0 -2
- package/dist/web/assets/App-DY2R8Z6r.js +0 -53
- package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +0 -2
- package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +0 -8
- package/dist/web/assets/LabsRoute-BV7ZJGEw.js +0 -101
- package/dist/web/assets/MainChatThread-pzHKd_YN.js +0 -2
- package/dist/web/assets/MainPane-6OlLiKKb.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +0 -2
- package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +0 -1
- package/dist/web/assets/UsageSettingsSection-FhYymrfc.js +0 -7
- package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +0 -11
- package/dist/web/assets/app-models-CUA9XB9U.js +0 -1
- package/dist/web/assets/chat-resources-CI8KFVO5.js +0 -1
- package/dist/web/assets/chevron-right-BYmDQ7ti.js +0 -1
- package/dist/web/assets/chunk-ONGOAEY6-C__DQmRT.js +0 -9
- package/dist/web/assets/chunk-SQBYHWZU-DumrB9SB.js +0 -1
- package/dist/web/assets/icons-D7jkCa2d.js +0 -1
- package/dist/web/assets/loader-circle-CPaJeTDy.js +0 -1
- package/dist/web/assets/models-route-Bl_TmMl6.js +0 -1
- package/dist/web/assets/play-D_SuGDBM.js +0 -1
- package/dist/web/assets/plus-yw95Iaj8.js +0 -1
- package/dist/web/assets/settings-lists-DMKA1lCN.js +0 -5
- package/dist/web/assets/square-BY5lG2Ol.js +0 -1
- package/dist/web/assets/x-Dqpel42h.js +0 -1
- /package/dist/chunks/{chunk-IDOGNIMV.js → chunk-7J2NMUTK.js} +0 -0
- /package/dist/chunks/{chunk-PCB65K4G.js → chunk-SFR32TMJ.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 O,b as D}from"./chunk-SI5W5LBV.js";import{b as _,c as R,d as l,e as d}from"./chunk-ELX7VRSU.js";import{lc as c,mc as w}from"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as L}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import{r as m,u as f}from"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as y}from"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as g}from"./chunk-FTQLQJQV.js";import{randomUUID as H}from"node:crypto";var E=c.omit({workspace:!0}).extend({workspace:c.shape.workspace.omit({files:!0})}),k=class extends L{static{g(this,"SqliteChatResourceStore")}datasetListings=new Map;datasetListingDataVersion=null;async listChatHostedExperiments(){return await this.ready,await this.writeQueue,this.database.all("SELECT payload FROM chat_hosted_experiments ORDER BY id",[]).map(e=>JSON.parse(e.payload))}async readChatHostedExperiment(e){await this.ready,await this.writeQueue;let a=this.database.get("SELECT payload FROM chat_hosted_experiments WHERE id=?",[e]);return a?JSON.parse(a.payload):null}async retainChatHostedExperiment(e,a,s,t){await this.ready;let r=this.writeQueue.then(()=>{let i=this.database.get("SELECT owner_hash,configuration_hash FROM chat_hosted_experiments WHERE id=?",[e]);if(i&&(i.owner_hash!==a||i.configuration_hash!==s))throw new Error("The retained hosted Experiment changed owner or configuration.");this.database.run("INSERT INTO chat_hosted_experiments(id,owner_hash,configuration_hash,payload) VALUES(?,?,?,?) ON CONFLICT(id) DO UPDATE SET payload=excluded.payload",[e,a,s,JSON.stringify(t)])});return this.writeQueue=r.then(()=>{},()=>{}),r}async readChatExperimentGroup(e,a){await this.ready,await this.writeQueue;let s=this.database.get("SELECT request_hash,payload FROM chat_experiment_groups WHERE operation_id=?",[e]);if(!s)return null;if(a&&s.request_hash!==a)throw new Error("Experiment operation ID was reused with different inputs.");return JSON.parse(s.payload)}async prepareChatExperimentGroup(e,a,s){await this.ready;let t=this.writeQueue.then(()=>{this.database.run("INSERT OR IGNORE INTO chat_experiment_groups(operation_id,request_hash,payload) VALUES(?,?,?)",[e,a,JSON.stringify(s)]);let r=this.database.get("SELECT request_hash,payload FROM chat_experiment_groups WHERE operation_id=?",[e]);if(r.request_hash!==a)throw new Error("Experiment operation ID was reused with different inputs.");return JSON.parse(r.payload)});return this.writeQueue=t.then(()=>{},()=>{}),t}async localResourceOwnerId(){await this.ready;let e=this.writeQueue.then(()=>(this.database.run("INSERT OR IGNORE INTO local_resource_owner(singleton,id) VALUES(1,?)",[`local-owner-${H()}`]),this.database.get("SELECT id FROM local_resource_owner WHERE singleton=1",[]).id));return this.writeQueue=e.then(()=>{},()=>{}),e}async readLocalDataset(e,a){await this.ready,await this.writeQueue;let s=this.database.get(a===void 0?"SELECT r.payload FROM local_dataset_workspaces w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=?":"SELECT r.payload FROM local_dataset_versions w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=? AND w.revision=?",a===void 0?[e]:[e,a]);return s?d(this.database,s.payload):null}async readLocalDatasetByWorkspaceHash(e,a){await this.ready,await this.writeQueue;let s=this.database.get("SELECT r.payload FROM local_dataset_versions w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=? AND json_extract(r.payload,'$.workspace.contentHash')=?",[e,a]);return s?d(this.database,s.payload):null}async listLocalDatasets(e=!1){if(e){let a=(await this.listLocalDatasetListings()).filter(t=>t.sync);return(await Promise.all(a.map(t=>this.readLocalDataset(t.workspace.draft.id)))).filter(t=>t!==null)}return await this.ready,await this.writeQueue,this.database.all("SELECT r.payload FROM local_dataset_workspaces w JOIN local_dataset_records r ON r.record_hash=w.record_hash ORDER BY w.updated_at DESC",[]).map(a=>d(this.database,a.payload))}async listLocalDatasetListings(){await this.ready,await this.writeQueue;let e=this.database.get("PRAGMA data_version",[]).data_version;this.datasetListingDataVersion!==e&&this.datasetListings.clear(),this.datasetListingDataVersion=e;let a=this.database.all("SELECT id,revision,updated_at FROM local_dataset_workspaces ORDER BY updated_at DESC",[]),s=new Set(a.map(t=>t.id));for(let t of this.datasetListings.keys())s.has(t)||this.datasetListings.delete(t);return a.map(t=>{let r=`${t.revision}:${t.updated_at}`,i=this.datasetListings.get(t.id);if(i?.stamp===r)return structuredClone(i.value);let o=this.database.get("SELECT json_remove(r.payload,'$.workspace.files') AS payload FROM local_dataset_workspaces w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=?",[t.id]).payload,n=E.parse(l(this.database,o));return this.datasetListings.set(t.id,{stamp:r,value:n}),structuredClone(n)})}async readLocalDatasetListing(e,a){await this.ready,await this.writeQueue;let s=a===void 0?"local_dataset_workspaces":"local_dataset_versions",t=this.database.get(`SELECT json_remove(r.payload,'$.workspace.files') AS payload FROM ${s} w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=?${a===void 0?"":" AND w.revision=?"}`,a===void 0?[e]:[e,a]);return t?E.parse(l(this.database,t.payload)):null}async readLocalDatasetProjection(e,a,s){await this.ready,await this.writeQueue;let t=s.workspaceHash?"w.id=? AND json_extract(r.payload,'$.workspace.contentHash')=?":s.revision===void 0?"w.id=?":"w.id=? AND w.revision=?",r=s.workspaceHash||s.revision!==void 0?"local_dataset_versions":"local_dataset_workspaces",i=s.workspaceHash?[e,s.workspaceHash]:s.revision===void 0?[e]:[e,s.revision],o=`${r} w JOIN local_dataset_records r ON r.record_hash=w.record_hash`,n=this.database.get(`SELECT json_remove(r.payload,'$.workspace.files') AS payload FROM ${o} WHERE ${t}`,i);if(!n)return null;let h=E.parse(l(this.database,n.payload)),{paths:I,policyPaths:N}=D(h.workspace.draft,a),p=[...N],u=[...I],S=p.length?`json_extract(file.value,'$.path') NOT IN (${p.map(()=>"?").join(",")})`:"1",b=u.length?` OR json_extract(file.value,'$.path') IN (${u.map(()=>"?").join(",")})`:"",v=this.database.all(`SELECT file.value AS payload FROM ${o},json_each(r.payload,'$.workspace.files') file WHERE ${t} AND (${S}${b})`,[...i,...p,...u]).map(x=>m.parse(R(this.database,JSON.parse(x.payload)))),T=h.workspace.contentHash,C=O({...h.workspace,files:v},a);return{record:c.parse({...h,workspace:C}),sourceWorkspaceHash:T}}async recoverLocalDatasetOperation(e,a){await this.ready,await this.writeQueue;let s=this.database.get("SELECT w.request_hash,r.payload FROM local_dataset_operations w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.operation_id=?",[e]);if(!s)return null;if(s.request_hash!==a)throw new Error("Dataset operation ID was reused with different input.");return d(this.database,s.payload)}async saveLocalDataset(e){let a=c.parse(e.record);if(f(a.workspace,Number.POSITIVE_INFINITY),a.workspace.draft.profileId!==a.ownerId||a.workspace.draft.modelScope!==null)throw new Error("Independent local Dataset ownership cannot change.");await this.ready;let s=this.writeQueue.then(()=>{this.database.exec("BEGIN IMMEDIATE");try{let t=this.database.get("SELECT w.request_hash,r.payload FROM local_dataset_operations w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.operation_id=?",[e.operationId]);if(t){if(t.request_hash!==e.requestHash)throw new Error("Dataset operation ID was reused with different input.");let n=d(this.database,t.payload);return this.database.exec("COMMIT"),n}let r=a.workspace.draft.id,i=this.database.get("SELECT w.revision,r.payload FROM local_dataset_workspaces w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=?",[r]);if((i?.revision??0)!==e.expectedRevision)throw new Error("Dataset changed. Reload its saved revision before editing.");if(a.workspace.draft.revision!==e.expectedRevision+1)throw new Error("Dataset revisions must advance once per saved edit.");if(i){let n=d(this.database,i.payload);if(n.ownerId!==a.ownerId||n.projectId!==a.projectId||n.workspace.draft.createdAt!==a.workspace.draft.createdAt)throw new Error("Dataset ownership and origin cannot change.");a.sync=n.sync}let o=_(this.database,a);return this.database.run("INSERT INTO local_dataset_workspaces(id,revision,record_hash,updated_at) VALUES(?,?,?,?) ON CONFLICT(id) DO UPDATE SET revision=excluded.revision,record_hash=excluded.record_hash,updated_at=excluded.updated_at",[r,a.workspace.draft.revision,o,a.workspace.draft.updatedAt]),this.database.run("INSERT INTO local_dataset_versions(id,revision,record_hash) VALUES(?,?,?)",[r,a.workspace.draft.revision,o]),this.database.run("INSERT INTO local_dataset_operations(operation_id,request_hash,record_hash) VALUES(?,?,?)",[e.operationId,e.requestHash,o]),this.database.exec("COMMIT"),this.datasetListings.delete(r),a}catch(t){throw this.database.exec("ROLLBACK"),t}});return this.writeQueue=s.then(()=>{},()=>{}),s}async updateLocalDatasetMetadata(e,a,s){await this.ready;let t=this.writeQueue.then(()=>{this.database.exec("BEGIN IMMEDIATE");try{let r=this.database.get("SELECT r.payload FROM local_dataset_workspaces w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=?",[e]);if(!r)throw new Error("Local Dataset was not found.");let i=d(this.database,r.payload);if(y(i)!==a)throw new Error("Dataset state changed. Retry against its latest saved state.");let o=c.parse(s(i));if(o.ownerId!==i.ownerId||o.projectId!==i.projectId||o.workspace.contentHash!==i.workspace.contentHash)throw new Error("Metadata updates cannot edit Dataset bytes or ownership.");let n=_(this.database,o);return this.database.run("UPDATE local_dataset_workspaces SET record_hash=? WHERE id=?",[n,e]),this.database.run("UPDATE local_dataset_versions SET record_hash=? WHERE id=? AND revision=?",[n,e,o.workspace.draft.revision]),this.database.exec("COMMIT"),this.datasetListings.delete(e),o}catch(r){throw this.database.exec("ROLLBACK"),r}});return this.writeQueue=t.then(()=>{},()=>{}),t}async linkChatResource(e,a,s){let t=w.parse(s);await this.upsertPayload("INSERT INTO chat_resource_links(session_id,turn_id,kind,resource_id,revision,payload) VALUES(?,?,?,?,?,?) ON CONFLICT(session_id,turn_id,kind,resource_id) DO UPDATE SET revision=excluded.revision,payload=excluded.payload WHERE excluded.revision>=chat_resource_links.revision",[e,a,t.kind,t.id,t.revision,JSON.stringify(t)])}async chatResourceLinks(e){await this.ready,await this.writeQueue;let a=[],s=[];return e.sessionId&&(a.push("session_id=?"),s.push(e.sessionId)),e.kind&&(a.push("kind=?"),s.push(e.kind)),e.id&&(a.push("resource_id=?"),s.push(e.id)),this.database.all(`SELECT session_id,turn_id,payload FROM chat_resource_links${a.length?` WHERE ${a.join(" AND ")}`:""}`,s).map(t=>({sessionId:t.session_id,turnId:t.turn_id,summary:w.parse(JSON.parse(t.payload))}))}};export{k as SqliteChatResourceStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as s,b as o}from"./chunk-RDSVU6F6.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-7WYL2IDD.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var T=class extends u{static{l(this,"SqliteConversationServingStore")}conversationTables=null;async ensureConversationTables(){if(await this.ready,!this.conversationTables){let e=this.writeQueue.then(async()=>{await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_grants (id TEXT PRIMARY KEY, revision INTEGER NOT NULL, payload TEXT NOT NULL)"),await this.exec("CREATE TABLE IF NOT EXISTS conversation_serving_executions (id TEXT PRIMARY KEY, grant_id TEXT NOT NULL, revision INTEGER NOT NULL, payload TEXT NOT NULL)")});this.writeQueue=e.catch(()=>{}),this.conversationTables=e}await this.conversationTables}async listConversationServingGrants(){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_grants ORDER BY id",[])).map(e=>s.parse(JSON.parse(e.payload)))}async listConversationServingExecutions(e){return await this.ensureConversationTables(),await this.writeQueue,(await this.all("SELECT payload FROM conversation_serving_executions WHERE grant_id = ? ORDER BY id",[e])).map(i=>o.parse(JSON.parse(i.payload)))}async saveConversationServingGrant(e,i){let n=s.parse(e);return await this.saveConversationServingRow("conversation_serving_grants",n.id,n.revision,n,i),n}async saveConversationServingExecution(e,i){let n=o.parse(e);return await this.saveConversationServingRow("conversation_serving_executions",n.id,n.revision,n,i,n.grantId),n}async saveConversationServingRow(e,i,n,t,v,c){if(n!==v+1)throw new Error("Conversation serving revision is invalid.");await this.ensureConversationTables();let d=this.writeQueue.then(async()=>{await this.exec("BEGIN IMMEDIATE");try{let r=await this.get(`SELECT revision, payload FROM ${e} WHERE id = ?`,[i]);if((r?.revision??0)!==v)throw new Error("Conversation serving authority changed.");if(r){let a=JSON.parse(r.payload),g=t;if((e==="conversation_serving_grants"?["id","ownerInstanceId","teamId","profileId","projectId","hostedModelId","role","roleTargetId"]:["id","grantId","jobId","artifactHash","priorBindingId","leaseId","canarySeconds","createdAt"]).some(E=>a[E]!==g[E]))throw new Error("The retained serving identity cannot be replaced.")}if(e==="conversation_serving_grants"){let a=s.parse(t);if(a.enabled&&await this.get("SELECT id FROM conversation_serving_grants WHERE id != ? AND json_extract(payload, '$.enabled') = 1 AND json_extract(payload, '$.profileId') = ? AND json_extract(payload, '$.role') = ? AND json_extract(payload, '$.roleTargetId') = ? LIMIT 1",[i,a.profileId,a.role,a.roleTargetId]))throw new Error("This native serving target already has an enabled owner grant. Revoke it before registering another.")}r?await this.run(`UPDATE ${e} SET revision = ?, payload = ? WHERE id = ?`,[n,JSON.stringify(t),i]):c?await this.run(`INSERT INTO ${e} (id, grant_id, revision, payload) VALUES (?, ?, ?, ?)`,[i,c,n,JSON.stringify(t)]):await this.run(`INSERT INTO ${e} (id, revision, payload) VALUES (?, ?, ?)`,[i,n,JSON.stringify(t)]),await this.exec("COMMIT")}catch(r){throw await this.exec("ROLLBACK").catch(()=>{}),r}});this.writeQueue=d.catch(()=>{}),await d}};export{T as SqliteConversationServingStore};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-Z3BWCFLV.js";import{v as f}from"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as k}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import{Hb as E,Ib as O,O as v,Ob as h,Pb as C,Q as y,f as R,h as p,m as H}from"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import{J as P,P as _}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as s,o as c}from"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as g}from"./chunk-FTQLQJQV.js";var w=class extends k{static{g(this,"SqliteEvaluationResultStore")}async saveProfileEvaluationGrade(a){let e=P.parse(a);c(e,"Profile evaluation grade");let n=await this.getProfileEvaluationGrade(e.contentHash);return n||(await this.upsertPayload("INSERT INTO profile_evaluation_grades (content_hash, payload) VALUES (?, ?) ON CONFLICT(content_hash) DO NOTHING",[e.contentHash,JSON.stringify(e)]),e)}async getProfileEvaluationGrade(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_grades WHERE content_hash = ?",[a],P.parse)}async saveProfileEvaluationReceipt(a){let e=R.parse(a);H(e);let n=await this.getProfileEvaluationReceipt(e.id);if(n){if(n.contentHash!==e.contentHash)throw new Error(`Profile evaluation receipt ${e.id} is immutable.`);return n}return await this.upsertPayload("INSERT INTO profile_evaluation_receipts (id, run_id, payload) VALUES (?, ?, ?)",[e.id,e.runManifest.id,JSON.stringify(e)]),e}async getProfileEvaluationReceipt(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_receipts WHERE id = ?",[a],R.parse)}async saveProfileEvaluationRun(a){let e=m.parse(a);c(e,"Profile evaluation run"),c(e.manifest,"Profile evaluation run manifest"),_(e.metric);let n=e.manifest.profileEvaluation;if(!n||n.profileId!==e.profileRef.profileId||e.metric.runManifest.id!==e.manifest.id||e.metric.runManifest.contentHash!==e.manifest.contentHash||s(e.receiptRefs)!==s(e.metric.receiptRefs))throw new Error("Profile evaluation run differs from its manifest or metric receipts.");if(e.receiptRefs.length!==e.manifest.population.length||e.gradeRefs.length!==e.receiptRefs.length)throw new Error("Profile evaluation run has an incomplete receipt or grade population.");for(let[t,u]of e.manifest.population.entries()){let d=e.receiptRefs[t],r=await this.getProfileEvaluationReceipt(d.id);if(!r||r.contentHash!==d.contentHash||r.runManifest.id!==e.manifest.id||r.runManifest.contentHash!==e.manifest.contentHash||r.id!==u.receiptId||r.taskId!==u.taskId||r.seed!==u.seed)throw new Error("Profile evaluation run references a missing or mismatched receipt.");let l=e.gradeRefs[t],o=await this.getProfileEvaluationGrade(l.contentHash);if(!o||o.contentHash!==l.contentHash||!r.graderEvidenceRefs.some(S=>S.id===l.id&&S.contentHash===l.contentHash))throw new Error("Profile evaluation run references a missing or mismatched grade.")}let i=await this.getProfileEvaluationRun(e.manifest.id);if(i){if(i.contentHash!==e.contentHash)throw new Error(`Profile evaluation run ${e.manifest.id} is immutable.`);return i}return await this.upsertPayload("INSERT INTO profile_evaluation_runs (id, profile_key, taskset_id, payload, created_at) VALUES (?, ?, ?, ?, ?)",[e.manifest.id,s(e.profileRef),e.manifest.tasksetRelease.id,JSON.stringify(e),e.completedAt]),e}async getProfileEvaluationRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_runs WHERE id = ?",[a],m.parse)}async listProfileEvaluationRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],m.parse)}async saveProfileEvaluationComparison(a,e){let n=f.parse(a),i=E.parse(e);c(i,"Profile evaluation comparison");let t=[];for(let d of i.members){let r=await this.getProfileEvaluationRun(d.runManifest.id);if(!r||s(r.profileRef)!==s(n)||r.manifest.contentHash!==d.runManifest.contentHash||r.metric.contentHash!==d.metricResultHash)throw new Error("Profile evaluation comparison references a missing or mismatched run.");t.push({manifest:r.manifest,result:r.metric})}if(O({id:i.id,members:t,createdAt:i.createdAt}).contentHash!==i.contentHash)throw new Error("Profile evaluation comparison differs from retained run evidence.");let u=await this.getProfileEvaluationComparison(i.id);if(u){if(u.contentHash!==i.contentHash)throw new Error(`Profile evaluation comparison ${i.id} is immutable.`);return u}return await this.upsertPayload("INSERT INTO profile_evaluation_comparisons (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[i.id,s(n),JSON.stringify(i),i.createdAt]),i}async getProfileEvaluationComparison(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_comparisons WHERE id = ?",[a],E.parse)}async listProfileEvaluationComparisons(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_comparisons WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],E.parse)}async saveProfileEvaluationSuiteRun(a,e,n){let i=f.parse(a),t=h.parse(n);c(t,"Profile evaluation suite run");let u=[];for(let l of t.members){let o=await this.getProfileEvaluationRun(l.runManifest.id);if(!o||s(o.profileRef)!==s(i)||o.manifest.contentHash!==l.runManifest.contentHash||o.contentHash!==l.runHash||o.passed!==l.passed||o.metric.value!==l.score)throw new Error("Profile evaluation suite references a missing or mismatched run.");u.push({definitionId:l.definitionId,manifest:o.manifest,runHash:o.contentHash,passed:o.passed,score:o.metric.value})}if(C({id:t.id,suiteId:t.suiteId,catalog:e,members:u,createdAt:t.createdAt,completedAt:t.completedAt}).contentHash!==t.contentHash)throw new Error("Profile evaluation suite differs from retained run evidence.");let r=await this.getProfileEvaluationSuiteRun(t.id);if(r){if(r.contentHash!==t.contentHash)throw new Error(`Profile evaluation suite run ${t.id} is immutable.`);return r}return await this.upsertPayload("INSERT INTO profile_evaluation_suite_runs (id, profile_key, payload, created_at) VALUES (?, ?, ?, ?)",[t.id,s(i),JSON.stringify(t),t.createdAt]),t}async getProfileEvaluationSuiteRun(a){return this.getParsedPayload("SELECT payload FROM profile_evaluation_suite_runs WHERE id = ?",[a],h.parse)}async listProfileEvaluationSuiteRuns(a){return this.listParsedPayloads("SELECT payload FROM profile_evaluation_suite_runs WHERE profile_key = ? ORDER BY created_at DESC, id ASC",[s(f.parse(a))],h.parse)}async saveBenchmarkRun(a){let e=v.parse(a.run);return c(e,"Benchmark run"),await this.upsertPayload(`INSERT INTO benchmark_runs (id, taskset_id, phase, payload, created_at)
|
|
3
|
-
VALUES (?, ?, ?, ?, ?)
|
|
4
|
-
ON CONFLICT(id) DO NOTHING`,[e.id,a.tasksetId,e.phase,JSON.stringify(e),e.createdAt]),e}async listBenchmarkRuns(a){return this.listParsedPayloads("SELECT payload FROM benchmark_runs WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",[a],v.parse)}async saveBenchmarkComparison(a){let e=y.parse(a.comparison);return c(e,"Benchmark comparison"),await this.upsertPayload(`INSERT INTO benchmark_comparisons (id, taskset_id, payload, created_at)
|
|
5
|
-
VALUES (?, ?, ?, ?)
|
|
6
|
-
ON CONFLICT(id) DO NOTHING`,[e.id,a.tasksetId,JSON.stringify(e),e.createdAt]),e}async listBenchmarkComparisons(a){return this.listParsedPayloads("SELECT payload FROM benchmark_comparisons WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",[a],y.parse)}async saveEvaluationResult(a){let e=p.parse(a.result);if(c(e,"Evaluation result"),e.metadata.sourceTasksetId!==a.tasksetId)throw new Error("Evaluation result does not match the supplied Taskset identity.");let n=await this.getEvaluationResult(e.id);if(n){if(n.contentHash!==e.contentHash)throw new Error(`Evaluation result ${e.id} is immutable and already has another content hash.`);return n}return await this.upsertPayload(`INSERT INTO evaluation_results (id, taskset_id, kind, payload, created_at)
|
|
7
|
-
VALUES (?, ?, ?, ?, ?)`,[e.id,a.tasksetId,a.kind,JSON.stringify(e),a.createdAt]),e}async getEvaluationResult(a){return this.getParsedPayload("SELECT payload FROM evaluation_results WHERE id = ?",[a],p.parse)}async listEvaluationResults(a,e){return this.listParsedPayloads(e?"SELECT payload FROM evaluation_results WHERE taskset_id = ? AND kind = ? ORDER BY created_at DESC, id ASC":"SELECT payload FROM evaluation_results WHERE taskset_id = ? ORDER BY created_at DESC, id ASC",e?[a,e]:[a],p.parse)}};export{m as LocalProfileEvaluationRunSchema,w as SqliteEvaluationResultStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b}from"./chunk-M3SCON53.js";import{a}from"./chunk-IZ56L2ZK.js";import"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-UWHIU24L.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as LocalHarnessReleaseRecordSchema,b as SqliteHarnessWorkspaceStore};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as d,c as p,h as N}from"./chunk-DABBHWSF.js";import"./chunk-F6UQ6PPK.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as T}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import{aa as u,t as I}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as l}from"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";function L(o,e){let i=d(o,e.scope,e.executionId);if(i.ownerActorId!==e.actorId||!i.completedAt)throw new Error("human_local_publication_source_denied");return o.exec("CREATE TABLE IF NOT EXISTS human_local_publications(scope TEXT NOT NULL,actor_id TEXT NOT NULL,execution_id TEXT NOT NULL,operation_id TEXT NOT NULL,execution_hash TEXT NOT NULL,publication TEXT NOT NULL,PRIMARY KEY(scope,actor_id,execution_id,operation_id))"),i}c(L,"setup");function w(o,e){if(L(o,e).executionHash!==e.executionHash)throw new Error("human_local_publication_source_changed");let t=o.get("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? AND operation_id=?",[e.scope,e.actorId,e.executionId,e.operationId]);if(t){if(t.execution_hash!==e.executionHash||l(JSON.parse(t.publication))!==l(e.publication))throw new Error("human_local_publication_operation_conflict");return}o.run("INSERT INTO human_local_publications VALUES(?,?,?,?,?,?)",[e.scope,e.actorId,e.executionId,e.operationId,e.executionHash,JSON.stringify(e.publication)])}c(w,"retainHumanLocalPublication");function O(o,e){let i=L(o,e);return o.all("SELECT publication,execution_hash FROM human_local_publications WHERE scope=? AND actor_id=? AND execution_id=? ORDER BY operation_id LIMIT 1001",[e.scope,e.actorId,e.executionId]).map(t=>{if(t.execution_hash!==i.executionHash)throw new Error("human_local_publication_source_changed");return JSON.parse(t.publication)})}c(O,"readHumanLocalPublications");function _(o,e){let i=d(o,e.teamId,e.executionId);if(i.ownerActorId!==e.actorId)throw new Error("live_agent_account_denied");let t=o.get("SELECT owner_id FROM local_experiment_executions WHERE team_id=? AND id=?",[e.teamId,e.executionId]),n=p(o,e.teamId,e.executionId).find(g=>g.receiptId===e.receiptId);if(!n||n.admission.request.model.providerId!=="claude-code")throw new Error("live_agent_case_denied");let a=o.get("SELECT payload FROM local_experiment_events WHERE team_id=? AND execution_id=? AND case_id=? AND type='external.start' ORDER BY sequence LIMIT 1",[e.teamId,e.executionId,e.receiptId]);if(!a||JSON.parse(a.payload).sessionId!==e.sessionId)throw new Error("live_agent_session_stale");o.exec("CREATE TABLE IF NOT EXISTS human_live_controls(team_id TEXT NOT NULL,actor_id TEXT NOT NULL,operation_id TEXT NOT NULL,request_hash TEXT NOT NULL,state TEXT NOT NULL,PRIMARY KEY(team_id,actor_id,operation_id))");let{phase:r,ownerId:R,...E}=e,m=l(E),s=o.get("SELECT request_hash,state FROM human_live_controls WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]);if(s&&s.request_hash!==m)throw new Error("live_agent_operation_conflict");if(e.phase==="inspect")return s?{replay:!0,state:s.state}:null;if(N(o,e.ownerId),t?.owner_id!==e.ownerId)throw new Error("live_agent_execution_lease_lost");if(e.phase==="acknowledge"){if(!s)throw new Error("live_agent_operation_missing");return s.state==="acknowledged"?{replay:!0,state:"acknowledged"}:(v(o,e,"external.control_receipt",{sessionId:e.sessionId,operationId:e.operationId,action:e.action,transport:"process_stdin",state:"acknowledged",occurredAt:new Date().toISOString()}),o.run("UPDATE human_live_controls SET state='acknowledged' WHERE team_id=? AND actor_id=? AND operation_id=?",[e.teamId,e.actorId,e.operationId]),{replay:!1,state:"acknowledged"})}if(s)return{replay:!0,state:s.state};if(o.get("SELECT c.operation_id FROM human_live_controls c JOIN local_experiment_events e ON e.team_id=c.team_id AND json_extract(e.payload,'$.actorId')=c.actor_id AND json_extract(e.payload,'$.operationId')=c.operation_id WHERE c.team_id=? AND c.actor_id=? AND c.state='prepared' AND e.execution_id=? AND e.case_id=? AND e.type='external.human_intervention' LIMIT 1",[e.teamId,e.actorId,e.executionId,e.receiptId]))throw new Error("live_agent_prior_delivery_unknown");if(n.status!=="running"||i.completedAt)throw new Error("live_agent_already_sealed");return o.run("INSERT INTO human_live_controls VALUES(?,?,?,?,'prepared')",[e.teamId,e.actorId,e.operationId,m]),v(o,e,"external.human_intervention",{...E,occurredAt:new Date().toISOString()}),{replay:!1,state:"prepared"}}c(_,"writeHumanLiveControl");function v(o,e,i,t){let n=JSON.stringify(t),a=Buffer.byteLength(n),r=o.get("SELECT event_count,byte_count FROM local_experiment_trace_budgets WHERE team_id=? AND execution_id=?",[e.teamId,e.executionId]);if(a>1048576||(r?.event_count??0)>=2e4||(r?.byte_count??0)+a>67108864)throw new Error("live_agent_control_too_large");o.run("INSERT INTO local_experiment_events(team_id,execution_id,case_id,type,payload) VALUES(?,?,?,?,?)",[e.teamId,e.executionId,e.receiptId,i,n]),o.run("INSERT INTO local_experiment_trace_budgets(team_id,execution_id,event_count,byte_count) VALUES(?,?,1,?) ON CONFLICT(team_id,execution_id) DO UPDATE SET event_count=event_count+1,byte_count=byte_count+excluded.byte_count",[e.teamId,e.executionId,a])}c(v,"appendControlEvent");var y=`
|
|
3
|
-
CREATE TABLE IF NOT EXISTS human_review_revisions(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id,revision));
|
|
4
|
-
CREATE TABLE IF NOT EXISTS human_reviews(scope TEXT NOT NULL,id TEXT NOT NULL,revision INTEGER NOT NULL,project_id TEXT NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id));
|
|
5
|
-
CREATE INDEX IF NOT EXISTS human_reviews_project_idx ON human_reviews(scope,project_id,id);
|
|
6
|
-
CREATE TABLE IF NOT EXISTS human_review_operations(scope TEXT NOT NULL,id TEXT NOT NULL,payload TEXT NOT NULL,PRIMARY KEY(scope,id));
|
|
7
|
-
`,x=class extends T{static{c(this,"SqliteHumanReviewStore")}async humanLiveControl(e){await this.ready;let i=this.writeQueue.then(()=>{let t=this.database;t.exec("BEGIN IMMEDIATE");try{let n=_(t,e);return t.exec("COMMIT"),n}catch(n){throw t.exec("ROLLBACK"),n}});return this.writeQueue=i.then(()=>{},()=>{}),i}async humanLiveControlReceipt(e){return await this.ready,await this.writeQueue,_(this.database,{...e,phase:"inspect"})}async rememberHumanLocalPublication(e){await this.ready;let i=this.writeQueue.then(()=>{let t=this.database;t.exec("BEGIN IMMEDIATE");try{w(t,e),t.exec("COMMIT")}catch(n){throw t.exec("ROLLBACK"),n}});return this.writeQueue=i.then(()=>{},()=>{}),i}async forgetHumanLocalPublication(e){await this.ready;let i=this.writeQueue.then(()=>{if(this.database.get("SELECT name FROM sqlite_master WHERE type='table' AND name='human_local_publications'"))return this.database.run("DELETE FROM human_local_publications WHERE scope=? AND actor_id=? AND json_extract(publication,'$.id')=?",[e.scope,e.actorId,e.publicationId])});return this.writeQueue=i.then(()=>{},()=>{}),i}async humanLocalPublications(e){return await this.ready,await this.writeQueue,O(this.database,e)}humanReviewRepository(){return{transaction:c(async(e,i)=>{await this.ready;let t=this.writeQueue.then(async()=>{let n=this.database;n.exec(y),n.exec("BEGIN IMMEDIATE");let a=!0;try{let r=await i(S(n,e,()=>{if(!a)throw new Error("human_transaction_closed")}));return n.exec("COMMIT"),r}catch(r){throw n.exec("ROLLBACK"),r}finally{a=!1}});return this.writeQueue=t.then(()=>{},()=>{}),t},"transaction")}}humanReviewLocalEvidence(e,i){let t=d(this.database,e,i),n=h(this.database,e,t.definition.id,t.definition.revision);return{execution:t,released:n,cases:p(this.database,e,i)}}};function S(o,e,i){return{async get(t,n){i();let a=n===void 0?o.get("SELECT payload FROM human_reviews WHERE scope=? AND id=?",[e,t]):o.get("SELECT payload FROM human_review_revisions WHERE scope=? AND id=? AND revision=?",[e,t,n]);return a?u.parse(JSON.parse(a.payload)):null},async put(t,n){i();let a=u.parse(t),r=o.get("SELECT revision FROM human_reviews WHERE scope=? AND id=?",[e,a.id]);if(a.scope!==e||a.revision!==n+1||(r?.revision??0)!==n)throw new I("human_revision_conflict",409);o.run("INSERT INTO human_review_revisions(scope,id,revision,payload) VALUES(?,?,?,?)",[e,a.id,a.revision,JSON.stringify(a)]),o.run("INSERT INTO human_reviews(scope,id,revision,project_id,payload) VALUES(?,?,?,?,?) ON CONFLICT(scope,id) DO UPDATE SET revision=excluded.revision,payload=excluded.payload",[e,a.id,a.revision,a.projectId,JSON.stringify(a)])},async list(t){i();let n=o.all(`SELECT payload FROM human_reviews WHERE scope=? ${t.projectId?"AND project_id=?":""} ${t.afterId?"AND id>?":""} ORDER BY id LIMIT ?`,[e,...t.projectId?[t.projectId]:[],...t.afterId?[t.afterId]:[],t.limit+1]),a=n.slice(0,t.limit).map(r=>u.parse(JSON.parse(r.payload)));return{items:a,nextCursor:n.length>t.limit?a.at(-1).id:null}},async operation(t){i();let n=o.get("SELECT payload FROM human_review_operations WHERE scope=? AND id=?",[e,t]);return n?JSON.parse(n.payload):null},async saveOperation(t,n){i(),o.run("INSERT INTO human_review_operations(scope,id,payload) VALUES(?,?,?)",[e,t,JSON.stringify(n)])}}}c(S,"createHumanReviewTransaction");export{y as HUMAN_REVIEW_SQL,x as SqliteHumanReviewStore,S as createHumanReviewTransaction};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import{H as d}from"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as s}from"./chunk-FTQLQJQV.js";function f(e){if(Array.isArray(e)){let r=!1,n=e.map(c=>{let t=f(c);return r||=t.changed,t.value});return{value:r?n:e,changed:r}}if(!u(e))return{value:e,changed:!1};let o=!1,i={};for(let[r,n]of Object.entries(e)){if(r==="learnedPreference"&&n!==null){let t=u(n)?Object.fromEntries(Object.entries(n).filter(([l])=>l!=="qualificationKind")):n,a=d.safeParse(t);i[r]=a.success?a.data:null,o||=!a.success||t!==n;continue}let c=f(n);i[r]=c.value,o||=c.changed}return{value:o?i:e,changed:o}}s(f,"sanitizeUnverifiableLearnedPreferenceBindings");function u(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}s(u,"isRecord");export{f as sanitizeUnverifiableLearnedPreferenceBindings};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-KHTAAVC2.js";import"./chunk-KCJVFLBB.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as SqliteLearningStore,b as createLearningTransaction,c as putLearningResourceInTransaction};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-5FU5RLML.js";import{a as s}from"./chunk-MEGKXGW3.js";import{a as u}from"./chunk-KCJVFLBB.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-J572ANHX.js";import{t as c}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var p=class extends u{static{l(this,"SqliteLearningCredentialStore")}async credentialTransaction(t){await this.ready;let n=this.writeQueue.then(()=>{let e=this.database;e.exec("BEGIN IMMEDIATE");try{let r=t(e);return e.exec("COMMIT"),r}catch(r){throw e.exec("ROLLBACK"),r}});return this.writeQueue=n.then(()=>{},()=>{}),n}async createLearningSourceCredential(t,n,e){let r=s.parse(t);return this.credentialTransaction(a=>{let i=a.get("SELECT payload, request_hash FROM learning_source_credentials WHERE id = ?",[r.id]);if(i){if(i.request_hash!==e)throw new c("learning_credential_operation_conflict",409);return s.parse(JSON.parse(i.payload))}if(a.get("SELECT id FROM learning_source_credentials WHERE key_hash = ?",[n]))throw new c("learning_credential_secret_reused",409);return a.run("INSERT INTO learning_source_credentials (id, scope, source_id, key_hash, request_hash, payload) VALUES (?, ?, ?, ?, ?, ?)",[r.id,r.scope,r.sourceId,n,e,JSON.stringify(r)]),r})}async findLearningSourceCredential(t){await this.ready,await this.writeQueue;let n=this.database.get("SELECT payload FROM learning_source_credentials WHERE key_hash = ?",[t]);return n?s.parse(JSON.parse(n.payload)):null}async listLearningSourceCredentials(t,n,e,r){if(!Number.isInteger(e)||e<1||e>100)throw new Error("learning_credential_page_invalid");await this.ready,await this.writeQueue;let a=this.database.all("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id > ? ORDER BY id LIMIT ?",[t,n,r??"",e+1]),i=a.slice(0,e).map(o=>s.parse(JSON.parse(o.payload)));return{items:i,nextCursor:a.length>e?i.at(-1).id:null}}async revokeLearningSourceCredential(t,n,e,r){return this.credentialTransaction(a=>{let i=a.get("SELECT payload FROM learning_source_credentials WHERE scope = ? AND source_id = ? AND id = ?",[t,n,e]);if(!i)return null;let o=s.parse(JSON.parse(i.payload));if(o.revokedAt!==null)return o;let d=s.parse({...o,revokedAt:r});return a.run("UPDATE learning_source_credentials SET payload = ? WHERE scope = ? AND source_id = ? AND id = ?",[JSON.stringify(d),t,n,e]),d})}};export{p as SqliteLearningCredentialStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as B}from"./chunk-KHTAAVC2.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as E}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import{b as k,m as v,n as y}from"./chunk-6RS4NAOY.js";import"./chunk-ZZHXQCNB.js";import{wa as M}from"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import{A as u}from"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import{P as R,ca as g}from"./chunk-J572ANHX.js";import{t as s}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as d}from"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as p}from"./chunk-FTQLQJQV.js";var T=class extends E{static{p(this,"SqliteModelBatchReviewStore")}async findModelBatchReview(t,r){return this.modelBatchReviewTransaction(t,r)}async beginModelBatchReview(t,r,o){let e=await this.modelBatchReviewTransaction(t,r,o);if(!e)throw new Error("Model batch review was not created.");return e}async modelBatchReviewTransaction(t,r,o){let e=k.parse(r);await this.ready;let l=this.writeQueue.then(async()=>{let a=this.db;if(!a)throw new Error("Model review store is closed.");a.exec("BEGIN IMMEDIATE");let w=!0,h=B(a,t,()=>{if(!w)throw new Error("Model review transaction is closed.")});try{let i=a.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[e.modelId,t]);if(!i)throw new s("model_not_found",404);let n=u.parse(JSON.parse(i.payload)),m=await v(h,e);if(m||!o)return a.exec("COMMIT"),m;if(n.revision!==e.expectedModelRevision||!n.trainingSetup.tasksetRef||!R(n.trainingSetup.tasksetRef,e.tasksetRef))throw new s("model_revision_conflict",409);let f=a.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND profile_id = ?",[e.tasksetRef.id,e.tasksetRef.revision,t]),c=f?M.parse(JSON.parse(f.payload)):null;if(!c||c.contentHash!==e.tasksetRef.contentHash||d(c.metadata.learning)!==d(g(o.taskset)))throw new s("model_review_package_mismatch",409);let _=await y(h,{scope:t,request:e,package:o,now:new Date().toISOString()});return a.exec("COMMIT"),_}catch(i){throw a.exec("ROLLBACK"),i}finally{w=!1}});return this.writeQueue=l.then(()=>{},()=>{}),l}};export{T as SqliteModelBatchReviewStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-B5R53U74.js";import{c as D,e as O,f as W}from"./chunk-XMHIQ3SK.js";import{a as _}from"./chunk-YCZZ62C2.js";import"./chunk-WP2L2NY2.js";import{d as C}from"./chunk-KCOTDUGW.js";import"./chunk-RZUCVF2Q.js";import"./chunk-ZG6353RM.js";import{e as B}from"./chunk-ELX7VRSU.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as z}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import{i as q,k as A}from"./chunk-6RS4NAOY.js";import{B as L}from"./chunk-ZZHXQCNB.js";import{Ub as u,ga as b,ja as H,wa as x}from"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import{B as T,C as I,H as y}from"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-YBNKGA5C.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import{O as w,b as E,d as S}from"./chunk-J572ANHX.js";import{Ma as R,Ra as M}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as c}from"./chunk-VVNV4NNW.js";import{A as s}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";var F=s.string().trim().min(1).max(500),P=s.string().regex(/^[a-f0-9]{64}$/),f=s.object({schemaVersion:s.literal("openpond.localModelProjectPreparationInput.v1"),source:s.object({ownerId:F,datasetId:F,revision:s.number().int().positive(),workspaceHash:P,packageHash:P}).strict(),project:T,rewardBinding:M,rewards:s.array(R).min(1).max(100),assets:s.array(E).max(100)}).strict(),N=s.object({schemaVersion:s.literal("openpond.localModelProjectPreparation.v1"),request:f,package:b,taskset:x,saveRequest:I,contentHash:P}).strict();async function Q(p){let e=f.parse(p.request),r=H(p.source);if(r.contentHash!==e.source.packageHash)throw new Error("Dataset package changed since preparation was requested.");if(e.project.trainingSetup.tasksetRef||e.project.trainingSetup.tasksetRelease||e.project.trainingSetup.evaluationTasksetRef||e.project.trainingSetup.rewardBindingRef||e.project.trainingSetup.harnessRelease)throw new Error("Preparation selects its Taskset and Reward from the pinned source; omit preselected Taskset, Reward and Harness references.");if(!e.project.trainingSetup.recipe||!e.project.trainingSetup.baseModel)throw new Error("Preparation requires an explicit pinned base model and complete recipe.");let a=e.project.trainingSetup.baseModel,o=e.project.trainingSetup.recipe,i=o.baseModel;if(!a.revision||!a.tokenizerRevision||!a.chatTemplateHash||!i||i.id!==a.modelId||i.revision!==a.revision||i.tokenizerRevision!==a.tokenizerRevision||i.chatTemplateHash!==a.chatTemplateHash||o.method!==e.project.trainingSetup.method)throw new Error("Project and recipe must select the same pinned base model and training method.");if(!r.taskset.tasks.some(t=>t.split==="train")||!r.taskset.tasks.some(t=>t.split==="validation"||t.split==="frozen_eval"))throw new Error("Preparation requires existing training and held-out validation tasks; it never changes splits.");let n=new Set(e.rewardBinding.sources.map(t=>c(t.reward)));if(new Set(e.rewards.map(t=>c(w(t)))).size!==e.rewards.length||e.rewards.some(t=>!n.has(c(w(t)))))throw new Error("Preparation Reward closure contains unexpected or duplicate releases.");let l=e.rewards.flatMap(t=>[...t.assets,..."verifierRef"in t.implementation?[t.implementation.verifierRef]:[],..."rubricRef"in t.implementation?[t.implementation.rubricRef]:[],..."inputContract"in t.implementation?[t.implementation.inputContract]:[]]),G=new Set(l.map(t=>t.id));if(new Set(e.assets.map(t=>t.id)).size!==e.assets.length||e.assets.some(t=>!G.has(t.id)))throw new Error("Preparation Reward closure contains unexpected or duplicate assets.");for(let t of l){let d=e.assets.find(K=>K.id===t.id);if(!d||t.visibility!=="verifier")throw new Error("Preparation requires its exact private verifier asset closure.");S(d,t)}for(let t of["training","evaluation"])if(!e.rewardBinding.sources.some(d=>d.role===t&&d.weight>0))throw new Error(`Preparation requires a positively weighted ${t} Reward source.`);let k=A({owner:{scopeId:e.project.profileId,modelId:e.project.id},source:r,rewardBinding:e.rewardBinding,rewards:e.rewards,assets:e.assets}),g=k.modelResources.assets.filter(t=>e.assets.some(d=>d.id===t.id));if(new Set(g.map(t=>t.asset.path)).size!==g.length||g.some(t=>t.asset.visibility!=="verifier"))throw new Error("Preparation requires distinct private verifier paths with verifier visibility.");let m=u({package:k,profileId:e.project.profileId,name:p.name,createdAt:p.createdAt});m.taskset=_(m.taskset,p.reviewedTaskset,r);let j=w(m.taskset),J=await y({...e.project,trainingSetup:{...e.project.trainingSetup,tasksetRef:j,evaluationTasksetRef:m.taskset.tasks.some(t=>t.split==="validation"||t.split==="frozen_eval")?j:null,rewardBindingRef:w(e.rewardBinding)}},0),v={schemaVersion:"openpond.localModelProjectPreparation.v1",request:e,package:k,taskset:m.taskset,saveRequest:J};return N.parse({...v,contentHash:c(v)})}h(Q,"prepareLocalModelProject");function V(p){let e=N.parse(p),{contentHash:r,...a}=e;if(c(a)!==r)throw new Error("Project preparation receipt content hash changed.");return e}h(V,"parseLocalModelProjectPreparation");var $=class extends z{static{h(this,"SqliteModelProjectPreparationStore")}async compile(e){let r=this.database.get("SELECT id FROM local_resource_owner WHERE singleton=1",[]),a=this.database.get("SELECT r.payload FROM local_dataset_versions w JOIN local_dataset_records r ON r.record_hash=w.record_hash WHERE w.id=? AND w.revision=?",[e.source.datasetId,e.source.revision]);if(!a||!r||r.id!==e.source.ownerId)throw new Error("Dataset is unavailable on the selected local owner.");let o=B(this.database,a.payload);if(o.ownerId!==r.id||o.workspace.contentHash!==e.source.workspaceHash)throw new Error("Dataset owner or workspace changed since preparation was requested.");let i=q({workspace:o.workspace,preparation:null,adapterId:"openpond-desktop-taskset-authoring-v1",now:o.workspace.draft.updatedAt}),n=L({draft:{...o.workspace.draft,profileId:e.project.profileId},now:o.workspace.draft.updatedAt});return Q({request:e,source:i,reviewedTaskset:n,createdAt:o.workspace.draft.updatedAt,name:o.workspace.draft.name})}async prepareLocalModelProject(e){let r=f.parse(e);await this.ready;let a=this.writeQueue.then(async()=>{if(this.database.get("SELECT id FROM model_projects WHERE id=?",[r.project.id]))throw new Error("Model Project already exists; preparation only creates a distinct Model.");return this.compile(r)});return this.writeQueue=a.then(()=>{},()=>{}),a}async applyLocalModelProjectPreparation(e){let r=V(e);await this.ready;let a=this.writeQueue.then(async()=>{let o=await this.compile(r.request);if(c(o)!==c(r))throw new Error("Project preparation differs from the exact source, Reward closure or recipe. Prepare and review it again.");let i=D(this.database,r.saveRequest);if(i)return{project:i,taskset:r.taskset,packageHash:r.package.contentHash,preparationHash:r.contentHash};if(this.database.get("SELECT id FROM model_projects WHERE id=?",[r.request.project.id]))throw new Error("Model Project already exists with a different preparation.");let n=u({package:r.package,profileId:r.request.project.profileId,name:r.taskset.name,createdAt:r.taskset.createdAt});n.taskset=o.taskset,await C({home:this.home,...n}),this.database.exec("BEGIN IMMEDIATE");try{W(this.database,n);let l=O(this.database,r.saveRequest,null,r.package);return this.database.exec("COMMIT"),{project:l,taskset:n.taskset,packageHash:n.package.contentHash,preparationHash:r.contentHash}}catch(l){throw this.database.exec("ROLLBACK"),l}});return this.writeQueue=a.then(()=>{},()=>{}),a}};export{$ as SqliteModelProjectPreparationStore};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-W45RKGM6.js";import{a as N,d as L}from"./chunk-UPWJSNL5.js";import{d as x,e as Te,g as ye}from"./chunk-6EBCS57F.js";import{e as we,f as Ee}from"./chunk-XMHIQ3SK.js";import{a as ue}from"./chunk-YCZZ62C2.js";import"./chunk-WP2L2NY2.js";import{b as C,c as D,d as ge}from"./chunk-KCOTDUGW.js";import{a as ke}from"./chunk-4L6DU6Z2.js";import{a as M,b as g,c as q}from"./chunk-RZUCVF2Q.js";import"./chunk-M3FLEZ4E.js";import"./chunk-OQPJ7FJF.js";import"./chunk-WBUK73ST.js";import"./chunk-P7HRF4FM.js";import"./chunk-GS6ZUSIN.js";import"./chunk-2ITZW2CN.js";import"./chunk-OG33QAG6.js";import"./chunk-W5W4IODW.js";import"./chunk-PWK5Z5S3.js";import"./chunk-W45RKGM6.js";import{a as me}from"./chunk-KCJVFLBB.js";import"./chunk-3YXYBYWK.js";import"./chunk-MPNJ2BB4.js";import"./chunk-KOKX7PBS.js";import"./chunk-V7KR74NO.js";import"./chunk-XGY4OQLC.js";import"./chunk-7O6Z3VOZ.js";import"./chunk-5EP2DZLJ.js";import"./chunk-IDOGNIMV.js";import"./chunk-W45RKGM6.js";import"./chunk-PBTXLQAU.js";import"./chunk-7WYL2IDD.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-PCB65K4G.js";import{d as ce,e as fe,f as U,o as le,p as pe}from"./chunk-6RS4NAOY.js";import{A as de,j as re,k as ie,m as oe,n as ne}from"./chunk-ZZHXQCNB.js";import{Ca as H,Nb as F,S as se,Ub as he,aa as A,b as X,c as Z,e as $,i as ee,oa as y,wa as T}from"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import{A as S,B as ae,q as te}from"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LAOLJDVB.js";import"./chunk-UWHIU24L.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import{e as J,f as Y}from"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{O as B,P as I}from"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import{n as m}from"./chunk-VVNV4NNW.js";import{A as u}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";import{randomUUID as et}from"node:crypto";import{cp as tt,mkdir as at,readdir as st,rename as G,rm as Ne,stat as rt}from"node:fs/promises";import O from"node:path";function ve(o,t,e,a){let s=t.modelScope;if(!s)return;let i=o.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[s.modelId,t.profileId]);if(!i)throw new Error("Taskset draft Model was not found in this Profile.");let r=S.parse(JSON.parse(i.payload)),n={id:e.id,revision:e.revision,contentHash:e.contentHash},f=e.metadata.rewardBinding===void 0?null:te.parse(e.metadata.rewardBinding),p=s.source?.authoringGraph==="bound"&&f&&r.trainingSetup.rewardBindingRef&&I(f,r.trainingSetup.rewardBindingRef);return we(o,{schemaVersion:"openpond.modelProjectSave.v1",operationId:`draft-publication:${m({draftId:t.id,revision:t.revision,scope:s,tasksetRef:n})}`,expectedRevision:s.expectedModelRevision,project:ae.strip().parse({...r,trainingSetup:{...r.trainingSetup,tasksetRef:n,rewardBindingRef:f,tasksetRelease:null,recipe:p?r.trainingSetup.recipe:null,...r.trainingSetup.evaluationTasksetRef&&r.trainingSetup.tasksetRef&&I(r.trainingSetup.evaluationTasksetRef,r.trainingSetup.tasksetRef)?{evaluationTasksetRef:n}:{}}})},null,a?.modelResources?{...a.modelResources,taskset:a.taskset,executionResources:{environment:a.environment,verifierSet:a.verifierSet}}:a??void 0)}h(ve,"selectTasksetDraftModel");import{createHash as je,randomUUID as Je}from"node:crypto";import{lstat as Se,mkdir as Pe,readdir as Be,readFile as $e,rename as qe,rm as Ue,writeFile as Ve}from"node:fs/promises";import R from"node:path";var b=le.extend({workspaceHash:u.string().regex(/^[a-f0-9]{64}$/).nullable()}).strict();async function De(o){let{db:t,profileId:e}=o,a=Z.parse(o.request),s=h(()=>{let w=t.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[a.modelId,e]);if(!w)throw new Error("Taskset draft Model was not found in this Profile.");return S.parse(JSON.parse(w.payload))},"requireModel"),i=s(),r=m(a),n=t.get("SELECT request_hash, state, payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(n){if(n.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");if(n.state==="deleted")throw new Error("This Taskset draft was deleted.");return b.parse(JSON.parse(n.payload))}if(!o.source)return null;if(i.revision!==a.expectedModelRevision)throw new Error("Model changed before draft initialization. Refresh before editing.");let f=i.trainingSetup.tasksetRef,p=f?t.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND profile_id = ?",[f.id,f.revision,e]):null,d=p?T.parse(JSON.parse(p.payload)):null;if(!d||!f||d.contentHash!==f.contentHash)throw new Error("The selected source Taskset is unavailable.");let l=o.source,c=i.hosted?.apiOrigin?i.hosted.tasksets.find(w=>w.localTasksetId===d.id&&w.localTasksetHash===d.contentHash&&w.packageHash===l.contentHash&&w.releaseId===l.taskset.id&&w.releaseRevision===l.taskset.revision&&w.releaseHash===l.taskset.contentHash):null,k=typeof d.metadata.importedPackageHash=="string"?d.metadata.importedPackageHash:c?.packageHash;if(k?k!==l.contentHash:!I(B(F({taskset:d,adapterId:x(d)}).tasksetRelease),B(l.taskset)))throw new Error("Taskset draft package differs from its selected source.");let P=l.modelResources?se.safeParse(l.taskset.metadata.modelTasksetDerivation):X.safeParse(l.taskset.metadata.modelTasksetAuthoring),_=c&&P.success&&P.data.owner.modelId===i.id?P.data.owner:{scopeId:e,modelId:i.id},Ce=ce({request:a,owner:_,source:l}),ze=pe({sourceDraft:de(d),source:l,preparation:Ce,expectedModelRevision:a.expectedModelRevision});await C(o.home,l);let K=b.parse({...ze,workspaceHash:null}),We=K.draft;t.exec("BEGIN IMMEDIATE");try{let w=t.get("SELECT request_hash FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(w&&w.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");if(!w&&s().revision!==a.expectedModelRevision)throw new Error("Model changed during draft initialization. Refresh before editing.");t.run("INSERT INTO model_taskset_draft_operations (profile_id, operation_id, request_hash, draft_id, state, payload) VALUES (?, ?, ?, ?, 'prepared', ?) ON CONFLICT(profile_id, operation_id) DO NOTHING",[e,a.operationId,r,We.id,JSON.stringify(K)]),t.exec("COMMIT")}catch(w){throw t.exec("ROLLBACK"),w}let j=t.get("SELECT request_hash, payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[e,a.operationId]);if(!j||j.request_hash!==r)throw new Error("Taskset draft operation was reused with different input.");return b.parse(JSON.parse(j.payload))}h(De,"prepareDraftInitialization");async function Re(o){let{initialized:t,workspacePath:e}=o;if(o.completed())return;if(t.workspaceHash)try{if(await Se(e),o.completed())return;if(await V(e),await g(e)!==t.workspaceHash)throw new Error("Prepared Taskset draft files changed before initialization completed.");return}catch(s){if(s.code!=="ENOENT")throw s}let a=`${e}.initializing-${Je()}`;await Pe(R.dirname(e),{recursive:!0});try{let s=t.draft.modelScope?.source;if(!s)throw new Error("Taskset draft lost its source preparation.");let i=await D(o.home,s.sourcePackageHash),r=new Map;for(let f of t.filePaths){let p=i.files.find(d=>d.asset.id===f.assetId);if(!p)throw new Error("Taskset draft source asset is missing.");for(let d of f.paths){if(d.includes("\\")||R.posix.isAbsolute(d)||d.split("/").some(k=>!k||k==="."||k===".."||k.startsWith(".env")))throw new Error("Taskset draft source path is invalid.");let l=r.get(d);if(l&&l!==p.asset.contentHash)throw new Error("Taskset draft source paths conflict.");if(l)continue;let c=R.join(a,d);await Pe(R.dirname(c),{recursive:!0}),await Ve(c,A(p),{flag:"wx"}),r.set(d,p.asset.contentHash)}}await M(t.draft,a);for(let[f,p]of r)if(je("sha256").update(await $e(R.join(a,f))).digest("hex")!==p)throw new Error(`Taskset draft source asset conflicts with authoring file ${f}.`);let n=await g(a);if(o.retainHash({...t,workspaceHash:n}),o.completed())return;try{await qe(a,e)}catch(f){if(!["EEXIST","ENOTEMPTY"].includes(f.code??""))throw f;if(o.completed())return;if(await V(e),await g(e)!==n)throw new Error("Prepared Taskset draft files changed before initialization completed.")}}finally{await Ue(a,{recursive:!0,force:!0})}}h(Re,"materializeDraftInitialization");async function V(o){let t=await Se(o);if(!t.isDirectory()||t.isSymbolicLink())throw new Error("Taskset draft source must be a regular directory.");for(let e of await Be(o,{withFileTypes:!0})){if(e.name.startsWith(".env")||e.isSymbolicLink())throw new Error("Taskset draft source contains a prohibited file.");if(e.isDirectory())await V(R.join(o,e.name));else if(!e.isFile())throw new Error("Taskset draft source must contain regular files.")}}h(V,"assertRegularTree");import Qe from"node:path";async function be(o){let t=F({taskset:o.taskset,adapterId:x(o.taskset)}),e=await ye({root:o.directory,content:{schemaVersion:"openpond.tasksetPackage.v1",taskset:t.tasksetRelease,environment:t.environmentRelease,verifierSet:t.verifierSetRelease},sources:U.parse(o.taskset.metadata.portableFileInventory??[])}),a=o.preparation.authoringGraph==="bound"?await D(o.home,o.preparation.sourcePackageHash):void 0,s=fe({preparation:o.preparation,edited:e,source:a});if(s.modelResources){let c=he({package:s,profileId:o.taskset.profileId,name:o.taskset.name,createdAt:o.taskset.createdAt}),k=ue(c.taskset,o.taskset),P=T.parse({...k,authoringProvenance:o.taskset.authoringProvenance,metadata:{...k.metadata,sourcePackageHash:o.taskset.metadata.sourcePackageHash}}),_=T.parse({...P,contentHash:H(P)});return await ge({home:o.home,...c,taskset:_}),{taskset:_,directory:Qe.join(o.home,"training","tasksets",String(_.environment.metadata.runtimeSourceTasksetId))}}let i=U.parse(o.taskset.metadata.portableFileInventory??[]),r=s.files.map(c=>({asset:c.asset,sourcePath:i.find(k=>k.asset.id===c.asset.id)?.sourcePath??c.asset.path})),n=s.taskset.environment.entrypoint==="openpond.javascript-environment.v1"?s.files.find(c=>c.asset.path==="environment/execution.json"):void 0,f=`model-draft-${m({packageHash:s.contentHash,taskset:o.taskset})}`,p=T.parse({...o.taskset,id:s.taskset.id,revision:s.taskset.revision,metadata:{...o.taskset.metadata,portableFileInventory:r,importedPackageHash:s.contentHash,derivedPortableMetadata:s.taskset.metadata},environment:{...o.taskset.environment,metadata:{...o.taskset.environment.metadata,runtimeSourceTasksetId:f,portableExecutionResources:{environment:s.environment,verifierSet:s.verifierSet}}}}),d=T.parse({...p,contentHash:H(p)}),l=await N(o.home,{taskset:d,generatedFiles:n?[{path:n.asset.path,role:"environment",content:new TextDecoder("utf-8",{fatal:!0}).decode(A(n))}]:[]},f,{source:{directory:o.directory,packageHash:await g(o.directory)},verify:h(c=>L(c,d),"verify")});return await C(o.home,s),{directory:l,taskset:d}}h(be,"materializeModelTasksetDraftPublication");import{constants as Q}from"node:fs";import{createHash as Ge}from"node:crypto";import{lstat as Ie,mkdir as Ke,open as Ye,readdir as Xe,rm as _e}from"node:fs/promises";import z from"node:path";var v=h((o,t)=>Y(z.join(o,"state","taskset-draft-writes"),t),"withTasksetDraftLock"),He=ie,Ze=h(o=>Ge("sha256").update(o).digest("hex"),"digest");async function W(o,t,e=!1){$.parse(t);let a=o;for(let s of["",...t.split("/").slice(0,-1)]){s&&(a=z.join(a,s)),e&&await Ke(a,{recursive:!1}).catch(r=>{if(r.code!=="EEXIST")throw r});let i=await Ie(a);if(!i.isDirectory()||i.isSymbolicLink())throw new Error("Taskset draft paths must use regular directories.")}return z.join(o,t)}h(W,"regularPath");async function Me(o,t){let e=await W(o,t),a=await Ye(e,Q.O_RDONLY|Q.O_NOFOLLOW|Q.O_NONBLOCK);try{let s=await a.stat();if(!s.isFile()||s.size>re)throw new Error("Taskset draft file must be a regular file within the 6 MB editing limit.");let i=Buffer.alloc(s.size),r=0;for(;r<i.length;){let n=await a.read(i,r,i.length-r,r);if(!n.bytesRead)throw new Error("Taskset draft file changed during reading.");r+=n.bytesRead}if((await a.read(Buffer.alloc(1),0,1,r)).bytesRead)throw new Error("Taskset draft file changed during reading.");return i}finally{await a.close()}}h(Me,"readBytes");async function Oe(o,t){let e=await Me(o,t);return oe(t,e)}h(Oe,"readTasksetDraftFile");async function Ae(o){let t=[];async function e(a=""){for(let s of await Xe(z.join(o,a),{withFileTypes:!0})){let i=a?`${a}/${s.name}`:s.name;if($.parse(i),s.isSymbolicLink())throw new Error("Taskset draft files cannot contain symbolic links.");if(s.isDirectory()){await e(i);continue}if(!s.isFile())throw new Error("Taskset draft files must be regular files.");if(t.length>=1e4)throw new Error("Taskset draft file inventory exceeds its limit.");let r=await Ie(await W(o,i));if(!r.isFile()||r.isSymbolicLink())throw new Error("Taskset draft files must be regular files.");t.push({path:i,sizeBytes:r.size,writable:He(i)})}}return h(e,"visit"),await W(o,"taskset.json"),await e(),t.sort((a,s)=>a.path.localeCompare(s.path))}h(Ae,"listTasksetDraftFiles");async function Fe(o,t,e){if(!He(t.path))throw new Error("This file is managed by the Taskset forms or retained source history.");let a=null;try{a=await Me(o,t.path)}catch(r){if(r.code!=="ENOENT")throw r}if((a?Ze(a):null)!==t.expectedFileHash)throw new Error("Taskset draft file changed. Reload it before saving.");if(!a&&t.content===null)throw new Error("Taskset draft file does not exist.");let s=t.content?ne(t.content):null,i=await W(o,t.path,!0);s?await J(i,s):await _e(i);try{return await e()}catch(r){throw a?await J(i,a):await _e(i,{force:!0}),r}}h(Fe,"mutateTasksetDraftFile");var E=u.object({schemaVersion:u.literal("openpond.tasksetDraftPointer.v1"),id:u.string().trim().min(1),profileId:u.string().trim().min(1),modelScope:y.shape.modelScope,status:u.enum(["draft","validating","needs_review","published"]),revision:u.number().int().positive(),workspacePath:u.string().trim().min(1),packageHash:u.string().regex(/^[a-f0-9]{64}$/),publishedTasksetRef:u.object({id:u.string().trim().min(1),revision:u.number().int().positive(),contentHash:u.string().trim().min(8)}).nullable(),createdAt:u.string().trim().min(1),updatedAt:u.string().trim().min(1)}),xe=class extends me{static{h(this,"SqliteTasksetDraftStore")}async initializeModelTasksetDraft(t,e,a){await this.ready;let s=this.writeQueue.then(()=>v(this.home,async()=>{let i=this.database,r=await De({db:i,home:this.home,profileId:t,request:e,source:a});if(!r)return null;let n=h(()=>{let d=i.get("SELECT state FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]);if(d?.state==="deleted")throw new Error("This Taskset draft was deleted.");let l=i.get("SELECT payload FROM taskset_drafts WHERE id = ?",[r.draft.id]);if(!l){if(d?.state==="ready")throw new Error("The initialized Taskset draft is unavailable.");return!1}let c=E.parse(JSON.parse(l.payload));if(c.profileId!==t||c.modelScope?.source?.requestHash!==r.draft.modelScope?.source?.requestHash)throw new Error("Taskset draft identity conflicts with its initialization.");return!0},"completed"),f=this.workspacePath(r.draft.id);await Re({home:this.home,initialized:r,workspacePath:f,completed:n,retainHash:h(d=>{let l=i.get("SELECT payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]),c=b.parse(JSON.parse(l.payload));if(c.workspaceHash&&c.workspaceHash!==d.workspaceHash)throw new Error("Taskset draft initialization produced different files on retry.");i.run("UPDATE model_taskset_draft_operations SET payload = ? WHERE profile_id = ? AND operation_id = ? AND state = 'prepared'",[JSON.stringify(d),t,e.operationId])},"retainHash")}),i.exec("BEGIN IMMEDIATE");try{if(!n()){let d=i.get("SELECT payload FROM model_taskset_draft_operations WHERE profile_id = ? AND operation_id = ?",[t,e.operationId]),l=b.parse(JSON.parse(d.payload)),c=l.draft,k=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:c.id,profileId:t,modelScope:c.modelScope,status:c.status,revision:c.revision,workspacePath:f,packageHash:l.workspaceHash,publishedTasksetRef:c.publishedTasksetRef,createdAt:c.createdAt,updatedAt:c.updatedAt});i.run("INSERT INTO taskset_drafts (id, profile_id, status, revision, payload, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)",[c.id,t,c.status,c.revision,JSON.stringify(k),c.createdAt,c.updatedAt]),i.run("UPDATE model_taskset_draft_operations SET state = 'ready' WHERE profile_id = ? AND operation_id = ?",[t,e.operationId])}i.exec("COMMIT")}catch(d){throw i.exec("ROLLBACK"),d}let p=i.get("SELECT payload FROM taskset_drafts WHERE id = ?",[r.draft.id]);return this.draftFromStoredPayload(JSON.parse(p.payload))}));return this.writeQueue=s.then(()=>{},()=>{}),s}async saveTasksetDraft(t,e,a={}){let s=y.parse(t);await this.ready;let i=this.writeQueue.then(()=>v(this.home,async()=>{let r=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ?",[s.id]),n=r?E.safeParse(JSON.parse(r.payload)):null;if(n?.success){if(n.data.profileId!==s.profileId)throw new Error("Taskset draft profile cannot change.");if(m(n.data.modelScope?{...n.data.modelScope,expectedModelRevision:0}:null)!==m(s.modelScope?{...s.modelScope,expectedModelRevision:0}:null)||!a.refreshModelRevision&&m(n.data.modelScope)!==m(s.modelScope))throw new Error("Taskset draft Model ownership cannot change.");if(n.data.status==="published")throw new Error("Published Taskset drafts are immutable. Initialize a new draft to revise the Taskset.");if(s.revision<n.data.revision||e!==void 0&&n.data.revision!==e)throw new Error("Taskset draft changed before saving. Refresh before saving.")}else if(e!==void 0)throw new Error("Taskset draft is unavailable for saving.");if((!n?.success||a.refreshModelRevision)&&s.modelScope){let c=this.database.get("SELECT payload FROM model_projects WHERE id = ? AND profile_id = ?",[s.modelScope.modelId,s.profileId]);if(!c)throw new Error("Taskset draft Model was not found in this Profile.");if(S.parse(JSON.parse(c.payload)).revision!==s.modelScope.expectedModelRevision)throw new Error("Taskset draft Model changed. Refresh before editing.")}let f=this.workspacePath(s.id),d=(await M(s,f)).draft,l=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:d.id,profileId:d.profileId,modelScope:d.modelScope,status:d.status,revision:d.revision,workspacePath:f,packageHash:await g(f),publishedTasksetRef:d.publishedTasksetRef,createdAt:d.createdAt,updatedAt:d.updatedAt});return await this.savePointer(l,!0),d}));return this.writeQueue=i.then(()=>{},()=>{}),i}async importTasksetDraftPackage(t){let e=O.resolve(t.packagePath),s=(await rt(e)).isDirectory()?e:O.dirname(e);await Le(s);let i=await g(s),r=await q(s),n=await this.getTasksetDraft(r.id);if(n){let c=n.metadata.importedTasksetPackage;if(c&&typeof c=="object"&&!Array.isArray(c)&&c.packageHash===i&&n.profileId===t.profileId)return n;throw new Error(`Taskset draft ${r.id} already exists. Import a package with a distinct Taskset id.`)}let f=y.parse({...r,profileId:t.profileId,modelScope:null,status:"draft",revision:1,publishedTasksetRef:null,metadata:{...r.metadata,importedTasksetPackage:{packageHash:i,importedAt:new Date().toISOString()}},updatedAt:new Date().toISOString()}),p=this.workspacePath(f.id),d=`${p}.import-${process.pid}-${Date.now()}`;await at(O.dirname(p),{recursive:!0});try{await tt(s,d,{recursive:!0,errorOnExist:!0,force:!1,preserveTimestamps:!0}),await M(f,d),await G(d,p)}catch(c){throw await Ne(d,{recursive:!0,force:!0}),c}let l=E.parse({schemaVersion:"openpond.tasksetDraftPointer.v1",id:f.id,profileId:f.profileId,status:f.status,revision:f.revision,workspacePath:p,packageHash:await g(p),publishedTasksetRef:f.publishedTasksetRef,createdAt:f.createdAt,updatedAt:f.updatedAt});return await this.savePointer(l),this.draftFromStoredPayload(l)}async materializePublishedTasksetPackage(t){let e=await this.getTasksetDraftWorkspace(t.draftId);if(!e)throw new Error(`Taskset draft ${t.draftId} workspace was not found.`);if(t.taskset.metadata.sourcePackageHash!==void 0&&t.taskset.metadata.sourcePackageHash!==e.packageHash)throw new Error("Taskset draft files changed before publication. Refresh before publishing.");let a=`draft-${m({taskset:t.taskset,packageHash:e.packageHash})}`,s=await Te(t.taskset,e.workspacePath),i=T.parse({...s.taskset,metadata:{...s.taskset.metadata,sourcePackageHash:e.packageHash},environment:{...s.taskset.environment,metadata:{...s.taskset.environment.metadata,runtimeSourceTasksetId:a}}}),r=T.parse({...i,contentHash:H(i)}),n=await N(this.home,{taskset:r,generatedFiles:s.generatedFiles},a,{source:{directory:e.workspacePath,packageHash:e.packageHash},verify:h(p=>L(p,r),"verify")}),f=await this.getTasksetDraft(t.draftId);return f?.modelScope?.source?be({home:this.home,directory:n,taskset:r,preparation:f.modelScope.source}):{directory:n,taskset:r}}async finalizeTasksetDraftPublication(t){await this.ready;let e=y.parse(t.draft),a=T.parse(t.taskset),s=e.modelScope?.source?.authoringGraph==="bound"&&typeof a.metadata.importedPackageHash=="string"?await D(this.home,a.metadata.importedPackageHash):null,i=this.writeQueue.then(()=>v(this.home,async()=>{let r=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ?",[e.id]);if(!r)throw new Error("Taskset draft was deleted before publication.");let n=E.parse(JSON.parse(r.payload));if(n.profileId!==e.profileId||a.profileId!==e.profileId)throw new Error("Taskset publication belongs to another Profile.");if(m(n.modelScope)!==m(e.modelScope))throw new Error("Taskset draft Model ownership cannot change.");if(n.status==="published"&&n.publishedTasksetRef){let c=n.publishedTasksetRef,k=this.database.get("SELECT payload FROM taskset_revisions WHERE taskset_id = ? AND revision = ? AND content_hash = ?",[c.id,c.revision,c.contentHash]);if(!k)throw new Error("Published draft lost its immutable Taskset revision.");return{draft:y.parse({...e,status:n.status,revision:n.revision,publishedTasksetRef:c,updatedAt:n.updatedAt}),taskset:T.parse(JSON.parse(k.payload))}}if(n.revision!==e.revision||a.metadata.sourcePackageHash!==t.packageHash)throw new Error("Taskset draft changed before publication. Refresh before publishing.");let f=n.modelScope?.source,p=f?.authoringGraph==="bound"&&a.metadata.modelTasksetDerivation&&typeof a.metadata.modelTasksetDerivation=="object"?{...a.metadata.modelTasksetDerivation,schemaVersion:f.lineage.schemaVersion}:a.metadata.modelTasksetAuthoring;if(f&&(a.id!==f.tasksetId||a.revision!==f.tasksetRevision||m(p)!==m(f.lineage)))throw new Error("Taskset publication differs from its retained source preparation.");let d=y.parse({...e,status:"published",revision:e.revision+1,publishedTasksetRef:{id:a.id,revision:a.revision,contentHash:a.contentHash},updatedAt:new Date().toISOString()}),l=E.parse({...n,status:d.status,revision:d.revision,publishedTasksetRef:d.publishedTasksetRef,updatedAt:d.updatedAt});return ke(this.database,a,()=>{if(s&&Ee(this.database,{package:s,taskset:a,generatedFiles:[]}),ve(this.database,e,a,s),this.database.get("SELECT revision FROM taskset_drafts WHERE id = ?",[e.id])?.revision!==e.revision)throw new Error("Taskset draft changed during publication.");this.database.run("UPDATE taskset_drafts SET status = ?, revision = ?, payload = ?, updated_at = ? WHERE id = ?",[l.status,l.revision,JSON.stringify(l),l.updatedAt,e.id])}),{draft:d,taskset:a}}));return this.writeQueue=i.then(()=>{},()=>{}),i}async getTasksetDraft(t){let e=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[t],a=>a);return e===null?null:this.draftFromStoredPayload(e)}async listTasksetDrafts(t){await this.ready,await this.writeQueue;let e=await this.all(t?"SELECT payload FROM taskset_drafts WHERE profile_id = ? ORDER BY updated_at DESC":"SELECT payload FROM taskset_drafts ORDER BY updated_at DESC",t?[t]:[]);return Promise.all(e.map(a=>this.draftFromStoredPayload(JSON.parse(a.payload))))}async readHumanPublishedTasksetDraft(t,e){let a=(await this.listTasksetDrafts(t)).filter(r=>r.status==="published"&&r.modelScope===null&&m(r.publishedTasksetRef)===m(e));if(a.length!==1)return null;let s=a[0],i=await this.getTasksetDraftWorkspace(s.id);return i?{draft:s,workspace:i}:null}async getTasksetDraftWorkspace(t){let e=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[t],s=>s);if(e===null)return null;let a=await this.pointerFromStoredPayload(e);return{draftId:a.id,workspacePath:a.workspacePath,packageHash:await g(a.workspacePath)}}async deleteTasksetDraft(t){await this.ready;let e=this.writeQueue.then(()=>v(this.home,async()=>{let a=this.workspacePath(t),s=`${a}.delete-${et()}`,i=!1;try{await G(a,s),i=!0}catch(r){if(r.code!=="ENOENT")throw r}try{this.database.exec("BEGIN IMMEDIATE");try{this.database.run("DELETE FROM taskset_drafts WHERE id = ?",[t]),this.database.run("UPDATE model_taskset_draft_operations SET state = 'deleted' WHERE draft_id = ?",[t]),this.database.exec("COMMIT")}catch(r){throw this.database.exec("ROLLBACK"),r}}catch(r){throw i&&await G(s,a).catch(()=>{}),r}i&&await Ne(s,{recursive:!0,force:!0})}));this.writeQueue=e.catch(()=>{}),await e}async tasksetDraftFiles(t,e,a){return await this.ready,v(this.home,async()=>{let s=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ? AND profile_id = ?",[e,t]);if(!s)throw new Error("Taskset draft was not found in this Profile.");let i=E.parse(JSON.parse(s.payload));if(a!==void 0){let n=await Oe(i.workspacePath,a);return{draftRevision:i.revision,file:{...n,writable:n.writable&&i.status!=="published"}}}let r=await Ae(i.workspacePath);return{draftRevision:i.revision,files:r.map(n=>({...n,writable:n.writable&&i.status!=="published"}))}})}async saveTasksetDraftFile(t,e){let a=ee.parse(e);await this.ready;let s=this.writeQueue.then(()=>v(this.home,async()=>{let i=this.database.get("SELECT payload FROM taskset_drafts WHERE id = ? AND profile_id = ?",[a.draftId,t]);if(!i)throw new Error("Taskset draft was not found in this Profile.");let r=E.parse(JSON.parse(i.payload));if(r.status==="published")throw new Error("Published Taskset drafts are immutable.");if(r.revision!==a.expectedDraftRevision)throw new Error("Taskset draft changed. Reload before saving a file.");return Fe(r.workspacePath,a,async()=>{let n=E.parse({...r,revision:r.revision+1,packageHash:await g(r.workspacePath),updatedAt:new Date().toISOString()}),f=await this.draftFromStoredPayload(n);this.database.exec("BEGIN IMMEDIATE");try{if(this.database.get("SELECT revision FROM taskset_drafts WHERE id = ? AND profile_id = ?",[a.draftId,t])?.revision!==r.revision)throw new Error("Taskset draft changed during file saving.");this.database.run("UPDATE taskset_drafts SET revision = ?, payload = ?, updated_at = ? WHERE id = ?",[n.revision,JSON.stringify(n),n.updatedAt,n.id]),this.database.exec("COMMIT")}catch(p){throw this.database.exec("ROLLBACK"),p}return f})}));return this.writeQueue=s.then(()=>{},()=>{}),s}workspacePath(t){let e=m(t).slice(0,24);return O.join(this.home,"workspaces","tasksets",`taskset-${e}`)}async draftFromStoredPayload(t){let e=await this.pointerFromStoredPayload(t),a=await q(e.workspacePath);return y.parse({...a,id:e.id,profileId:e.profileId,modelScope:e.modelScope,status:e.status,revision:e.revision,publishedTasksetRef:e.publishedTasksetRef,createdAt:e.createdAt,updatedAt:e.updatedAt})}async pointerFromStoredPayload(t){let e=E.safeParse(t);if(e.success)return e.data;let a=y.parse(t);await this.saveTasksetDraft(a);let s=await this.getParsedPayload("SELECT payload FROM taskset_drafts WHERE id = ?",[a.id],E.parse);if(!s)throw new Error(`Taskset draft ${a.id} migration failed.`);return s}async savePointer(t,e=!1){await(e?this.run.bind(this):this.upsertPayload.bind(this))(`INSERT INTO taskset_drafts (id, profile_id, status, revision, payload, created_at, updated_at)
|
|
3
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
4
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
5
|
-
profile_id = excluded.profile_id,
|
|
6
|
-
status = excluded.status,
|
|
7
|
-
revision = excluded.revision,
|
|
8
|
-
payload = excluded.payload,
|
|
9
|
-
updated_at = excluded.updated_at`,[t.id,t.profileId,t.status,t.revision,JSON.stringify(t),t.createdAt,t.updatedAt])}};async function Le(o){let t=await st(o,{withFileTypes:!0});for(let e of t){let a=O.join(o,e.name);if(e.isSymbolicLink())throw new Error(`Taskset packages cannot contain symbolic links: ${a}`);if(e.isDirectory()){await Le(a);continue}if(!e.isFile())throw new Error(`Taskset packages may contain only files and directories: ${a}`)}}h(Le,"assertRegularPackageTree");export{xe as SqliteTasksetDraftStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m,b as g,d as h,e as k}from"./chunk-AHOBCBVZ.js";import{c as f}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as n,f as u}from"./chunk-3M53YXEI.js";import"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";import T from"node:path";async function I(r,l,w={}){let[t,e]=l;if(!t||!e||l.length!==2||!["import","publish","readiness","delete-draft"].includes(t))throw new Error("usage: taskset <import|publish|readiness|delete-draft> <package-path|draft-id|taskset-id> [--profile <id>] [--model <id>] [--json]");let i=f(r)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??m,d=new URL(i);if(d.protocol!=="http:"||!["127.0.0.1","localhost","::1"].includes(d.hostname))throw new Error("Taskset package import is available only through the local OpenPond app API.");let a=new k({baseUrl:i,request:w.request??await h(i,{maximumResponseBytes:g})}),s=t==="import"?await a.importTasksetDraftPackage({packagePath:T.resolve(e),profileId:n(r,"profile")||"default"}):t==="publish"?await a.publishTasksetDraft(e,n(r,"model")||null):t==="readiness"?await a.tasksetReadiness(e):await a.deleteTasksetDraft(e);if(u(r.json)){console.log(JSON.stringify(s,null,2));return}let o=s&&typeof s=="object"?s:{};if(t==="import"){console.log(`Imported Taskset draft ${String(o.name??o.id??e)}.`),console.log("Open it in Models \u2192 Tasksets to review it, or publish it with the OpenPond CLI.");return}if(t==="publish"){let p=o.taskset&&typeof o.taskset=="object"?o.taskset:{};console.log(`Published Taskset ${String(p.name??p.id??e)}.`);return}if(t==="readiness"){console.log(`Checked Taskset ${e} readiness.`),console.log(JSON.stringify(s,null,2));return}console.log(`Deleted unpublished Taskset draft ${e}.`)}c(I,"runTasksetCommand");export{I as runTasksetCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as L,b as M,c as N,d as O,e as P,f as Q,g as R,h as S,i as T,j as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $,r as aa,s as ba,t as ca,u as da}from"./chunk-JSQRLLN6.js";import{$ as I,A as k,B as l,C as m,D as n,E as o,F as p,G as q,H as r,I as s,J as t,K as u,L as v,M as w,N as x,O as y,P as z,Q as A,U as B,V as C,W as D,X as E,Y as F,Z as G,_ as H,aa as J,ca as K,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j}from"./chunk-WSOUMXH3.js";import"./chunk-N42HT64M.js";import"./chunk-NG2L6D7G.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import{t as a}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{H as AuthoredTasksetFileInventorySchema,n as MAX_TASKSET_PACKAGE_BYTES,a as ModelBatchReviewError,T as ModelBatchReviewInspectionSchema,V as ModelBatchReviewReceiptSchema,U as ModelBatchReviewRequestSchema,b as ModelTasksetAuthoringOwnerSchema,c as ModelTasksetAuthoringSchema,e as ModelTasksetDraftPreparationSchema,d as ModelTasksetDraftRequestSchema,S as OpenPondTasksetPackageClient,R as OpenPondTasksetPackageError,h as TasksetDraftFileContentSchema,g as TasksetDraftFileInfoSchema,j as TasksetDraftFileMutationSchema,f as TasksetDraftFilePathSchema,i as TasksetDraftFileSchema,ba as TasksetDraftSourceInitializationSchema,s as TasksetPackageContentSchema,o as TasksetPackageFileSchema,k as TasksetPackageLearningResourcesSchema,M as TasksetPackageModelConfigurationSchema,N as TasksetPackagePublicationSchema,P as TasksetPackageReadbackSchema,O as TasksetPackageReceiptSchema,t as TasksetPackageSchema,Q as TasksetReleasePackageReadbackSchema,Y as beginModelBatchReview,L as bindOrdinaryModelTasksetReward,K as compileModelTasksetDraftWorkspace,x as createTasksetPackage,r as createTasksetPackageExecutionFile,p as decodeTasksetPackageFile,X as findModelBatchReview,W as inspectModelBatchPackage,I as isGeneratedTasksetPublicationFilePath,l as learningPackageContextFiles,_ as learningVerifierModule,C as materializePortableTasksetRelease,da as materializeTasksetDraftWorkspace,E as portableTasksetEnvironment,F as portableTasksetTools,J as prepareAuthoredTasksetSource,$ as prepareImportedTasksetPackage,z as prepareModelTasksetDraft,ca as prepareTasksetDraftSource,Z as projectLearningBatchGraders,G as projectPortableTaskRecord,D as projectPreferenceComparisonRelease,A as publishModelTasksetDraftPackage,B as resolvePortableTasksetRewardExecution,q as resolveTasksetPackageExecution,v as resolveTasksetPackageInstructions,y as resolveTasksetWorkOutputs,u as tasksetPackageRewardBinding,aa as tasksetPackageSourceId,m as validateTasksetLearningResources,w as validateTasksetPackage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-PCB65K4G.js";import{a as G,b as H,c as I,d as P,e as Q,f as R,g as S,h as T,j as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $}from"./chunk-6RS4NAOY.js";import{c as z,d as A,e as B,f as C,g as D,h as E,i as F}from"./chunk-ZZHXQCNB.js";import{$ as o,Mb as J,Nb as K,Ob as L,Pb as M,Qb as N,Rb as O,Sb as aa,Tb as ba,Ub as ca,Vb as da,X as k,Y as l,Z as m,_ as n,a as b,aa as p,b as c,ba as q,c as d,ca as r,d as e,e as f,f as g,fa as s,g as h,ga as t,h as i,ha as u,i as j,ia as v,ja as w,ka as x,la as y}from"./chunk-YNQWJWIC.js";import"./chunk-VNJAAYNQ.js";import"./chunk-7ZLXFKRI.js";import"./chunk-7HRLWPPZ.js";import"./chunk-MTP3B2SU.js";import"./chunk-LV3CQ72P.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import{t as a}from"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{R as AuthoredTasksetFileInventorySchema,n as MAX_TASKSET_PACKAGE_BYTES,a as ModelBatchReviewError,G as ModelBatchReviewInspectionSchema,I as ModelBatchReviewReceiptSchema,H as ModelBatchReviewRequestSchema,b as ModelTasksetAuthoringOwnerSchema,c as ModelTasksetAuthoringSchema,e as ModelTasksetDraftPreparationSchema,d as ModelTasksetDraftRequestSchema,F as OpenPondTasksetPackageClient,E as OpenPondTasksetPackageError,h as TasksetDraftFileContentSchema,g as TasksetDraftFileInfoSchema,j as TasksetDraftFileMutationSchema,f as TasksetDraftFilePathSchema,i as TasksetDraftFileSchema,Z as TasksetDraftSourceInitializationSchema,s as TasksetPackageContentSchema,o as TasksetPackageFileSchema,k as TasksetPackageLearningResourcesSchema,z as TasksetPackageModelConfigurationSchema,A as TasksetPackagePublicationSchema,C as TasksetPackageReadbackSchema,B as TasksetPackageReceiptSchema,t as TasksetPackageSchema,D as TasksetReleasePackageReadbackSchema,Y as beginModelBatchReview,V as bindOrdinaryModelTasksetReward,U as compileModelTasksetDraftWorkspace,x as createTasksetPackage,r as createTasksetPackageExecutionFile,p as decodeTasksetPackageFile,X as findModelBatchReview,W as inspectModelBatchPackage,S as isGeneratedTasksetPublicationFilePath,l as learningPackageContextFiles,ba as learningVerifierModule,K as materializePortableTasksetRelease,$ as materializeTasksetDraftWorkspace,M as portableTasksetEnvironment,N as portableTasksetTools,T as prepareAuthoredTasksetSource,ca as prepareImportedTasksetPackage,P as prepareModelTasksetDraft,_ as prepareTasksetDraftSource,aa as projectLearningBatchGraders,O as projectPortableTaskRecord,L as projectPreferenceComparisonRelease,Q as publishModelTasksetDraftPackage,J as resolvePortableTasksetRewardExecution,q as resolveTasksetPackageExecution,v as resolveTasksetPackageInstructions,y as resolveTasksetWorkOutputs,u as tasksetPackageRewardBinding,da as tasksetPackageSourceId,m as validateTasksetLearningResources,w as validateTasksetPackage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{$ as ca,A as D,Aa as Da,B as E,Ba as Ea,C as F,D as G,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as aa,_ as ba,a as o,aa as da,b as p,ba as ea,c as q,ca as fa,d as r,da as ga,ea as ha,fa as ia,ga as ja,ha as ka,ia as la,ja as ma,ka as na,la as oa,ma as pa,na as qa,oa as ra,p as s,pa as sa,q as t,qa as ta,r as u,ra as ua,s as v,sa as va,t as w,ta as wa,u as x,ua as xa,v as y,va as ya,w as z,wa as za,x as A,xa as Aa,y as B,ya as Ba,z as C,za as Ca}from"./chunk-N42HT64M.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-NG2L6D7G.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{e as OPENPOND_TRAINING_MEDIA_TYPE,d as OPENPOND_TRAINING_PROTOCOL_MAJOR,i as OpenPondProtocolError,Aa as OpenPondTrainingApiError,ga as PolicyOptimizationRequestSchema,ea as RewardModelTrainingRequestSchema,h as TRAINING_API_RESPONSE_MAX_BYTES,U as TRAINING_EVALUATION_SOURCE_PATH,g as TRAINING_INPUT_ARTIFACT_MAX_BYTES,f as TRAINING_JOB_SUBMISSION_MAX_BYTES,q as TrainingAcceptanceGroupPageSchema,r as TrainingAcceptanceGroupQuerySchema,o as TrainingAcceptanceGroupReferenceSchema,p as TrainingAcceptanceGroupSummarySchema,za as TrainingApiErrorSchema,L as TrainingCandidateDecisionRequestSchema,M as TrainingCandidateDecisionSchema,Da as TrainingCapabilitiesSchema,ca as TrainingCapabilityRequirementSchema,u as TrainingCheckpointRecoveryRequestSchema,s as TrainingCheckpointRecoveryResourceApprovalSchema,G as TrainingEstimateComponentSchema,F as TrainingEstimateRequestSchema,b as TrainingEstimateReviewSchema,I as TrainingEstimateSchema,E as TrainingEstimateSourceSchema,V as TrainingEvaluationSourceSchema,Q as TrainingEvaluationTaskPageSchema,P as TrainingEvaluationTaskResultSchema,ua as TrainingExecutionReceiptSchema,c as TrainingGpuCatalogSchema,a as TrainingGpuSelectionSchema,K as TrainingHarnessSourcePublicationSchema,Z as TrainingInputArtifactSchema,Y as TrainingInputArtifactUploadSchema,ia as TrainingJobApprovalSchema,ra as TrainingJobControlRequestSchema,pa as TrainingJobEventSchema,aa as TrainingJobKindSchema,qa as TrainingJobLogSchema,sa as TrainingJobOutputSchema,ya as TrainingJobOutputsSchema,oa as TrainingJobPageSchema,ma as TrainingJobRecoverySchema,ha as TrainingJobRequestSchema,na as TrainingJobSchema,da as TrainingJobSourceSchema,ba as TrainingJobStateSchema,ja as TrainingJobSubmissionSchema,v as TrainingPhysicalPlacementSchema,Ba as TrainingPolicyLoraCapabilitiesSchema,A as TrainingPreparationControlSchema,B as TrainingPreparationListQuerySchema,C as TrainingPreparationPageSchema,x as TrainingPreparationPlanContentSchema,y as TrainingPreparationPlanSchema,z as TrainingPreparationReceiptSchema,w as TrainingPreparationRequestSchema,fa as TrainingQualificationBaseModelSchema,ta as TrainingQualificationEvidenceSchema,J as TrainingQueueStatusSchema,m as assertCanonicalPayloadSize,W as assertTrainingEvaluationIsolation,xa as assertTrainingQualificationReceipt,j as canonicalJson,k as canonicalJsonByteLength,l as canonicalSha256,t as createTrainingCheckpointRecoveryResourceApproval,Ea as createTrainingClient,T as deterministicTrainingRewardSource,O as parseAndVerifyTrainingCandidateDecision,S as parseAndVerifyTrainingEvaluationTaskPage,wa as parseAndVerifyTrainingExecutionReceipt,$ as parseAndVerifyTrainingInputArtifactUpload,la as parseAndVerifyTrainingJobSubmission,D as parseAndVerifyTrainingPreparationReceipt,n as parseBoundedJson,Ca as supportsTrainingPolicyLoraRank,N as trainingCandidateDecisionHash,H as trainingEstimateSourceIdentity,X as trainingEvaluationSourceRef,R as trainingEvaluationTaskPageHash,va as trainingExecutionReceiptHash,_ as trainingInputArtifactUploadHash,ka as trainingJobSubmissionHash};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-AHOBCBVZ.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as DEFAULT_LOCAL_TRAINING_API_URL,b as LOCAL_TRAINING_RESPONSE_LIMIT,e as TrainingApiClient,d as createLocalAuthenticatedRequest,c as runTrainingCommand};
|
|
@@ -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-U2K7QJCG.js";import{xa as n}from"./chunk-N42HT64M.js";import"./chunk-NG2L6D7G.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as s}from"./chunk-FTQLQJQV.js";function i(t){return t instanceof e?{code:t.code,message:t.message,status:t.status,retryable:t.status===429||t.status>=500,requestId:null}:t instanceof n?{code:t.code,message:t.message,status:t.status,retryable:t.retryable,requestId:t.requestId}:null}s(i,"trainingCliError");export{i as trainingCliError};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as ne}from"./chunk-NWQL6FNF.js";import{a as oe}from"./chunk-SO42ZB5K.js";import{c as te}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as q,f as I,h as O}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import{a as j,b as R,c as ee}from"./chunk-U2K7QJCG.js";import{A as Q,Ba as Z,ia as X,t as G,ua as Y,xa as S}from"./chunk-N42HT64M.js";import{i as K,v as W,x as T}from"./chunk-NG2L6D7G.js";import"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import{pc as k,qc as B,rc as F,sc as V,tc as z,zb as D}from"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import{A as g}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";async function re(n,s={}){let t=process.env.OPENPOND_CHAT_INVOCATION;if(t)try{let e=process.env.OPENPOND_LOCAL_API_URL;if(!e)throw new Error("The chat executor did not supply its local API URL.");let r=new URL(e);if(r.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(r.hostname)||r.username||r.password)throw new Error("Chat attachment requires the app's loopback API origin.");let d=await(s.request??await(await import("./training-RVIESURJ.js")).createLocalAuthenticatedRequest(e,{timeoutMs:15e3}))(new URL("/v1/chat-experiments",r),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"attach_training",invocationToken:t,payload:{location:"cloud",...n}}),signal:AbortSignal.timeout(15e3),redirect:"error"});if(!d.ok)throw new Error(`Chat attachment returned HTTP ${d.status}.`)}catch(e){(s.warn??console.error)(`Hosted operation succeeded, but chat attachment failed: ${e instanceof Error?e.message:String(e)}. Inspect the saved job to retry attachment; do not submit it again.`)}}h(re,"attachHostedTrainingToChat");import{readFile as he}from"node:fs/promises";var C=g.string().trim().min(1).max(500),de=g.object({id:C,contentHash:g.string().regex(/^[a-f0-9]{64}$/)}).strict(),le=g.object({teamId:C,modelId:C,runId:C.optional(),from:g.string().datetime().optional(),to:g.string().datetime().optional()}).strict(),ue=g.discriminatedUnion("action",[g.object({action:g.literal("declare_verification"),teamId:C,operationId:C,plan:g.object({modelId:k.shape.modelId,classification:k.shape.classification,feedback:k.shape.feedback,evidence:k.shape.evidence,trainingJobId:k.shape.trainingJobId,checkpoint:k.shape.checkpoint,artifact:k.shape.artifact,taskset:k.shape.taskset,checks:k.shape.checks,baselineOperationId:k.shape.baselineOperationId,candidateOperationId:k.shape.candidateOperationId,criterion:k.shape.criterion}).strict()}).strict(),g.object({action:g.literal("link_live_opportunity"),teamId:C,operationId:C,correction:de,inferenceRequestId:C,grade:g.object({id:C,revision:g.number().int().positive()}).strict(),checkIds:g.array(C).min(1).max(1e3)}).strict()]),pe=g.object({summary:z.nullable(),observations:g.array(V).max(1e3)}).strict(),P=class{static{h(this,"OpenPondCorrectionMetricsClient")}options;constructor(s){if(!s.apiKey.trim())throw new Error("Learning API key is required.");let t=new URL(s.baseUrl);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.search||t.hash)throw new Error("Learning base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.options={...s,baseUrl:t.toString().replace(/\/+$/,"")}}async request(s,t,e){let r=await(this.options.fetch??globalThis.fetch)(`${this.options.baseUrl}${s}`,{...e,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"Content-Type":"application/json",Accept:"application/json","X-OpenPond-Team-Id":t}}),i;try{i=await ee(r)}catch(d){throw d instanceof j?d:new j(r.ok?502:r.status,"invalid_response","Correction metrics returned an invalid response.",null)}if(!r.ok){let d=g.object({code:g.string().optional(),error:g.string().optional()}).passthrough().safeParse(i);throw new j(r.status,d.success?d.data.code??"correction_request_failed":"correction_request_failed",d.success?d.data.error??`Correction metrics request failed (${r.status}).`:`Correction metrics request failed (${r.status}).`,i)}return i}async read(s,t={}){let e=le.parse(s),r=pe.parse(await this.request(`/v1/learning/corrections?query=${encodeURIComponent(JSON.stringify(e))}`,e.teamId,{method:"GET",signal:t.signal}));if(r.summary&&(r.summary.scope.teamId!==e.teamId||r.summary.scope.modelId!==e.modelId||e.runId&&r.summary.scope.runId!==e.runId)||r.observations.some(i=>i.modelId!==e.modelId||e.runId&&i.trainingJobId!==e.runId))throw new j(502,"correction_scope_mismatch","Correction metrics did not match the requested workspace, Model or run.",null);return r}async command(s,t={}){let e=ue.parse(s);D(e);let r=await this.request("/v1/learning/corrections",e.teamId,{method:"POST",body:JSON.stringify(e),signal:t.signal});if(e.action==="declare_verification"){let d=B.parse(r);if(d.teamId!==e.teamId||d.modelId!==e.plan.modelId||d.trainingJobId!==e.plan.trainingJobId)throw new j(502,"correction_scope_mismatch","Correction declaration did not match the requested workspace, Model or run.",null);return d}let i=F.parse(r);if(i.correction.id!==e.correction.id||i.correction.contentHash!==e.correction.contentHash||i.attempt.id!==e.inferenceRequestId)throw new j(502,"correction_scope_mismatch","Correction opportunity did not match the declared correction and serving request.",null);return i}};var $=new Set(["succeeded","failed","cancelled"]);function L(n){let s=O(n.intervalMs,"interval-ms")??1e4,t=O(n.cleanupTimeoutMs,"cleanup-timeout-ms")??18e4,e=O(n.cleanupReserveMs,"cleanup-reserve-ms")??18e4;if([s,t,e].some(d=>!Number.isSafeInteger(d)||d>2147483647))throw new Error("Watch intervals and cleanup bounds must fit a positive 32-bit millisecond timer.");if(s<250)throw new Error("--interval-ms must be at least 250.");if(t<1e3||e<1e3)throw new Error("Cleanup timeout and reserve must be at least 1000 ms.");let r=q(n,"deadlineAt");if(!r&&n.cleanupReserveMs!==void 0)throw new Error("--cleanup-reserve-ms requires --deadline-at.");let i=r?Date.parse(r):null;if(r&&(!/T.*(?:Z|[+-]\d{2}:\d{2})$/.test(r)||!Number.isFinite(i)))throw new Error("--deadline-at requires an ISO timestamp with an explicit timezone.");if(i!==null&&i-e<=Date.now())throw new Error("--deadline-at must leave time for execution and the cleanup reserve.");return{intervalMs:s,deadlineAt:i,cancelAt:i===null?null:i-e,waitForCleanup:i!==null||I(n.waitForCleanup)||I(n.cancelOnInfrastructureError),cleanupTimeoutMs:t,cancelOnInfrastructureError:I(n.cancelOnInfrastructureError)}}h(L,"parseHostedWatchOptions");async function _(n,s,t){for(let e=0;e<4;e++){let r=await n.getJob(s);if(A(r,s,t),$.has(r.state)||r.state==="cancelling")return r;try{let i=await n.cancelJob(s,r.version);return A(i,s,t,r.submissionHash),i}catch(i){if(!(i instanceof S)||i.status!==409||i.code!=="stale_version"||e===3)throw i}}throw new Error("Hosted cancellation could not reconcile the current Job version.")}h(_,"cancelHostedTrainingJob");async function ae(n,s,t){for(let e=0;e<4;e++){let r=await n.getJob(s);if(A(r,s,t),$.has(r.state)||r.state==="cancelling")return r;try{let i=await n.stopAfterGroup(s,r.version);return A(i,s,t,r.submissionHash),i}catch(i){if(!(i instanceof S)||i.status!==409||i.code!=="stale_version"||e===3)throw i}}throw new Error("Hosted graceful stop could not reconcile the current Job version.")}h(ae,"stopHostedTrainingJobAfterGroup");async function N(n){let{client:s,options:t,jobId:e,teamId:r}=n,i=null,d,m=!1;for(;;){let p=Math.min(t.deadlineAt??1/0,i??1/0);if(n.requestBound.deadlineAt=Number.isFinite(p)?p:null,Date.now()>=p)throw ie(e);try{let c=t.cancelAt!==null&&Date.now()>=t.cancelAt&&!m?await _(s,e,r):await s.getJob(e);if(A(c,e,r,d),d=c.submissionHash,t.cancelOnInfrastructureError&&!m&&!$.has(c.state)&&c.state!=="cancelling"){let l=await s.events(e);if(l.some(v=>v.jobId!==e))throw new Error("Hosted event does not match the watched Job.");let y=l.find(v=>v.type==="rollout_metric"&&v.data.terminalClass==="infrastructure"&&v.data.rewardEligible===!1);y&&(n.print({jobId:e,event:"hosted_watch_infrastructure_failure",trajectoryEventId:y.id,data:y.data}),c=await _(s,e,r),A(c,e,r,d),i??=Date.now()+t.cleanupTimeoutMs)}if(m||=c.state==="cancelling"||$.has(c.state),n.print(c),$.has(c.state)){let l=c.executionMode==="qualification"&&c.state==="succeeded";if(!t.waitForCleanup&&!l)return;i??=Date.now()+t.cleanupTimeoutMs,n.requestBound.deadlineAt=Math.min(t.deadlineAt??1/0,i);let{receipt:y,outputs:v}=await s.outputs(e);if(y){if(y.jobId!==e||y.teamId!==r||y.submissionHash!==d)throw new Error("Hosted cleanup receipt does not match the watched Job and submission.");if(y.cleanupComplete){l&&await Y(y,{submissionHash:d,outputs:v}),n.print({jobId:e,cleanup:{scope:"job",complete:!0,receipt:y}});return}}else if(c.rolloutProgress.groupsTarget===0&&n.readNativeInspection){let E=oe(await n.readNativeInspection(e),c);if(E.cleanupComplete){n.print({jobId:e,cleanup:{scope:"job",complete:!0,evidence:"native_read_only_attestation",nativeJobVersion:E.nativeJobVersion,attestation:E.cleanupAttestation}});return}}}}catch(c){if(n.requestBound.deadlineAt!==null&&Date.now()>=n.requestBound.deadlineAt)throw ie(e);if(t.deadlineAt===null&&i===null||!me(c))throw c;console.error(JSON.stringify({jobId:e,event:"hosted_watch_retry",code:c instanceof S?c.code:"transport_unavailable"}))}let b=Math.min(n.requestBound.deadlineAt??1/0,!m&&t.cancelAt!==null&&Date.now()<t.cancelAt?t.cancelAt:1/0);await new Promise(c=>setTimeout(c,Math.max(0,Math.min(t.intervalMs,b-Date.now()))))}}h(N,"watchHostedTrainingJob");function A(n,s,t,e){if(n.id!==s||n.teamId!==t||e!==void 0&&n.submissionHash!==e)throw new Error("Hosted response does not match the requested Job, workspace, and submission.")}h(A,"assertJobIdentity");function me(n){return n instanceof S?n.status===429||n.status>=500:n instanceof K?n.code==="invalid_error_response"||n.code==="invalid_json":n instanceof TypeError||n instanceof Error&&["TimeoutError","AbortError"].includes(n.name)}h(me,"isTransient");function ie(n){return new Error(`Hosted watch deadline reached for ${n}; completed job cleanup is unverified. Inspect hosted-status, hosted-artifacts, and provider retirement before treating resources as released.`)}h(ie,"cleanupDeadlineError");var M=h(n=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}).format(n),"money"),se=h(n=>n>=3600?`${(n/3600).toFixed(1)} hours`:`${Math.max(1,Math.ceil(n/60))} minutes`,"duration");function U(n,s){if(s){console.log(JSON.stringify(n,null,2));return}console.log(`Estimate ${n.id} (${n.status.replaceAll("_"," ")})`),console.log(`Model: ${n.configuration.modelId}@${n.configuration.modelRevision}`);let t=n.configuration;console.log(`Configuration: ${t.method}${t.loraRank===null?"":`, rank ${t.loraRank}`}${t.groups===null?"":`, ${t.groups} groups`}${t.rolloutConcurrency===null?"":`, ${t.rolloutConcurrency} rollout lanes`}${t.adapterMode===null?"":`, ${t.adapterMode}`}`),console.log(`GPU: ${n.gpu.resolved?.gpuType??"Awaiting a supported offering"} (${n.gpu.requested.mode}, ${n.gpu.availability})`);let e=n.cost;console.log(`Expected cost: ${e.expectedUsd===null?"Not yet calibrated":M(e.expectedUsd)}`),e.planningRangeUsd&&console.log(`Planning range: ${M(e.planningRangeUsd.low)}\u2013${M(e.planningRangeUsd.high)}`),console.log(`Execution time: ${n.executionSeconds.expected===null?"Not yet calibrated":se(n.executionSeconds.expected)}`),console.log(`Queue wait: ${n.queueWaitSeconds===null?"Start time not yet known":`about ${se(n.queueWaitSeconds.expected)}`}`),console.log(`Recommended maximum budget: ${e.recommendedMaximumUsd===null?"Unavailable with current evidence":M(e.recommendedMaximumUsd)}`),console.log(`Approved hard cap: ${t.approvedMaximumUsd===null?"Not approved":M(t.approvedMaximumUsd)}`),t.approvedMaximumUsd!==null&&e.expectedUsd!==null&&e.expectedUsd>t.approvedMaximumUsd&&console.log("Expected cost exceeds the approved cap. Change the run or explicitly approve a different budget before submission.");for(let r of e.components)r.expectedUsd!==null&&console.log(` ${r.phase.replaceAll("_"," ")} / ${r.resource}: ${M(r.expectedUsd)}`);for(let r of n.assumptions)console.log(`Assumption: ${r}`);for(let r of n.unknowns)console.log(`Unknown: ${r}`);console.log(`Evidence: ${n.calibration.completedSamples} completed, ${n.calibration.partialSamples} partial samples; expires ${n.expiresAt}`),console.log("This estimate reserves no resources and approves no spending.")}h(U,"printTrainingEstimate");var f=h(n=>console.log(JSON.stringify(n,null,2)),"print");async function Le(n,s){let t=s[0],e=s[1],r=t==="hosted-watch"?L(n):null,i={deadlineAt:r?.deadlineAt??null},d=await fe(n);if(!d.token)throw new Error("Sign in to an OpenPond account before using hosted training.");let m=te(n)??d.apiBaseUrl;if(new URL(m).origin!==new URL(d.apiBaseUrl).origin)throw new Error("The hosted API URL must match the signed-in account\u2019s API origin.");let p=q(n,"teamId");if(!p)throw new Error("Hosted training requires --team-id <workspace-id>.");let b=new Headers({"x-openpond-team-id":p});d.token.startsWith("opk_")?(b.set("Authorization",`ApiKey ${d.token}`),b.set("openpond-api-key",d.token)):b.set("Authorization",`Bearer ${d.token}`);let c=h((o,a)=>{let u=i.deadlineAt===null?1/0:i.deadlineAt-Date.now();if(u<=0)throw new DOMException("Hosted watch deadline reached","TimeoutError");let w=AbortSignal.timeout(Math.max(1,Math.min(r?1e4:18e4,u)));return fetch(o,{...a,redirect:"error",signal:a?.signal?AbortSignal.any([a.signal,w]):w})},"request"),l=Z({baseUrl:m,headers:b,fetch:c}),y=h(o=>re({jobId:o,teamId:p,apiOrigin:new URL(m).origin}),"attach"),v=h(async(o,a)=>{f(o),await y(a)},"printAttached"),E=h(async()=>{if(!e)throw new Error(`${t} requires an input JSON file.`);let o=await he(e);if(o.byteLength>64*1024*1024)throw new Error("Hosted training input exceeds 64 MiB.");return JSON.parse(o.toString("utf8"))},"readInput"),H=h(async o=>{let a=await c(new URL(`/v1/managed-rl/jobs/${encodeURIComponent(o)}`,m),{headers:b});if(!a.ok)throw new S(a.status,{schemaVersion:"openpond.trainingApiError.v2",code:"inspection_failed",message:`Hosted job inspection failed (${a.status}).`,retryable:a.status===429||a.status>=500,requestId:null,details:{}});return a.json()},"readNativeInspection");if(s.length>2)throw new Error(`${t} accepts at most one identifier or input file.`);if(["hosted-serving-pools","hosted-base-serving-prepare","hosted-serving-pool-retire"].includes(t??"")){f(await(await import("./training-hosted-serving-QAV7ZGGV.js")).runHostedServingCommand({action:t,target:e,baseUrl:m,headers:b,request:c,readInput:E,confirmed:I(n.yes)}));return}if(t==="hosted-evaluate-checkpoint"){if(!I(n.yes))throw new Error("Paid checkpoint evaluation requires --yes.");let o=(await import("./training-hosted-checkpoint-evaluation-JJPP7KFW.js")).parseCheckpointEvaluationRequest(await E()),a=new Headers(b);a.set("content-type","application/json");let u=await c(new URL("/v1/managed-rl/serving-soaks",m),{method:"POST",headers:a,body:JSON.stringify(o)}),w=await u.json();if(!u.ok){let J=w&&typeof w=="object"&&"error"in w?String(w.error):"checkpoint_evaluation_failed";throw new Error(`Checkpoint evaluation failed (${u.status}): ${J}. Reconcile hosted-jobs before retrying the same immutable request.`)}let x=(await import("./training-hosted-checkpoint-evaluation-JJPP7KFW.js")).parseCheckpointEvaluationResponse(w,o);await v(x,x.job.id);return}if(t==="hosted-provider"||t==="hosted-quotes"){if(e)throw new Error(`${t} does not accept an identifier.`);let o=t==="hosted-provider"?"/v1/managed-rl/provider-inventory":"/v1/managed-rl/quotes",a=await c(new URL(o,m),{headers:b}),u=await a.json();if(!a.ok)throw new Error(`Hosted capacity read failed (${a.status}).`);f(u);return}if(t==="hosted-workers"||t==="hosted-worker"||t?.startsWith("hosted-worker-")){f(await(await import("./training-hosted-workers-LST4ZUXN.js")).runHostedWorkerCommand({action:t,target:e,baseUrl:m,headers:b,request:c,readInput:E,confirmed:I(n.yes)}));return}if(t==="hosted-models"){f(await T({baseUrl:m,headers:b,fetch:c}).list());return}if(t==="hosted-model"){if(!e)throw new Error("hosted-model requires a Model Project ID.");f(await T({baseUrl:m,headers:b,fetch:c}).get(e));return}if(t==="hosted-corrections"||t==="hosted-learning-inspect"){if(!e)throw new Error(`${t} requires a hosted Model Project ID.`);let{project:o}=await T({baseUrl:m,headers:b,fetch:c}).get(e);f(await(await import("./training-hosted-learning-Y7NHRY4V.js")).inspectHostedLearning({action:t,options:n,teamId:p,model:o,learning:new R({baseUrl:m,apiKey:d.token,scope:p,fetch:c}),corrections:new P({baseUrl:m,apiKey:d.token,fetch:c})}));return}if(t==="hosted-sync-model"){let o=W.parse(await E());f(await T({baseUrl:m,headers:b,fetch:c}).upsert(o));return}if(t==="hosted-publish-taskset"){let{OpenPondTasksetPackageClient:o,TasksetPackagePublicationSchema:a}=await import("./taskset-packages-X4K65DTW.js"),u=a.parse(await E());f(await new o({baseUrl:m,apiKey:d.token,teamId:p,fetch:c}).publish(u));return}if(t==="hosted-capabilities"){f(await l.capabilities());return}if(t==="hosted-gpu-catalog"){f(await l.gpuCatalog());return}if(t==="hosted-start-model"){if(!e)throw new Error("training start requires a saved hosted Model Project ID.");let o=await(await import("./training-model-start-ROLS3E4V.js")).startHostedModel({options:n,modelId:e,teamId:p,client:l,models:T({baseUrl:m,headers:b,fetch:c}),learning:new R({baseUrl:m,apiKey:d.token,scope:p,fetch:c})});f(o),o.preparation.jobId&&await y(o.preparation.jobId),o.preparation.jobId&&!I(n.detach)&&await N({client:l,jobId:o.preparation.jobId,teamId:p,options:L(n),print:f,requestBound:i,readNativeInspection:H});return}if(t==="hosted-estimate-model"){if(!e)throw new Error("training estimate requires a hosted Model Project ID.");let{project:o}=await T({baseUrl:m,headers:b,fetch:c}).get(e),a=q(n,"batchId"),u=a?await new R({baseUrl:m,apiKey:d.token,scope:p,fetch:c}).get("batch",a):null,{trainingGpuChoice:w}=await import("./training-model-start-ROLS3E4V.js"),x=w(n)??o.trainingSetup.managedGpuSelection;U(await l.estimate({schemaVersion:"openpond.trainingEstimateRequest.v1",teamId:p,source:{kind:"configuration",id:o.id,expectedRevision:o.revision,expectedEtag:o.etag,batch:u?{id:u.id,revision:u.revision,contentHash:u.contentHash}:null},...x?{gpuSelection:x}:{}}),I(n.json));return}if(t==="hosted-estimate"){let{TrainingEstimateRequestSchema:o}=await import("./training-3IWW4256.js"),a=o.parse(await E());if(a.teamId!==p)throw new Error("Estimate input belongs to a different workspace.");U(await l.estimate(a),I(n.json));return}if(t==="hosted-batches"){let o=new R({baseUrl:m,apiKey:d.token,scope:p,fetch:c});f(await o.list("batch",{limit:100}));return}if(t==="hosted-preparations"){f(await l.listPreparations(p));return}if(t==="hosted-jobs"){f(await l.listJobs({limit:100}));return}if(t==="hosted-prepare"){let o=G.parse(await E());if(o.teamId!==p)throw new Error("Preparation input belongs to a different workspace.");f(await l.prepareRun(o));return}if(t==="hosted-start"){let o=await Q(await E());if(o.plan.request.teamId!==p)throw new Error("Preparation belongs to a different workspace.");let a=await l.estimate({schemaVersion:"openpond.trainingEstimateRequest.v1",teamId:p,source:{kind:"preparation",id:o.plan.id,planHash:o.plan.contentHash,expectedRevision:o.revision}});if(I(n.json)||U(a,!1),!I(n.yes))throw new Error("Starting paid hosted training requires --yes.");let u=await l.startPreparation(o.plan.id,{teamId:p,planHash:o.plan.contentHash,expectedRevision:o.revision,estimateReview:a.review});f(u),u.jobId&&await y(u.jobId);return}if(t==="hosted-stage"){f(await l.stageArtifact(await E()));return}if(t==="hosted-submit"||t==="hosted-qualify"){let o=await X(await E());if(t==="hosted-qualify"&&(o.job.kind!=="policy_optimize"||o.job.executionMode!=="qualification"))throw new Error("hosted-qualify requires an immutable policy_optimize submission with executionMode=qualification.");if(!I(n.yes))throw new Error("Submitting paid hosted training requires --yes.");if(o.job.kind==="policy_optimize"&&o.job.executionMode==="qualification"&&!(await l.capabilities()).executionModes?.includes("qualification"))throw new Error("This hosted runtime does not advertise original-learner qualification support.");let a=await l.createJob(o);if(a.teamId!==p||a.submissionHash!==o.contentHash||a.kind!==o.job.kind||o.job.kind==="policy_optimize"&&a.executionMode!==o.job.executionMode)throw new Error(`Hosted submission response identity or execution mode mismatch; inspect hosted-status ${a.id} before attempting another submission.`);await v(a,a.id);return}if(!e)throw new Error(`${t} requires a hosted job ID.`);if(t==="hosted-status"){await v(await l.getJob(e),e);return}if(t==="hosted-report"){let o=await l.getJob(e),[a,u]=await Promise.all([l.events(e),l.outputs(e)]),w=await l.getJob(e);if(w.id!==e||w.teamId!==p||o.id!==e||o.teamId!==p)throw new Error("Hosted report status identity mismatch.");let x=w.recovery?await l.getJob(w.recovery.sourceJobId):void 0,J=w.rolloutProgress.groupsTarget===0?(await import("./training-hosted-serving-report-OX4A5OKB.js")).parseHostedServingReportEvidence(await H(e),w):void 0,{buildHostedTrainingReport:ce}=await import("./training-hosted-report-UVGTPDOK.js");await v(ce({job:w,events:a,outputs:u,recoverySourceJob:x,servingEvidence:J,versionBeforeRead:o.version,generatedAt:new Date().toISOString()}),e);return}if(t==="hosted-evaluation-tasks"){let o=q(n,"evaluationId");if(!o)throw new Error("hosted-evaluation-tasks requires --evaluation-id from hosted-artifacts.");let u=(await l.outputs(e)).outputs.find(w=>w.kind==="evaluation"&&w.id===o);if(!u)throw new Error("Evaluation does not belong to this job's retained outputs.");f(await l.evaluationTasks(e,{id:u.id,contentHash:u.contentHash},{cursor:q(n,"cursor")||void 0,limit:O(n.limit,"--limit")}));return}if(t==="hosted-trajectory"){let o=q(n,"trajectoryId");if(!o)throw new Error("hosted-trajectory requires --trajectory-id <receipt-id> from hosted-inspect.");let a=await c(new URL(`/v1/managed-rl/jobs/${encodeURIComponent(e)}/trajectories/${encodeURIComponent(o)}`,m),{headers:b});if(!a.ok)throw new Error(`Hosted trajectory read failed (${a.status}).`);f(await a.json());return}if(t==="hosted-feedback"){let{readHostedGraderFeedback:o}=await import("./training-hosted-feedback-5B2KJGOT.js");f(await o({jobId:e,baseUrl:m,headers:b,request:c,trajectoryId:q(n,"trajectoryId")||void 0,evaluationId:q(n,"evaluationId")||void 0,taskId:q(n,"taskId")||void 0}));return}if(t==="hosted-inspect"){f(await H(e));return}if(t==="hosted-recover"){if(!I(n.yes))throw new Error("hosted-recover requires --yes for its explicit funded execution request.");let{jobId:o,...a}=await E();if(typeof o!="string"||!o)throw new Error("hosted-recover requires jobId in its input JSON.");let u=await l.recoverCheckpoint(o,a);await v(u,u.id);return}if(t==="hosted-cancel"){await v(await _(l,e,p),e);return}if(t==="hosted-stop-after-group"){if(!I(n.yes))throw new Error("hosted-stop-after-group requires --yes to shorten the admitted training schedule.");await v(await ae(l,e,p),e);return}if(t==="hosted-artifacts"){await v(await l.outputs(e),e);return}if(t==="hosted-logs"){await v(await l.logs(e),e);return}if(t==="hosted-events"){await v(await l.events(e),e);return}if(t==="hosted-watch"&&r){await y(e),await N({client:l,jobId:e,teamId:p,options:r,print:f,requestBound:i,readNativeInspection:H});return}throw new Error(`Unknown hosted training command: ${t}`)}h(Le,"runHostedTrainingCommand");async function fe(n){for(let s=0;;s++)try{return await ne(q(n,"account"))}catch(t){if(t.issue?.code!=="STORAGE_BUSY"||s>=29)throw t;await new Promise(r=>setTimeout(r,1e3))}}h(fe,"accountContext");export{Le as runHostedTrainingCommand};
|
|
@@ -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-PF56N7ZY.js";import{a as n}from"./chunk-FTQLQJQV.js";var r=e.object({mode:e.literal("frozen_evaluation"),evaluationPanel:e.object({sourceManifest:e.object({id:e.string().trim().min(1).max(2e3),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),populationSha256:e.string().regex(/^[a-f0-9]{64}$/),shardSize:e.number().int().min(1).max(128),shardIndex:e.number().int().nonnegative()}).strict().optional(),target:e.enum(["checkpoint","base_model"]),representation:e.enum(["adapter","merged_backbone"]).optional(),checkpointId:e.string().min(8).max(191),artifact:e.object({id:e.string().min(8),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),idempotencyKey:e.string().min(16).max(191),quote:e.record(e.string(),e.unknown()),quoteSignature:e.string().min(32),maximumSpendUsd:e.number().positive().max(10),maxGpuSeconds:e.number().int().positive().max(7200)}).strict(),s=n(t=>r.parse(t),"parseCheckpointEvaluationRequest");function c(t,o){let i=e.object({job:e.object({id:e.string().min(1),idempotencyKey:e.string(),targetGroups:e.literal(0),canonicalPublishState:e.literal("skipped"),publicSubmission:e.null()}).passthrough()}).parse(t);if(i.job.idempotencyKey!==o.idempotencyKey)throw new Error("Checkpoint evaluation response identity mismatch.");return i}n(c,"parseCheckpointEvaluationResponse");export{s as parseCheckpointEvaluationRequest,c as parseCheckpointEvaluationResponse};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as o,h as a}from"./chunk-3M53YXEI.js";import{a as m}from"./chunk-U2K7QJCG.js";import{O as l}from"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";async function h(e){if(e.model.teamId!==e.teamId)throw new m(502,"model_scope_mismatch","The Model did not match the requested workspace.",null);let r=o(e.options,"runId");if(e.action==="hosted-corrections"){if(o(e.options,"cursor")||e.options.limit!==void 0)throw new Error("hosted-corrections reads one Model/run metric snapshot; use hosted-learning-inspect for paged policies.");return e.corrections.read({teamId:e.teamId,modelId:e.model.id,...r?{runId:r}:{}})}if(r)throw new Error("--run-id is only supported by hosted-corrections.");let t=a(e.options.limit,"--limit")??25;if(t<1||t>100)throw new Error("--limit must be between 1 and 100.");let n=o(e.options,"cursor"),i=await e.learning.list("policy",{parentId:e.model.portableProjectId,limit:t,...n?{afterId:n}:{}}),s=[];for(let d of i.items)s.push({policy:d,inspection:await e.learning.inspectPolicy(l(d))});return{model:{id:e.model.id,portableProjectId:e.model.portableProjectId,revision:e.model.revision,etag:e.model.etag},taskQueue:await e.learning.inspectTaskQueue(e.model.portableProjectId),policies:{items:s,nextCursor:i.nextCursor}}}c(h,"inspectHostedLearning");export{h as inspectHostedLearning};
|
|
@@ -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-PF56N7ZY.js";import{a as g}from"./chunk-FTQLQJQV.js";var m=e.object({baseProfileId:e.string().trim().min(1).max(191)}).strict(),h=e.object({poolId:e.string().trim().min(1).max(191),reason:e.string().trim().min(3).max(512)}).strict(),l=e.object({id:e.string().min(1),baseProfileId:e.string().min(1),provider:e.string().min(1),state:e.string().min(1),workersMin:e.number().int().nonnegative(),workersMax:e.number().int().nonnegative()}).passthrough();async function b(r){let d="/v1/model-adapters/serving-pools",n,t,s;if(r.action==="hosted-serving-pools"){if(r.target)throw new Error("hosted-serving-pools does not accept an identifier.")}else if(r.action==="hosted-base-serving-prepare"){if(!r.confirmed)throw new Error("Preparing serving capacity requires --yes. Inference is a separate operation.");let o=m.parse(await r.readInput());s=o.baseProfileId,n=JSON.stringify(o)}else if(r.action==="hosted-serving-pool-retire"){if(!r.confirmed)throw new Error("Retiring serving capacity requires --yes.");let{poolId:o,reason:f}=h.parse(await r.readInput());t=o,d+=`/${encodeURIComponent(o)}/retire`,n=JSON.stringify({reason:f})}else throw new Error(`Unknown serving operation: ${r.action}`);let i=new Headers(r.headers);i.set("accept","application/json"),n&&i.set("content-type","application/json");let a=await r.request(new URL(d,r.baseUrl),{method:n?"POST":"GET",headers:i,body:n});if(!a.ok)throw new Error(`Hosted serving request failed (${a.status}). Inspect hosted-serving-pools before retrying a capacity change.`);let p=await a.json();if(!n)return e.object({pools:e.array(l)}).parse(p);let c=e.object({pool:l}).parse(p);if(t&&c.pool.id!==t||s&&c.pool.baseProfileId!==s)throw new Error("Serving response identity mismatch. Inspect hosted-serving-pools before retrying.");return c}g(b,"runHostedServingCommand");export{b as runHostedServingCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{A as r}from"./chunk-PF56N7ZY.js";import{a as l}from"./chunk-FTQLQJQV.js";var c=r.object({workerId:r.string().min(1).max(191),expectedControlRevision:r.string().regex(/^[a-f0-9]{64}$/),idempotencyKey:r.string().min(1).max(191),jobId:r.string().min(1).max(191).optional(),maximumStorageUsd:r.number().positive().max(10).optional(),warmIdleDeadlineAt:r.iso.datetime({offset:!0}).optional(),maximumIdleUsd:r.number().positive().max(10).optional(),sessionId:r.string().min(1).max(191).optional(),sessionDeadlineAt:r.iso.datetime({offset:!0}).optional(),maximumSessionUsd:r.number().positive().max(30).optional(),idleGraceSeconds:r.number().int().min(120).max(28800).optional(),preservePhysicalUntilDeadline:r.boolean().optional()}).strict().refine(e=>e.preservePhysicalUntilDeadline===!0||e.idleGraceSeconds===void 0||e.idleGraceSeconds<=10800,{path:["idleGraceSeconds"],message:"Ordinary session idle grace cannot exceed three hours."});async function u(e){let t="/v1/managed-rl/physical-workers",s;if(e.action==="hosted-workers"){if(e.target)throw new Error("hosted-workers does not accept an identifier.")}else if(e.action==="hosted-worker"){if(!e.target)throw new Error("hosted-worker requires a physical worker ID.");t+=`/${encodeURIComponent(e.target)}`}else{let o=e.action.replace("hosted-worker-","");if(!["stop","resume","retire","warm-idle","retain-session"].includes(o))throw new Error(`Unknown physical worker action: ${o}`);if(!e.confirmed)throw new Error("Worker lifecycle changes require --yes.");let{workerId:m,...n}=c.parse(await e.readInput());if(n.preservePhysicalUntilDeadline!==void 0&&o!=="retain-session")throw new Error("Physical preservation is available only on retain-session with a fixed deadline and budget.");if(o==="stop"&&!n.maximumStorageUsd)throw new Error("Stopping requires maximumStorageUsd for bounded retained storage.");if(o==="resume"&&!n.jobId)throw new Error("Resuming requires an admitted queued jobId with its own compute budget.");if(o==="warm-idle"&&(!n.warmIdleDeadlineAt||!n.maximumIdleUsd))throw new Error("Warm idle requires warmIdleDeadlineAt and maximumIdleUsd; the server caps retention at three hours.");if(o==="retain-session"&&(!n.sessionId||!n.sessionDeadlineAt||!n.maximumSessionUsd||!n.idleGraceSeconds))throw new Error("Session retention requires sessionId, sessionDeadlineAt, maximumSessionUsd, and idleGraceSeconds; its deadline and active-plus-idle execution budget cannot be renewed; reserve cleanup costs separately.");t+=`/${encodeURIComponent(m)}/control`,s=JSON.stringify({...n,action:o})}let a=new Headers(e.headers);a.set("accept","application/json"),s&&a.set("content-type","application/json");let d=await e.request(new URL(t,e.baseUrl),{method:s?"POST":"GET",headers:a,body:s}),i=await d.json();if(!d.ok){let o=i&&typeof i=="object"&&"error"in i&&typeof i.error=="string"?i.error:"worker_request_failed";throw new Error(`Physical worker request failed (${d.status}): ${o}. Read hosted-worker before retrying a lifecycle mutation.`)}return i}l(u,"runHostedWorkerCommand");export{u as runHostedWorkerCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as a,f as d,g as b}from"./chunk-3M53YXEI.js";import"./chunk-N42HT64M.js";import{a as g}from"./chunk-NG2L6D7G.js";import"./chunk-ABF3W2MO.js";import"./chunk-RV7PUSI2.js";import"./chunk-KCV5VN4X.js";import"./chunk-OE22TAXP.js";import{O as v}from"./chunk-J572ANHX.js";import"./chunk-PBZCXPPC.js";import"./chunk-NJLULBTM.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import{a as u}from"./chunk-FTQLQJQV.js";import{randomUUID as x}from"node:crypto";import{createInterface as h}from"node:readline/promises";function $(i){let e=a(i,"gpuType"),s=a(i,"availabilityId"),p=a(i,"gpuPlacementObjective");if(e||s){if(!e||!s||p)throw new Error("Choose --gpu-type with --availability-id, or --gpu-placement-objective.");return g.parse({mode:"manual",gpuType:e,availabilityId:s})}return p?g.parse({mode:"automatic",objective:p}):void 0}u($,"trainingGpuChoice");async function O(i){let{options:e,client:s,teamId:p}=i,f=a(e,"batchId");if(!f)throw new Error("training start --team-id requires --batch-id <sealed-approved-batch-id>.");let y=process.stdin.isTTY&&process.stdout.isTTY&&!d(e.json),m=d(e.yes);if(!m&&!y)throw new Error("Noninteractive training start requires --yes and an explicitly approved --max-spend or saved budget.");for(let r of["manifest","comparisonSeriesEntry","retentionDays","exportApproved"])if(e[r]!==void 0)throw new Error(`Hosted saved-Model starts use the retained configuration; ${r} is not a run override.`);let[{project:o},w]=await Promise.all([i.models.get(i.modelId),i.learning.get("batch",f)]),c=$(e)??o.trainingSetup.managedGpuSelection,t=b(e.maxSpend,"max-spend")??o.trainingSetup.preferredMaximumSpendUsd;if(y&&!m){let r=h({input:process.stdin,output:process.stdout});try{let l=await r.question(`Maximum budget in USD${t===null?"":` [${t}]`}: `);l.trim()&&(t=Number(l.trim()))}finally{r.close()}}if(t===null||!Number.isFinite(t)||t<=0||t>1e6)throw new Error("Choose an explicit positive --max-spend or save a positive Model budget before starting.");let n=await s.prepareRun({schemaVersion:"openpond.trainingPreparationRequest.v1",teamId:p,operationId:a(e,"operationId")||x(),projectId:a(e,"projectId")||null,configuration:{id:o.id,expectedRevision:o.revision,expectedEtag:o.etag},batch:v(w),name:a(e,"name")||o.name,maximumSpendUsd:t,...c?{gpuSelection:c}:{}});if(d(e.json)||console.log(`Retained preparation: ${n.plan.id}`),d(e.json)||(console.log(`Prepared run: ${n.plan.id}; approved maximum $${t}.`),console.log(`Model: ${o.name}@${n.plan.source.modelProject.revision}; batch: ${n.plan.request.batch.id}@${n.plan.request.batch.revision}.`),console.log(`GPU choice: ${c?.mode==="manual"?`${c.gpuType} / ${c.availabilityId}`:`Automatic (${c?.objective??o.trainingSetup.managedGpuPlacementObjective})`}.`)),!m){let r=h({input:process.stdin,output:process.stdout});try{let l=await r.question(`Start this exact prepared run with a $${t} maximum? [y/N] `);if(!["y","yes"].includes(l.trim().toLowerCase()))throw new Error(`Training was not started. Preparation ${n.plan.id} is retained for review or cancellation.`)}finally{r.close()}}return{preparation:await s.startPreparation(n.plan.id,{teamId:p,planHash:n.plan.contentHash,expectedRevision:n.revision})}}u(O,"startHostedModel");export{O as startHostedModel,$ as trainingGpuChoice};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-J7ZTPXRQ.js";import"./chunk-WWQNMC7C.js";import"./chunk-4N4EH3RJ.js";import"./chunk-HFJUXKT5.js";import"./chunk-5ZBLCWEJ.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-2EPR4HLF.js";import"./chunk-BKEDG3A4.js";import"./chunk-OE22TAXP.js";import"./chunk-UGOK7VTC.js";import"./chunk-VVNV4NNW.js";import"./chunk-PF56N7ZY.js";import"./chunk-FTQLQJQV.js";export{a as createHostedWebSearchExecutor,b as createWebSearchExecutorFromEnv,d as normalizeSearchApiUrl,e as normalizeWebSearchRequest,c as resolveWebSearchEndpoint};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as F,b as G,c as H,d as I,e as J,f as K,g as L,h as M,i as N,j as O,k as P,l as Q,m as R,n as S,o as T}from"./chunk-DLANLLKH.js";import{A,B,C,D,E,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-YU3C6U5V.js";import"./chunk-LKKMLBOH.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,S as checkoutBranch,T as checkoutBranchAtPath,G as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,Q as createAndCheckoutBranch,R as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,J as loadGitCommitDiffAtPath,H as loadWorkspaceDiff,I as loadWorkspaceDiffAtPath,K as loadWorkspaceFile,N as loadWorkspaceFileAtPath,L as loadWorkspaceImageFile,M as loadWorkspaceImageFileAtPath,O as loadWorkspaceState,P as loadWorkspaceStateAtPath,n as localVideoContentType,F as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
|