openpond 0.2.63 → 0.2.65
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-PHMBLRCV.js +2 -0
- package/dist/chunks/acp-agent-A7GK2VSH.js +19 -0
- package/dist/chunks/actions-command-VLKMHCMI.js +2 -0
- package/dist/chunks/app-layer-J66CQ2QN.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-OMR2VE6L.js +2 -0
- package/dist/chunks/apps-IHUFERZO.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-E2S2EMYQ.js +10 -0
- 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-FEQ7HNJR.js +2 -0
- package/dist/chunks/{chunk-2HAWOMZK.js → chunk-FGOTSCSE.js} +1 -1
- 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-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-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-R6VJDOQM.js → chunk-N2AV7PHV.js} +4 -4
- 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-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-UM6EQOT2.js +161 -0
- 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-465ODYTC.js +2 -0
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +2 -0
- package/dist/chunks/connected-evidence-XPAZQRFQ.js +2 -0
- package/dist/chunks/{connected-starting-assets-JONPTII6.js → connected-starting-assets-2YX3QVDB.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-PJOGRBHJ.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +4 -0
- package/dist/chunks/datasets-OTE2I4VT.js +2 -0
- package/dist/chunks/desktop-test-Q6REQJ7K.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-KRCY2H4C.js +2 -0
- package/dist/chunks/experiment-improvements-7MI2VYBR.js +2 -0
- package/dist/chunks/experiments-CNUQKJZE.js +2 -0
- package/dist/chunks/experiments-VOCZ4DW3.js +2 -0
- package/dist/chunks/experiments-signal-4N344D4Y.js +2 -0
- package/dist/chunks/{extension-ZM6NI5O5.js → extension-UH34ZF7N.js} +1 -1
- package/dist/chunks/{help-7HXFWIKS.js → help-ZUKVY6RO.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-DWSU6ASL.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-HOBGC6RC.js +2 -0
- package/dist/chunks/{import-6SI4BEKS.js → import-Q3YRFVY7.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-2LLDIWEJ.js +3 -0
- package/dist/chunks/opchat-bounded-chat-FLDS36LU.js +2 -0
- package/dist/chunks/organizations-VIFSOY6P.js +2 -0
- package/dist/chunks/{profile-O5HL5DTQ.js → profile-KIHMW2WB.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-TJLQNMLA.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-CQO6BEMQ.js +2 -0
- package/dist/chunks/{sandbox-template-27U3FQN7.js → sandbox-template-MU33IILL.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-CHQVWHV7.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-D3LWA4S5.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,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as pt}from"./chunk-FYYYECHE.js";import{a as D,b as je,d as de}from"./chunk-2V4LPUBH.js";import{b as mt,c as ft}from"./chunk-N4VHLJBZ.js";import{a as Je,b as Ye,c as Ze,d as ce}from"./chunk-R6WMY6AH.js";import{a as M,b as ue}from"./chunk-NZTCH6K5.js";import{Z as lt,a as le,d as $e,e as Ve,g as tt,j as rt,k as st,ma as ut,na as dt,oa as gt,v as at,w as Y,y as it}from"./chunk-URNMC46H.js";import{g as ct}from"./chunk-4SZ3HKHU.js";import{a as ze}from"./chunk-RFMME46Z.js";import{b as et}from"./chunk-DQI5TE6A.js";import{a as Xe}from"./chunk-VFH5C6D2.js";import{b as Ge,d as Qe}from"./chunk-AH26AQN7.js";import{k as Ke}from"./chunk-LK2K3SPM.js";import{a as ot,b as nt}from"./chunk-GW766ZSO.js";import{i as Be,p as Ue}from"./chunk-WWQNMC7C.js";import{s as L,u as B,v as ie,z as Le}from"./chunk-B4RKHHF7.js";import{b as Fe,d as T,g as X}from"./chunk-LKKMLBOH.js";import{E as Me,Fa as Ne,g as De}from"./chunk-M3FLEZ4E.js";import{a as qe}from"./chunk-WBUK73ST.js";import{c as We}from"./chunk-L3KS6MOV.js";import{a as tr}from"./chunk-JFXINDOQ.js";import{g as Oe}from"./chunk-RV7PUSI2.js";import{_ as _e,ca as Ce,fa as He}from"./chunk-2EPR4HLF.js";import{F as be}from"./chunk-BKEDG3A4.js";import{p as Ie}from"./chunk-UGOK7VTC.js";import{n as H}from"./chunk-VVNV4NNW.js";import{a as n,e as er}from"./chunk-FTQLQJQV.js";import{randomUUID as Pr}from"node:crypto";import{mkdir as Rr}from"node:fs/promises";import q from"node:path";function ht(e){return async(t,r)=>{let s=await e?.(t,r)??null;if((t.metadata?.standaloneExperiment!==void 0||t.metadata?.localProfileExperiment!==void 0)&&!s)throw new Error("This native Experiment session has no active durable model-dispatch owner.");return s}}n(ht,"experimentSessionStreamResolver");var St=er(tr(),1);import{randomUUID as pe}from"node:crypto";var rr=15e3,or=3e4;function Wr(e){let t=new Set,r=null,s=null;async function p(a){if(!a.profileRef||!a.profileWorkflowId)throw new Error(a.profileMigrationError??`Chat Workflow ${a.id} has no Profile package.`);let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u,a.profileRef),c=await e.readProfilePackage(i.sourcePath,a.profileWorkflowId);return{...a,name:c.name,prompt:c.prompt}}n(p,"authoredWorkflow");async function h(){for(let a of await e.store.listChatWorkflows())if(!(a.profileRef&&a.profileWorkflowId))try{let u=await e.getSession(a.sessionId);if(!u.currentProfile)throw new Error("Original session has no explicit Profile owner.");let i=await e.resolveProfileOwner(u,u.currentProfile),c={...a,profileRef:i.ref,profileWorkflowId:a.profileWorkflowId??`chat-${a.id.toLowerCase()}`,profileMigrationError:null};await e.saveProfilePackage(i.sourcePath,c),await e.store.patchChatWorkflow(a.id,()=>c)}catch(u){let i=`Profile package migration unresolved: ${u instanceof Error?u.message:String(u)}`;await e.store.patchChatWorkflow(a.id,c=>({...c,profileMigrationError:i})),e.logger?.warn("chat workflow Profile migration unresolved",{workflowId:a.id,error:i})}}n(h,"migrateExistingWorkflows");async function w(a){let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u),c=T(),g=Z(a.recurrence,new Date,0);if(!g.value)throw new Error(g.error??"This workflow has no future occurrence.");let k={id:pe(),sessionId:u.id,sessionTitle:u.title,sourceTurnId:a.sourceTurnId??null,name:a.name,prompt:a.prompt,profileRef:i.ref,profileWorkflowId:`chat-${pe()}`,recurrence:a.recurrence,enabled:!0,nextRunAt:g.value,lastRunAt:null,lastRunStatus:null,lastRunId:null,lastError:g.error,scheduledRunCount:0,createdAt:c,updatedAt:c};return await e.saveProfilePackage(i.sourcePath,k),e.store.upsertChatWorkflow(k)}n(w,"create");async function v(){if(e.isClosing())return;let a=await e.store.listDueChatWorkflows(T());for(let u of a)if(!t.has(u.id)){if(e.isSessionTurnActive(u.sessionId)){await e.store.patchChatWorkflow(u.id,i=>({...i,nextRunAt:new Date(Date.now()+or).toISOString(),lastError:"Waiting for the attached chat to finish its current turn.",updatedAt:T()}));continue}await d(u,u.nextRunAt??T(),"schedule")}}n(v,"runTick");function l(){if(s)return s;let a=v().finally(()=>{s===a&&(s=null)});return s=a,a}n(l,"trackedTick");async function d(a,u,i){a=await p(a);let c=T(),g=e.store.home?await He(e.store.home):void 0,k={definitionSnapshot:structuredClone(a),...g?{configurationSnapshot:{effectiveRevision:g.effectiveRevision,sources:g.sources}}:{},id:pe(),workflowId:a.id,sessionId:a.sessionId,scheduledFor:u,trigger:i,status:"queued",turnId:null,error:null,createdAt:c,startedAt:null,completedAt:null,updatedAt:c},y=await e.store.insertChatWorkflowRun(k);return t.add(a.id),e.queue.enqueue({label:"chat-workflow-run",metadata:{workflowId:a.id,sessionId:a.sessionId,trigger:i,scheduledFor:u}},async()=>{try{await f(a,y)}finally{t.delete(a.id)}}),y}n(d,"enqueue");async function f(a,u){let i=T();await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:"running",startedAt:i,updatedAt:i}));let c=null,g=null;try{c=await e.sendTurn(a.sessionId,{prompt:a.prompt,metadata:{interactionKind:"scheduled_workflow",chatWorkflowId:a.id,chatWorkflowName:a.name,chatWorkflowRunId:u.id,scheduledFor:u.scheduledFor}})}catch(S){g=S instanceof Error?S.message:String(S)}let k=T(),y=c?.status==="completed"?"succeeded":"failed";await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:y,turnId:c?.id??null,error:g??c?.error??null,completedAt:k,updatedAt:k})),await e.store.patchChatWorkflow(a.id,S=>{let b=S.scheduledRunCount+(u.trigger==="schedule"?1:0),P=u.trigger==="manual"?{value:S.nextRunAt,error:null}:Z(S.recurrence,new Date,b);return{...S,enabled:P.value?S.enabled:!1,nextRunAt:S.enabled?P.value:null,lastRunAt:k,lastRunStatus:y,lastRunId:u.id,lastError:P.error??g??c?.error??null,scheduledRunCount:b,updatedAt:k}})}return n(f,"execute"),{async start(){r||(await h(),l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)})),r=setInterval(()=>{l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)}))},e.tickMs??rr),r.unref?.())},async stop(){r&&clearInterval(r),r=null,await s?.catch(()=>{})},create:w,async list(a){let u=await e.store.listChatWorkflows({sessionId:a});return Promise.all(u.map(async i=>{try{return await p(i)}catch(c){return{...i,profileMigrationError:c instanceof Error?c.message:String(c)}}}))},listRuns:n(a=>e.store.listChatWorkflowRuns(a),"listRuns"),async patch(a,u){let i=await e.store.getChatWorkflow(a);if(!i)return null;let c=T();if("enabled"in u){let S=u.enabled?Z(i.recurrence,new Date,i.scheduledRunCount):{value:null,error:null};return e.store.patchChatWorkflow(a,b=>({...b,enabled:u.enabled&&!!S.value,nextRunAt:u.enabled?S.value:null,lastError:S.error,updatedAt:c}))}let g=Z(u.recurrence,new Date,0);if(!i.profileRef||!i.profileWorkflowId)throw new Error(`Chat Workflow ${a} has no resolved Profile owner; migrate it before editing.`);let k=await e.getSession(i.sessionId),y=await e.resolveProfileOwner(k,i.profileRef);return await e.saveProfilePackage(y.sourcePath,{...i,name:u.name,prompt:u.prompt}),e.store.patchChatWorkflow(a,S=>({...S,name:u.name,prompt:u.prompt,recurrence:u.recurrence,enabled:!!g.value,nextRunAt:g.value,lastError:g.error,scheduledRunCount:0,updatedAt:c}))},remove:n(a=>e.store.deleteChatWorkflow(a),"remove"),async runNow(a){let u=await e.store.getChatWorkflow(a);if(!u)throw new Error("Chat workflow not found.");if(e.isSessionTurnActive(u.sessionId))throw new Error("The attached chat is currently running a turn.");return d(u,T(),"manual")}}}n(Wr,"createChatWorkflowLoop");var nr={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};function Z(e,t,r){try{return{value:me(e,t,r),error:null}}catch(s){return{value:null,error:s instanceof Error?s.message:String(s)}}}n(Z,"safeNextOccurrence");function me(e,t,r){if(e.end.kind==="after_occurrences"&&r>=e.end.occurrences)return null;let s=wt(e.startDate,e.localTime,e.timeZone);if(e.kind==="once")return s.getTime()>t.getTime()?s.toISOString():null;let[p,h]=e.localTime.split(":").map(Number),w=e.kind==="daily"?`${h} ${p} * * *`:e.kind==="weekdays"?`${h} ${p} * * 1-5`:e.kind==="weekly"?`${h} ${p} * * ${(e.weekdays??[]).map(d=>nr[d]).join(",")}`:`${h} ${p} ${e.dayOfMonth} * *`,v=new Date(Math.max(t.getTime(),s.getTime()-1e3)),l=St.CronExpressionParser.parse(w,{currentDate:v,tz:e.timeZone}).next().toDate();if(e.end.kind==="on_date"){let d=wt(e.end.date,"23:59",e.timeZone);if(l.getTime()>d.getTime()+59999)return null}return l.toISOString()}n(me,"nextOccurrence");function wt(e,t,r){let[s,p,h]=e.split("-").map(Number),[w,v]=t.split(":").map(Number),l=Date.UTC(s,p-1,h,w,v),d=new Date(l);for(let f=0;f<3;f+=1){let a=new Intl.DateTimeFormat("en-CA",{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(d),u=Object.fromEntries(a.map(g=>[g.type,g.value])),i=Date.UTC(Number(u.year),Number(u.month)-1,Number(u.day),Number(u.hour),Number(u.minute)),c=l-i;if(c===0)return d;d=new Date(d.getTime()+c)}return d}n(wt,"zonedLocalDateTime");function vt(e){return Ie(e,t=>{let r=0,s=0;t.exec("BEGIN IMMEDIATE");try{for(let[p,h,w]of[["local_agent_schedule_runs","local_agent_schedules","scheduleId"],["chat_workflow_runs","chat_workflows","workflowId"]]){let v=t.prepare(`SELECT id, payload FROM ${p} WHERE status IN ('queued','running')`).all();for(let l of v){let d=JSON.parse(l.payload),f=new Date().toISOString(),a=typeof d.turnId=="string"?t.prepare("SELECT payload FROM turns WHERE id = ?").get(d.turnId):void 0,i=(a?JSON.parse(a.payload):null)?.status==="completed",c=i?"The previous scheduled turn completed before shutdown.":"OpenPond stopped before this scheduled run was settled. Its external outcome may be unknown. Review the run before retrying or enabling this schedule.",g=i?"succeeded":"failed";t.prepare(`UPDATE ${p} SET status=?, payload=?, updated_at=? WHERE id=?`).run(g,JSON.stringify({...d,status:g,error:i?null:c,completedAt:f,updatedAt:f}),f,l.id);let k=t.prepare(`SELECT payload FROM ${h} WHERE id = ?`).get(String(d[w]));if(k&&!i){let y=JSON.parse(k.payload);t.prepare(`UPDATE ${h} SET enabled=0, next_run_at=NULL, payload=?, updated_at=? WHERE id=?`).run(JSON.stringify({...y,enabled:!1,nextRunAt:null,lastRunStatus:g,lastRunId:l.id,lastError:c,updatedAt:f}),f,String(d[w]))}if(i&&k&&h==="chat_workflows"){let y=Ne.parse(JSON.parse(k.payload)),S=y.scheduledRunCount+(d.trigger==="schedule"?1:0),b=d.trigger==="manual"?y.nextRunAt:me(y.recurrence,new Date(f),S),P=y.enabled&&b!==null;t.prepare("UPDATE chat_workflows SET enabled=?, next_run_at=?, payload=?, updated_at=? WHERE id=?").run(P?1:0,P?b:null,JSON.stringify({...y,enabled:P,nextRunAt:P?b:null,scheduledRunCount:S,lastRunStatus:g,lastRunId:l.id,lastRunAt:f,lastError:null,updatedAt:f}),f,y.id)}i?r+=1:s+=1}}return t.exec("COMMIT"),{recovered:r,needsReview:s}}catch(p){throw t.exec("ROLLBACK"),p}})}n(vt,"reconcileInterruptedScheduledWork");async function kt(e,t){let r=sr(e);if(!r)return null;let s=await t.loadProfileState();return r==="help"?ar(s):ir(s)}n(kt,"runProfileSkillCommand");function sr(e){let t=/^\/skill(?:\s+([\s\S]*))?$/i.exec(e.trim());if(!t)return null;let r=t[1]?.trim().toLowerCase()??"";return!r||r==="list"?"list":r==="help"?"help":null}n(sr,"readOnlyProfileSkillAction");function ar(e){return{handled:!0,action:"help",profile:e,message:["Profile skills support:","- /skill list","- /skill create <what the skill should help with>","- /skill create <skill-name>: <what the skill should help with>","- /skill create --name <skill-name> <what the skill should help with>","- /skill edit <skill-name> <change request>","","Create and edit run as normal model turns with the bundled OpenPond Skill Authoring skill. Skills may include SKILL.md plus focused scripts, references, and assets. Use an Agent when the workflow needs code, actions, durable runtime behavior, setup, or Evals."].join(`
|
|
2
|
+
import{a as pt}from"./chunk-DSJZS77R.js";import{a as D,b as Fe,d as de}from"./chunk-HPTEJBP4.js";import{b as mt,c as ft}from"./chunk-D7R2AAX2.js";import{a as Je,b as Ye,c as Ze,d as ce}from"./chunk-NTM3KQ25.js";import{a as M,b as ue}from"./chunk-2GJD23CM.js";import{_ as lt,a as le,d as $e,e as Ve,g as tt,j as rt,k as st,na as ut,oa as dt,pa as gt,v as at,w as Y,y as it}from"./chunk-UM6EQOT2.js";import{g as ct}from"./chunk-EVQISX7M.js";import{a as ze}from"./chunk-PYNW5OFA.js";import{b as et}from"./chunk-66HFW4OU.js";import{a as Xe}from"./chunk-VFH5C6D2.js";import{b as Ge,d as Qe}from"./chunk-XHBMK6LC.js";import{k as Ke}from"./chunk-ZU3YBRXS.js";import{a as ot,b as nt}from"./chunk-GW766ZSO.js";import{i as Be,p as Ue}from"./chunk-MCBRB5D6.js";import{s as L,u as B,v as ie,z as Le}from"./chunk-4TTXNVCE.js";import{a as T,d as X}from"./chunk-BJXPQIVD.js";import{c as We}from"./chunk-L3KS6MOV.js";import{F as Ne,Ga as qe,g as Me}from"./chunk-MVPKU72J.js";import{a as je}from"./chunk-BL3CZWWD.js";import{a as tr}from"./chunk-JFXINDOQ.js";import{b as De}from"./chunk-O6ZYDHEJ.js";import{g as be}from"./chunk-AJXWJLZA.js";import{_ as Ce,ca as He,fa as Oe}from"./chunk-SH7POUVX.js";import{F as Ie}from"./chunk-2MEOUS24.js";import{n as H}from"./chunk-RCT3O3HQ.js";import{p as _e}from"./chunk-UGOK7VTC.js";import{a as n,e as er}from"./chunk-FTQLQJQV.js";import{randomUUID as Pr}from"node:crypto";import{mkdir as Rr}from"node:fs/promises";import q from"node:path";function ht(e){return async(t,r)=>{let s=await e?.(t,r)??null;if((t.metadata?.standaloneExperiment!==void 0||t.metadata?.localProfileExperiment!==void 0)&&!s)throw new Error("This native Experiment session has no active durable model-dispatch owner.");return s}}n(ht,"experimentSessionStreamResolver");var St=er(tr(),1);import{randomUUID as pe}from"node:crypto";var rr=15e3,or=3e4;function Wr(e){let t=new Set,r=null,s=null;async function p(a){if(!a.profileRef||!a.profileWorkflowId)throw new Error(a.profileMigrationError??`Chat Workflow ${a.id} has no Profile package.`);let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u,a.profileRef),c=await e.readProfilePackage(i.sourcePath,a.profileWorkflowId);return{...a,name:c.name,prompt:c.prompt}}n(p,"authoredWorkflow");async function h(){for(let a of await e.store.listChatWorkflows())if(!(a.profileRef&&a.profileWorkflowId))try{let u=await e.getSession(a.sessionId);if(!u.currentProfile)throw new Error("Original session has no explicit Profile owner.");let i=await e.resolveProfileOwner(u,u.currentProfile),c={...a,profileRef:i.ref,profileWorkflowId:a.profileWorkflowId??`chat-${a.id.toLowerCase()}`,profileMigrationError:null};await e.saveProfilePackage(i.sourcePath,c),await e.store.patchChatWorkflow(a.id,()=>c)}catch(u){let i=`Profile package migration unresolved: ${u instanceof Error?u.message:String(u)}`;await e.store.patchChatWorkflow(a.id,c=>({...c,profileMigrationError:i})),e.logger?.warn("chat workflow Profile migration unresolved",{workflowId:a.id,error:i})}}n(h,"migrateExistingWorkflows");async function w(a){let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u),c=T(),g=Z(a.recurrence,new Date,0);if(!g.value)throw new Error(g.error??"This workflow has no future occurrence.");let k={id:pe(),sessionId:u.id,sessionTitle:u.title,sourceTurnId:a.sourceTurnId??null,name:a.name,prompt:a.prompt,profileRef:i.ref,profileWorkflowId:`chat-${pe()}`,recurrence:a.recurrence,enabled:!0,nextRunAt:g.value,lastRunAt:null,lastRunStatus:null,lastRunId:null,lastError:g.error,scheduledRunCount:0,createdAt:c,updatedAt:c};return await e.saveProfilePackage(i.sourcePath,k),e.store.upsertChatWorkflow(k)}n(w,"create");async function v(){if(e.isClosing())return;let a=await e.store.listDueChatWorkflows(T());for(let u of a)if(!t.has(u.id)){if(e.isSessionTurnActive(u.sessionId)){await e.store.patchChatWorkflow(u.id,i=>({...i,nextRunAt:new Date(Date.now()+or).toISOString(),lastError:"Waiting for the attached chat to finish its current turn.",updatedAt:T()}));continue}await d(u,u.nextRunAt??T(),"schedule")}}n(v,"runTick");function l(){if(s)return s;let a=v().finally(()=>{s===a&&(s=null)});return s=a,a}n(l,"trackedTick");async function d(a,u,i){a=await p(a);let c=T(),g=e.store.home?await Oe(e.store.home):void 0,k={definitionSnapshot:structuredClone(a),...g?{configurationSnapshot:{effectiveRevision:g.effectiveRevision,sources:g.sources}}:{},id:pe(),workflowId:a.id,sessionId:a.sessionId,scheduledFor:u,trigger:i,status:"queued",turnId:null,error:null,createdAt:c,startedAt:null,completedAt:null,updatedAt:c},y=await e.store.insertChatWorkflowRun(k);return t.add(a.id),e.queue.enqueue({label:"chat-workflow-run",metadata:{workflowId:a.id,sessionId:a.sessionId,trigger:i,scheduledFor:u}},async()=>{try{await f(a,y)}finally{t.delete(a.id)}}),y}n(d,"enqueue");async function f(a,u){let i=T();await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:"running",startedAt:i,updatedAt:i}));let c=null,g=null;try{c=await e.sendTurn(a.sessionId,{prompt:a.prompt,metadata:{interactionKind:"scheduled_workflow",chatWorkflowId:a.id,chatWorkflowName:a.name,chatWorkflowRunId:u.id,scheduledFor:u.scheduledFor}})}catch(S){g=S instanceof Error?S.message:String(S)}let k=T(),y=c?.status==="completed"?"succeeded":"failed";await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:y,turnId:c?.id??null,error:g??c?.error??null,completedAt:k,updatedAt:k})),await e.store.patchChatWorkflow(a.id,S=>{let b=S.scheduledRunCount+(u.trigger==="schedule"?1:0),P=u.trigger==="manual"?{value:S.nextRunAt,error:null}:Z(S.recurrence,new Date,b);return{...S,enabled:P.value?S.enabled:!1,nextRunAt:S.enabled?P.value:null,lastRunAt:k,lastRunStatus:y,lastRunId:u.id,lastError:P.error??g??c?.error??null,scheduledRunCount:b,updatedAt:k}})}return n(f,"execute"),{async start(){r||(await h(),l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)})),r=setInterval(()=>{l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)}))},e.tickMs??rr),r.unref?.())},async stop(){r&&clearInterval(r),r=null,await s?.catch(()=>{})},create:w,async list(a){let u=await e.store.listChatWorkflows({sessionId:a});return Promise.all(u.map(async i=>{try{return await p(i)}catch(c){return{...i,profileMigrationError:c instanceof Error?c.message:String(c)}}}))},listRuns:n(a=>e.store.listChatWorkflowRuns(a),"listRuns"),async patch(a,u){let i=await e.store.getChatWorkflow(a);if(!i)return null;let c=T();if("enabled"in u){let S=u.enabled?Z(i.recurrence,new Date,i.scheduledRunCount):{value:null,error:null};return e.store.patchChatWorkflow(a,b=>({...b,enabled:u.enabled&&!!S.value,nextRunAt:u.enabled?S.value:null,lastError:S.error,updatedAt:c}))}let g=Z(u.recurrence,new Date,0);if(!i.profileRef||!i.profileWorkflowId)throw new Error(`Chat Workflow ${a} has no resolved Profile owner; migrate it before editing.`);let k=await e.getSession(i.sessionId),y=await e.resolveProfileOwner(k,i.profileRef);return await e.saveProfilePackage(y.sourcePath,{...i,name:u.name,prompt:u.prompt}),e.store.patchChatWorkflow(a,S=>({...S,name:u.name,prompt:u.prompt,recurrence:u.recurrence,enabled:!!g.value,nextRunAt:g.value,lastError:g.error,scheduledRunCount:0,updatedAt:c}))},remove:n(a=>e.store.deleteChatWorkflow(a),"remove"),async runNow(a){let u=await e.store.getChatWorkflow(a);if(!u)throw new Error("Chat workflow not found.");if(e.isSessionTurnActive(u.sessionId))throw new Error("The attached chat is currently running a turn.");return d(u,T(),"manual")}}}n(Wr,"createChatWorkflowLoop");var nr={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};function Z(e,t,r){try{return{value:me(e,t,r),error:null}}catch(s){return{value:null,error:s instanceof Error?s.message:String(s)}}}n(Z,"safeNextOccurrence");function me(e,t,r){if(e.end.kind==="after_occurrences"&&r>=e.end.occurrences)return null;let s=wt(e.startDate,e.localTime,e.timeZone);if(e.kind==="once")return s.getTime()>t.getTime()?s.toISOString():null;let[p,h]=e.localTime.split(":").map(Number),w=e.kind==="daily"?`${h} ${p} * * *`:e.kind==="weekdays"?`${h} ${p} * * 1-5`:e.kind==="weekly"?`${h} ${p} * * ${(e.weekdays??[]).map(d=>nr[d]).join(",")}`:`${h} ${p} ${e.dayOfMonth} * *`,v=new Date(Math.max(t.getTime(),s.getTime()-1e3)),l=St.CronExpressionParser.parse(w,{currentDate:v,tz:e.timeZone}).next().toDate();if(e.end.kind==="on_date"){let d=wt(e.end.date,"23:59",e.timeZone);if(l.getTime()>d.getTime()+59999)return null}return l.toISOString()}n(me,"nextOccurrence");function wt(e,t,r){let[s,p,h]=e.split("-").map(Number),[w,v]=t.split(":").map(Number),l=Date.UTC(s,p-1,h,w,v),d=new Date(l);for(let f=0;f<3;f+=1){let a=new Intl.DateTimeFormat("en-CA",{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(d),u=Object.fromEntries(a.map(g=>[g.type,g.value])),i=Date.UTC(Number(u.year),Number(u.month)-1,Number(u.day),Number(u.hour),Number(u.minute)),c=l-i;if(c===0)return d;d=new Date(d.getTime()+c)}return d}n(wt,"zonedLocalDateTime");function vt(e){return _e(e,t=>{let r=0,s=0;t.exec("BEGIN IMMEDIATE");try{for(let[p,h,w]of[["local_agent_schedule_runs","local_agent_schedules","scheduleId"],["chat_workflow_runs","chat_workflows","workflowId"]]){let v=t.prepare(`SELECT id, payload FROM ${p} WHERE status IN ('queued','running')`).all();for(let l of v){let d=JSON.parse(l.payload),f=new Date().toISOString(),a=typeof d.turnId=="string"?t.prepare("SELECT payload FROM turns WHERE id = ?").get(d.turnId):void 0,i=(a?JSON.parse(a.payload):null)?.status==="completed",c=i?"The previous scheduled turn completed before shutdown.":"OpenPond stopped before this scheduled run was settled. Its external outcome may be unknown. Review the run before retrying or enabling this schedule.",g=i?"succeeded":"failed";t.prepare(`UPDATE ${p} SET status=?, payload=?, updated_at=? WHERE id=?`).run(g,JSON.stringify({...d,status:g,error:i?null:c,completedAt:f,updatedAt:f}),f,l.id);let k=t.prepare(`SELECT payload FROM ${h} WHERE id = ?`).get(String(d[w]));if(k&&!i){let y=JSON.parse(k.payload);t.prepare(`UPDATE ${h} SET enabled=0, next_run_at=NULL, payload=?, updated_at=? WHERE id=?`).run(JSON.stringify({...y,enabled:!1,nextRunAt:null,lastRunStatus:g,lastRunId:l.id,lastError:c,updatedAt:f}),f,String(d[w]))}if(i&&k&&h==="chat_workflows"){let y=qe.parse(JSON.parse(k.payload)),S=y.scheduledRunCount+(d.trigger==="schedule"?1:0),b=d.trigger==="manual"?y.nextRunAt:me(y.recurrence,new Date(f),S),P=y.enabled&&b!==null;t.prepare("UPDATE chat_workflows SET enabled=?, next_run_at=?, payload=?, updated_at=? WHERE id=?").run(P?1:0,P?b:null,JSON.stringify({...y,enabled:P,nextRunAt:P?b:null,scheduledRunCount:S,lastRunStatus:g,lastRunId:l.id,lastRunAt:f,lastError:null,updatedAt:f}),f,y.id)}i?r+=1:s+=1}}return t.exec("COMMIT"),{recovered:r,needsReview:s}}catch(p){throw t.exec("ROLLBACK"),p}})}n(vt,"reconcileInterruptedScheduledWork");async function kt(e,t){let r=sr(e);if(!r)return null;let s=await t.loadProfileState();return r==="help"?ar(s):ir(s)}n(kt,"runProfileSkillCommand");function sr(e){let t=/^\/skill(?:\s+([\s\S]*))?$/i.exec(e.trim());if(!t)return null;let r=t[1]?.trim().toLowerCase()??"";return!r||r==="list"?"list":r==="help"?"help":null}n(sr,"readOnlyProfileSkillAction");function ar(e){return{handled:!0,action:"help",profile:e,message:["Profile skills support:","- /skill list","- /skill create <what the skill should help with>","- /skill create <skill-name>: <what the skill should help with>","- /skill create --name <skill-name> <what the skill should help with>","- /skill edit <skill-name> <change request>","","Create and edit run as normal model turns with the bundled OpenPond Skill Authoring skill. Skills may include SKILL.md plus focused scripts, references, and assets. Use an Agent when the workflow needs code, actions, durable runtime behavior, setup, or Evals."].join(`
|
|
3
3
|
`)}}n(ar,"profileSkillHelp");function ir(e){let t=e.skills.slice().sort((s,p)=>s.name.localeCompare(p.name));return{handled:!0,action:"list",message:t.length===0?"No profile skills found in the active profile.":[`Profile skills (${t.length}):`,...t.map(s=>{let p=s.validationStatus==="valid"?"valid":`invalid: ${s.validationMessages.join("; ")}`;return`- ${s.name} (${p}) ${s.path}`})].join(`
|
|
4
|
-
`),skills:t,profile:e}}n(ir,"listProfileSkills");import{randomUUID as lr}from"node:crypto";function yt(e){return async function*({messages:t,signal:r}){for await(let s of e({model:
|
|
4
|
+
`),skills:t,profile:e}}n(ir,"listProfileSkills");import{randomUUID as lr}from"node:crypto";function yt(e){return async function*({messages:t,signal:r}){for await(let s of e({model:Ie,messages:t,requestId:`harness-continuous-review:${lr()}`,reasoningEffort:"medium",maxTokens:be,signal:r}))s.type==="text_delta"&&s.text?yield{text:s.text}:s.type==="usage"&&(yield{usage:{promptTokens:s.usage.prompt_tokens??0,completionTokens:s.usage.completion_tokens??0,totalTokens:s.usage.total_tokens??0}})}}n(yt,"createLocalHarnessEvaluationReviewModelStream");import{promises as Ct}from"node:fs";import N from"node:path";import{createHash as ur}from"node:crypto";import{access as cr,readFile as Pt}from"node:fs/promises";import x from"node:path";import{fileURLToPath as dr}from"node:url";var Tt=["openpond-cli","openpond-skill-authoring","openpond-agent-authoring","openpond-refiner-authoring"],Rt={"openpond-cli":["references/experiments-and-training.md","references/compact-resource-tables.md","references/diagnose-and-improve.md"],"openpond-skill-authoring":["references/skill-package-layout.md","references/copying-and-adaptation.md","references/validation-and-repair.md"],"openpond-agent-authoring":["references/profile-layout.md","references/action-and-chat-design.md","references/integrations-and-setup.md","references/validation-and-repair.md"],"openpond-refiner-authoring":["references/review-profile.md","references/core-boundary.md","references/validation-and-activation.md"]},Et=x.dirname(dr(import.meta.url));function At(e){return Tt.includes(e)}n(At,"isBundledAuthoringSkillName");async function xt(e=process.cwd()){return Promise.all(Tt.map(t=>ee(t,e)))}n(xt,"loadBundledAuthoringSkills");async function ee(e,t=process.cwd()){let r=await _t(e,t),s=await It(e,t),p=Ne.find(h=>h.name===e);if(!p)throw new Error(`Built-in OpenPond authoring skill metadata not found: ${e}`);return{...p,path:x.join(r,"SKILL.md"),sourcePath:r,charCount:s.length,sourceHash:ur("sha256").update(s).digest("hex"),validationMessages:[...p.validationMessages],resourceFiles:[...p.resourceFiles]}}n(ee,"loadBundledAuthoringProfileSkill");async function bt(e,t=process.cwd()){let r=await ee(e,t),s=await It(e,t);return{name:r.name,description:r.description,body:s,path:r.path,sourceHash:r.sourceHash,charCount:r.charCount,packagePath:r.sourcePath,resourceFiles:r.resourceFiles}}n(bt,"readBundledAuthoringProfileSkill");async function It(e,t=process.cwd()){let r=await _t(e,t),[s,...p]=await Promise.all([Pt(x.join(r,"SKILL.md"),"utf8"),...Rt[e].map(h=>Pt(x.join(r,h),"utf8"))]);return[s.trim(),...p.map((h,w)=>`
|
|
5
5
|
## Bundled reference: ${Rt[e][w]}
|
|
6
6
|
|
|
7
7
|
${h.trim()}`)].join(`
|
|
8
|
-
`)}n(It,"loadBundledAuthoringSkillBundle");async function _t(e,t=process.cwd(),r=process.execPath){let s=[x.resolve(t,"apps","cli","skills",e),x.resolve(t,"dist","skills",e),x.resolve(x.dirname(r),"skills",e),x.resolve(Et,"skills",e),x.resolve(Et,"..","skills",e)];for(let p of s)if(await cr(x.join(p,"SKILL.md")).then(()=>!0,()=>!1))return p;throw new Error(`Bundled OpenPond authoring skill ${e} was not found. Checked: ${s.join(", ")}`)}n(_t,"resolveBundledAuthoringSkillRoot");var Ht=24e3;function Wt(e){return[{name:"refiner_profile_inspect",description:"Inspect the separately versioned active Refiner Review Profile, its immutable release identity, and recent transitions. Use before editing Refiner behavior.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:n(async t=>I(t.callId,"refiner_profile_inspect",await(await import("./refiner-profile-service-BJMOYKTC.js")).inspectRefinerProfile(e.storeDir)),"execute")},{name:"refiner_profile_update",description:"Validate and write a complete JSON Refiner Review Profile as a new immutable Refiner release. Activation is explicit; normal Harness refinement never calls this tool.",parameters:{type:"object",additionalProperties:!1,properties:{profile:{type:"object",additionalProperties:!1,properties:{schemaVersion:{type:"string",const:"openpond.refinerReviewProfile.v1"},id:{type:"string",minLength:1,maxLength:120},version:{type:"string",minLength:1,maxLength:120},name:{type:"string",minLength:1,maxLength:200},objective:{type:"string",minLength:1,maxLength:1e4},instructions:{type:"array",maxItems:100,items:{type:"object",additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:120},text:{type:"string",minLength:1,maxLength:1e4}},required:["id","text"]}},allowedProposalRoutes:{type:"array",items:{type:"string",enum:["memory","prompt","skill","agent"]},maxItems:4},allowedExternalRoutes:{type:"array",items:{type:"string",enum:["runtime","product","taskset","training"]},maxItems:4}},required:["schemaVersion","id","version","name","objective","instructions","allowedProposalRoutes","allowedExternalRoutes"]},activate:{type:"boolean"},reason:{type:"string",minLength:1,maxLength:1e4}},required:["profile","activate","reason"]},execute:n(async t=>{let r=await ee("openpond-refiner-authoring");return I(t.callId,"refiner_profile_update",await(await import("./refiner-profile-service-BJMOYKTC.js")).updateRefinerProfile(e.storeDir,{profile:t.args.profile,activate:t.args.activate,reason:te(t.args.reason,1e4),actor:`work:${t.session.id}`,authoringSkillHash:r.sourceHash}))},"execute")},{name:"memory_search",description:"Search bounded active Personal Harness memory without loading the full memory corpus into context. Returns ranked stable memory keys and excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=te(t.args.query,500).toLowerCase(),p=[...new Set(s.split(/[^a-z0-9]+/).filter(l=>l.length>1))],h=typeof t.args.limit=="number"?Math.max(1,Math.min(20,Math.trunc(t.args.limit))):8,v=(await e.store.listHarnessMemories(r.workspace.id)).map(l=>{let d=`${l.key} ${l.tags.join(" ")} ${l.content}`.toLowerCase(),f=p.reduce((a,u)=>a+(d.includes(u)?1:0),0);return{entry:l,score:f}}).filter(({score:l})=>p.length===0||l>0).sort((l,d)=>d.score-l.score||d.entry.updatedAt.localeCompare(l.entry.updatedAt)).slice(0,h).map(({entry:l,score:d})=>({key:l.key,revision:l.revision,score:d,excerpt:l.content.slice(0,1e3),tags:l.tags,updatedAt:l.updatedAt}));return I(t.callId,"memory_search",{query:s,matches:v})},"execute")},{name:"memory_inspect",description:"Read one exact active Personal Harness memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=te(t.args.key,120).toLowerCase(),p=await e.store.getHarnessMemory(r.workspace.id,s);if(!p||p.status!=="active")throw new Error(`Harness memory does not exist: ${s}.`);return I(t.callId,"memory_inspect",p)},"execute")},{name:"context_read",description:"Read a bounded slice of the current Agent run's canonical host-owned turns or runtime events. This never exposes other conversations or the whole history corpus.",parameters:{type:"object",additionalProperties:!1,properties:{scope:{type:"string",enum:["turns","events"]},limit:{type:"integer",minimum:1,maximum:50}},required:["scope"]},execute:n(async t=>{let r=typeof t.args.limit=="number"?Math.max(1,Math.min(50,Math.trunc(t.args.limit))):12;if(t.args.scope==="turns"){let s=await e.store.turnsForSession(t.session.id,r);return I(t.callId,"context_read",{scope:"turns",values:s.map(p=>Ot(p,6e3))})}if(t.args.scope==="events"){let s=await e.store.runtimeEventsForSession(t.session.id,{limit:r});return I(t.callId,"context_read",{scope:"events",values:s.map(p=>Ot(p,6e3))})}throw new Error("context_read scope must be turns or events.")},"execute")},{name:"harness_inspect",description:"Inspect the immutable Harness release pinned to this Agent run. With no path, returns its release, overlay, and component catalog. With a policy-visible text path, returns bounded exact source content.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,description:"Optional exact Harness-relative source path from the returned catalog."}}},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness release is selected for this run.");let s=await e.store.getHarnessRunOverlay(t.session.id),p=N.join(r.release.bundlePath,"source"),h=qe.parse(JSON.parse(await Ct.readFile(N.join(p,"harness.json"),"utf8"))),w=typeof t.args.path=="string"?t.args.path.trim().replaceAll("\\","/"):null,v=null;if(w){let l=h.files.find(f=>f.path===w);if(!l||l.visibility!=="policy")throw new Error(`Harness source is not policy-visible or declared: ${w}`);if(!l.mediaType.startsWith("text/")&&l.mediaType!=="application/json")throw new Error(`Harness source is not inspectable text: ${w}`);let d=await Ct.readFile(pr(p,w),"utf8");v={path:w,content:d.slice(0,Ht),truncated:d.length>Ht}}return I(t.callId,"harness_inspect",{workspace:{id:r.workspace.id,name:r.workspace.name,revision:r.workspace.revision,channel:r.workspace.currentChannel},pinnedRelease:{id:r.release.harnessRelease.id,contentHash:r.release.harnessRelease.contentHash,sourceRevision:r.release.sourceRevision},overlay:s?{id:s.id,revision:s.revision,status:s.status,contentHash:s.contentHash}:null,components:h.files.filter(l=>l.visibility==="policy").map(l=>({kind:l.kind,path:l.path,portability:l.portability})),source:v})},"execute")},{name:"skill_inspect",description:"Read one exact textual Skill from the immutable Harness release pinned to this run. Use this before asking the Refiner to update an existing Skill.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,description:"Exact Skill name from harness_inspect."}},required:["name"]},execute:n(async t=>{let r=await M(e.store,t.session.id),s=typeof t.args.name=="string"?t.args.name.trim():"";if(!r?.skillRuntime.readSkill||!s)throw new Error("A valid Skill name and a selected Local Harness are required.");return I(t.callId,"skill_inspect",await r.skillRuntime.readSkill(s))},"execute")},{name:"refine_request",description:"Mark a concrete reusable lesson from the current turn for bounded Harness refinement at the next safe tool boundary. Immediate task recovery remains your responsibility. Do not call for one-off errors or transient facts.",parameters:{type:"object",additionalProperties:!1,properties:{summary:{type:"string",minLength:1,maxLength:2e3},suggestedRoute:{type:"string",enum:["runtime","memory","prompt","skill","agent","product","taskset","training"]}},required:["summary"]},execute:n(async t=>I(t.callId,"refine_request",{queuedAtBoundary:!0,summary:te(t.args.summary,2e3),suggestedRoute:typeof t.args.suggestedRoute=="string"?t.args.suggestedRoute:null}),"execute")},{name:"refine_status",description:"Inspect bounded Refiner trigger, proposal, route, validation, and outcome status for this Agent run.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=n(async i=>e.store.listHarnessImprovementArtifacts(r.workspace.id,i,200),"all"),p=(await s("trigger_decision")).filter(i=>i.schemaVersion==="openpond.refinementTriggerDecision.v1").filter(i=>i.runRef===t.session.id),h=new Set(p.map(i=>U(i))),w=n(i=>h.has(U(fe(i.trigger))),"relatedToTrigger"),v=(await s("route_decision")).filter(i=>i.schemaVersion==="openpond.improvementRouteDecision.v1").filter(w),l=(await s("refiner_outcome")).filter(i=>i.schemaVersion==="openpond.harnessRefinerOutcome.v1").filter(w),d=new Set(l.flatMap(i=>{let c=fe(i.proposal);return c.id&&c.contentHash?[U(c)]:[]})),f=(await s("proposal")).filter(i=>i.schemaVersion==="openpond.harnessImprovementProposal.v1").filter(i=>d.has(U(i))),a=n(i=>d.has(U(fe(i.proposal))),"relatedToProposal"),u=[{kind:"trigger_decision",values:p},{kind:"route_decision",values:v},{kind:"proposal",values:f},{kind:"targeted_validation",values:(await s("targeted_validation")).filter(a)},{kind:"apply_receipt",values:(await s("apply_receipt")).filter(a)},{kind:"refiner_outcome",values:l}];return I(t.callId,"refine_status",{runId:t.session.id,artifacts:u})},"execute")}]}n(Wt,"createLocalHarnessModelToolDefinitions");function U(e){return`${String(e.id??"")}:${String(e.contentHash??"")}`}n(U,"artifactRefKey");function fe(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}n(fe,"asRecord");function I(e,t,r){return{toolCallId:e,name:t,ok:!0,contentText:JSON.stringify(r),data:r}}n(I,"modelResult");function te(e,t){if(typeof e!="string"||!e.trim())throw new Error("A non-empty refinement summary is required.");return e.trim().slice(0,t)}n(te,"boundedText");function Ot(e,t){let r=JSON.stringify(e);return r.length<=t?e:{truncated:!0,json:r.slice(0,t)}}n(Ot,"boundedJson");function pr(e,t){let r=N.resolve(e),s=N.resolve(r,...t.split("/")),p=N.relative(r,s);if(!p||p.startsWith("..")||N.isAbsolute(p))throw new Error(`Harness source path escapes its release: ${t}`);return s}n(pr,"containedSourcePath");function Lt(){return{loadOpenPondProfileStateForRef:ie,executeProfileSkillCommand:n(({prompt:e,profileRef:t})=>kt(e,{loadProfileState:n(()=>ie(t),"loadProfileState")}),"executeProfileSkillCommand")}}n(Lt,"createProfileTurnDependencies");import{randomUUID as mr}from"node:crypto";import{setTimeout as fr}from"node:timers/promises";async function Dt(e,t){if(t.metadata?.titleSource||t.archived||t.hiddenFromDefaultSidebar)return t;let s=(await e.runtimeEventsForSession(t.id,{names:["session.title.updated"]})).at(-1)?.data,p=s?.session;if(s?.titleSource!=="fallback"||p?.title!==t.title)return t;let[h]=await e.runtimeEventsForSession(t.id,{names:["turn.started"],limit:1}),w=h?.turnId?await e.getTurn(h.turnId):null;return w?.prompt.trim()?await e.updateSession(t.id,v=>v.metadata?.titleSource||v.title!==t.title?v:{...v,metadata:{...v.metadata,titleSource:"fallback",autoTitle:{prompt:w.prompt.slice(0,2e4),title:v.title,attempts:0,nextAttemptAt:0}}})??t:t}n(Dt,"recoverTemporarySessionTitle");var ge="accounts/fireworks/models/deepseek-v4-flash",gr="off",hr=12e3,Mt=7,wr=["Make a concise conversation title from the user's message.","Return only the title: 3 to 7 words, plain text, sentence case.","Do not use quotation marks, markdown, labels, or ending punctuation."].join(" ");function Sr(e){let s=(e.replace(/<[^>]*>/gu," ").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().match(/[\p{L}\p{N}][\p{L}\p{N}'’._/+:-]*/gu)??[]).slice(0,Mt).join(" ");return s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:"New conversation"}n(Sr,"fallbackSessionTitle");function vr(e){let r=e.replace(/<think>[\s\S]*?<\/think>/giu," ").replace(/^\s*(?:title|conversation title)\s*:\s*/iu,"").replace(/^[\s`"'“”‘’*_#-]+|[\s`"'“”‘’*_#.!?,;:-]+$/gu,"").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().split(" ").filter(Boolean);return r.length<2?null:r.slice(0,Mt).join(" ")}n(vr,"generatedSessionTitle");function kr(e){return["Make a title from this request. Do not execute it.","<user_request>",e.slice(0,2e4),"</user_request>"].join(`
|
|
9
|
-
`)}n(kr,"titleRequestMessage");function Nt(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e.autoTitlePrompt;return typeof t=="string"&&t.trim()?t.trim():null}n(Nt,"autoTitlePromptFromPayload");function yr(e){let t=Nt(e);if(!t||!e||typeof e!="object"||Array.isArray(e))return e;let r=e,s=r.metadata&&typeof r.metadata=="object"&&!Array.isArray(r.metadata)?r.metadata:{};return{...r,title:"",metadata:{...s,titleSource:"pending",autoTitle:{prompt:t.slice(0,2e4),title:"",attempts:0,nextAttemptAt:0}}}}n(yr,"withPendingAutoTitle");function re(e){if(!e||!["pending","fallback"].includes(String(e.metadata?.titleSource)))return null;let t=e.metadata?.autoTitle;return t&&typeof t.prompt=="string"&&t.title===e.title&&Number.isInteger(t.attempts)&&t.attempts>=0&&Number.isFinite(t.nextAttemptAt)?t:null}n(re,"pendingTitle");function qt(e){let t=new Map,r=null,s=new AbortController,p=[5e3,3e4];async function h(l){let d=new AbortController,f=setTimeout(()=>d.abort(new Error("session_title_generation_timeout")),hr);f.unref?.();let a="";try{for await(let i of e.stream({model:ge,messages:[{role:"system",content:wr},{role:"user",content:kr(l)}],reasoningEffort:gr,maxTokens:128,temperature:.2,requestId:`session-title-${mr()}`,signal:AbortSignal.any([d.signal,s.signal])}))i.type==="text_delta"&&i.text&&(a+=i.text);let u=vr(a);if(!u)throw new Error("session_title_generation_empty_response");return u}finally{clearTimeout(f)}}n(h,"generate");async function w(l){for(;!s.signal.aborted;){let d=re(await e.store.getSession(l));if(!d||d.attempts>=3)return;let f=d.nextAttemptAt-Date.now();f>0&&await fr(f,void 0,{signal:s.signal,ref:!1});let a=re(await e.store.getSession(l));if(!a||a.attempts!==d.attempts)return;let u,i="model";try{u=await h(d.prompt)}catch(k){if(s.signal.aborted)return;u=Sr(d.prompt),i="fallback",e.logger.warn("session title generation used temporary title",{error:k instanceof Error?k.message:String(k),model:ge,sessionId:l,attempt:d.attempts+1})}if(s.signal.aborted)return;let c=!1,g=await e.store.updateSession(l,k=>{let y=re(k);return!y||y.attempts!==d.attempts||y.prompt!==d.prompt?k:(c=!0,{...k,title:u,metadata:{...k.metadata,titleSource:i,autoTitle:i==="model"?null:{...d,title:u,attempts:d.attempts+1,nextAttemptAt:Date.now()+(p[d.attempts]??0)}}})});if(!c||!g||(await e.appendRuntimeEvent(X({sessionId:l,name:"session.title.updated",source:"server",status:"completed",data:{session:g,model:ge,titleSource:i}})),i==="model"))return}}n(w,"run");function v(l){if(s.signal.aborted)return Promise.resolve();let d=t.get(l);if(d)return d;let f=w(l).catch(a=>{s.signal.aborted||e.logger.warn("session title generation failed",{error:a instanceof Error?a.message:String(a),sessionId:l})}).finally(()=>t.delete(l));return t.set(l,f),f}return n(v,"schedule"),{wrapCreateSession(l){return this.recover().catch(d=>e.logger.warn("Session title recovery failed",{error:String(d)})),async d=>{let f=await l(yr(d));return Nt(d)&&v(f.id),f}},schedule:v,recover(){return r||(r=(async()=>{for(let l of await e.store.sessionShells()){if(s.signal.aborted)return;let d=await Dt(e.store,l);re(d)&&v(l.id)}})().finally(()=>{r=null}),r)},async close(){s.abort(),await r?.catch(()=>{}),await Promise.allSettled(t.values())}}}n(qt,"createSessionTitleService");var Er=3,Tr=["sqlite_store","runtime_event_bus","session_store","hosted_provider","web_search","connected_apps","workspace_tools","command_approvals","harness","refiner","agent_runtime","jsonl_transport"];async function gn(e={}){if(e.runtimeStorage)return(await import("./hosted-app-server-composition-PGKQNDW6.js")).createHostedOwnedAppServer({...e,runtimeStorage:e.runtimeStorage});let t=q.resolve(e.storeDir??de());return je(t,()=>Ar({...e,storeDir:t}))}n(gn,"createOpenPondAppServer");async function Ar(e){let t=q.resolve(e.storeDir??de()),r=!!e.embedding;if(r&&!e.streamOpenPondHostedChatTurn)throw new Error("Embedded Work requires an explicit model-stream adapter.");let s=e.services??{},p=await $(s.webSearch,r,async()=>(await import("./web-search-7FBUBZ66.js")).createWebSearchExecutorFromEnv()),h=await $(s.scheduling,r,async()=>(await import("./saved-work-KUNVTJ7O.js")).createHostedSavedWork),w=await $(s.connectedApps,r,async()=>{let[o,m]=await Promise.all([import("./connected-app-executor-6G2LA3PQ.js"),import("./app-server-connected-apps-RM5E2VWF.js")]);return{execute:o.createCloudConnectedAppToolExecutor(),list:m.listAppServerIntegrationConnections}}),v=await $(s.tasksets,r,async()=>(await import("./hosted-tasksets-WGXGXJ7E.js")).executeHostedTasksetAction),l=s.backgroundReview??!r,d=!r&&!!v;await _e(t),l&&await(await import("./refiner-profile-service-BJMOYKTC.js")).initializeRefinerProfile(t);let f=q.resolve(e.workspaceDir??process.cwd());await Rr(f,{recursive:!0});let a=e.version??Fe,u=Ue(),i=Ve({channel:"app-server",logDir:q.join(t,"logs"),metadata:{version:a,runtimeVersion:u,placement:"hosted_work"}});D(()=>i.flush());let c=new pt(t,{logger:i});D(()=>c.close()),await c.recentTurns(1);let g=c,k=n(async()=>(await Ce(t)).preferences,"loadRuntimePreferences"),y=vt(t);(y.recovered||y.needsReview)&&i.warn("Scheduled work requires review after restart",y);let S=nt(e.streamOpenPondHostedChatTurn??Be,{enabled:ot()}),b=yt(S),{appendRuntimeEvent:P,closeEventSubscribers:jt,subscribeRuntimeEvents:Ft}=it({logger:i,store:g}),he=Y({queueId:"turn-follow-up",logger:i}),we=Y({queueId:"harness-refiner",logger:i}),Se=Y({queueId:"subagent",logger:i});if(e.harness&&e.profileSource)throw new Error("Configure either an explicit Harness source or Profile source for this app-server.");let A=null,z,oe;if(e.experimentHarnessSource){if(!e.experimentPolicyClient||e.profileSource||e.harness||e.runtimeStorage)throw new Error("A published standalone Experiment source requires its isolated policy owner and local case store.");let o=e.experimentHarnessSource.sourcePackage;z=await(await import("./published-experiment-source-GZGN354O.js")).installPublishedExperimentSource({store:c,storeDir:t,ownerId:e.experimentHarnessSource.ownerId,sourcePackage:o,reference:{harnessRelease:{id:o.harnessRelease.id,contentHash:o.harnessRelease.contentHash},agentSnapshot:{id:o.agentSnapshot.id,contentHash:o.agentSnapshot.contentHash},sourcePackageHash:o.contentHash},createdAt:T()})}if(e.profileSource){let o=e.profileSource;if(!o.repositoryId.trim()||!o.profileId.trim()||!o.sourceRevision.trim())throw new Error("Explicit Profile source requires an identity and accepted revision.");let m=await Le({repoPath:o.repoPath,profileId:o.profileId});if(m.mode!=="local"||!m.sourcePath||m.error||m.git?.isRepo&&(m.git.head!==o.sourceRevision||m.git.dirty))throw new Error("Explicit Profile source does not match its accepted revision.");A=await Je({store:c,storeDir:t,workspaceId:`${Xe}${H({profileId:o.profileId,sourceRevision:o.sourceRevision}).slice(0,24)}`,ownerId:"desktop-personal",name:o.profileId,profile:m,sourceRevision:o.sourceRevision,repositoryId:o.repositoryId})}e.harness&&(await Ke({store:c,storeDir:t,sourceDir:e.harness.sourceDirectory,id:e.harness.workspaceId,name:e.harness.name,ownerId:"desktop-personal"}),await c.selectHarnessWorkspace({ownerKind:"personal",ownerId:"desktop-personal",workspaceId:e.harness.workspaceId,updatedAt:T()})),await Ge({store:c,storeDir:t,loadProfileState:L,now:T}).catch(o=>{i.warn("app-server Harness initialization failed",{error:o})});let V=rt({appendRuntimeEvent:P,findLocalProject:n(o=>lt(c,o),"findLocalProject"),onRepositoryInstructionDiagnostic:n((o,m)=>{i.warn("repository instruction file skipped",{diagnostic:o,sessionId:m.id})},"onRepositoryInstructionDiagnostic")}),{createSession:j,getSession:C,updateSession:K,completeTurn:Bt,failTurn:Ut,interruptTurn:$t}=dt({store:g,defaultSessionCwd:n(()=>f,"defaultSessionCwd"),appendRuntimeEvent:P,loadAppPreferences:k,loadLastUsedProfile:n(async()=>(await B()).lastUsed,"loadLastUsedProfile")}),ve=qt({appendRuntimeEvent:P,store:g,logger:i,stream:S}),ke=r?j:ve.wrapCreateSession(j),J=at({workspaceDir:f,logger:i,getSession:C,updateSession:K,appendRuntimeEvent:P,sandboxRequest:e.sandboxRequest??(r?async()=>{throw new Error("Sandbox execution is not configured in this app-server deployment.")}:void 0)}),zt=d?await(await import("./local-harness-taskset-review-KS4WPMN6.js")).createLocalHarnessTasksetReviewControl({store:c,storeDir:t,evaluationRuntime:{streamOpenPondHostedChatTurn:S,workRuntime:{createSession:j,getSession:C,executeWorkspaceTool:J.executeWorkspaceTool,runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession")},resolveReleasedHarness:n(async()=>{let o=await Qe(c);return o?{agentSnapshot:o.release.agentSnapshot,harnessRelease:o.release.harnessRelease,instructionContext:o.instructionContext}:null},"resolveReleasedHarness")}}):void 0,ye=n(async o=>{await g.upsertApproval(o)},"upsertApproval"),Pe=et({upsertApproval:ye,appendRuntimeEvent:P}),Vt=await $(s.projectActions,r,async()=>(await import("./project-action-payload-QA24HYGF.js")).createProjectActionRunPayload({appendRuntimeEvent:P,resolveProjectRoot:n(async()=>null,"resolveProjectRoot")})),Kt=n(async o=>{try{await g.upsertModelUsageRecord(o)}catch(m){await P(br(o,m)).catch(()=>{})}},"safeUpsertModelUsageRecord"),Re=l?(await import("./local-harness-improvement-runtime-QGWFWNSR.js")).createLocalHarnessImprovementRuntime({store:c,storeDir:t,queue:we,streamOpenPondHostedChatTurn:S,appendRuntimeEvent:P,upsertModelUsageRecord:Kt}):void 0;await Re?.reconcilePending();let ne=e.profileExternalDataset?await(A&&e.profileExternalDatasetClient?(await import("./host-profile-external-dataset-FRIGXOO7.js")).createHostProfileExternalDataset({value:e.profileExternalDataset,release:A,sourceRevision:e.profileSource.sourceRevision,client:e.profileExternalDatasetClient}):Promise.reject(new Error("External Dataset execution requires an explicit private Profile source owner."))):null,Jt=$e({deviceId:`evaluation-${H(t).slice(0,24)}`,storeDir:t,runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession")}),_=A?(await import("./host-profile-evaluation-tools-Y2LQ4WQN.js")).createHostProfileEvaluationTools({storeDir:t,release:A,getTurn:n(o=>g.getTurn(o),"getTurn"),getSession:C,saveOutput:Jt.saveOwnedOutputBytes,recordOutput:n(async(o,m,E)=>{await P({id:Pr(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:o,turnId:m,action:"work_output_save",status:"completed",output:`Saved ${E.outputRef.title} as immutable case output.`,data:E})},"recordOutput"),authorize:n(async o=>{if(ne){await ne.authorize(o);return}let m=await Te();if(!m||m.ref.profileId!==e.profileSource?.profileId||m.sourceRevision!==e.profileSource?.sourceRevision)throw new Error("The released evaluation source authority changed.");let E=await c.getHarnessReleaseRecord(A.harnessRelease.contentHash);if(!E||E.harnessRelease.contentHash!==A.harnessRelease.contentHash)throw new Error("The isolated evaluation release is unavailable.")},"authorize")}):null,G=e.embedding?gt(e.embedding,async(o,m)=>{let E=await g.getTurn(o);if(!E)throw new Error("Embedded turn is unavailable.");let O=await C(E.sessionId),F=O.metadata?.embeddingToolBindings,W=[...m].sort((Q,Zt)=>Q.name.localeCompare(Zt.name));if(F!==void 0&&H(F)!==H(W))throw new Error("Embedded tool bindings changed; start a new thread.");await K(O.id,{metadata:{...O.metadata,embeddingToolBindings:W}}),await g.updateTurn(o,Q=>({...Q,metadata:{...Q.metadata,toolBindings:W}}))}):void 0,R=ut({executionHost:r?"embedded":"local",storageHome:t,workInputsForSession:e.workInputsForSession,finalizeWorkTurn:e.finalizeWorkTurn,isolatedProfileEvaluationForTurn:_?async o=>{if(o.metadata?.profileEvaluationRun===void 0)return!1;if(!_.ownsSession(o.id))throw new Error("A Profile evaluation target has no actual admitted case owner.");return!0}:void 0,executeProfileEvaluationAction:_?.executeAction,resolveModelTools:e.resolveModelTools||_||G?async o=>{let m=_?_.ownsSession(o.session.id)?await _.resolveTools(o):await G?.(o)??[]:G?await G(o):o.tools;return e.resolveModelTools?e.resolveModelTools({...o,tools:m}):m}:void 0,...r?{hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1}}:{},attachmentRootDir:q.join(t,"attachments"),store:g,inboxStore:c,createSession:j,upsertApproval:ye,getSession:C,updateSession:K,completeTurn:Bt,failTurn:Ut,interruptTurn:$t,defaultSessionCwd:n(()=>f,"defaultSessionCwd"),findOpenPondApp:n(async o=>xr(o,f),"findOpenPondApp"),resolveSessionWorkspaceCwd:n(async o=>o.cwd?.trim()||f,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:n(async()=>{throw new Error("The hosted app-server placement uses the OpenPond provider; Codex process hosting is not configured.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:J.appendWorkspaceDiffEvent,workspaceDiffBaseline:J.workspaceDiffBaseline,appendRuntimeEvent:P,processHarnessImprovementBoundary:Re,executeWorkspaceTool:J.executeWorkspaceTool,executeOpenPondCommand:Pe.executeCommand,executeProjectAction:Vt,executeDatasetBuilderAction:v,loadOpenPondProfileState:L,...Lt(),...r||s.profileActions===!1?{executeProfileSkillCommand:void 0}:{},loadOpenPondProfileLibrary:B,readOpenPondProfileSkill:We,loadSelectedHarnessRuntime:n(o=>ce(c,o),"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:n(o=>ue({store:c,...o}),"ensureHarnessRunOverlay"),harnessModelTools:Wt({store:c,storeDir:t}).filter(o=>l||!["refiner_profile_inspect","refiner_profile_update","refine_request","refine_status"].includes(o.name)),loadBuiltInOpenPondSkills:n(async()=>[await mt(),...await xt()],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:n(async o=>{if(o==="openpond-taskset-authoring")return ft();if(At(o))return bt(o);throw new Error(`Built-in OpenPond skill not found: ${o}`)},"readBuiltInOpenPondSkill"),executeWebSearch:p,createScheduledWork:h,executeConnectedAppTool:w?.execute,listIntegrationConnections:w?.list,loadPersonalizationSoul:n(async()=>(await tt(c,t)).soul,"loadPersonalizationSoul"),loadAppPreferences:k,maybeCreateScaffoldForTurn:V.maybeCreateScaffoldForTurn,hostedSystemPrompt:V.hostedSystemPrompt,appendAssistantText:V.appendAssistantText,appendHostedContextUsage:V.appendHostedContextUsage,streamOpenPondHostedChatTurn:S,turnFollowUpQueue:he,resolveSessionModelStream:ht(async(o,m)=>await oe?.resolveSessionModelStream(o,m)??await e.resolveSessionModelStream?.(o,m)??null),subagentQueue:Se,maxHostedWorkspaceToolRounds:e.experimentHarnessSource?(await import("./experiments-CLXGM3TZ.js")).STANDALONE_EXPERIMENT_MAX_POLICY_CALLS:ct(e.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:Er});D(()=>R.close()),await R.recoverPendingSubagentCompletions(),await R.recoverTaskInbox();async function Gt(o,m){let E=await R.resolveNativeAgentApproval(o,m);if(E)return E;let O=await Pe.resolveApproval(o,m);if(O)return O;let F=await R.resolveCreateImproveApproval(o,m);if(F)return F;let W=await R.resolveSubagentPatchApplyApproval(o,m);if(W)return W;throw new Error(`Approval not found: ${o}`)}n(Gt,"resolveApproval");let Ee=!1,Te=n(async()=>{if(e.profileSource)return{ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision};let[o,m]=await Promise.all([B(),L()]);return o.lastUsed&&m.git?.head&&!m.git.dirty?{ref:o.lastUsed,sourceRevision:m.git.head}:null},"selectedEvaluationProfile"),Ae=n(async()=>{if(e.profileSource&&A)return Ze({store:c,release:A,ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision});let[o,m]=await Promise.all([B(),L()]);if(!o.lastUsed)throw new Error("Select a Profile before loading its workflows.");return Ye({store:c,storeDir:t,ref:o.lastUsed,profile:m,reloadProfile:L})},"listProfileWorkflows");if(z){let o=z;oe=(await import("./standalone-experiment-turn-owner-XIE46VNH.js")).createStandaloneExperimentTurnOwner({store:c,createSession:j,sendTurn:R.sendTurn,interruptSessionTurn:R.interruptSessionTurn,authorizeWorkspace:n(async(m,E)=>{if(E.id!==o.workspace.id||H(E.ownerScope)!==H(o.workspace.ownerScope)||m.sourcePackageHash!==o.workspace.metadata.experimentSourcePackageHash||m.harnessRelease.id!==o.release.harnessRelease.id||m.harnessRelease.contentHash!==o.release.harnessRelease.contentHash)throw new Error("Standalone Experiment source differs from this execution owner's admitted closure.")},"authorizeWorkspace")})}let se=le(async()=>{let{createAppServerEvaluations:o}=await import("./app-server-evaluations-XGMGS67X.js");return o({options:e,store:c,storeDir:t,explicitProfileRelease:A,externalDataset:ne,isolatedProfileTools:_,selectedEvaluationProfile:Te,listProfileWorkflows:Ae,createSessionWithAutoTitle:ke,turnRunner:R,streamOpenPondHostedChatTurn:S,publishedExperimentSource:z,standaloneExperimentOwner:oe})}),Qt=se.methods(["listProfileEvaluations","executeProfileEvaluationCase","executeExperimentCase","cancelExperimentCase","executeProfileEvaluationRun","prepareProfileEvaluationRun","runPreparedProfileEvaluation","runProfileEvaluationSuite","compareProfileEvaluationRuns","buildProfileEvaluationReport"]);D(()=>se.close());let ae=le(async()=>{let{createAppServerHarnessServices:o}=await import("./app-server-harness-services-BHD6S5II.js");return o({store:c,storeDir:t,backgroundReview:l,harnessEvaluationEnabled:d,harnessEvaluationReviewStream:b,harnessTasksetReview:zt})}),Xt=ae.methods(["inspectHarness","reviewHarnessProposal","reviewHarness","acceptHarnessEvaluationReview","materializeHarnessEvaluationTaskset","runHarnessEvaluationBaseline","validateHarness","updateHarnessBackgroundReview","diffHarness","rollbackHarness","inspectRefiner","updateRefiner","activateRefiner","rollbackRefiner"]);D(()=>ae.close());let Yt=ze({ports:st({placement:"hosted_work",connectedAppProviders:w?void 0:[],featureOverrides:{harnessBackgroundReview:l,harnessProposalReview:l,harnessReview:d,harnessEvaluationReview:d,harnessEvaluationReviewAcceptance:d,harnessEvaluationTasksetMaterialization:d,harnessEvaluationBaseline:d,refinerProfiles:l,immutableRefinerAdmission:l},createSession:ke,getSession:C,turnsForSession:n(o=>g.turnsForSession(o,1e3),"turnsForSession"),runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession"),sendTurn:R.sendTurn,steerSessionTurn:R.steerSessionTurn,readTaskInbox:R.readTaskInbox,queueTaskInput:R.queueTaskInput,updateTaskInput:R.updateTaskInput,isSessionTurnActive:R.isSessionTurnActive,waitForSessionTurnSettlement:R.waitForSessionTurnSettlement,interruptSessionTurn:R.interruptSessionTurn,resolveApproval:Gt,listProfileWorkflows:Ae,loadProfileTrainingSource:n(async()=>{if(!e.profileSource||!A)throw new Error("An explicit published Profile is required for hosted training source export.");return(await import("./profile-training-source-3DXFM2XI.js")).profileTrainingSource({release:A,storeDir:t})},"loadProfileTrainingSource"),...Qt,...Xt,subscribeRuntimeEvents:Ft,observeRuntimeOperation:n(o=>{i.info("agent runtime operation",o)},"observeRuntimeOperation")}),close:n(async()=>{Ee||(Ee=!0,await ve.close(),await Promise.all([se.close(),ae.close(),R.close()]),_?.close(),await Promise.all([he.drain(),we.drain(),Se.drain()]),await jt(),await c.close(),await i.flush())},"close")}),xe=Tr.filter(o=>(o!=="web_search"||!!p)&&(o!=="connected_apps"||!!w)&&(o!=="refiner"||l));return i.info("app-server ready",{storePath:c.storePath,workspaceDir:f,composition:xe}),{...Yt,updateSession:K,pinSessionHarness:n(async o=>{let m=await ce(c,await C(o));if(!m)return null;let E={id:m.release.harnessRelease.id,contentHash:m.release.harnessRelease.contentHash};return await ue({store:c,runId:o,workspace:m.workspace,harnessRelease:E,admittedAt:T()}),E},"pinSessionHarness"),storePath:c.storePath,workspaceDir:f,composition:xe}}n(Ar,"createOwnedAppServer");function xr(e,t){return{id:e||De(t),name:q.basename(t)||"Sandbox workspace",description:null,visibility:"private",gitOwner:null,gitRepo:null,gitHost:null,defaultBranch:null,sandbox:!1,updatedAt:T(),latestDeployment:null}}n(xr,"workspaceApp");function br(e,t){return X({sessionId:e.sessionId??void 0,turnId:e.turnId??void 0,name:"diagnostic",source:"server",status:"failed",output:t instanceof Error?t.message:"Failed to persist model usage record.",data:{kind:"model_usage_record_failed",requestId:e.requestId,provider:e.provider,model:e.model}})}n(br,"runtimeDiagnostic");async function $(e,t,r){if(e!==!1)return e!==void 0?e:t?void 0:r()}n($,"selectService");export{ht as a,Wr as b,vt as c,yt as d,At as e,xt as f,ee as g,bt as h,Wt as i,Lt as j,qt as k,Tr as l,gn as m};
|
|
8
|
+
`)}n(It,"loadBundledAuthoringSkillBundle");async function _t(e,t=process.cwd(),r=process.execPath){let s=[x.resolve(t,"apps","cli","skills",e),x.resolve(t,"dist","skills",e),x.resolve(x.dirname(r),"skills",e),x.resolve(Et,"skills",e),x.resolve(Et,"..","skills",e)];for(let p of s)if(await cr(x.join(p,"SKILL.md")).then(()=>!0,()=>!1))return p;throw new Error(`Bundled OpenPond authoring skill ${e} was not found. Checked: ${s.join(", ")}`)}n(_t,"resolveBundledAuthoringSkillRoot");var Ht=24e3;function Wt(e){return[{name:"refiner_profile_inspect",description:"Inspect the separately versioned active Refiner Review Profile, its immutable release identity, and recent transitions. Use before editing Refiner behavior.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:n(async t=>I(t.callId,"refiner_profile_inspect",await(await import("./refiner-profile-service-PPGGNVOV.js")).inspectRefinerProfile(e.storeDir)),"execute")},{name:"refiner_profile_update",description:"Validate and write a complete JSON Refiner Review Profile as a new immutable Refiner release. Activation is explicit; normal Harness refinement never calls this tool.",parameters:{type:"object",additionalProperties:!1,properties:{profile:{type:"object",additionalProperties:!1,properties:{schemaVersion:{type:"string",const:"openpond.refinerReviewProfile.v1"},id:{type:"string",minLength:1,maxLength:120},version:{type:"string",minLength:1,maxLength:120},name:{type:"string",minLength:1,maxLength:200},objective:{type:"string",minLength:1,maxLength:1e4},instructions:{type:"array",maxItems:100,items:{type:"object",additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:120},text:{type:"string",minLength:1,maxLength:1e4}},required:["id","text"]}},allowedProposalRoutes:{type:"array",items:{type:"string",enum:["memory","prompt","skill","agent"]},maxItems:4},allowedExternalRoutes:{type:"array",items:{type:"string",enum:["runtime","product","taskset","training"]},maxItems:4}},required:["schemaVersion","id","version","name","objective","instructions","allowedProposalRoutes","allowedExternalRoutes"]},activate:{type:"boolean"},reason:{type:"string",minLength:1,maxLength:1e4}},required:["profile","activate","reason"]},execute:n(async t=>{let r=await ee("openpond-refiner-authoring");return I(t.callId,"refiner_profile_update",await(await import("./refiner-profile-service-PPGGNVOV.js")).updateRefinerProfile(e.storeDir,{profile:t.args.profile,activate:t.args.activate,reason:te(t.args.reason,1e4),actor:`work:${t.session.id}`,authoringSkillHash:r.sourceHash}))},"execute")},{name:"memory_search",description:"Search bounded active Personal Harness memory without loading the full memory corpus into context. Returns ranked stable memory keys and excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=te(t.args.query,500).toLowerCase(),p=[...new Set(s.split(/[^a-z0-9]+/).filter(l=>l.length>1))],h=typeof t.args.limit=="number"?Math.max(1,Math.min(20,Math.trunc(t.args.limit))):8,v=(await e.store.listHarnessMemories(r.workspace.id)).map(l=>{let d=`${l.key} ${l.tags.join(" ")} ${l.content}`.toLowerCase(),f=p.reduce((a,u)=>a+(d.includes(u)?1:0),0);return{entry:l,score:f}}).filter(({score:l})=>p.length===0||l>0).sort((l,d)=>d.score-l.score||d.entry.updatedAt.localeCompare(l.entry.updatedAt)).slice(0,h).map(({entry:l,score:d})=>({key:l.key,revision:l.revision,score:d,excerpt:l.content.slice(0,1e3),tags:l.tags,updatedAt:l.updatedAt}));return I(t.callId,"memory_search",{query:s,matches:v})},"execute")},{name:"memory_inspect",description:"Read one exact active Personal Harness memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=te(t.args.key,120).toLowerCase(),p=await e.store.getHarnessMemory(r.workspace.id,s);if(!p||p.status!=="active")throw new Error(`Harness memory does not exist: ${s}.`);return I(t.callId,"memory_inspect",p)},"execute")},{name:"context_read",description:"Read a bounded slice of the current Agent run's canonical host-owned turns or runtime events. This never exposes other conversations or the whole history corpus.",parameters:{type:"object",additionalProperties:!1,properties:{scope:{type:"string",enum:["turns","events"]},limit:{type:"integer",minimum:1,maximum:50}},required:["scope"]},execute:n(async t=>{let r=typeof t.args.limit=="number"?Math.max(1,Math.min(50,Math.trunc(t.args.limit))):12;if(t.args.scope==="turns"){let s=await e.store.turnsForSession(t.session.id,r);return I(t.callId,"context_read",{scope:"turns",values:s.map(p=>Ot(p,6e3))})}if(t.args.scope==="events"){let s=await e.store.runtimeEventsForSession(t.session.id,{limit:r});return I(t.callId,"context_read",{scope:"events",values:s.map(p=>Ot(p,6e3))})}throw new Error("context_read scope must be turns or events.")},"execute")},{name:"harness_inspect",description:"Inspect the immutable Harness release pinned to this Agent run. With no path, returns its release, overlay, and component catalog. With a policy-visible text path, returns bounded exact source content.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,description:"Optional exact Harness-relative source path from the returned catalog."}}},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness release is selected for this run.");let s=await e.store.getHarnessRunOverlay(t.session.id),p=N.join(r.release.bundlePath,"source"),h=je.parse(JSON.parse(await Ct.readFile(N.join(p,"harness.json"),"utf8"))),w=typeof t.args.path=="string"?t.args.path.trim().replaceAll("\\","/"):null,v=null;if(w){let l=h.files.find(f=>f.path===w);if(!l||l.visibility!=="policy")throw new Error(`Harness source is not policy-visible or declared: ${w}`);if(!l.mediaType.startsWith("text/")&&l.mediaType!=="application/json")throw new Error(`Harness source is not inspectable text: ${w}`);let d=await Ct.readFile(pr(p,w),"utf8");v={path:w,content:d.slice(0,Ht),truncated:d.length>Ht}}return I(t.callId,"harness_inspect",{workspace:{id:r.workspace.id,name:r.workspace.name,revision:r.workspace.revision,channel:r.workspace.currentChannel},pinnedRelease:{id:r.release.harnessRelease.id,contentHash:r.release.harnessRelease.contentHash,sourceRevision:r.release.sourceRevision},overlay:s?{id:s.id,revision:s.revision,status:s.status,contentHash:s.contentHash}:null,components:h.files.filter(l=>l.visibility==="policy").map(l=>({kind:l.kind,path:l.path,portability:l.portability})),source:v})},"execute")},{name:"skill_inspect",description:"Read one exact textual Skill from the immutable Harness release pinned to this run. Use this before asking the Refiner to update an existing Skill.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,description:"Exact Skill name from harness_inspect."}},required:["name"]},execute:n(async t=>{let r=await M(e.store,t.session.id),s=typeof t.args.name=="string"?t.args.name.trim():"";if(!r?.skillRuntime.readSkill||!s)throw new Error("A valid Skill name and a selected Local Harness are required.");return I(t.callId,"skill_inspect",await r.skillRuntime.readSkill(s))},"execute")},{name:"refine_request",description:"Mark a concrete reusable lesson from the current turn for bounded Harness refinement at the next safe tool boundary. Immediate task recovery remains your responsibility. Do not call for one-off errors or transient facts.",parameters:{type:"object",additionalProperties:!1,properties:{summary:{type:"string",minLength:1,maxLength:2e3},suggestedRoute:{type:"string",enum:["runtime","memory","prompt","skill","agent","product","taskset","training"]}},required:["summary"]},execute:n(async t=>I(t.callId,"refine_request",{queuedAtBoundary:!0,summary:te(t.args.summary,2e3),suggestedRoute:typeof t.args.suggestedRoute=="string"?t.args.suggestedRoute:null}),"execute")},{name:"refine_status",description:"Inspect bounded Refiner trigger, proposal, route, validation, and outcome status for this Agent run.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:n(async t=>{let r=await M(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let s=n(async i=>e.store.listHarnessImprovementArtifacts(r.workspace.id,i,200),"all"),p=(await s("trigger_decision")).filter(i=>i.schemaVersion==="openpond.refinementTriggerDecision.v1").filter(i=>i.runRef===t.session.id),h=new Set(p.map(i=>U(i))),w=n(i=>h.has(U(fe(i.trigger))),"relatedToTrigger"),v=(await s("route_decision")).filter(i=>i.schemaVersion==="openpond.improvementRouteDecision.v1").filter(w),l=(await s("refiner_outcome")).filter(i=>i.schemaVersion==="openpond.harnessRefinerOutcome.v1").filter(w),d=new Set(l.flatMap(i=>{let c=fe(i.proposal);return c.id&&c.contentHash?[U(c)]:[]})),f=(await s("proposal")).filter(i=>i.schemaVersion==="openpond.harnessImprovementProposal.v1").filter(i=>d.has(U(i))),a=n(i=>d.has(U(fe(i.proposal))),"relatedToProposal"),u=[{kind:"trigger_decision",values:p},{kind:"route_decision",values:v},{kind:"proposal",values:f},{kind:"targeted_validation",values:(await s("targeted_validation")).filter(a)},{kind:"apply_receipt",values:(await s("apply_receipt")).filter(a)},{kind:"refiner_outcome",values:l}];return I(t.callId,"refine_status",{runId:t.session.id,artifacts:u})},"execute")}]}n(Wt,"createLocalHarnessModelToolDefinitions");function U(e){return`${String(e.id??"")}:${String(e.contentHash??"")}`}n(U,"artifactRefKey");function fe(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}n(fe,"asRecord");function I(e,t,r){return{toolCallId:e,name:t,ok:!0,contentText:JSON.stringify(r),data:r}}n(I,"modelResult");function te(e,t){if(typeof e!="string"||!e.trim())throw new Error("A non-empty refinement summary is required.");return e.trim().slice(0,t)}n(te,"boundedText");function Ot(e,t){let r=JSON.stringify(e);return r.length<=t?e:{truncated:!0,json:r.slice(0,t)}}n(Ot,"boundedJson");function pr(e,t){let r=N.resolve(e),s=N.resolve(r,...t.split("/")),p=N.relative(r,s);if(!p||p.startsWith("..")||N.isAbsolute(p))throw new Error(`Harness source path escapes its release: ${t}`);return s}n(pr,"containedSourcePath");function Lt(){return{loadOpenPondProfileStateForRef:ie,executeProfileSkillCommand:n(({prompt:e,profileRef:t})=>kt(e,{loadProfileState:n(()=>ie(t),"loadProfileState")}),"executeProfileSkillCommand")}}n(Lt,"createProfileTurnDependencies");import{randomUUID as mr}from"node:crypto";import{setTimeout as fr}from"node:timers/promises";async function Dt(e,t){if(t.metadata?.titleSource||t.archived||t.hiddenFromDefaultSidebar)return t;let s=(await e.runtimeEventsForSession(t.id,{names:["session.title.updated"]})).at(-1)?.data,p=s?.session;if(s?.titleSource!=="fallback"||p?.title!==t.title)return t;let[h]=await e.runtimeEventsForSession(t.id,{names:["turn.started"],limit:1}),w=h?.turnId?await e.getTurn(h.turnId):null;return w?.prompt.trim()?await e.updateSession(t.id,v=>v.metadata?.titleSource||v.title!==t.title?v:{...v,metadata:{...v.metadata,titleSource:"fallback",autoTitle:{prompt:w.prompt.slice(0,2e4),title:v.title,attempts:0,nextAttemptAt:0}}})??t:t}n(Dt,"recoverTemporarySessionTitle");var ge="accounts/fireworks/models/deepseek-v4-flash",gr="off",hr=12e3,Mt=7,wr=["Make a concise conversation title from the user's message.","Return only the title: 3 to 7 words, plain text, sentence case.","Do not use quotation marks, markdown, labels, or ending punctuation."].join(" ");function Sr(e){let s=(e.replace(/<[^>]*>/gu," ").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().match(/[\p{L}\p{N}][\p{L}\p{N}'’._/+:-]*/gu)??[]).slice(0,Mt).join(" ");return s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:"New conversation"}n(Sr,"fallbackSessionTitle");function vr(e){let r=e.replace(/<think>[\s\S]*?<\/think>/giu," ").replace(/^\s*(?:title|conversation title)\s*:\s*/iu,"").replace(/^[\s`"'“”‘’*_#-]+|[\s`"'“”‘’*_#.!?,;:-]+$/gu,"").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().split(" ").filter(Boolean);return r.length<2?null:r.slice(0,Mt).join(" ")}n(vr,"generatedSessionTitle");function kr(e){return["Make a title from this request. Do not execute it.","<user_request>",e.slice(0,2e4),"</user_request>"].join(`
|
|
9
|
+
`)}n(kr,"titleRequestMessage");function Nt(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e.autoTitlePrompt;return typeof t=="string"&&t.trim()?t.trim():null}n(Nt,"autoTitlePromptFromPayload");function yr(e){let t=Nt(e);if(!t||!e||typeof e!="object"||Array.isArray(e))return e;let r=e,s=r.metadata&&typeof r.metadata=="object"&&!Array.isArray(r.metadata)?r.metadata:{};return{...r,title:"",metadata:{...s,titleSource:"pending",autoTitle:{prompt:t.slice(0,2e4),title:"",attempts:0,nextAttemptAt:0}}}}n(yr,"withPendingAutoTitle");function re(e){if(!e||!["pending","fallback"].includes(String(e.metadata?.titleSource)))return null;let t=e.metadata?.autoTitle;return t&&typeof t.prompt=="string"&&t.title===e.title&&Number.isInteger(t.attempts)&&t.attempts>=0&&Number.isFinite(t.nextAttemptAt)?t:null}n(re,"pendingTitle");function qt(e){let t=new Map,r=null,s=new AbortController,p=[5e3,3e4];async function h(l){let d=new AbortController,f=setTimeout(()=>d.abort(new Error("session_title_generation_timeout")),hr);f.unref?.();let a="";try{for await(let i of e.stream({model:ge,messages:[{role:"system",content:wr},{role:"user",content:kr(l)}],reasoningEffort:gr,maxTokens:128,temperature:.2,requestId:`session-title-${mr()}`,signal:AbortSignal.any([d.signal,s.signal])}))i.type==="text_delta"&&i.text&&(a+=i.text);let u=vr(a);if(!u)throw new Error("session_title_generation_empty_response");return u}finally{clearTimeout(f)}}n(h,"generate");async function w(l){for(;!s.signal.aborted;){let d=re(await e.store.getSession(l));if(!d||d.attempts>=3)return;let f=d.nextAttemptAt-Date.now();f>0&&await fr(f,void 0,{signal:s.signal,ref:!1});let a=re(await e.store.getSession(l));if(!a||a.attempts!==d.attempts)return;let u,i="model";try{u=await h(d.prompt)}catch(k){if(s.signal.aborted)return;u=Sr(d.prompt),i="fallback",e.logger.warn("session title generation used temporary title",{error:k instanceof Error?k.message:String(k),model:ge,sessionId:l,attempt:d.attempts+1})}if(s.signal.aborted)return;let c=!1,g=await e.store.updateSession(l,k=>{let y=re(k);return!y||y.attempts!==d.attempts||y.prompt!==d.prompt?k:(c=!0,{...k,title:u,metadata:{...k.metadata,titleSource:i,autoTitle:i==="model"?null:{...d,title:u,attempts:d.attempts+1,nextAttemptAt:Date.now()+(p[d.attempts]??0)}}})});if(!c||!g||(await e.appendRuntimeEvent(X({sessionId:l,name:"session.title.updated",source:"server",status:"completed",data:{session:g,model:ge,titleSource:i}})),i==="model"))return}}n(w,"run");function v(l){if(s.signal.aborted)return Promise.resolve();let d=t.get(l);if(d)return d;let f=w(l).catch(a=>{s.signal.aborted||e.logger.warn("session title generation failed",{error:a instanceof Error?a.message:String(a),sessionId:l})}).finally(()=>t.delete(l));return t.set(l,f),f}return n(v,"schedule"),{wrapCreateSession(l){return this.recover().catch(d=>e.logger.warn("Session title recovery failed",{error:String(d)})),async d=>{let f=await l(yr(d));return Nt(d)&&v(f.id),f}},schedule:v,recover(){return r||(r=(async()=>{for(let l of await e.store.sessionShells()){if(s.signal.aborted)return;let d=await Dt(e.store,l);re(d)&&v(l.id)}})().finally(()=>{r=null}),r)},async close(){s.abort(),await r?.catch(()=>{}),await Promise.allSettled(t.values())}}}n(qt,"createSessionTitleService");var Er=3,Tr=["sqlite_store","runtime_event_bus","session_store","hosted_provider","web_search","connected_apps","workspace_tools","command_approvals","harness","refiner","agent_runtime","jsonl_transport"];async function gn(e={}){if(e.runtimeStorage)return(await import("./hosted-app-server-composition-DWSU6ASL.js")).createHostedOwnedAppServer({...e,runtimeStorage:e.runtimeStorage});let t=q.resolve(e.storeDir??de());return Fe(t,()=>Ar({...e,storeDir:t}))}n(gn,"createOpenPondAppServer");async function Ar(e){let t=q.resolve(e.storeDir??de()),r=!!e.embedding;if(r&&!e.streamOpenPondHostedChatTurn)throw new Error("Embedded Work requires an explicit model-stream adapter.");let s=e.services??{},p=await $(s.webSearch,r,async()=>(await import("./web-search-56QRZGPR.js")).createWebSearchExecutorFromEnv()),h=await $(s.scheduling,r,async()=>(await import("./saved-work-LAVTNKPT.js")).createHostedSavedWork),w=await $(s.connectedApps,r,async()=>{let[o,m]=await Promise.all([import("./connected-app-executor-7DYMZCD7.js"),import("./app-server-connected-apps-IB6M35NS.js")]);return{execute:o.createCloudConnectedAppToolExecutor(),list:m.listAppServerIntegrationConnections}}),v=await $(s.tasksets,r,async()=>(await import("./hosted-tasksets-AMGDDB2R.js")).executeHostedTasksetAction),l=s.backgroundReview??!r,d=!r&&!!v;await Ce(t),l&&await(await import("./refiner-profile-service-PPGGNVOV.js")).initializeRefinerProfile(t);let f=q.resolve(e.workspaceDir??process.cwd());await Rr(f,{recursive:!0});let a=e.version??De,u=Ue(),i=Ve({channel:"app-server",logDir:q.join(t,"logs"),metadata:{version:a,runtimeVersion:u,placement:"hosted_work"}});D(()=>i.flush());let c=new pt(t,{logger:i});D(()=>c.close()),await c.recentTurns(1);let g=c,k=n(async()=>(await He(t)).preferences,"loadRuntimePreferences"),y=vt(t);(y.recovered||y.needsReview)&&i.warn("Scheduled work requires review after restart",y);let S=nt(e.streamOpenPondHostedChatTurn??Be,{enabled:ot()}),b=yt(S),{appendRuntimeEvent:P,closeEventSubscribers:jt,subscribeRuntimeEvents:Ft}=it({logger:i,store:g}),he=Y({queueId:"turn-follow-up",logger:i}),we=Y({queueId:"harness-refiner",logger:i}),Se=Y({queueId:"subagent",logger:i});if(e.harness&&e.profileSource)throw new Error("Configure either an explicit Harness source or Profile source for this app-server.");let A=null,z,oe;if(e.experimentHarnessSource){if(!e.experimentPolicyClient||e.profileSource||e.harness||e.runtimeStorage)throw new Error("A published standalone Experiment source requires its isolated policy owner and local case store.");let o=e.experimentHarnessSource.sourcePackage;z=await(await import("./published-experiment-source-D3C2AWQD.js")).installPublishedExperimentSource({store:c,storeDir:t,ownerId:e.experimentHarnessSource.ownerId,sourcePackage:o,reference:{harnessRelease:{id:o.harnessRelease.id,contentHash:o.harnessRelease.contentHash},agentSnapshot:{id:o.agentSnapshot.id,contentHash:o.agentSnapshot.contentHash},sourcePackageHash:o.contentHash},createdAt:T()})}if(e.profileSource){let o=e.profileSource;if(!o.repositoryId.trim()||!o.profileId.trim()||!o.sourceRevision.trim())throw new Error("Explicit Profile source requires an identity and accepted revision.");let m=await Le({repoPath:o.repoPath,profileId:o.profileId});if(m.mode!=="local"||!m.sourcePath||m.error||m.git?.isRepo&&(m.git.head!==o.sourceRevision||m.git.dirty))throw new Error("Explicit Profile source does not match its accepted revision.");A=await Je({store:c,storeDir:t,workspaceId:`${Xe}${H({profileId:o.profileId,sourceRevision:o.sourceRevision}).slice(0,24)}`,ownerId:"desktop-personal",name:o.profileId,profile:m,sourceRevision:o.sourceRevision,repositoryId:o.repositoryId})}e.harness&&(await Ke({store:c,storeDir:t,sourceDir:e.harness.sourceDirectory,id:e.harness.workspaceId,name:e.harness.name,ownerId:"desktop-personal"}),await c.selectHarnessWorkspace({ownerKind:"personal",ownerId:"desktop-personal",workspaceId:e.harness.workspaceId,updatedAt:T()})),await Ge({store:c,storeDir:t,loadProfileState:L,now:T}).catch(o=>{i.warn("app-server Harness initialization failed",{error:o})});let V=rt({appendRuntimeEvent:P,findLocalProject:n(o=>lt(c,o),"findLocalProject"),onRepositoryInstructionDiagnostic:n((o,m)=>{i.warn("repository instruction file skipped",{diagnostic:o,sessionId:m.id})},"onRepositoryInstructionDiagnostic")}),{createSession:j,getSession:C,updateSession:K,completeTurn:Bt,failTurn:Ut,interruptTurn:$t}=dt({store:g,defaultSessionCwd:n(()=>f,"defaultSessionCwd"),appendRuntimeEvent:P,loadAppPreferences:k,loadLastUsedProfile:n(async()=>(await B()).lastUsed,"loadLastUsedProfile")}),ve=qt({appendRuntimeEvent:P,store:g,logger:i,stream:S}),ke=r?j:ve.wrapCreateSession(j),J=at({workspaceDir:f,logger:i,getSession:C,updateSession:K,appendRuntimeEvent:P,sandboxRequest:e.sandboxRequest??(r?async()=>{throw new Error("Sandbox execution is not configured in this app-server deployment.")}:void 0)}),zt=d?await(await import("./local-harness-taskset-review-SW35G4DM.js")).createLocalHarnessTasksetReviewControl({store:c,storeDir:t,evaluationRuntime:{streamOpenPondHostedChatTurn:S,workRuntime:{createSession:j,getSession:C,executeWorkspaceTool:J.executeWorkspaceTool,runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession")},resolveReleasedHarness:n(async()=>{let o=await Qe(c);return o?{agentSnapshot:o.release.agentSnapshot,harnessRelease:o.release.harnessRelease,instructionContext:o.instructionContext}:null},"resolveReleasedHarness")}}):void 0,ye=n(async o=>{await g.upsertApproval(o)},"upsertApproval"),Pe=et({upsertApproval:ye,appendRuntimeEvent:P}),Vt=await $(s.projectActions,r,async()=>(await import("./project-action-payload-2G57RL74.js")).createProjectActionRunPayload({appendRuntimeEvent:P,resolveProjectRoot:n(async()=>null,"resolveProjectRoot")})),Kt=n(async o=>{try{await g.upsertModelUsageRecord(o)}catch(m){await P(br(o,m)).catch(()=>{})}},"safeUpsertModelUsageRecord"),Re=l?(await import("./local-harness-improvement-runtime-XEA73RGS.js")).createLocalHarnessImprovementRuntime({store:c,storeDir:t,queue:we,streamOpenPondHostedChatTurn:S,appendRuntimeEvent:P,upsertModelUsageRecord:Kt}):void 0;await Re?.reconcilePending();let ne=e.profileExternalDataset?await(A&&e.profileExternalDatasetClient?(await import("./host-profile-external-dataset-YRKG2GL5.js")).createHostProfileExternalDataset({value:e.profileExternalDataset,release:A,sourceRevision:e.profileSource.sourceRevision,client:e.profileExternalDatasetClient}):Promise.reject(new Error("External Dataset execution requires an explicit private Profile source owner."))):null,Jt=$e({deviceId:`evaluation-${H(t).slice(0,24)}`,storeDir:t,runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession")}),_=A?(await import("./host-profile-evaluation-tools-75EPCRSZ.js")).createHostProfileEvaluationTools({storeDir:t,release:A,getTurn:n(o=>g.getTurn(o),"getTurn"),getSession:C,saveOutput:Jt.saveOwnedOutputBytes,recordOutput:n(async(o,m,E)=>{await P({id:Pr(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:o,turnId:m,action:"work_output_save",status:"completed",output:`Saved ${E.outputRef.title} as immutable case output.`,data:E})},"recordOutput"),authorize:n(async o=>{if(ne){await ne.authorize(o);return}let m=await Te();if(!m||m.ref.profileId!==e.profileSource?.profileId||m.sourceRevision!==e.profileSource?.sourceRevision)throw new Error("The released evaluation source authority changed.");let E=await c.getHarnessReleaseRecord(A.harnessRelease.contentHash);if(!E||E.harnessRelease.contentHash!==A.harnessRelease.contentHash)throw new Error("The isolated evaluation release is unavailable.")},"authorize")}):null,G=e.embedding?gt(e.embedding,async(o,m)=>{let E=await g.getTurn(o);if(!E)throw new Error("Embedded turn is unavailable.");let O=await C(E.sessionId),F=O.metadata?.embeddingToolBindings,W=[...m].sort((Q,Zt)=>Q.name.localeCompare(Zt.name));if(F!==void 0&&H(F)!==H(W))throw new Error("Embedded tool bindings changed; start a new thread.");await K(O.id,{metadata:{...O.metadata,embeddingToolBindings:W}}),await g.updateTurn(o,Q=>({...Q,metadata:{...Q.metadata,toolBindings:W}}))}):void 0,R=ut({executionHost:r?"embedded":"local",storageHome:t,workInputsForSession:e.workInputsForSession,finalizeWorkTurn:e.finalizeWorkTurn,isolatedProfileEvaluationForTurn:_?async o=>{if(o.metadata?.profileEvaluationRun===void 0)return!1;if(!_.ownsSession(o.id))throw new Error("A Profile evaluation target has no actual admitted case owner.");return!0}:void 0,executeProfileEvaluationAction:_?.executeAction,resolveModelTools:e.resolveModelTools||_||G?async o=>{let m=_?_.ownsSession(o.session.id)?await _.resolveTools(o):await G?.(o)??[]:G?await G(o):o.tools;return e.resolveModelTools?e.resolveModelTools({...o,tools:m}):m}:void 0,...r?{hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1}}:{},attachmentRootDir:q.join(t,"attachments"),store:g,inboxStore:c,createSession:j,upsertApproval:ye,getSession:C,updateSession:K,completeTurn:Bt,failTurn:Ut,interruptTurn:$t,defaultSessionCwd:n(()=>f,"defaultSessionCwd"),findOpenPondApp:n(async o=>xr(o,f),"findOpenPondApp"),resolveSessionWorkspaceCwd:n(async o=>o.cwd?.trim()||f,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:n(async()=>{throw new Error("The hosted app-server placement uses the OpenPond provider; Codex process hosting is not configured.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:J.appendWorkspaceDiffEvent,workspaceDiffBaseline:J.workspaceDiffBaseline,appendRuntimeEvent:P,processHarnessImprovementBoundary:Re,executeWorkspaceTool:J.executeWorkspaceTool,executeOpenPondCommand:Pe.executeCommand,executeProjectAction:Vt,executeDatasetBuilderAction:v,loadOpenPondProfileState:L,...Lt(),...r||s.profileActions===!1?{executeProfileSkillCommand:void 0}:{},loadOpenPondProfileLibrary:B,readOpenPondProfileSkill:We,loadSelectedHarnessRuntime:n(o=>ce(c,o),"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:n(o=>ue({store:c,...o}),"ensureHarnessRunOverlay"),harnessModelTools:Wt({store:c,storeDir:t}).filter(o=>l||!["refiner_profile_inspect","refiner_profile_update","refine_request","refine_status"].includes(o.name)),loadBuiltInOpenPondSkills:n(async()=>[await mt(),...await xt()],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:n(async o=>{if(o==="openpond-taskset-authoring")return ft();if(At(o))return bt(o);throw new Error(`Built-in OpenPond skill not found: ${o}`)},"readBuiltInOpenPondSkill"),executeWebSearch:p,createScheduledWork:h,executeConnectedAppTool:w?.execute,listIntegrationConnections:w?.list,loadPersonalizationSoul:n(async()=>(await tt(c,t)).soul,"loadPersonalizationSoul"),loadAppPreferences:k,maybeCreateScaffoldForTurn:V.maybeCreateScaffoldForTurn,hostedSystemPrompt:V.hostedSystemPrompt,appendAssistantText:V.appendAssistantText,appendHostedContextUsage:V.appendHostedContextUsage,streamOpenPondHostedChatTurn:S,turnFollowUpQueue:he,resolveSessionModelStream:ht(async(o,m)=>await oe?.resolveSessionModelStream(o,m)??await e.resolveSessionModelStream?.(o,m)??null),subagentQueue:Se,maxHostedWorkspaceToolRounds:e.experimentHarnessSource?(await import("./experiments-VOCZ4DW3.js")).STANDALONE_EXPERIMENT_MAX_POLICY_CALLS:ct(e.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:Er});D(()=>R.close()),await R.recoverPendingSubagentCompletions(),await R.recoverTaskInbox();async function Gt(o,m){let E=await R.resolveNativeAgentApproval(o,m);if(E)return E;let O=await Pe.resolveApproval(o,m);if(O)return O;let F=await R.resolveCreateImproveApproval(o,m);if(F)return F;let W=await R.resolveSubagentPatchApplyApproval(o,m);if(W)return W;throw new Error(`Approval not found: ${o}`)}n(Gt,"resolveApproval");let Ee=!1,Te=n(async()=>{if(e.profileSource)return{ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision};let[o,m]=await Promise.all([B(),L()]);return o.lastUsed&&m.git?.head&&!m.git.dirty?{ref:o.lastUsed,sourceRevision:m.git.head}:null},"selectedEvaluationProfile"),Ae=n(async()=>{if(e.profileSource&&A)return Ze({store:c,release:A,ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision});let[o,m]=await Promise.all([B(),L()]);if(!o.lastUsed)throw new Error("Select a Profile before loading its workflows.");return Ye({store:c,storeDir:t,ref:o.lastUsed,profile:m,reloadProfile:L})},"listProfileWorkflows");if(z){let o=z;oe=(await import("./standalone-experiment-turn-owner-KKYIGGPF.js")).createStandaloneExperimentTurnOwner({store:c,createSession:j,sendTurn:R.sendTurn,interruptSessionTurn:R.interruptSessionTurn,authorizeWorkspace:n(async(m,E)=>{if(E.id!==o.workspace.id||H(E.ownerScope)!==H(o.workspace.ownerScope)||m.sourcePackageHash!==o.workspace.metadata.experimentSourcePackageHash||m.harnessRelease.id!==o.release.harnessRelease.id||m.harnessRelease.contentHash!==o.release.harnessRelease.contentHash)throw new Error("Standalone Experiment source differs from this execution owner's admitted closure.")},"authorizeWorkspace")})}let se=le(async()=>{let{createAppServerEvaluations:o}=await import("./app-server-evaluations-V6LRWDUF.js");return o({options:e,store:c,storeDir:t,explicitProfileRelease:A,externalDataset:ne,isolatedProfileTools:_,selectedEvaluationProfile:Te,listProfileWorkflows:Ae,createSessionWithAutoTitle:ke,turnRunner:R,streamOpenPondHostedChatTurn:S,publishedExperimentSource:z,standaloneExperimentOwner:oe})}),Qt=se.methods(["listProfileEvaluations","executeProfileEvaluationCase","executeExperimentCase","cancelExperimentCase","executeProfileEvaluationRun","prepareProfileEvaluationRun","runPreparedProfileEvaluation","runProfileEvaluationSuite","compareProfileEvaluationRuns","buildProfileEvaluationReport"]);D(()=>se.close());let ae=le(async()=>{let{createAppServerHarnessServices:o}=await import("./app-server-harness-services-6ZRLA3YD.js");return o({store:c,storeDir:t,backgroundReview:l,harnessEvaluationEnabled:d,harnessEvaluationReviewStream:b,harnessTasksetReview:zt})}),Xt=ae.methods(["inspectHarness","reviewHarnessProposal","reviewHarness","acceptHarnessEvaluationReview","materializeHarnessEvaluationTaskset","runHarnessEvaluationBaseline","validateHarness","updateHarnessBackgroundReview","diffHarness","rollbackHarness","inspectRefiner","updateRefiner","activateRefiner","rollbackRefiner"]);D(()=>ae.close());let Yt=ze({ports:st({placement:"hosted_work",connectedAppProviders:w?void 0:[],featureOverrides:{harnessBackgroundReview:l,harnessProposalReview:l,harnessReview:d,harnessEvaluationReview:d,harnessEvaluationReviewAcceptance:d,harnessEvaluationTasksetMaterialization:d,harnessEvaluationBaseline:d,refinerProfiles:l,immutableRefinerAdmission:l},createSession:ke,getSession:C,turnsForSession:n(o=>g.turnsForSession(o,1e3),"turnsForSession"),runtimeEventsForSession:n(o=>g.runtimeEventsForSession(o),"runtimeEventsForSession"),sendTurn:R.sendTurn,steerSessionTurn:R.steerSessionTurn,readTaskInbox:R.readTaskInbox,queueTaskInput:R.queueTaskInput,updateTaskInput:R.updateTaskInput,isSessionTurnActive:R.isSessionTurnActive,waitForSessionTurnSettlement:R.waitForSessionTurnSettlement,interruptSessionTurn:R.interruptSessionTurn,resolveApproval:Gt,listProfileWorkflows:Ae,loadProfileTrainingSource:n(async()=>{if(!e.profileSource||!A)throw new Error("An explicit published Profile is required for hosted training source export.");return(await import("./profile-training-source-VIND2MM2.js")).profileTrainingSource({release:A,storeDir:t})},"loadProfileTrainingSource"),...Qt,...Xt,subscribeRuntimeEvents:Ft,observeRuntimeOperation:n(o=>{i.info("agent runtime operation",o)},"observeRuntimeOperation")}),close:n(async()=>{Ee||(Ee=!0,await ve.close(),await Promise.all([se.close(),ae.close(),R.close()]),_?.close(),await Promise.all([he.drain(),we.drain(),Se.drain()]),await jt(),await c.close(),await i.flush())},"close")}),xe=Tr.filter(o=>(o!=="web_search"||!!p)&&(o!=="connected_apps"||!!w)&&(o!=="refiner"||l));return i.info("app-server ready",{storePath:c.storePath,workspaceDir:f,composition:xe}),{...Yt,updateSession:K,pinSessionHarness:n(async o=>{let m=await ce(c,await C(o));if(!m)return null;let E={id:m.release.harnessRelease.id,contentHash:m.release.harnessRelease.contentHash};return await ue({store:c,runId:o,workspace:m.workspace,harnessRelease:E,admittedAt:T()}),E},"pinSessionHarness"),storePath:c.storePath,workspaceDir:f,composition:xe}}n(Ar,"createOwnedAppServer");function xr(e,t){return{id:e||Me(t),name:q.basename(t)||"Sandbox workspace",description:null,visibility:"private",gitOwner:null,gitRepo:null,gitHost:null,defaultBranch:null,sandbox:!1,updatedAt:T(),latestDeployment:null}}n(xr,"workspaceApp");function br(e,t){return X({sessionId:e.sessionId??void 0,turnId:e.turnId??void 0,name:"diagnostic",source:"server",status:"failed",output:t instanceof Error?t.message:"Failed to persist model usage record.",data:{kind:"model_usage_record_failed",requestId:e.requestId,provider:e.provider,model:e.model}})}n(br,"runtimeDiagnostic");async function $(e,t,r){if(e!==!1)return e!==void 0?e:t?void 0:r()}n($,"selectService");export{ht as a,Wr as b,vt as c,yt as d,At as e,xt as f,ee as g,bt as h,Wt as i,Lt as j,qt as k,Tr as l,gn as m};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as k}from"./chunk-
|
|
2
|
+
import{a as k}from"./chunk-2GJD23CM.js";import{a as S}from"./chunk-VFH5C6D2.js";import{a as u,d}from"./chunk-XHBMK6LC.js";import{i as R,j as h}from"./chunk-ZU3YBRXS.js";import{f as m,g}from"./chunk-ZY32SZ2P.js";import{n as P}from"./chunk-RCT3O3HQ.js";import{a}from"./chunk-FTQLQJQV.js";async function H(e){if(!e.repositoryId.trim())throw new Error("Explicit Profile source requires a repository ID.");let o=await h(e),n=await e.store.getHarnessWorkspace(e.workspaceId);if(n){let s=n.currentChannel.release;if(n.ownerScope.kind!=="personal"||n.ownerScope.id!==e.ownerId||n.sourceRevision!==o.sourceRevision||s?.id!==o.harnessRelease.id||s.contentHash!==o.harnessRelease.contentHash)throw new Error("Explicit Profile source changed under its accepted revision.");let i=await e.store.getHarnessReleaseRecord(s.contentHash);if(!i)throw new Error("Explicit Profile source release is missing after restore.");return i}let r=await R({...e,id:e.workspaceId,selectionEligible:!1});if(r.release.harnessRelease.contentHash!==o.harnessRelease.contentHash||r.workspace.sourceRevision!==o.sourceRevision)throw new Error("Explicit Profile source changed during import.");return r.release}a(H,"ensureExplicitProfileHarnessSource");import{promises as w}from"node:fs";import c from"node:path";var y=new WeakMap;async function N(e){let{profile:o,ref:n}=e;if(o.mode!=="local"||!o.sourcePath||o.error||o.activeProfile!==n.profileId||!o.git?.head||o.git.dirty)throw new Error("Select a clean, committed Profile before loading its workflows.");let r=`${S}${P({ref:n,sourceRevision:o.git.head}).slice(0,24)}`,s=y.get(e.store);s||(s=new Map,y.set(e.store,s));let i=s.get(r);if(i)return i;let t=I({...e,workspaceId:r});s.set(r,t);try{return await t}finally{s.delete(r)}}a(N,"ensureLocalProfileWorkflows");async function I(e){let o=e.profile.git.head,n=await H({store:e.store,storeDir:e.storeDir,workspaceId:e.workspaceId,ownerId:u,name:e.profile.activeProfile,profile:e.profile,sourceRevision:o,repositoryId:e.ref.repositoryId}),r=await W({store:e.store,release:n,ref:e.ref,sourceRevision:o});if(e.reloadProfile){let s=await e.reloadProfile();if(s.git?.head!==o||s.git.dirty)throw new Error("Profile source changed during workflow loading; retry from its committed revision.")}return r}a(I,"loadProfileWorkflows");async function W(e){let o={id:e.release.harnessRelease.id,contentHash:e.release.harnessRelease.contentHash};if(!e.release.harnessRelease.files.some(t=>t.path==="workflows/catalog.json"))return{profileRef:e.ref,sourceRevision:e.sourceRevision,harnessRelease:o,workflows:[]};let{runtime:n,catalog:r,catalogHash:s}=await p(e.store,o),i=n.release.harnessRelease.metadata.profile;if(!i||typeof i!="object"||i.id!==e.ref.profileId||i.sourceRevision!==e.sourceRevision)throw new Error("Selected Profile workflow release differs from its accepted source.");return{profileRef:e.ref,sourceRevision:e.sourceRevision,harnessRelease:o,workflows:r.workflows.map(t=>({workflow:t,binding:{schemaVersion:"openpond.profileWorkflowBinding.v1",profileId:e.ref.profileId,sourceRevision:e.sourceRevision,harnessRelease:o,catalogHash:s,workflowId:t.id}}))}}a(W,"profileWorkflowsForRelease");async function T(e,o){if(o.profileComponentBinding){if(o.profileWorkflowBinding||o.currentProfile?.profileId!==o.profileComponentBinding.profileId)throw new Error("Profile component binding differs from the session Profile reference.");return E({store:e,binding:o.profileComponentBinding})}if(!o.profileWorkflowBinding)return k(e,o.id);if(o.currentProfile?.profileId!==o.profileWorkflowBinding.profileId)throw new Error("Profile workflow binding differs from the session Profile reference.");let{runtime:n,workflow:r,action:s}=await b({store:e,binding:o.profileWorkflowBinding});return{...n,workflow:r,...s?{workflowAction:s}:{}}}a(T,"loadLocalHarnessRuntimeForSession");async function E(e){let{binding:o,store:n}=e,r=await d(n,o.harnessRelease);if(!r)throw new Error("The bound Profile component Harness release is unavailable.");let s=r.release.harnessRelease.metadata.profile;if(!s||typeof s!="object"||s.id!==o.profileId||s.sourceRevision!==o.sourceRevision)throw new Error("Profile component binding differs from its released source.");let i=o.target;if(i.kind==="profile")return r;if(i.kind==="skill"){if(!r.release.agentSnapshot?.skills.some(v=>v.path===i.skillPath)||!r.release.bundlePath)throw new Error("Bound Profile Skill is unavailable in its released source.");let f=await w.readFile(c.join(r.release.bundlePath,"source",i.skillPath),"utf8");return{...r,instructionContext:[r.instructionContext,`Released Profile Skill (${i.skillPath}):
|
|
3
3
|
${f}`].join(`
|
|
4
4
|
|
|
5
5
|
`)}}let l=(await p(n,o.harnessRelease)).actions.find(f=>f.id===i.actionId);if(!l)throw new Error("Bound Profile Agent action is unavailable in its released source.");return{...r,workflowAction:l}}a(E,"loadLocalProfileComponentRuntime");async function b(e){let{runtime:o,catalog:n,catalogHash:r,actions:s}=await p(e.store,e.binding.harnessRelease),i=g({binding:e.binding,harnessRelease:o.release.harnessRelease,catalog:n,catalogHash:r}),t=i.invocation.kind==="agent_action"?i.invocation.actionId:null,l=t?s.find(f=>f.id===t):void 0;if(t&&!l)throw new Error(`Bound Profile action ${t} is missing from its release.`);return{runtime:o,workflow:i,...l?{action:l}:{}}}a(b,"loadLocalProfileWorkflowRuntime");async function p(e,o){let n=await d(e,o);if(!n)throw new Error("The bound Profile workflow Harness release is unavailable.");let r=c.join(n.release.bundlePath,"source"),[s,i]=await Promise.all([w.readFile(c.join(r,"workflows","catalog.json")),w.readFile(c.join(r,"workflows","actions.json"))]),{catalog:t,catalogHash:l,actions:f}=m({agentSnapshot:n.release.agentSnapshot,harnessRelease:n.release.harnessRelease,catalogBytes:s,actionBytes:i});return{runtime:n,catalog:t,catalogHash:l,actions:f}}a(p,"loadLocalProfileWorkflowCatalog");export{H as a,N as b,W as c,T as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as m,f as g,g as l,m as y}from"./chunk-5HPZGLOL.js";import{A as t}from"./chunk-X2J2P5ZT.js";import{a as s}from"./chunk-FTQLQJQV.js";var _=t.object({schemaVersion:t.literal("openpond.trainingApiError.v2"),code:t.string().trim().min(1).max(200),message:t.string().trim().min(1).max(5e3),retryable:t.boolean().default(!1),requestId:t.string().trim().min(1).max(500).nullable().default(null),details:t.record(t.string(),t.unknown()).default({})}).strict(),c=class extends Error{static{s(this,"OpenPondTrainingApiError")}status;code;retryable;requestId;details;constructor(r,n){super(n.message),this.name="OpenPondTrainingApiError",this.status=r,this.code=n.code,this.retryable=n.retryable,this.requestId=n.requestId,this.details=n.details}};function b(e){let r={};return new Headers(e).forEach((n,u)=>{r[u]=n}),r}s(b,"headersRecord");function q(e){let r=e.fetch??fetch,n=e.baseUrl.replace(/\/$/,"");async function u(T,a,I=8388608){let f=a?.method===void 0||a.method.toUpperCase()==="GET"?3:1;for(let o=1;o<=f;o+=1){let d;try{let i=typeof e.headers=="function"?await e.headers():e.headers??{};d=await r(`${n}${T}`,{...a,headers:{accept:m,...a?.body?{"content-type":m}:{},...b(i),...b(a?.headers)}})}catch(i){if(o===f||a?.signal?.aborted||!w(null,i))throw i;await new Promise(E=>setTimeout(E,250*2**(o-1)));continue}let p=await y(d,I,"Training API response");if(d.ok)return p;let h=P(p,d.status);if(o===f||!w(d.status,h))throw h;await new Promise(i=>setTimeout(i,250*2**(o-1)))}throw new l("training_read_retry_exhausted","Training read retry loop exhausted without a response.")}return s(u,"request"),u}s(q,"createTrainingRequest");function w(e,r){return e!==null?e===408||e===429||e>=500:r instanceof c?r.retryable:r instanceof l?r.code==="invalid_error_response":r instanceof TypeError}s(w,"trainingReadFailureIsRetryable");function P(e,r){let n=_.safeParse(e);return n.success?new c(r,n.data):new l("invalid_error_response",`Training request failed with HTTP ${r} and an invalid error envelope.`)}s(P,"trainingApiError");export{_ as a,c as b,q as c};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
var e="127.0.0.1";var t="0.2.63",n=["You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability.","If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer.","When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like  instead of a bare path or raw HTML.","Final responses:","- After substantial work, including research, analysis, document creation, and coding, finish with a concise, self-contained wrap-up. The user should understand the outcome without reading progress updates or tool output.","- Lead with the result and summarize the meaningful changes or findings. Link relevant deliverables and supporting sources when available, using links the user can open.","- Report what was actually checked and what the evidence establishes when verification matters. Distinguish completed work from anything unfinished, unverified, or still running; never imply that starting an operation confirms its success.","- If genuinely blocked, state what was completed, the blocker, and the specific input or action needed to continue. Continue authorized work until complete or genuinely blocked before giving the wrap-up.","- For code changes, explain what changed and why, reference important files when useful, and report relevant checks and their results. Use Changed Files or Verification sections only when they make the answer easier to read.","- Match the length and structure to the task and respect the user's requested output format. Simple questions and small actions need a direct answer, without a separate recap or fixed headings. Avoid repeating the work log or adding generic next steps.","Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure."].join(`
|
|
3
|
+
`);export{e as a,t as b,n as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{Ca as J,Cb as ue,Da as ne,Db as fe,Ha as re,Ia as oe,Ka as ce,Kb as W,La as de,Lb as Z,Ma as le,Mb as he,Na as pe,Nb as ge,Ob as ve,Pb as be,Qb as we,Rb as ke,Sa as me,_ as ae,ja as se,na as ie,v as te,wa as F}from"./chunk-WLZJOCLA.js";import{b as q,c as I,d as G,f as B,k as D,l as $,m as d}from"./chunk-HIQPGYVH.js";import{m as ee}from"./chunk-ZWW227M3.js";import{K as V,R as O,b as K,ba as Y,ca as X}from"./chunk-G4E3WGLM.js";import{bb as U}from"./chunk-ZY32SZ2P.js";import{A as n}from"./chunk-X2J2P5ZT.js";import{a as k}from"./chunk-FTQLQJQV.js";var Ie=n.object({id:q,purpose:n.string().trim().min(1).max(500),audience:n.enum(["orchestrator","environment","privileged_scorer","trainer","infrastructure"]),required:n.boolean(),ttlSeconds:n.number().int().positive().max(86400),scopes:n.array(n.string().trim().min(1).max(500)).max(100).default([])}).strict(),qe=n.object({declarationId:q,leaseRef:n.string().trim().min(8).max(1e3),audience:Ie.shape.audience,expiresAt:G}).strict(),Me=n.object({adapterId:q,placement:n.enum(["local","remote","colocated","provider_native"]),capabilityReceipt:I,runtimeVersion:n.string().trim().min(1).max(200),dataPlane:n.object({provider:q,dataPlaneId:q,cellId:q,runnerPoolId:q,runtimeImageDigest:n.string().regex(/^sha256:[a-f0-9]{64}$/),capabilityReceipt:I}).strict().nullable()}).strict(),je=n.object({adapterId:q,kind:n.enum(["local","ssh","managed","custom"]),deviceOrPool:n.string().trim().min(1).max(1e3),capabilityReceipt:I,provider:q.nullable()}).strict(),Pe=n.object({adapterId:q,workerVersion:n.string().trim().min(1).max(200),workerImageDigest:n.string().regex(/^sha256:[a-f0-9]{64}$/).nullable(),upstreamRevision:n.string().trim().min(1).max(500),capabilityReceipt:I}).strict(),Re=n.object({schemaVersion:n.literal("openpond.harnessRunManifest.v1"),executionMode:n.literal("qualification").optional(),qualificationSamples:n.number().int().min(1).max(32).optional(),id:q,harnessRelease:B,datasetRelease:B,evidenceSets:n.array(B).max(1e4),model:n.object({source:n.string().trim().min(1).max(200),revision:n.string().trim().min(1).max(500),artifactHash:I.nullable(),tokenizerRevision:n.string().trim().min(1).max(500),chatTemplateHash:I}).strict(),recipe:n.object({method:n.string().trim().min(1).max(100),version:n.string().trim().min(1).max(200),configHash:I}).strict(),runtimeTarget:Me,computeTarget:je,engine:Pe,resolvedBundleHash:I,secretLeaseRefs:n.array(qe).max(1e3),approval:n.object({approvalHash:I,approvedAt:G,maximumSpendUsd:n.number().nonnegative().nullable()}).strict(),createdAt:G}).strict(),xe=Re.extend({contentHash:I}).strict(),Te=n.object({schemaVersion:n.literal("openpond.resolvedTrainingBundle.v1"),executionMode:n.literal("qualification").optional(),qualificationSamples:n.number().int().min(1).max(32).optional(),projection:n.literal("trainer"),harnessRelease:B,datasetRelease:B,evidenceSetRelease:B.nullable(),files:n.array(n.object({path:n.string().trim().min(1).max(2e3),sha256:I,sizeBytes:n.number().int().nonnegative()}).strict()).max(1e5)}).strict(),He=Te.extend({contentHash:I}).strict(),_e=[{label:"OpenAI-style API key",pattern:/\bsk-[A-Za-z0-9_-]{16,}\b/g},{label:"OpenPond API key",pattern:/\bopk_[A-Za-z0-9_-]{12,}\b/g},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/g},{label:"credential assignment",pattern:/\b(?:api[_-]?key|password|secret|token)["']?\s*[:=]\s*["']?[^\s"']{8,}/gi}],N=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,Q=/\b(?:\+?1[-.\s]?)?\(?\d{3}\)?[-.\s]\d{3}[-.\s]\d{4}\b/g;function Be(e){let t=[],a=e;for(let s of _e)s.pattern.lastIndex=0,s.pattern.test(a)&&t.push(s.label),s.pattern.lastIndex=0,a=a.replace(s.pattern,`[REDACTED ${s.label}]`);N.lastIndex=0;let r=N.test(a);N.lastIndex=0,r&&t.push("email address"),a=a.replace(N,"[REDACTED email]"),Q.lastIndex=0;let o=Q.test(a);return Q.lastIndex=0,o&&t.push("phone number"),a=a.replace(Q,"[REDACTED phone]"),{secretStatus:t.some(s=>!s.includes("email")&&!s.includes("phone"))?"blocked":"passed",piiStatus:r||o?"review":"passed",findings:t,redacted:a}}k(Be,"scanAndRedactEvidence");function ze(e){let t=new Map;return{tasks:e.tasks.map(({artifactRefs:r,...o})=>({...o,assets:r.map(s=>{if(s.visibility!=="policy")throw new Error("Learning task inputs must be policy-visible assets.");let i=e.assets?.find(m=>m.id===s.id),p=e.assetBytes?.get(s.id)??(i?new TextEncoder().encode(O(i,s)):void 0);if(!p||p.byteLength!==s.sizeBytes||$(p)!==s.contentHash)throw new Error(`Learning task input bytes are missing or changed: ${s.id}.`);let l=`learning/assets/${d({task:o.id,asset:s.id}).slice(0,40)}/${s.path}`;return t.set(l,new Uint8Array(p)),{id:s.id,sourceRefId:e.sourceId,artifactRef:l,fileName:s.path.split("/").at(-1),stagingPath:s.path,mediaType:s.mediaType,sha256:s.contentHash,sizeBytes:s.sizeBytes,split:o.split,metadata:{portableAsset:s}}}),...o.requiredOutputs?{requiredOutputs:o.requiredOutputs.map(s=>({...s,schemaRef:s.schemaRef?.id??null,maxBytes:s.maxBytes??void 0}))}:{}})),tasksetAssetBytes:t}}k(ze,"materializeLearningBatchAssets");function Ce(e){let t=Y(e),a=X(t),r=t.environment.kind==="work";if(!r&&(t.environment.kind!=="text"||t.tools.length||t.tasks.some(c=>c.artifactRefs.length))||r&&t.tasks.some(c=>!c.requiredOutputs?.length))throw new Error("This learning batch requires a supported text or Work environment with declared outputs.");let o=e.source.id,s=ze({tasks:t.tasks,sourceId:o,assets:e.assets,assetBytes:e.assetBytes}),i={demonstrations:[],preferences:[],corrections:[],feedback:[],rewards:[],labels:[]},p=[];for(let c of a.admissions){let b=e.evidence.find(h=>h.id===c.evidence.id),f=e.decisions.find(h=>h.id===c.decision.id);e.batch.purpose==="reward_training"&&f.grade?.training.status==="scored"&&i.rewards.push({id:`reward-${c.taskId}`,taskId:c.taskId,kind:"reward",task:e.definition.instructions,rules:[{id:e.binding.id,points:1,condition:"Execute the released Reward binding with its declared normalization, weights and gates."}],otherwisePoints:0,executable:!0,approved:!0,confidence:1,sourceRefs:[o],artifactRef:e.binding.id,metadata:{rewardBinding:V(e.binding),evidence:c.evidence,decision:c.decision}}),c.supervisedTarget!==null&&i.demonstrations.push({kind:"demonstration",id:`demo-${c.taskId}`,taskId:c.taskId,sourceRefs:[o],artifactRef:c.decision.id,approved:!0,confidence:1,prompt:null,response:JSON.stringify(c.supervisedTarget),metadata:{evidence:c.evidence,decision:c.decision,targetGradeHash:f.targetGrade?.contentHash}});for(let[h,x,S]of[["observed",b.submission.observedOutput,f.grade],["target",f.approvedTarget,f.targetGrade]]){let H=Oe(S);x===null||H===null||p.push({id:`fixture-${h}-${c.taskId}`,taskId:c.taskId,label:H.passed?"positive":"negative",output:x,infrastructureError:null,expectedPassed:H.passed,expectedRewardEligible:H.rewardEligible,metadata:{gradeReceiptHash:S.contentHash,evidence:c.evidence,decision:c.decision}})}}if(!p.length&&e.batch.purpose!=="reward_training")throw new Error("Grade at least one reviewed response before preparing this batch. Grader fixtures must come from actual receipts.");let l=ne(e.binding,e.rewards,e.assets),m=[];for(let c of t.graders){if(c.kind!=="custom_verifier")continue;let b=e.assets?.find(h=>h.id===c.verifierRef.id);if(!b)throw new Error(`Reward ${c.id} is missing its immutable verifier source.`);let f=c.verifierRef.path;m.some(h=>h.path===f)||m.push({path:f,role:"verifier",content:O(b,c.verifierRef)})}let v=F.parse({schemaVersion:"openpond.taskset.v1",id:`learning-${d([e.profileId,e.batch.contentHash]).slice(0,40)}`,revision:1,profileId:e.profileId,profileRelease:null,createImproveRunId:null,name:`${e.definition.name} \xB7 ${e.batch.examples.length} approved examples`,objective:e.definition.instructions,purpose:"general",benchmark:null,status:"needs_review",sourceRefs:[e.source],datasetArtifact:null,policy:t.policy,environment:{protocolVersion:"openpond.taskEnvironment.v1",kind:r?"work":"chat",entrypoint:t.environment.entrypoint,stateful:t.environment.stateful,deterministicSeeds:t.environment.deterministicSeeds,toolNames:t.tools.map(c=>c.name),lifecycle:["create","reset","step","grade","cleanup"],defaultTimeoutMs:t.environment.defaultTimeoutMs,networkPolicy:t.environment.networkPolicy,metadata:{portableEnvironment:t.environment,portableTools:t.tools}},capabilities:{schemaVersion:"openpond.tasksetCapabilities.v1",taskKind:r?"single_agent":"chat",supportedSignals:i.demonstrations.length?["demonstration","reward"]:["reward"],compatibleMethods:e.batch.purpose==="supervised_training"?["sft"]:e.batch.purpose==="reward_training"?["grpo","ppo"]:["none"],rewardKinds:[...new Set(t.graders.map(c=>c.kind==="human"?"human":c.kind==="model_judge"?"model_judge":"deterministic"))],requiresTools:t.tools.length>0,requiresState:t.environment.stateful,requiresPrivilegedGrading:!0,environmentPlacements:["local","remote"],exportable:!0,portabilityBlockers:[]},tasks:s.tasks.map(c=>({...c,schemaVersion:"openpond.taskData.v1",sourceRefs:[o],metadata:{admission:a.admissions.find(b=>b.taskId===c.id),exampleOrigin:e.evidence.find(b=>b.id===c.id)?.correctionFeedbackId?"corrected":"extracted"}})),graders:l,graderFixtures:p,learningSignals:i,authoringProvenance:{schemaVersion:"openpond.taskAuthoringProvenance.v1",model:null,modelConfig:{},skillHash:d("openpond-learning-batch-v1"),promptTemplateVersion:"learning-batch-v1",buildIntent:e.batch.purpose==="supervised_training"?"demonstrations":"verifiable_reward",buildSpecification:null,evidenceHashes:e.batch.examples.map(c=>c.evidence.contentHash),tasksetSdkVersion:"learning-batch-v1",sourceCommit:null,repairHistory:[],createdAt:e.batch.sealedAt},readiness:null,contentHash:"00000000",createdAt:e.batch.sealedAt,updatedAt:e.batch.sealedAt,metadata:{learning:a,learningRelease:V(t),trainingMethod:e.batch.purpose==="supervised_training"?"sft":e.batch.purpose==="reward_training"?"grpo":"none",tasksetOutputContract:r?{mode:"artifacts",requiredOutputSource:"task.requiredOutputs"}:{mode:"structured_json",jsonSchema:e.definition.outputSchema,renderer:null}}});return{taskset:F.parse({...v,contentHash:J(v)}),release:t,generatedFiles:m,tasksetAssetBytes:s.tasksetAssetBytes}}k(Ce,"materializeLearningBatchTaskset");function Oe(e){if(!e)return null;let t=e.training.status==="not_configured"?e.evaluation:e.training;return t.status!=="scored"?null:{passed:t.passed===!0,rewardEligible:e.training.status==="scored"}}k(Oe,"fixtureOutcome");function ot(e){let t=[],a=0;for(let s of new Map(e.evidence.flatMap(i=>i.submission.assets.map(p=>[p.id,p]))).values()){let i=e.assetBytes?.get(s.id),p=e.assets?.find(m=>m.id===s.id),l=i?.byteLength??(p?new TextEncoder().encode(p.text).byteLength:0);if(a+=l,a>ae)throw new Error("Learning input assets exceed the training package limit.");i?t.push(new TextDecoder().decode(i)):p&&t.push(p.text)}let r=Be(JSON.stringify({tasks:e.evidence.map(s=>s.submission),targets:e.decisions.map(s=>s.approvedTarget),definition:e.definition,inputAssets:t}));if(r.secretStatus!=="passed"||r.piiStatus!=="passed")throw new Error(`Learning batch contains unresolved data findings (${r.findings.join(", ")}). Correct the source examples and seal a revised batch before training.`);let o=te.parse({schemaVersion:"openpond.learningBatchDatasetSource.v1",kind:"learning_batch",id:`batch-source-${e.batch.contentHash.slice(0,40)}`,profileId:e.profileId,title:e.definition.name,sourceHash:e.batch.contentHash,occurredAt:e.batch.sealedAt,batch:V(e.batch),taskDefinition:e.batch.taskDefinition,admittedBy:e.batch.sealedBy,licensingStatus:"approved",secretScanStatus:r.secretStatus,piiScanStatus:r.piiStatus,metadata:{admission:e.admissionContext??"explicit_local_batch_review",privacyScanner:"openpond-evidence-v1",findings:r.findings}});return Ce({...e,source:o})}k(ot,"prepareReviewedLearningBatch");async function dt(e){let t=structuredClone(e),{project:a,recipe:r,taskset:o,approval:s}=t,i=xe.parse(t.manifest),p=He.parse(t.bundleManifest),l=t.executionMode==="qualification",m=t.gpuSelection??a.trainingSetup.managedGpuSelection?ee.parse(t.gpuSelection??a.trainingSetup.managedGpuSelection):void 0,v=t.physicalPlacement?fe.parse(t.physicalPlacement):void 0,c=i.qualificationSamples===void 0?null:n.object({rollout:n.object({groupSize:n.number().int().min(2).max(32)}).passthrough()}).passthrough().parse(r).rollout.groupSize;if(i.qualificationSamples!==p.qualificationSamples||i.qualificationSamples!==void 0&&(!l||i.qualificationSamples>c))throw new Error("Qualification samples must be within the pinned rollout group and cannot be used for training.");if(i.executionMode!==t.executionMode||p.executionMode!==t.executionMode)throw new Error("Managed submission execution mode differs from its immutable bundle.");if(l&&(t.evaluationSource||t.resumeFrom||t.rewardSource.kind!=="deterministic"))throw new Error("Qualification requires the original learner, deterministic rewards, and no evaluation source.");let{contentHash:b,...f}=i,{contentHash:h,...x}=p;if(d(f)!==b||d(x)!==h||i.resolvedBundleHash!==h||d(i.harnessRelease)!==d(p.harnessRelease)||d(i.datasetRelease)!==d(p.datasetRelease)||d(i.evidenceSets)!==d(p.evidenceSetRelease?[p.evidenceSetRelease]:[]))throw new Error("The managed training manifest or resolved bundle changed.");if(!a.hosted||a.hosted.syncedSourceRevision!==a.revision||a.hosted.portableProjectId!==a.id)throw new Error("Sync the exact Model Project revision before preparing managed training.");let S=a.trainingSetup.baseModel;if(!S||S.modelId!==i.model.source||S.revision!==i.model.revision||S.tokenizerRevision!==i.model.tokenizerRevision||S.chatTemplateHash!==i.model.chatTemplateHash)throw new Error("The synced Model Project base Model does not match the Run manifest.");if(!["grpo","sft"].includes(r.method)||d(r)!==i.recipe.configHash||s.approvalHash!==i.approval.approvalHash||s.maximumSpendUsd!==i.approval.maximumSpendUsd)throw new Error("Managed training requires the exact approved supported recipe and spend ceiling.");if(r.method==="sft"){let T=ue.parse(r);if(d(T)!==d(r))throw new Error("SFT recipe must be fully materialized before approval.");if(l||t.resumeFrom||v||(m?.gpuCount??1)!==1)throw new Error("Initial managed SFT requires a fresh single-GPU run without reuse-only placement or rollout qualification.")}let H=n.object({wallTimeMs:n.number().positive()}).parse(r.resourceLimits);t.idempotencyKey!==void 0&&n.string().trim().min(16).max(191).parse(t.idempotencyKey);let E=$e(p,t.files),A=l?null:Z.parse(t.evaluationSource),y=E.find(T=>T.path===W);if(A&&(!y||d(JSON.parse(Buffer.from(y.content,"base64").toString("utf8")))!==d(A)))throw new Error("The evaluation source differs from the immutable training bundle.");if(l&&(y||E.some(T=>T.path==="dataset/train.json")||!E.some(T=>T.path==="dataset/qualification.json")||!E.some(T=>T.path==="qualification-source.json")))throw new Error("Qualification requires its dedicated dataset and no training/evaluation datasets.");if(!l&&E.some(T=>T.path==="dataset/qualification.json"||T.path==="qualification-source.json"))throw new Error("Qualification datasets cannot be prepared as training.");let _=A?await ge(A):null,C={schemaVersion:"openpond.managedRlPortableSubmission.v1",...l?{executionMode:"qualification"}:{},...t.origin?{origin:K.parse(t.origin)}:{},...v?{physicalPlacement:v}:{},sourceRunRef:`openpond:model-run:${i.id}`,name:`OpenPond Managed \xB7 ${a.id}`.slice(0,191),idempotencyKey:t.idempotencyKey??`openpond-managed:${b}`.slice(0,191),modelProject:{id:a.hosted.projectId,portableProjectId:a.hosted.portableProjectId},manifest:i,sourceTaskset:o,modelImprovementQualification:t.modelImprovementQualification??null,recipe:r,resolvedBundle:{manifest:p,files:E},validationTasks:A?.tasks??[],validationAssets:A?.assets??[]},j={schemaVersion:"openpond.trainingInputArtifactUpload.v2",kind:"portable_training_bundle",idempotencyKey:`stage:${t.idempotencyKey??b}`,sourceManifest:{id:i.id,contentHash:b},payload:C},P=await be({...j,contentHash:await ve(j)}),u={schemaVersion:"openpond.trainingJobSubmission.v2",idempotencyKey:t.idempotencyKey??`openpond-training-v2:${b}`,name:`OpenPond Managed \xB7 ${a.id}`.slice(0,200),source:{...t.origin?{origin:K.parse(t.origin)}:{},modelProject:{id:a.hosted.projectId,portableProjectId:a.hosted.portableProjectId,revision:a.revision,contentHash:a.hosted.etag},harnessRunManifest:j.sourceManifest,harnessRelease:i.harnessRelease,taskset:o,tasksetRelease:{id:o.id,contentHash:o.contentHash},dataset:p.datasetRelease,..._?{evaluation:_}:{},evidenceSets:p.evidenceSetRelease?[p.evidenceSetRelease]:[]},job:{kind:"policy_optimize",...l?{executionMode:"qualification"}:{},baseModel:S,recipe:r,rewardSource:t.rewardSource,resumeFrom:t.resumeFrom},requestedCapabilities:[{id:l?"managed_rl.policy.qualification":r.method==="sft"?"managed_training.sft":"managed_rl.policy.grpo",version:"1",required:!0},...m?.gpuCount===2?[{id:"managed_rl.policy.data_parallel",version:"1",required:!0}]:[],{id:`managed_rl.rollouts.${i.runtimeTarget.placement}`,version:"1",required:!0},...a.trainingSetup.managedGpuRequirement==="h100_hbm3"?[{id:"managed_rl.gpu.h100_hbm3",version:"1",required:!0}]:[]],placementObjective:a.trainingSetup.managedGpuPlacementObjective,...m?{gpuSelection:m}:{},...v?{physicalPlacement:v}:{},budget:{maximumSpendUsd:s.maximumSpendUsd,maximumWallSeconds:Math.ceil(H.wallTimeMs/1e3)},approval:{...s,approvedAt:i.approval.approvedAt,exportApproved:!0}},w=await ke({...u,contentHash:await we(u)});return{artifact:P,submission:w}}k(dt,"prepareManagedTrainingSubmission");function $e(e,t){if(t.length!==e.files.length||new Set(t.map(r=>r.path)).size!==t.length)throw new Error("The managed bundle file inventory changed.");let a=new Map(t.map(r=>[r.path,r]));return e.files.map(r=>{let o=a.get(r.path);if(!o||o.path.includes("\\")||o.path.includes("\0")||o.path.split("/").some(i=>!i||i==="."||i==="..")||o.path==="bundle-manifest.json"||o.encoding!=="base64")throw new Error("The managed bundle contains an invalid file.");let s=Buffer.from(o.content,"base64");if(s.toString("base64")!==o.content||o.sha256!==r.sha256||o.sizeBytes!==r.sizeBytes||s.byteLength!==r.sizeBytes||$(s)!==r.sha256)throw new Error(`Managed training bundle file ${o.path} changed before upload.`);return o})}k($e,"verifyFiles");var Le=n.object({name:n.literal("adamw").default("adamw"),weightDecay:n.number().nonnegative().max(1).default(0),beta1:n.number().positive().lt(1).default(.9),beta2:n.number().positive().lt(1).default(.999),epsilon:n.number().positive().max(.01).default(1e-8)}).strict().default({name:"adamw",weightDecay:0,beta1:.9,beta2:.999,epsilon:1e-8});function pt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return t;let a=t;if(a.method==="dpo"){let y=R(a.policyModel),_=R(a.referenceModel),C=R(a.dataset),j=d({tasksetHash:e.contentHash,preferenceSignals:e.learningSignals.preferences.map(P=>({id:P.id,artifactRef:P.artifactRef,prompt:P.prompt,chosen:P.chosen,rejected:P.rejected,approved:P.approved})),policyModel:y,referenceModel:_,dataset:C});return{...a,referenceLogprobs:{cacheSchemaVersion:"openpond.dpoReferenceLogprobs.v1",cacheKey:d(["dpo-reference-logprobs",j]),invalidationHash:j}}}if(a.method==="ppo"){let y=R(a.policyOptimization),_=R(y.policyModel),C=R(y.referenceModel),j=R(y.optimizer),P=R(j.valueModel),u=R(y.dataset),w=R(y.reward),T=d(_),g=d(C),L=d(P);return{...a,policyOptimization:{...y,dataset:{...u,tasksetId:e.id,tasksetHash:e.contentHash},reward:{...w,graderHash:d(e.graders)}},resume:{...R(a.resume),policyHash:T,referenceHash:g,valueModelHash:L}}}if(a.method!=="grpo")return t;let r=a.reward&&typeof a.reward=="object"&&!Array.isArray(a.reward)?a.reward:{},o=e.environment.metadata.toolContractHash,s=typeof o=="string"&&o.trim()?o:r.toolContractHash,i=R(a.baseModel),p=R(a.dataset),l=R(a.rollout),m=R(a.optimizer),v=R(a.loss),c=R(a.resourceLimits),b=M(p.maxExamples,1),f=M(l.groupSize,2),h=M(l.maxOutputTokens,1),x=M(p.maxPromptTokens,1),S=M(m.maxSteps,1),H=M(m.iterations,2),E=M(c.maxRollouts,S*f),A=M(l.maxTurns,1);return{...a,resourceLimits:{...c,maxGpuSeconds:c.maxGpuSeconds??Math.min(10800,Math.ceil(M(c.wallTimeMs,18e4)/1e3))},reward:{...r,graderHash:d(e.graders),toolContractHash:s},policyOptimization:{schemaVersion:"openpond.policyOptimization.v1",policyModel:i,referenceModel:i,dataset:{tasksetId:e.id,tasksetHash:e.contentHash,split:"train",selectionStrategy:p.selectionStrategy,selectionSeed:l.seed,maxExamples:b},sampler:{temperature:l.temperature,topP:l.topP,maxOutputTokens:h,maxTurns:l.maxTurns,concurrency:l.concurrency},environment:{id:r.environmentId,version:r.environmentVersion,toolContractHash:s},reward:{graderId:r.graderId,graderHash:d(e.graders),learnedPreference:r.learnedPreference??null},kl:{coefficient:v.klBeta??null,referenceConstraint:"fixed_reference"},budgets:{maxRollouts:E,maxEnvironmentExecutions:E,maxInputTokens:E*A*x,maxOutputTokens:E*A*h,maxOptimizerSteps:S*H,wallTimeMs:M(c.wallTimeMs,18e4),maximumCostUsd:null},checkpointEverySteps:1,seed:l.seed,evaluationSplit:"frozen_eval",optimizer:{method:"grpo",groupSize:f,normalization:"group_standardized",advantageEpsilon:typeof m.advantageEpsilon=="number"?m.advantageEpsilon:1e-8,loss:v.method??"grpo",clipRange:typeof m.clipRange=="number"?m.clipRange:.2,iterations:H,microbatchSize:M(m.microbatchSize,1),gradientAccumulationSteps:M(m.gradientAccumulationSteps,1),adamw:Le.parse(m.adamw)}}}}k(pt,"withAuthoritativeRecipeHashes");function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}k(R,"record");function M(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>0?e:t}k(M,"positiveInteger");function mt(e){let t=e.sourceRelease,a=[],r=e.skills??[],o=e.agents??[];if([...r,...o].some(m=>m.visibility!=="policy"))throw new Error("The portable policy Harness requires policy-visible dependencies.");let s=Se({id:"desktop-dependency-lock",path:".openpond/harness/dependency-lock.json",hashInput:{profileHead:e.profileHead??null,sourceRelease:t,tools:a,skills:r.map(({id:m,contentHash:v})=>({id:m,contentHash:v})),agents:o.map(({id:m,contentHash:v})=>({id:m,contentHash:v}))},mediaType:"application/json",visibility:"policy"}),i=re({schemaVersion:"openpond.agentSnapshot.v2",id:`agent-snapshot-${d([t,a,s.contentHash]).slice(0,24)}`,sourceRelease:t,instructions:[],skills:r,agents:o,toolDeclarations:a,capabilityRequirements:[],dependencyLock:s,portability:{portable:!0,blockers:[],localOnlyAssetRefs:[],hostPrivateAssetRefs:[]},metadata:{sourceReleaseId:t?.id??null}}),p=Se({id:"desktop-harness-program",path:".openpond/harness/program.json",hashInput:{program:"openpond.desktop-agent-loop.v1"},mediaType:"application/json",visibility:"policy"}),l=oe({schemaVersion:"openpond.harnessRelease.v2",id:`harness-${d([i.contentHash,p.contentHash,a]).slice(0,24)}`,agentSnapshot:{id:i.id,contentHash:i.contentHash},program:p,tools:a,lifecycle:{create:!0,reset:!0,step:!0,collect:!0,destroy:!0,resetScope:"attempt"},graderInterface:{visibleEvidence:["output","runtime_events","artifacts"],privilegedEvidence:["expected_output","private_verifier"],privateVerifierIsolation:!0},files:[...r,...o],metadata:{runtimeProtocol:"openpond.desktop-agent-loop.v1"}});return{agentSnapshot:i,harnessRelease:l}}k(mt,"createPolicyHarnessContext");function Se(e){let t=D(e.hashInput);return{id:e.id,path:e.path,contentHash:d(e.hashInput),sizeBytes:new TextEncoder().encode(t).byteLength,mediaType:e.mediaType,visibility:e.visibility}}k(Se,"asset");function ut(e){let{taskset:t,modelProject:a,harnessRelease:r,tasksetRelease:o}=e,s=a.trainingSetup,i=e.executionMode==="qualification",p=e.qualificationSamples===void 0?null:n.object({rollout:n.object({groupSize:n.number().int().min(2).max(32)}).passthrough()}).passthrough().parse(e.modelProject.trainingSetup.recipe).rollout.groupSize;if(e.qualificationSamples!==void 0&&(!i||!Number.isInteger(e.qualificationSamples)||e.qualificationSamples<1||e.qualificationSamples>p))throw new Error("Qualification samples must be within the pinned rollout group and cannot be used for training.");if(i&&e.evaluationSource)throw new Error("Qualification does not consume an independent evaluation source.");let l=i?se(e.qualificationSource):null;if(!i&&e.qualificationSource)throw new Error("Qualification sources cannot be used for training.");if(!i&&e.qualificationTaskId!==void 0)throw new Error("Qualification selection cannot be used for training.");if(i&&(!e.qualificationTaskId||!t.tasks.some(u=>u.id===e.qualificationTaskId)))throw new Error("Qualification requires one explicit task ID from its published source.");if(l&&(l.modelResources||l.learningResources||d(t.tasks.map(me))!==d(l.taskset.tasks)||ye(e.tasksetRelease)!==ye(l.taskset)))throw new Error("Qualification must preserve its ordinary source release and complete task population.");let m=B.parse(r),v=B.parse(o);if(e.openpondRelease,e.workerProtocol,J(t)!==t.contentHash)throw new Error("Taskset authoring state changed after its release was selected.");if(!s.baseModel?.revision||!s.baseModel.tokenizerRevision||!s.baseModel.chatTemplateHash||!s.recipe||!s.tasksetRef||s.tasksetRef.id!==(i?o.id:t.id)||s.tasksetRef.contentHash!==(i?o.contentHash:t.contentHash))throw new Error("Model Run must bind an exact Taskset, Model revision, tokenizer, chat template, and Recipe.");let b=t.profileRelease??{id:`profile_${t.profileId}`,revision:t.revision,contentHash:d({profileId:t.profileId,sourceCommit:t.authoringProvenance.sourceCommit,skillHash:t.authoringProvenance.skillHash})},f=new Map;if(l&&z(f,"qualification-source.json",l),e.evaluationSource){let u=Z.parse(e.evaluationSource);if(d(u.taskset)!==d(s.evaluationTasksetRef))throw new Error("The evaluation source differs from the prepared Model configuration.");he(t.tasks.filter(w=>w.split==="train"),u.tasks),f.set(W,new TextEncoder().encode(D(u)))}else if(!i&&s.evaluationTasksetRef)throw new Error("The prepared Model requires its pinned evaluation source bytes.");let h=e.harnessSource?e.harnessSource.schemaVersion==="openpond.harnessPolicySourcePackage.v1"?de(e.harnessSource,m):le(e.harnessSource,m):null;if(s.harnessRelease&&!h)throw new Error("A selected Harness requires its complete immutable source package.");if(h&&(!s.harnessRelease||s.harnessRelease.id!==m.id||s.harnessRelease.contentHash!==m.contentHash))throw new Error("Harness source differs from the Model's explicit selection.");if(h){if((e.runtime.placement!=="local"||e.compute.kind!=="local")&&(!h.agentSnapshot.portability.portable||h.schemaVersion==="openpond.harnessSourcePackage.v1"&&h.harnessRelease.files.some(w=>w.visibility!=="policy")))throw new Error("The selected Harness contains source that cannot leave its local host.");z(f,"harness/source-package.json",h)}z(f,"harness/execution.json",ce.parse({schemaVersion:"openpond.harnessSourceSelection.v1",mode:h?"selected_release":"taskset_owned",harnessRelease:m,sourcePackageHash:h?.contentHash??null}));let x=pe(t,e.rewardExecution);if(l&&(!x||d(U(x.binding,x.rewards))!==d(l.taskset.graders)||l.taskset.graders.some(u=>u.kind==="model_judge"||u.kind==="human")))throw new Error("Qualification requires the source package's exact deterministic graders.");if(x){let u=e.verifierAssets??[],w=[...x.rewards.flatMap(g=>g.assets),...U(x.binding,x.rewards).flatMap(g=>g.kind==="custom_verifier"?[g.verifierRef]:g.kind==="model_judge"?[g.rubricRef]:[])],T=new Set(w.map(g=>g.id));if(new Set(u.map(g=>g.id)).size!==u.length||new Set(u.map(g=>g.asset.path)).size!==u.length||u.some(g=>!T.has(g.id)))throw new Error("Unexpected or duplicate private verifier asset.");for(let g of w){let L=u.find(Ae=>Ae.id===g.id);if(!L||g.visibility!=="verifier")throw new Error("Training bundle requires its private verifier asset.");O(L,g)}z(f,"reward-binding.json",{kind:"reward_binding_v1",binding:x.binding,rewards:x.rewards,assets:u})}else if(e.verifierAssets?.length)throw new Error("Private verifier assets require a published Reward binding.");let S=t.metadata.tasksetOutputContract;S&&typeof S=="object"&&"responsePath"in S&&ie.parse({jsonSchema:null,renderer:null,...S}),z(f,"environment.json",{schemaVersion:"openpond.harnessEnvironment.v1",environment:{...t.environment,metadata:{...t.environment.metadata,policySystemPrompt:t.objective}},capabilities:t.capabilities,policy:t.policy,outputContract:t.metadata.tasksetOutputContract?.mode==="text"?null:t.metadata.tasksetOutputContract??null}),z(f,"graders.json",{schemaVersion:"openpond.harnessGraders.v1",graders:t.graders,fixtures:t.graderFixtures}),z(f,"tool-contract.json",{schemaVersion:"openpond.harnessToolContract.v1",toolNames:t.environment.toolNames,actionBindings:t.environment.actionBindings??[],capabilities:t.capabilities,connectedAppScopes:t.policy.connectedAppScopes});let H=i?t.tasks.filter(u=>u.id===e.qualificationTaskId):t.tasks.filter(u=>u.split==="train");if(H.length>0)z(f,i?"dataset/qualification.json":"dataset/train.json",{schemaVersion:i?"openpond.qualificationDataset.v1":"openpond.datasetSplit.v1",...i?{selectedTaskId:e.qualificationTaskId}:{split:"train"},tasks:H}),Ve({assets:f,tasks:H,tasksetAssetBytes:e.tasksetAssetBytes??new Map});else if(t.datasetArtifact)z(f,"dataset/artifact.json",t.datasetArtifact);else throw new Error("Taskset has no training dataset.");let E=Object.values(t.learningSignals).flat().filter(u=>u.approved);for(let u of E){let w=Ee(u);f.set(`evidence/signals/${$(w)}.json`,w)}let A={id:`dataset_${t.id}_r${t.revision}`,contentHash:d({taskset:v,sourceRefs:t.sourceRefs,datasetArtifact:t.datasetArtifact??null,...i?{executionMode:"qualification",tasks:H}:{trainTasks:H}})},y=E.length>0?{id:`evidence_${t.id}_r${t.revision}`,contentHash:d({taskset:v,harnessRelease:m,datasetRelease:A,profileRelease:b,signals:E})}:null,_=Te.parse({schemaVersion:"openpond.resolvedTrainingBundle.v1",...i?{executionMode:"qualification"}:{},...e.qualificationSamples!==void 0?{qualificationSamples:e.qualificationSamples}:{},projection:"trainer",harnessRelease:m,datasetRelease:A,evidenceSetRelease:y,files:[...f.entries()].sort(([u],[w])=>u.localeCompare(w)).map(([u,w])=>({path:u,sha256:$(w),sizeBytes:w.byteLength}))}),C=He.parse({..._,contentHash:d(_)}),j=Re.parse({schemaVersion:"openpond.harnessRunManifest.v1",...i?{executionMode:"qualification"}:{},...e.qualificationSamples!==void 0?{qualificationSamples:e.qualificationSamples}:{},id:`manifest_${e.modelRunId}_${e.approval.approvalHash.slice(0,16)}`,harnessRelease:r,datasetRelease:A,evidenceSets:y?[y]:[],model:{source:s.baseModel.modelId,revision:s.baseModel.revision,artifactHash:null,tokenizerRevision:s.baseModel.tokenizerRevision,chatTemplateHash:s.baseModel.chatTemplateHash},recipe:{method:s.recipe.method,version:"openpond.trainingRecipe.v1",configHash:d(s.recipe)},runtimeTarget:e.runtime,computeTarget:e.compute,engine:e.engine,resolvedBundleHash:C.contentHash,secretLeaseRefs:e.secretLeaseRefs??[],approval:e.approval,createdAt:a.updatedAt});return{manifest:xe.parse({...j,contentHash:d(j)}),resolvedBundleManifest:C,assets:f,profileRelease:b,harnessRelease:m,tasksetRelease:v,datasetRelease:A,evidenceSetRelease:y}}k(ut,"buildTasksetTrainingBundle");function Ve(e){let t=new Set;for(let a of e.tasks)for(let r of a.assets??[]){t.add(r.artifactRef);let o=e.tasksetAssetBytes.get(r.artifactRef);if(!o)throw new Error(`Resolved Training Bundle is missing Work asset ${r.artifactRef}.`);if(o.byteLength!==r.sizeBytes||$(o)!==r.sha256)throw new Error(`Resolved Training Bundle Work asset ${r.artifactRef} failed immutable verification.`);e.assets.set(r.artifactRef,o)}for(let a of e.tasksetAssetBytes.keys())if(!t.has(a))throw new Error(`Resolved Training Bundle received unexpected Work asset ${a}.`)}k(Ve,"addTasksetAssets");function z(e,t,a){e.set(t,Ee(a))}k(z,"addJsonAsset");function Ee(e){return Buffer.from(D(e),"utf8")}k(Ee,"bytes");function ye(e){return d({id:e.id,contentHash:e.contentHash})}k(ye,"releasedRefHash");export{Me as a,je as b,Pe as c,xe as d,He as e,Be as f,ot as g,dt as h,Le as i,pt as j,mt as k,ut as l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as b}from"./chunk-OE22TAXP.js";import{c as i,d as s,e as u,g as _,j as R,n as l}from"./chunk-VVNV4NNW.js";import{A as t}from"./chunk-PF56N7ZY.js";import{a as o}from"./chunk-FTQLQJQV.js";var H="openpond.workEvidenceReceipt.v1",W="openpond.workProcessTrace.v1",E="openpond.workFeedbackReceipt.v1",J="openpond.workEvidenceEligibility.v1",w=t.string().regex(/^urn:openpond:work:[a-f0-9]{64}$/,"Work source references must be opaque SHA-256 URNs."),C=t.string().regex(/^urn:openpond:workspace:[a-f0-9]{64}$/,"Workspace references must be opaque SHA-256 URNs."),I=t.string().regex(/^urn:openpond:artifact:[a-f0-9]{64}$/,"Evidence artifacts must use content-addressed SHA-256 URNs."),r=R.extend({id:I}).strict().superRefine((e,n)=>{e.id!==S(e.contentHash)&&n.addIssue({code:"custom",message:"Evidence artifact id must contain its content hash.",path:["id"]})}),A=t.enum(["tool","validation","state_transition","approval","question","artifact","cleanup"]),q=t.enum(["agent","environment"]),T=t.enum(["turn_started","turn_completed","turn_failed","turn_cancelled","turn_timed_out","tool_invoked","tool_completed","tool_failed","validation_completed","validation_failed","approval_requested","approval_resolved","question_asked","question_answered","question_dismissed","artifact_created","workspace_changed","environment_created","environment_reset","environment_destroyed","cleanup_completed","cleanup_failed"]),P=t.enum(["started","completed","failed","cancelled"]),O=t.enum(["filesystem","source_control","command","browser","connected_app","sandbox","agent","other"]),V=t.enum(["structural","visual","test","user_review","other"]),j=t.enum(["running","completed","failed","cancelled","timeout"]),F=t.enum(["requested","approved","denied","answered","dismissed"]),z=t.enum(["policy","validation","environment","infrastructure","timeout","cancelled","unknown"]),M=t.enum(["missing_start","missing_terminal","source_truncated","unsupported_events_dropped","uncorrelated_environment_step","artifact_unavailable"]),N=t.object({sequence:t.number().int().nonnegative().max(1e6),timestamp:u,layer:q,kind:A,action:T,status:P,inputHash:s.nullable(),outputHash:s.nullable(),receiptHash:s.nullable(),parentReceiptHash:s.nullable(),artifactRefs:t.array(r).max(1e3),attributes:t.object({toolCategory:O.nullable(),validationKind:V.nullable(),transitionState:j.nullable(),interventionOutcome:F.nullable(),artifactCount:t.number().int().nonnegative().max(1e5),exitCode:t.number().int().min(-1).max(255).nullable(),durationMs:t.number().int().nonnegative().max(31536e6).nullable(),cpuTimeMs:t.number().int().nonnegative().max(31536e6).nullable(),memoryPeakBytes:t.number().int().nonnegative().max(0x4000000000000).nullable(),errorClass:z.nullable()}).strict()}).strict().superRefine((e,n)=>{e.layer==="agent"&&e.parentReceiptHash!==null&&n.addIssue({code:"custom",message:"Agent-layer steps cannot have a parent environment correlation.",path:["parentReceiptHash"]}),e.layer==="environment"&&e.parentReceiptHash===null&&n.addIssue({code:"custom",message:"Environment steps must correlate to an Agent receipt.",path:["parentReceiptHash"]})}),m=t.object({schemaVersion:t.literal(W),sourceRevisionHash:s,sanitationPolicyVersion:i,incomplete:t.boolean(),incompleteReasons:t.array(M).max(10),droppedEventCount:t.number().int().nonnegative().max(1e6),steps:t.array(N).max(1e5)}).strict().superRefine((e,n)=>{e.incomplete!==e.incompleteReasons.length>0&&n.addIssue({code:"custom",message:"incomplete must match the presence of incompleteReasons.",path:["incomplete"]});for(let a=0;a<e.steps.length;a+=1)e.steps[a].sequence!==a&&n.addIssue({code:"custom",message:"Process trace sequences must be contiguous and zero-based.",path:["steps",a,"sequence"]})}),k=m.safeExtend({contentHash:s}).strict(),K=t.enum(["policy_failure","validation_failure","model_failure","environment_failure","infrastructure_failure","timeout","cancelled","unknown"]),$=t.object({status:t.enum(["completed","failed","cancelled","timeout"]),failureClass:K.nullable()}).strict().superRefine((e,n)=>{e.status==="completed"&&e.failureClass!==null&&n.addIssue({code:"custom",message:"Completed Work cannot carry a failure class.",path:["failureClass"]}),e.status!=="completed"&&e.failureClass===null&&n.addIssue({code:"custom",message:"Non-completed Work requires a failure class.",path:["failureClass"]}),e.status==="cancelled"&&e.failureClass!=="cancelled"&&n.addIssue({code:"custom",message:"Cancelled Work must use the cancelled failure class.",path:["failureClass"]}),e.status==="timeout"&&e.failureClass!=="timeout"&&n.addIssue({code:"custom",message:"Timed-out Work must use the timeout failure class.",path:["failureClass"]})}),f=t.object({schemaVersion:t.literal(H),id:t.string().regex(/^work-evidence-[a-f0-9]{24}$/),source:t.object({surface:t.enum(["desktop","hosted"]),experience:t.enum(["work","development"]),opaqueRef:w,revisionHash:s}).strict(),agentSnapshot:_.nullable(),model:b,runtime:t.object({adapterId:i,adapterVersion:i,capabilityRef:r.nullable()}).strict(),inputHash:s,terminal:$,trace:t.object({sanitizedRef:r,traceHash:s,sanitationPolicyVersion:i,incomplete:t.boolean()}).strict(),outputRefs:t.array(r).max(1e4),artifactRefs:t.array(r).max(1e5),validationEvidenceRefs:t.array(r).max(1e4),interventions:t.object({approvals:t.number().int().nonnegative().max(1e6),questions:t.number().int().nonnegative().max(1e6),steeringEvents:t.number().int().nonnegative().max(1e6),otherUserInterventions:t.number().int().nonnegative().max(1e6)}).strict(),timing:t.object({startedAt:u,completedAt:u,latencyMs:t.number().int().nonnegative().max(31536e6)}).strict(),usage:t.object({promptTokens:t.number().int().nonnegative().nullable(),completionTokens:t.number().int().nonnegative().nullable(),totalTokens:t.number().int().nonnegative().nullable()}).strict(),costUsd:t.number().nonnegative().max(1e6).nullable(),provenance:t.object({consentReceiptRef:r,consentScope:t.literal("work_process_and_artifacts"),consentGrantedAt:u,policyVersion:i,projectorVersion:i,disclosure:t.literal("portable_sanitized"),ownershipScope:t.enum(["personal","workspace"]),workspaceRef:C.nullable(),participantPolicy:t.enum(["creator_only","all_participants"]),retention:t.object({policy:t.literal("source_bound"),deleteWithSource:t.literal(!0),expiresAt:u.nullable()}).strict()}).strict()}).strict().superRefine((e,n)=>{e.trace.traceHash!==e.trace.sanitizedRef.contentHash&&n.addIssue({code:"custom",message:"Sanitized trace reference must bind traceHash.",path:["trace","traceHash"]});let a=Date.parse(e.timing.completedAt)-Date.parse(e.timing.startedAt);(a<0||a!==e.timing.latencyMs)&&n.addIssue({code:"custom",message:"latencyMs must equal completedAt minus startedAt.",path:["timing","latencyMs"]}),e.provenance.ownershipScope==="workspace"&&e.provenance.workspaceRef===null&&n.addIssue({code:"custom",message:"Workspace-owned evidence requires workspaceRef.",path:["provenance","workspaceRef"]}),e.provenance.ownershipScope==="personal"&&e.provenance.workspaceRef!==null&&n.addIssue({code:"custom",message:"Personal evidence cannot carry workspaceRef.",path:["provenance","workspaceRef"]}),d(e.outputRefs,["outputRefs"],n),d(e.artifactRefs,["artifactRefs"],n),d(e.validationEvidenceRefs,["validationEvidenceRefs"],n)}),g=f.safeExtend({contentHash:s}).strict(),B=t.enum(["accepted","needs_correction","not_useful"]),D=t.enum(["correct","complete","high_quality","incorrect","incomplete","wrong_format","unsafe","stale","irrelevant","other"]),h=t.object({schemaVersion:t.literal(E),id:t.string().regex(/^work-feedback-[a-f0-9]{24}$/),evidenceReceiptRef:r,outputRevisionRef:r.nullable(),verdict:B,reasonCodes:t.array(D).max(16),correctionRef:r.nullable(),correctedOutputRevisionRef:r.nullable(),actor:t.literal("user"),createdAt:u}).strict().superRefine((e,n)=>{new Set(e.reasonCodes).size!==e.reasonCodes.length&&n.addIssue({code:"custom",message:"Feedback reason codes must be unique.",path:["reasonCodes"]}),e.verdict!=="needs_correction"&&(e.correctionRef||e.correctedOutputRevisionRef)&&n.addIssue({code:"custom",message:"Only needs_correction feedback may bind correction artifacts.",path:["verdict"]})}),x=h.safeExtend({contentHash:s}).strict();function S(e){return`urn:openpond:artifact:${e}`}o(S,"evidenceArtifactId");function Q(e){return`urn:openpond:work:${l(e)}`}o(Q,"workSourceOpaqueRef");function X(e){return`urn:openpond:workspace:${l(e)}`}o(X,"workWorkspaceOpaqueRef");function U(e){return r.parse({id:S(e.contentHash),contentHash:e.contentHash,mediaType:e.mediaType??null,sizeBytes:e.sizeBytes??null})}o(U,"evidenceArtifactRef");function Z(e){let n=m.parse(e);return k.parse({...n,contentHash:l(n)})}o(Z,"createWorkProcessTrace");function ee(e){let n=f.parse(e);return g.parse({...n,contentHash:l(n)})}o(ee,"createWorkEvidenceReceipt");function te(e,n){let a=h.parse(e),c=x.parse({...a,contentHash:l(a)});return n&&L(c,n),c}o(te,"createWorkFeedbackReceipt");function ne(e){return v(e,k,m)}o(ne,"verifyWorkProcessTrace");function ae(e){return v(e,g,f)}o(ae,"verifyWorkEvidenceReceipt");function oe(e){return v(e,x,h)}o(oe,"verifyWorkFeedbackReceipt");function se(e){return U({contentHash:e.contentHash,mediaType:"application/vnd.openpond.work-evidence+json",sizeBytes:null})}o(se,"workEvidenceReceiptRef");function L(e,n){if(e.evidenceReceiptRef.contentHash!==n.contentHash)throw new Error("Feedback targets a different Work evidence receipt.");if(e.outputRevisionRef&&!n.outputRefs.some(a=>a.contentHash===e.outputRevisionRef.contentHash))throw new Error("Feedback targets an output revision not bound by the Work evidence receipt.")}o(L,"assertFeedbackTargetsEvidence");function v(e,n,a){let c=n.safeParse(e);if(!c.success)return!1;let{contentHash:p,...y}=c.data;return l(a.parse(y))===p}o(v,"verifyHashedValue");function d(e,n,a){let c=e.map(p=>p.contentHash);new Set(c).size!==c.length&&a.addIssue({code:"custom",message:"Artifact content hashes must be unique.",path:n})}o(d,"addDuplicateHashIssues");export{H as a,W as b,E as c,J as d,w as e,C as f,I as g,r as h,A as i,q as j,T as k,P as l,O as m,V as n,j as o,F as p,z as q,M as r,N as s,m as t,k as u,K as v,$ as w,f as x,g as y,B as z,D as A,h as B,x as C,S as D,Q as E,X as F,U as G,Z as H,ee as I,te as J,ne as K,ae as L,oe as M,se as N,L as O};
|
|
2
|
+
import{a as b}from"./chunk-HNQPEOJD.js";import{c as i,d as s,e as u,g as _,j as R,n as l}from"./chunk-RCT3O3HQ.js";import{A as t}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";var H="openpond.workEvidenceReceipt.v1",W="openpond.workProcessTrace.v1",E="openpond.workFeedbackReceipt.v1",J="openpond.workEvidenceEligibility.v1",w=t.string().regex(/^urn:openpond:work:[a-f0-9]{64}$/,"Work source references must be opaque SHA-256 URNs."),C=t.string().regex(/^urn:openpond:workspace:[a-f0-9]{64}$/,"Workspace references must be opaque SHA-256 URNs."),I=t.string().regex(/^urn:openpond:artifact:[a-f0-9]{64}$/,"Evidence artifacts must use content-addressed SHA-256 URNs."),r=R.extend({id:I}).strict().superRefine((e,n)=>{e.id!==S(e.contentHash)&&n.addIssue({code:"custom",message:"Evidence artifact id must contain its content hash.",path:["id"]})}),A=t.enum(["tool","validation","state_transition","approval","question","artifact","cleanup"]),q=t.enum(["agent","environment"]),T=t.enum(["turn_started","turn_completed","turn_failed","turn_cancelled","turn_timed_out","tool_invoked","tool_completed","tool_failed","validation_completed","validation_failed","approval_requested","approval_resolved","question_asked","question_answered","question_dismissed","artifact_created","workspace_changed","environment_created","environment_reset","environment_destroyed","cleanup_completed","cleanup_failed"]),P=t.enum(["started","completed","failed","cancelled"]),O=t.enum(["filesystem","source_control","command","browser","connected_app","sandbox","agent","other"]),V=t.enum(["structural","visual","test","user_review","other"]),j=t.enum(["running","completed","failed","cancelled","timeout"]),F=t.enum(["requested","approved","denied","answered","dismissed"]),z=t.enum(["policy","validation","environment","infrastructure","timeout","cancelled","unknown"]),M=t.enum(["missing_start","missing_terminal","source_truncated","unsupported_events_dropped","uncorrelated_environment_step","artifact_unavailable"]),N=t.object({sequence:t.number().int().nonnegative().max(1e6),timestamp:u,layer:q,kind:A,action:T,status:P,inputHash:s.nullable(),outputHash:s.nullable(),receiptHash:s.nullable(),parentReceiptHash:s.nullable(),artifactRefs:t.array(r).max(1e3),attributes:t.object({toolCategory:O.nullable(),validationKind:V.nullable(),transitionState:j.nullable(),interventionOutcome:F.nullable(),artifactCount:t.number().int().nonnegative().max(1e5),exitCode:t.number().int().min(-1).max(255).nullable(),durationMs:t.number().int().nonnegative().max(31536e6).nullable(),cpuTimeMs:t.number().int().nonnegative().max(31536e6).nullable(),memoryPeakBytes:t.number().int().nonnegative().max(0x4000000000000).nullable(),errorClass:z.nullable()}).strict()}).strict().superRefine((e,n)=>{e.layer==="agent"&&e.parentReceiptHash!==null&&n.addIssue({code:"custom",message:"Agent-layer steps cannot have a parent environment correlation.",path:["parentReceiptHash"]}),e.layer==="environment"&&e.parentReceiptHash===null&&n.addIssue({code:"custom",message:"Environment steps must correlate to an Agent receipt.",path:["parentReceiptHash"]})}),m=t.object({schemaVersion:t.literal(W),sourceRevisionHash:s,sanitationPolicyVersion:i,incomplete:t.boolean(),incompleteReasons:t.array(M).max(10),droppedEventCount:t.number().int().nonnegative().max(1e6),steps:t.array(N).max(1e5)}).strict().superRefine((e,n)=>{e.incomplete!==e.incompleteReasons.length>0&&n.addIssue({code:"custom",message:"incomplete must match the presence of incompleteReasons.",path:["incomplete"]});for(let a=0;a<e.steps.length;a+=1)e.steps[a].sequence!==a&&n.addIssue({code:"custom",message:"Process trace sequences must be contiguous and zero-based.",path:["steps",a,"sequence"]})}),k=m.safeExtend({contentHash:s}).strict(),K=t.enum(["policy_failure","validation_failure","model_failure","environment_failure","infrastructure_failure","timeout","cancelled","unknown"]),$=t.object({status:t.enum(["completed","failed","cancelled","timeout"]),failureClass:K.nullable()}).strict().superRefine((e,n)=>{e.status==="completed"&&e.failureClass!==null&&n.addIssue({code:"custom",message:"Completed Work cannot carry a failure class.",path:["failureClass"]}),e.status!=="completed"&&e.failureClass===null&&n.addIssue({code:"custom",message:"Non-completed Work requires a failure class.",path:["failureClass"]}),e.status==="cancelled"&&e.failureClass!=="cancelled"&&n.addIssue({code:"custom",message:"Cancelled Work must use the cancelled failure class.",path:["failureClass"]}),e.status==="timeout"&&e.failureClass!=="timeout"&&n.addIssue({code:"custom",message:"Timed-out Work must use the timeout failure class.",path:["failureClass"]})}),f=t.object({schemaVersion:t.literal(H),id:t.string().regex(/^work-evidence-[a-f0-9]{24}$/),source:t.object({surface:t.enum(["desktop","hosted"]),experience:t.enum(["work","development"]),opaqueRef:w,revisionHash:s}).strict(),agentSnapshot:_.nullable(),model:b,runtime:t.object({adapterId:i,adapterVersion:i,capabilityRef:r.nullable()}).strict(),inputHash:s,terminal:$,trace:t.object({sanitizedRef:r,traceHash:s,sanitationPolicyVersion:i,incomplete:t.boolean()}).strict(),outputRefs:t.array(r).max(1e4),artifactRefs:t.array(r).max(1e5),validationEvidenceRefs:t.array(r).max(1e4),interventions:t.object({approvals:t.number().int().nonnegative().max(1e6),questions:t.number().int().nonnegative().max(1e6),steeringEvents:t.number().int().nonnegative().max(1e6),otherUserInterventions:t.number().int().nonnegative().max(1e6)}).strict(),timing:t.object({startedAt:u,completedAt:u,latencyMs:t.number().int().nonnegative().max(31536e6)}).strict(),usage:t.object({promptTokens:t.number().int().nonnegative().nullable(),completionTokens:t.number().int().nonnegative().nullable(),totalTokens:t.number().int().nonnegative().nullable()}).strict(),costUsd:t.number().nonnegative().max(1e6).nullable(),provenance:t.object({consentReceiptRef:r,consentScope:t.literal("work_process_and_artifacts"),consentGrantedAt:u,policyVersion:i,projectorVersion:i,disclosure:t.literal("portable_sanitized"),ownershipScope:t.enum(["personal","workspace"]),workspaceRef:C.nullable(),participantPolicy:t.enum(["creator_only","all_participants"]),retention:t.object({policy:t.literal("source_bound"),deleteWithSource:t.literal(!0),expiresAt:u.nullable()}).strict()}).strict()}).strict().superRefine((e,n)=>{e.trace.traceHash!==e.trace.sanitizedRef.contentHash&&n.addIssue({code:"custom",message:"Sanitized trace reference must bind traceHash.",path:["trace","traceHash"]});let a=Date.parse(e.timing.completedAt)-Date.parse(e.timing.startedAt);(a<0||a!==e.timing.latencyMs)&&n.addIssue({code:"custom",message:"latencyMs must equal completedAt minus startedAt.",path:["timing","latencyMs"]}),e.provenance.ownershipScope==="workspace"&&e.provenance.workspaceRef===null&&n.addIssue({code:"custom",message:"Workspace-owned evidence requires workspaceRef.",path:["provenance","workspaceRef"]}),e.provenance.ownershipScope==="personal"&&e.provenance.workspaceRef!==null&&n.addIssue({code:"custom",message:"Personal evidence cannot carry workspaceRef.",path:["provenance","workspaceRef"]}),d(e.outputRefs,["outputRefs"],n),d(e.artifactRefs,["artifactRefs"],n),d(e.validationEvidenceRefs,["validationEvidenceRefs"],n)}),g=f.safeExtend({contentHash:s}).strict(),B=t.enum(["accepted","needs_correction","not_useful"]),D=t.enum(["correct","complete","high_quality","incorrect","incomplete","wrong_format","unsafe","stale","irrelevant","other"]),h=t.object({schemaVersion:t.literal(E),id:t.string().regex(/^work-feedback-[a-f0-9]{24}$/),evidenceReceiptRef:r,outputRevisionRef:r.nullable(),verdict:B,reasonCodes:t.array(D).max(16),correctionRef:r.nullable(),correctedOutputRevisionRef:r.nullable(),actor:t.literal("user"),createdAt:u}).strict().superRefine((e,n)=>{new Set(e.reasonCodes).size!==e.reasonCodes.length&&n.addIssue({code:"custom",message:"Feedback reason codes must be unique.",path:["reasonCodes"]}),e.verdict!=="needs_correction"&&(e.correctionRef||e.correctedOutputRevisionRef)&&n.addIssue({code:"custom",message:"Only needs_correction feedback may bind correction artifacts.",path:["verdict"]})}),x=h.safeExtend({contentHash:s}).strict();function S(e){return`urn:openpond:artifact:${e}`}o(S,"evidenceArtifactId");function Q(e){return`urn:openpond:work:${l(e)}`}o(Q,"workSourceOpaqueRef");function X(e){return`urn:openpond:workspace:${l(e)}`}o(X,"workWorkspaceOpaqueRef");function U(e){return r.parse({id:S(e.contentHash),contentHash:e.contentHash,mediaType:e.mediaType??null,sizeBytes:e.sizeBytes??null})}o(U,"evidenceArtifactRef");function Z(e){let n=m.parse(e);return k.parse({...n,contentHash:l(n)})}o(Z,"createWorkProcessTrace");function ee(e){let n=f.parse(e);return g.parse({...n,contentHash:l(n)})}o(ee,"createWorkEvidenceReceipt");function te(e,n){let a=h.parse(e),c=x.parse({...a,contentHash:l(a)});return n&&L(c,n),c}o(te,"createWorkFeedbackReceipt");function ne(e){return v(e,k,m)}o(ne,"verifyWorkProcessTrace");function ae(e){return v(e,g,f)}o(ae,"verifyWorkEvidenceReceipt");function oe(e){return v(e,x,h)}o(oe,"verifyWorkFeedbackReceipt");function se(e){return U({contentHash:e.contentHash,mediaType:"application/vnd.openpond.work-evidence+json",sizeBytes:null})}o(se,"workEvidenceReceiptRef");function L(e,n){if(e.evidenceReceiptRef.contentHash!==n.contentHash)throw new Error("Feedback targets a different Work evidence receipt.");if(e.outputRevisionRef&&!n.outputRefs.some(a=>a.contentHash===e.outputRevisionRef.contentHash))throw new Error("Feedback targets an output revision not bound by the Work evidence receipt.")}o(L,"assertFeedbackTargetsEvidence");function v(e,n,a){let c=n.safeParse(e);if(!c.success)return!1;let{contentHash:p,...y}=c.data;return l(a.parse(y))===p}o(v,"verifyHashedValue");function d(e,n,a){let c=e.map(p=>p.contentHash);new Set(c).size!==c.length&&a.addIssue({code:"custom",message:"Artifact content hashes must be unique.",path:n})}o(d,"addDuplicateHashIssues");export{H as a,W as b,E as c,J as d,w as e,C as f,I as g,r as h,A as i,q as j,T as k,P as l,O as m,V as n,j as o,F as p,z as q,M as r,N as s,m as t,k as u,K as v,$ as w,f as x,g as y,B as z,D as A,h as B,x as C,S as D,Q as E,X as F,U as G,Z as H,ee as I,te as J,ne as K,ae as L,oe as M,se as N,L as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as v}from"./chunk-KVTBX2UP.js";import{
|
|
2
|
+
import{a as v}from"./chunk-KVTBX2UP.js";import{a as c}from"./chunk-BJXPQIVD.js";import{h as m,j as d}from"./chunk-6ESBAHWK.js";import{a as n}from"./chunk-FTQLQJQV.js";function k(e){return e.state==="planning"&&!e.plan}n(k,"shouldRunCreateImprovePlanner");function y(e){return e==="approved"?"accepted":e==="rejected"?"declined":e==="cancelled"?"cancelled":"pending"}n(y,"approvalStatusForPlan");function g(e){let t=e.run.plan;return{id:t?.approvalId??`approval_${e.run.id}`,sessionId:e.session.id,turnId:e.turn.id,providerRequestId:e.run.id,kind:"create_plan",title:`${e.run.operation==="improve"?"Approve improvement plan":"Approve creation plan"}: ${e.run.objective}`,detail:JSON.stringify({runId:e.run.id,revision:e.run.revision,planId:t?.id??null,target:e.run.target,objective:e.run.objective,summary:t?.summary??null,sourcePlan:t?.sourcePlan??[],requirements:t?.requirements??[],checks:t?.checks??[],workflowCaptureId:e.run.workflowCapture?.id??null},null,2),status:e.status,createdAt:e.existing?.createdAt??e.run.createdAt}}n(g,"createImprovePlanApproval");function h(e,t){if(e.id!==t.runId)throw new Error("Create/Improve action targets another run.");if(e.appliedActionIds.includes(t.actionId))return e;let a=c();if(t.type==="approve_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for approval.");return d(e,{state:e.target.kind==="model"?"evaluating":"applying_source",plan:{...e.plan,status:"approved",approvedAt:e.plan.approvedAt??a,updatedAt:a},blockedReason:null,updatedAt:a},t.actionId)}if(t.type==="cancel"){if(!e.executionPolicy.cancellationAllowed)throw new Error("This Create/Improve run cannot be cancelled.");let r=t.reason?.trim()||"Cancelled before completion.";return d(e,{state:"cancelled",plan:e.plan?{...e.plan,status:"cancelled",approvedAt:null,metadata:{...e.plan.metadata,cancellationReason:r},updatedAt:a}:null,blockedReason:r,metadata:{...e.metadata,cancellationReason:r},updatedAt:a},t.actionId)}if(t.type==="revise_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for revision.");let r=e.plan;return d(e,{state:"awaiting_plan_approval",plan:{...r,id:`create_improve_plan_${crypto.randomUUID()}`,status:"pending_approval",summary:`${r.summary}
|
|
3
3
|
|
|
4
4
|
Revision requested: ${t.revision}`,sourcePlan:r.sourcePlan.map(o=>({...o,reason:`${o.reason} Revision requested: ${t.revision}`})),approvedAt:null,editedFromPlanId:r.id,metadata:{...r.metadata,revision:t.revision,supersedesPlanId:r.id},createdAt:a,updatedAt:a},metadata:{...e.metadata,previousPlanId:r.id},updatedAt:a},t.actionId)}if(t.type==="answer_question"){if(e.state!=="awaiting_questions")throw new Error("Create/Improve run is not waiting for questions.");let r=e.questions.find(p=>p.id===t.questionId);if(!r||r.status!=="pending")throw new Error("Create/Improve question is no longer pending.");let o=r.options.find(p=>p.value===t.value),i=e.questions.map(p=>p.id===t.questionId?{...p,status:"answered",answer:{value:t.value,label:o?.label??null,detail:null,answeredAt:a,metadata:{}}}:p),s=i.some(p=>p.required&&p.status==="pending");return d(e,{state:s?"awaiting_questions":"planning",questions:i,plan:null,blockedReason:null,updatedAt:a},t.actionId)}if(t.type==="open_pull_request"||t.type==="apply_candidate"){let r=t.type==="apply_candidate"&&e.state==="blocked"&&!!e.localProfileCommit;if(e.state!=="awaiting_promotion"&&!r)throw new Error("Create/Improve candidate is not awaiting promotion.");let o=u(e,t.candidateId);if(o.status!=="evaluated"||!o.git?.headCommit)throw new Error("Create/Improve candidate must be committed and evaluated before it can be applied.");if(e.tasksetRef&&(o.tasksetRef?.id!==e.tasksetRef.id||o.tasksetRef.revision!==e.tasksetRef.revision||o.tasksetRef.contentHash!==e.tasksetRef.contentHash))throw new Error("Create/Improve candidate is not linked to the exact approved Taskset revision.");let i=e.evaluationReceipts.filter(s=>s.candidateId===o.id&&s.subject==="candidate");if(i.length===0||i.some(s=>s.status!=="passed"||s.publishGate==="failed"))throw new Error("Create/Improve candidate requires passing Eval receipts before it can be applied.");if(e.tasksetRef&&i.some(s=>s.tasksetId!==e.tasksetRef.id||s.tasksetHash!==e.tasksetRef.contentHash||s.metadata.trustedTasksetExecution!==!0||typeof s.metadata.executionContractHash!="string"))throw new Error("Create/Improve candidate requires a trusted receipt for the exact approved Taskset revision.");return d(e,{state:t.type==="apply_candidate"?"reconciling_release":"opening_pull_request",releaseOutcome:{...e.releaseOutcome,status:"pending",updatedAt:a},blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:o.id,requestedAt:a}},updatedAt:a},t.actionId)}if(t.type==="reconcile_pull_request"){if(!["pull_request_open","blocked"].includes(e.state))throw new Error("Create/Improve run has no open PR to reconcile.");let r=u(e,t.candidateId);if(!r.git?.pullRequest)throw new Error("Create/Improve candidate has no PR to reconcile.");if(e.state==="blocked"&&r.git.pullRequest.state!=="merged")throw new Error("Only a merged PR with failed verification can be reconciled from a blocked run.");return d(e,{state:"reconciling_release",blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,requestedAt:a}},updatedAt:a},t.actionId)}if(t.type==="reject_candidate"){if(!["awaiting_promotion","pull_request_open"].includes(e.state))throw new Error("Create/Improve candidate is not available for rejection.");let r=u(e,t.candidateId),o=t.reason?.trim()||"Candidate rejected.";return r.git?.pullRequest?d(e,{state:"reconciling_release",blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,reason:o,requestedAt:a}},updatedAt:a},t.actionId):d(e,{state:"rejected",candidates:e.candidates.map(i=>i.id===r.id?{...i,status:"rejected",updatedAt:a}:i),releaseOutcome:{...e.releaseOutcome,status:"rejected",updatedAt:a},blockedReason:o,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,reason:o,completedAt:a}},updatedAt:a},t.actionId)}if(t.type==="pause"){if(!e.executionPolicy.pauseAllowed)throw new Error("This Create/Improve run cannot be paused.");if(["ready","ready_local","published_hosted","cancelled"].includes(e.state))throw new Error("Completed Create/Improve runs cannot be paused.");return d(e,{state:"paused",metadata:{...e.metadata,pausedFromState:e.state,pausedAt:a},updatedAt:a},t.actionId)}let l=I(e);return d(e,{state:l,metadata:{...e.metadata,resumedAt:a},updatedAt:a},t.actionId)}n(h,"applyCreateImproveRunAction");function u(e,t){let a=e.candidates.find(l=>l.id===t);if(!a)throw new Error(`Create/Improve candidate not found: ${t}`);return a}n(u,"requireRunCandidate");function A(e,t){if(e.state!=="applying_source"||e.plan?.status!=="approved"||e.adapter.kind==="local")return e;let a=v({session:t}),l=e.adapter.kind;return d(e,{state:"blocked",blockedReason:l==="hosted"?"Approved hosted Create/Improve plans from this chat require the Cloud work item background flow. No local source mutation was performed.":"Approved Profile promotion requires an explicit Cloud promotion flow. No local source mutation was performed.",metadata:{...e.metadata,createImproveApproval:{status:"blocked",reason:l==="hosted"?"hosted_create_improve_apply_not_configured":"promote_local_to_hosted_apply_not_configured",adapterKind:l,workspaceExecutionTarget:f(a)}},updatedAt:c()})}n(A,"createPlanExecutionRunForApprovedAdapter");function f(e){return e.target==="sandbox"?{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,sandboxId:e.sandboxId,cloudProjectId:e.cloudProjectId,localProjectId:e.localProjectId,hybrid:e.hybrid,reason:e.reason}:e.target==="local"?{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,localProjectId:e.localProjectId,cwd:e.cwd,reason:e.reason}:{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,reason:e.reason}}n(f,"createImproveExecutionTargetMetadata");function C(e){return["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(e.state)?"pending":["applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(e.state)?"started":["rejected","blocked","failed","cancelled"].includes(e.state)?"failed":"completed"}n(C,"createImproveRuntimeEventStatus");function b(e,t){return d(e,{state:"blocked",blockedReason:t,metadata:{...e.metadata,localCreateImprove:{status:"blocked",reason:"local_create_improve_background_apply_failed"}},updatedAt:c()})}n(b,"createImproveBackgroundFailureRun");function q(e){return e.mentionedApps,e.userPrompt,e.request}n(q,"normalizeMentionedSandboxToolRequest");function P(e,t){return{...e,metadata:{...e.metadata??{},createImproveRun:t},createImproveRun:t}}n(P,"withCreateImproveRun");function I(e){if(e.state!=="paused")throw new Error("Create/Improve run cannot be resumed.");let t=m.shape.state.safeParse(e.metadata.pausedFromState);return!t.success||t.data==="paused"?"planning":t.data}n(I,"resumeStateFromMetadata");export{k as a,y as b,g as c,h as d,A as e,C as f,b as g,q as h,P as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as l,d as h,f as H,g as y,i as m,j as C,k as j,m as R,n as p,o as g}from"./chunk-
|
|
2
|
+
import{c as l,d as h,f as H,g as y,i as m,j as C,k as j,m as R,n as p,o as g}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as i}from"./chunk-FTQLQJQV.js";var v=e.object({name:e.string().trim().min(1).max(64).regex(/^[a-zA-Z][a-zA-Z0-9_-]*$/),description:e.string().trim().min(1).max(2e3),inputSchema:e.record(e.string(),e.unknown()),inputSchemaHash:h,sideEffect:e.enum(["read","write"]),timeoutMs:e.number().int().positive().max(36e5)}).strict(),I=e.object({id:l,required:e.boolean(),scopes:e.array(e.string().trim().min(1).max(500)).max(100).default([]),portability:e.enum(["portable","host_adapter","local_only","hosted_only"])}).strict();var M=e.object({portable:e.boolean(),blockers:e.array(e.string().trim().min(1).max(2e3)).max(1e3),localOnlyAssetRefs:e.array(l).max(1e4),hostPrivateAssetRefs:e.array(l).max(1e4)}).strict(),z=e.object({schemaVersion:e.literal("openpond.agentSnapshot.v2"),id:l,sourceRelease:y.nullable(),instructions:e.array(m).max(1e4),skills:e.array(m).max(1e4),agents:e.array(m).max(1e4),toolDeclarations:e.array(v).max(200),capabilityRequirements:e.array(I).max(200),dependencyLock:m,portability:M,metadata:H}).strict(),P=z.extend({contentHash:h}).strict(),V=e.object({create:e.literal(!0),reset:e.literal(!0),step:e.literal(!0),collect:e.literal(!0),destroy:e.literal(!0),resetScope:e.enum(["task","attempt"])}).strict(),$=e.object({visibleEvidence:e.array(l).max(1e3),privilegedEvidence:e.array(l).max(1e3),privateVerifierIsolation:e.boolean()}).strict(),L=e.object({schemaVersion:e.literal("openpond.harnessRelease.v2"),id:l,agentSnapshot:y,program:m,tools:e.array(v).max(200),lifecycle:V,graderInterface:$,files:e.array(m).max(1e5),metadata:H}).strict(),_=L.extend({contentHash:h}).strict(),T=e.object({id:l,turn:e.number().int().nonnegative(),kind:e.enum(["message","tool_call","terminal"]),name:l.nullable(),arguments:e.record(e.string(),e.unknown()),content:e.string().max(1e6).nullable()}).strict(),q=e.object({actionId:l,turn:e.number().int().nonnegative(),terminal:e.boolean(),output:e.record(e.string(),e.unknown()),artifactRefs:e.array(C).max(1e5)}).strict();function Q(r){let a=z.parse(r);return P.parse({...a,contentHash:p(a)})}i(Q,"createAgentSnapshot");function W(r){let a=L.parse(r);return _.parse({...a,contentHash:p(a)})}i(W,"createHarnessRelease");var B=e.object({sequence:e.number().int().nonnegative(),type:e.enum(["created","reset","action","observation","terminal","failure","collected","destroyed"]),payloadHash:h,metadata:H}).strict(),ee=e.object({schemaVersion:e.literal("openpond.harnessTrace.v1"),manifest:y,taskId:l,seed:e.string().trim().min(1).max(500),events:e.array(B).max(1e6),actions:e.array(T).max(1e5),observations:e.array(q).max(1e5),terminal:e.boolean(),failureClass:j.nullable(),output:e.record(e.string(),e.unknown()),contentHash:h}).strict();var w=25*1024*1024,F=e.object({path:m.shape.path,base64:e.string().max(Math.ceil(w/3)*4)}).strict(),E=e.object({schemaVersion:e.literal("openpond.harnessSourcePackage.v1"),agentSnapshot:P,harnessRelease:_,files:e.array(F).max(1e4)}).strict(),O=E.extend({contentHash:h}).strict(),D=E.extend({schemaVersion:e.literal("openpond.harnessPolicySourcePackage.v1"),contentHash:h}).strict(),G=e.object({schemaVersion:e.literal("openpond.harnessSourceSelection.v1"),mode:e.enum(["taskset_owned","selected_release"]),harnessRelease:y,sourcePackageHash:h.nullable()}).strict().superRefine((r,a)=>{r.mode==="selected_release"!=(r.sourcePackageHash!==null)&&a.addIssue({code:"custom",path:["sourcePackageHash"],message:"Only a selected release binds a source package."})});function oe(r){let a=G.parse(r.selection);if(a.harnessRelease.id!==r.expectedRelease.id||a.harnessRelease.contentHash!==r.expectedRelease.contentHash)throw new Error("Harness source selection differs from its run manifest.");if(a.mode==="taskset_owned"){if(r.sourcePackage!==void 0&&r.sourcePackage!==null)throw new Error("Taskset-owned execution cannot include a selected Harness source package.");return{selection:a,sourcePackage:null}}let t=typeof r.sourcePackage=="object"&&r.sourcePackage!==null&&Reflect.get(r.sourcePackage,"schemaVersion")==="openpond.harnessPolicySourcePackage.v1"?A(r.sourcePackage,a.harnessRelease):x(r.sourcePackage,a.harnessRelease);if(t.contentHash!==a.sourcePackageHash)throw new Error("Harness source selection differs from its captured package.");return{selection:a,sourcePackage:t}}i(oe,"resolveHarnessSourceSelection");function ce(r){if([...r.files.values()].reduce((n,t)=>n+t.byteLength,0)>w)throw new Error("Harness source package exceeds its byte limit.");let a=E.parse({schemaVersion:"openpond.harnessSourcePackage.v1",agentSnapshot:r.agentSnapshot,harnessRelease:r.harnessRelease,files:[...r.files].sort(([n],[t])=>n.localeCompare(t)).map(([n,t])=>({path:n,base64:U(t)}))});return x({...a,contentHash:p(a)})}i(ce,"createHarnessSourcePackage");function ie(r,a){let n=x(r,a),t=new Map(n.harnessRelease.files.map(c=>[c.path,c])),o={schemaVersion:"openpond.harnessPolicySourcePackage.v1",agentSnapshot:n.agentSnapshot,harnessRelease:n.harnessRelease,files:n.files.filter(c=>t.get(c.path)?.visibility==="policy")};return A({...o,contentHash:p(o)},a)}i(ie,"createHarnessPolicySourcePackage");function A(r,a){let n=D.parse(r);g(n,"Harness policy source package"),g(n.agentSnapshot,"Harness policy source Agent snapshot"),g(n.harnessRelease,"Harness policy source release");let{agentSnapshot:t,harnessRelease:o}=n;if(a&&(a.id!==o.id||a.contentHash!==o.contentHash))throw new Error("Harness policy source package differs from the selected release.");if(o.agentSnapshot.id!==t.id||o.agentSnapshot.contentHash!==t.contentHash)throw new Error("Harness policy source release does not bind its Agent snapshot.");let c=new Map;for(let s of o.files){if(c.has(s.path))throw new Error("Harness policy source contains duplicate asset paths.");c.set(s.path,s)}for(let s of[o.program,t.dependencyLock,...t.instructions,...t.skills,...t.agents])if(p(c.get(s.path)??null)!==p(s))throw new Error(`Harness policy source dependency ${s.path} is absent or differs from its release inventory.`);for(let s of[o.program,t.dependencyLock,...t.instructions,...t.skills])if(s.visibility!=="policy")throw new Error(`Harness policy source dependency ${s.path} is private.`);let b=new Set(o.files.filter(s=>s.visibility==="policy").map(s=>s.path)),u=new Set,S=0;for(let s of n.files){if(u.has(s.path))throw new Error("Harness policy source contains duplicate files.");u.add(s.path);let f=c.get(s.path);if(!f||f.visibility!=="policy")throw new Error(`Harness policy source file ${s.path} is not policy-visible.`);let d=k(s.base64);if(S+=d.byteLength,S>w)throw new Error("Harness policy source exceeds its byte limit.");if(d.byteLength!==f.sizeBytes||R(d)!==f.contentHash)throw new Error(`Harness policy source file ${s.path} differs from its immutable bytes.`)}if(u.size!==b.size||[...b].some(s=>!u.has(s)))throw new Error("Harness policy source is missing released policy files.");return n}i(A,"validateHarnessPolicySourcePackage");function le(r,a){let n=A(r,a);return new Map(n.files.map(t=>[t.path,k(t.base64)]))}i(le,"harnessPolicySourcePackageFiles");function x(r,a){let n=O.parse(r);g(n,"Harness source package"),g(n.agentSnapshot,"Harness source Agent snapshot"),g(n.harnessRelease,"Harness source release");let{agentSnapshot:t,harnessRelease:o}=n;if(a&&(a.id!==o.id||a.contentHash!==o.contentHash))throw new Error("Harness source package differs from the selected release.");if(o.agentSnapshot.id!==t.id||o.agentSnapshot.contentHash!==t.contentHash)throw new Error("Harness source release does not bind its Agent snapshot.");let c=new Map,b=new Set;for(let s of o.files){if(s.path.includes("\\")||s.path.includes(":"))throw new Error("Harness source requires portable relative file paths.");if(c.has(s.path)||b.has(s.id))throw new Error("Harness source contains duplicate asset paths or identities.");c.set(s.path,s),b.add(s.id)}for(let s of[o.program,t.dependencyLock,...t.instructions,...t.skills,...t.agents])if(p(c.get(s.path)??null)!==p(s))throw new Error(`Harness source dependency ${s.path} is absent or differs from its release inventory.`);for(let s of[...t.instructions,...t.skills])if(s.visibility!=="policy")throw new Error(`Harness policy source ${s.path} is private.`);let u=new Set,S=0;for(let s of n.files){if(u.has(s.path))throw new Error("Harness source package contains duplicate files.");u.add(s.path);let f=c.get(s.path);if(!f)throw new Error(`Harness source file ${s.path} is not declared by its release.`);let d=k(s.base64);if(S+=d.byteLength,S>w)throw new Error("Harness source package exceeds its byte limit.");if(d.byteLength!==f.sizeBytes||R(d)!==f.contentHash)throw new Error(`Harness source file ${s.path} differs from its immutable bytes.`)}if(u.size!==c.size)throw new Error("Harness source package is missing released files.");return n}i(x,"validateHarnessSourcePackage");function he(r,a){let n=x(r,a);return new Map(n.files.map(t=>[t.path,k(t.base64)]))}i(he,"harnessSourcePackageFiles");function U(r){let a="";for(let n=0;n<r.length;n+=8192)a+=String.fromCharCode(...r.subarray(n,n+8192));return btoa(a)}i(U,"encode");function k(r){let a;try{a=atob(r)}catch{throw new Error("Harness source file is not valid base64.")}if(btoa(a)!==r)throw new Error("Harness source file is not canonical base64.");let n=new Uint8Array(a.length);for(let t=0;t<a.length;t++)n[t]=a.charCodeAt(t);return n}i(k,"decode");export{v as a,I as b,M as c,z as d,P as e,V as f,$ as g,L as h,_ as i,T as j,q as k,Q as l,W as m,B as n,ee as o,D as p,oe as q,ce as r,ie as s,A as t,le as u,x as v,he as w};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{va as t}from"./chunk-
|
|
2
|
+
import{va as t}from"./chunk-QCJY6FTC.js";import{A as e}from"./chunk-X2J2P5ZT.js";var n=e.string().trim().min(1).max(240),a=e.object({id:n,revision:e.number().int().positive(),ownerInstanceId:n,teamId:n,profileId:n,projectId:n,hostedModelId:n,role:t,roleTargetId:n,expectedBindingId:n,policyId:n.nullable(),authorizedConfigurationHash:e.string().length(64).nullable(),enabled:e.boolean(),updatedAt:e.string().datetime()}).strict(),o=e.object({id:n,grantId:n,revision:e.number().int().positive(),jobId:n,artifactHash:e.string().length(64),priorBindingId:n,bindingId:n.nullable(),restoredBindingId:n.nullable(),status:e.enum(["prepared","binding","canary","active","superseded","rolling_back","rolled_back","failed"]),leaseId:n,canarySeconds:e.number().int().min(30).max(600),activatedAt:e.string().datetime().nullable(),failure:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict();export{a,o as b};
|