openpond 0.2.63 → 0.2.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +76 -2
- package/dist/app-server.js +1 -1
- package/dist/chunks/account-context-TIJOM22A.js +12 -0
- package/dist/chunks/acp-G5GCLP44.js +2 -0
- package/dist/chunks/acp-agent-JM5THNMF.js +19 -0
- package/dist/chunks/actions-command-VLKMHCMI.js +2 -0
- package/dist/chunks/app-layer-DZHMJUBC.js +3 -0
- package/dist/chunks/app-server-connected-apps-IB6M35NS.js +2 -0
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +2 -0
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +2 -0
- package/dist/chunks/app-server-runtime-6LCX46RF.js +2 -0
- package/dist/chunks/apps-7LPKIYRY.js +2 -0
- package/dist/chunks/{chunk-NZTCH6K5.js → chunk-2GJD23CM.js} +1 -1
- package/dist/chunks/{chunk-BKEDG3A4.js → chunk-2MEOUS24.js} +1 -1
- package/dist/chunks/{chunk-DUL6DXOI.js → chunk-2W22IXHB.js} +1 -1
- package/dist/chunks/{chunk-GGJUWIGR.js → chunk-36FNNR5N.js} +1 -1
- package/dist/chunks/chunk-3BJ7LPE3.js +2 -0
- package/dist/chunks/chunk-3MVKXAH7.js +2 -0
- package/dist/chunks/{chunk-UTNGEMW5.js → chunk-3WJQ4IGK.js} +1 -1
- package/dist/chunks/{chunk-G6OR5NB6.js → chunk-4D3CICBG.js} +1 -1
- package/dist/chunks/chunk-4DYWVGVS.js +2 -0
- package/dist/chunks/{chunk-KUPJNBWG.js → chunk-4JYTFEND.js} +1 -1
- package/dist/chunks/chunk-4MQHIFZL.js +2 -0
- package/dist/chunks/chunk-4TO743HO.js +4 -0
- package/dist/chunks/{chunk-B4RKHHF7.js → chunk-4TTXNVCE.js} +1 -1
- package/dist/chunks/{chunk-3YXYBYWK.js → chunk-4V73I4OL.js} +1 -1
- package/dist/chunks/chunk-55Q64WWF.js +2 -0
- package/dist/chunks/{chunk-F7QTIHXX.js → chunk-5AU5Y6KS.js} +1 -1
- package/dist/chunks/chunk-5HPZGLOL.js +2 -0
- package/dist/chunks/{chunk-LCSBCCYC.js → chunk-5JVJQA5H.js} +1 -1
- package/dist/chunks/chunk-5KJMFK65.js +2 -0
- package/dist/chunks/{chunk-BSPFY3Y5.js → chunk-5KWKSR4P.js} +1 -1
- package/dist/chunks/chunk-5WPMI6QX.js +2 -0
- package/dist/chunks/{chunk-SHJY5RLU.js → chunk-5Z3AU5CL.js} +1 -1
- package/dist/chunks/{chunk-DQI5TE6A.js → chunk-66HFW4OU.js} +1 -1
- package/dist/chunks/{chunk-NT7N6KLE.js → chunk-67HXM6AL.js} +1 -1
- package/dist/chunks/{chunk-J7ZTPXRQ.js → chunk-6C3CXME7.js} +1 -1
- package/dist/chunks/{chunk-PWK5Z5S3.js → chunk-6ESBAHWK.js} +1 -1
- package/dist/chunks/{chunk-XNOMIWEY.js → chunk-6I5AUTVO.js} +1 -1
- package/dist/chunks/{chunk-OG33QAG6.js → chunk-6S2MWJVD.js} +1 -1
- package/dist/chunks/{chunk-KCOTDUGW.js → chunk-6TRVEA3T.js} +1 -1
- package/dist/chunks/chunk-6ZTP6CUJ.js +2 -0
- package/dist/chunks/{chunk-4L6DU6Z2.js → chunk-7FBWUVX7.js} +1 -1
- package/dist/chunks/{chunk-GPL2Z65R.js → chunk-7P5SH3CI.js} +2 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +2 -0
- package/dist/chunks/chunk-7XOUM6RK.js +2 -0
- package/dist/chunks/chunk-A77DLBR4.js +2 -0
- package/dist/chunks/chunk-AF3AVDPP.js +2 -0
- package/dist/chunks/{chunk-RV7PUSI2.js → chunk-AJXWJLZA.js} +1 -1
- package/dist/chunks/chunk-AMC4Z7G4.js +2 -0
- package/dist/chunks/chunk-ANG2YMMD.js +2 -0
- package/dist/chunks/{chunk-ZPTKR3GB.js → chunk-B32CW3NT.js} +1 -1
- package/dist/chunks/{chunk-Y766IN7Y.js → chunk-B666Z2NS.js} +1 -1
- package/dist/chunks/chunk-BJXPQIVD.js +2 -0
- package/dist/chunks/{chunk-WBUK73ST.js → chunk-BL3CZWWD.js} +1 -1
- package/dist/chunks/{chunk-XMHIQ3SK.js → chunk-BTJACFU3.js} +2 -2
- package/dist/chunks/{chunk-25XXZS3E.js → chunk-C5B3FMV3.js} +1 -1
- package/dist/chunks/chunk-CRDKBFRN.js +2 -0
- package/dist/chunks/chunk-CYQLXS2U.js +2 -0
- package/dist/chunks/{chunk-N4VHLJBZ.js → chunk-D7R2AAX2.js} +1 -1
- package/dist/chunks/{chunk-LSZJ5M3X.js → chunk-DAEUVT2I.js} +1 -1
- package/dist/chunks/{chunk-ELX7VRSU.js → chunk-DIDQHTAX.js} +1 -1
- package/dist/chunks/chunk-DMO3UIS7.js +6 -0
- package/dist/chunks/{chunk-4BJGUCHY.js → chunk-DRMOHADV.js} +1 -1
- package/dist/chunks/{chunk-FYYYECHE.js → chunk-DSJZS77R.js} +4 -4
- package/dist/chunks/{chunk-7HRLWPPZ.js → chunk-DXA2UHBE.js} +1 -1
- package/dist/chunks/{chunk-T6JN4PND.js → chunk-EBOTNBUS.js} +1 -1
- package/dist/chunks/chunk-ECOH24MC.js +9 -0
- package/dist/chunks/{chunk-6PKXJEJM.js → chunk-EICS777E.js} +1 -1
- package/dist/chunks/{chunk-4SZ3HKHU.js → chunk-EVQISX7M.js} +1 -1
- package/dist/chunks/{chunk-2HAWOMZK.js → chunk-EW7CD7OA.js} +1 -1
- package/dist/chunks/chunk-FEQ7HNJR.js +2 -0
- package/dist/chunks/{chunk-IWWXIUAQ.js → chunk-FHLSLOKH.js} +8 -8
- package/dist/chunks/{chunk-BU27SLZP.js → chunk-FS2VKOT7.js} +1 -1
- package/dist/chunks/{chunk-4FNCBA3Y.js → chunk-FUFI4THX.js} +1 -1
- package/dist/chunks/{chunk-W5W4IODW.js → chunk-FYWQWKVS.js} +1 -1
- package/dist/chunks/{chunk-IZ56L2ZK.js → chunk-G4747MOW.js} +1 -1
- package/dist/chunks/{chunk-J572ANHX.js → chunk-G4E3WGLM.js} +4 -4
- package/dist/chunks/{chunk-P7HRF4FM.js → chunk-GD3RCUDH.js} +1 -1
- package/dist/chunks/{chunk-HUCBKXTU.js → chunk-GDJ4X2ZN.js} +1 -1
- package/dist/chunks/{chunk-JHR3LF2F.js → chunk-GF55VEMR.js} +1 -1
- package/dist/chunks/{chunk-GXCUH2VV.js → chunk-GFAI2MCJ.js} +3 -3
- package/dist/chunks/{chunk-KOKX7PBS.js → chunk-GI7LTJV3.js} +1 -1
- package/dist/chunks/{chunk-TCOTXCV6.js → chunk-GIU3Z45P.js} +1 -1
- package/dist/chunks/chunk-GKLZQN6P.js +161 -0
- package/dist/chunks/{chunk-GXZCMO6S.js → chunk-GRLQHYAU.js} +2 -2
- package/dist/chunks/{chunk-M3SCON53.js → chunk-GUG2SWRZ.js} +1 -1
- package/dist/chunks/{chunk-JQRMDFF3.js → chunk-H42UW6IF.js} +1 -1
- package/dist/chunks/{chunk-EZRUWIP6.js → chunk-H5ML7735.js} +1 -1
- package/dist/chunks/{chunk-VNJAAYNQ.js → chunk-HIQPGYVH.js} +1 -1
- package/dist/chunks/{chunk-DLANLLKH.js → chunk-HNDAGZCF.js} +1 -1
- package/dist/chunks/{chunk-OE22TAXP.js → chunk-HNQPEOJD.js} +1 -1
- package/dist/chunks/chunk-HORMGT2Q.js +2 -0
- package/dist/chunks/{chunk-2V4LPUBH.js → chunk-HPTEJBP4.js} +1 -1
- package/dist/chunks/{chunk-R6VJDOQM.js → chunk-HQQJKWZY.js} +4 -4
- package/dist/chunks/{chunk-UWHIU24L.js → chunk-HVM2GUM3.js} +1 -1
- package/dist/chunks/{chunk-NEJLJ2XY.js → chunk-HX6GXMDK.js} +1 -1
- package/dist/chunks/chunk-I3NYYOSS.js +2 -0
- package/dist/chunks/{chunk-LV3CQ72P.js → chunk-I6VMRQF4.js} +1 -1
- package/dist/chunks/{chunk-QU4UE73E.js → chunk-IEVJLG3V.js} +1 -1
- package/dist/chunks/chunk-IOSBGCRT.js +2 -0
- package/dist/chunks/{chunk-SO42ZB5K.js → chunk-JBFPTEVE.js} +1 -1
- package/dist/chunks/{chunk-G32BO6M5.js → chunk-JD76ANPN.js} +1 -1
- package/dist/chunks/{chunk-ERJV5BMC.js → chunk-JFZ6USNQ.js} +1 -1
- package/dist/chunks/{chunk-UPWJSNL5.js → chunk-JLW5BQVO.js} +1 -1
- package/dist/chunks/chunk-JRGECNP3.js +2 -0
- package/dist/chunks/{chunk-DABBHWSF.js → chunk-KAWXVMHI.js} +1 -1
- package/dist/chunks/chunk-KGUPAPGR.js +2 -0
- package/dist/chunks/{chunk-AHOBCBVZ.js → chunk-KOKBDIGR.js} +1 -1
- package/dist/chunks/chunk-KTIBXRWQ.js +2 -0
- package/dist/chunks/chunk-L4EJ5R3B.js +23 -0
- package/dist/chunks/{chunk-SI5W5LBV.js → chunk-LARJARMS.js} +1 -1
- package/dist/chunks/{chunk-MPNJ2BB4.js → chunk-LE75SVEL.js} +1 -1
- package/dist/chunks/{chunk-ERT32RZA.js → chunk-LI3FTPAH.js} +5 -5
- package/dist/chunks/chunk-LK77GI6M.js +2 -0
- package/dist/chunks/chunk-LOIYNRBC.js +33 -0
- package/dist/chunks/{chunk-7WYL2IDD.js → chunk-LXZLLTYQ.js} +1 -1
- package/dist/chunks/{chunk-RZUCVF2Q.js → chunk-LYVHYT3L.js} +1 -1
- package/dist/chunks/{chunk-MWXW2CA6.js → chunk-LZPCA6DH.js} +1 -1
- package/dist/chunks/{chunk-GVARQXYI.js → chunk-M5QPL5NO.js} +1 -1
- package/dist/chunks/{chunk-WWQNMC7C.js → chunk-MCBRB5D6.js} +1 -1
- package/dist/chunks/chunk-MHPCVQOE.js +2 -0
- package/dist/chunks/chunk-MMJU6PZV.js +2 -0
- package/dist/chunks/chunk-MVPKU72J.js +4 -0
- package/dist/chunks/{chunk-AGVOGPAZ.js → chunk-MWS2NAHJ.js} +1 -1
- package/dist/chunks/{chunk-R6WMY6AH.js → chunk-NTM3KQ25.js} +1 -1
- package/dist/chunks/chunk-NXN7GJOH.js +2 -0
- package/dist/chunks/chunk-O6ZYDHEJ.js +3 -0
- package/dist/chunks/chunk-OKEC2EIE.js +2 -0
- package/dist/chunks/{chunk-KCV5VN4X.js → chunk-OKKNDQJF.js} +1 -1
- package/dist/chunks/{chunk-ZYVHOVKL.js → chunk-OPTJYDZN.js} +1 -1
- package/dist/chunks/{chunk-NJLULBTM.js → chunk-OTDDXEQ6.js} +1 -1
- package/dist/chunks/{chunk-RDSVU6F6.js → chunk-OTUS7NTQ.js} +1 -1
- package/dist/chunks/{chunk-UH4JSSRL.js → chunk-OTXGAKFH.js} +8 -8
- package/dist/chunks/chunk-OW3EOC5Q.js +4 -0
- package/dist/chunks/chunk-OXRVILDW.js +2 -0
- package/dist/chunks/{chunk-JEISPWWM.js → chunk-PWKJ5KLZ.js} +1 -1
- package/dist/chunks/{chunk-RFMME46Z.js → chunk-PYNW5OFA.js} +1 -1
- package/dist/chunks/{chunk-AKGCM53D.js → chunk-Q3WXB465.js} +1 -1
- package/dist/chunks/{chunk-KHTAAVC2.js → chunk-Q4AXZY2P.js} +1 -1
- package/dist/chunks/{chunk-QJ6KUVAR.js → chunk-QAEZNFAM.js} +1 -1
- package/dist/chunks/{chunk-ABF3W2MO.js → chunk-QAFXQHHG.js} +2 -2
- package/dist/chunks/chunk-QCJY6FTC.js +3 -0
- package/dist/chunks/{chunk-5MHYGMJG.js → chunk-QJJNHKLT.js} +1 -1
- package/dist/chunks/{chunk-ERL2M773.js → chunk-QYQZQVVN.js} +1 -1
- package/dist/chunks/{chunk-VVNV4NNW.js → chunk-RCT3O3HQ.js} +1 -1
- package/dist/chunks/{chunk-7R56WC7L.js → chunk-RHMULF56.js} +1 -1
- package/dist/chunks/chunk-RRWL5BHZ.js +2 -0
- package/dist/chunks/{chunk-RG3NH6YQ.js → chunk-S4WILIRA.js} +1 -1
- package/dist/chunks/{chunk-N33D7KCW.js → chunk-S6UCVXBC.js} +1 -1
- package/dist/chunks/{chunk-IHB5GTOJ.js → chunk-SAZTOGX6.js} +3 -3
- package/dist/chunks/{chunk-2EPR4HLF.js → chunk-SH7POUVX.js} +6 -6
- package/dist/chunks/chunk-SQX22LQT.js +10 -0
- package/dist/chunks/{chunk-NLYZ5K7U.js → chunk-SSJV3VX7.js} +1 -1
- package/dist/chunks/chunk-TBODQT4W.js +2 -0
- package/dist/chunks/chunk-TGULVWPV.js +2 -0
- package/dist/chunks/{chunk-HIYQPZ7C.js → chunk-TPOAAJKA.js} +1 -1
- package/dist/chunks/{chunk-42V4NV2F.js → chunk-TVDZXDQW.js} +1 -1
- package/dist/chunks/{chunk-FVRII5XO.js → chunk-U2BD545L.js} +1 -1
- package/dist/chunks/chunk-UK5LGSGT.js +2 -0
- package/dist/chunks/{chunk-HFJUXKT5.js → chunk-ULJZ7NUF.js} +1 -1
- package/dist/chunks/chunk-UN2LKLGV.js +2 -0
- package/dist/chunks/{chunk-4NXEYPPX.js → chunk-UOFDKMRU.js} +1 -1
- package/dist/chunks/{chunk-2ITZW2CN.js → chunk-UTIELP6F.js} +1 -1
- package/dist/chunks/{chunk-NWQL6FNF.js → chunk-V3KEG6MI.js} +1 -1
- package/dist/chunks/{chunk-BPZOABMC.js → chunk-V3S2B6WU.js} +2 -2
- package/dist/chunks/{chunk-ZG6353RM.js → chunk-VD2TQCMH.js} +1 -1
- package/dist/chunks/{chunk-4ZBOYWQ3.js → chunk-VS2LOUCT.js} +1 -1
- package/dist/chunks/{chunk-V7KR74NO.js → chunk-VS3AMJEK.js} +1 -1
- package/dist/chunks/{chunk-YCZZ62C2.js → chunk-W22KWKF6.js} +1 -1
- package/dist/chunks/chunk-W7NXFRHN.js +2 -0
- package/dist/chunks/{chunk-DTTFUANI.js → chunk-WBO6FQHR.js} +2 -2
- package/dist/chunks/{chunk-5ZBLCWEJ.js → chunk-WJSJXK2N.js} +1 -1
- package/dist/chunks/{chunk-C2LAEGOW.js → chunk-WKHGXLJD.js} +2 -2
- package/dist/chunks/{chunk-H6C4MAUN.js → chunk-WLQEONBF.js} +1 -1
- package/dist/chunks/chunk-WLZJOCLA.js +10 -0
- package/dist/chunks/chunk-WMBOXX7G.js +2 -0
- package/dist/chunks/{chunk-PF56N7ZY.js → chunk-X2J2P5ZT.js} +5 -5
- package/dist/chunks/{chunk-AH26AQN7.js → chunk-XHBMK6LC.js} +1 -1
- package/dist/chunks/{chunk-ZZHXQCNB.js → chunk-Y3B6ZUE6.js} +1 -1
- package/dist/chunks/{chunk-WP2L2NY2.js → chunk-YBKDEEEH.js} +1 -1
- package/dist/chunks/chunk-YRDPVTEI.js +3 -0
- package/dist/chunks/{chunk-JORRZ4BB.js → chunk-YU4JYWCA.js} +1 -1
- package/dist/chunks/{chunk-CZ5R4JXZ.js → chunk-Z2TOBS3P.js} +1 -1
- package/dist/chunks/chunk-ZFJWA4JK.js +1 -0
- package/dist/chunks/chunk-ZSZXA7WB.js +2 -0
- package/dist/chunks/{chunk-LK2K3SPM.js → chunk-ZU3YBRXS.js} +2 -2
- package/dist/chunks/{chunk-5FU5RLML.js → chunk-ZUT4EM64.js} +1 -1
- package/dist/chunks/chunk-ZWW227M3.js +2 -0
- package/dist/chunks/chunk-ZY32SZ2P.js +3 -0
- package/dist/chunks/cli-TE7RP5H7.js +2 -0
- package/dist/chunks/client-I5MYOJEJ.js +2 -0
- package/dist/chunks/command-NDHFZAKA.js +13 -0
- package/dist/chunks/configuration-command-HPMGH7WR.js +2 -0
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +2 -0
- package/dist/chunks/connected-evidence-FNHTBUDG.js +2 -0
- package/dist/chunks/{connected-starting-assets-JONPTII6.js → connected-starting-assets-O4X6D6BG.js} +1 -1
- package/dist/chunks/connection-GDWPMHPC.js +2 -0
- package/dist/chunks/{continual-Z7MO2PF6.js → continual-HQCFY7GN.js} +3 -3
- package/dist/chunks/core-commands-LEFFBKR7.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +4 -0
- package/dist/chunks/datasets-BWHI23IB.js +2 -0
- package/dist/chunks/desktop-test-XROQ7K5H.js +3 -0
- package/dist/chunks/dist-GR56E3QK.js +2 -0
- package/dist/chunks/dist-J4KHAVO3.js +2 -0
- package/dist/chunks/dist-O7HXZUBW.js +2 -0
- package/dist/chunks/enclave-7VLABNIX.js +2 -0
- package/dist/chunks/evaluation-coordination-JTQIKHW6.js +2 -0
- package/dist/chunks/experiment-improvements-2TV2DA3K.js +2 -0
- package/dist/chunks/experiments-VOCZ4DW3.js +2 -0
- package/dist/chunks/experiments-VUJ4SEMG.js +2 -0
- package/dist/chunks/experiments-signal-TSTEBORD.js +2 -0
- package/dist/chunks/{extension-ZM6NI5O5.js → extension-UH34ZF7N.js} +1 -1
- package/dist/chunks/{help-7HXFWIKS.js → help-OPN36XRA.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +2 -0
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +2 -0
- package/dist/chunks/hosted-app-server-composition-7WZ4RIX2.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +3 -0
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +2 -0
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +3 -0
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +3 -0
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +2 -0
- package/dist/chunks/human-review-NVKBEYG5.js +2 -0
- package/dist/chunks/{import-6SI4BEKS.js → import-P5DCYMQ6.js} +2 -2
- package/dist/chunks/learning-NJLTGZFQ.js +2 -0
- package/dist/chunks/learning-XTY5VOTK.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +2 -0
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +2 -0
- package/dist/chunks/local-scope-X3737QXT.js +2 -0
- package/dist/chunks/model-projects-GHWCKDON.js +2 -0
- package/dist/chunks/opchat-ZJ5DO4RT.js +3 -0
- package/dist/chunks/opchat-bounded-chat-JVZ5LRH2.js +2 -0
- package/dist/chunks/organizations-UKXORVYS.js +2 -0
- package/dist/chunks/{profile-O5HL5DTQ.js → profile-XL5LABHR.js} +1 -1
- package/dist/chunks/profile-training-source-VIND2MM2.js +2 -0
- package/dist/chunks/project-action-payload-2G57RL74.js +2 -0
- package/dist/chunks/project-agent-CCGEMNR7.js +2 -0
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +2 -0
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +2 -0
- package/dist/chunks/{runtime-XBA744HJ.js → runtime-VSOOPNYN.js} +2 -2
- package/dist/chunks/sandbox-command-L6BMKDGY.js +2 -0
- package/dist/chunks/{sandbox-template-27U3FQN7.js → sandbox-template-QL5ID5GJ.js} +1 -1
- package/dist/chunks/saved-work-LAVTNKPT.js +2 -0
- package/dist/chunks/send-turn-D3GTSSHI.js +2 -0
- package/dist/chunks/setup-HSRCZ3WR.js +2 -0
- package/dist/chunks/{src-PU7QTFO5.js → src-662QOKNP.js} +1 -1
- package/dist/chunks/{src-BLWX6DRG.js → src-KWOSLOBH.js} +117 -117
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +2 -0
- package/dist/chunks/stdio-Z65UIX55.js +2 -0
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-FOMYYS25.js → store-continual-support-reviews-7PDLGRWF.js} +1 -1
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +2 -0
- package/dist/chunks/{store-create-improve-3LQMIYAP.js → store-create-improve-G46KIUVT.js} +1 -1
- package/dist/chunks/{store-datasets-3KSX7RSO.js → store-datasets-O67F75BL.js} +1 -1
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +7 -0
- package/dist/chunks/{store-harness-memory-2L7ARBR4.js → store-harness-memory-4XEUITXE.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-3PHL3BUY.js → store-harness-refinement-candidates-LCN4NV23.js} +1 -1
- package/dist/chunks/store-harness-workspaces-PJJQ74G6.js +2 -0
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +2 -0
- package/dist/chunks/store-learning-6P6IS7GH.js +2 -0
- package/dist/chunks/store-learning-credentials-EGJ2WTZI.js +2 -0
- package/dist/chunks/{store-local-experiments-QTVHJAEP.js → store-local-experiments-CBJA56X2.js} +1 -1
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +2 -0
- package/dist/chunks/{store-model-configuration-3SU73CMS.js → store-model-configuration-T6XJJDAB.js} +2 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +2 -0
- package/dist/chunks/{store-preference-comparison-DWV5XSMY.js → store-preference-comparison-XQFTLMGH.js} +1 -1
- package/dist/chunks/{store-schedules-2KUY4T6M.js → store-schedules-JPFVWL3Q.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-A4XCS7RM.js → store-sidebar-file-bookmarks-J3JEVAYR.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-V2PKRXUZ.js → store-sidebar-preferences-2JHTFXJK.js} +1 -1
- package/dist/chunks/{store-subagents-UGVEFA6M.js → store-subagents-PUBQVWSU.js} +1 -1
- package/dist/chunks/{store-task-inbox-QABI4ZAH.js → store-task-inbox-VVXZUJIO.js} +1 -1
- package/dist/chunks/{store-task-inventory-GEQIZELY.js → store-task-inventory-MQX44AI6.js} +1 -1
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +9 -0
- package/dist/chunks/{store-training-CQV7PL3V.js → store-training-DUVIDYK5.js} +1 -1
- package/dist/chunks/{store-training-jobs-XKN6K66J.js → store-training-jobs-HHFH3V5O.js} +1 -1
- package/dist/chunks/{store-training-models-Q7DTTR4S.js → store-training-models-C7UUZDTO.js} +1 -1
- package/dist/chunks/{store-usage-XGAX7NLB.js → store-usage-6DMZM7WV.js} +1 -1
- package/dist/chunks/{store-work-evidence-VSLLZ6UF.js → store-work-evidence-77B36LRC.js} +1 -1
- package/dist/chunks/taskset-7FQCJ55X.js +2 -0
- package/dist/chunks/taskset-packages-NRRPON7B.js +2 -0
- package/dist/chunks/taskset-packages-RW4SFGDU.js +2 -0
- package/dist/chunks/{teams-bot-UTQAJA6H.js → teams-bot-LGV7UKX2.js} +1 -1
- package/dist/chunks/tool-learning-NGO7QHYK.js +2 -0
- package/dist/chunks/training-XFM3OOPN.js +2 -0
- package/dist/chunks/training-XILDD5RG.js +2 -0
- package/dist/chunks/training-error-LQKCOQDJ.js +2 -0
- package/dist/chunks/training-hardware-ESXRWUIK.js +3 -0
- package/dist/chunks/training-hosted-6BX2IASC.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +2 -0
- package/dist/chunks/training-hosted-learning-YN5VD3PW.js +2 -0
- package/dist/chunks/training-hosted-serving-N2MHWGZN.js +2 -0
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +2 -0
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +2 -0
- package/dist/chunks/training-model-start-E5MP3URL.js +2 -0
- package/dist/chunks/web-search-56QRZGPR.js +2 -0
- package/dist/chunks/workspaces-MCS2AQX6.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/App-BZuSv1XM.js +53 -0
- package/dist/web/assets/{AppDialog-8Y0FYalT.js → AppDialog-BILEK4np.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-BvxZ8bwD.js +2 -0
- package/dist/web/assets/{AppToastContext-BiQbbVxq.js → AppToastContext-C-FsCKXW.js} +1 -1
- package/dist/web/assets/{AppsView-Dtte4h6e.js → AppsView-BMaq5oxx.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DgADV7dn.js → AttachmentTypeIcon-Bh7Ft_UL.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BUqDvEv9.js → BrowserSidebar-BG2MLJ9I.js} +1 -1
- package/dist/web/assets/{CartesianChart-J4ChOjvG.js → CartesianChart-CS6ES_XT.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-Dr5X_XyN.js +8 -0
- package/dist/web/assets/{ChatTimelineEntry-DztFb85D.css → ChatTimelineEntry-vs8RaEGD.css} +1 -1
- package/dist/web/assets/{CollaborationTabs-CFCpk2Ck.js → CollaborationTabs-CPJ2w67F.js} +1 -1
- package/dist/web/assets/{CommandMenu-EPPjB14H.js → CommandMenu-Fe1V7NJd.js} +1 -1
- package/dist/web/assets/{CommunityView-Okydjpqm.js → CommunityView-DHTcmOnI.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-RXCiE88M.js → ComposerAttachments-Ck9VWD6o.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-CSngc8-V.js → ComposerCreateImproveStrip-yiXO7cf8.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-DS73kyfj.js → ConversationImportsSettings-_VLzUnHQ.js} +1 -1
- package/dist/web/assets/{FilePagePreview-Qc4B0vue.js → FilePagePreview-BpcM1DfE.js} +2 -2
- package/dist/web/assets/{GetStartedView-DGFPQ1We.js → GetStartedView-BH-WJ-rW.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-DFBYQdHz.js → GettingStartedDialog-CdQfj7RA.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-BDu3FlcU.js → HostedModelLearningReview-C3GsOlu9.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-CHaTHwC8.js → HostedModelLearningSettings-SSMst6dl.js} +1 -1
- package/dist/web/assets/{HtmlVisual-D9Mh7xds.js → HtmlVisual-CH0tb3fv.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-DgY7lAu5.js → LabModelVersionDetailPage-J2t9yILv.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BwtlThO7.js → LabSkillSidebar-DdDYvfj2.js} +1 -1
- package/dist/web/assets/LabsRoute-MJwIjSKg.js +101 -0
- package/dist/web/assets/MainChatThread-BcwtaTDZ.js +2 -0
- package/dist/web/assets/MainPane-DDO6diPt.js +10 -0
- package/dist/web/assets/NativeSetupTerminal-BPSUFpRm.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-BEJvt5_H.js → NativeSkillSidebar-DPYavzau.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CjrjgkTN.js → NewProjectDialog-BtmvE9Sp.js} +1 -1
- package/dist/web/assets/{OutputsPage-jzx93QQ3.js → OutputsPage-BMRY7RK2.js} +1 -1
- package/dist/web/assets/{PageChrome-C1M13qG2.js → PageChrome-5VRxH6Rp.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DZrjlMp2.js → ProjectsPage-1LHqxOMo.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-D_7KgExz.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-iznJwDMf.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-Cw1ja2GF.js → ScheduledWorkPage-Dtz4zJ0T.js} +1 -1
- package/dist/web/assets/{SettingsView-CckoIki3.js → SettingsView-BeDYNPcD.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-ByC8bDjp.js → TasksetDraftEditorPrimitives-CcvKO3YA.js} +1 -1
- package/dist/web/assets/{TeamChatView-OprnSKLF.js → TeamChatView-DaXxOkTe.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-d7A2F9Lx.js → TerminalOverlay-CF8uB4qA.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-Cyn6R6I6.js → TrainingCreationPanel-DmMO7x5T.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-Mpb5e7t5.js → TrainingDraftPanel-DCHbXjSx.js} +1 -1
- package/dist/web/assets/{TrainingRunLineage-VcKz7dIR.js → TrainingRunLineage-CwisTWs_.js} +1 -1
- package/dist/web/assets/UsageSettingsSection-Drt7gwRb.js +7 -0
- package/dist/web/assets/WorkSidebarPanel-BrIIRtGW.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-Dmbrg0-y.js +11 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-C8y3537a.js → WorkspaceEnvironmentMenu-KEZm1gdb.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-LrEWj4UK.js → WorkspaceFileLocation-ChbOKrPO.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-NRIMXnkS.js → WorkspaceGitDialogs-BS2JQKNQ.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CvDGjKAL.js → WorkspaceMonacoEditor-CN1hE_C4.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-BZ0BbnHv.js → WorkspacePdfPreview-Clb4m0le.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DJrjrvT0.js → WorkspacePresentationPreview-CwQsdvAR.js} +1 -1
- package/dist/web/assets/app-models-Cz3yxq4x.js +1 -0
- package/dist/web/assets/{bot-6OhUEmkE.js → bot-BNFltD5O.js} +1 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +1 -0
- package/dist/web/assets/{chevron-down-jmVA1BIf.js → chevron-down-BnnT0tnM.js} +1 -1
- package/dist/web/assets/chevron-right-C8K5PZj7.js +1 -0
- package/dist/web/assets/{chevron-up-CstyLXH3.js → chevron-up-BAnwJJN3.js} +1 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +9 -0
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +1 -0
- package/dist/web/assets/{client-choice-storage-BdQ_YDuk.js → client-choice-storage-Iuzoszas.js} +1 -1
- package/dist/web/assets/{cloud-upload-Ck1ufAr8.js → cloud-upload-CdSXJ7ms.js} +1 -1
- package/dist/web/assets/{copy-CPkbMfXt.js → copy-CBFg6m0d.js} +1 -1
- package/dist/web/assets/{createLucideIcon-CXQny8HU.js → createLucideIcon-DF2VR6WA.js} +1 -1
- package/dist/web/assets/{cssMode-CYxYl_om.js → cssMode-BSQUZhUO.js} +1 -1
- package/dist/web/assets/{external-link-CDKOLG_v.js → external-link-Cql9bKdv.js} +1 -1
- package/dist/web/assets/{folder-open-CEtOb_lK.js → folder-open-BXdVB5J1.js} +1 -1
- package/dist/web/assets/{folder-plus-CVMYZs3e.js → folder-plus-Cma2HulC.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DDyhPjxS.js → git-commit-horizontal-eF--16ps.js} +1 -1
- package/dist/web/assets/{htmlMode-DoY4V_j0.js → htmlMode-aLPlQtyU.js} +1 -1
- package/dist/web/assets/icons-c3vt7y6n.js +1 -0
- package/dist/web/assets/{image-B-PjDSwU.js → image-CqKPwnBn.js} +1 -1
- package/dist/web/assets/{index-D9WbJMSq.js → index-CM0IRu1U.js} +2 -2
- package/dist/web/assets/{info-CCnw-K3b.js → info-CqeYEqG0.js} +1 -1
- package/dist/web/assets/{jsonMode-CeOpZdPj.js → jsonMode-fu7bEcHB.js} +1 -1
- package/dist/web/assets/loader-circle-pxp89T5x.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DAbgLCqZ.js → lspLanguageFeatures-DraXQA4w.js} +1 -1
- package/dist/web/assets/{maximize-2-BZX38cpr.js → maximize-2-yMp8X9ts.js} +1 -1
- package/dist/web/assets/{message-square-CvgSecgD.js → message-square-DbIMQqfj.js} +1 -1
- package/dist/web/assets/model-display-zPvC4L2B.js +1 -0
- package/dist/web/assets/models-route-CWcJuOd0.js +1 -0
- package/dist/web/assets/{monaco.contribution-cbDqt48m.js → monaco.contribution-BQhp1CJs.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CF2JDhi4.js → monaco.contribution-Bd8EqYGR.js} +2 -2
- package/dist/web/assets/{monaco.contribution-m2ze2EsL.js → monaco.contribution-CYWKnVxQ.js} +2 -2
- package/dist/web/assets/{monaco.contribution-yeyow_-Q.js → monaco.contribution-CmbWO0tB.js} +2 -2
- package/dist/web/assets/{monitor-By0s4hxb.js → monitor-DFE2fTkT.js} +1 -1
- package/dist/web/assets/{paperclip-BJ2QgJLa.js → paperclip-D_qsKbVs.js} +1 -1
- package/dist/web/assets/{pdf-C4x-1jjP.js → pdf-DkQRsi4n.js} +1 -1
- package/dist/web/assets/play-BtlX2stU.js +1 -0
- package/dist/web/assets/plus-DbASL_gy.js +1 -0
- package/dist/web/assets/{presentation-I86G1Gd9.js → presentation-BN_kIBPL.js} +1 -1
- package/dist/web/assets/{python-CqFTPj8r.js → python-DB9pj5Hr.js} +1 -1
- package/dist/web/assets/{refresh-cw-Dga35Eay.js → refresh-cw-B27ohHfn.js} +1 -1
- package/dist/web/assets/{save-BLKjYtzR.js → save-D-rwjKop.js} +1 -1
- package/dist/web/assets/settings-lists-DgSaJQA4.js +5 -0
- package/dist/web/assets/square-C2caJ3NG.js +1 -0
- package/dist/web/assets/{square-terminal-B-n7vUex.js → square-terminal-CeoK51wH.js} +1 -1
- package/dist/web/assets/{submit-issue-command-B7Hrt2tU.js → submit-issue-command-DZNW7Evj.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BhmBE5XE.js → toggleHighContrast-Bs8L1gx0.js} +1 -1
- package/dist/web/assets/{training-QrdkRQZQ.js → training-DCdoHJ0Y.js} +2 -2
- package/dist/web/assets/{training-model-data-DB-jg6L_.js → training-model-data-wHvE7xL1.js} +1 -1
- package/dist/web/assets/{tsMode-BSWEII2p.js → tsMode-C7EqshxC.js} +1 -1
- package/dist/web/assets/{upload-C4MPhQn8.js → upload-BWgjC2Jf.js} +1 -1
- package/dist/web/assets/{useAccountSettings-9oqWdRLs.js → useAccountSettings-Dva1MpsJ.js} +1 -1
- package/dist/web/assets/{useAgentInventory-isO79ui9.js → useAgentInventory-CrjIOmvb.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CZX6PxoK.js → useLocalAgentSchedules-P-UaUKMb.js} +1 -1
- package/dist/web/assets/{useQuery-BD0Uexmh.js → useQuery-Bn3KqR4r.js} +1 -1
- package/dist/web/assets/{wifi-off-Cloe0WuQ.js → wifi-off--mKrSPFc.js} +1 -1
- package/dist/web/assets/{workers-BXagz5eg.js → workers-p0Kn2KMK.js} +1 -1
- package/dist/web/assets/x-D9GTV9ke.js +1 -0
- package/dist/web/assets/{yaml-sBdvVbCc.js → yaml-BeIdC4tu.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +44 -2
- package/package.json +1 -1
- package/dist/chunks/acp-H3MJCPHX.js +0 -2
- package/dist/chunks/acp-agent-DWA7272M.js +0 -21
- package/dist/chunks/actions-command-IIYOO4LL.js +0 -2
- package/dist/chunks/app-layer-K7H2WJ56.js +0 -3
- package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +0 -2
- package/dist/chunks/app-server-evaluations-XGMGS67X.js +0 -2
- package/dist/chunks/app-server-harness-services-BHD6S5II.js +0 -2
- package/dist/chunks/app-server-runtime-LFIL6F7D.js +0 -2
- package/dist/chunks/apps-QKAHJGQ4.js +0 -2
- package/dist/chunks/chunk-5EP2DZLJ.js +0 -2
- package/dist/chunks/chunk-6EBCS57F.js +0 -2
- package/dist/chunks/chunk-6RS4NAOY.js +0 -2
- package/dist/chunks/chunk-7O6Z3VOZ.js +0 -2
- package/dist/chunks/chunk-7YLXGILH.js +0 -2
- package/dist/chunks/chunk-7ZLXFKRI.js +0 -2
- package/dist/chunks/chunk-B5R53U74.js +0 -2
- package/dist/chunks/chunk-C2AXMKK4.js +0 -2
- package/dist/chunks/chunk-F6UQ6PPK.js +0 -2
- package/dist/chunks/chunk-GS6ZUSIN.js +0 -3
- package/dist/chunks/chunk-JSQRLLN6.js +0 -2
- package/dist/chunks/chunk-LAOLJDVB.js +0 -2
- package/dist/chunks/chunk-LKKMLBOH.js +0 -3
- package/dist/chunks/chunk-M3FLEZ4E.js +0 -4
- package/dist/chunks/chunk-MEGKXGW3.js +0 -2
- package/dist/chunks/chunk-MILEWROZ.js +0 -2
- package/dist/chunks/chunk-N42HT64M.js +0 -2
- package/dist/chunks/chunk-NG2L6D7G.js +0 -2
- package/dist/chunks/chunk-OSVGNONV.js +0 -2
- package/dist/chunks/chunk-OTUBJV6C.js +0 -6
- package/dist/chunks/chunk-PBTXLQAU.js +0 -2
- package/dist/chunks/chunk-PBZCXPPC.js +0 -10
- package/dist/chunks/chunk-SFKZITAG.js +0 -9
- package/dist/chunks/chunk-SXMR6E2W.js +0 -2
- package/dist/chunks/chunk-U2K7QJCG.js +0 -2
- package/dist/chunks/chunk-URNMC46H.js +0 -157
- package/dist/chunks/chunk-VHXDWAEH.js +0 -2
- package/dist/chunks/chunk-W2TICQ62.js +0 -2
- package/dist/chunks/chunk-WSOUMXH3.js +0 -24
- package/dist/chunks/chunk-XOB6FKQV.js +0 -2
- package/dist/chunks/chunk-YBNKGA5C.js +0 -2
- package/dist/chunks/chunk-YM4PSVFW.js +0 -4
- package/dist/chunks/chunk-YNQWJWIC.js +0 -10
- package/dist/chunks/chunk-Z3BWCFLV.js +0 -2
- package/dist/chunks/cli-PSXMIJTF.js +0 -2
- package/dist/chunks/configuration-command-XYKMXIWF.js +0 -2
- package/dist/chunks/connected-app-executor-6G2LA3PQ.js +0 -2
- package/dist/chunks/connected-evidence-IRXYN6YD.js +0 -2
- package/dist/chunks/connection-XMAAGMXJ.js +0 -2
- package/dist/chunks/core-commands-WWN7X3XC.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +0 -4
- package/dist/chunks/datasets-2PC2HP7N.js +0 -2
- package/dist/chunks/desktop-test-VU6AFAMO.js +0 -3
- package/dist/chunks/dist-47AYOIH6.js +0 -2
- package/dist/chunks/dist-HSC43RG4.js +0 -2
- package/dist/chunks/dist-MXBEBM4D.js +0 -2
- package/dist/chunks/enclave-VURYNILU.js +0 -2
- package/dist/chunks/evaluation-coordination-UOWZHHC5.js +0 -2
- package/dist/chunks/experiment-improvements-EB2CV5RA.js +0 -2
- package/dist/chunks/experiments-CLXGM3TZ.js +0 -2
- package/dist/chunks/experiments-SZQYR6MH.js +0 -2
- package/dist/chunks/experiments-signal-2KJCP25D.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +0 -2
- package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +0 -2
- package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +0 -3
- package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +0 -2
- package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +0 -3
- package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-2LSMZQNA.js +0 -3
- package/dist/chunks/hosted-tasksets-WGXGXJ7E.js +0 -2
- package/dist/chunks/human-review-M26UKGJL.js +0 -2
- package/dist/chunks/learning-HM3NWOV5.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +0 -2
- package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +0 -2
- package/dist/chunks/local-scope-62GWHDXS.js +0 -2
- package/dist/chunks/model-projects-YUAMBQTO.js +0 -2
- package/dist/chunks/opchat-AG4CWVY4.js +0 -3
- package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +0 -2
- package/dist/chunks/organizations-KDKX77XZ.js +0 -2
- package/dist/chunks/profile-training-source-3DXFM2XI.js +0 -2
- package/dist/chunks/project-action-payload-QA24HYGF.js +0 -2
- package/dist/chunks/project-agent-XBOOM5TS.js +0 -2
- package/dist/chunks/published-experiment-source-GZGN354O.js +0 -2
- package/dist/chunks/refiner-profile-service-BJMOYKTC.js +0 -2
- package/dist/chunks/sandbox-command-5ECGS7DG.js +0 -2
- package/dist/chunks/saved-work-KUNVTJ7O.js +0 -2
- package/dist/chunks/send-turn-FIPWOXWV.js +0 -2
- package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +0 -2
- package/dist/chunks/store-chat-resources-YOEJ2BI6.js +0 -2
- package/dist/chunks/store-conversation-serving-K324SQTO.js +0 -2
- package/dist/chunks/store-evaluation-results-LHCCNNE6.js +0 -7
- package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +0 -2
- package/dist/chunks/store-human-review-QJY3ZPPF.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +0 -2
- package/dist/chunks/store-learning-DW3QLQXU.js +0 -2
- package/dist/chunks/store-learning-credentials-67QNTPA7.js +0 -2
- package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +0 -2
- package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +0 -2
- package/dist/chunks/store-taskset-drafts-GXABQR5G.js +0 -9
- package/dist/chunks/taskset-ARKJQKYQ.js +0 -2
- package/dist/chunks/taskset-packages-X4K65DTW.js +0 -2
- package/dist/chunks/taskset-packages-XK7FSD45.js +0 -2
- package/dist/chunks/training-3IWW4256.js +0 -2
- package/dist/chunks/training-RVIESURJ.js +0 -2
- package/dist/chunks/training-error-2EWDOQ4G.js +0 -2
- package/dist/chunks/training-hosted-PFJHYTEU.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +0 -2
- package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +0 -2
- package/dist/chunks/training-hosted-serving-QAV7ZGGV.js +0 -2
- package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +0 -2
- package/dist/chunks/training-hosted-workers-LST4ZUXN.js +0 -2
- package/dist/chunks/training-model-start-ROLS3E4V.js +0 -2
- package/dist/chunks/web-search-7FBUBZ66.js +0 -2
- package/dist/chunks/workspaces-G3CMY7ZA.js +0 -2
- package/dist/web/assets/App-DY2R8Z6r.js +0 -53
- package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +0 -2
- package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +0 -8
- package/dist/web/assets/LabsRoute-BV7ZJGEw.js +0 -101
- package/dist/web/assets/MainChatThread-pzHKd_YN.js +0 -2
- package/dist/web/assets/MainPane-6OlLiKKb.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +0 -2
- package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +0 -1
- package/dist/web/assets/UsageSettingsSection-FhYymrfc.js +0 -7
- package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +0 -11
- package/dist/web/assets/app-models-CUA9XB9U.js +0 -1
- package/dist/web/assets/chat-resources-CI8KFVO5.js +0 -1
- package/dist/web/assets/chevron-right-BYmDQ7ti.js +0 -1
- package/dist/web/assets/chunk-ONGOAEY6-C__DQmRT.js +0 -9
- package/dist/web/assets/chunk-SQBYHWZU-DumrB9SB.js +0 -1
- package/dist/web/assets/icons-D7jkCa2d.js +0 -1
- package/dist/web/assets/loader-circle-CPaJeTDy.js +0 -1
- package/dist/web/assets/models-route-Bl_TmMl6.js +0 -1
- package/dist/web/assets/play-D_SuGDBM.js +0 -1
- package/dist/web/assets/plus-yw95Iaj8.js +0 -1
- package/dist/web/assets/settings-lists-DMKA1lCN.js +0 -5
- package/dist/web/assets/square-BY5lG2Ol.js +0 -1
- package/dist/web/assets/x-Dqpel42h.js +0 -1
- /package/dist/chunks/{chunk-IDOGNIMV.js → chunk-7J2NMUTK.js} +0 -0
- /package/dist/chunks/{chunk-PCB65K4G.js → chunk-SFR32TMJ.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as ve}from"./chunk-L3KS6MOV.js";import{b as I,f as $}from"./chunk-
|
|
2
|
+
import{a as ve}from"./chunk-L3KS6MOV.js";import{b as I,f as $}from"./chunk-ULJZ7NUF.js";import{E as ke,F as Re}from"./chunk-SH7POUVX.js";import{f as U}from"./chunk-UGOK7VTC.js";import{a as s}from"./chunk-FTQLQJQV.js";import{createRequire as at}from"node:module";import{createHash as Qe,randomUUID as et}from"node:crypto";import{spawn as uo}from"node:child_process";import{existsSync as S}from"node:fs";import{cp as fo,mkdir as x,readFile as st,readdir as it,rename as Pe,rm as we,symlink as po,writeFile as z}from"node:fs/promises";import u from"node:path";function ne(e=null){return{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!0,error:e}}s(ne,"emptyProfileCatalogState");function re(e=null){return{skillCount:0,generatedAt:null,stale:!0,error:e}}s(re,"emptyProfileSkillCatalogState");function ae(){return{status:"ready",requirementCount:0,blockingCount:0,optionalMissingCount:0,readyCount:0,requirements:[],blockingRequirements:[]}}s(ae,"emptyProfileSetupGate");function K(){return{changedAgents:[],newAgents:[],deletedAgents:[],changedSkills:[],changedActions:[],changedExtensions:[],setupChanges:[],envRequirementChanges:[],files:[]}}s(K,"emptyProfileDiffSummary");function se(e=null){return{state:e?"error":"none",message:e??"No active OpenPond profile.",agentCount:0,actionCount:0,defaultAction:null,checkFresh:!1,checkStaleReason:e??"No active profile.",localHead:null,hostedHead:null}}s(se,"emptyProfileSummary");import{existsSync as G}from"node:fs";import{readFile as It,stat as kt}from"node:fs/promises";import V from"node:path";var be=".openpond/agent-manifest.json",Ee=".openpond/action-registry.json",Rt=".openpond/source-upload-metadata.json",vt=".openpond/agent-package-origin.json";async function _e(e){return Me({agentId:"default",sourcePath:e,preferred:!0})}s(_e,"loadProfileActionCatalog");async function $e(e){if(e.length===0)return{catalog:{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!1,error:null},actionCatalog:[],sourceSetupRequirements:[]};let t=[...e.filter(c=>c.preferred),...e.filter(c=>!c.preferred)],o=await Promise.all(t.map(Me)),n=new Map,r=[];for(let c of o)for(let l of c.actionCatalog){let d=n.has(l.id)?`${l.agentId??"agent"}.${l.sourceActionId??l.id}`:l.id,p=d===l.id?l:{...l,id:d};n.set(d,p),r.push(p)}let a=Et(o.map(c=>c.catalog.generatedAt)),i=o.map(c=>c.catalog.error).filter(Boolean);return{catalog:{actionCount:r.length,generatedAt:a,manifestPath:o.find(c=>c.catalog.manifestPath)?.catalog.manifestPath??null,registryPath:o.find(c=>c.catalog.registryPath)?.catalog.registryPath??null,stale:o.some(c=>c.catalog.stale),error:i.length>0?i.join("; "):null},actionCatalog:r,sourceSetupRequirements:o.flatMap(c=>c.sourceSetupRequirements)}}s($e,"loadProfileActionCatalogForSources");async function Me(e){let t=e.sourcePath,o=V.join(t,be),n=V.join(t,Ee),r=V.join(t,Rt),a=V.join(t,vt);try{let i=await X(o),c=await X(n),l=await X(r),d=y(await X(a)),p=y(y(i)?.inputSchemas),h=Oe(y(l)?.setupRequirements)??[],v=xt(h),A=new Map;for(let g of[...ie(y(i)?.actionCatalog),...ie(y(c)?.actions),...ie(y(i)?.actions)]){let j=m(g.id)??m(g.name);if(!j)continue;let C=A.get(j),At=Ot({sourceRequirementsByAction:v,actionId:j,actionName:m(g.name)}),St=_t(Oe(g.setupRequirements)??C?.setupRequirements??[],At),Ct={id:j,agentId:e.agentId,sourcePath:t,sourceActionId:j,name:m(g.name)??C?.name??j,label:m(g.label)??C?.label??Tt(j),description:m(g.description)??C?.description??null,visibility:m(g.visibility)??C?.visibility??"default",inputSchema:qt(g.inputSchema,p)??C?.inputSchema??null,outputSchema:je(g.outputSchema)??C?.outputSchema??null,approvalPolicy:y(g.approvalPolicy)??C?.approvalPolicy??null,artifactPolicy:y(g.artifactPolicy)??C?.artifactPolicy??null,setupRequirements:St,mcp:y(g.mcp)??C?.mcp??null,schedulePolicy:y(g.schedulePolicy)??C?.schedulePolicy??null,trace:bt(y(g.trace)??C?.trace??null,d),implementation:y(g.implementation)??C?.implementation??null,invokesModel:typeof g.invokesModel=="boolean"?g.invokesModel:C?.invokesModel};A.set(j,Ct)}let M=Array.from(A.values()).filter(g=>g.visibility!=="internal"&&g.visibility!=="debug"),L=[...i?[]:[be],...c?[]:[Ee]],_=await jt([o,n]);return{catalog:{actionCount:M.length,generatedAt:_,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:L.length>0,error:L.length>0?Mt(e,L):null},actionCatalog:M,sourceSetupRequirements:h}}catch(i){return{catalog:{actionCount:0,generatedAt:null,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:!0,error:i instanceof Error?i.message:String(i)},actionCatalog:[],sourceSetupRequirements:[]}}}s(Me,"loadProfileActionCatalogSource");function bt(e,t){if(!t)return e;let o=m(t.versionId),n=m(t.digest);return!o||!n?e:{...e??{},agentVersionId:o,agentPackageDigest:n,validationReceiptIds:xe(t.validationReceiptIds),evalReceiptIds:xe(t.evalReceiptIds)}}s(bt,"mergeAgentPackageTrace");function xe(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim().length>0):[]}s(xe,"stringArray");function Et(e){let t=0;for(let o of e){if(!o)continue;let n=Date.parse(o);Number.isFinite(n)&&(t=Math.max(t,n))}return t>0?new Date(t).toISOString():null}s(Et,"latestIso");function xt(e){let t=new Map;for(let o of e){let n=[m(o.actionId),m(o.sourceActionId),m(o.actionName)].filter(r=>!!r);for(let r of n){let a=t.get(r)??[];a.push(o),t.set(r,a)}}return t}s(xt,"sourceSetupRequirementsByAction");function Ot(e){return[...e.sourceRequirementsByAction.get(e.actionId)??[],...e.actionName&&e.actionName!==e.actionId?e.sourceRequirementsByAction.get(e.actionName)??[]:[]].map(o=>({...o,source:"source_upload_metadata"}))}s(Ot,"setupRequirementsForActionSource");function _t(e,t){if(t.length===0)return e;let o=[],n=new Set;for(let r of[...e,...t]){let a=$t(r);n.has(a)||(n.add(a),o.push(r))}return o}s(_t,"mergeSetupRequirements");function $t(e){return[m(e.actionId)??m(e.sourceActionId)??m(e.actionName)??"",m(e.kind)??m(e.type)??"",m(e.name)??m(e.key)??m(e.provider)??m(e.tool)??m(e.command)??m(e.packageName)??m(e.path)??m(e.repo)??m(e.url)??m(e.id)??""].join(":")}s($t,"setupRequirementIdentity");function Mt(e,t){return[`Profile agent ${e.agentId} at ${e.sourcePath} is missing SDK catalog artifact(s): ${t.join(", ")}.`,"Run `openpond profile check --kind all` after source materialization so each enabled profile agent has inspect/build artifacts."].join(" ")}s(Mt,"missingSourceArtifactsMessage");async function X(e){return G(e)?JSON.parse(await It(e,"utf8")):null}s(X,"readJsonIfExists");async function jt(e){let t=0;for(let o of e){if(!G(o))continue;let n=await kt(o);t=Math.max(t,n.mtimeMs)}return t>0?new Date(t).toISOString():null}s(jt,"latestMtime");function y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}s(y,"asRecord");function ie(e){return Array.isArray(e)?e.filter(t=>!!y(t)):[]}s(ie,"records");function Oe(e){return Array.isArray(e)?e.filter(t=>!!y(t)):null}s(Oe,"recordArray");function m(e){return typeof e=="string"&&e.trim()?e.trim():null}s(m,"text");function je(e){return m(e)??y(e)}s(je,"schemaValue");function qt(e,t){let o=je(e);return typeof o!="string"?o:y(t?.[o])??o}s(qt,"resolvedSchemaValue");function Tt(e){let t=e.replace(/[._-]+/g," ").trim();return t?t.replace(/\b\w/g,o=>o.toUpperCase()):e}s(Tt,"titleFromActionId");var Y=class extends Error{static{s(this,"OpenPondProfileSetupRequiredError")}code="agent_source_setup_required";details;constructor(t,o){let n=o.blockingRequirements.map(r=>r.label);super(["agent_source_setup_required",`Profile action ${t} has unresolved required setup.`,n.length?`Missing setup: ${n.join(", ")}`:""].filter(Boolean).join(`
|
|
3
3
|
`)),this.name="OpenPondProfileSetupRequiredError",this.details={error:"agent_source_setup_required",actionId:t,setupGate:o,missing:n,blockingSetupRequirements:o.blockingRequirements,setupRequirements:o.requirements}}};function Z(e){let t=new Map;for(let i of e.sourceSetupRequirements??[]){let c=Ft(i);if(e.actionId&&c&&c!==e.actionId&&P(i.actionName)!==e.actionId&&P(i.sourceActionId)!==e.actionId)continue;let l=qe({record:i,source:"source_upload_metadata",actionId:c});l&&t.set(l.ref,l)}for(let i of e.actionCatalog)if(!(e.actionId&&i.id!==e.actionId&&i.name!==e.actionId))for(let c of i.setupRequirements??[]){let l=qe({record:c,source:"action_catalog",actionId:i.id});l&&t.set(l.ref,l)}let o=Array.from(t.values()),n=o.filter(i=>i.blocking),r=o.filter(i=>!i.required&&!ce(i.status)).length,a=o.filter(i=>ce(i.status)).length;return{status:Lt(n),requirementCount:o.length,blockingCount:n.length,optionalMissingCount:r,readyCount:a,requirements:o,blockingRequirements:n}}s(Z,"buildOpenPondProfileSetupGate");function le(e,t){if(t.blockingRequirements.length>0)throw new Y(e,t)}s(le,"assertOpenPondProfileActionReady");function Nt(e){let t=e.actionId?`${e.actionId}: `:"",o=e.required?"required":"optional";return`${t}${e.label} (${o}, ${e.status})`}s(Nt,"formatOpenPondProfileSetupRequirement");function qe(e){let t=e.source==="action_catalog"&&P(e.record.source)==="source_upload_metadata"?"source_upload_metadata":e.source,o=P(e.record.kind)??P(e.record.type),n=P(e.record.label)??P(e.record.name)??P(e.record.key)??P(e.record.provider)??P(e.record.tool)??P(e.record.command)??P(e.record.packageName)??P(e.record.path)??P(e.record.repo)??P(e.record.url)??P(e.record.id)??o??"setup requirement",r=e.record.required!==!1,a=Ht(e.record);return{ref:[t,e.actionId??"source",o??"requirement",n].join(":"),source:t,actionId:e.actionId,kind:o,label:n,status:a,required:r,blocking:r&&!ce(a)}}s(qe,"setupRequirementFromRecord");function Ft(e){return P(e.actionId)??P(e.sourceActionId)??P(e.actionName)}s(Ft,"setupRequirementActionId");function Ht(e){let t=P(e.status)??P(e.state);return t?t==="satisfied"||t==="connected"||t==="provided"?"ready":t:typeof e.satisfied=="boolean"?e.satisfied?"ready":"setup_required":typeof e.ready=="boolean"&&e.ready?"ready":"setup_required"}s(Ht,"setupStatus");function Lt(e){return e.length===0?"ready":e.some(t=>["blocked","unsupported","unsupported_dependency","stale"].includes(t.status))?"blocked":"setup_required"}s(Lt,"gateStatus");function ce(e){return e==="ready"||e==="disabled"}s(ce,"isReadyStatus");function P(e){return typeof e=="string"&&e.trim()?e.trim():null}s(P,"text");import{spawn as Ut}from"node:child_process";import{randomUUID as Gt}from"node:crypto";import{existsSync as ue}from"node:fs";import{readFile as Bt,rm as Dt,writeFile as Fe}from"node:fs/promises";import Q from"node:path";var He=["**/node_modules/","**/.bun/","**/.env","**/.env.*","**/.openpond/traces/","**/.openpond/vendor/","**/.openpond/eval-results.json","**/.openpond/artifact-index.json","**/.openpond/source-upload-cache.json",""].join(`
|
|
4
4
|
`);async function Le(e){if(!ue(Q.join(e,".git"))){let a=await k(e,["init","-b","main"]);if(a.code!==0)throw new Error(T("git init",a))}let t=Q.join(e,".gitignore");if(ue(t)?await zt(t):await Fe(t,He,"utf8"),await Wt(e))return;let o=await N(e);if(!o.dirty&&o.files.length===0)return;let n=await k(e,["add","-A"]);if(n.code!==0)throw new Error(T("git add",n));let r=await k(e,["commit","-m","Initialize OpenPond profile"],{env:{...process.env,GIT_AUTHOR_NAME:process.env.GIT_AUTHOR_NAME||"OpenPond",GIT_AUTHOR_EMAIL:process.env.GIT_AUTHOR_EMAIL||"openpond@example.invalid",GIT_COMMITTER_NAME:process.env.GIT_COMMITTER_NAME||"OpenPond",GIT_COMMITTER_EMAIL:process.env.GIT_COMMITTER_EMAIL||"openpond@example.invalid"}});if(r.code!==0&&!/nothing to commit/i.test(r.stdout+r.stderr))throw new Error(T("git commit",r))}s(Le,"ensureProfileGitRepo");async function zt(e){let t=await Bt(e,"utf8").catch(()=>""),o=He.split(/\r?\n/).map(r=>r.trim()).filter(Boolean).filter(r=>!t.split(/\r?\n/).some(a=>a.trim()===r));if(o.length===0)return;let n=t.endsWith(`
|
|
5
5
|
`)||t.length===0?"":`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as p,b as g,c as R,f as k,g as S,m as d}from"./chunk-MPNJ2BB4.js";import{c,d as u,e as m,g as l,n as H}from"./chunk-VVNV4NNW.js";import{A as t}from"./chunk-PF56N7ZY.js";import{a as i}from"./chunk-FTQLQJQV.js";var C=t.string().trim().min(1).max(1e5),x=t.record(t.string(),t.unknown()).default({}),$=t.enum(["completed_tool_batch","before_model_step","turn_completed","turn_paused"]),_=t.object({kind:$,eventSequence:t.number().int().nonnegative(),occurredAt:m}).strict(),A=t.object({id:c,sequence:t.number().int().nonnegative().nullable(),contentHash:u}).strict(),j=t.enum(["tool_failure","retry","recovery","validation","user_turn","reusable_success","completion_detour"]),D=t.enum(["open","recovered","terminal"]),U=t.object({name:t.string().trim().min(1).max(500),invocationKey:u}).strict(),O=t.object({schemaVersion:t.literal("openpond.improvementObservation.v1"),id:c,runRef:c,turnId:c,harnessRelease:l,overlay:R.nullable(),eventRefs:t.array(A).min(1).max(100),kind:j,state:D,tool:U.nullable(),deterministicClass:t.string().trim().min(1).max(500).nullable(),summary:C,createdAt:m,metadata:x}).strict().superRefine((e,n)=>{new Set(e.eventRefs.map(a=>a.id)).size!==e.eventRefs.length&&n.addIssue({code:"custom",message:"observation event refs must be unique",path:["eventRefs"]}),["tool_failure","retry","recovery","completion_detour"].includes(e.kind)&&e.tool===null&&n.addIssue({code:"custom",message:`${e.kind} observations require a tool identity`,path:["tool"]})}),M=O.extend({contentHash:u}).strict(),B=t.object({schemaVersion:t.literal("openpond.refinementTriggerPolicy.v1"),maxEstimatedCostUsd:t.number().finite().nonnegative(),cooldownMs:t.number().int().nonnegative(),maxPendingPlans:t.number().int().min(1).max(100),maxEvidenceEvents:t.number().int().min(1).max(1e3),maxProposalEdits:t.number().int().min(1).max(1e3),maxProposalBytes:t.number().int().min(1).max(1e7)}).strict(),K=t.enum(["no_action","route_deterministically","queue_refiner"]),W=t.object({schemaVersion:t.literal("openpond.refinementTriggerDecision.v1"),id:c,runRef:c,turnId:c,harnessRelease:l,overlay:R.nullable(),observations:t.array(l).max(100),decision:K,deterministicRoute:g.nullable(),suggestedRoutes:t.array(g).max(8),reason:C,deduplicationKey:u,policy:B,estimatedMaxCostUsd:t.number().finite().nonnegative(),pendingPlanCount:t.number().int().nonnegative(),boundary:_,cooldownUntil:m.nullable(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.estimatedMaxCostUsd>e.policy.maxEstimatedCostUsd&&n.addIssue({code:"custom",message:"estimated Refiner cost exceeds the trigger policy budget",path:["estimatedMaxCostUsd"]}),e.pendingPlanCount>e.policy.maxPendingPlans&&n.addIssue({code:"custom",message:"pending plan count exceeds the trigger policy limit",path:["pendingPlanCount"]}),e.observations.length>e.policy.maxEvidenceEvents&&n.addIssue({code:"custom",message:"trigger observations exceed the evidence budget",path:["observations"]}),e.decision==="route_deterministically"&&e.deterministicRoute===null&&n.addIssue({code:"custom",message:"deterministic decisions require a route",path:["deterministicRoute"]}),e.decision!=="route_deterministically"&&e.deterministicRoute!==null&&n.addIssue({code:"custom",message:"only deterministic decisions may declare a deterministic route",path:["deterministicRoute"]}),e.decision==="no_action"&&e.suggestedRoutes.length>0&&n.addIssue({code:"custom",message:"no-action decisions cannot suggest routes",path:["suggestedRoutes"]}),e.decision!=="no_action"&&e.observations.length===0&&n.addIssue({code:"custom",message:"actionable trigger decisions require observations",path:["observations"]})}),z=W.extend({contentHash:u}).strict(),F=t.enum(["runtime_service","refiner_model","human_review","evaluation_system","training_system"]),q=t.object({schemaVersion:t.literal("openpond.improvementRouteDecision.v1"),id:c,trigger:l,route:g,authority:F,automatic:t.boolean(),reason:C,createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.automatic&&["human_review","evaluation_system","training_system"].includes(e.authority)&&n.addIssue({code:"custom",message:`${e.authority} routes cannot be marked automatic`,path:["automatic"]}),e.route==="training"&&e.automatic&&e.authority!=="training_system"&&n.addIssue({code:"custom",message:"automatic training routes require training-system authority",path:["authority"]})}),L=q.extend({contentHash:u}).strict(),E=t.object({schemaVersion:t.literal("openpond.harnessRefinerOutcome.v1"),id:c,trigger:l,decision:t.enum(["no_action","proposed"]),proposal:l.nullable(),reason:C,evidenceRefs:t.array(l).max(100),estimatedCostUsd:t.number().finite().nonnegative(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.decision==="proposed"!=(e.proposal!==null)&&n.addIssue({code:"custom",message:"proposed Refiner outcomes require a proposal; no-action outcomes cannot include one",path:["proposal"]})}),N=E.extend({contentHash:u}).strict(),G=t.enum(["applied","retained","declined","conflict","rolled_back"]),T=t.object({schemaVersion:t.literal("openpond.improvementApplyReceipt.v1"),id:c,proposal:l,beforeOverlay:R,afterOverlay:R.nullable(),decision:G,boundary:_,validationRefs:t.array(l).max(100),outcomeEvidenceRefs:t.array(A).max(1e3),rollbackOf:l.nullable(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.decision==="applied"!=(e.afterOverlay!==null)&&n.addIssue({code:"custom",message:"applied receipts require an after-overlay; other decisions cannot include one",path:["afterOverlay"]}),e.decision==="rolled_back"!=(e.rollbackOf!==null)&&n.addIssue({code:"custom",message:"only rollback receipts require rollbackOf",path:["rollbackOf"]})}),J=T.extend({contentHash:u}).strict();function b(e){let n=e.contentSchema.parse(e.content);return e.resultSchema.parse({...n,contentHash:H(n)})}i(b,"createHashedContract");function te(e){return b({content:e,contentSchema:O,resultSchema:M})}i(te,"createImprovementObservation");function ae(e){return b({content:e,contentSchema:W,resultSchema:z})}i(ae,"createRefinementTriggerDecision");function oe(e){return b({content:e,contentSchema:q,resultSchema:L})}i(oe,"createImprovementRouteDecision");function re(e){return b({content:e,contentSchema:E,resultSchema:N})}i(re,"createHarnessRefinerOutcome");function se(e){return b({content:e,contentSchema:T,resultSchema:J})}i(se,"createImprovementApplyReceipt");var Q=new Set(["text_instruction","memory","dependency_selection"]),X=new Set(["runtime","memory","prompt","skill"]);function Y(e){let n=p.parse(e.workspace),a=k.parse(e.proposal);if(n.ownerScope.kind!=="personal")return{eligible:!1,reason:"Team workspaces require explicit promotion authority."};if(a.requestedScope!=="personal")return{eligible:!1,reason:`${a.requestedScope} changes require explicit promotion authority.`};if(a.risk!=="low")return{eligible:!1,reason:`${a.risk} risk changes require review.`};if(!X.has(a.route))return{eligible:!1,reason:`${a.route} changes cannot auto-advance.`};if(a.edits.some(r=>r.operation==="delete"))return{eligible:!1,reason:"Delete edits require review."};let o=typeof a.metadata.generatedManifestEditId=="string"?a.metadata.generatedManifestEditId:null,s=a.edits.filter(r=>!(r.target.replaceAll("\\","/").toLowerCase()==="harness.json"&&r.id===o&&r.operation==="update"&&["prompt","skill"].includes(a.route))).map(r=>r.target.replaceAll("\\","/").toLowerCase()).filter(r=>r==="harness.json"||r==="program.json"||r.startsWith("agents/")||/\.(?:[cm]?[jt]sx?|py|sh|bash|zsh|fish|ps1|exe|dll|so|dylib)$/.test(r));if(s.length>0)return{eligible:!1,reason:`Executable or structural targets require review: ${[...new Set(s)].join(", ")}.`};let v=a.effects.filter(r=>!Q.has(r));return v.length>0?{eligible:!1,reason:`Effects require review: ${[...new Set(v)].join(", ")}.`}:{eligible:!0}}i(Y,"classifyHarnessAutoAdvanceAuthority");function de(e){let n=p.parse(e.workspace),a=k.parse(e.proposal),o=e.validations.map(y=>S.parse(y)),s={id:a.id,contentHash:a.contentHash},v=o.map(y=>({id:y.id,contentHash:y.contentHash})),r={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:s,expectedWorkspaceRevision:a.expectedWorkspace.revision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:v,rollbackOf:null,createdAt:e.now,metadata:{}},f=V(n,a);if(f)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:f})};let h=P(a,o);if(h)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:h})};let w=Y({workspace:n,proposal:a});if(!w.eligible)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:w.reason})};if(n.currentChannel.release?.id===e.nextRelease.id&&n.currentChannel.release.contentHash===e.nextRelease.contentHash)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:"The candidate release is already current."})};let I=p.parse({...n,sourceRevision:e.nextSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.nextRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:I,receipt:d({...r,nextChannelRevision:I.currentChannel.revision,nextRelease:e.nextRelease,decision:"advanced",reason:"Validated low-risk Personal proposal advanced atomically."})}}i(de,"advanceHarnessWorkspace");function ue(e){let n=p.parse(e.workspace),a=n.revision!==e.expectedWorkspaceRevision||n.currentChannel.revision!==e.expectedChannelRevision,o={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:null,expectedWorkspaceRevision:e.expectedWorkspaceRevision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:[],createdAt:e.now,metadata:{}};if(a)return{workspace:n,receipt:d({...o,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:"Workspace or current-channel revision changed before rollback.",rollbackOf:null})};let s=p.parse({...n,sourceRevision:e.targetSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.targetRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:s,receipt:d({...o,nextChannelRevision:s.currentChannel.revision,nextRelease:e.targetRelease,decision:"rolled_back",reason:"Current channel rolled back atomically to an immutable release.",rollbackOf:e.rollbackOf})}}i(ue,"rollbackHarnessWorkspace");function me(e){let n=p.parse(e.workspace),a=k.parse(e.proposal),o=e.validations.map(h=>S.parse(h)),s={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:{id:a.id,contentHash:a.contentHash},expectedWorkspaceRevision:a.expectedWorkspace.revision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:o.map(h=>({id:h.id,contentHash:h.contentHash})),rollbackOf:null,createdAt:e.now,metadata:{authority:"human_review",reviewer:e.reviewer}},v=V(n,a);if(v)return{workspace:n,receipt:d({...s,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:v})};let r=P(a,o);if(r)return{workspace:n,receipt:d({...s,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:r})};let f=p.parse({...n,sourceRevision:e.nextSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.nextRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:f,receipt:d({...s,nextChannelRevision:f.currentChannel.revision,nextRelease:e.nextRelease,decision:"advanced",reason:`Validated proposal approved by ${e.reviewer} and advanced atomically.`})}}i(me,"advanceReviewedHarnessWorkspace");function V(e,n){if(n.expectedWorkspace.workspaceId!==e.id)return"Proposal targets a different Harness workspace.";if(n.expectedWorkspace.revision!==e.revision)return"Harness workspace revision changed before advancement.";if(n.expectedWorkspace.sourceRevision!==e.sourceRevision)return"Harness source revision changed before advancement.";if(n.expectedWorkspace.channelRevision!==e.currentChannel.revision)return"Harness current-channel revision changed before advancement.";let a=e.currentChannel.release;return a===null||a.id!==n.baseHarnessRelease.id||a.contentHash!==n.baseHarnessRelease.contentHash?"Proposal base Harness release is not current.":null}i(V,"workspaceConflictReason");function P(e,n){let a=new Map;for(let o of n){if(o.proposal.id!==e.id||o.proposal.contentHash!==e.contentHash)return`Validation ${o.id} is bound to a different proposal.`;a.set(o.validationId,o)}for(let o of e.validationPlan){if(!o.required)continue;let s=a.get(o.id);if(!s)return`Required validation ${o.id} is missing.`;if(s.kind!==o.kind)return`Validation ${o.id} has kind ${s.kind}; expected ${o.kind}.`;if(s.status!=="passed")return`Required validation ${o.id} did not pass (${s.status}).`}return null}i(P,"failedValidationReason");export{M as a,z as b,L as c,N as d,J as e,te as f,ae as g,oe as h,re as i,se as j,Y as k,de as l,ue as m,me as n};
|
|
2
|
+
import{a as p,b as g,c as R,f as k,g as S,m as d}from"./chunk-LE75SVEL.js";import{c,d as u,e as m,g as l,n as H}from"./chunk-RCT3O3HQ.js";import{A as t}from"./chunk-X2J2P5ZT.js";import{a as i}from"./chunk-FTQLQJQV.js";var C=t.string().trim().min(1).max(1e5),x=t.record(t.string(),t.unknown()).default({}),$=t.enum(["completed_tool_batch","before_model_step","turn_completed","turn_paused"]),_=t.object({kind:$,eventSequence:t.number().int().nonnegative(),occurredAt:m}).strict(),A=t.object({id:c,sequence:t.number().int().nonnegative().nullable(),contentHash:u}).strict(),j=t.enum(["tool_failure","retry","recovery","validation","user_turn","reusable_success","completion_detour"]),D=t.enum(["open","recovered","terminal"]),U=t.object({name:t.string().trim().min(1).max(500),invocationKey:u}).strict(),O=t.object({schemaVersion:t.literal("openpond.improvementObservation.v1"),id:c,runRef:c,turnId:c,harnessRelease:l,overlay:R.nullable(),eventRefs:t.array(A).min(1).max(100),kind:j,state:D,tool:U.nullable(),deterministicClass:t.string().trim().min(1).max(500).nullable(),summary:C,createdAt:m,metadata:x}).strict().superRefine((e,n)=>{new Set(e.eventRefs.map(a=>a.id)).size!==e.eventRefs.length&&n.addIssue({code:"custom",message:"observation event refs must be unique",path:["eventRefs"]}),["tool_failure","retry","recovery","completion_detour"].includes(e.kind)&&e.tool===null&&n.addIssue({code:"custom",message:`${e.kind} observations require a tool identity`,path:["tool"]})}),M=O.extend({contentHash:u}).strict(),B=t.object({schemaVersion:t.literal("openpond.refinementTriggerPolicy.v1"),maxEstimatedCostUsd:t.number().finite().nonnegative(),cooldownMs:t.number().int().nonnegative(),maxPendingPlans:t.number().int().min(1).max(100),maxEvidenceEvents:t.number().int().min(1).max(1e3),maxProposalEdits:t.number().int().min(1).max(1e3),maxProposalBytes:t.number().int().min(1).max(1e7)}).strict(),K=t.enum(["no_action","route_deterministically","queue_refiner"]),W=t.object({schemaVersion:t.literal("openpond.refinementTriggerDecision.v1"),id:c,runRef:c,turnId:c,harnessRelease:l,overlay:R.nullable(),observations:t.array(l).max(100),decision:K,deterministicRoute:g.nullable(),suggestedRoutes:t.array(g).max(8),reason:C,deduplicationKey:u,policy:B,estimatedMaxCostUsd:t.number().finite().nonnegative(),pendingPlanCount:t.number().int().nonnegative(),boundary:_,cooldownUntil:m.nullable(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.estimatedMaxCostUsd>e.policy.maxEstimatedCostUsd&&n.addIssue({code:"custom",message:"estimated Refiner cost exceeds the trigger policy budget",path:["estimatedMaxCostUsd"]}),e.pendingPlanCount>e.policy.maxPendingPlans&&n.addIssue({code:"custom",message:"pending plan count exceeds the trigger policy limit",path:["pendingPlanCount"]}),e.observations.length>e.policy.maxEvidenceEvents&&n.addIssue({code:"custom",message:"trigger observations exceed the evidence budget",path:["observations"]}),e.decision==="route_deterministically"&&e.deterministicRoute===null&&n.addIssue({code:"custom",message:"deterministic decisions require a route",path:["deterministicRoute"]}),e.decision!=="route_deterministically"&&e.deterministicRoute!==null&&n.addIssue({code:"custom",message:"only deterministic decisions may declare a deterministic route",path:["deterministicRoute"]}),e.decision==="no_action"&&e.suggestedRoutes.length>0&&n.addIssue({code:"custom",message:"no-action decisions cannot suggest routes",path:["suggestedRoutes"]}),e.decision!=="no_action"&&e.observations.length===0&&n.addIssue({code:"custom",message:"actionable trigger decisions require observations",path:["observations"]})}),z=W.extend({contentHash:u}).strict(),F=t.enum(["runtime_service","refiner_model","human_review","evaluation_system","training_system"]),q=t.object({schemaVersion:t.literal("openpond.improvementRouteDecision.v1"),id:c,trigger:l,route:g,authority:F,automatic:t.boolean(),reason:C,createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.automatic&&["human_review","evaluation_system","training_system"].includes(e.authority)&&n.addIssue({code:"custom",message:`${e.authority} routes cannot be marked automatic`,path:["automatic"]}),e.route==="training"&&e.automatic&&e.authority!=="training_system"&&n.addIssue({code:"custom",message:"automatic training routes require training-system authority",path:["authority"]})}),L=q.extend({contentHash:u}).strict(),E=t.object({schemaVersion:t.literal("openpond.harnessRefinerOutcome.v1"),id:c,trigger:l,decision:t.enum(["no_action","proposed"]),proposal:l.nullable(),reason:C,evidenceRefs:t.array(l).max(100),estimatedCostUsd:t.number().finite().nonnegative(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.decision==="proposed"!=(e.proposal!==null)&&n.addIssue({code:"custom",message:"proposed Refiner outcomes require a proposal; no-action outcomes cannot include one",path:["proposal"]})}),N=E.extend({contentHash:u}).strict(),G=t.enum(["applied","retained","declined","conflict","rolled_back"]),T=t.object({schemaVersion:t.literal("openpond.improvementApplyReceipt.v1"),id:c,proposal:l,beforeOverlay:R,afterOverlay:R.nullable(),decision:G,boundary:_,validationRefs:t.array(l).max(100),outcomeEvidenceRefs:t.array(A).max(1e3),rollbackOf:l.nullable(),createdAt:m,metadata:x}).strict().superRefine((e,n)=>{e.decision==="applied"!=(e.afterOverlay!==null)&&n.addIssue({code:"custom",message:"applied receipts require an after-overlay; other decisions cannot include one",path:["afterOverlay"]}),e.decision==="rolled_back"!=(e.rollbackOf!==null)&&n.addIssue({code:"custom",message:"only rollback receipts require rollbackOf",path:["rollbackOf"]})}),J=T.extend({contentHash:u}).strict();function b(e){let n=e.contentSchema.parse(e.content);return e.resultSchema.parse({...n,contentHash:H(n)})}i(b,"createHashedContract");function te(e){return b({content:e,contentSchema:O,resultSchema:M})}i(te,"createImprovementObservation");function ae(e){return b({content:e,contentSchema:W,resultSchema:z})}i(ae,"createRefinementTriggerDecision");function oe(e){return b({content:e,contentSchema:q,resultSchema:L})}i(oe,"createImprovementRouteDecision");function re(e){return b({content:e,contentSchema:E,resultSchema:N})}i(re,"createHarnessRefinerOutcome");function se(e){return b({content:e,contentSchema:T,resultSchema:J})}i(se,"createImprovementApplyReceipt");var Q=new Set(["text_instruction","memory","dependency_selection"]),X=new Set(["runtime","memory","prompt","skill"]);function Y(e){let n=p.parse(e.workspace),a=k.parse(e.proposal);if(n.ownerScope.kind!=="personal")return{eligible:!1,reason:"Team workspaces require explicit promotion authority."};if(a.requestedScope!=="personal")return{eligible:!1,reason:`${a.requestedScope} changes require explicit promotion authority.`};if(a.risk!=="low")return{eligible:!1,reason:`${a.risk} risk changes require review.`};if(!X.has(a.route))return{eligible:!1,reason:`${a.route} changes cannot auto-advance.`};if(a.edits.some(r=>r.operation==="delete"))return{eligible:!1,reason:"Delete edits require review."};let o=typeof a.metadata.generatedManifestEditId=="string"?a.metadata.generatedManifestEditId:null,s=a.edits.filter(r=>!(r.target.replaceAll("\\","/").toLowerCase()==="harness.json"&&r.id===o&&r.operation==="update"&&["prompt","skill"].includes(a.route))).map(r=>r.target.replaceAll("\\","/").toLowerCase()).filter(r=>r==="harness.json"||r==="program.json"||r.startsWith("agents/")||/\.(?:[cm]?[jt]sx?|py|sh|bash|zsh|fish|ps1|exe|dll|so|dylib)$/.test(r));if(s.length>0)return{eligible:!1,reason:`Executable or structural targets require review: ${[...new Set(s)].join(", ")}.`};let v=a.effects.filter(r=>!Q.has(r));return v.length>0?{eligible:!1,reason:`Effects require review: ${[...new Set(v)].join(", ")}.`}:{eligible:!0}}i(Y,"classifyHarnessAutoAdvanceAuthority");function de(e){let n=p.parse(e.workspace),a=k.parse(e.proposal),o=e.validations.map(y=>S.parse(y)),s={id:a.id,contentHash:a.contentHash},v=o.map(y=>({id:y.id,contentHash:y.contentHash})),r={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:s,expectedWorkspaceRevision:a.expectedWorkspace.revision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:v,rollbackOf:null,createdAt:e.now,metadata:{}},f=V(n,a);if(f)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:f})};let h=P(a,o);if(h)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:h})};let w=Y({workspace:n,proposal:a});if(!w.eligible)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:w.reason})};if(n.currentChannel.release?.id===e.nextRelease.id&&n.currentChannel.release.contentHash===e.nextRelease.contentHash)return{workspace:n,receipt:d({...r,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:"The candidate release is already current."})};let I=p.parse({...n,sourceRevision:e.nextSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.nextRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:I,receipt:d({...r,nextChannelRevision:I.currentChannel.revision,nextRelease:e.nextRelease,decision:"advanced",reason:"Validated low-risk Personal proposal advanced atomically."})}}i(de,"advanceHarnessWorkspace");function ue(e){let n=p.parse(e.workspace),a=n.revision!==e.expectedWorkspaceRevision||n.currentChannel.revision!==e.expectedChannelRevision,o={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:null,expectedWorkspaceRevision:e.expectedWorkspaceRevision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:[],createdAt:e.now,metadata:{}};if(a)return{workspace:n,receipt:d({...o,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:"Workspace or current-channel revision changed before rollback.",rollbackOf:null})};let s=p.parse({...n,sourceRevision:e.targetSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.targetRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:s,receipt:d({...o,nextChannelRevision:s.currentChannel.revision,nextRelease:e.targetRelease,decision:"rolled_back",reason:"Current channel rolled back atomically to an immutable release.",rollbackOf:e.rollbackOf})}}i(ue,"rollbackHarnessWorkspace");function me(e){let n=p.parse(e.workspace),a=k.parse(e.proposal),o=e.validations.map(h=>S.parse(h)),s={schemaVersion:"openpond.harnessAdvanceReceipt.v1",id:e.receiptId,workspaceId:n.id,ownerScope:n.ownerScope,proposal:{id:a.id,contentHash:a.contentHash},expectedWorkspaceRevision:a.expectedWorkspace.revision,observedWorkspaceRevision:n.revision,previousChannelRevision:n.currentChannel.revision,previousRelease:n.currentChannel.release,validationReceipts:o.map(h=>({id:h.id,contentHash:h.contentHash})),rollbackOf:null,createdAt:e.now,metadata:{authority:"human_review",reviewer:e.reviewer}},v=V(n,a);if(v)return{workspace:n,receipt:d({...s,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"conflict",reason:v})};let r=P(a,o);if(r)return{workspace:n,receipt:d({...s,nextChannelRevision:n.currentChannel.revision,nextRelease:null,decision:"retained",reason:r})};let f=p.parse({...n,sourceRevision:e.nextSourceRevision,revision:n.revision+1,dirty:!1,currentChannel:{...n.currentChannel,release:e.nextRelease,revision:n.currentChannel.revision+1},updatedAt:e.now});return{workspace:f,receipt:d({...s,nextChannelRevision:f.currentChannel.revision,nextRelease:e.nextRelease,decision:"advanced",reason:`Validated proposal approved by ${e.reviewer} and advanced atomically.`})}}i(me,"advanceReviewedHarnessWorkspace");function V(e,n){if(n.expectedWorkspace.workspaceId!==e.id)return"Proposal targets a different Harness workspace.";if(n.expectedWorkspace.revision!==e.revision)return"Harness workspace revision changed before advancement.";if(n.expectedWorkspace.sourceRevision!==e.sourceRevision)return"Harness source revision changed before advancement.";if(n.expectedWorkspace.channelRevision!==e.currentChannel.revision)return"Harness current-channel revision changed before advancement.";let a=e.currentChannel.release;return a===null||a.id!==n.baseHarnessRelease.id||a.contentHash!==n.baseHarnessRelease.contentHash?"Proposal base Harness release is not current.":null}i(V,"workspaceConflictReason");function P(e,n){let a=new Map;for(let o of n){if(o.proposal.id!==e.id||o.proposal.contentHash!==e.contentHash)return`Validation ${o.id} is bound to a different proposal.`;a.set(o.validationId,o)}for(let o of e.validationPlan){if(!o.required)continue;let s=a.get(o.id);if(!s)return`Required validation ${o.id} is missing.`;if(s.kind!==o.kind)return`Validation ${o.id} has kind ${s.kind}; expected ${o.kind}.`;if(s.status!=="passed")return`Required validation ${o.id} did not pass (${s.status}).`}return null}i(P,"failedValidationReason");export{M as a,z as b,L as c,N as d,J as e,te as f,ae as g,oe as h,re as i,se as j,Y as k,de as l,ue as m,me as n};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b}from"./chunk-5AU5Y6KS.js";import{ja as M}from"./chunk-MVPKU72J.js";import{Qb as x,m as T,qb as A}from"./chunk-QAFXQHHG.js";import{n as c,o as S}from"./chunk-RCT3O3HQ.js";import{A as I}from"./chunk-X2J2P5ZT.js";import{a as R}from"./chunk-FTQLQJQV.js";function j(e,a,i){if(a==="agent_action"){let n=e.find(u=>u.name==="workspace_action_result"&&u.action==="profile_workflow_action")?.output;if(typeof n!="string")throw new Error("Profile Agent action evaluation did not produce a released action result.");return n}if(i==="completed"){let n=[...e].reverse().find(s=>s.name==="turn.completed"),r=n?.data?.providerResponse,o=n?.data;if(!r&&o?.turn?.status==="completed"){let s=[...e].reverse().find(t=>P(t)!==null);if(!s)throw new Error("Native Profile evaluation has no retained final answer.");let d=P(s);return e.filter(t=>P(t)===d).map(t=>t.output??"").join("")}if(typeof r?.requestId!="string"||!r.requestId||typeof r.contentHash!="string")throw new Error("Profile evaluation has no retained final provider response.");let p=e.filter(s=>s.name==="assistant.delta"&&s.data?.providerRequestId===r.requestId).map(s=>s.output??"").join("");if(c(p)!==r.contentHash)throw new Error("Profile evaluation final provider response differs from its retained trace.");return b(e)??p}return e.filter(n=>n.name==="assistant.delta"&&typeof n.output=="string").map(n=>n.output??"").join("")}R(j,"profileEvaluationOutput");function P(e){let a=e.data;return e.name==="assistant.delta"&&a?.provider==="codex"&&a.phase==="final_answer"&&typeof a.itemId=="string"?a.itemId:null}R(P,"nativeFinalAnswerItemId");async function _(e){let{store:a,manifest:i,receipt:n}=e;if(!n.metadata.retainedEvidenceRef)return null;let u=x.parse(n.metadata.retainedEvidenceRef),[r,o]=await Promise.all([a.getSession(u.sessionId),a.getTurn(u.turnId)]),p=r?.metadata?.profileEvaluationRun,s=i.profileEvaluation;if(!r||!o||o.sessionId!==r.id||!s||!r.currentProfile||c(r.currentProfile)!==c(e.profileRef)||c(p)!==c({id:i.id,contentHash:i.contentHash})||r.metadata?.taskId!==n.taskId||r.metadata?.seed!==n.seed||!o.completedAt||o.completedAt!==n.completedAt||o.startedAt!==n.startedAt||!o.harnessSnapshot||o.harnessSnapshot.harnessRelease.id!==s.harnessRelease.id||o.harnessSnapshot.harnessRelease.contentHash!==s.harnessRelease.contentHash||i.policy.kind!=="model"||!o.modelRef||o.modelRef.providerId!==i.policy.model.provider||o.modelRef.modelId!==i.policy.model.model)throw new Error("Retained Profile policy turn differs from its admitted case.");let d=await a.runtimeEventsForTurn(o.id);if(d.some(v=>v.turnId!==o.id)||c(d)!==n.traceHash)throw new Error("Retained Profile policy trace differs from its immutable receipt.");let t=j(d,s.target.kind,o.status);if(n.outputHash!==null&&c({text:t})!==n.outputHash)throw new Error("Retained Profile output differs from its immutable receipt.");let m=n.artifactRefs.flatMap(v=>{let y=d.filter(l=>(l.action==="work_output_save"||l.action==="sandbox_save_output")&&l.status==="completed").flatMap(l=>{let C=l.data&&typeof l.data=="object"?l.data:{},k=M.safeParse(C.outputRef);return k.success?[k.data]:[]}).filter(l=>l.sourceTaskId===r.id&&l.sourceTurnId===o.id&&`${r.id}/${l.id}/${l.revision}/${l.title}`===v.id&&l.sha256===v.contentHash&&l.sizeBytes===v.sizeBytes&&l.contentType===v.mediaType);if(y.length!==1)throw new Error("The case output has no unique sealed saved-file identity.");let h=y[0];if(h.location.kind!=="managed")return[];let H=`/api/work/outputs/${encodeURIComponent(h.location.fileId)}`;if(h.location.downloadPath!==H)throw new Error("The saved output has no canonical managed download route.");return[{id:h.id,title:h.title,revision:h.revision,contentType:h.contentType,sizeBytes:h.sizeBytes,sha256:h.sha256,downloadPath:H}]}),f=await a.listModelUsageRecords({sessionId:r.id,turnId:o.id,limit:1e4}),E=e.eventAfterId?d.findIndex(v=>v.id===e.eventAfterId):-1;if(e.eventAfterId&&E<0)throw new Error("Profile trace cursor is unavailable in this case.");let g=E+1,q=Math.max(1,Math.min(250,e.eventLimit??100)),w=d.slice(g,g+q);return{ref:u,prompt:o.prompt,output:n.outputHash===null?null:{text:t},partialOutput:n.outputHash===null&&t?{text:t}:null,error:o.error,events:w,eventCount:d.length,nextEventCursor:g+w.length<d.length?w.at(-1).id:null,files:m,usage:f,usageCoverage:f.length===1e4?"partial":"complete"}}R(_,"readProfileEvaluationPolicyEvidence");var W=I.object({runId:I.string().trim().min(1).max(240),receiptId:I.string().trim().min(1).max(500).optional(),eventAfterId:I.string().trim().min(1).max(500).optional(),eventLimit:I.number().int().min(1).max(250).optional(),manifest:A.optional()}).strict().refine(e=>e.receiptId||!e.eventAfterId&&!e.eventLimit,"Select a case before requesting its trace page.").refine(e=>!e.manifest||e.receiptId,"Interrupted-run inspection requires one exact case.");async function D(e){let a=await e.store.getProfileEvaluationRun(e.runId);if(a&&c(a.profileRef)!==c(e.profileRef))throw new Error("Profile evaluation run is unavailable in the selected Profile.");let i=a?.manifest??e.manifest;if(!i||!a&&!e.receiptId)throw new Error("Profile evaluation run is unavailable in the selected Profile.");if(a){if(e.manifest&&e.manifest.contentHash!==a.manifest.contentHash)throw new Error("Profile evaluation run differs from its pinned manifest.")}else if(S(i,"Interrupted Profile evaluation manifest"),i.id!==e.runId||i.profileEvaluation?.profileId!==e.profileRef.profileId||e.profileRef.source==="openpond_git"&&i.metadata.profileRepositoryId!==e.profileRef.repositoryId)throw new Error("Profile evaluation run is unavailable in the selected Profile.");let n=i.population.map((r,o)=>({member:r,index:o})).filter(({member:r})=>!e.receiptId||r.receiptId===e.receiptId);if(e.receiptId&&n.length!==1)throw new Error("Profile evaluation case is unavailable in the selected run.");let u=await Promise.all(n.map(async({member:r,index:o})=>{let p=a?null:await e.store.getProfileEvaluationReceipt(r.receiptId),s=a?.receiptRefs[o]??(p?{id:p.id,contentHash:p.contentHash}:null),d=a?.gradeRefs[o]??p?.graderEvidenceRefs[0];if(!s||!d)throw new Error("Profile evaluation run has incomplete case evidence.");let[t,m]=await Promise.all([e.store.getProfileEvaluationReceipt(s.id),e.store.getProfileEvaluationGrade(d.contentHash)]);if(!t||!a&&!T(t)||t.contentHash!==s.contentHash||t.id!==r.receiptId||t.taskId!==r.taskId||t.seed!==r.seed||t.runManifest.id!==i.id||t.runManifest.contentHash!==i.contentHash||!m||m.contentHash!==d.contentHash||!t.graderEvidenceRefs.some(f=>f.id===d.id&&f.contentHash===d.contentHash))throw new Error("Profile evaluation case evidence differs from its retained run.");return{taskId:r.taskId,seed:r.seed,receiptId:t.id,receiptHash:t.contentHash,traceHash:t.traceHash,outputHash:t.outputHash,score:m.score,passed:m.passed,gradingStatus:m.gradingStatus,failureClass:m.failureClass,artifactCount:t.artifactRefs.length,latencyMs:t.latencyMs,costUsd:t.costUsd,terminal:t.terminal,feedback:m.components.map(f=>({graderId:f.graderId,graderVersion:f.graderVersion,score:f.score,passed:f.passed,feedback:f.feedback})),...e.receiptId?{receipt:t,evidence:await _({store:e.store,profileRef:e.profileRef,manifest:i,receipt:t,eventAfterId:e.eventAfterId,eventLimit:e.eventLimit})}:{}}}));return{runId:i.id,sourceRevision:i.profileEvaluation?.sourceRevision??null,cases:u}}R(D,"inspectProfileEvaluationRun");export{j as a,W as b,D as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{ja as h}from"./chunk-MVPKU72J.js";import{m as f}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as m}from"./chunk-FTQLQJQV.js";var g=e.object({schemaVersion:e.literal("openpond.profileWorkCompletion.v1"),sessionId:e.string().min(1),turnId:e.string().min(1),responsePath:e.string().min(1),responseSha256:e.string().regex(/^[a-f0-9]{64}$/),responseBytes:e.number().int().min(1).max(1048576),responseChunks:e.array(e.string().max(65536)).min(1).max(32),outputs:e.array(e.object({id:e.string(),revision:e.number().int(),sha256:e.string(),sizeBytes:e.number().int(),contentType:e.string(),sourceTaskId:e.string(),sourceTurnId:e.string(),title:e.string()}).strict()).min(1).max(100)}).strict();function W(s){let u=new TextDecoder("utf-8",{fatal:!0}).decode(s.response),i=[];for(let r=0;r<u.length;r+=65536)i.push(u.slice(r,r+65536));return g.parse({schemaVersion:"openpond.profileWorkCompletion.v1",sessionId:s.sessionId,turnId:s.turnId,responsePath:s.responsePath,responseSha256:f(s.response),responseBytes:s.response.length,responseChunks:i,outputs:s.outputs.map(({id:r,revision:t,sha256:a,sizeBytes:p,contentType:c,sourceTaskId:o,sourceTurnId:d,title:n})=>({id:r,revision:t,sha256:a,sizeBytes:p,contentType:c,sourceTaskId:o,sourceTurnId:d,title:n}))})}m(W,"createProfileWorkCompletion");function _(s){let u=s.filter(o=>o.name==="tool.completed"&&o.action==="work_finish"&&o.status==="completed");if(!u.length)return null;if(u.length!==1)throw new Error("The case has multiple Work completion receipts.");let i=u[0],r=i.data,t=g.parse(r?.result);if(t.sessionId!==i.sessionId||t.turnId!==i.turnId)throw new Error("Work completion belongs to another case or turn.");let a=t.responseChunks.join(""),p=Buffer.from(a,"utf8");if(p.length!==t.responseBytes||f(p)!==t.responseSha256)throw new Error("Work completion response differs from its sealed content.");if(new Set(t.outputs.map(o=>`${o.id}/${o.revision}`)).size!==t.outputs.length)throw new Error("Work completion repeats a saved output.");let c=s.slice(0,s.indexOf(i));for(let o of t.outputs){if(o.sourceTaskId!==t.sessionId||o.sourceTurnId!==t.turnId)throw new Error("Work completion output belongs to another case or turn.");if(c.filter(n=>n.name==="workspace_action_result"&&n.action==="work_output_save"&&n.status==="completed"&&n.sessionId===t.sessionId&&n.turnId===t.turnId).flatMap(n=>{let l=h.safeParse(n.data?.outputRef);return l.success&&Object.entries(o).every(([k,I])=>l.data[k]===I)?[l.data]:[]}).length!==1)throw new Error("Work completion lacks an exact prior saved-output receipt.")}return a}m(_,"completedProfileWorkResponse");export{W as a,_ as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as s}from"./chunk-FTQLQJQV.js";var y=2,f="application/vnd.openpond.training+json;version=2",w="application/vnd.openpond.model-project+json;version=2",O=1048576,g=67108864,b=8388608;var r=class extends Error{static{s(this,"OpenPondProtocolError")}code;constructor(o,e){super(e),this.name="OpenPondProtocolError",this.code=o}};function u(n){return JSON.stringify(_(n))}s(u,"canonicalJson");function l(n){return new TextEncoder().encode(u(n)).byteLength}s(l,"canonicalJsonByteLength");async function N(n){let o=new TextEncoder().encode(u(n)),e=await globalThis.crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(e),t=>t.toString(16).padStart(2,"0")).join("")}s(N,"canonicalSha256");function E(n,o,e){let t=l(n);if(t>o)throw new r("payload_too_large",`${e} is ${t} bytes; the maximum is ${o} bytes.`)}s(E,"assertCanonicalPayloadSize");function d(n,o,e){let t=new TextEncoder().encode(n).byteLength;if(t>o)throw new r("response_too_large",`${e} is ${t} bytes; the maximum is ${o} bytes.`);try{return JSON.parse(n)}catch{throw new r("invalid_json",`${e} was not valid JSON.`)}}s(d,"parseBoundedJson");async function h(n,o,e){let t=n.body?.getReader();if(!t)return d("",o,e);let c=new TextDecoder,p=0,i="";try{for(;;){let a=await t.read();if(a.done)break;if(p+=a.value.byteLength,p>o)throw new r("response_too_large",`${e} exceeds the maximum of ${o} bytes.`);i+=c.decode(a.value,{stream:!0})}return i+=c.decode(),d(i,o,e)}catch(a){try{await t.cancel()}catch{}throw a}finally{try{t.releaseLock()}catch{}}}s(h,"readBoundedJsonResponse");function _(n){if(n===null||typeof n=="string"||typeof n=="boolean")return n;if(typeof n=="number"){if(!Number.isFinite(n))throw new r("non_json_value","Canonical JSON cannot contain a non-finite number.");return Object.is(n,-0)?0:n}if(Array.isArray(n))return n.map(o=>_(o));if(typeof n=="object"){let o=Object.getPrototypeOf(n);if(o!==Object.prototype&&o!==null)throw new r("non_json_value","Canonical JSON accepts only plain objects.");let e=Object.create(null);for(let t of Object.keys(n).sort()){let c=n[t];if(c===void 0||typeof c=="function"||typeof c=="symbol")throw new r("non_json_value",`Canonical JSON cannot contain ${typeof c} at ${t}.`);e[t]=_(c)}return e}throw new r("non_json_value",`Canonical JSON cannot contain ${typeof n}.`)}s(_,"normalizeCanonicalJson");export{y as a,f as b,w as c,O as d,g as e,b as f,r as g,u as h,l as i,N as j,E as k,d as l,h as m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{r as m,s as u}from"./chunk-
|
|
2
|
+
import{r as m,s as u}from"./chunk-OTDDXEQ6.js";import{m as h}from"./chunk-RCT3O3HQ.js";import{a as o}from"./chunk-FTQLQJQV.js";import x from"node:path";import{randomUUID as H}from"node:crypto";import{access as E,mkdir as c,readFile as b,realpath as l,rename as P,rm as S,writeFile as v}from"node:fs/promises";import n from"node:path";async function p(r){let e=n.join(r.storeDir,"training","harnesses",r.harnessHash,"source"),s=!1;try{await E(e),s=!0}catch(a){if(a.code!=="ENOENT")throw a}if(s)return d(e,r.files);await c(n.dirname(e),{recursive:!0});let t=`${e}.materializing-${H()}`;await c(t);try{let a=await l(r.sourcePath);for(let i of r.files){let R=await w(a,i),f=y(t,i.path);await c(n.dirname(f),{recursive:!0}),await v(f,R,{flag:"wx",mode:384})}try{await P(t,e)}catch(i){if(!["EEXIST","ENOTEMPTY","EPERM"].includes(i.code??""))throw i}return await d(e,r.files)}finally{await S(t,{recursive:!0,force:!0})}}o(p,"materializeHarnessSource");async function d(r,e){let s=await l(r),t=new Map;for(let a of e)t.set(a.path,await w(s,a));return t}o(d,"verifyFiles");async function w(r,e){let s=y(r,e.path),t=await l(s);g(r,t);let a=await b(t);if(a.byteLength!==e.sizeBytes||h(a)!==e.contentHash)throw new Error(`Released Harness file ${e.path} does not match its immutable bytes.`);return a}o(w,"readVerifiedFile");function y(r,e){let s=n.resolve(r,...e.split("/"));return g(r,s),s}o(y,"containedPath");function g(r,e){let s=n.relative(r,e);if(!s||s===".."||s.startsWith(`..${n.sep}`)||n.isAbsolute(s))throw new Error("Released Harness file escapes its execution directory.")}o(g,"assertContained");async function $(r){let{release:e}=r,s=await p({sourcePath:x.join(e.bundlePath,"source"),storeDir:r.storeDir,harnessHash:e.harnessRelease.contentHash,files:e.harnessRelease.files}),t=m({agentSnapshot:e.agentSnapshot,harnessRelease:e.harnessRelease,files:s});return u(t,{id:e.harnessRelease.id,contentHash:e.harnessRelease.contentHash})}o($,"profileTrainingSource");export{p as a,$ as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{B as et,l as X,o as Ye,p as Qe,t as Ue,u as Ze,z as le}from"./chunk-Y3B6ZUE6.js";import{Ca as ye,L as xe,N as ze,Oa as Ee,Qa as Xe,S as Ge,Sa as ue,U as Ne,V as me,_ as We,a as Fe,aa as W,ba as J,c as Oe,ca as fe,d as G,da as Je,e as ie,ea as Ke,ia as pe,ja as C,ka as K,oa as ee,wa as N,x as ce,y as Te,z as de}from"./chunk-WLZJOCLA.js";import{h as re,l as z,m}from"./chunk-HIQPGYVH.js";import{d as Ve}from"./chunk-I6VMRQF4.js";import{V as Ce,X as Le}from"./chunk-QAFXQHHG.js";import{A as Ae,K as y,L,M as P,N as $e,P as oe,R as qe,ca as Z,k as O,l as Q,mb as be,nb as Se,o as V,ob as je,s as ae,v as U,y as ne}from"./chunk-G4E3WGLM.js";import{$a as _e,Aa as j,Wa as Pe,_a as Me,ab as Be,bb as De,ga as se}from"./chunk-ZY32SZ2P.js";import{A as x}from"./chunk-X2J2P5ZT.js";import{a as T}from"./chunk-FTQLQJQV.js";var he=Q.shape.id,tt=x.object({schemaVersion:x.literal("openpond.modelBatchReviewInspection.v1"),packageHash:x.string().regex(/^[a-f0-9]{64}$/),definition:V,binding:Pe,evidence:x.array(U).min(1).max(1e4),decisions:x.array(Ae).min(1).max(1e4)}).strict(),He=x.object({schemaVersion:x.literal("openpond.modelBatchReviewRequest.v1"),operationId:he,modelId:he,expectedModelRevision:x.number().int().positive(),tasksetRef:Q,rewardBindingRef:Q.nullable(),definition:x.object({name:x.string().trim().min(1).max(500).optional(),instructions:x.string().trim().min(1).max(2e4).optional(),inputSchema:O.optional(),outputSchema:O.optional(),requiredOutputs:V.shape.requiredOutputs}).strict(),examples:x.array(x.object({evidence:Q,input:O.optional(),expected:O.nullable().optional(),evaluatorContext:O.nullable().optional(),proposedTarget:O.nullable().optional()}).strict()).max(1e4)}).strict(),st=x.object({schemaVersion:x.literal("openpond.modelBatchReviewReceipt.v1"),operationId:he,modelId:he,source:ae,evidence:x.array(U).min(1).max(1e4),proposals:x.array(ne).max(1e4)}).strict();function ct(t){let e=C(t.source),s=C(t.edited),n=t.preparation;if(n.authoringGraph!=="bound"||!e.modelResources||e.learningResources||s.modelResources||s.learningResources)throw new Error("Bound task editing requires its source Reward and an ordinary edited workspace.");if(e.contentHash!==n.sourcePackageHash||!L(y(e.taskset),n.sourceTasksetRef))throw new Error("Bound draft differs from its retained source package.");let i=T(S=>S.taskset.graders.map(_=>_.kind==="custom_verifier"?{..._,exportName:_.exportName??"verify"}:_),"normalizedGraders");if(m(i(e))!==m(i(s)))throw new Error("Edit the saved Reward in Rewards before changing this Taskset's graders.");let d=e.modelResources,h=new Map(d.assets.map(S=>[S.id,S])),o=J(s),v=J(e),k=T(S=>{let{id:_,revision:ge,contentHash:we,metadata:Re,...it}=S,{javascriptEnvironment:wt,...Ie}=Re;return{...it,metadata:{...Ie,resources:Ie.resources??[]}}},"environmentContent"),r=T(S=>{if(!S)return null;let{id:_,revision:ge,contentHash:we,...Re}=S.execution.javascript;return Re},"javascriptContent"),R=m(k(e.environment))===m(k(s.environment))&&m(r(v))===m(r(o)),g=R?e.environment:s.environment,p=R?v:o,f=new Set([...d.assets.map(S=>S.id),...s.taskset.tasks.flatMap(S=>S.privilegedContextRef?[S.privilegedContextRef]:[]),...[s.environment.actionSchemaRef,s.environment.observationSchemaRef,s.environment.stateSchemaRef].flatMap(S=>S?[S.id]:[]),...o?.assets.map(S=>S.id)??[]]),B=new Set([...f,...s.taskset.tasks.flatMap(S=>[...S.artifactRefs.map(_=>_.id),...(S.requiredOutputs??[]).flatMap(_=>_.schemaRef?[_.schemaRef.id]:[])])]),q=dt(e,s,B);for(let S of f){let _=q.find(we=>we.asset.id===S);if(!_)throw new Error(`Bound Taskset asset is missing: ${S}.`);let ge=new TextDecoder("utf-8",{fatal:!0}).decode(W(_));h.set(S,oe.parse(P({schemaVersion:"openpond.learningTextAsset.v1",id:S,revision:1,asset:_.asset,text:ge})))}let I=pe(s),{contentHash:w,...E}=d.taskDefinition,{policy:A,environment:F,environmentRelease:D,tools:c,capabilities:l,verifierSetRelease:b}=s.taskset,a=V.parse(P({...E,instructions:I,execution:{policy:A,environment:F,environmentRelease:D,tools:c,capabilities:l,verifierSetRelease:b}})),{contentHash:u,...H}=s.taskset,M=se.parse(P({...H,tasks:s.taskset.tasks.map(S=>d.instructionMode==="per_task"?S:{...S,policyVisibleContext:{...S.policyVisibleContext,instructions:I}})})),$=me({owner:n.lineage.owner,source:{...d,taskset:e.taskset,executionResources:{environment:e.environment,verifierSet:e.verifierSet}},rewardBinding:d.rewardBinding,rewards:d.rewards,assets:[...h.values()],edits:{taskset:M,taskDefinition:a,executionResources:{environment:g,verifierSet:s.verifierSet},...p?{execution:p.execution}:{}}}),Y=Ge.parse($.taskset.metadata.modelTasksetDerivation);if($.taskset.id!==n.tasksetId||$.taskset.revision!==n.tasksetRevision||m({...Y,schemaVersion:n.lineage.schemaVersion})!==m(n.lineage))throw new Error("Bound draft differs from its retained ownership lineage.");let{taskset:ve,executionResources:ke,...rt}=$;return K({schemaVersion:"openpond.tasksetPackage.v1",taskset:ve,...ke,modelResources:rt,files:q})}T(ct,"publishBoundModelTasksetDraftPackage");function dt(t,e,s){let n=e.files,i=new Map(t.files.map(o=>[o.asset.id,{file:o,assetHash:m(o.asset)}])),d=T(o=>{let v=i.get(o.asset.id);return v!==void 0&&v.file.base64===o.base64&&v.assetHash===m(o.asset)},"isSourceFile"),h=t.files.filter(o=>X(o.asset.path)).map(o=>{let v=`source-artifact-${m({packageHash:t.contentHash,assetId:o.asset.id})}`;return{original:o,asset:{...o.asset,id:v,path:`source-artifacts/${t.contentHash}/${m(o.asset.path)}/${o.asset.path.split("/").at(-1)}`}}});for(let{original:o,asset:v}of h){let k=h.filter(p=>m({...p.original.asset,id:o.asset.id})===m(o.asset)),R=e.files.find(p=>p.asset.id===v.id)??k.flatMap(p=>e.files.filter(f=>m(f.asset)===m(p.asset)))[0];if(!R||R.base64!==o.base64||!k.some(p=>m(p.asset)===m(R.asset)))throw new Error(`Retained Taskset source artifact differs from its original bytes: ${o.asset.id}.`);let g=n.filter(p=>p.asset.path===o.asset.path||p.asset.id===o.asset.id);if(g.some(p=>p.asset.path!==o.asset.path||p.asset.id!==o.asset.id&&p.asset.id!==`taskset-file-${m(o.asset.path)}`&&!d(p)))throw new Error(`Retained Taskset source artifact conflicts with an authored file: ${o.asset.id}.`);n=[...n.filter(p=>p.asset.id!==v.id&&p.asset.id!==o.asset.id&&(!g.includes(p)||d(p))),o]}for(let o of t.files.filter(v=>!n.some(k=>k.asset.id===v.asset.id))){if(o.asset.path==="environment/execution.json"){let r=xe.safeParse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(W(o))));if(r.success&&m(fe(r.data))===m(o))continue}let v=n.filter(r=>r.asset.path===o.asset.path),k=T(r=>m({...r.asset,id:o.asset.id})===m(o.asset)&&r.base64===o.base64,"sameEnvelope");if(s.has(o.asset.id)||!v.length||v.some(r=>!k(r)))throw new Error(`Retained Taskset source alias differs from its original bytes: ${o.asset.id}.`);n=[...n,o]}return n}T(dt,"retainSourceFileIdentities");function $t(t){let e=Oe.parse(t.request),s=Fe.parse(t.owner),n=C(t.source);if(n.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(n.contentHash!==e.sourcePackageHash)throw new Error("Taskset draft source package changed.");if(n.modelResources){let v=Ne({owner:s,source:{...n.modelResources,taskset:n.taskset,executionResources:{environment:n.environment,verifierSet:n.verifierSet}},rewardBinding:n.modelResources.rewardBinding,rewards:n.modelResources.rewards,assets:n.modelResources.assets}),k=v.taskset.metadata.modelTasksetDerivation;return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${m({owner:s,operationId:e.operationId})}`,requestHash:m(e),sourcePackageHash:n.contentHash,sourceTasksetRef:y(n.taskset),tasksetId:v.taskset.id,tasksetRevision:v.taskset.revision,lineage:{...k,schemaVersion:"openpond.modelTasksetAuthoring.v1"},authoringGraph:"bound"})}let i=Ke(n.taskset),d=i&&m(i.owner)===m(s),h=d?i.root:y(n.taskset),o={schemaVersion:"openpond.modelTasksetAuthoring.v1",owner:s,root:h,parent:y(n.taskset)};return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${m({owner:s,operationId:e.operationId})}`,requestHash:m(e),sourcePackageHash:n.contentHash,sourceTasksetRef:y(n.taskset),tasksetId:Je(o),tasksetRevision:d?n.taskset.revision+1:1,lineage:o})}T($t,"prepareModelTasksetDraft");function mt(t){let e=G.parse(t.preparation);if(!L(e.sourceTasksetRef,e.lineage.parent))throw new Error("Taskset draft preparation differs from its source lineage.");if(e.authoringGraph==="bound"){if(!t.source)throw new Error("Bound Taskset authoring requires its retained source package.");return ct({preparation:e,source:t.source,edited:t.edited})}let s=ft(t.edited),{contentHash:n,...i}=s.verifierSet,d=Le({...i,id:`${e.tasksetId}-verifiers`,revision:e.tasksetRevision,calibrationReceiptRefs:[],metadata:{sourceVerifierSet:y(s.verifierSet)}}),{contentHash:h,...o}=s.taskset,v=se.parse(P({...o,id:e.tasksetId,revision:e.tasksetRevision,verifierSetRelease:{id:d.id,contentHash:d.contentHash},metadata:{modelTasksetAuthoring:e.lineage,...s.taskset.metadata.environmentResources===void 0?{}:{environmentResources:s.taskset.metadata.environmentResources},...s.taskset.metadata.ordinaryAuthoring===void 0?{}:{ordinaryAuthoring:s.taskset.metadata.ordinaryAuthoring}}})),k=J(s),r=k?[...s.files.filter(R=>R.asset.id!==ze(s.taskset)),fe({...k.execution,verifierSet:d})]:s.files;return K({schemaVersion:"openpond.tasksetPackage.v1",taskset:v,environment:s.environment,verifierSet:d,files:r})}T(mt,"publishModelTasksetDraftPackage");function ft(t){let e=C(t);if(e.modelResources||e.learningResources)throw new Error("This Taskset requires its bound or reviewed authoring workflow.");return e}T(ft,"requireOrdinaryPackage");function pt(t,e,s,n){if(t.environment.entrypoint!=="openpond.javascript-environment.v1")return{taskset:t,inventory:s,generatedFiles:[]};let i="environment/execution.json",d=e.get(i);if(!d||d.length>524288)throw new Error("Authored tool environment requires its bounded private execution declaration.");let h=xe.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(d))),o=T(I=>{if(!I)return null;let w=s.find(E=>E.asset.id===I.id&&E.asset.path===I.path);if(!w)throw new Error(`Authored environment dependency is missing: ${I.id}.`);return w.asset},"repin"),{contentHash:v,...k}=h.javascript,r=Ve.parse(P({...k,id:`javascript-${t.id}`,revision:t.revision,module:o(h.javascript.module)}));if(m(r.tools)!==m(t.environment.metadata.portableTools)||m(r.tools.map(I=>I.name))!==m(t.environment.toolNames))throw new Error("Authored environment tools differ from the Taskset's declared tools.");let R=Ce({schemaVersion:"openpond.environmentRelease.v1",id:`environment-${t.id}`,revision:t.revision,contract:Xe(t),actionSchemaRef:o(h.environment.actionSchemaRef),observationSchemaRef:o(h.environment.observationSchemaRef),stateSchemaRef:o(h.environment.stateSchemaRef),artifactCollection:h.environment.artifactCollection,adapterConformanceHashes:{},metadata:{javascriptEnvironment:y(r),resources:t.environment.resources??[]}}),g=N.parse({...t,environment:{...t.environment,metadata:{...t.environment.metadata,portableExecutionResources:{environment:R}}}}),p=Ee({taskset:g,adapterId:n}),f=fe({javascript:r,environment:R,verifierSet:p.verifierSetRelease}),B=[...s.filter(I=>I.sourcePath!==i),{asset:f.asset,sourcePath:i}],q=N.parse({...g,metadata:{...g.metadata,portableFileInventory:B}});return{taskset:N.parse({...q,contentHash:ye(q)}),inventory:B,generatedFiles:[{path:i,role:"environment",content:new TextDecoder().decode(W(f))}]}}T(pt,"prepareAuthoredToolEnvironment");var te=x.array(x.object({asset:re,sourcePath:x.string().min(1)}).strict()).max(1e4),ut=new Set(["taskset.json","capabilities.json","data/tasks.jsonl","graders/graders.json","fixtures/grader-fixtures.json","environment/taskset.ts"]);function lt(t){return ut.has(t)}T(lt,"isGeneratedTasksetPublicationFilePath");function ht(t,e,s,n=We){let i=N.parse(t);for(let c of i.tasks)for(let l of c.requiredOutputs??[])if(ce(l.metadata)&&l.submissionMode!=="structured_json")throw new Error("Sampling schema requires a structured output.");if(i.metadata.taskDefinition!==void 0||i.metadata.rewardBinding!==void 0){for(let c of i.tasks)for(let l of ue(c).requiredOutputs??[]){let b=ce(l.metadata);if(!b)continue;let a=ue(c).artifactRefs.find(Y=>Y.id===b.schemaRef.id);if(!a||m(a)!==m(b.schemaRef)||!l.schemaRef)throw new Error("Sampling schema must match an ordinary declared policy artifact.");let u=T((Y,ve)=>c.assets?.find(ke=>ke.id===Y)?.artifactRef??ve,"sourcePath"),H=e.get(u(l.schemaRef.id,l.schemaRef.path)),M=e.get(u(a.id,a.path));if(!H||!M)throw new Error("Sampling schema source bytes are missing.");let $=de(H,l.schemaRef.contentHash);Te($,b,M)}return{taskset:i,generatedFiles:[]}}let d=new Map,h=0;for(let[c,l]of e){if(ie.parse(c),h+=l.byteLength,d.size>=1e4||h>n*3/4)throw new Error("Taskset source exceeds the package byte limit.");d.set(c,l.slice())}let o=i.metrics?.customAggregator,v=o?d.get(o.module):void 0;if(o&&!v)throw new Error("Declared Taskset metric module is missing.");let k=o&&v?{...i.metrics,customAggregator:{...o,contentHash:z(v)}}:i.metrics,r=new Map,R=new Set,g=[],p=T((c,l,b,a)=>{let u=d.get(l);if(!u)throw new Error(`Declared Taskset file is missing: ${l}.`);return{id:c,path:l,contentHash:z(u),sizeBytes:u.byteLength,mediaType:b,visibility:a}},"ref"),f=T((c,l=c.path)=>{let b=r.get(c.id);if(b&&m(b)!==m({asset:c,sourcePath:l}))throw new Error(`Conflicting Taskset file identity: ${c.id}.`);let a=d.get(l);if(!a||a.length!==c.sizeBytes||z(a)!==c.contentHash)throw new Error(`Taskset file differs from its declared bytes: ${c.id}.`);r.set(c.id,{asset:c,sourcePath:l}),R.add(l)},"add");for(let c of i.tasks){let l={};for(let a of c.requiredOutputs??[])if(a.submissionMode==="structured_json"){if(!a.schemaRef||a.mediaType!=="application/json")throw new Error("Structured outputs require a JSON schemaRef and application/json.");let u=c.metadata.portableTaskRecord?.requiredOutputs?.find($=>$.path===a.path)?.schemaRef,H=u?.id===a.schemaRef?u.path:a.schemaRef,M=p(a.schemaRef,H,"application/schema+json","policy");if(u&&u.id===a.schemaRef&&u.visibility!=="policy")throw new Error("Structured output schema must be policy-visible.");de(d.get(H),M.contentHash),l[a.schemaRef]=M}Object.keys(l).length&&(c.metadata={...c.metadata,outputSchemaRefs:l});let b=ue(c);for(let a of b.artifactRefs)f(a,c.assets?.find(u=>u.id===a.id)?.artifactRef??a.path);for(let a of b.requiredOutputs??[])a.schemaRef&&f(a.schemaRef);for(let a of b.requiredOutputs??[]){let u=ce(a.metadata);if(!u)continue;let H=r.get(u.schemaRef.id);if(!H||m(H.asset)!==m(u.schemaRef)||!b.artifactRefs.some($=>$.id===u.schemaRef.id)||!a.schemaRef)throw new Error("Sampling schema must match an ordinary declared policy artifact.");let M=de(d.get(r.get(a.schemaRef.id).sourcePath),a.schemaRef.contentHash);Te(M,u,d.get(H.sourcePath))}}for(let c of i.environment.resources??[])f(p(c.id,c.path,c.mediaType??"application/octet-stream",c.visibility==="policy_visible"?"policy":"host_private"));let B=i.graders.map(c=>{if(c.kind==="custom_verifier"){let l=p(`verifier-${c.id}`,c.module,"application/javascript","host_private"),b=re.safeParse(c.metadata.portableVerifierRef);return b.success&&b.data.contentHash===l.contentHash&&b.data.sizeBytes===l.sizeBytes&&(l=b.data),f(l,c.module),{...c,metadata:{...c.metadata,portableVerifierRef:l}}}if(c.kind==="human"||c.kind==="model_judge"){let l=new TextEncoder().encode(c.rubric),b=`graders/rubric-${z(l)}.md`;d.set(b,l);let a=p(`rubric-${c.id}`,b,"text/markdown","verifier"),u=re.safeParse(c.metadata.portableRubricRef);if(u.success&&u.data.contentHash===a.contentHash&&u.data.sizeBytes===a.sizeBytes){if(u.data.visibility==="policy")throw new Error("A grader rubric cannot become policy-visible.");a=u.data}return f(a,b),g.push({path:b,role:"verifier",content:c.rubric}),{...c,metadata:{...c.metadata,portableRubricRef:a}}}return c});o&&![...r.values()].some(c=>c.asset.path===o.module&&c.sourcePath===o.module&&c.asset.visibility!=="policy")&&f(p(`metric-${m(o.module)}`,o.module,"application/javascript","host_private"));let q=te.parse(i.metadata.portableFileInventory??[]);for(let c of[...d.keys()].sort())if(!R.has(c)){let l=q.find(b=>b.sourcePath===c&&!r.has(b.asset.id));f(l?{...p(l.asset.id,c,l.asset.mediaType,l.asset.visibility),path:l.asset.path}:p(`taskset-file-${m(c)}`,c,"application/octet-stream","host_private"),c)}let{importedPackageHash:I,derivedPortableMetadata:w,...E}=i.metadata,A={...i.environment.metadata};if(A.portableExecutionResources!==void 0){let c=x.object({environment:x.unknown(),verifierSet:x.unknown().optional()}).parse(A.portableExecutionResources);A.portableExecutionResources={environment:c.environment}}let F=N.parse({...i,graders:B,metrics:k,environment:{...i.environment,metadata:A},metadata:{...E,...I===void 0?{}:{sourceImportedPackageHash:I},portableFileInventory:te.parse([...r.values()].sort((c,l)=>c.asset.id.localeCompare(l.asset.id)))}}),D=pt(F,d,[...r.values()],s);return{taskset:N.parse({...D.taskset,contentHash:ye(D.taskset)}),generatedFiles:[...g,...D.generatedFiles]}}T(ht,"prepareAuthoredTasksetSource");function vt(t){let e=Ze(t.workspace,t.maximumBytes),s=t.preparation===null?null:G.parse(t.preparation);if(s?e.draft.id!==s.draftId||e.draft.modelScope?.modelId!==s.lineage.owner.modelId||e.draft.profileId!==s.lineage.owner.scopeId||m(e.draft.modelScope?.source??null)!==m(s):e.draft.modelScope?.source!==void 0)throw new Error("Taskset draft differs from its retained source preparation.");let n=et({draft:e.draft,now:e.draft.updatedAt,sourcePackageHash:t.sourceWorkspaceHash??e.contentHash}),i=new Map(e.files.map(k=>[k.path,le(k)]));for(let[k,r]of Qe(e.draft))lt(k)||i.set(k,new TextEncoder().encode(r));let d=ht(n,i,t.adapterId,t.maximumBytes);for(let k of d.generatedFiles)i.set(k.path,new TextEncoder().encode(k.content));let h=Ee({taskset:d.taskset,adapterId:t.adapterId}),o=te.parse(d.taskset.metadata.portableFileInventory),v=K({schemaVersion:"openpond.tasksetPackage.v1",taskset:h.tasksetRelease,environment:h.environmentRelease,verifierSet:h.verifierSetRelease,files:o.map(k=>{let r=i.get(k.sourcePath);if(!r)throw new Error(`Captured Taskset file is missing: ${k.sourcePath}.`);return{asset:k.asset,base64:Buffer.from(r).toString("base64")}})},t.maximumBytes);return s?mt({preparation:s,edited:v,source:t.source}):v}T(vt,"compileTasksetDraftWorkspace");function Vt(t){if(!t.workspace.draft.modelScope)throw new Error("Taskset draft requires a Model owner.");return vt(t)}T(Vt,"compileModelTasksetDraftWorkspace");function Qt(t){let e=C(t.source);if(e.modelResources||e.learningResources)throw new Error("Binding an ordinary Reward requires an ordinary source package.");let s=pe(e);if(!s.trim())throw new Error("Add collection instructions before selecting a saved Reward.");let n=new Map,i=J(e);for(let w of i?.assets??[])n.set(w.id,w);let d=new Set([...e.taskset.tasks.flatMap(w=>w.privilegedContextRef?[w.privilegedContextRef]:[]),...[e.environment.actionSchemaRef,e.environment.observationSchemaRef,e.environment.stateSchemaRef].flatMap(w=>w?[w.id]:[])]);for(let w of d){if(n.has(w))continue;let E=e.files.find(F=>F.asset.id===w);if(!E)throw new Error(`Source Taskset context is missing: ${w}.`);let A=new TextDecoder("utf-8",{fatal:!0}).decode(W(E));n.set(w,oe.parse(P({schemaVersion:"openpond.learningTextAsset.v1",id:w,revision:1,asset:E.asset,text:A})))}for(let w of t.assets){let E=e.files.find(A=>A.asset.id===w.id);if(E&&P({asset:E.asset}).contentHash!==P({asset:w.asset}).contentHash)throw new Error(`Selected Reward conflicts with a source asset: ${w.id}.`);n.set(w.id,w)}let{policy:h,environment:o,environmentRelease:v,tools:k,capabilities:r,verifierSetRelease:R}=e.taskset,g=V.parse(P({schemaVersion:"openpond.taskDefinition.v1",id:`${e.taskset.id}-definition`,revision:1,name:e.taskset.id,description:"",instructions:s,category:"custom",familyNamespace:e.taskset.id,inputSchema:{type:"object"},outputSchema:{type:"object"},rewardBinding:y(t.rewardBinding),harness:null,execution:{policy:h,environment:o,environmentRelease:v,tools:k,capabilities:r,verifierSetRelease:R}})),p=me({...t,assets:[...n.values()],source:{taskset:e.taskset,taskDefinition:g,instructionMode:"per_task",executionResources:{environment:e.environment,verifierSet:e.verifierSet},...i?{execution:i.execution}:{}}}),f=new Map(e.files.map(w=>[w.asset.id,w]));for(let w of p.assets){let E="";for(let A of new TextEncoder().encode(w.text))E+=String.fromCharCode(A);f.set(w.id,{asset:w.asset,base64:btoa(E)})}let{taskset:B,executionResources:q,...I}=p;return K({schemaVersion:"openpond.tasksetPackage.v1",taskset:B,...q,modelResources:I,files:[...f.values()]})}T(Qt,"bindOrdinaryModelTasksetReward");function kt(t){let{request:e,package:s}=t,n=s.learningResources;if(!n)throw new j("model_review_batch_required",422);let i=Z(s.taskset),d=`model-review-${m([t.scope,e.modelId,e.operationId])}`,h=new Map(e.examples.map(a=>[m(a.evidence),a])),o=new Set(n.evidence.map(a=>m(y(a)))),v=new Map(n.decisions.map(a=>[m(a.evidence),a]));if(h.size!==e.examples.length||e.examples.some(a=>!o.has(m(a.evidence))))throw new j("model_review_evidence_mismatch",409);for(let a of[t.binding,...t.rewards,...t.assets])$e(a);Be(t.binding,t.rewards);let k=new Map;for(let a of t.binding.sources){let u=t.rewards.find($=>L(y($),a.reward)),{contentHash:H,...M}=u;k.set(u.contentHash,Me({...M,id:`${d}-reward-${u.contentHash}`,revision:1}))}let r=[...k.values()],{contentHash:R,recipeRef:g,...p}=t.binding,f=_e({...p,id:`${d}-binding`,revision:1,sources:t.binding.sources.map(a=>({...a,reward:y(k.get(a.reward.contentHash))}))},r),B=r.flatMap(a=>[...a.assets,..."verifierRef"in a.implementation?[a.implementation.verifierRef]:[],..."rubricRef"in a.implementation?[a.implementation.rubricRef]:[],..."inputContract"in a.implementation?[a.implementation.inputContract]:[]]),q=[...new Map(B.map(a=>{let u=t.assets.find(H=>H.id===a.id);if(!u)throw new j("model_review_reward_asset_missing",422);if(qe(u,a),a.visibility==="policy")throw new j("reward_asset_visibility_invalid",422);return[u.id,u]})).values()],{environmentRelease:I,verifierSetRelease:w,...E}=i.definition.execution,{contentHash:A,...F}=i.definition,D=V.parse(P({...F,...e.definition,id:`${d}-definition`,revision:1,rewardBinding:y(f),execution:{...E,policy:{...E.policy,hiddenGraderRefs:De(f,r).filter(a=>a.privileged).map(a=>a.id)}}})),c=ae.parse(P({schemaVersion:"openpond.learningSource.v1",id:d,revision:1,name:`${D.name} review`,kind:"direct",taskDefinition:y(D),enabled:!0,allowedSplits:[...new Set(n.evidence.map(a=>a.submission.split))],mapping:null,adapterVersion:null,reviewOrigin:{modelId:e.modelId,packageHash:s.contentHash,taskset:y(s.taskset),batch:y(n.batch),rewardBinding:y(t.binding)}})),l=n.evidence.map(a=>{let u=h.get(m(y(a))),H=`review-${a.contentHash}`,M=m({instructions:D.instructions,inputSchema:D.inputSchema,outputSchema:D.outputSchema,requiredOutputs:D.requiredOutputs??[],input:u?.input??a.submission.input})!==m({instructions:i.definition.instructions,inputSchema:i.definition.inputSchema,outputSchema:i.definition.outputSchema,requiredOutputs:i.definition.requiredOutputs??[],input:a.submission.input});return U.parse(P({schemaVersion:"openpond.taskEvidence.v1",id:je(c.id,a.submission.exampleId,H),revision:1,source:y(c),submission:{...a.submission,sourceId:c.id,taskDefinition:y(D),attemptId:H,observedOutput:M?null:a.submission.observedOutput,idempotencyKey:`${d}-${a.contentHash}`,...u?.input===void 0?{}:{input:u.input},...u?.expected===void 0?{}:{expected:u.expected},...u?.evaluatorContext===void 0?{}:{evaluatorContext:u.evaluatorContext}},supersedes:y(a),correctionFeedbackId:null,receivedAt:t.now}))}),b=l.flatMap(a=>{let u=h.get(m(a.supersedes)),H=v.get(m(a.supersedes)),M=u?.proposedTarget===void 0?H.approvedTarget:u.proposedTarget;return M===null?[]:[ne.parse({schemaVersion:"openpond.taskFeedbackRecord.v1",id:`feedback-${m([d,a.id])}`,revision:1,submission:{schemaVersion:"openpond.taskFeedback.v1",sourceId:c.id,idempotencyKey:`${d}-${a.id}`,exampleId:a.submission.exampleId,attemptId:a.submission.attemptId,expectedEvidenceHash:a.contentHash,occurredAt:t.now,kind:"target_correction",value:M,note:"Proposed target for the revised task. Grade and review before admission."},status:"pending_review",evidence:y(a),createdAt:t.now,review:null})]});return{source:c,definition:D,binding:f,rewards:r,assets:q,evidence:l,proposals:b}}T(kt,"prepareModelBatchReview");var at=T(t=>`model-batch-review-${m([t.modelId,t.operationId])}`,"operation");function ss(t){let e=C(t);if(!e.learningResources)throw new j("model_review_batch_required",422);let s=Z(e.taskset);return tt.parse({schemaVersion:"openpond.modelBatchReviewInspection.v1",packageHash:e.contentHash,definition:s.definition,binding:s.binding,evidence:e.learningResources.evidence,decisions:e.learningResources.decisions})}T(ss,"inspectModelBatchPackage");async function gt(t,e){let s=He.parse(e),n=await t.operation(at(s));if(!n)return null;if(n.requestHash!==m(s))throw new j("learning_idempotency_conflict",409);return nt(t,s,n.resources)}T(gt,"findModelBatchReview");async function as(t,e){let s=He.parse(e.request),n=await gt(t,s);if(n)return n;let i=C(e.package);if(!i.learningResources)throw new j("model_review_batch_required",422);let d=Z(i.taskset),h=s.rewardBindingRef,o=!h||L(h,y(d.binding)),v=o?d.binding:await Se(t,"binding",h),k=o?d.rewards:await Promise.all(v.sources.map(f=>Se(t,"reward",f.reward))),r=new Set(k.flatMap(f=>[...f.assets,..."verifierRef"in f.implementation?[f.implementation.verifierRef]:[],..."rubricRef"in f.implementation?[f.implementation.rubricRef]:[],..."inputContract"in f.implementation?[f.implementation.inputContract]:[]]).map(f=>f.id)),R=o?i.learningResources.assets:await Promise.all([...r].map(f=>be(t,"asset",f,1))),g=kt({...e,request:s,package:i,binding:v,rewards:k,assets:R}),p=[];for(let f of g.assets){let B=await t.get("asset",f.id,1);if(B&&B.contentHash!==f.contentHash)throw new j("model_review_asset_conflict",409);B||await t.put("asset",f,0)}for(let f of g.rewards)await t.put("reward",f,0);await t.put("binding",g.binding,0),await t.put("definition",g.definition,0),await t.put("source",g.source,0,{parentId:s.modelId}),p.push({kind:"source",id:g.source.id,revision:1});for(let f of g.evidence)await t.put("evidence",f,0,{parentId:g.source.id}),p.push({kind:"evidence",id:f.id,revision:1});for(let f of g.proposals)await t.put("feedback",f,0,{parentId:f.evidence.id,status:f.status}),p.push({kind:"feedback",id:f.id,revision:1});return await t.saveOperation(at(s),{requestHash:m(s),resources:p}),nt(t,s,p)}T(as,"beginModelBatchReview");async function nt(t,e,s){let n=await Promise.all(s.map(i=>be(t,i.kind,i.id,i.revision)));return st.parse({schemaVersion:"openpond.modelBatchReviewReceipt.v1",operationId:e.operationId,modelId:e.modelId,source:n.find(i=>i.schemaVersion==="openpond.learningSource.v1"),evidence:n.filter(i=>i.schemaVersion==="openpond.taskEvidence.v1"),proposals:n.filter(i=>i.schemaVersion==="openpond.taskFeedbackRecord.v1")})}T(nt,"readReceipt");var ot=x.object({draft:ee,filePaths:x.array(x.object({assetId:x.string().min(1),paths:x.array(ie).min(1).max(1e4)}).strict()).max(1e4)}).strict();function rs(t){let e=C(t.source),s=ee.parse(t.sourceDraft),n=G.parse(t.preparation);if(e.contentHash!==n.sourcePackageHash||!L(y(e.taskset),n.sourceTasksetRef))throw new Error("Taskset draft preparation differs from its source package.");if(e.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(!!e.modelResources!=(n.authoringGraph==="bound"))throw new Error("Taskset draft authoring graph differs from its source.");let i=te.parse(s.metadata.portableFileInventory??[]),d=T(r=>X(r)?`source-artifacts/${e.contentHash}/${m(r)}/${r.split("/").at(-1)}`:r,"sourcePath");if([...s.tasks.flatMap(r=>(r.assets??[]).map(R=>R.artifactRef)),...(s.environment.resources??[]).map(r=>r.path),...e.taskset.tasks.flatMap(r=>(r.requiredOutputs??[]).flatMap(R=>R.schemaRef?[R.schemaRef.path]:[])),...s.metrics.customAggregator?[s.metrics.customAggregator.module]:[],...s.graders.flatMap(r=>r.kind==="custom_verifier"?[r.module]:[])].some(X))throw new Error("A referenced source asset occupies a reserved Taskset authoring path.");let o=e.files.map(r=>{let R=new Set([r.asset.path]);for(let g of i)g.asset.id===r.asset.id&&R.add(g.sourcePath);for(let g of s.tasks)for(let p of g.assets??[])p.id===r.asset.id&&R.add(p.artifactRef);for(let g of e.taskset.graders)if(g.kind==="custom_verifier"&&g.verifierRef.id===r.asset.id){let p=s.graders.find(f=>f.id===g.id);p?.kind==="custom_verifier"&&R.add(p.module)}return{assetId:r.asset.id,paths:[...R].map(d)}}),v={...s.metadata};if(e.modelResources)for(let r of["taskDefinition","rewardBinding","rewardExecution","derivedPortableMetadata","modelTasksetDerivation","importedPackageHash"])delete v[r];let k=ee.parse({...s,id:n.draftId,revision:1,status:"draft",graders:s.graders.map(r=>({...r,metadata:{...r.metadata,portableGrader:e.taskset.graders.find(R=>R.id===r.id)}})),environment:{...s.environment,metadata:{...s.environment.metadata,portableExecutionResources:{environment:e.environment}}},modelScope:{modelId:n.lineage.owner.modelId,expectedModelRevision:t.expectedModelRevision,source:n},publishedTasksetRef:n.tasksetRevision>1?n.sourceTasksetRef:null,metadata:{...v,modelTasksetAuthoring:n.lineage,portableFileInventory:i.map(r=>({...r,sourcePath:d(r.sourcePath),asset:{...r.asset,id:X(r.sourcePath)?`source-artifact-${m({packageHash:e.contentHash,assetId:r.asset.id})}`:r.asset.id,path:d(r.asset.path)}}))}});return ot.parse({draft:k,filePaths:o})}T(rs,"prepareTasksetDraftSource");function is(t){let e=ot.parse(t.initialized),s=C(t.source);if(e.draft.modelScope?.source?.sourcePackageHash!==s.contentHash)throw new Error("Taskset draft lost its source preparation.");let n=new Map;for(let d of e.filePaths){let h=s.files.find(o=>o.asset.id===d.assetId);if(!h)throw new Error("Taskset draft source asset is missing.");for(let o of d.paths){let v=n.get(o);if(v&&v.contentHash!==h.asset.contentHash)throw new Error("Taskset draft source paths conflict.");n.set(o,{path:o,contentHash:h.asset.contentHash,sizeBytes:h.asset.sizeBytes,base64:h.base64})}}for(let d of Ye(e.draft))if(!n.has(d.relativePath)){let h=new TextEncoder().encode(d.source);n.set(d.relativePath,{path:d.relativePath,contentHash:z(h),sizeBytes:h.byteLength,base64:Buffer.from(h).toString("base64")})}let i=e.draft;if(i.metrics.customAggregator){let d=n.get(i.metrics.customAggregator.module);if(!d)throw new Error("Declared Taskset metric module is missing.");le(d),i=ee.parse({...i,metrics:{...i.metrics,customAggregator:{...i.metrics.customAggregator,contentHash:d.contentHash}}})}return Ue({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:i,files:[...n.values()]})}T(is,"materializeTasksetDraftWorkspace");export{tt as a,He as b,st as c,$t as d,mt as e,te as f,lt as g,ht as h,vt as i,Vt as j,Qt as k,ss as l,gt as m,as as n,ot as o,rs as p,is as q};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as D,b as J,c as q}from"./chunk-
|
|
2
|
+
import{a as D,b as J,c as q}from"./chunk-Q3WXB465.js";import{a as Y}from"./chunk-5AU5Y6KS.js";import{a as L}from"./chunk-FEAKTSRS.js";import{b as z}from"./chunk-L3KS6MOV.js";import{na as F}from"./chunk-MVPKU72J.js";import{X as C,x as W}from"./chunk-ZY32SZ2P.js";import{m as N,n as j}from"./chunk-RCT3O3HQ.js";import{A as x}from"./chunk-X2J2P5ZT.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createHash as se}from"node:crypto";function U(a){let d=a.replace(/^\/workspace\/outputs\//,"").replace(/^\/workspace\/work\/outputs\//,"").replace(/^outputs\//,"");if(!d||d.startsWith("/")||d.includes("\0")||d.split(/[\\/]/).some(g=>!g||g==="."||g===".."))throw new Error("Select one file inside this case's writable outputs.");return d}i(U,"confinedProfileOutputPath");var K=i(a=>`'${a.replaceAll("'","'\\''")}'`,"quote");async function V(a){let d=U(a.path),g="const f=require('fs'),p=require('path'),c=require('crypto'),a=JSON.parse(process.argv[1]),r=f.realpathSync('/workspace/work/outputs'),q=f.realpathSync(p.join(r,a.path));if(!q.startsWith(r+'/'))throw Error('Output path escapes the case');const s=f.statSync(q);if(!s.isFile()||s.size>10000000)throw Error('Output exceeds its bound');if(a.offset===undefined){const b=f.readFileSync(q);process.stdout.write(JSON.stringify({size:b.length,hash:c.createHash('sha256').update(b).digest('hex')}))}else{const h=f.openSync(q,'r'),b=Buffer.alloc(Math.min(524288,s.size-a.offset));try{const n=f.readSync(h,b,0,b.length,a.offset);process.stdout.write(b.subarray(0,n).toString('base64'))}finally{f.closeSync(h)}}";async function w(E){let y=await a.command(`/runtime/node -e ${K(g)} ${K(JSON.stringify({path:d,...E!==void 0?{offset:E}:{}}))}`);if(y.code!==0)throw new Error("The confined output could not be read.");return y.stdout}i(w,"read");let b=x.object({size:x.number().int().min(1).max(F),hash:x.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(JSON.parse(await w())),P=[];for(let E=0;E<b.size;E+=524288){let y=await w(E);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(y)||y.length>7e5)throw new Error("Output chunk exceeded its boundary.");let O=Buffer.from(y,"base64");if(O.length!==Math.min(524288,b.size-E))throw new Error("The output changed during readback.");P.push(O)}let R=Buffer.concat(P),k=se("sha256").update(R).digest("hex"),T=x.object({size:x.number(),hash:x.string()}).strict().parse(JSON.parse(await w()));if(k!==b.hash||T.hash!==k||T.size!==R.length)throw new Error("The output changed before immutable readback.");return{bytes:R,title:d.split("/").at(-1)}}i(V,"readConfinedProfileOutput");import l from"node:path";import{promises as m}from"node:fs";import M from"node:path";function X(a,d,g,w){let b=i(()=>new Error("This source file is outside the public policy closure."),"denied"),P;if(a==="context_read"){if(typeof d.path!="string")throw b();P=d.path}else{let R=typeof d.name=="string"?w.get(d.name.trim()):void 0;if(!R||!Object.hasOwn(g,R))throw b();if(d.path===void 0)return R;let k=d.path;if(typeof k!="string"||!k||k.includes("\\")||k.includes("\0")||M.posix.isAbsolute(k)||M.win32.isAbsolute(k)||k.split("/").includes(".."))throw b();P=M.posix.join(M.posix.dirname(R),k)}if(!Object.hasOwn(g,P))throw b();return P}i(X,"resolveProfilePolicySourcePath");var Z=String.raw`
|
|
3
3
|
const fs=require('node:fs'),p=require('node:path');
|
|
4
4
|
const a=JSON.parse(fs.readFileSync(0,'utf8'));
|
|
5
5
|
const roots={work:'outputs',inputs:'inputs',harness:'harness'};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{c as S,g as T,j as k,k as x,m as E}from"./chunk-5HPZGLOL.js";import{h as R}from"./chunk-G4E3WGLM.js";import{v as y}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as d}from"./chunk-FTQLQJQV.js";var m=e.string().trim().min(1).max(191),w=e.string().regex(/^[a-f0-9]{64}$/),H=e.discriminatedUnion("mode",[e.object({mode:e.literal("automatic"),objective:e.enum(["balanced","fast","economical"]),gpuCount:e.union([e.literal(1),e.literal(2)]).optional()}).strict(),e.object({mode:e.literal("manual"),availabilityId:m,gpuType:e.string().trim().min(1).max(256),gpuCount:e.union([e.literal(1),e.literal(2)]).optional()}).strict()]),ee=e.object({estimateId:m,inputHash:w,requestHash:w,pricingVersion:m,expiresAt:e.string().datetime({offset:!0}),token:e.string().min(1).max(8192)}).strict(),te=e.object({schemaVersion:e.literal("openpond.trainingGpuCatalog.v1"),observedAt:e.string().datetime({offset:!0}),expiresAt:e.string().datetime({offset:!0}),workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/),supportedLoraRanks:e.array(e.number().int().positive()),pricingBasis:e.literal("accepted_compute_and_disk_hourly_before_credits"),offerings:e.array(e.object({availabilityId:m,gpuType:e.string().min(1).max(256),provider:m,region:e.string().min(1),dataCenterId:e.string().nullable(),gpuCount:e.number().int().positive(),gpuMemoryGb:e.number().positive(),stockStatus:e.enum(["High","Medium","Low"]),computeHourlyUsd:e.number().nonnegative(),diskHourlyUsd:e.number().nonnegative(),totalHourlyUsd:e.number().nonnegative()}).strict()).max(1e3)}).strict();var P=R.extend({mode:e.enum(["nightly","approved_count"]),minimumTasks:e.number().int().min(1).max(1e4),maximumSpendUsd:e.number().positive().max(1e5),maximumDailySpendUsd:e.number().positive().max(1e6)}).strict().superRefine((t,a)=>{t.maximumDailySpendUsd<t.maximumSpendUsd&&a.addIssue({code:"custom",path:["maximumDailySpendUsd"],message:"The daily budget must cover one update."})});var n=e.string().trim().min(1).max(500),c=e.string().regex(/^[a-f0-9]{64}$/),l=e.string().datetime({offset:!0}),u=e.object({id:n,contentHash:c}).strict(),v=u.extend({revision:e.number().int().positive()}).strict(),p=e.object({schemaVersion:e.literal("openpond.baseModelPreference.v1"),modelId:n,revision:e.string().trim().min(1).max(256).nullable(),tokenizerRevision:e.string().trim().min(1).max(256).nullable(),chatTemplateHash:e.string().trim().min(8).max(256).nullable(),modelAssetId:n.nullable(),source:e.enum(["managed","local","builtin"])}).strict(),O=e.enum(["sft","dpo","grpo","ppo","sdft","opd","opsd","sdpo"]),L=e.object({schemaVersion:e.string().regex(/^openpond\.[A-Za-z0-9]+Recipe\.v\d+$/),method:O,parameterization:e.enum(["lora","full"])}).catchall(e.unknown()),B=e.object({profileProjectId:n,sourceRevision:e.string().regex(/^[a-f0-9]{40,64}$/),harnessRelease:u}).strict(),J=e.object({profileProjectId:n,sourceRevision:e.string().regex(/^[a-f0-9]{40,64}$/),catalogHash:c,definitionId:n,harnessRelease:u,tasksetRelease:u}).strict(),D=e.object({tasksetRef:v.nullable().default(null),evaluationTasksetRef:v.nullable().optional(),profileSource:B.nullable().optional(),profileEvaluation:J.nullable().optional(),rewardBindingRef:v.nullable().optional(),tasksetRelease:u.nullable().default(null),harnessRelease:u.nullable().default(null),baseModel:p.nullable().default(null),method:O.nullable().default(null),destinationId:n.nullable().default(null),managedRolloutPlacement:e.enum(["local","remote"]).default("remote"),managedGpuPlacementObjective:e.enum(["fast","balanced","economical"]).default("balanced"),managedGpuSelection:H.optional(),continuationAdapterMode:e.enum(["residual_append","shared","sequential_merge"]).optional(),managedGpuRequirement:e.enum(["any","h100_hbm3"]).default("any"),runPreset:e.enum(["small","standard","custom","small_experiment"]).nullable().default(null),recipe:L.nullable().default(null),preferredMaximumSpendUsd:e.number().nonnegative().nullable().default(null),preferredRetentionDays:e.number().int().nonnegative().nullable().default(null)}).strict(),q=D,N=e.object({schemaVersion:e.literal("openpond.hostedModelProjectLink.v1"),apiOrigin:e.string().url().refine(t=>new URL(t).origin===t,"Use a canonical API origin.").nullable().default(null),teamId:n,projectId:n,portableProjectId:n,revision:e.number().int().positive(),etag:c,syncedSourceRevision:e.number().int().positive(),syncedAt:l,tasksets:e.array(e.object({localTasksetId:n,localTasksetHash:c.nullable().default(null),releaseId:n,releaseRevision:e.number().int().positive(),releaseHash:c,packageHash:c.nullable().default(null),hostedTasksetId:n,syncedAt:l}).strict()).max(1e4).default([])}).strict(),V=e.object({localTasksetId:n,releaseId:n,releaseRevision:e.number().int().positive(),releaseHash:c,state:e.enum(["syncing","synced","sync_failed"]),hostedTasksetId:n.nullable().default(null),lastAttemptAt:l,syncedAt:l.nullable().default(null),lastError:e.string().trim().min(1).max(5e3).nullable().default(null)}).strict(),$=e.object({schemaVersion:e.literal("openpond.modelProject.v2"),id:n,profileId:n,revision:e.number().int().positive().default(1),name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:n.nullable(),trainingSetup:D,hosted:N.nullable().default(null),tasksetSyncs:e.array(V).max(1e4).default([]),createdAt:l,updatedAt:l}).strict(),U=$.pick({id:!0,profileId:!0,name:!0,objective:!0,defaultBaseModel:!0,defaultDestinationId:!0,trainingSetup:!0}),G=e.object({schemaVersion:e.literal("openpond.modelProjectSave.v1"),operationId:n,expectedRevision:e.number().int().nonnegative(),project:U,learning:P.optional()}).strict().superRefine((t,a)=>{t.learning&&t.expectedRevision!==0&&a.addIssue({code:"custom",path:["learning"],message:"Use learning settings to edit an existing Model's policy."})}),Y=e.object({schemaVersion:e.literal("openpond.modelProjectConfigurationCheck.v1"),configurationHash:c,projectId:n,expectedRevision:e.number().int().nonnegative(),checkedAt:l,canSave:e.boolean(),deferred:e.array(e.enum(["base_model","taskset"])).max(2),findings:e.array(e.object({code:n,severity:e.enum(["error","warning"]),message:e.string().min(1).max(5e3),field:e.string().min(1).max(500).nullable()}).strict()).max(100)}).strict(),X=e.object({id:n,name:e.string().min(1).max(500),available:e.boolean(),preference:p}).strict();function M(t){try{y(t,524288)}catch{throw new h(400,{schemaVersion:"openpond.modelProjectApiError.v2",code:"model_configuration_json_invalid",message:"Model configuration must be bounded JSON data.",retryable:!1,requestId:null,details:{}})}return G.parse(t)}d(M,"parseModelProjectSaveRequest");async function ue(t,a,i){y(t,524288);let s=U.parse(t);x(s,524288,"Model configuration");let o=i?P.parse(i):void 0,r=await k({project:s,expectedRevision:a,...o?{learning:o}:{}});return M({schemaVersion:"openpond.modelProjectSave.v1",operationId:`model-save:${r}`,expectedRevision:a,project:s,...o?{learning:o}:{}})}d(ue,"createModelProjectSaveRequest");var F=e.object({schemaVersion:e.literal("openpond.hostedModelProjectSync.v2"),portableProjectId:n,name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:n.nullable(),trainingSetup:q,sourceRevision:e.number().int().positive(),sourceUpdatedAt:l,expectedEtag:c.nullable().default(null)}).strict(),f=e.object({id:n,teamId:n,portableProjectId:n,name:e.string().trim().min(1).max(200),objective:e.string().trim().max(5e3).nullable(),defaultBaseModel:p.nullable(),defaultDestinationId:n.nullable(),trainingSetup:q,sourceRevision:e.number().int().positive(),sourceUpdatedAt:l,revision:e.number().int().positive(),etag:c,createdAt:l,updatedAt:l}).strict(),Z=e.object({kind:e.enum(["taskset_release","harness_release","dataset_release","evidence_set","model_version","reward_model_version","evaluation_receipt"]),ref:u,role:e.string().trim().min(1).max(200).nullable().default(null),updatedAt:l}).strict(),K=e.object({project:f,resources:e.array(Z).max(1e4),jobCount:e.number().int().nonnegative(),latestJobIds:e.array(n).max(100)}).strict(),Q=e.object({schemaVersion:e.literal("openpond.modelProjectApiError.v2"),code:e.string().trim().min(1).max(200),message:e.string().trim().min(1).max(5e3),retryable:e.boolean().default(!1),requestId:e.string().trim().min(1).max(500).nullable().default(null),details:e.record(e.string(),e.unknown()).default({})}).strict(),h=class extends Error{static{d(this,"OpenPondModelProjectApiError")}status;code;retryable;requestId;details;constructor(a,i){super(i.message),this.name="OpenPondModelProjectApiError",this.status=a,this.code=i.code,this.retryable=i.retryable,this.requestId=i.requestId,this.details=i.details}};function A(t){let a={};return new Headers(t).forEach((i,s)=>{a[s]=i}),a}d(A,"headersRecord");function me(t){let a=t.fetch??fetch,i=t.baseUrl.replace(/\/$/,"");async function s(o,r){let j=typeof t.headers=="function"?await t.headers():t.headers??{},g=await a(`${i}${o}`,{...r,headers:{accept:S,...r?.body?{"content-type":S}:{},...A(j),...A(r?.headers)}}),I=await E(g,8388608,"Model Project API response");if(!g.ok){let _=Q.safeParse(I);throw _.success?new h(g.status,_.data):new T("invalid_error_response",`Model Project request failed with HTTP ${g.status} and an invalid error envelope.`)}return I}return d(s,"request"),{async configurationCandidates(){return e.object({candidates:e.array(X).max(1e3)}).strict().parse(await s("/v1/model-projects/configuration/candidates",{headers:{accept:"application/json"}})).candidates},async checkConfiguration(o){let r=M(o);return Y.parse(await s("/v1/model-projects/configuration/check",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(r)}))},async saveConfiguration(o){let r=M(o);return f.parse(await s("/v1/model-projects/configuration/save",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(r)}))},async upsert(o){x(o,524288,"Model Project sync");let r=F.parse(o),j=await s(`/v1/model-projects/${encodeURIComponent(r.portableProjectId)}`,{method:"PUT",body:JSON.stringify(r)});return f.parse(C(j,"project"))},async list(){let o=await s("/v1/model-projects");return e.array(f).parse(C(o,"projects"))},async get(o){let r=await s(`/v1/model-projects/${encodeURIComponent(n.parse(o))}`);return K.parse(r)}}}d(me,"createModelProjectsClient");function C(t,a){return!t||typeof t!="object"||Array.isArray(t)?t:a in t?t[a]:t}d(C,"unwrapObject");export{H as a,ee as b,te as c,u as d,v as e,p as f,L as g,q as h,U as i,ue as j,F as k,f as l,me as m};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{c as _}from"./chunk-MHPCVQOE.js";import{a as J}from"./chunk-55Q64WWF.js";import{b as U}from"./chunk-RHMULF56.js";import{I as z,K as V,ja as M,na as G,v as O}from"./chunk-MVPKU72J.js";import{aa as N}from"./chunk-WLZJOCLA.js";import{Pb as F,Rb as q,qb as C,ub as A}from"./chunk-QAFXQHHG.js";import{d as H,e as b,ga as x,ja as j}from"./chunk-ZY32SZ2P.js";import{f as T}from"./chunk-HNQPEOJD.js";import{c as I,d as S,e as W,j as $,m as L,n as c}from"./chunk-RCT3O3HQ.js";import{A as P}from"./chunk-X2J2P5ZT.js";import{a as h}from"./chunk-FTQLQJQV.js";import Y from"node:path";import{constants as K}from"node:fs";import{open as ae,realpath as X}from"node:fs/promises";async function Q(e){let i=e.attempt.profileNative,p=P.array($).max(16).parse(e.attempt.artifactRefs??[]);if(!p.length)return[];if(!i||!e.storeDir)throw new Error("The actual retained artifact owner is unavailable.");await e.authorize();let t=await e.events(i.turnId);if(c(t)!==i.traceHash||t.some(r=>r.sessionId!==i.sessionId||r.turnId!==i.turnId))throw new Error("The saved artifacts differ from their actual retained case trace.");let o=[],l=0;for(let r of p){let f=t.filter(d=>(d.action==="work_output_save"||d.action==="sandbox_save_output")&&d.status==="completed").flatMap(d=>{let k=P.object({outputRef:M}).passthrough().safeParse(d.data);return k.success?[k.data.outputRef]:[]}).filter(d=>`${i.sessionId}/${d.id}/${d.revision}/${d.title}`===r.id&&d.sourceTaskId===i.sessionId&&d.sourceTurnId===i.turnId&&d.sha256===r.contentHash&&d.sizeBytes===r.sizeBytes&&d.contentType===r.mediaType);if(f.length!==1)throw new Error("The selected artifact has no unique actual saved output.");let s=f[0];if(s.location.kind!=="local"&&(s.location.kind!=="managed"||!e.readManaged)||s.sizeBytes>G)throw new Error("The retained artifact has no supported local byte owner.");if((l+=s.sizeBytes)>2e7)throw new Error("The retained artifacts exceed their aggregate grading byte limit.");await e.authorize(),e.signal?.throwIfAborted();let a;if(s.location.kind==="managed")a=await e.readManaged(s,e.signal);else if(s.location.kind==="local"){let d=await X(Y.join(e.storeDir,"work","outputs")),k=await X(s.location.path);if(!k.startsWith(`${d}${Y.sep}`))throw new Error("The artifact escaped canonical output storage.");let w=await ae(k,K.O_RDONLY|K.O_NOFOLLOW);try{let g=await w.stat();if(!g.isFile()||g.size!==s.sizeBytes)throw new Error("The artifact bytes changed.");a=await w.readFile()}finally{await w.close()}}else throw new Error("The saved artifact has no admitted byte owner.");if(a.length!==s.sizeBytes||L(a)!==s.sha256)throw new Error("The artifact bytes differ from their sealed receipt.");await e.authorize(),o.push({reference:r,title:s.title,contentType:s.contentType,base64:a.toString("base64"),...s.contentType.startsWith("text/")||s.contentType==="application/json"?{text:new TextDecoder("utf8",{fatal:!0}).decode(a)}:{}})}return await e.authorize(),o}h(Q,"readLocalProfileArtifacts");import oe from"node:path";async function Z(e,i){if(e.limits.maximumSpendUsd===null)return;let p=process.env.OPENPOND_API_KEY?.trim(),t=process.env.OPENPOND_OPCHAT_API_URL?.trim();if(!p||!t)throw new Error("Profile evaluation requires an admitted hosted spend ceiling.");let o=new URL(`${t.replace(/\/+$/,"")}/experiment-budget`);if(o.protocol!=="https:"||o.username||o.password||o.search||o.hash)throw new Error("Profile evaluation spend authority URL is invalid.");o.searchParams.set("runId",e.id),o.searchParams.set("manifestHash",e.contentHash);let l=await fetch(o,{headers:{Authorization:`Bearer ${p}`},signal:i});if(!l.ok)throw new Error("The exact Profile evaluation spend ceiling is unavailable.");let r=P.object({runId:P.string(),manifestHash:P.string(),maximumCostUsd:P.number().positive()}).strict().parse(await l.json());if(r.runId!==e.id||r.manifestHash!==e.contentHash||r.maximumCostUsd!==e.limits.maximumSpendUsd)throw new Error("Profile evaluation spend authority differs from its admitted manifest.")}h(Z,"assertProfileEvaluationSpendAuthority");async function ee(e){e.signal?.throwIfAborted();let i,p,t=h(()=>{},"rejectCancellation"),o=new Promise((s,a)=>{t=a}),l=h((s,a)=>{p||(p=new Error(s),e.onInterrupt?.(a),e.interrupt?(i=e.interrupt(s),i.catch(()=>{})):t(p))},"cancel"),r=h(()=>l("Profile evaluation run cancelled.","cancelled"),"aborted"),f=setTimeout(()=>l(`Profile evaluation case exceeded its ${e.timeoutMs}ms timeout.`,"timed_out"),e.timeoutMs);e.signal?.addEventListener("abort",r,{once:!0});try{e.signal?.aborted&&r();let s=await Promise.race([e.send(),o]);if(i){let a=await i;if(a.status==="in_progress"||!a.completedAt)throw new Error("Profile evaluation cleanup remains unconfirmed.")}if(s.status==="in_progress"||!s.completedAt)throw new Error("Workflow evaluation turn did not settle.");return s}catch(s){if(i){let a=await i;if(a.status==="in_progress"||!a.completedAt)throw new Error("Profile evaluation cleanup remains unconfirmed.",{cause:s})}throw s}finally{clearTimeout(f),e.signal?.removeEventListener("abort",r)}}h(ee,"awaitProfileEvaluationTurn");function te(e){let i=e.manifest.profileEvaluation,p=e.manifest.policy;if(!i||p.kind!=="model"||e.manifest.execution.kind!=="harness")throw new Error("Profile evaluation requires a released source and model policy.");if(i.profileId!==e.profileRef.profileId||i.profileId!==e.binding.profileId||i.sourceRevision!==e.binding.sourceRevision||i.harnessRelease.id!==e.binding.harnessRelease.id||i.harnessRelease.contentHash!==e.binding.harnessRelease.contentHash||(e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?i.target.kind!=="workflow"||i.target.workflowId!==e.binding.workflowId:i.target.kind==="workflow"||c(i.target)!==c(e.binding.target)))throw new Error("Profile evaluation binding differs from its admitted source.");if(p.model.provider!==e.modelRef.providerId||p.model.model!==e.modelRef.modelId||p.configurationHash!==e.modelConfigurationHash)throw new Error("Workflow evaluation model differs from its admitted configuration.");return async t=>{if(c(t.source)!==c(i))throw new Error("Workflow evaluation case differs from its admitted Profile source.");t.signal?.throwIfAborted(),await(e.assertSpendAuthority??Z)(e.manifest,t.signal);let o=!!(e.attachments?.length||e.requiredOutputs?.length),l=o&&!e.ownedSessionMetadata?.localProfileExperiment&&e.profileRef.source==="local"&&(e.modelRef.providerId==="codex"||U(e.modelRef.providerId)),r=await e.createSession({...o?{experience:"work"}:{},provider:e.modelRef.providerId,modelRef:e.modelRef,currentProfile:e.profileRef,...e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?{profileWorkflowBinding:e.binding}:{profileComponentBinding:e.binding},hiddenFromDefaultSidebar:!0,metadata:{profileEvaluationRun:{id:e.manifest.id,contentHash:e.manifest.contentHash},taskId:t.task.id,seed:t.seed,...o&&e.profileRef.source==="local"?{workspaceTarget:"local"}:{},...o?{profileEvaluationOutputs:e.requiredOutputs??[]}:{},...e.ownedSessionMetadata}}),f=[...o?[l?`This is a local evaluation run. Complete the requested task using its public inputs. Save these required files at their declared paths relative to the current task workspace: ${JSON.stringify(e.requiredOutputs??[])}. The app preserves those declared files automatically when the turn finishes; work_save_output is not a shell command and is not needed here. For headless tools that write user preferences, use writable configuration, cache and profile directories within this task workspace and a bounded command timeout. Send the requested final response to finish the case. Private grading runs afterward; do not wait for grader feedback.`:"This is an evaluation run. Complete the requested task using its public inputs. work_exec starts in writable Work storage; inputs are ../inputs and released policy source is ../harness. When work_finish is available, create every declared output in Work and call work_finish with the path of your complete working response file, then send a short final answer. Otherwise save each required output with work_save_output and send your final response. Private grading runs after your final response; do not wait for grader feedback."]:[],typeof t.task.input=="string"?t.task.input:JSON.stringify(t.task.input),...Object.keys(t.task.policyVisibleContext).length?[`Policy-visible task context:
|
|
3
3
|
${JSON.stringify(t.task.policyVisibleContext)}`]:[]].join(`
|
|
4
4
|
|
|
5
5
|
`)||" ";await e.admitSession?.(r);try{let s=!1,a=await ee({signal:t.signal,timeoutMs:e.manifest.limits.timeoutMs,onInterrupt:h(n=>{s=n==="timed_out",e.onInterrupt?.(n)},"onInterrupt"),...e.interruptSessionTurn?{interrupt:h(n=>e.interruptSessionTurn(r.id,n),"interrupt")}:{},send:h(()=>{let n={prompt:f,...e.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?{workflowInput:{}}:e.binding.target.kind==="agent_action"?{workflowInput:t.task.input}:{},modelRef:e.modelRef,approvalPolicy:"on-request",...o?{sandbox:"workspace-write",codexPermissionMode:"default"}:{},...e.attachments?.length?{attachments:e.attachments}:{}};return e.modelRef.providerId==="codex"?e.sendTurn(r.id,n,{nativeTimeoutMs:e.manifest.limits.timeoutMs}):e.sendTurn(r.id,n)},"send")});if(a.status==="in_progress"||!a.completedAt)throw new Error("Workflow evaluation turn did not settle.");if(await e.validateTerminalTurn?.(r,a),!a.harnessSnapshot||a.harnessSnapshot.harnessRelease.id!==i.harnessRelease.id||a.harnessSnapshot.harnessRelease.contentHash!==i.harnessRelease.contentHash)throw new Error("Workflow evaluation turn executed a different Harness release.");if(!a.modelRef||c(a.modelRef)!==c(e.modelRef))throw new Error("Workflow evaluation turn executed a different model.");let d=await e.runtimeEventsForTurn(a.id),k=d.filter(n=>n.name==="workspace_action_result"&&(n.action==="sandbox_save_output"||n.action==="work_output_save")&&n.status==="completed"&&n.turnId===a.id).flatMap(n=>D(n.data)).filter(n=>n.sourceTaskId===r.id&&n.sourceTurnId===a.id&&n.location.kind!=="external"),g=(e.requiredOutputs??[]).flatMap(n=>{let y=[...k].reverse().find(B=>B.title===n.path&&B.contentType===n.mediaType&&(n.maxBytes===null||B.sizeBytes<=n.maxBytes));return y?[y]:[]}).map(n=>({id:`${r.id}/${n.id}/${n.revision}/${n.title}`,contentHash:n.sha256,mediaType:n.contentType,sizeBytes:n.sizeBytes})),v=-1;for(let n=d.length-1;n>=0;n-=1)if(d[n]?.name.endsWith(".delta")){v=n;break}let R=d.flatMap((n,y)=>n.name.endsWith(".delta")&&y!==v?[]:[n.id]);if(R.length+g.length>1e4)throw new Error("Profile evaluation produced more than 10,000 substantive evidence references.");let u=J(d,i.target.kind,a.status),m=Math.min(e.manifest.limits.maxOutputBytes,e.maximumOutputBytes??e.manifest.limits.maxOutputBytes);if(!Number.isSafeInteger(m)||m<1)throw new Error("Profile evaluation requires a positive bounded output limit.");let E=Buffer.byteLength(u,"utf8")>m;if(E&&!e.retainOutputLimitEvidence)throw new Error(`Profile evaluation case exceeded its ${m}-byte output limit.`);return E&&e.onOutputLimit?.(c(u)),{evidence:{output:{text:E?"":u},runtimeEventRefs:R,artifactRefs:g.map(n=>n.id),...E?{infrastructureError:`Profile evaluation case exceeded its ${m}-byte output limit.`}:a.status!=="completed"?{infrastructureError:a.error??`Workflow evaluation turn ${a.status}.`}:{}},traceHash:c(d),retainedEvidenceRef:{sessionId:r.id,turnId:a.id},artifactRefs:g,startedAt:a.startedAt,completedAt:a.completedAt,latencyMs:Math.max(0,Date.parse(a.completedAt)-Date.parse(a.startedAt)),costUsd:null,terminal:a.status==="completed"&&!E,failureClass:a.status==="completed"&&!E?null:a.status==="interrupted"?s?"timeout":"cancelled":"infrastructure_failure"}}finally{await e.settleSession?.(r.id)}}}h(te,"createProfileWorkflowEvaluationExecutor");function D(e,i=0){if(e==null||i>8)return[];let p=M.safeParse(e);return p.success?[p.data]:Array.isArray(e)?e.flatMap(t=>D(t,i+1)):typeof e!="object"?[]:Object.values(e).flatMap(t=>D(t,i+1))}h(D,"findFileOutputs");var re=P.object({manifest:C,taskset:x,profileRef:O,binding:P.union([H,b]),modelRef:T,modelConfigurationHash:S,taskId:I,seed:P.string().trim().min(1).max(500)}).strict();function De(e){return async(i,p)=>{let t=re.parse(i),o=await e.selectedProfile();if(!o||c(o.ref)!==c(t.profileRef)||o.sourceRevision!==t.binding.sourceRevision)throw new Error("Evaluation Profile differs from the app-server's authorized selection.");let l=await e.loadCatalog({ref:o.ref,sourceRevision:o.sourceRevision,harnessRelease:t.binding.harnessRelease}),r=t.manifest.profileEvaluation,f=await _({manifest:t.manifest,taskset:t.taskset,selected:{profileRef:o.ref,sourceRevision:o.sourceRevision,harnessRelease:t.binding.harnessRelease},loadCatalog:e.loadCatalog,resolveExternalDataset:e.resolveExternalDataset}),s=f?.definition??l.definitions.find(u=>u.id===r?.definitionId);if(A(t.manifest,t.taskset,f?.catalog??{schemaVersion:"openpond.profileEvaluations.v1",definitions:l.definitions,suites:l.suites}),!r||!s||(f?c(f.catalog):l.catalogHash)!==r.catalogHash||c(s)!==r.definitionHash||c(s.target)!==c(r.target)||s.tasksetRelease.id!==t.manifest.tasksetRelease.id||s.tasksetRelease.contentHash!==t.manifest.tasksetRelease.contentHash||!s.taskIds.includes(t.taskId)||!s.seeds.includes(t.seed)||t.manifest.population.filter(u=>u.taskId===t.taskId&&u.seed===t.seed).length!==1)throw new Error("Evaluation case differs from its released definition or admitted population.");let a=t.taskset.tasks.find(u=>u.id===t.taskId),d=j(a);if(d.artifactRefs.length!==a.artifactRefs.length||d.artifactRefs.length>z.maxAttachments)throw new Error("Evaluation case has an unauthorized task attachment.");if(d.artifactRefs.length&&!e.storeDir)throw new Error("Evaluation case attachment storage is unavailable.");let k=f?.packageValue??(d.artifactRefs.length||a.requiredOutputs?.length?await e.loadTasksetPackage(s,o.ref.profileId,t.binding.harnessRelease):null);if(k&&(k.contentHash!==t.manifest.packageHash||k.taskset.contentHash!==t.taskset.contentHash))throw new Error("Evaluation case Taskset differs from its frozen package or admitted manifest.");let w=d.artifactRefs.map(u=>{if(u.mediaType!=="application/pdf"||u.sizeBytes>z.maxAttachmentBytes)throw new Error(`Evaluation case attachment ${u.id} is not an admitted PDF.`);let m=k?.files.find(E=>E.asset.id===u.id);if(!m||c(m.asset)!==c(u))throw new Error(`Evaluation case attachment ${u.id} differs from its frozen Taskset file.`);return N(m),V.parse({id:u.id,name:oe.basename(u.path),kind:"file",mediaType:u.mediaType,sizeBytes:u.sizeBytes,contentsBase64:m.base64})}),g=te({manifest:t.manifest,profileRef:o.ref,binding:t.binding,modelRef:t.modelRef,modelConfigurationHash:t.modelConfigurationHash,createSession:e.createSession,sendTurn:e.sendTurn,...e.admitSession?{admitSession:h(u=>e.admitSession(u,t.manifest,t.taskId,t.seed,w),"admitSession")}:{},...e.settleSession?{settleSession:e.settleSession}:{},interruptSessionTurn:e.interruptSessionTurn,runtimeEventsForTurn:h(u=>e.store.runtimeEventsForTurn(u),"runtimeEventsForTurn"),attachments:w,requiredOutputs:a.requiredOutputs??[]});f&&await f.authorize(),p?.throwIfAborted();let v=await g({task:d,seed:t.seed,source:r,...p?{signal:p}:{}}),R=await Q({storeDir:e.storeDir,readManaged:e.readManagedArtifact,attempt:{artifactRefs:v.artifactRefs,profileNative:v.retainedEvidenceRef?.sessionId&&v.retainedEvidenceRef.turnId?{sessionId:v.retainedEvidenceRef.sessionId,turnId:v.retainedEvidenceRef.turnId,traceHash:v.traceHash}:null},events:h(u=>e.store.runtimeEventsForTurn(u),"events"),signal:p,authorize:h(async()=>{p?.throwIfAborted();let u=await e.selectedProfile();if(!u||c(u)!==c(o))throw new Error("The current artifact Profile authority changed.");f&&await f.authorize()},"authorize")});return{...v,evidence:{...v.evidence,artifacts:R,caseOwner:{...v.retainedEvidenceRef,traceHash:v.traceHash}}}}}h(De,"createProfileEvaluationCaseService");var ie=P.object({manifest:C,taskset:x,profileRef:O,binding:P.union([H,b]),modelRef:T,modelConfigurationHash:S}).strict();function Ve(e){let i=new Map,p=h(async(t,o)=>{let l=await e.selectedProfile();if(!l||c(l.ref)!==c(t.profileRef)||l.sourceRevision!==t.binding.sourceRevision)throw new Error("Evaluation Profile differs from the app-server's authorized selection.");let r=await e.loadCatalog({ref:l.ref,sourceRevision:l.sourceRevision,harnessRelease:t.binding.harnessRelease}),f=await _({manifest:t.manifest,taskset:t.taskset,selected:{profileRef:l.ref,sourceRevision:l.sourceRevision,harnessRelease:t.binding.harnessRelease},loadCatalog:e.loadCatalog,resolveExternalDataset:e.resolveExternalDataset}),s=f?.catalog??{schemaVersion:"openpond.profileEvaluations.v1",definitions:r.definitions,suites:r.suites};if(A(t.manifest,t.taskset,s),!e.privateGrading&&(t.taskset.graders.some(m=>m.kind==="model_judge"||m.kind==="custom_verifier")||t.taskset.metrics?.aggregation==="custom"))throw new Error("Profile evaluation cannot run this Taskset's model judge, custom verifier, or custom metric in the current app-server runtime.");let a=t.manifest.profileEvaluation,d=t.manifest.policy;if(a.profileId!==l.ref.profileId||a.sourceRevision!==t.binding.sourceRevision||a.harnessRelease.id!==t.binding.harnessRelease.id||a.harnessRelease.contentHash!==t.binding.harnessRelease.contentHash||(t.binding.schemaVersion==="openpond.profileWorkflowBinding.v1"?a.target.kind!=="workflow"||a.target.workflowId!==t.binding.workflowId:a.target.kind==="workflow"||c(a.target)!==c(t.binding.target))||d.kind!=="model"||d.model.provider!==t.modelRef.providerId||d.model.model!==t.modelRef.modelId||d.configurationHash!==t.modelConfigurationHash)throw new Error("Evaluation request differs from its admitted Profile workflow or model configuration.");let k=s.definitions.find(m=>m.id===a.definitionId),w=e.privateGrading?f?.packageValue??await(e.loadTasksetPackage?e.loadTasksetPackage(k,l.ref.profileId,a.harnessRelease):Promise.reject(new Error("The current private Taskset owner is unavailable."))):null,g=w?await e.privateGrading?.(t.manifest,w,o):void 0;await g?.authorize();let v=await e.store.getProfileEvaluationRun(t.manifest.id);if(v){if(v.manifest.contentHash!==t.manifest.contentHash||c(v.profileRef)!==c(l.ref))throw new Error(`Profile evaluation run ${t.manifest.id} already exists with another manifest.`);return v}f&&await f.authorize(),o?.throwIfAborted();let R=await q({manifest:t.manifest,taskset:t.taskset,catalog:s,...g?{customVerifier:g.customVerifier,modelJudge:g.modelJudge,metricSource:g.metricSource,metricExecutor:g.metricExecutor}:{},execute:h(({task:m,seed:E,signal:n})=>e.executeCase({...t,taskId:m.id,seed:E},n),"execute"),...o?{signal:o}:{},saveGrade:h(async m=>(await e.store.saveProfileEvaluationGrade(m),{id:m.contentHash,contentHash:m.contentHash,mediaType:"application/json",sizeBytes:null}),"saveGrade"),saveReceipt:h(async m=>{await e.store.saveProfileEvaluationReceipt(m)},"saveReceipt"),loadCompletedMember:h(async({receiptId:m})=>{let E=await e.store.getProfileEvaluationReceipt(m);if(!E)return null;let n=E.graderEvidenceRefs[0],y=n&&await e.store.getProfileEvaluationGrade(n.contentHash);if(!y)throw new Error(`Retained Profile evaluation receipt ${m} is missing its grade.`);return{receipt:E,grade:y}},"loadCompletedMember")});await g?.authorize(),f&&await f.authorize();let u={profileRef:l.ref,manifest:t.manifest,metric:R.metric,gradeRefs:R.grades.map(m=>({id:m.contentHash,contentHash:m.contentHash})),receiptRefs:R.receipts.map(m=>({id:m.id,contentHash:m.contentHash})),passRate:R.passRate,passed:R.passed,completedAt:new Date().toISOString()};return e.store.saveProfileEvaluationRun({...u,contentHash:c(u)})},"run");return(t,o)=>{let l=ie.parse(t),r=i.get(l.manifest.id);if(r){if(r.manifestHash!==l.manifest.contentHash)throw new Error(`Profile evaluation run ${l.manifest.id} is already running with another manifest.`);return r.promise}let f=p(l,o);return i.set(l.manifest.id,{manifestHash:l.manifest.contentHash,promise:f}),f.finally(()=>{i.get(l.manifest.id)?.promise===f&&i.delete(l.manifest.id)}).catch(()=>{}),f}}h(Ve,"createProfileEvaluationRunService");var se=P.object({id:I,suiteId:I,createdAt:W,modelRef:T,hostModelConfigurationHash:S.optional()}).strict();function Xe(e){let i=new Map,p=h(async t=>{let o=await e.selectedWorkflows(),l=await e.loadCatalog({ref:o.profileRef,sourceRevision:o.sourceRevision,harnessRelease:o.harnessRelease}),r={schemaVersion:"openpond.profileEvaluations.v1",definitions:l.definitions,suites:l.suites},f=r.suites.find(w=>w.id===t.suiteId);if(!f)throw new Error(`Profile evaluation suite ${t.suiteId} is absent from the selected release.`);let s=[];for(let w of f.definitionIds)s.push(await e.prepareRun({id:`suite-${c([t.id,w]).slice(0,32)}`,createdAt:t.createdAt,definitionId:w,modelRef:t.modelRef,...t.hostModelConfigurationHash?{hostModelConfigurationHash:t.hostModelConfigurationHash}:{}}));let a=await e.store.getProfileEvaluationSuiteRun(t.id);if(a){if(a.suiteId!==f.id||a.catalogHash!==c(r)||a.profileId!==o.profileRef.profileId||a.sourceRevision!==o.sourceRevision||a.harnessRelease.id!==o.harnessRelease.id||a.harnessRelease.contentHash!==o.harnessRelease.contentHash||a.createdAt!==t.createdAt)throw new Error(`Profile evaluation suite run ${t.id} already exists with another request.`);for(let[w,g]of a.members.entries()){let v=await e.store.getProfileEvaluationRun(g.runManifest.id);if(!v||v.contentHash!==g.runHash||v.manifest.contentHash!==g.runManifest.contentHash||v.manifest.contentHash!==s[w]?.manifest.contentHash)throw new Error("Retained Profile evaluation suite is missing member evidence.");let R=v.manifest.policy;if(R.kind!=="model"||R.model.provider!==t.modelRef.providerId||R.model.model!==t.modelRef.modelId)throw new Error(`Profile evaluation suite run ${t.id} already exists with another model.`)}return a}let d=[];for(let[w,g]of f.definitionIds.entries()){let v=s[w],R=await e.executeRun(v);d.push({definitionId:g,manifest:R.manifest,runHash:R.contentHash,passed:R.passed,score:R.metric.value})}let k=F({id:t.id,suiteId:f.id,catalog:r,members:d,createdAt:t.createdAt,completedAt:new Date().toISOString()});return e.store.saveProfileEvaluationSuiteRun(o.profileRef,r,k)},"run");return t=>{let o=se.parse(t),l=c(o),r=i.get(o.id);if(r){if(r.requestHash!==l)throw new Error(`Profile evaluation suite run ${o.id} is already running with another request.`);return r.promise}let f=p(o);return i.set(o.id,{requestHash:l,promise:f}),f.finally(()=>{i.get(o.id)?.promise===f&&i.delete(o.id)}).catch(()=>{}),f}}h(Xe,"createProfileEvaluationSuiteService");export{Q as a,te as b,De as c,Ve as d,Xe as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as
|
|
2
|
+
import{a as ut}from"./chunk-SYUKES6H.js";import{a as pt}from"./chunk-IZ6DLEVY.js";import{b as se,m as mt,s as ft,t as ie,y as gt,z as ae}from"./chunk-YU3C6U5V.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{a as dt,d as Te}from"./chunk-BJXPQIVD.js";import{$ as it,Ea as ct,ha as at,pa as Ie}from"./chunk-MVPKU72J.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{P as oe,R as lt}from"./chunk-QCJY6FTC.js";import{I as _e}from"./chunk-2MEOUS24.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((as,yt)=>{"use strict";var Cn=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],ht=/[\n\r\u2028\u2029]/,En=/[\s#!"$&'():;<=>@\\^`|]/g;yt.exports=i(function(t){return t.map(function(n){if(n==="")return"''";if(n&&typeof n=="object"){if("op"in n&&n.op==="glob"){if(typeof n.pattern!="string")throw new TypeError("glob token requires a string `pattern`");if(ht.test(n.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return n.pattern.replace(En,"\\$&")}if("op"in n&&typeof n.op=="string"){if(Cn.indexOf(n.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(n.op));return n.op.replace(/[\s\S]/g,"\\$&")}if("comment"in n&&typeof n.comment=="string"){if(ht.test(n.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+n.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(n)&&!/'/.test(n)?"'"+n.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(n)?'"'+n.replace(/(["\\$`!])/g,"\\$1")+'"':String(n).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")},"quote")});var Tt=Re((ls,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ce="$",D="",qn=4294967296;for(ve=0;ve<4;ve++)D+=(qn*Math.random()).toString(16);var ve,jn=new RegExp("^"+D);function Bn(e,t){for(var n=t.lastIndex,r=[],o;o=t.exec(e);)r[r.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,r}i(Bn,"matchAll");function $n(e,t,n){var r=typeof e=="function"?e(n):e[n];return typeof r>"u"&&n!=""?r="":typeof r>"u"&&(r="$"),typeof r=="object"?t+D+JSON.stringify(r)+D:t+r}i($n,"getVar");function Nn(e,t,n){n||(n={});var r=n.escape||"\\",o=n.splitUnquoted===!0?`
|
|
3
3
|
`:typeof n.splitUnquoted=="string"?n.splitUnquoted:"",s="(\\"+r+`['"`+bt+`]|[^\\s'"`+bt+"])+",a=new RegExp(["("+_t+")","("+s+"|"+Wn+"|"+Mn+")+"].join("|"),"g"),d=Bn(e,a);if(d.length===0)return[];t||(t={});var c=!1;return d.map(function(l){var u=l[0];if(!u||c)return;if(wt.test(u))return{op:u};var p=!1,f=!1,m="",h=[],N=!1,R=null,V=!1,k;function tt(){k+=1;var I,X,be=u.charAt(k);if(be==="{"){if(k+=1,u.charAt(k)==="}")throw new Error("Bad substitution: "+u.slice(k-2,k+1));var re=1;for(I=k;re>0&&I<u.length;)u.charAt(I)==="{"&&u.charAt(I-1)==="$"?re+=1:u.charAt(I)==="}"&&(re-=1),I+=1;if(re!==0)throw new Error("Bad substitution: "+u.slice(k));I-=1,X=u.slice(k,I),k=I}else if(/[*@#?$!_-]/.test(be))X=be,k+=1;else{var xe=u.slice(k);I=xe.match(/[^\w\d_]/),I?(X=xe.slice(0,I.index),k+=I.index-1):(X=xe,k=u.length)}return $n(t,"",X)}i(tt,"parseEnvVar");function nt(){if(R!==null){if(R===0)m!==""&&(h[h.length]=m,m="");else{h[h.length]=m,m="";for(var I=1;I<R;I+=1)h[h.length]=""}R=null}}for(i(nt,"flushRun"),k=0;k<u.length;k++){var w=u.charAt(k);if(o&&w!==ce&&nt(),V=V||!p&&(w==="*"||w==="?"),f)m+=w,f=!1;else if(p)w===p?p=!1:p==xt?m+=w:w===r?(k+=1,w=u.charAt(k),w===Rt||w===r||w===ce?m+=w:m+=r+w):w===ce?m+=tt():m+=w;else if(w===Rt||w===xt)p=w,N=!0;else{if(wt.test(w))return{op:u};if(On.test(w)){c=!0;var rt={comment:e.slice(l.index+k+1)};return m.length?[m,rt]:[rt]}else if(w===r)f=!0;else if(w===ce){var ke=tt();if(!o)m+=ke;else for(var we=0;we<ke.length;we+=1){var W=ke.charAt(we);o.indexOf(W)<0?(nt(),m+=W):R===null?R=W===" "||W===" "||W===`
|
|
4
4
|
`?0:1:W!==" "&&W!==" "&&W!==`
|
|
5
5
|
`&&(R+=1)}}else m+=w}}if(V)return{op:"glob",pattern:m};if(o){if(R!==null&&R>0){h[h.length]=m,m="";for(var ot=1;ot<R;ot+=1)h[h.length]=""}return(m!==""||N&&h.length===0)&&(h[h.length]=m),h}return m}).reduce(function(l,u){return typeof u>"u"||[].concat(u).forEach(function(p){l[l.length]=p}),l},[])}i(Nn,"parseInternal");It.exports=i(function(t,n,r){var o=Nn(t,n,r);return typeof n!="function"?o:o.reduce(function(s,a){if(typeof a=="object")return s[s.length]=a,s;var d=a.split(RegExp("("+D+".*?"+D+")","g"));return d.length===1?(s[s.length]=d[0],s):(d.filter(Boolean).forEach(function(c){s[s.length]=jn.test(c)?JSON.parse(c.split(D)[1]):c}),s)},[])},"parse")});var vt=Re(Se=>{"use strict";Se.quote=kt();Se.parse=Tt()});var Mt=Pn(vt(),1);import{spawn as Ln}from"node:child_process";import{randomUUID as Dn}from"node:crypto";import Z from"node:path";import{mkdir as Fn}from"node:fs/promises";var Un=120,zn=3600,ue=6e4,St=2e4,Jn="Select a project to use this.";function Rs(e){let{upsertApproval:t,appendRuntimeEvent:n}=e,r=new Map,o=new Set;async function s(c){let l=c.command.trim();if(!l)return de(l,null,"Command is empty.",Pt(c.timeoutSeconds));let u=Pt(c.timeoutSeconds),p=A({session:c.session}),f=Yn({requestedCwd:c.cwd,session:c.session}),m=!f&&!c.session.workspaceKind&&!c.session.systemKind&&e.managedChatCwd;m&&(f=Z.join(m,c.session.id.replace(/[^a-zA-Z0-9_-]/g,"_")),await Fn(f,{recursive:!0}));let h=!!(c.cwd?.trim()&&Z.isAbsolute(c.cwd.trim()));if(p.target==="sandbox"||!f||p.target!=="local"&&!h&&!m)return de(l,f,Jn,u);let N=c.session.openPondCommandAccessMode??_e;if(N==="disabled")return de(l,f,"Command access is disabled for this chat.",u);let R=Hn(l);if(N==="ask"&&!o.has(At(c.session.id,R))){let k=await d({command:l,cwd:f,family:R,input:c,timeoutSeconds:u});if(k==="acceptForSession"&&o.add(At(c.session.id,R)),k!=="accept"&&k!=="acceptForSession")return de(l,f,k==="cancel"?"Command was cancelled.":"Command was not approved.",u)}let V=e.executionEnvironment?await e.executionEnvironment(c):{};return Zn({command:l,cwd:f,timeoutSeconds:u,signal:c.signal,env:V})}i(s,"executeCommand");async function a(c,l){let u=r.get(c);if(!u)return null;let p=it.parse(l);r.delete(c);let f=er(p.decision),m={...u.approval,status:f};return await t(m),await n(Te({sessionId:m.sessionId,turnId:m.turnId??void 0,name:"approval.resolved",source:"server",action:"command",status:f==="accepted"||f==="accepted_for_session"?"completed":"failed",output:m.title,data:{approvalId:c,status:f,decision:p.decision,family:u.family}})),u.resolve(p.decision),m}i(a,"resolveApproval");async function d(c){let l={id:`approval_${Dn()}`,sessionId:c.input.session.id,turnId:c.input.turnId??null,providerRequestId:c.input.providerRequestId??c.input.turnId??c.input.session.id,kind:"command",title:c.command,detail:JSON.stringify({command:c.command,cwd:c.cwd,timeoutSeconds:c.timeoutSeconds,source:c.input.source,mode:c.input.session.openPondCommandAccessMode??_e,risk:Xn(c.command),sessionApprovalFamily:{key:c.family.key,label:c.family.label,broad:c.family.broad,reason:c.family.reason}},null,2),status:"pending",createdAt:dt()},u,p=new Promise(f=>{u=f});r.set(l.id,{approval:l,family:c.family,resolve:u});try{await t(l),await n(Te({sessionId:c.input.session.id,turnId:c.input.turnId??void 0,name:"approval.requested",source:"server",action:"command",appId:c.input.session.appId,status:"pending",output:l.title,data:l}))}catch(f){throw r.delete(l.id),f}return p}return i(d,"requestCommandApproval"),{executeCommand:s,resolveApproval:a}}i(Rs,"createOpenPondCommandAccessService");function Wt(e){return JSON.stringify({ok:e.ok,action:"exec_command",output:Qn(e),data:{command:e.command,cwd:e.cwd,exitCode:e.exitCode,stdout:Et(e.stdout),stderr:Et(e.stderr),timedOut:e.timedOut,timeoutSeconds:e.timeoutSeconds,truncated:e.truncated,blockedReason:e.blockedReason}},null,2)}i(Wt,"commandResultForModel");function Hn(e){let t=Kn(e);if(!t)return le(e,"Could not safely parse shell command.");let n=Gn(t);if(n===-1)return le(e,"Could not find command executable.");if(Vn(t))return le(e,"Shell operators require exact-command session approval.");let r=t[n],o=t[n+1]??null;return r==="pwd"?Y("pwd","pwd","Allowlisted read-only command."):r==="ls"?Y("ls","ls","Allowlisted directory listing command."):r==="git"&&o==="status"?Y("git status","git status","Allowlisted git status family."):r==="docker"&&o==="system"?Y("docker system","docker system","Allowlisted Docker system inspection family."):r==="bun"&&o==="run"?Y("bun run","bun run","Allowlisted Bun script execution family."):le(e,"Command is not in the broad session-approval allowlist.")}i(Hn,"classifyCommandFamily");function Kn(e){try{let t=(0,Mt.parse)(e),n=[];for(let r of t){if(typeof r=="string"){n.push(r);continue}if(!r||typeof r!="object")return null;let o=r.op;if(typeof o=="string"){n.push(o);continue}return null}return n}catch{return null}}i(Kn,"safeShellTokens");function Gn(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(!/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(n))return t}return-1}i(Gn,"firstCommandTokenIndex");function Vn(e){return e.some(t=>/^(?:\||&&|\|\||;|&|<|>|\(|\)|\{|\})$/.test(t))}i(Vn,"hasUnsafeShellSyntax");function Y(e,t,n){return{key:e,label:t,broad:!0,reason:n}}i(Y,"broadFamily");function le(e,t){return{key:`exact:${e}`,label:e,broad:!1,reason:t}}i(le,"exactCommandFamily");function At(e,t){return`${e}:${t.key}`}i(At,"sessionFamilyKey");function Xn(e){let t=e.toLowerCase();return/\b(?:sudo|rm\s+-rf|mkfs|dd\s+if=|docker\s+(?:volume\s+rm|system\s+prune|container\s+rm)|kill(?:all)?)\b/.test(t)?"danger":/\b(?:npm|pnpm|yarn|bun)\s+(?:install|add|remove)|\bgit\s+(?:commit|push|reset|checkout|merge|rebase)|[>|]|\b(?:mv|cp|rm|touch|mkdir|docker\s+(?:run|build|compose))\b/.test(t)?"write":"read"}i(Xn,"commandRiskLabel");function Yn(e){let t=e.requestedCwd?.trim();return t?Z.isAbsolute(t)?Z.resolve(t):e.session.cwd?Z.resolve(e.session.cwd,t):null:e.session.cwd?.trim()||null}i(Yn,"resolveCommandCwd");function Pt(e){return Number.isFinite(e??NaN)?Math.max(1,Math.min(Math.floor(e),zn)):Un}i(Pt,"normalizedTimeout");function de(e,t,n,r){return{ok:!1,command:e,cwd:t,exitCode:null,stdout:"",stderr:n,timedOut:!1,timeoutSeconds:r,truncated:!1,blockedReason:n}}i(de,"blockedCommandResult");function Zn(e){return new Promise(t=>{let n=!1,r=!1,o="",s="",a=!1,d=null,c=ut(e.command),l=Ln(c.command,{cwd:e.cwd,shell:c.shell,env:{...process.env,PATH:pt(),...e.env},stdio:["ignore","pipe","pipe"],detached:process.platform!=="win32"}),u=i(h=>{n||(n=!0,clearTimeout(m),d&&clearTimeout(d),e.signal?.removeEventListener("abort",f),t(h))},"finish"),p=i((h,N)=>{let R=N.toString("utf8");h==="stdout"?o=Ae(o,R):s=Ae(s,R),o.length+s.length>=ue&&(a=!0)},"appendOutput"),f=i(()=>{Pe(l,"SIGTERM"),u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:s||"Command was interrupted.",timedOut:!1,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:"Command was interrupted."}),Ct(l)},"abort"),m=setTimeout(()=>{r=!0,Pe(l,"SIGTERM"),d=Ct(l)},e.timeoutSeconds*1e3);e.signal?.addEventListener("abort",f,{once:!0}),l.stdout?.on("data",h=>p("stdout",h)),l.stderr?.on("data",h=>p("stderr",h)),l.on("error",h=>{u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:h.message,timedOut:r,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:null})}),l.on("close",h=>{u({ok:!r&&(h??1)===0,command:e.command,cwd:e.cwd,exitCode:r?null:h??1,stdout:o,stderr:r?Ae(s,`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{g as m}from"./chunk-
|
|
2
|
+
import{g as m}from"./chunk-ANG2YMMD.js";import{f as d}from"./chunk-5KJMFK65.js";import{n as f}from"./chunk-RCT3O3HQ.js";import{a as n}from"./chunk-FTQLQJQV.js";import h from"node:path";function p(r){let o=r.environment.metadata.runtimeSourceTasksetId,s=o===void 0?r.id:o;if(typeof s!="string"||!s||s==="."||s===".."||h.basename(s)!==s||s.includes("\\"))throw new Error(`Taskset ${r.id} has an invalid package directory identity.`);return s}n(p,"tasksetPackageDirectoryId");import R from"node:path";async function D(r){let{taskset:o}=r,{taskset:s,modelResources:k,learningResources:u}=r.content,l=new Set([...k?.assets??[],...u?.assets??[]].map(e=>e.id)),c=new Map,i=n((e,a=e.path)=>{if(l.has(e.id))return;let t=c.get(e.id);if(t&&(f(t.asset)!==f(e)||t.sourcePath!==a))throw new Error(`Conflicting local Taskset file reference: ${e.id}.`);c.set(e.id,{asset:e,sourcePath:a})},"add");for(let e of d.parse(o.metadata.portableFileInventory??[]))i(e.asset,e.sourcePath);for(let e of s.tasks){let a=o.tasks.find(t=>t.id===e.id);for(let t of e.artifactRefs)i(t,a?.assets?.find(g=>g.id===t.id)?.artifactRef??t.path);for(let t of e.requiredOutputs??[])t.schemaRef&&i(t.schemaRef)}for(let e of s.graders){let a=o.graders.find(t=>t.id===e.id);"verifierRef"in e&&i(e.verifierRef,a?.kind==="custom_verifier"?a.module:e.verifierRef.path),"rubricRef"in e&&i(e.rubricRef)}return m({root:R.join(r.storeDir,"training","tasksets",p(o)),content:r.content,sources:[...c.values()]})}n(D,"captureAuthoredModelTasksetPackage");export{p as a,D 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 m}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-MCBRB5D6.js";import{e as h}from"./chunk-JCLTFDVW.js";import{a as s}from"./chunk-FTQLQJQV.js";var g=5,A=10,f=1200;function b(e){let r=y(e.endpoint),t=e.fetchImpl??fetch,n=e.apiKey?.trim()||null;return async(i,c)=>{let a=S(i),u=new Headers;u.set("Accept","application/json"),u.set("Content-Type","application/json"),u.set("x-openpond-client","openpond-app"),n&&(n.startsWith("opk_")&&u.set("openpond-api-key",n),u.set("Authorization",`Bearer ${n}`));let l=await t(r,{method:"POST",headers:u,body:JSON.stringify(a),signal:c?.signal});if(!l.ok)throw new Error(`Hosted web search failed: ${l.status} ${await O(l)}`);return w(await l.json(),a.query)}}s(b,"createHostedWebSearchExecutor");function D(e=process.env,r={}){let t=r.loadAccountContext??m;return async(n,i)=>{let c=p(e.OPENPOND_WEB_SEARCH_API_KEY,e.OPENPOND_SEARCH_API_KEY,e.OPENPOND_API_KEY),a=c?null:await t().catch(()=>null),u=E(e,a),l=c??a?.token??null;return b({endpoint:u,apiKey:l,fetchImpl:r.fetchImpl})(n,i)}}s(D,"createWebSearchExecutorFromEnv");function E(e=process.env,r){let t=p(e.OPENPOND_WEB_SEARCH_ENDPOINT);if(t)return y(t);let n=p(e.OPENPOND_SEARCH_API_URL);if(n)return d(n);let i=p(e.OPENPOND_PUBLIC_API_URL,e.OPENPOND_API_URL,r?.apiBaseUrl);if(i)return d(i);let c=p(e.OPENPOND_OPCHAT_API_URL,e.OPENPOND_CHAT_API_URL,r?.chatApiBaseUrl);return d(c||h)}s(E,"resolveWebSearchEndpoint");function d(e){let r=e.trim().replace(/\/+$/,"");if(!r)throw new Error("Hosted web search endpoint is required.");let t=new URL(r);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("Hosted web search endpoint must use http or https.");let n=t.pathname.split("/").filter(Boolean),i=n.findIndex(c=>c.toLowerCase()==="opchat");if(i>=0)t.pathname=`/${[...n.slice(0,i),"v1","search"].join("/")}`;else{let c=n.findIndex(a=>a.toLowerCase()==="search");if(c>=0)t.pathname=`/${n.slice(0,c+1).join("/")}`;else{let a=n.findIndex(u=>u.toLowerCase()==="v1");t.pathname=a>=0?`/${[...n.slice(0,a+1),"search"].join("/")}`:`${t.pathname.replace(/\/+$/,"")}/v1/search`.replace(/\/{2,}/g,"/")}}return t.search="",t.hash="",t.toString()}s(d,"normalizeSearchApiUrl");function S(e){let r=e.query.trim();if(!r)throw new Error("web_search query is required.");let t=_(e.limit),n=Array.isArray(e.domains)?e.domains.map(i=>i.trim()).filter(Boolean).slice(0,10):void 0;return{query:r,limit:t,...typeof e.recencyDays=="number"&&Number.isFinite(e.recencyDays)&&e.recencyDays>=0?{recencyDays:Math.floor(e.recencyDays)}:{},...n&&n.length>0?{domains:n}:{}}}s(S,"normalizeWebSearchRequest");function y(e){let r=e.trim();if(!r)throw new Error("Hosted web search endpoint is required.");let t=new URL(r);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("Hosted web search endpoint must use http or https.");return t.toString()}s(y,"normalizeEndpoint");function p(...e){for(let r of e){let t=r?.trim();if(t)return t}return null}s(p,"firstNonEmpty");function _(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?g:Math.min(Math.floor(e),A)}s(_,"normalizeLimit");function w(e,r){let t=e&&typeof e=="object"?e:{},i=(Array.isArray(t.results)?t.results:Array.isArray(t.items)?t.items:[]).map(P).filter(c=>!!c);return{query:o(t.query)??r,provider:o(t.provider)??"hosted",searchedAt:o(t.searchedAt)??o(t.searched_at)??new Date().toISOString(),results:i,truncated:t.truncated===!0}}s(w,"normalizeWebSearchResult");function P(e,r){if(!e||typeof e!="object")return null;let t=e,n=o(t.url),i=o(t.title);return!n||!i?null:{id:o(t.id)??`result_${r+1}`,title:i,url:n,snippet:R(o(t.snippet)??o(t.description)??o(t.text)??o(t.content)),sourceName:o(t.sourceName)??o(t.source_name)??o(t.source)??I(n),faviconUrl:x(o(t.faviconUrl)??o(t.favicon_url)??o(t.iconUrl)??o(t.icon_url))??N(n),publishedAt:o(t.publishedAt)??o(t.published_at)??o(t.publishedDate)??o(t.published_date),updatedAt:o(t.updatedAt)??o(t.updated_at)??o(t.updatedDate)??o(t.updated_date)}}s(P,"normalizeWebSearchItem");function R(e){if(!e)return"";let r=e.replace(/\s+/g," ").trim();return r.length<=f?r:`${r.slice(0,f-1).trimEnd()}\u2026`}s(R,"normalizeSnippet");function x(e){if(!e)return null;try{let r=new URL(e);return r.protocol!=="http:"&&r.protocol!=="https:"?null:r.toString()}catch{return null}}s(x,"normalizeOptionalUrl");function N(e){try{return new URL("/favicon.ico",e).toString()}catch{return null}}s(N,"faviconUrlFromPageUrl");function I(e){try{return new URL(e).hostname.replace(/^www\./i,"")}catch{return null}}s(I,"hostnameFromUrl");async function O(e){let r=await e.text().catch(()=>"");if(!r)return e.statusText||`HTTP ${e.status}`;try{let t=JSON.parse(r);if(t&&typeof t=="object"){let n=t,i=n.error;return i&&typeof i=="object"?o(i.message)??JSON.stringify(t):o(n.message)??o(n.error)??JSON.stringify(t)}}catch{return r}return r}s(O,"readSearchError");function o(e){return typeof e=="string"&&e.trim()?e.trim():null}s(o,"stringValue");export{b as a,D as b,E as c,d,S as e};
|