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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as S}from"./chunk-XRKFTPHD.js";import{f as C}from"./chunk-3M53YXEI.js";import{a as o}from"./chunk-FTQLQJQV.js";var a="boolean",c="integer",u="json",g="number",e="string",k={agent:e,approvalPolicy:e,cwd:e,json:a,maxOutputBytes:c,message:e,messageFile:e,model:e,noServerStart:a,nonInteractive:a,project:e,provider:e,resume:e,sandbox:e,server:e,stdin:a,timeoutSec:c,yes:a},I={access:e,agentId:e,all:a,artifactPaths:e,async:a,authHeader:e,authHeaderValue:e,authToken:e,autoStart:a,baseRef:e,branch:e,budget:g,budgetUsd:g,cleanup:a,cols:c,command:e,content:e,contentBase64:e,contents:e,contentsBase64:e,cpu:g,create:a,description:e,diskGb:g,dockerBuildArgs:u,dockerRegistrySecretRefs:e,dockerfile:e,dockerfileContext:e,dockerfileTarget:e,domain:e,env:e,environment:e,envLiteral:e,envName:e,envRef:e,expectedMppMode:e,expectedVersion:c,failOnUnpreservedChanges:a,ffOnly:a,forceWithLease:a,fork:a,fromPath:e,idempotencyKey:e,idleTimeoutSeconds:c,image:e,imageDigest:e,input:e,inputBase64:e,integrationCapabilities:e,integrationConnection:e,integrationScopes:e,intervalMs:c,json:a,keep:a,label:e,leaseId:e,lifecycleHint:u,manifestPath:e,maxDurationSeconds:c,maxEntries:g,maxResults:g,offsetBytes:c,maxBytes:c,memoryGb:g,message:e,name:e,noPreview:a,overwrite:a,params:u,path:e,paths:e,payload:u,port:c,preview:a,projectId:e,publish:a,q:e,query:e,rebase:a,recursive:a,registrySecretRef:e,remote:e,replayState:e,repo:e,respondAsync:a,rows:c,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProfileId:e,runtimeProjectId:e,runtimePromotionPolicy:e,runtimeWorkspaceRoot:e,sandboxId:e,scope:e,since:c,snapshot:a,snapshotId:e,sourceProjectId:e,sourceRepoUrl:e,sourceSandboxId:e,startPoint:e,status:e,stdin:a,summary:a,tag:e,tags:e,targetId:e,targetType:e,teamId:e,templateName:e,templateVersion:e,templateVisibility:e,timeoutSeconds:c,toPath:e,type:e,useCase:e,validationCommand:e,value:e,version:e,volumeDeleteOnSandboxDelete:a,volumeMountPath:e,volumeName:e,volumeStorageGb:g,workflowMode:e},x={action:e,agentId:e,budget:g,budgetUsd:g,build:e,branch:e,commit:a,commitMessage:e,description:e,dir:e,disableSchedule:e,disableSchedules:e,enableSchedule:e,enableSchedules:e,entrypoint:e,env:u,envRef:e,file:e,force:a,idleTimeoutSeconds:c,inherit:a,input:u,inputFile:e,inputFiles:e,inputJson:u,inputs:u,json:a,keepTokenRemote:a,manifest:e,maxDurationSeconds:c,name:e,noPush:a,noWrite:a,out:e,outDir:e,output:e,outputDir:e,params:u,path:e,plan:e,projectId:e,repo:e,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProjectId:e,runtimePromotionPolicy:e,scheduleMode:e,scheduleOverride:u,scheduleOverrides:u,schedules:e,service:e,setRemoteToken:a,setupTimeoutSeconds:c,target:e,teamId:e,timeoutSeconds:c,token:e,workflowMode:e,yes:a},O={branch:e,commitMessage:e,defaultBranch:e,description:e,gitOwner:e,gitRepo:e,internalRepoPath:e,json:a,name:e,path:e,projectId:e,repo:e,sourceCheckDispatch:e,sourceType:e,teamId:e,templateRepoUrl:e},P={agentId:e,agentEdit:u,allowLatestSource:a,allowedActions:e,attachmentsJson:u,baseSha:e,chatMode:e,checkKind:e,conversationId:e,cwd:e,dispatch:e,entrypointName:e,entrypointScope:e,expectedManifestHash:e,evalStatus:e,expectedSourceCommitSha:e,idempotencyKey:e,input:u,inputFile:e,json:a,limit:c,message:e,metadata:u,name:e,path:e,payload:u,projectId:e,prompt:e,provider:e,publishedSnapshotId:e,ref:e,requirePublishedSnapshot:a,requiredEnv:e,requiredIntegrations:e,runtimePromotionPolicy:e,runtimeSourceMode:e,sourceCheckDispatch:e,sourceMode:e,sourceRef:e,status:e,targetProjectId:e,teamId:e,triggerType:e,workflowMode:e};var f={account:"string",apiBaseUrl:"string",apiBaseurl:"string",baseUrl:"string",baseurl:"string",chatApiBaseUrl:"string",chatApiBaseurl:"string",checkUpdate:"boolean",cwd:"string",help:"boolean",home:"string",json:"boolean",profile:"string",sandboxApiUrl:"string",sandboxApiurl:"string",tui:"boolean",version:"boolean"},W={C:"cwd",f:"force",h:"help",j:"json",v:"version",y:"yes"},M={cwd:"string",input:"json",inputFile:"string",json:"boolean",path:"string"},j=[{name:"learning",usage:`openpond learning <get|list> <kind> [id] --team-id <id> [--revision <n>] [--after-id <id>]
|
|
3
|
+
openpond learning <command|publish-batch> --input-file <absolute-path> --team-id <id>`,optionSchema:{inputFile:"string",teamId:"string",revision:"integer",afterId:"string",parentId:"string",status:"string",limit:"integer"},handler:o(async({options:t,rest:n})=>(await import("./learning-XTY5VOTK.js")).runLearningCommand(t,n),"handler")},{name:"tool-learning",usage:"openpond tool-learning <setup|register|install|doctor|status|routing|configure|append|flush|episodes|episode|project|disable|enable|revoke|purge|uninstall> [installation-id] [episode-id] [--input-file <absolute-path>] [--team-id <id>] [--workspace <absolute-path>]",optionSchema:{client:"string",tools:"string",allowUpload:"boolean",inputFile:"string",teamId:"string",projectId:"string",workspace:"string",environmentFile:"string",expiresAt:"string",after:"string",timeoutSec:"integer"},handler:o(async({options:t,rest:n})=>(await import("./command-NDHFZAKA.js")).runToolLearningCommand(t,n),"handler")},{name:"import",usage:"openpond import <connect|reconnect|discover|status|conversations|coverage|sync|schedule|cancel|pause|resume|disconnect|branches|branch|service> [id] [--source <name>] [--source-path <path>] [--range day|week|all] [--upload] [--selection-file <path>] [--query <text>] [--offset <number>] [--until <ISO-cutoff>] [--team <id>] [--project <id>] [--session <native-id>] [--leaf <uuid>] [--revision <hash>] [--continual [--daily|--weekly|--hourly|--cron <expression>] [--at HH:MM] [--on sun|mon|tue|wed|thu|fri|sat]] [--off] [--yes]",optionSchema:{source:"string",sourcePath:"string",range:"string",upload:"boolean",selectionFile:"string",query:"string",offset:"string",until:"string",team:"string",project:"string",session:"string",leaf:"string",revision:"string",continual:"boolean",daily:"boolean",weekly:"boolean",hourly:"boolean",cron:"string",at:"string",on:"string",off:"boolean",scheduled:"boolean",yes:"boolean",connection:"string",collectorDir:"string",json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./import-P5DCYMQ6.js")).runImportCommand(t,n),"handler")},{name:"datasets",usage:`openpond datasets <context|select|select-model|select-destination|new-experiment|select-experiment|rename-experiment|schema|list|read|create|save|file|validate|check-graders|check-sources|package|import|inspect-source|import-source|list-graders|read-grader|save-grader|test-grader|upload|publish|sync|pause-sync|disconnect-sync|related-chats> [id] --local [--server-url <loopback-origin>] [--input-file <path>] [--operation-id <id>] [--expected-revision <n>] [--json]
|
|
4
|
+
openpond datasets <upload|save|read|list|validate|publish|preparation> [folder|id] --team <id> --api-base-url <origin> [--operation-id <id>] [--expected-revision <n>] [--publish] [--project <id>] [--dataset-id <id>] [--input-file <path>]
|
|
5
|
+
openpond datasets preparation <grant-create|grant-read|create|read|list|candidates|operation|start|pause|resume|cancel|resolve|release> <dataset-id> [run-or-grant-id] --team <id> --api-base-url <origin> [--input-file <path>] [--operation-id <id>] [--expected-revision <n>] [--cursor <id>]`,optionSchema:{team:"string",operationId:"string",expectedRevision:"integer",publish:"boolean",project:"string",datasetId:"string",graderId:"string",limit:"integer",offset:"integer",cursor:"string",workspaceHash:"string",packageHash:"string",inputFile:"string",json:"boolean",local:"boolean",serverUrl:"string"},handler:o(async({options:t,rest:n})=>(await import("./datasets-BWHI23IB.js")).runDatasetsCommand(t,n),"handler")},{name:"connected-evidence",usage:"openpond connected-evidence <list|collection|recorded-list|recorded|import-receipt|capture-assets|retain-assets|starting-assets|summary|case|unmapped|capture|selection|publish|prepare-recorded|upload-part|preview|commit|set-collection> [id] --team <id> [--input-file <path>] [--project <id>] [--cursor <id>] [--limit <n>]",optionSchema:{team:"string",inputFile:"string",project:"string",cursor:"string",limit:"integer"},handler:o(async({options:t,rest:n})=>(await import("./connected-evidence-FNHTBUDG.js")).runConnectedEvidenceCommand(t,n),"handler")},{name:"improve",usage:"openpond improve <list|read|instructions|request> [id] --team <id> --actor <owner-id> [--input-file <path>] [--cursor <id>] [--limit <n>] [--local --server-url <loopback-origin>]",optionSchema:{team:"string",actor:"string",inputFile:"string",cursor:"string",limit:"integer",local:"boolean",serverUrl:"string"},handler:o(async({options:t,rest:n})=>(await import("./experiment-improvements-2TV2DA3K.js")).runExperimentImprovementsCommand(t,n),"handler")},{name:"evaluation-schedules",usage:"openpond evaluation-schedules <list|read|request> [id] --team <id> --actor <id> --local [--server-url <loopback-origin>] [--project <id>] [--input-file <path>] [--cursor <id>] [--limit <n>]",optionSchema:{team:"string",actor:"string",local:"boolean",serverUrl:"string",project:"string",inputFile:"string",cursor:"string",limit:"integer"},handler:o(async({options:t,rest:n})=>(await import("./evaluation-coordination-JTQIKHW6.js")).runEvaluationCoordinationCommand("schedule",t,n),"handler")},{name:"evaluate-refiner",usage:"openpond evaluate-refiner <list|read|cancel|resume|request> [id] --team <id> --actor <id> --local [--server-url <loopback-origin>] [--project <id>] [--input-file <path>]",optionSchema:{team:"string",actor:"string",local:"boolean",serverUrl:"string",project:"string",inputFile:"string"},handler:o(async({options:t,rest:n})=>(await import("./evaluation-coordination-JTQIKHW6.js")).runEvaluationCoordinationCommand("refiner",t,n),"handler")},{name:"human-review",usage:"openpond human-review <read|inbox|inspect|results|request> [id] --team <id> [--input-file <path>] [--view <mine|team|approval>] [--status <active|history>] [--project <id>] [--revision <n>] [--slot <0|1>] [--after-id <id>] [--limit <n>] [--local --server-url <loopback-origin>]",optionSchema:{team:"string",inputFile:"string",view:"string",status:"string",project:"string",revision:"integer",slot:"integer",afterId:"string",limit:"integer",local:"boolean",serverUrl:"string"},handler:o(async({options:t,rest:n})=>(await import("./human-review-NVKBEYG5.js")).runHumanReviewCommand(t,n),"handler")},{name:"experiments",usage:`openpond experiments <signal-plan|signal-report> --input-file <path> [--json]
|
|
6
|
+
openpond experiments <models|run|run-cloud|list|read|status|cancel|result|compare|case> [id] [candidate-id] --local [--server-url <loopback-origin>] [--input-file <path>] [--receipt-id <id>] [--json]
|
|
7
|
+
openpond experiments <profile-catalog|prepare-profile|run-profile|inspect-profile> --local [--server-url <loopback-origin>] [--input-file <path>] [--json]
|
|
8
|
+
openpond experiments <prepare-harness|run|read|list|status|diagnostics|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--local --server-url <loopback-origin>] [--receipt-id <id>] [--json]`,usages:["Case inspection: experiments case <run-id> --local --receipt-id <retained-receipt-id> [--after-sequence <nonnegative-integer>] [--limit <1..500>] --json. Only compare accepts a second positional run id; a task id is not a receipt id.","Find retained receipt IDs with experiments result <run-id> --local --json (independent saved Dataset runs: evidence.cases[].receiptId; workspace runs: cases[].receiptId). Case inspection reads retained output/grading/trace and never executes inference or grading.",'Independent saved Dataset input (use --local without --team): {"datasetId":"<saved-id>","revision":3,"operationId":"reviewed-evaluation-1","maximumCostUsd":1,"taskLimit":10,"seed":0,"maxOutputTokens":1024,"models":[{"providerId":"openpond","modelId":"<exact catalog id>"}]}',"Resolve models with experiments models --local --json; use each entry's providerId and id as modelId. Supported providers: openpond, custom-openai-compatible, claude-code, codex. Select 1\u20138 distinct models.","Input bounds: positive saved revision; operationId 1\u2013120 characters; taskLimit 1\u2013100 (default 10, first saved tasks); seed 0\u20132147483647 (default 0); maxOutputTokens 1\u2013262144 (default 1024, capped by the selected model). Dataset revision pins its graders; no configuration/request wrapper is accepted here.","maximumCostUsd is a positive total ceiling up to 10000, divided across selected models and covering metered inference/grading. Use the authorized ceiling; the example is illustrative. It may be omitted only when every model is codex and the Dataset has no model-judge grader; subscription dollar cost remains unknown.","Prepare only: read datasets context/read/check-graders and experiments models, then write and review the input file. There is no independent Dataset prepare/dry-run command. experiments run --local --input-file <path> executes; reuse operationId only for the exact same input after reconciling status.","--team uses the workspace configuration contract instead. prepare-harness and prepare-profile prepare their released Harness/Profile workflows, not independent saved Dataset inputs."],optionSchema:{team:"string",inputFile:"string",operationId:"string",project:"string",datasetHash:"string",search:"string",status:"string",afterId:"string",afterCallId:"string",limit:"integer",json:"boolean",local:"boolean",serverUrl:"string",receiptId:"string",afterSequence:"integer",revision:"integer",contentHash:"string"},handler:o(async({options:t,rest:n})=>(await import("./experiments-VUJ4SEMG.js")).runExperimentsCommand(t,n),"handler")},{name:"home",usage:"openpond home [--home <directory>]",optionSchema:{},handler:o(async()=>console.log((await import("./dist-GR56E3QK.js")).resolveOpenPondHome()),"handler")},{name:"config",usage:"openpond config <get|set|unset|path|validate|schema|doctor|migrate|recover|restart-migration|revisions|replace|effective|trust|untrust|export|backup|restore|collect-orphans|clear-cache> [key] [value] [--home <directory>] [--json]",optionSchema:{keyPath:"json",value:"string",file:"string",project:"boolean",revision:"string",expectedRevision:"string",sourceAppHome:"string",sourceConfig:"string",sourceBrowserState:"string",dryRun:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./configuration-command-HPMGH7WR.js")).runConfigurationCommand(t,n),"handler")},{name:"help",usage:"openpond help",optionSchema:{},handler:o(async()=>(await import("./help-OPN36XRA.js")).printHelp(),"handler")},{name:"version",usage:"openpond version",optionSchema:{},handler:o(()=>console.log(S()),"handler")},{name:"check-update",usage:"openpond check-update",optionSchema:{},handler:o(async()=>(await import("./core-commands-LEFFBKR7.js")).runCheckUpdate(),"handler")},{name:"login",usage:"openpond login [--base-url <url>]",optionSchema:f,handler:o(async({options:t})=>(await import("./core-commands-LEFFBKR7.js")).runLogin(t),"handler")},{name:"init",usage:"openpond init [--path <dir>] [--profile <name>] [--template <name>] [--force] [--json]",optionSchema:{...f,force:"boolean",path:"string",template:"string"},handler:o(async({options:t})=>(await import("./profile-XL5LABHR.js")).runOpenPondInitCommand(t),"handler")},{name:"profile",usage:"openpond profile <current|init|load|check|push|commit|diff|catalog>",optionSchema:{checkKind:"string",conversationId:"string",ensureHosted:"boolean",expectedManifestHash:"string",force:"boolean",hostedCheckKind:"string",hostedRunAgentId:"string",hostedRunConversationId:"string",hostedRunIdempotencyKey:"string",hostedRunInput:"json",hostedRunRetry:"boolean",hostedRunTargetProjectId:"string",hostedSourceDispatch:"string",hostedSourceAgentId:"string",hostedSourceChecks:"boolean",hostedSourceProjectId:"string",json:"boolean",kind:"string",path:"string",publishHostedSource:"boolean",teamId:"string"},handler:o(async({options:t,rest:n})=>(await import("./profile-XL5LABHR.js")).runOpenPondProfileCommand(t,n),"handler")},{name:"agents",usage:"openpond agents [--json]",optionSchema:{json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./profile-XL5LABHR.js")).runOpenPondAgentsCommand(t,n),"handler")},{name:"actions",usage:"openpond actions <check|build|run|dev|publish> [action-id] [--cwd DIR] [--input JSON|--input-file PATH]",optionSchema:{apiKey:"string",baseUrl:"string",cwd:"string",input:"string",inputFile:"string",json:"boolean",outputDirectory:"string",sourceDirectory:"string",sourceCommitSha:"string",sourceRef:"string",projectId:"string",teamId:"string",timeoutMs:"integer"},handler:o(async({options:t,rest:n})=>(await import("./actions-command-VLKMHCMI.js")).runProjectActionsCommand(t,n),"handler")},...N(),{name:"extension",usage:"openpond extension <add|preview|list|inspect|update|remove> [owner/repo]",usages:["openpond extension add <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update --all [--json]","openpond extension remove <owner/repo> [--json]"],optionSchema:{all:"boolean",json:"boolean",ref:"string"},handler:o(async({options:t,rest:n})=>(await import("./extension-UH34ZF7N.js")).runOpenPondExtensionCommand(t,n),"handler")},{name:"profiles",usage:"openpond profiles [args]",optionSchema:{json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./core-commands-LEFFBKR7.js")).runProfiles(t,n),"handler")},{name:"account",usage:"openpond account",usages:["openpond account context [--account <handle>] [--base-url <url>] [--api-base-url <url>] [--json]"],optionSchema:{json:"boolean"},handler:o(async({options:t,rest:n})=>{if(n[0]==="context"&&n.length===1)return(await import("./account-context-TIJOM22A.js")).runAccountContext(t);if(n.length)throw new Error("usage: account [context]");return(await import("./core-commands-LEFFBKR7.js")).runAccount()},"handler")},{name:"health",usage:"openpond health",optionSchema:{json:"boolean"},handler:o(async({options:t})=>(await import("./core-commands-LEFFBKR7.js")).runHealth(t),"handler")},{name:"acp",usage:"openpond acp [--home DIR] [--model ID] [--login]",optionSchema:{home:"string",model:"string",login:"boolean",apiKey:"string"},handler:o(async({options:t,rest:n})=>(await import("./acp-G5GCLP44.js")).runAcpCommand(t,n),"handler")},{name:"app-server",usage:"openpond app-server [--home DIR]",optionSchema:{home:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-DZHMJUBC.js")).runOpenPondServerCommand("app-server",t,n),"handler")},{name:"serve",usage:"openpond serve [args]",optionSchema:{host:"string",hostname:"string",listen:"string",port:"integer"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-DZHMJUBC.js")).runOpenPondServerCommand("serve",t,n),"handler")},{name:"ui",usage:"openpond ui [--no-open] [--hostname HOST] [--port PORT]",optionSchema:{host:"string",hostname:"string",listen:"string",noOpen:"boolean",port:"integer",webRoot:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-DZHMJUBC.js")).runOpenPondServerCommand("web",t,n),"handler")},{name:"tui",aliases:["interactive"],usage:"openpond tui [--provider <id>] [--model <id>] [--project <id>]",optionSchema:{cwd:"string",model:"string",noServerStart:"boolean",project:"string",provider:"string",server:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-DZHMJUBC.js")).runOpenPondTerminalCommand(t,n),"handler")},{name:"chat",usage:"openpond chat (--message-file <path>|--message <text>|--stdin) --non-interactive [--provider <id>] [--model <id>] [--agent <id>] [--project <id>] [--resume <session-id>] [--yes] [--approval-policy <policy>] [--json] [--timeout-sec <n>] [--max-output-bytes <n>] [--sandbox <mode>]",optionSchema:k,handler:o(async({options:t,rest:n})=>(await import("./app-layer-DZHMJUBC.js")).runOpenPondTerminalCommand(t,n),"handler")},{name:"tool",usage:"openpond tool <list|run> <handle>/<repo> [args]",optionSchema:{body:"json",json:"boolean"},handler:U},{name:"backtest",usage:"openpond backtest <run|events|get> <handle>/<repo> [args]",optionSchema:{body:"json",branch:"string",deploymentId:"string",limit:"integer",runId:"string"},handler:L},{name:"deploy",usage:"openpond deploy watch <handle>/<repo> [--branch <branch>]",optionSchema:{branch:"string"},handler:F},{name:"template",usage:"openpond template <status|branches|update> <handle>/<repo> [--env preview|production]",optionSchema:{env:"string"},handler:q},{name:"sandbox-template",usage:"openpond sandbox-template <command> [args]",optionSchema:x,handler:o(async({options:t,rest:n})=>(await import("./sandbox-template-QL5ID5GJ.js")).runSandboxTemplateCommand(t,n),"handler")},{name:"repo",usage:"openpond repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]",optionSchema:{branch:"string",name:"string",path:"string"},handler:K},{name:"organizations",aliases:["organization"],usage:"openpond organizations <login|list|use|logout|whoami> [args]",optionSchema:{accessToken:"string",arguments:"json",callbackPort:"integer",clientId:"string",customDomain:"string",displayName:"string",email:"string",env:"string",environment:"string",json:"boolean",name:"string",open:"boolean",origin:"string",primaryContactEmail:"string",printToken:"boolean",resourceUrl:"string",role:"string",scope:"string",scopes:"string",slug:"string",status:"string",timeout:"integer",timeoutSeconds:"integer",tool:"string",toolName:"string",toolset:"string",url:"string"},handler:o(async({options:t,rest:n})=>(await import("./organizations-UKXORVYS.js")).runOrganizationsCommand(t,n),"handler")},{name:"project",usage:"openpond project <list|create|upsert|get|update|sync|source-upload|archive> [args]",optionSchema:O,handler:o(async({options:t,rest:n})=>(await import("./project-agent-CCGEMNR7.js")).runProjectCommand(t,n),"handler")},{name:"agent",usage:"openpond agent <inspect|build|validate|eval|traces|list|create|upsert|get|update|run|run-test|bind-source|source|archive> [args]",usages:["openpond agent run <action> [--cwd <project>] [--input <json>]","openpond agent run <agentId> --team-id <id> [--conversation-id <id>] [--target-project-id <projectId>] [--input <json>]","openpond agent source checks <agentId> --team-id <id> [--check-kind <kind>]","openpond agent source publish <agentId> --team-id <id> [--expected-manifest-hash <hash>]"],optionSchema:P,handler:o(async({options:t,rest:n})=>(await import("./project-agent-CCGEMNR7.js")).runAgentCommand(t,n),"handler")},{name:"desktop-test",usage:"openpond desktop-test <run|attach> <scenario...> [--isolated|--attach|--packaged|--none] [--app <path>] [--artifacts-dir <path>] [--json <path>]",optionSchema:{artifactsDir:"string",attach:"boolean",cwd:"string",devtoolsPort:"integer",grep:"string",isolated:"boolean",json:"string",jsonPath:"string",keepHome:"boolean",none:"boolean",server:"string",timeoutMs:"integer",token:"string",tokenFile:"string"},handler:o(async({options:t,rest:n})=>(await import("./desktop-test-XROQ7K5H.js")).runDesktopTestCommand(t,n),"handler")},{name:"sandbox",usage:"openpond sandbox <command> [args]",optionSchema:I,handler:o(async({options:t,rest:n})=>(await import("./sandbox-command-L6BMKDGY.js")).runSandboxCommand(t,n),"handler")},{name:"continual",usage:"openpond continual <init|validate|run|report> [manifest-or-series-id]",usages:["openpond continual init --from <tasks.jsonl> [--output <continual-support.yaml>] [--non-interactive]","openpond continual validate <continual-support.yaml> [--json]","openpond continual run <continual-support.yaml> [--api-base-url <url>] [--json]","openpond continual report <comparison-series-id> [--output <report.json>] [--json]"],optionSchema:{apiBaseUrl:"string",commit:"string",correctionCasesPerFamily:"integer",correctionSelection:"string",description:"string",from:"string",grader:"string",id:"string",json:"boolean",license:"string",name:"string",nonInteractive:"boolean",output:"string",repository:"string",seed:"string",semanticSimilarityThreshold:"number"},handler:o(async({options:t,rest:n})=>(await import("./continual-HQCFY7GN.js")).runContinualCommand(t,n),"handler")},{name:"training",usage:"openpond training <projects|inspect-project|create-project|prepare-project|pull-project|estimate|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]",usages:["openpond training estimate <hosted-model-project-id> --team-id <id> [--batch-id <id>] [--gpu-type <type> --availability-id <id> | --gpu-placement-objective <objective>] [--gpu-count <1|2>] [--api-base-url <url>] [--json]","openpond training hosted-estimate <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training prepare-project <input.json> [--dry-run] [--output <receipt.json>] [--json]","openpond training prepare-project <reviewed-receipt.json> --apply [--output <saved.json>] [--json]","openpond training pull-project <hosted-model-project-id> --profile <local-profile-id> [--snapshot-file <verified-package-and-projection.json>] [--json]","openpond training projects [--profile <local-profile-id>] [--json]","openpond training inspect-project <local-model-project-id> [--profile <local-profile-id>] [--json]","openpond training create-project <taskset-id> --recipe <path> [--project-id <id>] [--profile <id>] [--name <name>] [--objective <text>] [--destination <id>] [--rollout-placement <local|remote>] [--gpu-placement-objective <fast|balanced|economical>] [--run-preset <preset>] [--max-spend <usd>] [--retention-days <days>] [--json]","openpond training start <hosted-model-project-id> --team-id <id> --batch-id <id> [--max-spend <usd>] [--gpu-type <type> --availability-id <id> | --gpu-placement-objective <objective>] [--gpu-count <1|2>] [--yes] [--detach] [--json]","openpond training start <model-project-id> [--comparison-series-entry <entry-id>] [--manifest <path>] [--yes] [--export-approved] [--max-spend <usd>] [--retention-days <days>] [--detach] [--json]","openpond training hosted-models|hosted-batches|hosted-preparations|hosted-jobs|hosted-capabilities|hosted-gpu-catalog --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-learning-inspect <model-project-id> --team-id <id> [--cursor <id>] [--limit <1..100>] [--api-base-url <url>] [--json]","openpond training hosted-corrections <model-project-id> --team-id <id> [--run-id <id>] [--api-base-url <url>] [--json]","openpond training hosted-workers --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-hardware --team-id <id> [--worker-id <id>] [--job-id <id>] [--limit <1..50>] [--cursor <worker-id>] [--api-base-url <url>] [--watch --interval-ms <100..60000> --timeout-ms <1000..60000>] [--json]","openpond training hosted-serving-pools --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-base-serving-prepare <base-profile.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-serving-pool-retire <pool-and-reason.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-provider|hosted-quotes --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-worker <physical-worker-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-worker-stop|hosted-worker-resume|hosted-worker-retire|hosted-worker-warm-idle|hosted-worker-retain-session <control.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-model <model-project-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-sync-model <input.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-publish-taskset <publication.json> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-evaluate-checkpoint <request.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-prepare|hosted-start|hosted-stage|hosted-submit <input.json> --team-id <id> [--api-base-url <url>] [--yes] [--json]","openpond training hosted-qualify <input.json> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-trajectory <job-id> --trajectory-id <receipt-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-feedback <job-id> --trajectory-id <receipt-id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-feedback <job-id> --evaluation-id <id> --task-id <id> --team-id <id> [--api-base-url <url>] [--json]","openpond training hosted-status|hosted-inspect|hosted-report|hosted-watch|hosted-cancel|hosted-artifacts|hosted-logs|hosted-events <job-id> --team-id <id> [--api-base-url <url>] [--interval-ms <ms>] [--json]","openpond training hosted-recover <input.json> --team-id <id> --yes [--api-base-url <url>] [--json]","openpond training hosted-stop-after-group <job-id> --team-id <id> [--api-base-url <url>] --yes [--json]","openpond training hosted-evaluation-tasks <job-id> --evaluation-id <id> --team-id <id> [--cursor <cursor>] [--limit <1..100>] [--api-base-url <url>] [--json]","openpond training hosted-watch <job-id> --team-id <id> [--deadline-at <ISO-time>] [--cleanup-reserve-ms <ms>] [--wait-for-cleanup] [--cancel-on-infrastructure-error] [--cleanup-timeout-ms <ms>] [--interval-ms <ms>] [--json]","openpond training status <run-id> [--json]","openpond training watch <run-id> [--interval-ms <ms>] [--json]","openpond training logs <run-id> [--json]","openpond training cancel <run-id> [--json]","openpond training resume <model-run-id> [--json]","openpond training artifacts <run-id> [--json]","openpond training benchmark <model-id> [--provider <id>] [--model <id>] [--reasoning-effort <level>] [--max-spend <usd>] [--json]"],optionSchema:{apiBaseUrl:"string",batchId:"string",operationId:"string",workerId:"string",jobId:"string",gpuType:"string",gpuCount:"string",availabilityId:"string",apply:"boolean",dryRun:"boolean",output:"string",comparisonSeriesEntry:"string",snapshotFile:"string",teamId:"string",account:"string",detach:"boolean",destination:"string",exportApproved:"boolean",gpuPlacementObjective:"string",intervalMs:"integer",watch:"boolean",timeoutMs:"integer",deadlineAt:"string",cleanupReserveMs:"integer",waitForCleanup:"boolean",cleanupTimeoutMs:"integer",cancelOnInfrastructureError:"boolean",trajectoryId:"string",evaluationId:"string",taskId:"string",runId:"string",cursor:"string",limit:"integer",json:"boolean",manifest:"string",maxSpend:"number",model:"string",name:"string",objective:"string",profile:"string",projectId:"string",provider:"string",recipe:"string",reasoningEffort:"string",retentionDays:"integer",rolloutPlacement:"string",runPreset:"string",yes:"boolean"},handler:o(async({options:t,rest:n})=>n[0]==="hosted-hardware"?(await import("./training-hardware-ESXRWUIK.js")).runHardwareObservations(t,n):(await import("./training-XFM3OOPN.js")).runTrainingCommand(t,n),"handler")},{name:"taskset",usage:"openpond taskset <import|publish|readiness|delete-draft> <package-path|draft-id|taskset-id> [--profile <id>] [--model <id>] [--json]",usages:["openpond taskset import <package-directory|taskset.json> [--profile <id>] [--json]","openpond taskset publish <draft-id> [--model <id>] [--json]","openpond taskset readiness <taskset-id> [--json]","openpond taskset delete-draft <draft-id> [--json]"],optionSchema:{apiBaseUrl:"string",json:"boolean",model:"string",profile:"string"},handler:o(async({options:t,rest:n})=>(await import("./taskset-7FQCJ55X.js")).runTasksetCommand(t,n),"handler")},{name:"opchat",usage:`openpond opchat <provider-catalog|models|model|smoke> [args]
|
|
9
|
+
openpond opchat chat --model <id> --message <text> --team-id <id> --max-output-tokens <n> --request-id <id> --timeout-sec <1..600> --max-spend <usd> [--stream] (one bounded request; JSON receipt after completion)`,optionSchema:{compatModel:"string",compatibilityModel:"string",env:"string",environment:"string",effort:"string",json:"boolean",message:"string",teamId:"string",maxOutputTokens:"integer",maxSpend:"number",requestId:"string",timeoutSec:"integer",model:"string",opchatApiBaseUrl:"string",opchatApiUrl:"string",prompt:"string",skipStream:"boolean",skipTool:"boolean",stream:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./opchat-ZJ5DO4RT.js")).runOpChatCommand(t,n),"handler")},{name:"teams-bot",usage:"openpond teams-bot <command> [args]",optionSchema:{json:"boolean",teamId:"string"},handler:o(async({options:t,rest:n})=>(await import("./teams-bot-LGV7UKX2.js")).runTeamsBotCommand(t,n),"handler")},{name:"apps",usage:"openpond apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]",optionSchema:{appId:"string",body:"json",env:"json",json:"boolean",limit:"integer",refresh:"boolean",teamId:"string",watch:"boolean"},handler:G},{name:"opentool",usage:"openpond opentool <init|validate|build> [args]",optionSchema:{},handler:o(async({rest:t})=>(await import("./core-commands-LEFFBKR7.js")).runOpentool(t),"handler")}],v=new Map;for(let t of j){v.set(t.name,t);for(let n of t.aliases??[])v.set(n,t)}function X(){return j}o(X,"listCliCommandDefinitions");function y(t){return v.get(t)??null}o(y,"getCliCommandDefinition");function Y(t,n){return y(t||"ui")?.optionSchema[n]??f[n]}o(Y,"getCliOptionKind");function Z(t){let n=f[t];if(n)return n;for(let s of j){let i=s.optionSchema[t];if(i)return i}}o(Z,"getAnyCliOptionKind");async function Q(t){let n=y(t.command);return n?C(t.options.help)?(H(n),!0):(await n.handler(t),!0):!1}o(Q,"runCliCommand");function _(t){let n=["Usage:",` ${t.usage}`,...(t.usages??[]).map(i=>` ${i}`)];t.aliases?.length&&n.push("","Aliases:",` ${t.aliases.join(", ")}`);let s=Object.entries(t.optionSchema).sort(([i],[p])=>i.localeCompare(p));if(s.length>0){n.push("","Options:");for(let[i,p]of s){let d=B(i);n.push(p==="boolean"?` --${d}`:` --${d} <${p}>`)}}return n.join(`
|
|
10
|
+
`)}o(_,"formatCliCommandUsage");function H(t){console.log(_(t))}o(H,"printCliCommandUsage");function B(t){return t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}o(B,"cliOptionName");function N(){return["inspect","build","validate","eval","run"].map(n=>({name:n,usage:`openpond ${n} [args]`,optionSchema:M,handler:o(async({options:s,rest:i})=>(await import("./profile-XL5LABHR.js")).runOpenPondProfileSdkAlias(n,s,i),"handler")}))}o(N,"profileSdkAliasDefinitions");async function U({options:t,rest:n}){let{runToolList:s,runToolRun:i}=await import("./core-commands-LEFFBKR7.js"),p=n[0];if(p==="list"){let d=n[1];if(!d)throw new Error("usage: tool list <handle>/<repo>");await s(t,d);return}if(p==="run"){let d=n[1],l=n[2];if(!d||!l)throw new Error("usage: tool run <handle>/<repo> <tool> [--body <json>]");await i(t,d,l);return}throw new Error("usage: tool <list|run> <handle>/<repo> [args]")}o(U,"runToolCommand");async function L({options:t,rest:n}){let{runBacktestRun:s}=await import("./core-commands-LEFFBKR7.js"),{runBacktestEvents:i,runBacktestGet:p}=await import("./apps-7LPKIYRY.js"),d=n[0]||"run";if(d==="run"){let l=n[1],b=n[2];if(!l||!b)throw new Error("usage: backtest run <handle>/<repo> <tool> [--body <json>] [--branch <branch>] [--deployment-id <id>]");await s(t,l,b);return}if(d==="events"){let l=n[1];if(!l)throw new Error("usage: backtest events <handle>/<repo> [--run-id <id>] [--limit <n>]");await i(t,l);return}if(d==="get"){let l=n[1];if(!l)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");await p(t,l);return}throw new Error("usage: backtest <run|events|get> <handle>/<repo> [args]")}o(L,"runBacktestCommand");async function F({options:t,rest:n}){let{runDeployWatch:s}=await import("./core-commands-LEFFBKR7.js");if((n[0]||"watch")!=="watch")throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");let p=n[1];if(!p)throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");await s(t,p)}o(F,"runDeployCommand");async function q({options:t,rest:n}){let{runTemplateBranches:s,runTemplateStatus:i,runTemplateUpdate:p}=await import("./core-commands-LEFFBKR7.js"),d=n[0]||"status",l=n[1];if(!l)throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]");if(d==="status"){await i(t,l);return}if(d==="branches"){await s(t,l);return}if(d==="update"){await p(t,l);return}throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]")}o(q,"runTemplateCommand");async function K({options:t,rest:n}){let{runRepoCreate:s,runRepoPush:i}=await import("./core-commands-LEFFBKR7.js"),p=n[0]||"create";if(p==="create"){await s(t,n.slice(1));return}if(p==="push"){await i(t);return}throw new Error("usage: repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]")}o(K,"runRepoCommand");async function G({options:t,rest:n}){let{runAppsAgentCreate:s,runAppsAssistant:i,runAppsCodeVisibility:p,runAppsDeploy:d,runAppsEnvGet:l,runAppsEnvSet:b,runAppsList:A,runAppsPerformance:T,runAppsSummary:E,runAppsTools:R,runAppsToolsExecute:D}=await import("./apps-7LPKIYRY.js"),m=n[0];if(m==="list"){await A(t);return}if(m==="code-visibility"){let r=n[1];if(!r)throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");await p(t,r);return}if(m==="tools"){if(n[1]==="execute"){let r=n[2],h=n[3],w=n[4];if(!r||!h||!w)throw new Error("usage: apps tools execute <appId> <deploymentId> <tool> [--body <json>]");await D(t,r,h,w);return}await R();return}if(m==="deploy"){let r=n[1];if(!r)throw new Error("usage: apps deploy <handle>/<repo> [--env preview|production] [--watch]");await d(t,r);return}if(m==="env"&&n[1]==="get"){let r=n[2];if(!r)throw new Error("usage: apps env get <handle>/<repo>");await l(t,r);return}if(m==="env"&&n[1]==="set"){let r=n[2];if(!r)throw new Error("usage: apps env set <handle>/<repo> --env <json>");await b(t,r);return}if(m==="performance"){await T(t);return}if(m==="summary"){let r=n[1];if(!r)throw new Error("usage: apps summary <handle>/<repo>");await E(t,r);return}if(m==="assistant"){let r=n[1],h=n[2];if(r!=="plan"&&r!=="performance"||!h)throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");await i(t,r,h,n.slice(3));return}if(m==="agent"&&n[1]==="create"){await s(t,n.slice(2));return}throw new Error("usage: apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]")}o(G,"runAppsCommand");export{f as a,W as b,X as c,y as d,Y as e,Z as f,Q as g,_ as h};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as k}from"./chunk-BKEDG3A4.js";import{A as h}from"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as J}from"node:crypto";var ie=h.object({models:h.array(h.object({slug:h.string().trim().min(1),display_name:h.string().trim().min(1),visibility:h.string(),priority:h.number().default(0),context_window:h.number().positive().nullable().optional(),input_modalities:h.array(h.string()).default([]),supported_reasoning_levels:h.array(h.object({effort:h.string()})).default([])})).max(500)});function j(e){let t=ie.parse(e).models.filter(n=>n.visibility==="list").sort((n,r)=>n.priority-r.priority),o=new Set;return t.map(n=>{if(o.has(n.slug))throw new Error("OpenAI returned a duplicate subscription model.");o.add(n.slug);let r=n.supported_reasoning_levels.map(s=>s.effort).filter(s=>["off","low","medium","high","xhigh","max"].includes(s));return k.parse({id:n.slug,providerId:"openai",displayName:n.display_name,source:"provider",contextWindow:n.context_window,capabilities:{streaming:!0,toolCalling:!0,reasoning:r.length>0,reasoningEfforts:r,vision:n.input_modalities.includes("image")}})})}i(j,"openAiSubscriptionModels");import{createHash as se,randomBytes as D}from"node:crypto";import{createServer as ae}from"node:http";var O="app_EMoamEEZ73f0CkXaXp7hrann",y="https://auth.openai.com",w=1455,I=300*1e3,de=5e3,le=3e3;function We(e){let t=null,o=null;async function n(){let{redirectUri:a}=await l(),d=ue(),u=R(D(32));o&&(o.reject(new Error("A previous OpenAI ChatGPT login was replaced.")),clearTimeout(o.timeout),o=null);let v=Date.now()+I;return new Promise((b,C)=>{o={pkce:d,state:u,resolve:b,reject:C,timeout:setTimeout(()=>{o=null,C(new Error("OpenAI ChatGPT login timed out."))},I)}}).then(b=>f(b)).catch(()=>{}).finally(()=>p()),{url:ce(a,d,u),redirectUri:a,expiresAt:v}}i(n,"startBrowserLogin");async function r(){let a=await fetch(`${y}/api/accounts/deviceauth/usercode`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"openpond-app"},body:JSON.stringify({client_id:O})});if(!a.ok)throw new Error(`OpenAI device authorization failed: ${a.status}`);let d=await a.json();if(!d.device_auth_id||!d.user_code)throw new Error("OpenAI device authorization returned an incomplete response.");let u=Math.max(Number.parseInt(d.interval??"",10)||de/1e3,1)*1e3,v=Date.now()+I;return s({deviceAuthId:d.device_auth_id,userCode:d.user_code,intervalMs:u,expiresAt:v}).catch(()=>{}),{url:`${y}/codex/device`,userCode:d.user_code,expiresAt:v}}i(r,"startDeviceLogin");async function s(a){for(;Date.now()<a.expiresAt;){let d=await fetch(`${y}/api/accounts/deviceauth/token`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"openpond-app"},body:JSON.stringify({device_auth_id:a.deviceAuthId,user_code:a.userCode})});if(d.ok){let u=await d.json();if(!u.authorization_code||!u.code_verifier)throw new Error("OpenAI device login returned an incomplete authorization response.");await f(await L(u.authorization_code,`${y}/deviceauth/callback`,{verifier:u.code_verifier}));return}if(d.status!==403&&d.status!==404)throw new Error(`OpenAI device login failed: ${d.status}`);await me(a.intervalMs+le)}throw new Error("OpenAI device login timed out.")}i(s,"pollDeviceLogin");async function l(){return t?{redirectUri:`http://localhost:${w}/auth/callback`}:(t=ae((a,d)=>{let u=new URL(a.url||"/",`http://localhost:${w}`);if(u.pathname!=="/auth/callback"){d.writeHead(404),d.end("Not found");return}let v=o,P=u.searchParams.get("error"),b=u.searchParams.get("error_description");if(P){c(b||P),d.writeHead(200,{"Content-Type":"text/html"}),d.end(A("Authorization Failed",b||P));return}let C=u.searchParams.get("code"),re=u.searchParams.get("state");if(!C){c("Missing authorization code."),d.writeHead(400,{"Content-Type":"text/html"}),d.end(A("Authorization Failed","Missing authorization code."));return}if(!v||re!==v.state){c("Invalid OAuth state."),d.writeHead(400,{"Content-Type":"text/html"}),d.end(A("Authorization Failed","Invalid OAuth state."));return}o=null,clearTimeout(v.timeout),L(C,`http://localhost:${w}/auth/callback`,v.pkce).then(v.resolve).catch(v.reject),d.writeHead(200,{"Content-Type":"text/html"}),d.end(A("Authorization Successful","You can close this window and return to OpenPond."))}),await new Promise((a,d)=>{t.once("error",d),t.listen(w,()=>{t.off("error",d),a()})}),{redirectUri:`http://localhost:${w}/auth/callback`})}i(l,"ensureOAuthServer");function c(a){let d=o;o=null,d&&(clearTimeout(d.timeout),d.reject(new Error(a)))}i(c,"failBrowserOAuth");function p(){let a=t;t=null,a&&a.close()}i(p,"stopOAuthServer");async function f(a){let d=a.access_token?.trim()||null,u=a.refresh_token?.trim();if(!u)throw new Error("OpenAI login did not return a refresh token.");await e.saveCredential({accessToken:d,refreshToken:u,expiresAt:Date.now()+(a.expires_in??3600)*1e3,accountId:z(a)})}return i(f,"saveTokens"),{startBrowserLogin:n,startDeviceLogin:r}}i(We,"createOpenAiSubscriptionAuthService");function ce(e,t,o){let n=new URLSearchParams({response_type:"code",client_id:O,redirect_uri:e,scope:"openid profile email offline_access",code_challenge:t.challenge,code_challenge_method:"S256",id_token_add_organizations:"true",codex_cli_simplified_flow:"true",state:o,originator:"openpond"});return`${y}/oauth/authorize?${n.toString()}`}i(ce,"buildAuthorizeUrl");async function L(e,t,o){let n=await fetch(`${y}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:t,client_id:O,code_verifier:o.verifier}).toString()});if(!n.ok)throw new Error(`OpenAI token exchange failed: ${n.status}`);return await n.json()}i(L,"exchangeCodeForTokens");async function B(e){let t=await fetch(`${y}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e,client_id:O}).toString()});if(t.status===401)throw new Error("Your OpenAI ChatGPT sign-in has expired or was invalidated. Reconnect it in Settings > Providers > OpenAI > Subscription by selecting Connect ChatGPT. This is an authentication issue, not a billing or model-access error.");if(!t.ok)throw new Error(`OpenAI token refresh failed: ${t.status}`);return await t.json()}i(B,"refreshOpenAiSubscriptionToken");function N(e,t){return{accessToken:e.access_token?.trim()||t.accessToken,refreshToken:e.refresh_token?.trim()||t.refreshToken,expiresAt:Date.now()+(e.expires_in??3600)*1e3,accountId:z(e)??t.accountId}}i(N,"credentialFromRefreshResponse");function ue(){let e=R(D(32)),t=R(se("sha256").update(e).digest());return{verifier:e,challenge:t}}i(ue,"generatePkce");function z(e){for(let t of[e.id_token,e.access_token]){let o=pe(t),n=x(o?.chatgpt_account_id);if(n)return n;let r=o?.["https://api.openai.com/auth"];if(r&&typeof r=="object"){let l=x(r.chatgpt_account_id);if(l)return l}let s=o?.organizations;if(Array.isArray(s)){for(let l of s)if(l&&typeof l=="object"){let c=x(l.id);if(c)return c}}}return null}i(z,"extractAccountId");function pe(e){if(!e)return null;let t=e.split(".");if(t.length!==3)return null;try{return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}}i(pe,"parseJwtClaims");function A(e,t){return`<!doctype html><html><head><meta charset="utf-8"><title>OpenPond - ${S(e)}</title></head><body><h1>${S(e)}</h1><p>${S(t)}</p></body></html>`}i(A,"htmlPage");function S(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}i(S,"escapeHtml");function R(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}i(R,"base64Url");function x(e){return typeof e=="string"&&e.trim()?e.trim():null}i(x,"stringValue");function me(e){return new Promise(t=>setTimeout(t,e))}i(me,"sleep");function E(e){let t=e.model?.trim().toLowerCase()??"";return e.provider==="zai"&&/(?:^|[/_-])glm-(?:4\.(?:[5-9]|\d{2,})|[5-9](?:\.\d+)?)(?:$|[/_-])/.test(t)?{kind:"chat_completions_reasoning",requestThinking:"zai_clear_thinking",supportsToolChoice:!0}:e.provider==="deepseek"&&/(?:^|[/_-])deepseek-v(?:3\.2|[4-9](?:\.\d+)?)(?:$|[/_-])/.test(t)?{kind:"chat_completions_reasoning",requestThinking:"deepseek_enabled",supportsToolChoice:!1}:null}i(E,"chatCompletionsReasoningPolicy");function G(e){return!e.hasToolCalls||e.reasoningText.length===0||!E(e)?null:{kind:"chat_completions_reasoning",reasoningContent:e.reasoningText}}i(G,"chatCompletionsContinuation");function q(e){return e.some(t=>t.continuation?.kind==="chat_completions_reasoning"&&t.continuation.reasoningContent.length>0)}i(q,"hasChatCompletionsReasoningContinuation");var fe=["openai","xai","openrouter","deepseek","zai","moonshot","together","groq","custom-openai-compatible"],he=9e4,F=5*6e4,ge=5*1024*1024,ve=64*1024,ye="https://chatgpt.com/backend-api/codex/responses",be=6e4;function _e(e){return fe.includes(e)}i(_e,"isOpenAiCompatibleProviderId");function M(e){if(!_e(e.providerId))throw new Error(`Provider ${e.providerId} is not OpenAI-compatible.`);let t=e.settings.providers[e.providerId],o=e.settings.modelCaches[e.providerId],n=X(e.baseUrl??t?.baseUrl??"");if(!n)throw new Error(`Provider ${e.providerId} requires a base URL.`);let r=e.secrets.providers[e.providerId],s=Ce(e.providerId,r);if(!s)throw new Error(we(e.providerId,e.settings));let l=e.modelId?.trim()||t?.defaultModel?.trim()||o?.models.find(c=>c.id.trim())?.id.trim()||"";if(!l&&e.requireModel!==!1)throw new Error(`Provider ${e.providerId} requires a model.`);return{providerId:e.providerId,baseUrl:n,auth:s,model:l}}i(M,"resolveOpenAiCompatibleProvider");function Ce(e,t){if(e==="openai"&&t?.source==="chatgpt_subscription"&&t.oauth?.refreshToken)return{type:"chatgpt_subscription",credential:t.oauth};let o=t?.source==="local_secret"?t.value?.trim()??"":t?.source==="env"&&t.envVar?process.env[t.envVar]?.trim()??"":"";return o?{type:"api_key",apiKey:o}:null}i(Ce,"resolveProviderAuth");function we(e,t){let o=t.statuses[e]?.displayName?.trim()||e,n="Add an API key in Settings > Providers.";return e==="openai"?`${o} has no connected API key. The raw OpenAI provider uses Platform API credentials. ${n}`:`${o} has no connected API key. ${n}`}i(we,"missingApiKeyMessage");async function Pe(e){let t=M({...e,requireModel:!1}),o=U(e.signal,e.requestTimeoutMs);try{let n=t.auth.type==="chatgpt_subscription",r=t.auth.type==="chatgpt_subscription"?await Y({providerId:t.providerId,credential:t.auth.credential,saveChatGptSubscriptionCredential:e.saveChatGptSubscriptionCredential}):null,s=new URL(n?"https://chatgpt.com/backend-api/codex/models":W(t.baseUrl,"models"));n&&s.searchParams.set("client_version",e.subscriptionClientVersion??"0.159.1");let l=r?Z(r,void 0):Q(t.auth.type==="api_key"?t.auth.apiKey:"","application/json");l.set("Accept","application/json");let c=await fetch(s,{method:"GET",headers:l,signal:o.signal});if(!c.ok){o.touch();let a=await $(c,e.errorBodyLimitBytes,o.signal,o.touch);throw new Error(`Provider ${t.providerId} model list failed: ${c.status} ${ee(t,a)}`)}let p=await De(c,`Provider ${t.providerId} model list`,e.responseBodyLimitBytes,o.signal,o.touch),f=n?j(p):$e(t.providerId,p);if(f.length===0)throw new Error(`Provider ${t.providerId} returned no models.`);return f}finally{o.cleanup()}}i(Pe,"listOpenAiCompatibleProviderModels");async function st(e){let t=M(e),o=await Pe({...e,providerId:t.providerId,baseUrl:t.baseUrl,modelId:t.model}),n=o.some(s=>s.id===t.model),r=n?[]:[`Model ${t.model} was not returned by provider model discovery.`];return{providerId:t.providerId,ok:r.length===0,live:!0,baseUrl:t.baseUrl,modelId:t.model,modelFound:n,modelCount:o.length,errors:r}}i(st,"validateOpenAiCompatibleProvider");async function*at(e){let t=e.resolvedProvider??M(e);if(t.auth.type==="chatgpt_subscription"){let n={...t,auth:t.auth};yield*ke({...e,provider:n});return}let o=U(e.signal,e.requestTimeoutMs);try{let n=W(t.baseUrl,"chat/completions"),r=await fetch(n,{method:"POST",redirect:"error",headers:Q(t.auth.apiKey,"text/event-stream",e.allowAnonymous),body:JSON.stringify(Ae({providerId:t.providerId,model:t.model,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,reasoningEffort:e.reasoningEffort,maxOutputTokens:e.maxOutputTokens,temperature:e.temperature,topP:e.topP,seed:e.seed})),signal:o.signal});if(!r.ok||!r.body){o.touch();let a=await $(r,e.errorBodyLimitBytes,o.signal,o.touch);throw new Error(`Provider ${t.providerId} stream failed: ${r.status} ${ee(t,a)}`)}let s="",l=!1,c=null,p=null;o.touch();for await(let a of ne(r.body,o.signal,o.touch)){if(p=a,a&&typeof a=="object"&&"error"in a)throw new Error(`Provider ${t.providerId} stream failed: ${H(a)}`);let d=Ge(a);d&&(yield{type:"usage",usage:d,raw:a});for(let u of Be(a))u.type==="reasoning_delta"&&(s+=u.text),u.type==="tool_call_delta"&&(l=!0),u.type==="finish"?c=u:yield u}let f=G({provider:t.providerId,model:t.model,reasoningText:s,hasToolCalls:l});f&&(yield{type:"continuation",continuation:f,raw:p}),c&&(yield c)}finally{o.cleanup()}}i(at,"streamOpenAiCompatibleChatCompletion");async function*ke(e){let t=await Y({providerId:e.provider.providerId,credential:e.provider.auth.credential,saveChatGptSubscriptionCredential:e.saveChatGptSubscriptionCredential});if(!t.accessToken)throw new Error("OpenAI ChatGPT subscription credential has no access token.");let o=Ie(e.promptCacheKey),n=U(e.signal,e.requestTimeoutMs);try{let r=await fetch(ye,{method:"POST",headers:Z(t,o??e.requestId),body:JSON.stringify(Te({model:e.provider.model,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,reasoningEffort:e.reasoningEffort,promptCacheKey:o})),signal:n.signal});if(!r.ok||!r.body){n.touch();let a=await $(r,e.errorBodyLimitBytes,n.signal,n.touch);throw new Error(`Provider ${e.provider.providerId} subscription stream failed: ${r.status} ${a}`)}let s=new Set,l=new Map,c=!1,p=null,f=null;n.touch();for await(let a of ne(r.body,n.signal,n.touch)){if(f=a,a&&typeof a=="object"&&"error"in a)throw new Error(`Provider ${e.provider.providerId} subscription stream failed: ${H(a)}`);for(let d of xe(a)){let u=m(d.id)??JSON.stringify(d);l.set(u,d)}for(let d of Ne(a,s))d.type==="tool_call_delta"&&(c=!0),d.type==="finish"?p=d:yield d}c&&l.size>0&&(yield{type:"continuation",continuation:{kind:"responses_reasoning_items",items:[...l.values()]},raw:f}),p&&(yield p)}finally{n.cleanup()}}i(ke,"streamOpenAiSubscriptionResponses");async function Y(e){if(e.credential.accessToken&&e.credential.expiresAt>Date.now()+be)return e.credential;let t=N(await B(e.credential.refreshToken),e.credential);return await e.saveChatGptSubscriptionCredential?.(e.providerId,t),t}i(Y,"usableSubscriptionCredential");function Ae(e){let t={model:e.model,messages:Oe(Me(e.messages)),stream:!0};e.tools&&(t.tools=e.tools),e.providerId==="openai"&&e.reasoningEffort&&(t.reasoning_effort=e.reasoningEffort),e.maxOutputTokens!=null&&(t.max_tokens=e.maxOutputTokens),e.temperature!=null&&(t.temperature=e.temperature),e.topP!=null&&(t.top_p=e.topP),e.seed!=null&&(t.seed=e.seed),e.providerId==="zai"&&e.tools&&e.tools.length>0&&(t.tool_stream=!0);let o=E({provider:e.providerId,model:e.model});return e.tools&&e.tools.length>0&&o?.requestThinking==="zai_clear_thinking"&&(t.thinking={type:"enabled",clear_thinking:!q(e.messages)}),e.tools&&e.tools.length>0&&o?.requestThinking==="deepseek_enabled"&&(t.thinking={type:"enabled"}),e.toolChoice!==void 0&&o?.supportsToolChoice!==!1&&(t.tool_choice=e.toolChoice),t}i(Ae,"buildChatCompletionBody");function Oe(e){return e.map(t=>{let{continuation:o,images:n,...r}=t,s=n?.length?[...typeof t.content=="string"&&t.content.trim()?[{type:"text",text:t.content}]:[],...n.map(l=>({type:"image_url",image_url:{url:l.url,...l.detail?{detail:l.detail}:{}}}))]:t.content;return o?.kind==="chat_completions_reasoning"?{...r,...s!==void 0?{content:s}:{},reasoning_content:o.reasoningContent}:{...r,...s!==void 0?{content:s}:{}}})}i(Oe,"chatCompletionMessages");function Te(e){let t=Se(e.messages),o={model:e.model,input:t.input,stream:!0,store:!1};t.instructions&&(o.instructions=t.instructions),e.promptCacheKey&&(o.prompt_cache_key=e.promptCacheKey),o.reasoning={...e.reasoningEffort?{effort:e.reasoningEffort}:{},summary:"auto"},e.maxOutputTokens!=null&&(o.max_output_tokens=e.maxOutputTokens),e.temperature!=null&&(o.temperature=e.temperature),e.topP!=null&&(o.top_p=e.topP);let n=Re(e.tools);n.length>0&&(o.tools=n);let r=Ee(e.toolChoice);return r!==void 0&&(o.tool_choice=r),o}i(Te,"buildResponsesBody");function Ie(e){let t=e?.trim();if(t)return t.length<=64?t:J("sha256").update(t).digest("hex")}i(Ie,"normalizedPromptCacheKey");function Se(e){let t=[],o=[];for(let n of e){let r=typeof n.content=="string"?n.content:"";if(n.role==="system"){r.trim()&&t.push(r.trim());continue}if(n.role==="tool"){o.push({type:"function_call_output",call_id:n.tool_call_id,output:r});continue}n.continuation?.kind==="responses_reasoning_items"&&o.push(...n.continuation.items),(r.trim()||n.images?.length)&&o.push({type:"message",role:n.role,content:[...r.trim()?[{type:n.role==="assistant"?"output_text":"input_text",text:r}]:[],...(n.images??[]).map(s=>({type:"input_image",image_url:s.url,...s.detail?{detail:s.detail}:{}}))]});for(let s of n.tool_calls??[]){let l=s.function&&typeof s.function=="object"?s.function:{};o.push({type:"function_call",call_id:s.id,name:l.name,arguments:typeof l.arguments=="string"?l.arguments:""})}}return{instructions:t.join(`
|
|
2
|
+
import{c as k}from"./chunk-2MEOUS24.js";import{A as h}from"./chunk-X2J2P5ZT.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as J}from"node:crypto";var ie=h.object({models:h.array(h.object({slug:h.string().trim().min(1),display_name:h.string().trim().min(1),visibility:h.string(),priority:h.number().default(0),context_window:h.number().positive().nullable().optional(),input_modalities:h.array(h.string()).default([]),supported_reasoning_levels:h.array(h.object({effort:h.string()})).default([])})).max(500)});function j(e){let t=ie.parse(e).models.filter(n=>n.visibility==="list").sort((n,r)=>n.priority-r.priority),o=new Set;return t.map(n=>{if(o.has(n.slug))throw new Error("OpenAI returned a duplicate subscription model.");o.add(n.slug);let r=n.supported_reasoning_levels.map(s=>s.effort).filter(s=>["off","low","medium","high","xhigh","max"].includes(s));return k.parse({id:n.slug,providerId:"openai",displayName:n.display_name,source:"provider",contextWindow:n.context_window,capabilities:{streaming:!0,toolCalling:!0,reasoning:r.length>0,reasoningEfforts:r,vision:n.input_modalities.includes("image")}})})}i(j,"openAiSubscriptionModels");import{createHash as se,randomBytes as D}from"node:crypto";import{createServer as ae}from"node:http";var O="app_EMoamEEZ73f0CkXaXp7hrann",y="https://auth.openai.com",w=1455,I=300*1e3,de=5e3,le=3e3;function We(e){let t=null,o=null;async function n(){let{redirectUri:a}=await l(),d=ue(),u=R(D(32));o&&(o.reject(new Error("A previous OpenAI ChatGPT login was replaced.")),clearTimeout(o.timeout),o=null);let v=Date.now()+I;return new Promise((b,C)=>{o={pkce:d,state:u,resolve:b,reject:C,timeout:setTimeout(()=>{o=null,C(new Error("OpenAI ChatGPT login timed out."))},I)}}).then(b=>f(b)).catch(()=>{}).finally(()=>p()),{url:ce(a,d,u),redirectUri:a,expiresAt:v}}i(n,"startBrowserLogin");async function r(){let a=await fetch(`${y}/api/accounts/deviceauth/usercode`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"openpond-app"},body:JSON.stringify({client_id:O})});if(!a.ok)throw new Error(`OpenAI device authorization failed: ${a.status}`);let d=await a.json();if(!d.device_auth_id||!d.user_code)throw new Error("OpenAI device authorization returned an incomplete response.");let u=Math.max(Number.parseInt(d.interval??"",10)||de/1e3,1)*1e3,v=Date.now()+I;return s({deviceAuthId:d.device_auth_id,userCode:d.user_code,intervalMs:u,expiresAt:v}).catch(()=>{}),{url:`${y}/codex/device`,userCode:d.user_code,expiresAt:v}}i(r,"startDeviceLogin");async function s(a){for(;Date.now()<a.expiresAt;){let d=await fetch(`${y}/api/accounts/deviceauth/token`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"openpond-app"},body:JSON.stringify({device_auth_id:a.deviceAuthId,user_code:a.userCode})});if(d.ok){let u=await d.json();if(!u.authorization_code||!u.code_verifier)throw new Error("OpenAI device login returned an incomplete authorization response.");await f(await L(u.authorization_code,`${y}/deviceauth/callback`,{verifier:u.code_verifier}));return}if(d.status!==403&&d.status!==404)throw new Error(`OpenAI device login failed: ${d.status}`);await me(a.intervalMs+le)}throw new Error("OpenAI device login timed out.")}i(s,"pollDeviceLogin");async function l(){return t?{redirectUri:`http://localhost:${w}/auth/callback`}:(t=ae((a,d)=>{let u=new URL(a.url||"/",`http://localhost:${w}`);if(u.pathname!=="/auth/callback"){d.writeHead(404),d.end("Not found");return}let v=o,P=u.searchParams.get("error"),b=u.searchParams.get("error_description");if(P){c(b||P),d.writeHead(200,{"Content-Type":"text/html"}),d.end(A("Authorization Failed",b||P));return}let C=u.searchParams.get("code"),re=u.searchParams.get("state");if(!C){c("Missing authorization code."),d.writeHead(400,{"Content-Type":"text/html"}),d.end(A("Authorization Failed","Missing authorization code."));return}if(!v||re!==v.state){c("Invalid OAuth state."),d.writeHead(400,{"Content-Type":"text/html"}),d.end(A("Authorization Failed","Invalid OAuth state."));return}o=null,clearTimeout(v.timeout),L(C,`http://localhost:${w}/auth/callback`,v.pkce).then(v.resolve).catch(v.reject),d.writeHead(200,{"Content-Type":"text/html"}),d.end(A("Authorization Successful","You can close this window and return to OpenPond."))}),await new Promise((a,d)=>{t.once("error",d),t.listen(w,()=>{t.off("error",d),a()})}),{redirectUri:`http://localhost:${w}/auth/callback`})}i(l,"ensureOAuthServer");function c(a){let d=o;o=null,d&&(clearTimeout(d.timeout),d.reject(new Error(a)))}i(c,"failBrowserOAuth");function p(){let a=t;t=null,a&&a.close()}i(p,"stopOAuthServer");async function f(a){let d=a.access_token?.trim()||null,u=a.refresh_token?.trim();if(!u)throw new Error("OpenAI login did not return a refresh token.");await e.saveCredential({accessToken:d,refreshToken:u,expiresAt:Date.now()+(a.expires_in??3600)*1e3,accountId:z(a)})}return i(f,"saveTokens"),{startBrowserLogin:n,startDeviceLogin:r}}i(We,"createOpenAiSubscriptionAuthService");function ce(e,t,o){let n=new URLSearchParams({response_type:"code",client_id:O,redirect_uri:e,scope:"openid profile email offline_access",code_challenge:t.challenge,code_challenge_method:"S256",id_token_add_organizations:"true",codex_cli_simplified_flow:"true",state:o,originator:"openpond"});return`${y}/oauth/authorize?${n.toString()}`}i(ce,"buildAuthorizeUrl");async function L(e,t,o){let n=await fetch(`${y}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:t,client_id:O,code_verifier:o.verifier}).toString()});if(!n.ok)throw new Error(`OpenAI token exchange failed: ${n.status}`);return await n.json()}i(L,"exchangeCodeForTokens");async function B(e){let t=await fetch(`${y}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e,client_id:O}).toString()});if(t.status===401)throw new Error("Your OpenAI ChatGPT sign-in has expired or was invalidated. Reconnect it in Settings > Providers > OpenAI > Subscription by selecting Connect ChatGPT. This is an authentication issue, not a billing or model-access error.");if(!t.ok)throw new Error(`OpenAI token refresh failed: ${t.status}`);return await t.json()}i(B,"refreshOpenAiSubscriptionToken");function N(e,t){return{accessToken:e.access_token?.trim()||t.accessToken,refreshToken:e.refresh_token?.trim()||t.refreshToken,expiresAt:Date.now()+(e.expires_in??3600)*1e3,accountId:z(e)??t.accountId}}i(N,"credentialFromRefreshResponse");function ue(){let e=R(D(32)),t=R(se("sha256").update(e).digest());return{verifier:e,challenge:t}}i(ue,"generatePkce");function z(e){for(let t of[e.id_token,e.access_token]){let o=pe(t),n=x(o?.chatgpt_account_id);if(n)return n;let r=o?.["https://api.openai.com/auth"];if(r&&typeof r=="object"){let l=x(r.chatgpt_account_id);if(l)return l}let s=o?.organizations;if(Array.isArray(s)){for(let l of s)if(l&&typeof l=="object"){let c=x(l.id);if(c)return c}}}return null}i(z,"extractAccountId");function pe(e){if(!e)return null;let t=e.split(".");if(t.length!==3)return null;try{return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}}i(pe,"parseJwtClaims");function A(e,t){return`<!doctype html><html><head><meta charset="utf-8"><title>OpenPond - ${S(e)}</title></head><body><h1>${S(e)}</h1><p>${S(t)}</p></body></html>`}i(A,"htmlPage");function S(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}i(S,"escapeHtml");function R(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}i(R,"base64Url");function x(e){return typeof e=="string"&&e.trim()?e.trim():null}i(x,"stringValue");function me(e){return new Promise(t=>setTimeout(t,e))}i(me,"sleep");function E(e){let t=e.model?.trim().toLowerCase()??"";return e.provider==="zai"&&/(?:^|[/_-])glm-(?:4\.(?:[5-9]|\d{2,})|[5-9](?:\.\d+)?)(?:$|[/_-])/.test(t)?{kind:"chat_completions_reasoning",requestThinking:"zai_clear_thinking",supportsToolChoice:!0}:e.provider==="deepseek"&&/(?:^|[/_-])deepseek-v(?:3\.2|[4-9](?:\.\d+)?)(?:$|[/_-])/.test(t)?{kind:"chat_completions_reasoning",requestThinking:"deepseek_enabled",supportsToolChoice:!1}:null}i(E,"chatCompletionsReasoningPolicy");function G(e){return!e.hasToolCalls||e.reasoningText.length===0||!E(e)?null:{kind:"chat_completions_reasoning",reasoningContent:e.reasoningText}}i(G,"chatCompletionsContinuation");function q(e){return e.some(t=>t.continuation?.kind==="chat_completions_reasoning"&&t.continuation.reasoningContent.length>0)}i(q,"hasChatCompletionsReasoningContinuation");var fe=["openai","xai","openrouter","deepseek","zai","moonshot","together","groq","custom-openai-compatible"],he=9e4,F=5*6e4,ge=5*1024*1024,ve=64*1024,ye="https://chatgpt.com/backend-api/codex/responses",be=6e4;function _e(e){return fe.includes(e)}i(_e,"isOpenAiCompatibleProviderId");function M(e){if(!_e(e.providerId))throw new Error(`Provider ${e.providerId} is not OpenAI-compatible.`);let t=e.settings.providers[e.providerId],o=e.settings.modelCaches[e.providerId],n=X(e.baseUrl??t?.baseUrl??"");if(!n)throw new Error(`Provider ${e.providerId} requires a base URL.`);let r=e.secrets.providers[e.providerId],s=Ce(e.providerId,r);if(!s)throw new Error(we(e.providerId,e.settings));let l=e.modelId?.trim()||t?.defaultModel?.trim()||o?.models.find(c=>c.id.trim())?.id.trim()||"";if(!l&&e.requireModel!==!1)throw new Error(`Provider ${e.providerId} requires a model.`);return{providerId:e.providerId,baseUrl:n,auth:s,model:l}}i(M,"resolveOpenAiCompatibleProvider");function Ce(e,t){if(e==="openai"&&t?.source==="chatgpt_subscription"&&t.oauth?.refreshToken)return{type:"chatgpt_subscription",credential:t.oauth};let o=t?.source==="local_secret"?t.value?.trim()??"":t?.source==="env"&&t.envVar?process.env[t.envVar]?.trim()??"":"";return o?{type:"api_key",apiKey:o}:null}i(Ce,"resolveProviderAuth");function we(e,t){let o=t.statuses[e]?.displayName?.trim()||e,n="Add an API key in Settings > Providers.";return e==="openai"?`${o} has no connected API key. The raw OpenAI provider uses Platform API credentials. ${n}`:`${o} has no connected API key. ${n}`}i(we,"missingApiKeyMessage");async function Pe(e){let t=M({...e,requireModel:!1}),o=U(e.signal,e.requestTimeoutMs);try{let n=t.auth.type==="chatgpt_subscription",r=t.auth.type==="chatgpt_subscription"?await Y({providerId:t.providerId,credential:t.auth.credential,saveChatGptSubscriptionCredential:e.saveChatGptSubscriptionCredential}):null,s=new URL(n?"https://chatgpt.com/backend-api/codex/models":W(t.baseUrl,"models"));n&&s.searchParams.set("client_version",e.subscriptionClientVersion??"0.159.1");let l=r?Z(r,void 0):Q(t.auth.type==="api_key"?t.auth.apiKey:"","application/json");l.set("Accept","application/json");let c=await fetch(s,{method:"GET",headers:l,signal:o.signal});if(!c.ok){o.touch();let a=await $(c,e.errorBodyLimitBytes,o.signal,o.touch);throw new Error(`Provider ${t.providerId} model list failed: ${c.status} ${ee(t,a)}`)}let p=await De(c,`Provider ${t.providerId} model list`,e.responseBodyLimitBytes,o.signal,o.touch),f=n?j(p):$e(t.providerId,p);if(f.length===0)throw new Error(`Provider ${t.providerId} returned no models.`);return f}finally{o.cleanup()}}i(Pe,"listOpenAiCompatibleProviderModels");async function st(e){let t=M(e),o=await Pe({...e,providerId:t.providerId,baseUrl:t.baseUrl,modelId:t.model}),n=o.some(s=>s.id===t.model),r=n?[]:[`Model ${t.model} was not returned by provider model discovery.`];return{providerId:t.providerId,ok:r.length===0,live:!0,baseUrl:t.baseUrl,modelId:t.model,modelFound:n,modelCount:o.length,errors:r}}i(st,"validateOpenAiCompatibleProvider");async function*at(e){let t=e.resolvedProvider??M(e);if(t.auth.type==="chatgpt_subscription"){let n={...t,auth:t.auth};yield*ke({...e,provider:n});return}let o=U(e.signal,e.requestTimeoutMs);try{let n=W(t.baseUrl,"chat/completions"),r=await fetch(n,{method:"POST",redirect:"error",headers:Q(t.auth.apiKey,"text/event-stream",e.allowAnonymous),body:JSON.stringify(Ae({providerId:t.providerId,model:t.model,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,reasoningEffort:e.reasoningEffort,maxOutputTokens:e.maxOutputTokens,temperature:e.temperature,topP:e.topP,seed:e.seed})),signal:o.signal});if(!r.ok||!r.body){o.touch();let a=await $(r,e.errorBodyLimitBytes,o.signal,o.touch);throw new Error(`Provider ${t.providerId} stream failed: ${r.status} ${ee(t,a)}`)}let s="",l=!1,c=null,p=null;o.touch();for await(let a of ne(r.body,o.signal,o.touch)){if(p=a,a&&typeof a=="object"&&"error"in a)throw new Error(`Provider ${t.providerId} stream failed: ${H(a)}`);let d=Ge(a);d&&(yield{type:"usage",usage:d,raw:a});for(let u of Be(a))u.type==="reasoning_delta"&&(s+=u.text),u.type==="tool_call_delta"&&(l=!0),u.type==="finish"?c=u:yield u}let f=G({provider:t.providerId,model:t.model,reasoningText:s,hasToolCalls:l});f&&(yield{type:"continuation",continuation:f,raw:p}),c&&(yield c)}finally{o.cleanup()}}i(at,"streamOpenAiCompatibleChatCompletion");async function*ke(e){let t=await Y({providerId:e.provider.providerId,credential:e.provider.auth.credential,saveChatGptSubscriptionCredential:e.saveChatGptSubscriptionCredential});if(!t.accessToken)throw new Error("OpenAI ChatGPT subscription credential has no access token.");let o=Ie(e.promptCacheKey),n=U(e.signal,e.requestTimeoutMs);try{let r=await fetch(ye,{method:"POST",headers:Z(t,o??e.requestId),body:JSON.stringify(Te({model:e.provider.model,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,reasoningEffort:e.reasoningEffort,promptCacheKey:o})),signal:n.signal});if(!r.ok||!r.body){n.touch();let a=await $(r,e.errorBodyLimitBytes,n.signal,n.touch);throw new Error(`Provider ${e.provider.providerId} subscription stream failed: ${r.status} ${a}`)}let s=new Set,l=new Map,c=!1,p=null,f=null;n.touch();for await(let a of ne(r.body,n.signal,n.touch)){if(f=a,a&&typeof a=="object"&&"error"in a)throw new Error(`Provider ${e.provider.providerId} subscription stream failed: ${H(a)}`);for(let d of xe(a)){let u=m(d.id)??JSON.stringify(d);l.set(u,d)}for(let d of Ne(a,s))d.type==="tool_call_delta"&&(c=!0),d.type==="finish"?p=d:yield d}c&&l.size>0&&(yield{type:"continuation",continuation:{kind:"responses_reasoning_items",items:[...l.values()]},raw:f}),p&&(yield p)}finally{n.cleanup()}}i(ke,"streamOpenAiSubscriptionResponses");async function Y(e){if(e.credential.accessToken&&e.credential.expiresAt>Date.now()+be)return e.credential;let t=N(await B(e.credential.refreshToken),e.credential);return await e.saveChatGptSubscriptionCredential?.(e.providerId,t),t}i(Y,"usableSubscriptionCredential");function Ae(e){let t={model:e.model,messages:Oe(Me(e.messages)),stream:!0};e.tools&&(t.tools=e.tools),e.providerId==="openai"&&e.reasoningEffort&&(t.reasoning_effort=e.reasoningEffort),e.maxOutputTokens!=null&&(t.max_tokens=e.maxOutputTokens),e.temperature!=null&&(t.temperature=e.temperature),e.topP!=null&&(t.top_p=e.topP),e.seed!=null&&(t.seed=e.seed),e.providerId==="zai"&&e.tools&&e.tools.length>0&&(t.tool_stream=!0);let o=E({provider:e.providerId,model:e.model});return e.tools&&e.tools.length>0&&o?.requestThinking==="zai_clear_thinking"&&(t.thinking={type:"enabled",clear_thinking:!q(e.messages)}),e.tools&&e.tools.length>0&&o?.requestThinking==="deepseek_enabled"&&(t.thinking={type:"enabled"}),e.toolChoice!==void 0&&o?.supportsToolChoice!==!1&&(t.tool_choice=e.toolChoice),t}i(Ae,"buildChatCompletionBody");function Oe(e){return e.map(t=>{let{continuation:o,images:n,...r}=t,s=n?.length?[...typeof t.content=="string"&&t.content.trim()?[{type:"text",text:t.content}]:[],...n.map(l=>({type:"image_url",image_url:{url:l.url,...l.detail?{detail:l.detail}:{}}}))]:t.content;return o?.kind==="chat_completions_reasoning"?{...r,...s!==void 0?{content:s}:{},reasoning_content:o.reasoningContent}:{...r,...s!==void 0?{content:s}:{}}})}i(Oe,"chatCompletionMessages");function Te(e){let t=Se(e.messages),o={model:e.model,input:t.input,stream:!0,store:!1};t.instructions&&(o.instructions=t.instructions),e.promptCacheKey&&(o.prompt_cache_key=e.promptCacheKey),o.reasoning={...e.reasoningEffort?{effort:e.reasoningEffort}:{},summary:"auto"},e.maxOutputTokens!=null&&(o.max_output_tokens=e.maxOutputTokens),e.temperature!=null&&(o.temperature=e.temperature),e.topP!=null&&(o.top_p=e.topP);let n=Re(e.tools);n.length>0&&(o.tools=n);let r=Ee(e.toolChoice);return r!==void 0&&(o.tool_choice=r),o}i(Te,"buildResponsesBody");function Ie(e){let t=e?.trim();if(t)return t.length<=64?t:J("sha256").update(t).digest("hex")}i(Ie,"normalizedPromptCacheKey");function Se(e){let t=[],o=[];for(let n of e){let r=typeof n.content=="string"?n.content:"";if(n.role==="system"){r.trim()&&t.push(r.trim());continue}if(n.role==="tool"){o.push({type:"function_call_output",call_id:n.tool_call_id,output:r});continue}n.continuation?.kind==="responses_reasoning_items"&&o.push(...n.continuation.items),(r.trim()||n.images?.length)&&o.push({type:"message",role:n.role,content:[...r.trim()?[{type:n.role==="assistant"?"output_text":"input_text",text:r}]:[],...(n.images??[]).map(s=>({type:"input_image",image_url:s.url,...s.detail?{detail:s.detail}:{}}))]});for(let s of n.tool_calls??[]){let l=s.function&&typeof s.function=="object"?s.function:{};o.push({type:"function_call",call_id:s.id,name:l.name,arguments:typeof l.arguments=="string"?l.arguments:""})}}return{instructions:t.join(`
|
|
3
3
|
|
|
4
4
|
`)||null,input:o}}i(Se,"responsesInputFromMessages");function xe(e){if(!e||typeof e!="object")return[];let t=e,o=m(t.type);if(o==="response.output_item.done"){let r=t.item&&typeof t.item=="object"?t.item:null;return r?.type==="reasoning"?[r]:[]}if(o!=="response.completed")return[];let n=t.response&&typeof t.response=="object"?t.response:null;return Array.isArray(n?.output)?n.output.filter(r=>!!r&&typeof r=="object"&&r.type==="reasoning"):[]}i(xe,"responsesReasoningItemsFromEvent");function Re(e){return(e??[]).filter(t=>t.type==="function"&&t.function?.name).map(t=>({type:"function",name:t.function.name,description:t.function.description,parameters:t.function.parameters??{}}))}i(Re,"responsesTools");function Ee(e){if(e!==void 0)return typeof e=="string"?e:{type:"function",name:e.function.name}}i(Ee,"responsesToolChoice");function Me(e){let t=[],o=[];for(let n of e){if(n.role==="system"){let r=typeof n.content=="string"?n.content.trim():"";r&&t.push(r);continue}o.push(n)}return t.length===0?e:[{role:"system",content:t.join(`
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as r}from"./chunk-FTQLQJQV.js";var n=class extends Error{constructor(o,a,e,d){super(e);this.status=o;this.code=a;this.details=d;this.name="OpenPondLearningError"}status;code;details;static{r(this,"OpenPondLearningError")}};export{n as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{i as s}from"./chunk-3WJQ4IGK.js";import{a as i}from"./chunk-GLUWATL5.js";import{a as n}from"./chunk-FTQLQJQV.js";import{stdin as a,stdout as c}from"node:process";import{createInterface as l}from"node:readline/promises";var p=`${i}/console/services/identity-access/api-keys`;function u(e){let t=process.env.OPENPOND_API_KEY?.trim();if(t)return t;let r=e.apiKey?.trim();if(r)return r;let o=e.token?.trim();return o&&o.startsWith("opk_")?o:null}n(u,"resolveApiKey");async function P(){if(!a.isTTY||!c.isTTY)throw new Error("OpenPond API key is required in non-interactive mode. Set OPENPOND_API_KEY or run `openpond login` in a terminal.");console.log("Open the OpenPond UI to create an API key:"),console.log(p);let e=l({input:a,output:c});try{let t=(await e.question("Paste your OpenPond API key: ")).trim();if(!t)throw new Error("API key is required");return t.startsWith("opk_")||console.log("warning: API keys usually start with opk_."),t}finally{e.close()}}n(P,"promptForApiKey");async function A(e,t){let r=u(e);if(r)return r;let o=await P();return await s({apiKey:o,baseUrl:t,activeProfile:e.activeProfile}),console.log("Saved account credentials to the encrypted OpenPond credential store."),o}n(A,"ensureApiKey");export{u as a,P as b,A as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{l as f,m,n as d}from"./chunk-
|
|
2
|
+
import{l as f,m,n as d}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as s}from"./chunk-FTQLQJQV.js";function h(t){let{profileGitHead:i,...n}=t.manifest.metadata,o=t.sourceFiles.map(a=>{if(a.path!=="dependency-lock/profile-import.json")return{path:a.path,asset:a.asset};let l=e.object({source:e.literal("openpond.profile"),profileId:e.string(),profileGitHead:e.string().nullable(),dependenciesResolved:e.literal(!1)}).strict().parse(JSON.parse(Buffer.from(a.bytes).toString("utf8")));if(t.manifest.metadata.importedFrom!=="openpond.profile"||l.profileId!==t.manifest.metadata.profileId||l.profileGitHead!==i)throw new Error("Generated Profile provenance differs from compiler metadata.");let p=Buffer.from(f({...l,profileGitHead:null}));return{path:a.path,asset:{...a.asset,contentHash:m(p),sizeBytes:p.byteLength}}}),r={manifest:{...t.manifest,metadata:n},assets:o};return{contentHash:d(r),protectedClosureHash:d(t.sourceFiles.filter(a=>a.asset.visibility!=="policy").map(a=>({path:a.path,asset:a.asset}))),profileGitHead:typeof t.manifest.metadata.profileGitHead=="string"?t.manifest.metadata.profileGitHead:null}}s(h,"compiledCandidateExecutableIdentity");function v(t,i,n){let o=h(t),r=h(i);if(!/^[a-f0-9]{40}$/.test(n)||r.profileGitHead!==n||o.contentHash!==r.contentHash||o.protectedClosureHash!==r.protectedClosureHash)throw new Error("The actual committed Profile differs from tested executable source or its protected evaluator closure.");return{schemaVersion:"openpond.candidateExecutableEquivalence.v1",contentHash:o.contentHash,protectedClosureHash:o.protectedClosureHash,candidateProfileGitHead:o.profileGitHead,activeProfileGitHead:r.profileGitHead}}s(v,"qualifyCommittedCandidateEquivalence");var c=e.string().regex(/^[a-f0-9]{64}$/),H=e.object({id:e.string().min(1),contentHash:c}).strict(),u=e.object({schemaVersion:e.literal("openpond.candidateProfileAdoption.v1"),id:e.string().min(1),operationId:e.string().min(1),actorId:e.string().min(1),teamId:e.string().min(1),candidateId:e.string().min(1),testedCandidateRelease:H,activeRelease:H,expectedCommit:e.string().regex(/^[a-f0-9]{40}$/),committedProfileGit:e.string().regex(/^[a-f0-9]{40}$/),equivalence:e.object({schemaVersion:e.literal("openpond.candidateExecutableEquivalence.v1"),contentHash:c,protectedClosureHash:c,candidateProfileGitHead:e.string().nullable(),activeProfileGitHead:e.string()}).strict(),createdAt:e.string().datetime(),contentHash:c}).strict();function G(t){let i=u.parse({...t,contentHash:d(t)});if(i.equivalence.activeProfileGitHead!==i.committedProfileGit)throw new Error("Adoption receipt differs from its qualified committed source.");return i}s(G,"sealCandidateProfileAdoptionReceipt");export{h as a,v as b,u as c,G as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{Wa as I,Xa as H,ga as s,jb as d,kb as r,lb as j,mb as m,rb as p}from"./chunk-WLZJOCLA.js";import{Bb as R,Eb as P,lb as L,va as S,wb as y}from"./chunk-ZY32SZ2P.js";import{n as b}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as E}from"./chunk-FTQLQJQV.js";var u=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}),N=e.object({ref:u,revision:e.string().nullable(),sourceHash:e.string()});var n=e.string().trim().min(1).max(200),o=e.string().regex(/^[a-f0-9]{64}$/),k=e.enum(["queued","running","cancelling","completed","failed","cancelled","interrupted"]),z=e.object({providerId:e.enum(["openpond","custom-openai-compatible","claude-code","codex"]),modelId:e.string().trim().min(1).max(500),configurationHash:o,maxOutputTokens:e.number().int().positive().max(262144),temperature:e.number().min(0).max(2).optional(),topP:e.number().positive().max(1).optional(),messages:e.array(e.object({role:e.enum(["system","user","assistant"]),content:e.string().max(262144)}).strict()).max(200)}).strict(),Y=e.object({configuration:m,package:s}).strict(),Z=e.object({configuration:m,expectedPackageHash:o.optional()}).strict(),ee=e.object({schemaVersion:e.literal("openpond.localExperimentDefinition.v1"),location:e.literal("local"),id:n,teamId:n,ownerActorId:n,revision:e.number().int().positive(),configuration:m,model:z,packageHash:o,graders:e.array(r).min(1).max(100),availableGraders:e.array(r).min(1).max(1e3),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),contentHash:o}).strict(),te=e.object({operationId:n,definition:d}).strict(),ne=e.object({teamId:n,id:n}).strict(),oe=e.object({teamId:n,projectId:n.optional(),status:k.optional(),datasetHash:o.optional(),search:e.string().max(100).optional(),afterId:n.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),f=e.object({schemaVersion:e.literal("openpond.localExperimentExecution.v1"),location:e.literal("local"),id:n,teamId:n,ownerActorId:n,operationId:n,definition:d,kind:e.enum(["target","scoring"]),executionHash:o,sourceExecution:e.object({id:n,executionHash:o}).strict().nullable(),packageHash:o,maximumCostUsd:e.number().finite().positive(),status:k,createdAt:e.iso.datetime(),completedAt:e.iso.datetime().nullable(),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),completed:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative(),unknown:e.number().int().nonnegative()}).strict(),usage:e.object({knownCostUsd:e.number().finite().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),heldUsd:e.number().finite().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict(),cleanupComplete:e.boolean(),error:e.string().max(2e3).nullable()}).strict(),v=f.omit({definition:!0});function g(t,i){t.kind==="scoring"!=(t.sourceExecution!==null)&&i.addIssue({code:"custom",message:"Only retained scoring passes name an original execution."}),["completed","failed","cancelled","interrupted"].includes(t.status)&&(!t.completedAt||t.counts.pending||t.counts.running)&&i.addIssue({code:"custom",message:"Terminal local execution requires complete population accounting."}),["completed","cancelled"].includes(t.status)&&!t.cleanupComplete&&i.addIssue({code:"custom",message:"Successful completion or cancellation requires confirmed local transport cleanup."}),t.usage.uncertainRequests>0&&t.usage.costUsd!==null&&i.addIssue({code:"custom",message:"Uncertain provider charges cannot claim a measured total."})}E(g,"validateLocalExecutionState");var ie=f.superRefine(g),c=v.superRefine(g),A=e.object({configuration:p,package:s}).strict(),U=e.object({configuration:p,expectedPackageHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),x=e.object({configuration:p,model:z,packageHash:e.string().regex(/^[a-f0-9]{64}$/),graders:e.array(r).min(1).max(100),availableGraders:e.array(r).min(1).max(1e3),retainedConfigurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional(),configurationHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().superRefine((t,i)=>{let{configurationHash:a,...h}=t;b(h)!==a&&i.addIssue({code:"custom",message:"Local configuration snapshot bytes changed."})}),{definition:ae,...O}=f.shape,l=e.object({...O,kind:e.literal("target"),...x.shape}).strict().superRefine((t,i)=>{let a={configuration:t.configuration,model:t.model,packageHash:t.packageHash,graders:t.graders,availableGraders:t.availableGraders,...t.retainedConfigurationHash?{retainedConfigurationHash:t.retainedConfigurationHash}:{},configurationHash:t.configurationHash};g(t,i),x.safeParse(a).success||i.addIssue({code:"custom",message:"Local Experiment configuration changed."}),(t.operationId!==t.configuration.operationId||t.teamId!==t.configuration.request.teamId||t.maximumCostUsd!==t.configuration.maximumCostUsd)&&i.addIssue({code:"custom",message:"Local Experiment differs from its sealed admission."})}),q=e.object({items:e.array(l).max(100),nextCursor:e.string().nullable()}).strict(),G=e.object({teamId:e.string().min(1).max(200),id:e.string().min(1).max(200),configurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),T=e.object({operationId:n,execution:e.object({id:n,executionHash:o}).strict(),graderPackage:s,graders:e.array(j).min(1).max(100),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),re=T.omit({graderPackage:!0}),D=L,F=e.object({sessionId:n,turnId:n,source:S,profileRef:u,admissionHash:o,modelConfigurationHash:o,traceHash:o,runtimeEventRefs:e.array(n).max(1e4),startedAt:e.iso.datetime(),completedAt:e.iso.datetime(),outputHash:o,partialOutputAvailable:e.boolean()}).strict(),w=e.object({receiptId:n,taskId:n,seed:e.string(),status:e.enum(["pending","running","completed","failed","cancelled","unknown"]),input:e.record(e.string(),e.unknown()),policyVisibleContext:e.record(e.string(),e.unknown()),output:e.string().nullable(),messages:e.array(e.unknown()).max(4002),grade:H.nullable(),error:e.string().nullable(),native:D.optional(),profileNative:F.optional(),externalProcess:I.optional()}).strict(),ce=e.object({execution:e.union([l,c]),cases:e.array(w).max(1e4),contentHash:o}).strict(),$=e.object({items:e.array(e.object({sequence:e.number().int().positive(),type:e.string().min(1),payload:e.unknown()}).strict()).max(500),nextCursor:e.number().int().positive().nullable()}).strict(),se=e.object({location:e.literal("local"),execution:e.union([l,c]),case:w,trace:$}).strict(),me=e.object({items:e.array(c).max(100),nextCursor:n.nullable()}).strict(),pe=e.object({execution:c,graders:e.array(r).min(1).max(100),graderPackageHash:o}).strict(),C=e.object({execution:c,manifest:y,result:R}).strict().superRefine((t,i)=>{try{if(P(t),t.manifest.id!==t.execution.id||t.manifest.teamId!==t.execution.teamId||t.manifest.lineage?.execution.id!==(t.execution.sourceExecution?.id??t.execution.id)||t.manifest.lineage.execution.contentHash!==(t.execution.sourceExecution?.executionHash??t.execution.executionHash)||t.manifest.lineage.scoringPassId!==(t.execution.kind==="scoring"?t.execution.id:null)||t.manifest.maximumCostUsd!==t.execution.maximumCostUsd)throw new Error("Portable evidence differs from its retained local execution.")}catch(a){i.addIssue({code:"custom",message:a instanceof Error?a.message:"Local portable evidence verification failed."})}}),le=e.object({location:e.literal("local"),baseline:C,candidate:C}).strict();export{u as a,l as b,ce as c,le as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as f}from"./chunk-
|
|
2
|
+
import{b as f}from"./chunk-GDJ4X2ZN.js";import{Z as c}from"./chunk-6I5AUTVO.js";import{C as w,D as I,z as g}from"./chunk-MVPKU72J.js";import{b as m}from"./chunk-FYWQWKVS.js";import{f as R}from"./chunk-ZY32SZ2P.js";import{A as r}from"./chunk-X2J2P5ZT.js";import{a as d}from"./chunk-FTQLQJQV.js";import n from"node:path";import{readFile as y}from"node:fs/promises";var A=r.object({profileId:r.string().min(1),sourceRevision:r.string().min(1),repositoryId:r.string().min(1),harnessRelease:r.object({id:r.string().min(1),contentHash:r.string().regex(/^[a-f0-9]{64}$/)}).strict(),hostExecution:r.object({conversationId:r.string().min(1),turnId:r.string().min(1)}).strict().optional(),workspaceId:r.string().min(1),assetsPath:r.string().min(1).refine(n.isAbsolute)}).strict();async function _(p,e){let t=A.parse(e),s=await f(p,t.harnessRelease);if(!s||n.resolve(s.release.bundlePath)!==n.resolve(t.assetsPath))throw new Error("Hosted Profile release changed after admission.");let o=s.release.harnessRelease.metadata.profile;if(!o||typeof o!="object"||o.id!==t.profileId||o.sourceRevision!==t.sourceRevision||o.repositoryId!==void 0&&o.repositoryId!==t.repositoryId)throw new Error("Hosted Profile provenance differs from admitted release.");return{profile:I(),profileLibrary:w()}}d(_,"loadHostedProfileStateAndLibrary");async function B(p,e){let t=A.parse(e),s=await f(p,t.harnessRelease);if(!s||n.resolve(s.release.bundlePath)!==n.resolve(t.assetsPath))throw new Error("Hosted Profile workflow release is unavailable.");let o=s.release.harnessRelease.metadata.profile;if(o?.id!==t.profileId||o.sourceRevision!==t.sourceRevision||o.repositoryId!==void 0&&o.repositoryId!==t.repositoryId)throw new Error("Hosted Profile workflow provenance changed.");let a=t.harnessRelease,l={source:"openpond_git",repositoryId:t.repositoryId,profileId:t.profileId};if(!s.release.harnessRelease.files.some(u=>u.path==="workflows/catalog.json"))return{profileRef:l,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:[]};let i=n.join(s.release.bundlePath,"source","workflows"),v=R({agentSnapshot:s.release.agentSnapshot,harnessRelease:s.release.harnessRelease,catalogBytes:await y(n.join(i,"catalog.json")),actionBytes:await y(n.join(i,"actions.json"))});return{profileRef:l,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:v.catalog.workflows.map(u=>({workflow:u,binding:{schemaVersion:"openpond.profileWorkflowBinding.v1",profileId:t.profileId,sourceRevision:t.sourceRevision,harnessRelease:a,catalogHash:v.catalogHash,workflowId:u.id}}))}}d(B,"listHostedProfileWorkflows");import{createHash as U,randomUUID as h}from"node:crypto";var b=r.object({approval:g,revision:r.number().int().positive()}).strict(),P=r.object({record:m}).strict(),x=r.object({startedAt:r.string().min(1),requestOrdinal:r.number().int().nonnegative(),id:r.string().min(1)}).strict(),k=r.object({records:r.array(m).max(200),nextBefore:x.nullable()}).strict(),H=1e4,S=class{constructor(e){this.client=e}client;static{d(this,"HostedApprovalStorage")}async readApproval(e){let t=await this.client.request({contractVersion:c,requestId:h(),operation:"approval/get",params:{approvalId:e}});return t===null?null:b.parse(t)}async getApproval(e){return(await this.readApproval(e))?.approval??null}async putApproval(e){let t=g.parse(e.approval);if(!e.requestId.trim())throw new Error("Approval mutation requires a stable request ID.");return b.parse(await this.client.request({contractVersion:c,requestId:e.requestId,operation:"approval/upsert",params:{approval:t,expectedRevision:e.expectedRevision}}))}},M=class{constructor(e){this.client=e}client;static{d(this,"HostedModelUsageStorage")}async upsertModelUsageRecord(e){let t=m.parse(e),s=U("sha256").update(JSON.stringify(t)).digest("hex"),o=await this.client.request({contractVersion:c,requestId:`usage:${s}`,operation:"usage/upsert",params:{record:t}}),a=P.parse(o).record;if(a.requestId!==t.requestId)throw new Error("Host usage upsert changed request identity.");return a}async getModelUsageRecordByRequestId(e){let t=await this.client.request({contractVersion:c,requestId:h(),operation:"usage/getByRequestId",params:{requestId:e}});return t===null?null:P.parse(t).record}async listModelUsageRecords(e={}){let t=e.limit===void 0||e.limit>=H,s=e.limit===void 0?H:Math.max(1,Math.min(1e4,Math.trunc(e.limit))),o={...e.sessionId?{sessionId:e.sessionId}:{},...e.turnId?{turnId:e.turnId}:{},...e.provider?{provider:e.provider}:{},...e.model?{model:e.model}:{},...e.startedAtFrom?{startedAtFrom:e.startedAtFrom}:{},...e.startedAtTo?{startedAtTo:e.startedAtTo}:{},...e.visibility&&e.visibility!=="all"?{visibility:e.visibility}:{},...e.status&&e.status!=="all"?{status:e.status}:{}},a=[],l=null;for(;a.length<s+(t?1:0);){let i=k.parse(await this.client.request({contractVersion:c,requestId:h(),operation:"usage/page",params:{query:o,before:l,limit:Math.min(200,s+(t?1:0)-a.length)}}));if(a.push(...i.records),a.length>s)throw new Error(`Hosted usage query exceeds ${s} rows; narrow its filters or use a streamed aggregation.`);if(i.nextBefore===null)break;if(i.records.length===0||JSON.stringify(i.nextBefore)===JSON.stringify(l))throw new Error("Host usage cursor did not advance.");l=i.nextBefore}return a}async listModelUsageRecordsComplete(e={}){return this.listModelUsageRecords(e)}};export{A as a,_ as b,B as c,S as d,M as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as x}from"./chunk-TPOAAJKA.js";import{m as w}from"./chunk-ZU3YBRXS.js";import{j as u}from"./chunk-7PKTCMZ6.js";import{ja as f}from"./chunk-WLZJOCLA.js";import{i as h,oa as m,pa as p}from"./chunk-ZY32SZ2P.js";import{n as s}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as c}from"./chunk-FTQLQJQV.js";import g from"node:path";import{lstat as k,readFile as v,realpath as b}from"node:fs/promises";import{randomUUID as D}from"node:crypto";var y=e.object({id:e.string(),version:e.string(),contentHash:e.string().regex(/^[a-f0-9]{64}$/),feedbackKey:e.string(),release:e.object({id:e.string(),revision:e.union([e.string(),e.number()]),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().nullable()}).strict(),H=e.object({binding:m,packageValue:e.unknown(),graders:e.array(y).max(100),actualGrading:e.object({pass:e.unknown(),evidence:e.unknown()}).strict().optional(),sourceCandidate:h.optional()}).strict();async function q(i,o){let n=await b(o),a=g.resolve(i);if(g.dirname(a)!==n||await b(a)!==a)throw new Error("External Dataset package escaped its private owner home.");let l=await k(a);if(!l.isFile()||l.isSymbolicLink()||l.size>32*1024*1024)throw new Error("External Dataset package is not a bounded regular file.");let r=H.parse(JSON.parse(new TextDecoder("utf8",{fatal:!0}).decode(await v(a))));return r.binding=p(r.binding),r.packageValue=u({...r,packageValue:f(r.packageValue)}),r}c(q,"readHostProfileExternalDataset");async function A(i){let o=H.parse(i.value),n=p(o.binding),a=i.release,l={id:a.harnessRelease.id,contentHash:a.harnessRelease.contentHash};if(n.protectedProfileClosureHash!==s(a.harnessRelease.files.filter(t=>t.visibility!=="policy").map(t=>({path:t.path,asset:t}))))throw new Error("The external Dataset protected Profile closure changed.");if(o.sourceCandidate){let t=await w({workspaceId:typeof a.agentSnapshot.metadata.workspaceId=="string"?a.agentSnapshot.metadata.workspaceId:a.workspaceId,sourceDir:g.join(a.bundlePath,"source")});if(s(o.sourceCandidate.harnessRelease)!==s(l)||x(t).protectedClosureHash!==o.sourceCandidate.protectedClosureHash)throw new Error("The external Dataset candidate differs from its retained frozen compiled source.")}let r=c(async t=>{if(e.object({authorized:e.literal(!0),bindingHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(await i.client.request({contractVersion:1,requestId:D(),operation:"profile.externalDataset.authorize",params:{...t,bindingHash:n.contentHash}})).bindingHash!==n.contentHash)throw new Error("The host authorized another external Dataset binding.")},"authorize");return{authorize:r,resolveExternalDataset:c(async(t,d)=>{if(await r(),s(t)!==s(n)||d.profileRef.profileId!==n.profileId||d.sourceRevision!==i.sourceRevision||s(d.harnessRelease)!==s(l))throw new Error("External Dataset requested another actual Profile source or recipe.");let E=u({...o,binding:t,packageValue:f(o.packageValue)});return{binding:n,packageValue:E,authorize:r}},"resolveExternalDataset"),sourceCandidate:o.sourceCandidate}}c(A,"createHostProfileExternalDataset");export{q as a,A as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{P as k,Q as E,_ as S}from"./chunk-2EPR4HLF.js";import{f as B}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import T from"node:path";var P="default",H=["apiKey","baseUrl","apiBaseUrl","chatApiBaseUrl","token","appId","conversationId"];function y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}l(y,"hasOwn");function m(t){if(typeof t!="string")return null;let e=t.trim();return e.length>0?e:null}l(m,"normalizeHandle");function d(t){if(typeof t!="string")return null;let e=t.trim();return e?e.replace(/\/$/,""):null}l(d,"normalizeBaseUrl");function N(t){let e=m(t);if(!e)throw new Error("profile handle must be non-empty");return e}l(N,"requireHandle");function $(t){if(typeof t!="string")throw new Error("apiKey must be a non-empty string");let e=t.trim();if(!e)throw new Error("apiKey must be a non-empty string");return e}l($,"requireApiKey");function b(t,e){let n=m(t),s=m(e);return!!(n&&s&&n.toLowerCase()===s.toLowerCase())}l(b,"handleEquals");function R(t,e,n){let s=d(n);return t.findIndex(r=>b(r.handle,e)?s?d(r.baseUrl)===s:!0:!1)}l(R,"findAccountIndex");function U(t){let e=m(t.handle)??P,n=d(t.baseUrl);return n?{handle:e,baseUrl:n}:{handle:e}}l(U,"selectorFromAccount");function A(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=m(typeof e.handle=="string"?e.handle:void 0);if(!n)return null;let s=d(typeof e.baseUrl=="string"?e.baseUrl:void 0);return s?{handle:n,baseUrl:s}:{handle:n}}l(A,"sanitizeActiveProfile");function x(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e=t,n=typeof e.repoPath=="string"?e.repoPath.trim():"",s=typeof e.profile=="string"&&e.profile.trim()?e.profile.trim():"default";if(!n)return;let r={repoPath:n,profile:s,mode:"local"};if(e.lastCheck&&typeof e.lastCheck=="object"&&!Array.isArray(e.lastCheck)){let o=e.lastCheck,a=o.command,c=o.status,f=o.checkedAt;(a==="inspect"||a==="build"||a==="validate"||a==="eval"||a==="run")&&(c==="passed"||c==="failed")&&typeof f=="string"&&(r.lastCheck={command:a,status:c,checkedAt:f,...typeof o.exitCode=="number"||o.exitCode===null?{exitCode:o.exitCode}:{},...typeof o.sourceHead=="string"||o.sourceHead===null?{sourceHead:o.sourceHead}:{}})}if(e.lastPush&&typeof e.lastPush=="object"&&!Array.isArray(e.lastPush)){let o=e.lastPush,a=o.status,c=o.pushedAt;(a==="pushed"||a==="failed")&&typeof c=="string"&&(r.lastPush={status:a,pushedAt:c,...typeof o.teamId=="string"||o.teamId===null?{teamId:o.teamId}:{},...typeof o.projectId=="string"||o.projectId===null?{projectId:o.projectId}:{},...typeof o.localHead=="string"||o.localHead===null?{localHead:o.localHead}:{},...typeof o.hostedHead=="string"||o.hostedHead===null?{hostedHead:o.hostedHead}:{},...typeof o.sourceRef=="string"||o.sourceRef===null?{sourceRef:o.sourceRef}:{},...o.promotionStatus==="uploaded"||o.promotionStatus==="hosted_source_materialized"||o.promotionStatus==="hosted_source_materialize_failed"||o.promotionStatus==="hosted_source_check_pending"||o.promotionStatus==="hosted_source_check_failed"||o.promotionStatus==="hosted_source_published"||o.promotionStatus==="hosted_source_publish_failed"||o.promotionStatus==="hosted_run_pending"||o.promotionStatus==="hosted_run_passed"||o.promotionStatus==="hosted_run_failed"||o.promotionStatus===null?{promotionStatus:o.promotionStatus}:{},...o.hostedRunStatus==="not_started"||o.hostedRunStatus==="running"||o.hostedRunStatus==="passed"||o.hostedRunStatus==="failed"||o.hostedRunStatus===null?{hostedRunStatus:o.hostedRunStatus}:{},...typeof o.hostedRunAgentId=="string"||o.hostedRunAgentId===null?{hostedRunAgentId:o.hostedRunAgentId}:{},...typeof o.hostedRunId=="string"||o.hostedRunId===null?{hostedRunId:o.hostedRunId}:{},...typeof o.hostedRunAt=="string"||o.hostedRunAt===null?{hostedRunAt:o.hostedRunAt}:{},...z(o.hostedSourceMaterialization)?{hostedSourceMaterialization:z(o.hostedSourceMaterialization)}:{},...K(o.hostedSourceCheck)?{hostedSourceCheck:K(o.hostedSourceCheck)}:{},...j(o.hostedPublish)?{hostedPublish:j(o.hostedPublish)}:{},...M(o.hostedRun)?{hostedRun:M(o.hostedRun)}:{},...typeof o.error=="string"||o.error===null?{error:o.error}:{}})}if(Array.isArray(e.profiles)){let o=e.profiles.flatMap(a=>{let c=x(a);if(!c)return[];let f=a,p=f.source==="github"||f.source==="openpond_git"?f.source:"local",g=typeof f.repositoryId=="string"&&f.repositoryId.trim()?f.repositoryId.trim():T.resolve(c.repoPath);return[{source:p,repositoryId:g,repoPath:c.repoPath,profile:c.profile,...c.lastCheck?{lastCheck:c.lastCheck}:{},...c.lastPush?{lastPush:c.lastPush}:{}}]});o.length>0&&(r.profiles=o)}return r}l(x,"sanitizeLocalOpenPondProfile");function z(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"runtimeAgentId"),...i(e,"projectId"),...i(e,"sourceRoot"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...i(e,"manifestSyncedAt"),...O(e,"fileCount"),...O(e,"totalBytes"),...i(e,"generatedManifestPath"),...C(e,"synthesizedOpenPondYaml"),...i(e,"uploadMetadataPath"),...u(e,"setupCommands"),...u(e,"validationCommands"),...i(e,"materializedAt"),...i(e,"error")}:null}l(z,"sanitizeHostedMaterializationStatus");function K(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"deployPlanStatus"),...C(e,"canRun"),...C(e,"canDeploy"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...u(e,"setupCommands"),...u(e,"validationCommands"),...u(e,"requiredChecks"),...u(e,"evalNames"),...u(e,"blockedReasons"),...u(e,"staleReasons"),...i(e,"runtimeId"),...i(e,"sandboxId"),...u(e,"traceArtifactRefs"),...u(e,"evalResultArtifactRefs"),...u(e,"validatorArtifactRefs"),...i(e,"checkedAt"),...i(e,"error")}:null}l(K,"sanitizeHostedSourceCheckStatus");function j(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"snapshotId"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...i(e,"buildStatus"),...i(e,"validationStatus"),...i(e,"evalStatus"),...i(e,"publishedAt"),...i(e,"error")}:null}l(j,"sanitizeHostedPublishStatus");function M(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"runId"),...i(e,"runtimeId"),...i(e,"sandboxId"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"setupGateStatus"),...u(e,"setupRequirementRefs"),...u(e,"artifactRefs"),...u(e,"traceArtifactRefs"),...u(e,"evalArtifactRefs"),...i(e,"startedAt"),...i(e,"completedAt"),...i(e,"error")}:null}l(M,"sanitizeHostedRunSummary");function i(t,e){let n=t[e];return typeof n=="string"||n===null?{[e]:n}:{}}l(i,"nullableStringProp");function C(t,e){let n=t[e];return typeof n=="boolean"||n===null?{[e]:n}:{}}l(C,"nullableBooleanProp");function O(t,e){let n=t[e];return typeof n=="number"||n===null?{[e]:n}:{}}l(O,"nullableNumberProp");function u(t,e){let n=t[e];if(!Array.isArray(n))return{};let s=n.filter(r=>typeof r=="string");return{[e]:s}}l(u,"stringArrayProp");function I(t){return typeof t=="string"&&t.trim()?t.trim():null}l(I,"stringField");function D(t,e){if(!b(t.handle,e.handle))return!1;let n=d(e.baseUrl);return n?d(t.baseUrl)===n:!d(t.baseUrl)}l(D,"accountMatchesSelector");function v(t,e,n={}){let s=d(e.baseUrl);if(s)return R(t,e.handle,s);let r=t.findIndex(a=>D(a,e));if(r!==-1)return r;let o=t.map((a,c)=>({account:a,index:c})).filter(({account:a})=>b(a.handle,e.handle));if(o.length>1&&n.requireUnambiguous)throw new Error(`multiple profiles found for ${e.handle}; pass --base-url to select one`);return o[0]?.index??-1}l(v,"findAccountIndexForSelector");function F(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e=t,n={};return typeof e.token=="string"&&(n.token=e.token),(typeof e.appId=="string"||e.appId===null)&&(n.appId=e.appId),(typeof e.conversationId=="string"||e.conversationId===null)&&(n.conversationId=e.conversationId),Object.keys(n).length>0?n:void 0}l(F,"sanitizeSession");function Y(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=m(typeof e.handle=="string"?e.handle:void 0);if(!n)return null;let s={handle:n};typeof e.apiKey=="string"&&(s.apiKey=e.apiKey),typeof e.baseUrl=="string"&&(s.baseUrl=e.baseUrl),typeof e.apiBaseUrl=="string"&&(s.apiBaseUrl=e.apiBaseUrl),typeof e.chatApiBaseUrl=="string"&&(s.chatApiBaseUrl=e.chatApiBaseUrl),typeof e.environment=="string"&&(s.environment=e.environment);let r=F(e.session);return r&&(s.session=r),s}l(Y,"sanitizeAccount");function J(t){let e={};return typeof t.token=="string"&&(e.token=t.token),(typeof t.appId=="string"||t.appId===null)&&(e.appId=t.appId),(typeof t.conversationId=="string"||t.conversationId===null)&&(e.conversationId=t.conversationId),Object.keys(e).length>0?e:void 0}l(J,"extractLegacySession");function Q(t,e){let n={handle:e};typeof t.apiKey=="string"&&(n.apiKey=t.apiKey),typeof t.baseUrl=="string"&&(n.baseUrl=t.baseUrl),typeof t.apiBaseUrl=="string"&&(n.apiBaseUrl=t.apiBaseUrl),typeof t.chatApiBaseUrl=="string"&&(n.chatApiBaseUrl=t.chatApiBaseUrl);let s=J(t);return s&&(n.session=s),n}l(Q,"extractLegacyAccount");function L(t){let e={};typeof t.lspEnabled=="boolean"&&(e.lspEnabled=t.lspEnabled),(t.executionMode==="local"||t.executionMode==="hosted")&&(e.executionMode=t.executionMode),(t.mode==="general"||t.mode==="builder")&&(e.mode=t.mode);let n=x(t.openpondProfile);n&&(e.openpondProfile=n);let s=[],r=Array.isArray(t.accounts)?t.accounts:[];for(let f of r){let p=Y(f);p&&R(s,p.handle,p.baseUrl)===-1&&s.push(p)}if(s.length===0){let f=A(t.activeProfile)?.handle||P;s.push(Q(t,f))}let o=A(t.activeProfile),a=o?v(s,o):-1,c=s[a===-1?0:a];return e.accounts=s,e.activeProfile=U(c),e}l(L,"normalizeGlobalConfig");function V(t,e,n){let s=t.accounts??[],r=d(n??process.env.OPENPOND_BASE_URL),o=m(e);if(o)return r?{handle:o,baseUrl:r}:{handle:o};let a=m(process.env.OPENPOND_ACCOUNT);if(a)return r?{handle:a,baseUrl:r}:{handle:a};let c=A(t.activeProfile);return c?r?{handle:c.handle,baseUrl:r}:c:s[0]?U(s[0]):{handle:P}}l(V,"resolveRequestedProfile");function w(t,e,n){let s=d(n);if(s){let o=R(t,e,s);if(o!==-1)return t[o]}else{let o=t.filter(a=>b(a.handle,e));if(o.length>1)throw new Error(`multiple profiles found for ${e}; pass --base-url to select one`);if(o.length===1)return o[0]}let r={handle:e};return s&&(r.baseUrl=s),t.push(r),r}l(w,"ensureAccount");function q(t){t.session&&Object.keys(t.session).length===0&&delete t.session}l(q,"cleanupAccount");function W(t,e,n,s){let r=n===null||n===void 0&&s.undefinedDeletes;switch(e){case"apiKey":{if(r){delete t.apiKey;return}typeof n=="string"&&(t.apiKey=n);return}case"baseUrl":{if(r){delete t.baseUrl;return}typeof n=="string"&&(t.baseUrl=n);return}case"apiBaseUrl":{if(r){delete t.apiBaseUrl;return}typeof n=="string"&&(t.apiBaseUrl=n);return}case"chatApiBaseUrl":{if(r){delete t.chatApiBaseUrl;return}typeof n=="string"&&(t.chatApiBaseUrl=n);return}case"token":case"appId":case"conversationId":{if(t.session||(t.session={}),r){delete t.session[e],q(t);return}(typeof n=="string"||n===null)&&(t.session[e]=n),q(t);return}}}l(W,"applyScopedKey");function X(t,e,n){if(!H.some(f=>y(e,f)))return!1;let r=t.accounts??[],o=A(e.activeProfile)??V(t),a=d(y(e,"baseUrl")?e.baseUrl??null:o.baseUrl??process.env.OPENPOND_BASE_URL),c=w(r,o.handle,a);for(let f of H)y(e,f)&&W(c,f,e[f],n);return t.accounts=r,t.activeProfile=U(c),!0}l(X,"applyAccountPatch");function Z(t,e){if(y(e,"lspEnabled")&&(typeof e.lspEnabled=="boolean"?t.lspEnabled=e.lspEnabled:e.lspEnabled===null&&delete t.lspEnabled),y(e,"executionMode")&&(e.executionMode==="local"||e.executionMode==="hosted"?t.executionMode=e.executionMode:e.executionMode===null&&delete t.executionMode),y(e,"mode")&&(e.mode==="general"||e.mode==="builder"?t.mode=e.mode:e.mode===null&&delete t.mode),y(e,"activeProfile")){let n=A(e.activeProfile);if(n){let s=v(t.accounts??[],n);t.activeProfile=s===-1?n:U((t.accounts??[])[s])}else e.activeProfile===null&&delete t.activeProfile}if(y(e,"openpondProfile")){let n=x(e.openpondProfile);n?t.openpondProfile=n:e.openpondProfile===null&&delete t.openpondProfile}}l(Z,"applyTopLevelPatch");async function _(t){let e=B();return await S(e),await E(e,n=>{let s=L(n);return t(s),s})}l(_,"updateGlobalConfig");async function ee(){let t=B();return await S(t),L(await k(t))}l(ee,"loadGlobalConfig");async function G(){let t=await ee(),e=A(t.activeProfile);return(t.accounts??[]).map(n=>{let s=m(n.handle)??P;return{handle:s,baseUrl:d(n.baseUrl),apiBaseUrl:d(n.apiBaseUrl),chatApiBaseUrl:d(n.chatApiBaseUrl),environment:n.environment?.trim()||null,isActive:!!(e&&D({...n,handle:s},e)),hasApiKey:!!n.apiKey?.trim(),hasSessionToken:!!n.session?.token?.trim(),sessionAppId:n.session?.appId??null,sessionConversationId:n.session?.conversationId??null}})}l(G,"listConfiguredProfiles");async function se(t,e={}){let n=N(t),s=d(e.baseUrl),r=-1;await _(a=>{let c=a.accounts??[];if(r=v(c,s?{handle:n,baseUrl:s}:{handle:n},{requireUnambiguous:!0}),r===-1)throw new Error(`profile not found: ${n}`);a.activeProfile=U(c[r])});let o=await G();return o.find(a=>a.isActive)??o[r]}l(se,"setActiveProfile");async function re(t){let e=N(t.handle),n=$(t.apiKey),s=d(t.baseUrl),r=d(t.apiBaseUrl),o=d(t.chatApiBaseUrl),a={handle:e};await _(p=>{let g=p.accounts??[],h=w(g,e,s);h.apiKey=n,s&&(h.baseUrl=s),r?h.apiBaseUrl=r:t.apiBaseUrl===null&&delete h.apiBaseUrl,o?h.chatApiBaseUrl=o:t.chatApiBaseUrl===null&&delete h.chatApiBaseUrl,t.environment===null?delete h.environment:typeof t.environment=="string"&&t.environment.trim()&&(h.environment=t.environment.trim()),p.accounts=g,a=U(h),t.setActive!==!1&&(p.activeProfile=a)});let f=(await G()).find(p=>b(p.handle,a.handle)?s?d(p.baseUrl)===s:!0:!1);if(!f)throw new Error(`failed to save profile: ${e}`);return f}l(re,"saveProfileApiKey");async function ie(t){await _(e=>{Z(e,t),X(e,t,{undefinedDeletes:!1})})}l(ie,"saveGlobalConfig");export{_ as a,ee as b,G as c,se as d,re as e,ie as f};
|
|
2
|
+
import{P as k,Q as E,_ as S}from"./chunk-SH7POUVX.js";import{f as B}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import T from"node:path";var P="default",H=["apiKey","baseUrl","apiBaseUrl","chatApiBaseUrl","token","appId","conversationId"];function y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}l(y,"hasOwn");function m(t){if(typeof t!="string")return null;let e=t.trim();return e.length>0?e:null}l(m,"normalizeHandle");function d(t){if(typeof t!="string")return null;let e=t.trim();return e?e.replace(/\/$/,""):null}l(d,"normalizeBaseUrl");function N(t){let e=m(t);if(!e)throw new Error("profile handle must be non-empty");return e}l(N,"requireHandle");function $(t){if(typeof t!="string")throw new Error("apiKey must be a non-empty string");let e=t.trim();if(!e)throw new Error("apiKey must be a non-empty string");return e}l($,"requireApiKey");function b(t,e){let n=m(t),s=m(e);return!!(n&&s&&n.toLowerCase()===s.toLowerCase())}l(b,"handleEquals");function R(t,e,n){let s=d(n);return t.findIndex(r=>b(r.handle,e)?s?d(r.baseUrl)===s:!0:!1)}l(R,"findAccountIndex");function U(t){let e=m(t.handle)??P,n=d(t.baseUrl);return n?{handle:e,baseUrl:n}:{handle:e}}l(U,"selectorFromAccount");function A(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=m(typeof e.handle=="string"?e.handle:void 0);if(!n)return null;let s=d(typeof e.baseUrl=="string"?e.baseUrl:void 0);return s?{handle:n,baseUrl:s}:{handle:n}}l(A,"sanitizeActiveProfile");function x(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e=t,n=typeof e.repoPath=="string"?e.repoPath.trim():"",s=typeof e.profile=="string"&&e.profile.trim()?e.profile.trim():"default";if(!n)return;let r={repoPath:n,profile:s,mode:"local"};if(e.lastCheck&&typeof e.lastCheck=="object"&&!Array.isArray(e.lastCheck)){let o=e.lastCheck,a=o.command,c=o.status,f=o.checkedAt;(a==="inspect"||a==="build"||a==="validate"||a==="eval"||a==="run")&&(c==="passed"||c==="failed")&&typeof f=="string"&&(r.lastCheck={command:a,status:c,checkedAt:f,...typeof o.exitCode=="number"||o.exitCode===null?{exitCode:o.exitCode}:{},...typeof o.sourceHead=="string"||o.sourceHead===null?{sourceHead:o.sourceHead}:{}})}if(e.lastPush&&typeof e.lastPush=="object"&&!Array.isArray(e.lastPush)){let o=e.lastPush,a=o.status,c=o.pushedAt;(a==="pushed"||a==="failed")&&typeof c=="string"&&(r.lastPush={status:a,pushedAt:c,...typeof o.teamId=="string"||o.teamId===null?{teamId:o.teamId}:{},...typeof o.projectId=="string"||o.projectId===null?{projectId:o.projectId}:{},...typeof o.localHead=="string"||o.localHead===null?{localHead:o.localHead}:{},...typeof o.hostedHead=="string"||o.hostedHead===null?{hostedHead:o.hostedHead}:{},...typeof o.sourceRef=="string"||o.sourceRef===null?{sourceRef:o.sourceRef}:{},...o.promotionStatus==="uploaded"||o.promotionStatus==="hosted_source_materialized"||o.promotionStatus==="hosted_source_materialize_failed"||o.promotionStatus==="hosted_source_check_pending"||o.promotionStatus==="hosted_source_check_failed"||o.promotionStatus==="hosted_source_published"||o.promotionStatus==="hosted_source_publish_failed"||o.promotionStatus==="hosted_run_pending"||o.promotionStatus==="hosted_run_passed"||o.promotionStatus==="hosted_run_failed"||o.promotionStatus===null?{promotionStatus:o.promotionStatus}:{},...o.hostedRunStatus==="not_started"||o.hostedRunStatus==="running"||o.hostedRunStatus==="passed"||o.hostedRunStatus==="failed"||o.hostedRunStatus===null?{hostedRunStatus:o.hostedRunStatus}:{},...typeof o.hostedRunAgentId=="string"||o.hostedRunAgentId===null?{hostedRunAgentId:o.hostedRunAgentId}:{},...typeof o.hostedRunId=="string"||o.hostedRunId===null?{hostedRunId:o.hostedRunId}:{},...typeof o.hostedRunAt=="string"||o.hostedRunAt===null?{hostedRunAt:o.hostedRunAt}:{},...z(o.hostedSourceMaterialization)?{hostedSourceMaterialization:z(o.hostedSourceMaterialization)}:{},...K(o.hostedSourceCheck)?{hostedSourceCheck:K(o.hostedSourceCheck)}:{},...j(o.hostedPublish)?{hostedPublish:j(o.hostedPublish)}:{},...M(o.hostedRun)?{hostedRun:M(o.hostedRun)}:{},...typeof o.error=="string"||o.error===null?{error:o.error}:{}})}if(Array.isArray(e.profiles)){let o=e.profiles.flatMap(a=>{let c=x(a);if(!c)return[];let f=a,p=f.source==="github"||f.source==="openpond_git"?f.source:"local",g=typeof f.repositoryId=="string"&&f.repositoryId.trim()?f.repositoryId.trim():T.resolve(c.repoPath);return[{source:p,repositoryId:g,repoPath:c.repoPath,profile:c.profile,...c.lastCheck?{lastCheck:c.lastCheck}:{},...c.lastPush?{lastPush:c.lastPush}:{}}]});o.length>0&&(r.profiles=o)}return r}l(x,"sanitizeLocalOpenPondProfile");function z(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"runtimeAgentId"),...i(e,"projectId"),...i(e,"sourceRoot"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...i(e,"manifestSyncedAt"),...O(e,"fileCount"),...O(e,"totalBytes"),...i(e,"generatedManifestPath"),...C(e,"synthesizedOpenPondYaml"),...i(e,"uploadMetadataPath"),...u(e,"setupCommands"),...u(e,"validationCommands"),...i(e,"materializedAt"),...i(e,"error")}:null}l(z,"sanitizeHostedMaterializationStatus");function K(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"deployPlanStatus"),...C(e,"canRun"),...C(e,"canDeploy"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...u(e,"setupCommands"),...u(e,"validationCommands"),...u(e,"requiredChecks"),...u(e,"evalNames"),...u(e,"blockedReasons"),...u(e,"staleReasons"),...i(e,"runtimeId"),...i(e,"sandboxId"),...u(e,"traceArtifactRefs"),...u(e,"evalResultArtifactRefs"),...u(e,"validatorArtifactRefs"),...i(e,"checkedAt"),...i(e,"error")}:null}l(K,"sanitizeHostedSourceCheckStatus");function j(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"snapshotId"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"manifestPath"),...i(e,"buildStatus"),...i(e,"validationStatus"),...i(e,"evalStatus"),...i(e,"publishedAt"),...i(e,"error")}:null}l(j,"sanitizeHostedPublishStatus");function M(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=I(e.status);return n?{status:n,...i(e,"agentId"),...i(e,"runId"),...i(e,"runtimeId"),...i(e,"sandboxId"),...i(e,"sourceRef"),...i(e,"sourceCommitSha"),...i(e,"manifestHash"),...i(e,"setupGateStatus"),...u(e,"setupRequirementRefs"),...u(e,"artifactRefs"),...u(e,"traceArtifactRefs"),...u(e,"evalArtifactRefs"),...i(e,"startedAt"),...i(e,"completedAt"),...i(e,"error")}:null}l(M,"sanitizeHostedRunSummary");function i(t,e){let n=t[e];return typeof n=="string"||n===null?{[e]:n}:{}}l(i,"nullableStringProp");function C(t,e){let n=t[e];return typeof n=="boolean"||n===null?{[e]:n}:{}}l(C,"nullableBooleanProp");function O(t,e){let n=t[e];return typeof n=="number"||n===null?{[e]:n}:{}}l(O,"nullableNumberProp");function u(t,e){let n=t[e];if(!Array.isArray(n))return{};let s=n.filter(r=>typeof r=="string");return{[e]:s}}l(u,"stringArrayProp");function I(t){return typeof t=="string"&&t.trim()?t.trim():null}l(I,"stringField");function D(t,e){if(!b(t.handle,e.handle))return!1;let n=d(e.baseUrl);return n?d(t.baseUrl)===n:!d(t.baseUrl)}l(D,"accountMatchesSelector");function v(t,e,n={}){let s=d(e.baseUrl);if(s)return R(t,e.handle,s);let r=t.findIndex(a=>D(a,e));if(r!==-1)return r;let o=t.map((a,c)=>({account:a,index:c})).filter(({account:a})=>b(a.handle,e.handle));if(o.length>1&&n.requireUnambiguous)throw new Error(`multiple profiles found for ${e.handle}; pass --base-url to select one`);return o[0]?.index??-1}l(v,"findAccountIndexForSelector");function F(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e=t,n={};return typeof e.token=="string"&&(n.token=e.token),(typeof e.appId=="string"||e.appId===null)&&(n.appId=e.appId),(typeof e.conversationId=="string"||e.conversationId===null)&&(n.conversationId=e.conversationId),Object.keys(n).length>0?n:void 0}l(F,"sanitizeSession");function Y(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=m(typeof e.handle=="string"?e.handle:void 0);if(!n)return null;let s={handle:n};typeof e.apiKey=="string"&&(s.apiKey=e.apiKey),typeof e.baseUrl=="string"&&(s.baseUrl=e.baseUrl),typeof e.apiBaseUrl=="string"&&(s.apiBaseUrl=e.apiBaseUrl),typeof e.chatApiBaseUrl=="string"&&(s.chatApiBaseUrl=e.chatApiBaseUrl),typeof e.environment=="string"&&(s.environment=e.environment);let r=F(e.session);return r&&(s.session=r),s}l(Y,"sanitizeAccount");function J(t){let e={};return typeof t.token=="string"&&(e.token=t.token),(typeof t.appId=="string"||t.appId===null)&&(e.appId=t.appId),(typeof t.conversationId=="string"||t.conversationId===null)&&(e.conversationId=t.conversationId),Object.keys(e).length>0?e:void 0}l(J,"extractLegacySession");function Q(t,e){let n={handle:e};typeof t.apiKey=="string"&&(n.apiKey=t.apiKey),typeof t.baseUrl=="string"&&(n.baseUrl=t.baseUrl),typeof t.apiBaseUrl=="string"&&(n.apiBaseUrl=t.apiBaseUrl),typeof t.chatApiBaseUrl=="string"&&(n.chatApiBaseUrl=t.chatApiBaseUrl);let s=J(t);return s&&(n.session=s),n}l(Q,"extractLegacyAccount");function L(t){let e={};typeof t.lspEnabled=="boolean"&&(e.lspEnabled=t.lspEnabled),(t.executionMode==="local"||t.executionMode==="hosted")&&(e.executionMode=t.executionMode),(t.mode==="general"||t.mode==="builder")&&(e.mode=t.mode);let n=x(t.openpondProfile);n&&(e.openpondProfile=n);let s=[],r=Array.isArray(t.accounts)?t.accounts:[];for(let f of r){let p=Y(f);p&&R(s,p.handle,p.baseUrl)===-1&&s.push(p)}if(s.length===0){let f=A(t.activeProfile)?.handle||P;s.push(Q(t,f))}let o=A(t.activeProfile),a=o?v(s,o):-1,c=s[a===-1?0:a];return e.accounts=s,e.activeProfile=U(c),e}l(L,"normalizeGlobalConfig");function V(t,e,n){let s=t.accounts??[],r=d(n??process.env.OPENPOND_BASE_URL),o=m(e);if(o)return r?{handle:o,baseUrl:r}:{handle:o};let a=m(process.env.OPENPOND_ACCOUNT);if(a)return r?{handle:a,baseUrl:r}:{handle:a};let c=A(t.activeProfile);return c?r?{handle:c.handle,baseUrl:r}:c:s[0]?U(s[0]):{handle:P}}l(V,"resolveRequestedProfile");function w(t,e,n){let s=d(n);if(s){let o=R(t,e,s);if(o!==-1)return t[o]}else{let o=t.filter(a=>b(a.handle,e));if(o.length>1)throw new Error(`multiple profiles found for ${e}; pass --base-url to select one`);if(o.length===1)return o[0]}let r={handle:e};return s&&(r.baseUrl=s),t.push(r),r}l(w,"ensureAccount");function q(t){t.session&&Object.keys(t.session).length===0&&delete t.session}l(q,"cleanupAccount");function W(t,e,n,s){let r=n===null||n===void 0&&s.undefinedDeletes;switch(e){case"apiKey":{if(r){delete t.apiKey;return}typeof n=="string"&&(t.apiKey=n);return}case"baseUrl":{if(r){delete t.baseUrl;return}typeof n=="string"&&(t.baseUrl=n);return}case"apiBaseUrl":{if(r){delete t.apiBaseUrl;return}typeof n=="string"&&(t.apiBaseUrl=n);return}case"chatApiBaseUrl":{if(r){delete t.chatApiBaseUrl;return}typeof n=="string"&&(t.chatApiBaseUrl=n);return}case"token":case"appId":case"conversationId":{if(t.session||(t.session={}),r){delete t.session[e],q(t);return}(typeof n=="string"||n===null)&&(t.session[e]=n),q(t);return}}}l(W,"applyScopedKey");function X(t,e,n){if(!H.some(f=>y(e,f)))return!1;let r=t.accounts??[],o=A(e.activeProfile)??V(t),a=d(y(e,"baseUrl")?e.baseUrl??null:o.baseUrl??process.env.OPENPOND_BASE_URL),c=w(r,o.handle,a);for(let f of H)y(e,f)&&W(c,f,e[f],n);return t.accounts=r,t.activeProfile=U(c),!0}l(X,"applyAccountPatch");function Z(t,e){if(y(e,"lspEnabled")&&(typeof e.lspEnabled=="boolean"?t.lspEnabled=e.lspEnabled:e.lspEnabled===null&&delete t.lspEnabled),y(e,"executionMode")&&(e.executionMode==="local"||e.executionMode==="hosted"?t.executionMode=e.executionMode:e.executionMode===null&&delete t.executionMode),y(e,"mode")&&(e.mode==="general"||e.mode==="builder"?t.mode=e.mode:e.mode===null&&delete t.mode),y(e,"activeProfile")){let n=A(e.activeProfile);if(n){let s=v(t.accounts??[],n);t.activeProfile=s===-1?n:U((t.accounts??[])[s])}else e.activeProfile===null&&delete t.activeProfile}if(y(e,"openpondProfile")){let n=x(e.openpondProfile);n?t.openpondProfile=n:e.openpondProfile===null&&delete t.openpondProfile}}l(Z,"applyTopLevelPatch");async function _(t){let e=B();return await S(e),await E(e,n=>{let s=L(n);return t(s),s})}l(_,"updateGlobalConfig");async function ee(){let t=B();return await S(t),L(await k(t))}l(ee,"loadGlobalConfig");async function G(){let t=await ee(),e=A(t.activeProfile);return(t.accounts??[]).map(n=>{let s=m(n.handle)??P;return{handle:s,baseUrl:d(n.baseUrl),apiBaseUrl:d(n.apiBaseUrl),chatApiBaseUrl:d(n.chatApiBaseUrl),environment:n.environment?.trim()||null,isActive:!!(e&&D({...n,handle:s},e)),hasApiKey:!!n.apiKey?.trim(),hasSessionToken:!!n.session?.token?.trim(),sessionAppId:n.session?.appId??null,sessionConversationId:n.session?.conversationId??null}})}l(G,"listConfiguredProfiles");async function se(t,e={}){let n=N(t),s=d(e.baseUrl),r=-1;await _(a=>{let c=a.accounts??[];if(r=v(c,s?{handle:n,baseUrl:s}:{handle:n},{requireUnambiguous:!0}),r===-1)throw new Error(`profile not found: ${n}`);a.activeProfile=U(c[r])});let o=await G();return o.find(a=>a.isActive)??o[r]}l(se,"setActiveProfile");async function re(t){let e=N(t.handle),n=$(t.apiKey),s=d(t.baseUrl),r=d(t.apiBaseUrl),o=d(t.chatApiBaseUrl),a={handle:e};await _(p=>{let g=p.accounts??[],h=w(g,e,s);h.apiKey=n,s&&(h.baseUrl=s),r?h.apiBaseUrl=r:t.apiBaseUrl===null&&delete h.apiBaseUrl,o?h.chatApiBaseUrl=o:t.chatApiBaseUrl===null&&delete h.chatApiBaseUrl,t.environment===null?delete h.environment:typeof t.environment=="string"&&t.environment.trim()&&(h.environment=t.environment.trim()),p.accounts=g,a=U(h),t.setActive!==!1&&(p.activeProfile=a)});let f=(await G()).find(p=>b(p.handle,a.handle)?s?d(p.baseUrl)===s:!0:!1);if(!f)throw new Error(`failed to save profile: ${e}`);return f}l(re,"saveProfileApiKey");async function ie(t){await _(e=>{Z(e,t),X(e,t,{undefinedDeletes:!1})})}l(ie,"saveGlobalConfig");export{_ as a,ee as b,G as c,se as d,re as e,ie as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{Aa as w,F as S,G as C,I as q,J as O,y as j,z as E}from"./chunk-ZY32SZ2P.js";import{n as H}from"./chunk-RCT3O3HQ.js";import{a as v}from"./chunk-FTQLQJQV.js";var B=v(g=>["accepted","rejected","cancelled"].includes(g.status),"closed");function n(g,r=422){throw new w(g,r)}v(n,"fail");function $(g,r,I){try{O(g.form,r,I)}catch(l){n(l instanceof Error?l.message:"human_answer_invalid")}}v($,"answers");function L(g,r,I=()=>new Date().toISOString()){async function l(a,t){t.scope!==a.scope&&n("human_scope_denied",403),await r.member(a);let e=await r.owner(a,t.projectId),s=e||t.policy.managerIds.includes(a.actorId),i=e||t.assigneeId===a.actorId||t.policy.reviewerIds.includes(a.actorId);return e||s||i||t.policy.teamVisible||n("human_review_not_found",404),await r.evidence(a,t),{owner:e,manager:s,reviewer:i}}v(l,"access");async function A(a,t){let e=C.parse(t);return g.transaction(a.scope,async s=>{await r.member(a);let i=await s.get(e.id),c={owner:!1,manager:!1,reviewer:!1};if(e.action==="create"){let h={projectId:e.projectId,evidence:e.evidence,form:e.form};await r.owner(a,e.projectId)||n("human_assignment_owner_required",403),await r.evidence(a,h);for(let P of new Set([...e.assigneeId?[e.assigneeId]:[],...e.policy.managerIds,...e.policy.reviewerIds]))await r.assignee(a,P,h);e.kind==="grade"&&!e.evidence.attempts.length&&n("human_grade_requires_attempt"),e.kind!=="grade"&&!e.evidence.taskIds?.length&&n("human_task_assignment_requires_tasks"),e.form.mode==="pairwise"!=(e.evidence.attempts.length===2)&&n("human_form_evidence_mode_mismatch")}else i||n("human_review_not_found",404),c=await l(a,i),e.action==="bind_author_publication"&&!c.owner&&n("human_task_publication_owner_required",403),["reassign","cancel","decide"].includes(e.action)&&!c.manager&&n("human_manager_required",403),["save_draft","submit","reserve_execution","bind_execution"].includes(e.action)&&!c.reviewer&&!(e.action==="bind_execution"&&i.status==="cancelled"&&c.manager)&&n("human_assignee_required",403),e.action==="claim"&&(!i.policy.queueClaim||!i.policy.teamVisible||i.policy.reviewerIds.length&&!i.policy.reviewerIds.includes(a.actorId)&&!c.owner)&&n("human_claim_denied",403);let _=H([a.actorId,e.operationId]),d=H(e),b=await s.operation(_);if(b){b.requestHash!==d&&n("human_operation_conflict",409);let h=await s.get(b.reviewId,b.revision);return h||n("human_operation_result_unavailable",409),h}(i?.revision??0)!==e.expectedRevision&&n("human_revision_conflict",409);let o=I();if(e.action==="create")(i||e.expectedRevision!==0)&&n("human_review_exists",409),i=S.parse(q({schemaVersion:"openpond.humanReview.v1",id:e.id,revision:1,scope:a.scope,projectId:e.projectId,createdBy:a.actorId,kind:e.kind,title:e.title,...e.dueAt?{dueAt:e.dueAt}:{},authorPublication:null,evidence:e.evidence,form:e.form,policy:e.policy,status:e.assigneeId?"assigned":"queued",assigneeId:e.assigneeId,generation:1,drafts:[],submissions:[],decisions:[],audit:[],execution:null,createdAt:o,updatedAt:o}));else{i||n("human_review_not_found",404),B(i)&&e.action!=="bind_author_publication"&&!(i.status==="cancelled"&&e.action==="bind_execution")&&n("human_review_closed",409);let{contentHash:h,...P}=i,u={...P,revision:i.revision+1,updatedAt:o};if(e.action==="bind_author_publication")(i.kind!=="author"||i.status!=="accepted"||i.decisions.at(-1)?.taskProposalHash!==e.proposalHash||i.authorPublication)&&n("human_task_publication_stale",409),r.publication||n("human_task_publication_owner_unavailable",422),await r.publication(a,i,e.dataset,e.proposalHash),u.authorPublication={proposalHash:e.proposalHash,dataset:e.dataset,publishedBy:a.actorId,operationId:e.operationId,publishedAt:o};else if(e.action==="claim")(i.assigneeId||i.status!=="queued")&&n("human_already_claimed",409),await r.assignee(a,a.actorId,i),u={...u,assigneeId:a.actorId,status:"assigned",generation:i.generation+1,audit:[...i.audit,{actorId:a.actorId,action:"claim",priorAssigneeId:i.assigneeId,assigneeId:a.actorId,generation:i.generation+1,note:"",occurredAt:o}]};else if(e.action==="reserve_execution"||e.action==="bind_execution")if((i.kind!=="execute"||e.generation!==i.generation)&&n("human_execution_assignment_stale",409),e.action==="reserve_execution")i.execution&&n("human_execution_already_reserved",409),u.execution={executionId:null,operationId:e.runOperationId,boundBy:a.actorId,configurationHash:e.configurationHash,generation:e.generation,result:null},u.status="in_progress";else{let f=i.execution;(!f||f.executionId||f.operationId!==e.runOperationId||f.configurationHash!==e.configurationHash||f.boundBy!==a.actorId&&!(i.status==="cancelled"&&c.manager)||f.generation!==e.generation)&&n("human_execution_binding_conflict",409);let p={...f,executionId:e.executionId};r.execution||n("human_execution_owner_unavailable",422),await r.execution(a,i,p),u.execution=p}else if(e.action==="reassign")i.execution&&!i.execution.result&&n("human_execution_transfer_requires_completion",409),e.assigneeId&&await r.assignee(a,e.assigneeId,i),u={...u,execution:null,assigneeId:e.assigneeId,generation:i.generation+1,status:e.assigneeId?"assigned":"queued",audit:[...i.audit,{actorId:a.actorId,action:"reassign",priorAssigneeId:i.assigneeId,assigneeId:e.assigneeId,generation:i.generation+1,note:e.note,occurredAt:o}]};else if(e.action==="cancel")u.status="cancelled",u.audit=[...i.audit,{actorId:a.actorId,action:"cancel",priorAssigneeId:i.assigneeId,assigneeId:i.assigneeId,generation:i.generation,note:e.note,occurredAt:o}];else if(e.action==="save_draft"||e.action==="submit"){i.kind==="execute"&&!i.execution?.executionId&&n("human_execution_not_bound",409),e.generation!==i.generation&&n("human_assignment_generation_stale",409);let f=i.decisions.at(-1),p=i.submissions.filter(m=>m.actorId===a.actorId&&m.generation===i.generation).at(-1);if(p&&!(f?.outcome==="request_changes"&&f.submissions.some(m=>m.id===p.id))&&n("human_submission_already_sealed",409),e.taskProposal?.tasks.some(m=>m.expectedOutput!==void 0)&&!c.owner&&n("human_reference_edit_owner_required",403),e.taskProposal||e.action==="submit")try{E(i,e.taskProposal)}catch(m){n(m instanceof Error?m.message:"human_task_proposal_invalid")}if($(i,e.answers,e.action==="submit"),e.action==="save_draft")u.drafts=[...i.drafts.filter(m=>m.actorId!==a.actorId),{actorId:a.actorId,generation:i.generation,...e.taskProposal?{taskProposal:e.taskProposal}:{},answers:e.answers,note:e.note,updatedAt:o}],u.status=i.status==="returned"?"returned":"in_progress";else{i.kind==="execute"&&((!e.executionResult||!r.completeExecution)&&n("human_execution_result_required",409),await r.completeExecution(a,i,e.executionResult),u.execution={...i.execution,result:e.executionResult}),(e.evidenceHash!==H(i.evidence)||e.formHash!==H(i.form))&&n("human_review_snapshot_stale",409);let m=q({...e.taskProposal?{taskProposal:e.taskProposal}:{},id:`submission-${_}`,revision:1,actorId:a.actorId,generation:i.generation,evidenceHash:e.evidenceHash,formHash:e.formHash,answers:e.answers,note:e.note,submittedAt:o,supersedes:p?.id??null});u.submissions=[...i.submissions,m],u.drafts=i.drafts.filter(k=>k.actorId!==a.actorId),u.status=i.policy.approval==="none"?"accepted":"submitted",i.policy.approval==="none"&&(u.decisions=[...i.decisions,q({id:`decision-${_}`,revision:1,actorId:a.actorId,outcome:"accept",...e.taskProposal?{taskProposalHash:e.taskProposal.contentHash}:{},submissions:[{id:m.id,contentHash:m.contentHash}],answers:e.answers,note:"",decidedAt:o})])}}else if(e.action==="decide"){(i.policy.approval!=="manager"||i.status!=="submitted")&&n("human_decision_not_required",409);let f=e.submissions.map(p=>i.submissions.find(m=>m.id===p.id&&m.contentHash===p.contentHash&&m.generation===i.generation&&!i.submissions.some(k=>k.supersedes===m.id))??n("human_submission_revision_stale",409));i.policy.distinctManager&&f.some(p=>p.actorId===a.actorId)&&n("human_distinct_manager_required",403),new Set(f.map(p=>p.id)).size!==f.length&&n("human_duplicate_submission"),e.outcome==="accept"&&new Set(f.map(p=>p.actorId)).size<i.policy.minimumRaters&&n("human_more_raters_required",409),e.outcome!=="accept"&&!e.note.trim()&&n("human_decision_reason_required"),i.kind==="author"&&e.outcome==="accept"&&!f.some(p=>p.taskProposal?.contentHash===e.taskProposalHash)&&n("human_task_proposal_decision_required",409),i.kind!=="author"&&e.taskProposalHash&&n("human_task_proposal_unexpected"),$(i,e.answers,e.outcome==="accept"),u.decisions=[...i.decisions,q({...e.taskProposalHash?{taskProposalHash:e.taskProposalHash}:{},id:`decision-${_}`,revision:1,actorId:a.actorId,outcome:e.outcome,submissions:e.submissions,answers:e.answers,note:e.note,decidedAt:o})],u.status=e.outcome==="accept"?"accepted":e.outcome==="reject"?"rejected":"returned"}i=S.parse(q(u))}return await s.put(i,e.expectedRevision),await s.saveOperation(_,{requestHash:d,reviewId:i.id,revision:i.revision}),i})}v(A,"command");async function x(a,t,e){return g.transaction(a.scope,async s=>{let i=await s.get(t);i||n("human_review_not_found",404),await l(a,i);let c=e===void 0?i:await s.get(t,e);return c||n("human_review_not_found",404),await r.evidence(a,c),c})}v(x,"get");async function y(a,t){return await r.member(a),g.transaction(a.scope,async e=>{let s,i=[],c=new Set,_=!1;do{let b=await e.list({projectId:t.projectId,afterId:s,limit:100});for(let o of b.items){let h;try{h=await l(a,o)}catch(k){if(k instanceof w&&[403,404].includes(k.status))continue;throw k}let P=!B(o),u=o.assigneeId===a.actorId||o.policy.reviewerIds.includes(a.actorId)||h.owner&&o.assigneeId===null&&o.createdBy===a.actorId,f=u&&h.reviewer&&P&&!o.submissions.some(k=>k.actorId===a.actorId&&k.generation===o.generation&&o.status!=="returned"),p=h.manager&&o.policy.approval==="manager"&&o.status==="submitted";h.manager&&o.policy.approval==="manager"&&(_=!0),(f||p)&&c.add(o.id),(t.view==="mine"?u:t.view==="approval"?h.manager&&o.policy.approval==="manager":o.policy.teamVisible||h.manager)&&(t.status==="active"?P:!P)&&(!t.afterId||o.id>t.afterId)&&i.push(o)}s=b.nextCursor??void 0}while(s);let d=i.slice(0,t.limit);return{items:d,nextCursor:i.length>t.limit?d.at(-1).id:null,actionCount:c.size,approvalAvailable:_}})}v(y,"inbox");async function R(a,t){let e=await x(a,t.id),s=await l(a,e),i=s.owner||s.manager,c=!i&&e.form.mode==="pairwise"&&e.policy.blindPair,_=!i&&e.policy.independentRaters;return{...t,evidence:c?null:t.evidence,evidenceHash:H(t.evidence),formHash:H(t.form),drafts:t.drafts.filter(d=>d.actorId===a.actorId).map(d=>({...d,taskProposal:s.owner?d.taskProposal:j(d.taskProposal)})),submissions:(_?t.submissions.filter(d=>d.actorId===a.actorId):t.submissions).map(d=>({...d,taskProposal:s.owner?d.taskProposal:j(d.taskProposal)})),decisions:_&&!B(e)?[]:t.decisions,audit:i?t.audit:[],createdBy:c?"owner":t.createdBy,permissions:{...s,claim:e.status==="queued"&&e.policy.queueClaim&&e.policy.teamVisible&&(!e.policy.reviewerIds.length||e.policy.reviewerIds.includes(a.actorId)||s.owner)}}}return v(R,"view"),{command:A,get:x,inbox:y,view:R}}v(L,"createHumanReviewService");async function G(g){let{service:r,context:I,request:l}=g,A=await r.get(I,l.id);if(A.kind!=="execute"||A.generation!==l.generation)throw new w("human_execution_assignment_stale",409);let x=A.execution;if(x&&x.boundBy!==I.actorId)throw new w("human_execution_executor_changed",403);let y=x?.operationId??`human-run-${H([I.actorId,l.id,l.operationId])}`,R=g.configuration,a={...R,operationId:y,request:{...R.request,operationId:y}},t=H(a),e=x?A:await r.command(I,{action:"reserve_execution",id:l.id,expectedRevision:l.expectedRevision,operationId:`reserve-${l.operationId}`,generation:l.generation,runOperationId:y,configurationHash:t});if(!e.execution||e.execution.operationId!==y||e.execution.configurationHash!==t)throw new w("human_execution_reservation_conflict",409);let s=await r.get(I,l.id);if(s.execution?.executionId)return s.status==="cancelled"&&await g.cancel(s),s;let i;if(x)i=await g.recover(s);else{if(s.generation!==e.generation||["accepted","rejected","cancelled"].includes(s.status))throw new w("human_execution_assignment_stale",409);try{i=await g.dispatch(a,s)}catch(c){if(i=await g.recover(await r.get(I,l.id)),!i)throw c}}if(!i)throw new w("human_execution_admission_recovery_pending",409,"The original execution admission is unavailable. Recover its retained owner outcome before retrying this assignment.");for(let c=0;c<3;c++){let _=await r.get(I,l.id);if(_.generation!==e.generation||!_.execution||_.execution.operationId!==y)throw new w("human_execution_assignment_stale",409);let d;try{d=_.execution.executionId?_:await r.command(I,{action:"bind_execution",id:l.id,expectedRevision:_.revision,operationId:`bind-${y}`,generation:l.generation,runOperationId:y,configurationHash:t,executionId:i.id})}catch(b){if(b instanceof w&&b.code==="human_revision_conflict")continue;throw b}if(d.execution?.executionId!==i.id)throw new w("human_execution_binding_conflict",409);return d.status==="cancelled"&&await g.cancel(d),d}throw new w("human_execution_binding_recovery_pending",409,"The assignment changed while retaining its execution. Retry the original operation to recover that exact run.")}v(G,"dispatchAssignedHumanExecution");export{L as a,G as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{ib as a,jb as r}from"./chunk-ZY32SZ2P.js";import{n as t}from"./chunk-RCT3O3HQ.js";import{a as n}from"./chunk-FTQLQJQV.js";var T=r;function f(i,l){let s=new Map(i.map(o=>[o.name,o]));return l.map(o=>{let e=s.get(o.name);if(!a.has(o.name)||o.sideEffect!=="read"||!e||t(e.parameters)!==o.inputSchemaHash)throw new Error(`Standalone Harness tool has no compatible case-scoped implementation: ${o.name}.`);return e})}n(f,"isolateStandaloneExperimentTools");export{T as a,f as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{A as e}from"./chunk-
|
|
2
|
+
import{A as e}from"./chunk-X2J2P5ZT.js";var i=e.string().trim().min(1).max(240),o=e.string().regex(/^[a-f0-9]{64}$/),l=e.string().datetime({offset:!0}),s=e.object({id:i,contentHash:o}).strict(),b=s.extend({revision:e.number().int().positive()}).strict(),u=e.object({providerId:i,modelId:e.string().trim().min(1).max(300)}).strict(),d=e.enum(["correction","sibling_verification","cumulative_known","development","retained","frozen_final","training_eligible"]),h=e.object({taskId:i,taskContentHash:o,panelRole:d,passLabel:i.nullable(),optimizerEligible:e.boolean(),criticalInvariantIds:e.array(i).max(100).default([])}).strict().superRefine((n,t)=>{n.optimizerEligible!==(n.panelRole==="correction")&&t.addIssue({code:"custom",path:["optimizerEligible"],message:"Only correction cases may be optimizer eligible."})}),y=e.object({schemaVersion:e.literal("openpond.continualBenchIssuePacket.v1"),id:i,revision:e.number().int().positive(),contentHash:o,familyId:i,familyLabel:e.string().trim().min(1).max(500),severity:e.enum(["low","medium","high","critical"]),cases:e.array(h).min(2).max(1e4),duplicateEvidence:s,leakageEvidence:s,priorExposureEvidence:s,observedAt:l,reviewedAt:l,queuedAt:l.nullable(),runAt:l.nullable(),createdBy:i,createdAt:l}).strict().superRefine((n,t)=>{n.cases.some(a=>a.panelRole==="correction")||t.addIssue({code:"custom",path:["cases"],message:"An issue packet requires a correction case."}),n.cases.some(a=>a.panelRole==="sibling_verification")||t.addIssue({code:"custom",path:["cases"],message:"An issue packet requires a sibling-verification case."}),new Set(n.cases.map(a=>a.taskId)).size!==n.cases.length&&t.addIssue({code:"custom",path:["cases"],message:"Issue-packet task ids must be unique."})}),v=e.object({id:i,role:d,passLabel:i.nullable(),taskset:b,familyIds:e.array(i).min(1).max(1e5),taskCount:e.number().int().positive().max(1e6),sealedAt:l}).strict().superRefine((n,t)=>{let a=n.role==="correction"||n.role==="sibling_verification"||n.role==="cumulative_known";a!==(n.passLabel!==null)&&t.addIssue({code:"custom",path:["passLabel"],message:a?"This panel role requires a pass label.":"This panel role is series-wide and cannot carry a pass label."})}),m=e.discriminatedUnion("kind",[e.object({kind:e.literal("base_model"),id:i,revision:e.string().trim().min(1).max(500),contentHash:o}).strict(),e.object({kind:e.literal("model_version"),id:i,contentHash:o}).strict(),e.object({kind:e.literal("external_reference"),id:i,model:u,providerRevision:e.string().trim().min(1).max(500),contentHash:o}).strict()]),g=e.object({scheduleEntryId:i,ordinal:e.number().int().nonnegative(),label:i,role:e.enum(["seed","daily_residual","rank_candidate","weekly_rollup","full_refresh"]),parentRule:e.enum(["base_model","previous_release","seed_release","accepted_daily_head","accepted_seed"]),trainableRank:e.number().int().positive().max(1024),correctionPanelIds:e.array(i).min(1).max(1e3),optimizerGroupsPerTask:e.number().int().positive().max(1e3),trajectoriesPerGroup:e.number().int().min(4).max(1e3)}).strict(),f=e.object({revision:e.number().int().positive(),requireAllAttemptsTerminal:e.literal(!0),criticalCorrectionPassRate:e.number().min(0).max(1),siblingPassRate:e.number().min(0).max(1),behavioralRetentionRate:e.number().min(0).max(1),maximumRetainedRegressionPoints:e.number().min(0).max(100),blockCriticalPriorRegression:e.boolean(),authorizedClaims:e.array(e.enum(["systems_complete","correction_absorbed","issue_generalized","continually_current","frontier_pareto_result"])).min(1).max(5)}).strict(),R=e.object({schemaVersion:e.literal("openpond.continualBenchmarkProtocol.v1"),id:i,revision:e.number().int().positive(),contentHash:o,ownerId:i,createdAt:l,sealedAt:l,creationReceipt:s,predecessorSeries:e.object({id:i,revision:e.number().int().positive(),contentHash:o}).strict().nullable(),scenarioPack:s,issueFamilyLedger:s,issuePacketRelease:s,panels:e.array(v).min(6).max(1e4),grader:s,judge:e.object({release:s,rubricRelease:s,calibrationRelease:s,model:u}).strict().nullable(),policies:e.object({base:m,master:m.nullable(),externalReferences:e.array(m).min(1).max(20)}).strict(),invariants:e.object({systemPromptHash:o,toolSchema:s,application:s,harness:s,runtime:s,workerImage:s,autoRefiner:e.object({enabled:e.boolean(),release:s.nullable()}).strict()}).strict(),schedule:e.array(g).min(1).max(1e3),evaluation:e.object({seeds:e.array(e.number().int()).min(3).max(100),repetitions:e.number().int().min(3).max(20),powerRule:s,pairedBootstrapSamples:e.number().int().min(1e3).max(1e6),confidenceLevel:e.literal(.95)}).strict(),resources:e.object({maximumTrainingGpuSeconds:e.number().int().positive(),maximumEvaluationGpuSeconds:e.number().int().positive(),maximumProviderSpendUsd:e.number().positive(),maximumTotalSpendUsd:e.number().positive(),maximumConcurrentGroups:e.number().int().positive().max(1e3)}).strict(),currencyThresholds:f}).strict().superRefine((n,t)=>{let a=n.panels.map(r=>r.id);new Set(a).size!==a.length&&t.addIssue({code:"custom",path:["panels"],message:"Protocol panel ids must be unique."});for(let r of["development","retained","frozen_final","training_eligible"])n.panels.filter(c=>c.role===r).length!==1&&t.addIssue({code:"custom",path:["panels"],message:`A protocol requires exactly one ${r} panel.`});[...n.schedule].sort((r,c)=>r.ordinal-c.ordinal).some((r,c)=>r.ordinal!==c)&&t.addIssue({code:"custom",path:["schedule"],message:"Protocol schedule ordinals must be contiguous from zero."});let p=new Set(a);n.schedule.some(r=>r.correctionPanelIds.some(c=>!p.has(c)))&&t.addIssue({code:"custom",path:["schedule"],message:"Every scheduled correction panel must belong to the protocol."})});export{d as a,y as b,R as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as K,c as q}from"./chunk-
|
|
2
|
+
import{b as K,c as q}from"./chunk-ULJZ7NUF.js";import{d as C,e as g}from"./chunk-JCLTFDVW.js";import{a as r}from"./chunk-FTQLQJQV.js";var re=new URL(g).hostname,G=new URL(C).hostname,se=`${g}/opchat/v1`;function s(e){if(!e)return null;let n=e.trim();return n?n.replace(/\/+$/,""):null}r(s,"normalizeBaseUrl");function H(e){let n=s(e);if(!n)return null;try{let o=new URL(n).hostname.toLowerCase();if(o===re)return g;if(o===G||o===`www.${G}`||o==="openpond.live"||o==="www.openpond.live")return g;if(o.startsWith("api."))return n}catch{return null}return null}r(H,"mapUiBaseToApiBase");function D(e,n){let t=s(process.env.OPENPOND_API_URL);if(t)return t;let o=s(e?.apiBaseUrl);if(o)return o;let a=s(n.apiBaseUrl);if(a)return a;let l=H(process.env.OPENPOND_BASE_URL);return l||(H(e?.baseUrl||n.baseUrl)??g)}r(D,"resolvePublicApiBaseUrl");function B(e,n,t){return ae(e,n,t)}r(B,"resolveHostedChatApiBaseUrl");function ae(e,n,t){let o=typeof process<"u"?process.env:{};return S(o.OPENPOND_OPCHAT_API_URL)??S(e?.chatApiBaseUrl??n.chatApiBaseUrl)??S(o.OPENPOND_CHAT_API_URL)??ie(t)}r(ae,"resolveOpChatApiBaseUrl");function S(e){let n=s(e);if(!n)return null;try{let t=new URL(n),o=t.pathname.split("/").filter(Boolean),a=o.findIndex(i=>i.toLowerCase()==="opchat");return a>=0?(t.pathname=`/${[...o.slice(0,a+1),"v1"].join("/")}`,t.search="",t.hash="",s(t.toString())??null):o.findIndex(i=>i.toLowerCase()==="v1")>=0?(t.pathname="/opchat/v1",t.search="",t.hash="",s(t.toString())??null):(t.pathname=`${t.pathname.replace(/\/+$/,"")}/opchat/v1`.replace(/\/{2,}/g,"/"),t.search="",t.hash="",s(t.toString())??null)}catch{return null}}r(S,"normalizeOpChatApiBaseUrl");function ie(e){return S(e)??se}r(ie,"opChatBaseFromPublicApiBase");function A(e){return e?.trim()?e.trim():"production"}r(A,"deriveEnvironment");function N(e,n=process.env){let t=[e?.apiKey,e?.session?.token,e?.token,n.OPENPOND_API_KEY];for(let o of t){let a=typeof o=="string"?o.trim():"";if(a)return a}return null}r(N,"accountToken");function y(e,n){return!!(e&&n&&e.toLowerCase()===n.toLowerCase())}r(y,"handleEquals");function w(e,n){return s(e)===s(n)}r(w,"baseUrlEquals");function M(e,n){return`${e?.trim().toLowerCase()||""}|${s(n)??"default"}`}r(M,"profileKey");function E(e){return s(e?.baseUrl)}r(E,"selectorBaseUrl");function x(e){let n=s(e.baseUrl);return n?{handle:e.handle,baseUrl:n}:{handle:e.handle}}r(x,"selectorFromAccount");function d(e){let n=typeof e?.handle=="string"?e.handle.trim():"";if(!n)return null;let t=s(e?.baseUrl);return t?{handle:n,baseUrl:t}:{handle:n}}r(d,"normalizeActiveProfile");function R(e,n){if(!y(e.handle,n.handle))return!1;let t=E(n);return t?w(e.baseUrl,t):!s(e.baseUrl)}r(R,"accountMatchesSelector");function $(e,n){if(!y(e.handle,n.handle))return!1;let t=E(n);return t?w(e.baseUrl,t):!s(e.baseUrl)}r($,"profileMatchesSelector");function J(e,n,t){let o=Array.isArray(e.accounts)?e.accounts:[],a=n||process.env.OPENPOND_ACCOUNT?d({handle:n||process.env.OPENPOND_ACCOUNT||"",baseUrl:t??process.env.OPENPOND_BASE_URL??null}):d(e.activeProfile);if(a){let l=o.find(u=>R(u,a));if(l)return l;let i=o.filter(u=>y(u.handle,a.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}r(J,"findActiveAccount");function V(e){let n=Array.isArray(e.accounts)?e.accounts:[],t=d(e.activeProfile)??(n[0]?x(n[0]):null);return j(n.map(o=>({handle:o.handle,baseUrl:s(o.baseUrl),apiBaseUrl:s(o.apiBaseUrl),chatApiBaseUrl:s(o.chatApiBaseUrl),environment:A(o.environment),isActive:t?R(o,t):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}r(V,"fallbackProfilesFromConfig");function j(e){let n=new Map;for(let t of e){let o=s(t.baseUrl),a=`${t.handle.toLowerCase()}|${o??"default"}`,l={...t,baseUrl:o,apiBaseUrl:s(t.apiBaseUrl),chatApiBaseUrl:s(t.chatApiBaseUrl),environment:A(t.environment),isActive:t.isActive},i=n.get(a);(!i||l.isActive&&!i.isActive||l.hasApiKey&&!i.hasApiKey)&&n.set(a,l)}return Array.from(n.values())}r(j,"normalizeProfiles");function W(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}r(W,"profileAuthHealth");function le(e,n){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||n,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}r(le,"normalizeHealth");function X(e){let n=e?.account;return n?{id:n.id??null,email:n.email??null,name:n.name??null,handle:n.handle??null,image:n.image??null,timezone:n.timezone??null,isAdmin:n.isAdmin??null,isVerified:n.isVerified??null,dailyAgentAppId:n.dailyAgentAppId??null,dailyAgentDeploymentId:n.dailyAgentDeploymentId??null,credits:n.credits??null}:null}r(X,"normalizeProfile");function ce(e){return(e??[]).map(n=>({...n,id:n.id||n.userProductId||n.openPondProductId||n.name,name:n.name,type:n.type,status:n.status,isActive:n.isActive??null,price:n.price??null,currency:n.currency??null,credits:n.credits??null}))}r(ce,"normalizeProducts");function ue(e){return e.handle.trim().toLowerCase()==="default"&&!s(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}r(ue,"isEmptyDefaultProfile");function de(e){let n=e?.trim();return n?n.length>=12?`\u2022\u2022\u2022\u2022\u2022\u2022${n.slice(-6)}`:"\u2022\u2022\u2022\u2022\u2022\u2022":null}r(de,"apiKeyHint");function pe(e){return e?.auth?.authType!=="openpond-api-key"||!e.auth.keyAccess?null:{ownerType:e.auth.keyAccess.ownerType,teamId:e.auth.keyAccess.teamId,scopes:e.auth.scopes}}r(pe,"apiKeyAccess");function _(e){let{config:n,profiles:t,account:o,token:a,apiBaseUrl:l,accountResponse:i,accountProfiles:u,health:P,authFailed:f,error:h}=e,k=B(o,n,l),m=X(i??null),Q=d(n.activeProfile),U=(o?x(o):null)??Q,O=m?.handle||o?.handle||U?.handle||null,I=(U?t.find(c=>$(c,U)):null)??t.find(c=>c.isActive)??null,Z=f?"auth_error":a?"signed_in":"signed_out",ee=m?.name||m?.handle||m?.email||O||"Signed out",ne=s(I?.baseUrl||o?.baseUrl||C),F=A(I?.environment||o?.environment),v=d(U)??(O?d({handle:O,baseUrl:I?.baseUrl??o?.baseUrl}):null),te=(t.length>0?t:O?[{handle:O,baseUrl:E(v)??s(o?.baseUrl),apiBaseUrl:l,chatApiBaseUrl:k,environment:F,isActive:!0,hasApiKey:!!a,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(c=>!ue(c));return{state:Z,activeProfile:v,label:ee,email:m?.email??null,avatarUrl:m?.image??null,environment:F,baseUrl:ne,apiBaseUrl:l,chatApiBaseUrl:k,creditsLabel:m?.credits??null,profile:m,products:ce(i?.products),apiHealth:le(P??null,l),accounts:te.map(c=>{let T=s(c.baseUrl),oe=n.accounts?.find(z=>y(z.handle,c.handle)&&w(z.baseUrl,T)),L=u?.[M(c.handle,T)]??null,b=X(L?.response??null);return{handle:c.handle,baseUrl:T,apiBaseUrl:s(c.apiBaseUrl),chatApiBaseUrl:s(c.chatApiBaseUrl),environment:A(c.environment),isActive:v?$(c,v):!1,authHealth:L?.authFailed?"auth_error":W(c),displayLabel:b?.name||b?.handle||b?.email||c.handle,email:b?.email??null,avatarUrl:b?.image??null,apiKeyHint:de(oe?.apiKey),apiKeyAccess:pe(L?.response??null)}}),error:h??P?.error??null}}r(_,"toAccountState");async function fe(e){try{return j(await q())}catch{return V(e)}}r(fe,"loadProfiles");async function p(e,n){let t=await K(),o=await fe(t),a=J(t,e,n),l=N(a),i=D(a,t),u=B(a,t,i);return{config:t,profiles:o,account:a,token:l,apiBaseUrl:i,chatApiBaseUrl:u,accountState:_({config:t,profiles:o,account:a,token:l,apiBaseUrl:i})}}r(p,"loadOpenPondAccountContext");import{spawn as me}from"node:child_process";function Y(e,n=process.platform){return n==="darwin"?{command:"open",args:[e]}:n==="win32"?{command:"rundll32.exe",args:["url.dll,FileProtocolHandler",e]}:{command:"xdg-open",args:[e]}}r(Y,"resolveSystemBrowserCommand");async function he(e,n={}){let t=n.command??Y(e),o=n.handoffTimeoutMs??1500;return new Promise(a=>{let l=!1,i=null,u=r(f=>{l||(l=!0,i&&clearTimeout(i),a(f))},"finish"),P=me(t.command,t.args,{detached:!1,shell:!1,stdio:"ignore",windowsHide:!0});P.once("error",f=>{let h=f.code;u({opened:!1,error:h?`browser launcher ${t.command} failed (${h})`:`browser launcher ${t.command} failed`})}),P.once("close",(f,h)=>{if(f===0){u({opened:!0});return}let k=h?`signal ${h}`:`code ${f??"unknown"}`;u({opened:!1,error:`browser launcher ${t.command} exited with ${k}`})}),i=setTimeout(()=>{P.unref(),u({opened:!0})},o),i.unref()})}r(he,"openUrlWithSystemBrowser");export{p as a,he as b};
|