openpond 0.2.70 → 0.2.72
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.js +1 -1
- package/dist/chunks/{acp-QTA6IU6W.js → acp-7A2UPCG5.js} +1 -1
- package/dist/chunks/{acp-agent-N77HPAYQ.js → acp-agent-AGALGR6V.js} +1 -1
- package/dist/chunks/{actions-command-BZQCUDMD.js → actions-command-AXGXBU75.js} +1 -1
- package/dist/chunks/{app-layer-YQQNLIXA.js → app-layer-DUCNCJ2X.js} +1 -1
- package/dist/chunks/{app-server-evaluations-RRLYWLPK.js → app-server-evaluations-SNWXULKD.js} +1 -1
- package/dist/chunks/{app-server-harness-services-XXM336NU.js → app-server-harness-services-YNMGMKPK.js} +1 -1
- package/dist/chunks/app-server-runtime-BKJ7L6JZ.js +2 -0
- package/dist/chunks/{apps-WG7WY5CB.js → apps-2OWE23BH.js} +1 -1
- package/dist/chunks/{chunk-ZDEIVUUI.js → chunk-27OJ2OLP.js} +1 -1
- package/dist/chunks/{chunk-NSSZ2ZIU.js → chunk-2EAZB2MW.js} +1 -1
- package/dist/chunks/{chunk-DRLP7GIU.js → chunk-2GEZ3ZY7.js} +1 -1
- package/dist/chunks/{chunk-PAYFJHPO.js → chunk-2PVW2XFF.js} +1 -1
- package/dist/chunks/chunk-2Q2AWPP2.js +2 -0
- package/dist/chunks/{chunk-Y2WNZWT2.js → chunk-2Q6FTL4C.js} +1 -1
- package/dist/chunks/{chunk-KP2MYTP5.js → chunk-2QHB5P2K.js} +1 -1
- package/dist/chunks/{chunk-HG2YFMVU.js → chunk-2THZ6GZY.js} +1 -1
- package/dist/chunks/{chunk-DXJC3QW7.js → chunk-3VT2PPKW.js} +1 -1
- package/dist/chunks/{chunk-4BUM6JEC.js → chunk-4JKWCLTQ.js} +1 -1
- package/dist/chunks/{chunk-AQUZCWM3.js → chunk-5TPJ5ECJ.js} +1 -1
- package/dist/chunks/{chunk-RCQYEHHD.js → chunk-5TTQCT3G.js} +1 -1
- package/dist/chunks/{chunk-NMMHXYDJ.js → chunk-5WFKBZCU.js} +1 -1
- package/dist/chunks/{chunk-P4QM63L3.js → chunk-5ZBDHIIE.js} +1 -1
- package/dist/chunks/{chunk-WD4KAKEX.js → chunk-64EDQ7UV.js} +1 -1
- package/dist/chunks/{chunk-KU4TPDPH.js → chunk-6LAGMWJE.js} +1 -1
- package/dist/chunks/{chunk-VJYOKU3C.js → chunk-6OD2FKUS.js} +1 -1
- package/dist/chunks/{chunk-65FJWWXG.js → chunk-6YR5IYHH.js} +1 -1
- package/dist/chunks/{chunk-AUO5DCEU.js → chunk-73COPJ32.js} +1 -1
- package/dist/chunks/{chunk-SSHE6B7Z.js → chunk-AITV76GO.js} +1 -1
- package/dist/chunks/{chunk-PLROXHG2.js → chunk-ATI52WMB.js} +1 -1
- package/dist/chunks/chunk-AWD72O3G.js +2 -0
- package/dist/chunks/{chunk-DKOVZ6R2.js → chunk-BQNU4HZW.js} +1 -1
- package/dist/chunks/{chunk-UANH7U3Y.js → chunk-BTEBZYK3.js} +1 -1
- package/dist/chunks/{chunk-3Z4VM2LF.js → chunk-BUMCJHQP.js} +1 -1
- package/dist/chunks/{chunk-BU6MW65V.js → chunk-BYVE4TMU.js} +1 -1
- package/dist/chunks/{chunk-PNPV2LDE.js → chunk-BZS2PA4O.js} +1 -1
- package/dist/chunks/{chunk-AFYYIJ6K.js → chunk-C7NQPICU.js} +1 -1
- package/dist/chunks/{chunk-EWH64WRR.js → chunk-CAYKEJJY.js} +1 -1
- package/dist/chunks/{chunk-K7KBFM2T.js → chunk-CBD554GZ.js} +1 -1
- package/dist/chunks/{chunk-7RJOCGQ6.js → chunk-CHRED2FK.js} +1 -1
- package/dist/chunks/{chunk-3A2Y7UK3.js → chunk-CQRA5TXF.js} +1 -1
- package/dist/chunks/{chunk-GYYJ47GX.js → chunk-CWE2N3JI.js} +1 -1
- package/dist/chunks/{chunk-ZYLLPRPU.js → chunk-CX4T7I47.js} +1 -1
- package/dist/chunks/{chunk-TAXCMCYZ.js → chunk-CX4U32VO.js} +4 -4
- package/dist/chunks/{chunk-7TM25J6S.js → chunk-DFSQ5HZ7.js} +2 -2
- package/dist/chunks/{chunk-2PXKSAG6.js → chunk-DLOJG7LP.js} +1 -1
- package/dist/chunks/{chunk-BGMAWETL.js → chunk-DNRC6TPJ.js} +1 -1
- package/dist/chunks/{chunk-5FSPDSAO.js → chunk-DUR32LJG.js} +1 -1
- package/dist/chunks/{chunk-FHDH4OUA.js → chunk-EHMA5XS7.js} +1 -1
- package/dist/chunks/{chunk-Z33RVGP6.js → chunk-ENY24ZBB.js} +1 -1
- package/dist/chunks/{chunk-JVNKSU27.js → chunk-F3IEAU7O.js} +1 -1
- package/dist/chunks/{chunk-M4A7G4S5.js → chunk-FOAM3YZQ.js} +1 -1
- package/dist/chunks/{chunk-VJR2GNRY.js → chunk-FVMTQSVW.js} +1 -1
- package/dist/chunks/{chunk-YI6ME6PU.js → chunk-GG6PM7TB.js} +1 -1
- package/dist/chunks/{chunk-DDOIPTOM.js → chunk-GMA365GI.js} +1 -1
- package/dist/chunks/{chunk-KCLMA2IH.js → chunk-GPGXBKXU.js} +1 -1
- package/dist/chunks/{chunk-JVMSN7LH.js → chunk-GR4MJJCE.js} +1 -1
- package/dist/chunks/{chunk-7OFD6TFD.js → chunk-HA762QYM.js} +1 -1
- package/dist/chunks/{chunk-Q7FBVLLB.js → chunk-HBGTHOOB.js} +1 -1
- package/dist/chunks/{chunk-AFH462DO.js → chunk-HT6ILPD6.js} +1 -1
- package/dist/chunks/{chunk-XYZV3FKD.js → chunk-I6KTJ3GH.js} +1 -1
- package/dist/chunks/{chunk-OUJ63LMU.js → chunk-IA6CTX7A.js} +1 -1
- package/dist/chunks/{chunk-XHACK2KR.js → chunk-IUYGQO2K.js} +1 -1
- package/dist/chunks/{chunk-55YD4UTW.js → chunk-IV2HEX3I.js} +1 -1
- package/dist/chunks/{chunk-MOXIGLN2.js → chunk-JALL5NPH.js} +1 -1
- package/dist/chunks/{chunk-U7X5ZLAL.js → chunk-JCHLDNCX.js} +1 -1
- package/dist/chunks/{chunk-7PKDJHT6.js → chunk-JH4RACOB.js} +1 -1
- package/dist/chunks/{chunk-MIFVX5PK.js → chunk-JSDGOQ5U.js} +1 -1
- package/dist/chunks/{chunk-65WRWLUD.js → chunk-JVEIK4RH.js} +1 -1
- package/dist/chunks/{chunk-PPF6EBTQ.js → chunk-K3WM4NEC.js} +1 -1
- package/dist/chunks/{chunk-CCZ276IA.js → chunk-KOIXRLZZ.js} +1 -1
- package/dist/chunks/{chunk-6C6ZCYTL.js → chunk-KRJZ5CW3.js} +1 -1
- package/dist/chunks/{chunk-CUB6PWAJ.js → chunk-KTQWWCP2.js} +6 -6
- package/dist/chunks/{chunk-Y4E5AAI7.js → chunk-KUEVP7WM.js} +1 -1
- package/dist/chunks/{chunk-U7D6Q744.js → chunk-L5L3H6CI.js} +1 -1
- package/dist/chunks/{chunk-VWWKWYSQ.js → chunk-LHTRQAPZ.js} +1 -1
- package/dist/chunks/{chunk-QLGP2OAQ.js → chunk-MLLMLXKG.js} +1 -1
- package/dist/chunks/{chunk-QUNQM2E3.js → chunk-MPEK4ZNY.js} +1 -1
- package/dist/chunks/{chunk-EGP6DF34.js → chunk-MPXOPL7R.js} +2 -2
- package/dist/chunks/{chunk-PHZZBXDO.js → chunk-MQMMJKOZ.js} +1 -1
- package/dist/chunks/{chunk-B66QCXH2.js → chunk-MWPMYCYB.js} +1 -1
- package/dist/chunks/{chunk-5G7BQAUA.js → chunk-N5FT6PTI.js} +1 -1
- package/dist/chunks/{chunk-SDHG6CKU.js → chunk-NDNSLCPE.js} +1 -1
- package/dist/chunks/{chunk-WCNPGKST.js → chunk-O4YHISU2.js} +1 -1
- package/dist/chunks/{chunk-IO5DZUKL.js → chunk-OI4DAZ4U.js} +1 -1
- package/dist/chunks/{chunk-Q73RKX7I.js → chunk-OIIE5GUK.js} +1 -1
- package/dist/chunks/{chunk-N5EAVX4G.js → chunk-OOKHHOIU.js} +1 -1
- package/dist/chunks/{chunk-7OKZCJHS.js → chunk-OXRN2257.js} +1 -1
- package/dist/chunks/{chunk-HES4VP3D.js → chunk-PYPXP5R3.js} +1 -1
- package/dist/chunks/{chunk-ZK3ET5EP.js → chunk-QKBMXL4D.js} +3 -3
- package/dist/chunks/{chunk-YAA7F5LI.js → chunk-QKGNAYSC.js} +1 -1
- package/dist/chunks/{chunk-KDER7R45.js → chunk-RIFWD5XM.js} +1 -1
- package/dist/chunks/{chunk-WZ35ICTE.js → chunk-RWBP2H4M.js} +1 -1
- package/dist/chunks/{chunk-SO4GMSNP.js → chunk-S5ACNR5Y.js} +1 -1
- package/dist/chunks/{chunk-M4ZHFDRJ.js → chunk-SRK4WX7D.js} +1 -1
- package/dist/chunks/{chunk-XY7HFXLH.js → chunk-SVLVIYH2.js} +1 -1
- package/dist/chunks/{chunk-FNGZ4UDZ.js → chunk-T6ML5SCD.js} +1 -1
- package/dist/chunks/{chunk-CO23RRN7.js → chunk-TD5YYA5Z.js} +1 -1
- package/dist/chunks/{chunk-7NCM6GBN.js → chunk-TOWY6Y23.js} +1 -1
- package/dist/chunks/{chunk-OXQ2WFIH.js → chunk-TR5UC5AF.js} +1 -1
- package/dist/chunks/{chunk-JQOVC35K.js → chunk-UCPD526R.js} +1 -1
- package/dist/chunks/{chunk-Y4I6CFZJ.js → chunk-UGDBMRCT.js} +1 -1
- package/dist/chunks/{chunk-E2JB5OCO.js → chunk-UZE3C2SF.js} +1 -1
- package/dist/chunks/{chunk-PACLKDTN.js → chunk-V4VM2R6D.js} +1 -1
- package/dist/chunks/{chunk-XOPHFUUY.js → chunk-VMBWCIGG.js} +1 -1
- package/dist/chunks/{chunk-CIZI6Z7D.js → chunk-VMW23TIZ.js} +1 -1
- package/dist/chunks/{chunk-4G3GTEVS.js → chunk-VSQPWLAG.js} +1 -1
- package/dist/chunks/{chunk-54755JYM.js → chunk-VXFGSFIE.js} +2 -2
- package/dist/chunks/{chunk-R2FYCJL6.js → chunk-W4JBPYGW.js} +1 -1
- package/dist/chunks/{chunk-JZKTBYNB.js → chunk-WMJEQK4G.js} +1 -1
- package/dist/chunks/{chunk-ESYPMD7Q.js → chunk-X2MJFTLS.js} +1 -1
- package/dist/chunks/{chunk-67U7PAMU.js → chunk-X7ZMUWJO.js} +1 -1
- package/dist/chunks/{chunk-WGQ3FMRF.js → chunk-XKDOPNQ5.js} +1 -1
- package/dist/chunks/{chunk-EYTTZ5H4.js → chunk-XLZMSD5K.js} +1 -1
- package/dist/chunks/{chunk-ZIQJDTQB.js → chunk-XTT3K3TR.js} +1 -1
- package/dist/chunks/{chunk-Q7P34B2O.js → chunk-YFHQRDNQ.js} +1 -1
- package/dist/chunks/{chunk-UGFSAG4U.js → chunk-YG3HITOU.js} +1 -1
- package/dist/chunks/{chunk-DWF3FCY4.js → chunk-Z5R4OSGC.js} +1 -1
- package/dist/chunks/{chunk-JT5YQ52I.js → chunk-Z6HWSTEP.js} +1 -1
- package/dist/chunks/{chunk-4PUOWSDE.js → chunk-ZEOYNUHL.js} +1 -1
- package/dist/chunks/{chunk-4KTGYHCE.js → chunk-ZMRP2A7K.js} +1 -1
- package/dist/chunks/{chunk-OL3L3U36.js → chunk-ZSWATWK2.js} +1 -1
- package/dist/chunks/cli-KXU5DNVV.js +2 -0
- package/dist/chunks/{command-5AXJMFYC.js → command-X35I53H3.js} +3 -3
- package/dist/chunks/{configuration-command-5LUNWPOL.js → configuration-command-VJUK34UQ.js} +1 -1
- package/dist/chunks/{connected-app-executor-DHXZE4X3.js → connected-app-executor-JBFJF2H5.js} +1 -1
- package/dist/chunks/{connected-evidence-NWMPICKJ.js → connected-evidence-CQ533AML.js} +1 -1
- package/dist/chunks/{connected-starting-assets-NRVXIKQ2.js → connected-starting-assets-RL5X6LZ7.js} +1 -1
- package/dist/chunks/{continual-UCKQ2QLH.js → continual-PHGIZFF6.js} +1 -1
- package/dist/chunks/{core-commands-ZPBX35M2.js → core-commands-5DYMDWXY.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-UUYFWWCT.js → dataset-preparation-authoring-UDSX33YK.js} +1 -1
- package/dist/chunks/{datasets-6K3ZANIV.js → datasets-BW4JFUUU.js} +1 -1
- package/dist/chunks/{desktop-test-57INNJ76.js → desktop-test-RIG4CB2Z.js} +1 -1
- package/dist/chunks/{dist-2MKJC6HN.js → dist-C5XFRP53.js} +1 -1
- package/dist/chunks/{evaluation-coordination-B7CN4R2D.js → evaluation-coordination-6QJ6XTUX.js} +1 -1
- package/dist/chunks/{experiment-improvements-G357VLDB.js → experiment-improvements-2XF63AQ4.js} +1 -1
- package/dist/chunks/{experiments-BHQO26LJ.js → experiments-3S2BVNK6.js} +1 -1
- package/dist/chunks/{experiments-signal-BI6NKETB.js → experiments-signal-IRBHGGW5.js} +1 -1
- package/dist/chunks/{help-UQN5RUPA.js → help-Q2VMJVTR.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-5LZQHA32.js +2 -0
- package/dist/chunks/{host-profile-external-dataset-KSEPXY2S.js → host-profile-external-dataset-C6ZPMTX6.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-WDDO6F23.js → hosted-app-server-composition-AYZM2HY6.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-VVYXQ65K.js → hosted-experiment-improvement-SMZJYRJ7.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-QWIFAITG.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-PTGQLPZO.js → hosted-profile-candidate-WOMWAE5N.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-FS5R6CHJ.js → hosted-profile-compiler-NZ2BXN32.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-UUEZEMXU.js → hosted-profile-evaluation-control-3ECFFM7E.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-4F7OEF4T.js → hosted-profile-evaluation-inspection-TM7RKONG.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-LIJJZDHQ.js → hosted-profile-evaluation-preparation-2MZIRT75.js} +1 -1
- package/dist/chunks/{hosted-tasksets-KCLNMPG5.js → hosted-tasksets-IUK3VWSL.js} +1 -1
- package/dist/chunks/{human-review-PX6DBIFT.js → human-review-PG4WWVWV.js} +1 -1
- package/dist/chunks/{import-2HEYPHPW.js → import-FAZAVZBF.js} +1 -1
- package/dist/chunks/{learning-Y3UKNUGE.js → learning-3XDYMYBE.js} +1 -1
- package/dist/chunks/{learning-LSXBL5DB.js → learning-OR4CYV4B.js} +1 -1
- package/dist/chunks/local-harness-improvement-runtime-OYLTKMJU.js +2 -0
- package/dist/chunks/local-harness-taskset-review-I7YU4RZI.js +2 -0
- package/dist/chunks/{model-projects-6YWVD2TS.js → model-projects-POZRHXTF.js} +1 -1
- package/dist/chunks/{opchat-66BCRKEZ.js → opchat-TCZA6373.js} +1 -1
- package/dist/chunks/{opchat-bounded-chat-KQWXZVFN.js → opchat-bounded-chat-GMYDXLWB.js} +1 -1
- package/dist/chunks/{organizations-IOYWDOCC.js → organizations-PYKGA2P2.js} +1 -1
- package/dist/chunks/{profile-YH6G3ZTD.js → profile-GYYI555I.js} +1 -1
- package/dist/chunks/project-action-payload-FE6M2OXJ.js +2 -0
- package/dist/chunks/{project-agent-RYVMKW2F.js → project-agent-4ISJFMJD.js} +1 -1
- package/dist/chunks/{published-experiment-source-SDXUVPE7.js → published-experiment-source-E2YAJCLM.js} +1 -1
- package/dist/chunks/{refiner-profile-service-56VYLZQJ.js → refiner-profile-service-LKGXD5WJ.js} +1 -1
- package/dist/chunks/{runtime-ISLJIGWC.js → runtime-UDLOZD4Y.js} +2 -2
- package/dist/chunks/{sandbox-command-DI45NRTV.js → sandbox-command-4J6DAY7T.js} +1 -1
- package/dist/chunks/{sandbox-template-T42MDUSR.js → sandbox-template-TSXWJMWG.js} +1 -1
- package/dist/chunks/saved-work-QTEBKVUB.js +2 -0
- package/dist/chunks/{send-turn-YLY3YNEQ.js → send-turn-4MH4WMLW.js} +1 -1
- package/dist/chunks/{setup-D6TY2GWV.js → setup-IVT2FQSE.js} +1 -1
- package/dist/chunks/{src-7RN7BF4W.js → src-DC7N2H7A.js} +111 -113
- package/dist/chunks/{src-LF5X4RNQ.js → src-TOSQX36I.js} +1 -1
- package/dist/chunks/{standalone-experiment-turn-owner-TW5MTWIO.js → standalone-experiment-turn-owner-UYPA6XHW.js} +1 -1
- package/dist/chunks/{store-chat-resources-IRHBW2EC.js → store-chat-resources-QLXKKYYC.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-3KK42L4I.js → store-continual-support-reviews-4F2BOG3H.js} +1 -1
- package/dist/chunks/{store-conversation-serving-IVURK52V.js → store-conversation-serving-EUD47W6X.js} +1 -1
- package/dist/chunks/{store-create-improve-UTCLBXF2.js → store-create-improve-QUOTNNIM.js} +1 -1
- package/dist/chunks/{store-datasets-4AQOVAQY.js → store-datasets-ZUC7CNVO.js} +1 -1
- package/dist/chunks/{store-evaluation-results-PK2P3IMH.js → store-evaluation-results-LHHPHESK.js} +1 -1
- package/dist/chunks/{store-harness-workspaces-YEXB4IRV.js → store-harness-workspaces-TKX5PZWP.js} +1 -1
- package/dist/chunks/{store-human-review-O4BVHP25.js → store-human-review-7WZWRJ6X.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-44SVX6YB.js → store-learned-preference-migration-validation-MVNKBR4X.js} +1 -1
- package/dist/chunks/{store-learning-SIUQIY5C.js → store-learning-WLUW2PWE.js} +1 -1
- package/dist/chunks/{store-learning-credentials-BUHR7SN6.js → store-learning-credentials-FDKCEDHK.js} +1 -1
- package/dist/chunks/{store-local-experiments-BHVTKPPE.js → store-local-experiments-HB53QFLL.js} +1 -1
- package/dist/chunks/{store-model-batch-review-RVAYUVK2.js → store-model-batch-review-O3I6GIAA.js} +1 -1
- package/dist/chunks/{store-model-configuration-AYFGMC5D.js → store-model-configuration-CDIGNU6Q.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-5DEIS7TB.js → store-model-project-preparation-QMQ2HMJV.js} +1 -1
- package/dist/chunks/{store-modification-recordings-LCPK6K2T.js → store-modification-recordings-W4VEZKKQ.js} +1 -1
- package/dist/chunks/{store-preference-comparison-5YVIQNVB.js → store-preference-comparison-JKURBESE.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-WLMYDA4E.js → store-sidebar-file-bookmarks-KAEDHVVF.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-AFMYIDWT.js → store-sidebar-preferences-QPBLTHY6.js} +1 -1
- package/dist/chunks/{store-subagents-KFPVSTRO.js → store-subagents-ZELQP3MX.js} +1 -1
- package/dist/chunks/{store-task-inbox-L6IQTY26.js → store-task-inbox-4ZDQR2E7.js} +1 -1
- package/dist/chunks/{store-task-inventory-QWS2C656.js → store-task-inventory-CTIJDLYE.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-EAOOY6CR.js → store-taskset-drafts-FRPBYLTW.js} +1 -1
- package/dist/chunks/{store-training-FYXZU2FE.js → store-training-WQAYUT7B.js} +1 -1
- package/dist/chunks/{store-training-jobs-3N3VKPIY.js → store-training-jobs-O5EHGTH7.js} +1 -1
- package/dist/chunks/{store-training-models-VOFVGPZR.js → store-training-models-YSZMC66T.js} +1 -1
- package/dist/chunks/{taskset-HNDIGYQG.js → taskset-OVYM4QMS.js} +1 -1
- package/dist/chunks/{taskset-packages-WMG5DUBN.js → taskset-packages-FUQWNTSB.js} +1 -1
- package/dist/chunks/{taskset-packages-T6B6HYKZ.js → taskset-packages-GM6IUOTY.js} +1 -1
- package/dist/chunks/{teams-bot-Z5CZLWE4.js → teams-bot-U2M3ORWR.js} +1 -1
- package/dist/chunks/{tool-learning-ZQ6NSJ5K.js → tool-learning-NXVR4YPA.js} +1 -1
- package/dist/chunks/{training-JTYQA7GA.js → training-EQ7G5FDY.js} +1 -1
- package/dist/chunks/training-LQUAL4Y4.js +2 -0
- package/dist/chunks/training-PEZYJ2SN.js +2 -0
- package/dist/chunks/{training-hosted-36SZFS4U.js → training-hosted-XKSUTMLQ.js} +1 -1
- package/dist/chunks/{training-hosted-alphaedit-HSMRDJTD.js → training-hosted-alphaedit-VCOEYLKK.js} +1 -1
- package/dist/chunks/{training-hosted-decision-7JALOU6O.js → training-hosted-decision-IKWWXA56.js} +1 -1
- package/dist/chunks/{training-hosted-engram-SXO75MFG.js → training-hosted-engram-3TOPPVSW.js} +1 -1
- package/dist/chunks/{training-hosted-learning-E2N32YU5.js → training-hosted-learning-UEBGSSNC.js} +1 -1
- package/dist/chunks/{training-hosted-modification-comparison-TXFDJFTG.js → training-hosted-modification-comparison-C6S4JFHW.js} +1 -1
- package/dist/chunks/{training-hosted-neuron-training-J42WK4EH.js → training-hosted-neuron-training-EP2U4PHG.js} +1 -1
- package/dist/chunks/{training-hosted-serving-report-BAEABGJH.js → training-hosted-serving-report-KJMRZJLQ.js} +1 -1
- package/dist/chunks/{training-hosted-steering-T556BUBG.js → training-hosted-steering-I27DV6A2.js} +1 -1
- package/dist/chunks/{training-model-start-P3PXDWNT.js → training-model-start-NWXNGRDC.js} +1 -1
- package/dist/chunks/{workspaces-EK62ANTB.js → workspaces-FVQYJPOS.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +19 -0
- package/dist/web/assets/App-QM6Y2Eod.js +54 -0
- package/dist/web/assets/{AppDialog-x1HU1uLv.js → AppDialog-C8um481a.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-CNIKmqKc.js → AppTerminalPanel-OwNr-bp6.js} +2 -2
- package/dist/web/assets/{AppToastContext-DNWd43HS.js → AppToastContext-BQ4iRFif.js} +1 -1
- package/dist/web/assets/{AppsView-BvOD83Z1.js → AppsView-mk8m_Cra.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-BLdDr3JZ.js → AttachmentTypeIcon-SITPqTtF.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-Ar0FlFKg.js → BrowserSidebar-BghdIKTB.js} +1 -1
- package/dist/web/assets/{CartesianChart-tS7f1HZv.js → CartesianChart-BdRx7q_O.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-z7_kur3h.js → ChatTimelineEntry-BBOnAzJB.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-CaiFEKrv.js → CollaborationTabs-Beja-9s5.js} +1 -1
- package/dist/web/assets/{CommandMenu-BpubEqaA.js → CommandMenu-CQtrSUpu.js} +1 -1
- package/dist/web/assets/{CommunityView-TGR4s99l.js → CommunityView-LPTAakS-.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-DPWCjKXz.js → ComposerAttachments-DI-Gr7Zw.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-Drji01_6.js → ComposerCreateImproveStrip-CY5Uw1yc.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-B_oW0cz7.js → ConversationImportsSettings-DFwhKERw.js} +1 -1
- package/dist/web/assets/{DatasetReviewImport-Dr3unJSY.js → DatasetReviewImport-C9xraQk7.js} +1 -1
- package/dist/web/assets/{ExperimentTrainingDataWorkspace-DObvpJAw.js → ExperimentTrainingDataWorkspace-Cx58S6R_.js} +2 -2
- package/dist/web/assets/{FilePagePreview-9kkXbARN.js → FilePagePreview-dlbmR8s8.js} +2 -2
- package/dist/web/assets/{GetStartedView-Dv2b_SlH.js → GetStartedView-BkTV_shK.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-sPaPMc61.js → GettingStartedDialog-DulDLYnr.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-BlwhGxS6.js → HostedModelLearningReview--fXJEOfI.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-B5ahk3je.js → HostedModelLearningSettings-BEb7B_PC.js} +1 -1
- package/dist/web/assets/{HtmlVisual-rGsClq0p.js → HtmlVisual-BS61T2qR.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-Da7AwZWV.js → LabModelVersionDetailPage-CmzUIDbR.js} +1 -1
- package/dist/web/assets/{LabModelWorkspace-DTeYViWH.js → LabModelWorkspace-DoAnQKWk.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BieHbNl6.js → LabSkillSidebar-DJTm7ZQs.js} +1 -1
- package/dist/web/assets/{LabsRoute-D3XqPB0-.js → LabsRoute-DNtBot4a.js} +4 -4
- package/dist/web/assets/{LearningBatchesPage-CCBuf2u4.js → LearningBatchesPage-C_oQjciE.js} +1 -1
- package/dist/web/assets/{MainChatThread-B6BQJfcq.js → MainChatThread-D9e-to8e.js} +2 -2
- package/dist/web/assets/{MainPane-D3fQou29.js → MainPane-mWeD0M-f.js} +6 -6
- package/dist/web/assets/{ModelProjectPageHeader-BZn9Lu_J.js → ModelProjectPageHeader-BecKU_2p.js} +1 -1
- package/dist/web/assets/{NativeSetupTerminal-Bglqab_g.js → NativeSetupTerminal-DO0DN4fH.js} +2 -2
- package/dist/web/assets/{NativeSkillSidebar-pUGRdnV_.js → NativeSkillSidebar-jnxgQASC.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-BpHN38MA.js → NewProjectDialog-ByHR4vMf.js} +1 -1
- package/dist/web/assets/{OutputsPage-LunDCQ6w.js → OutputsPage-DZY4BUCy.js} +1 -1
- package/dist/web/assets/{PageChrome-DThEcWAx.js → PageChrome-DjPuwWsn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-vct_TQgL.js → ProjectsPage-DKbwhIM4.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-CgFK7DY0.js → RightChatPanelStack-BARH0XuL.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-qKL8dZrN.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-mmaZfybl.js → ScheduledWorkPage-CElrmRz9.js} +1 -1
- package/dist/web/assets/{SettingsView-CJfeRsWR.js → SettingsView-CsFSjE9s.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-CuimAfkv.js → TasksetDraftEditorPrimitives-DJoYkvWq.js} +1 -1
- package/dist/web/assets/{TeamChatView-BcK0lF1b.js → TeamChatView-D9Y4e98Y.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-0pzEvy-C.js → TerminalOverlay-CUO8yZjy.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-CcyzFz7l.js → TrainingCreationPanel-_mnLQ1HA.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DSLZXdLz.js → TrainingDraftPanel-CCqQTHo5.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-BT9pcnCn.js → UsageSettingsSection-CdWq5oYC.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-DRXaK-E6.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-Bbz5qrVA.js → WorkspaceDiffPanel-CdHr8bX6.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-6hXpvMTl.js → WorkspaceEnvironmentMenu-BnUh4dg9.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-BijVemBl.js → WorkspaceFileLocation-VzrSq_Ki.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BOO0E5i9.js → WorkspaceGitDialogs-nwvQOm9r.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-B_YzK7Do.js → WorkspaceMonacoEditor-m3bCIpZe.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-CFti1fvu.js → WorkspacePdfPreview-u6Iv0qr0.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DPAhNaV6.js → WorkspacePresentationPreview-CjvTjhUO.js} +1 -1
- package/dist/web/assets/{bot-BE2rL_qv.js → bot-DiDSZBLn.js} +1 -1
- package/dist/web/assets/{chat-resources-Beh5lB36.js → chat-resources-CmBtWC5V.js} +1 -1
- package/dist/web/assets/chevron-down-CqxKXYPf.js +1 -0
- package/dist/web/assets/chevron-right-ClP6ukIq.js +1 -0
- package/dist/web/assets/chevron-up-DY7wpdJ1.js +1 -0
- package/dist/web/assets/{chunk-C3TS766N-j1MK0e3c.js → chunk-C3TS766N-DSA4vs-Y.js} +1 -1
- package/dist/web/assets/{client-BnJhN-14.js → client-_uDCFdg5.js} +1 -1
- package/dist/web/assets/{client-choice-storage-CQ0CNkzG.js → client-choice-storage-CRKZpilL.js} +1 -1
- package/dist/web/assets/{cloud-upload-DFjZE4O4.js → cloud-upload-CWamjPts.js} +1 -1
- package/dist/web/assets/{copy-CGrLUtw5.js → copy-B56YjDkW.js} +1 -1
- package/dist/web/assets/{cssMode-DvRw2fUx.js → cssMode-BuC9qQvo.js} +1 -1
- package/dist/web/assets/{external-link-3ZnEFUXd.js → external-link-BSn21e-y.js} +1 -1
- package/dist/web/assets/{folder-open-i9n8450i.js → folder-open-CaJGWSr2.js} +1 -1
- package/dist/web/assets/{folder-plus-cu8Md_ej.js → folder-plus-eTUep-az.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CwckmC09.js → git-commit-horizontal-Buk_hy6T.js} +1 -1
- package/dist/web/assets/{htmlMode-8VF4Ovtw.js → htmlMode-D7kF2kDL.js} +1 -1
- package/dist/web/assets/{icons-4yRSxBZj.js → icons-B4B5eUyR.js} +1 -1
- package/dist/web/assets/{image-D-umhyyK.js → image--4h1aK2l.js} +1 -1
- package/dist/web/assets/{index-DiVhx1GM.js → index-CCaTs7xt.js} +2 -2
- package/dist/web/assets/{info-Dq2RsPDJ.js → info-DjMTH4sJ.js} +1 -1
- package/dist/web/assets/{jsonMode-CvCYQHkB.js → jsonMode-BVX_7KjE.js} +1 -1
- package/dist/web/assets/loader-circle-DNHvEoaP.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-CjufNNFF.js → lspLanguageFeatures-RBOb-3wX.js} +1 -1
- package/dist/web/assets/{maximize-2-CKY8dua6.js → maximize-2-Cjg-f1xT.js} +1 -1
- package/dist/web/assets/{message-square-CVDgKlKX.js → message-square-oIMQDMc3.js} +1 -1
- package/dist/web/assets/{monaco.contribution-BYAgjZbj.js → monaco.contribution-CIbGU5-C.js} +2 -2
- package/dist/web/assets/{monaco.contribution-PjJ1258q.js → monaco.contribution-CIwt2mTE.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BYY3-y9l.js → monaco.contribution-Dd1cPdSS.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Bh0CKj9i.js → monaco.contribution-KRLNg324.js} +2 -2
- package/dist/web/assets/{monitor-UYe42gew.js → monitor-BWaitd6I.js} +1 -1
- package/dist/web/assets/{paperclip-DrlSVUoz.js → paperclip-FYK6OySO.js} +1 -1
- package/dist/web/assets/{pdf-BMhday2W.js → pdf-DbwlsqZP.js} +1 -1
- package/dist/web/assets/play-DieChKfF.js +1 -0
- package/dist/web/assets/plus-DkfcQyma.js +1 -0
- package/dist/web/assets/{presentation-DcZKqH7w.js → presentation-B6MaAPC7.js} +1 -1
- package/dist/web/assets/{python-CiA01i07.js → python-DRYJxjiM.js} +1 -1
- package/dist/web/assets/{refresh-cw-00D-GDnF.js → refresh-cw-DOVpqCfJ.js} +1 -1
- package/dist/web/assets/{save-CXe7bqR7.js → save-BuyyyR4Q.js} +1 -1
- package/dist/web/assets/{settings-lists-B5J40WM6.js → settings-lists-BeAdxSjx.js} +1 -1
- package/dist/web/assets/square-D0YnIVh6.js +1 -0
- package/dist/web/assets/{square-terminal-DxC7TTds.js → square-terminal-DTOIZy6_.js} +1 -1
- package/dist/web/assets/{submit-issue-command-Dq3TqJLV.js → submit-issue-command-V--K9lVQ.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BH3Jckfo.js → toggleHighContrast-nNzCoE0h.js} +1 -1
- package/dist/web/assets/training-DZgfVcI-.js +1 -0
- package/dist/web/assets/{training-model-data-B6IZ3x-t.js → training-model-data-CWoTokkb.js} +1 -1
- package/dist/web/assets/{tsMode-DXkj4bqC.js → tsMode-BfVi5_FZ.js} +1 -1
- package/dist/web/assets/{upload-B3KRHVHl.js → upload-C2MnlWjj.js} +1 -1
- package/dist/web/assets/{useAccountSettings-BGRkTRrp.js → useAccountSettings-QwRbZIKu.js} +1 -1
- package/dist/web/assets/{useAgentInventory-D_1AlAZJ.js → useAgentInventory-B7xEgMCA.js} +1 -1
- package/dist/web/assets/{useChatContextSelection-hoMSuUSE.js → useChatContextSelection-O6wo4EqD.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-DxTER7Ow.js → useLocalAgentSchedules-DpHnOGoV.js} +1 -1
- package/dist/web/assets/{useQuery-DkPec_9x.js → useQuery-CvZ8bzdW.js} +1 -1
- package/dist/web/assets/{wifi-off-CMzpvbWl.js → wifi-off-B8d12Alh.js} +1 -1
- package/dist/web/assets/{workers-ziY_bTv2.js → workers-sIVKxb8c.js} +1 -1
- package/dist/web/assets/x-BvVvVB-j.js +1 -0
- package/dist/web/assets/{yaml-mSvqVSko.js → yaml-8-aLM3zj.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +1 -0
- package/package.json +1 -1
- package/dist/chunks/app-server-runtime-B7AMBGQZ.js +0 -2
- package/dist/chunks/chunk-6D3FI2XT.js +0 -2
- package/dist/chunks/chunk-VEBW7NKD.js +0 -2
- package/dist/chunks/cli-ALEEFAJ7.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +0 -2
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +0 -2
- package/dist/chunks/local-harness-taskset-review-E5GN5LTR.js +0 -2
- package/dist/chunks/project-action-payload-53OH6WDH.js +0 -2
- package/dist/chunks/saved-work-54I5ZJTC.js +0 -2
- package/dist/chunks/training-5NT2YB2L.js +0 -2
- package/dist/chunks/training-UY6KRG4M.js +0 -2
- package/dist/web/assets/App-CXhxya9x.js +0 -54
- package/dist/web/assets/RightSidebarHomePanel-BJmzUcmy.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-CP-nHAsJ.js +0 -1
- package/dist/web/assets/chevron-down-Bn8yph2O.js +0 -1
- package/dist/web/assets/chevron-right-BU-jUmb2.js +0 -1
- package/dist/web/assets/chevron-up-DacwuDJZ.js +0 -1
- package/dist/web/assets/loader-circle-DBl6qqtR.js +0 -1
- package/dist/web/assets/play-DIqZnaNf.js +0 -1
- package/dist/web/assets/plus-CFNxAPMK.js +0 -1
- package/dist/web/assets/square-DJEaBefe.js +0 -1
- package/dist/web/assets/training-DWfghwfZ.js +0 -1
- package/dist/web/assets/x-omjwMPbJ.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{j as H,n as O,p as U}from"./chunk-AFYYIJ6K.js";import{c as N}from"./chunk-BSHAIAXY.js";import{c as u,f as E,g as M,h as S}from"./chunk-3M53YXEI.js";import{f as L,h as _}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import{readFile as x}from"node:fs/promises";import{request as J}from"node:http";import{randomUUID as V}from"node:crypto";import{createInterface as z}from"node:readline/promises";var F="http://127.0.0.1:17874",Y=128*1024*1024,W=new Set(["cancelled","completed","failed","succeeded"]);async function we(e,n,r={}){let t=n[0];if(t==="estimate"){await(await import("./training-hosted-36SZFS4U.js")).runHostedTrainingCommand(e,["hosted-estimate-model",...n.slice(1)]);return}if(t==="start"&&u(e,"teamId")){await(await import("./training-hosted-36SZFS4U.js")).runHostedTrainingCommand(e,["hosted-start-model",...n.slice(1)]);return}if(t?.startsWith("hosted-")){await(await import("./training-hosted-36SZFS4U.js")).runHostedTrainingCommand(e,n);return}let o=n[1];if(!t||!["start","status","watch","logs","cancel","resume","artifacts","benchmark","create-project","prepare-project","pull-project","projects","inspect-project"].includes(t)||!o&&t!=="projects")throw new Error("usage: training <projects|inspect-project|create-project|prepare-project|pull-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]");if(n.length>2)throw new Error(`training ${t} accepts exactly one identifier`);if(t==="projects"&&o)throw new Error("training projects does not accept an identifier; use inspect-project <id>.");let s=t==="pull-project"?u(e,"profile"):null;if(t==="pull-project"&&!s)throw new Error("training pull-project requires --profile <local-profile-id>.");let a=N(e)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??F;if(["pull-project","projects","inspect-project","prepare-project"].includes(t)){let c=new URL(a);if(c.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(c.hostname)||c.username||c.password||c.search||c.hash||c.pathname!=="/")throw new Error(`training ${t} uses the local app's HTTP loopback API; the app resolves its signed-in hosted account.`)}let i=new q({baseUrl:a,request:r.request??await K(a,{maximumResponseBytes:Y,timeoutMs:t==="pull-project"?3e5:6e4})}),d=E(e.json);if(t==="projects"||t==="inspect-project"){b(await i.inspectProjects(t==="inspect-project"?o:void 0,u(e,"profile")??void 0),d);return}if(!o)throw new Error(`training ${t} requires an identifier.`);if(t==="pull-project"){let c=u(e,"snapshotFile"),g=c?await x(c):null;if(g&&g.byteLength>64*1024*1024)throw new Error("Model pull snapshot exceeds 64 MiB.");let P=g?JSON.parse(g.toString("utf8")):void 0;b(await i.pullHostedProject(o,s,P),d);return}if(t==="create-project"){let c=await Z({client:i,options:e,tasksetId:o});b(c,d);return}if(t==="prepare-project"){await(await import("./training-project-preparation-XWGRY5ME.js")).runProjectPreparation(i,o,e);return}if(t==="benchmark"){await Q({client:i,modelId:o,options:e,json:d,sleep:r.sleep});return}if(t==="resume"){let c=await i.modelRun(o,"resume","POST");b(c,d),await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}if(t==="start"){await re({client:i,dependencies:r,json:d,modelRunId:o,options:e});return}if(t==="watch"){await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}let w=t==="status"?"status":t==="logs"?"logs":t==="artifacts"?"artifacts":"cancel",y=await i.modelRun(o,w,t==="cancel"?"POST":"GET");b(y,d)}l(we,"runTrainingCommand");async function K(e,n={}){let r=new URL(e);if(r.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(r.hostname))return fetch;let t=(await x(_(L()).token,"utf8")).trim();if(!t)throw new Error("OpenPond local capability token is empty.");let o=n.maximumResponseBytes??8388608,s=n.timeoutMs??6e4;if(!Number.isSafeInteger(s)||s<1||s>864e5)throw new Error("Local request timeout must be between one millisecond and one day.");return(async(a,i={})=>{let d=a instanceof Request?new URL(a.url):new URL(String(a));if(d.origin!==r.origin||d.username||d.password)throw new Error("Local capability requests must remain on the selected server origin.");let w=new Headers(i.headers);w.set("authorization",`Bearer ${t}`);let y={};w.forEach((g,P)=>{y[P]=g});let c=i.signal?AbortSignal.any([i.signal,AbortSignal.timeout(s)]):AbortSignal.timeout(s);return new Promise((g,P)=>{let R=!1,h=J(d,{method:i.method??"GET",headers:y},m=>{let T=[],v=0;m.on("data",f=>{if(v+=f.byteLength,v>o){m.destroy(new Error(`Local response exceeds ${o} bytes.`));return}T.push(f)}),m.once("error",k),m.once("end",()=>{if(R)return;R=!0;let f=new Headers;for(let[j,I]of Object.entries(m.headers))if(Array.isArray(I))for(let G of I)f.append(j,G);else I!==void 0&&f.set(j,I);g(new Response(new Uint8Array(Buffer.concat(T)),{status:m.statusCode??500,statusText:m.statusMessage,headers:f}))})}),k=l(m=>{R||(R=!0,P(m))},"rejectOnce");if(h.once("error",k),c){let m=l(()=>h.destroy(c.reason instanceof Error?c.reason:new Error("Training API request aborted.")),"abort");c.aborted?m():c.addEventListener("abort",m,{once:!0})}if(i.body!==void 0&&i.body!==null){if(typeof i.body!="string"&&!(i.body instanceof Uint8Array)){h.destroy(new Error("Local Training API supports string or byte request bodies."));return}h.write(i.body)}h.end()})})}l(K,"createLocalAuthenticatedRequest");var q=class{static{l(this,"TrainingApiClient")}baseUrl;request;constructor(n){this.baseUrl=n.baseUrl.replace(/\/$/,""),this.request=n.request??fetch}async modelRun(n,r,t,o){let s=await this.json(`/v1/training/model-runs/${encodeURIComponent(n)}/${r}`,t,o);return await this.attachTraining({modelRunId:n}),s}prepareModelProject(n,r){return this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/prepare`,"POST",r)}async startModelProject(n,r){let t=await this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/start`,"POST",r),o=t&&typeof t=="object"&&"job"in t?t.job:null;return o&&typeof o=="object"&&"id"in o&&typeof o.id=="string"&&await this.attachTraining({jobId:o.id}),t}async attachTraining(n){let r=process.env.OPENPOND_CHAT_INVOCATION;if(r)try{await this.json("/v1/chat-experiments","POST",{action:"attach_training",payload:n,invocationToken:r})}catch(t){console.error(`Training operation succeeded, but chat attachment failed: ${t instanceof Error?t.message:String(t)}. Inspect the saved job to retry attachment; do not submit it again.`)}}trainingState(n){let r=n?`?profileId=${encodeURIComponent(n)}`:"";return this.json(`/v1/training${r}`,"GET")}inspectProjects(n,r){let t=r?`?profileId=${encodeURIComponent(r)}`:"";return this.json(`/v1/training/model-projects${n?`/${encodeURIComponent(n)}`:""}${t}`,"GET")}pullHostedProject(n,r,t){return this.json(`/v1/training/hosted-model-projects/${encodeURIComponent(n)}/pull`,"POST",{profileId:r,...t!==void 0?{snapshot:t}:{}})}startHarnessRefinerBenchmark(n,r){return this.json(`/v1/training/models/${encodeURIComponent(n)}/harness-refiner-benchmark`,"POST",r)}importTasksetDraftPackage(n){return this.json("/v1/training/taskset-drafts/import","POST",n)}publishTasksetDraft(n,r){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}/publish`,"POST",r?{modelId:r}:{})}tasksetReadiness(n){return this.json("/v1/training/readiness","POST",{tasksetId:n})}deleteTasksetDraft(n){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}`,"DELETE")}saveModelProject(n){return this.json("/v1/training/models","PUT",n)}prepareLocalModelProject(n,r){return this.json(`/v1/training/model-project-preparations/${r?"apply":"prepare"}`,"POST",n)}async json(n,r,t){let o=await this.request(`${this.baseUrl}${n}`,{method:r,headers:t===void 0?{Accept:"application/json"}:{Accept:"application/json","Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)}),s=await o.text(),a=null;if(s)try{a=JSON.parse(s)}catch{a=s}if(!o.ok){let i=a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:`${o.status} ${o.statusText}`.trim();throw new Error(`Training API request failed: ${i}`)}return a}};async function Q(e){let n=await e.client.trainingState(u(e.options,"profile")),r=X(n,e.modelId),t=u(e.options,"provider")||"openpond",o=u(e.options,"model")||"openpond-chat",s=u(e.options,"reasoningEffort")||"high",a=M(e.options.maxSpend,"max-spend")??10;if(a<=0)throw new Error("max-spend must be greater than zero");if(E(e.options.detach))throw new Error("Harness Refiner benchmark runs must be watched to terminal state.");let i=await e.client.startHarnessRefinerBenchmark(e.modelId,{profileId:r.profileId,model:{providerId:t,modelId:o},reasoningEffort:s==="none"?"none":s,maximumSpendUsd:a});b(i,e.json);let d=p(i,"id");if(!d)throw new Error("Benchmark start did not return a Model Run id.");await A({client:e.client,runId:d,json:e.json,intervalMs:S(e.options.intervalMs,"interval-ms")??2e3,sleep:e.sleep})}l(Q,"startHarnessRefinerBenchmark");function X(e,n){if(!e||typeof e!="object"||!("modelProjects"in e))throw new Error("Training state did not include Models.");let t=(Array.isArray(e.modelProjects)?e.modelProjects:[]).find(s=>s&&typeof s=="object"&&"id"in s&&s.id===n),o=t&&typeof t=="object"?p(t,"profileId"):null;if(!o)throw new Error(`Model ${n} was not found.`);return{profileId:o}}l(X,"modelProject");function p(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="string"&&r?r:null}l(p,"objectString");async function Z(e){let n=u(e.options,"recipe");if(!n)throw new Error("training create-project requires --recipe <versioned-recipe.json>");let r=await te(n,"Training recipe"),t=u(e.options,"profile"),o=await e.client.trainingState(t),s=ne(o,"tasksets",e.tasksetId,"Taskset"),a=t||p(s,"profileId");if(!a)throw new Error(`The Taskset has no Profile id (received ${typeof s.profileId}: ${String(s.profileId)}).`);let i=p(s,"profileId");if(i!==a)throw new Error(`Taskset ${e.tasksetId} belongs to Profile ${i??"unknown"}, not ${a}.`);let d=u(e.options,"projectId")||`model_${V()}`,w=t?o:await e.client.trainingState(a),c=D(w,"modelProjects").find(j=>p(j,"id")===d),g=C(e.options,"rolloutPlacement",["local","remote"],"local"),P=C(e.options,"gpuPlacementObjective",["fast","balanced","economical"],"balanced"),R=C(e.options,"runPreset",["small","standard","custom","small_experiment"],"custom"),h=M(e.options.maxSpend,"max-spend")??null;if(h!==null&&h<0)throw new Error("max-spend must be non-negative");let k=S(e.options.retentionDays,"retention-days")??null;if(k!==null&&k<0)throw new Error("retention-days must be non-negative");let m=p(s,"contentHash"),T=B(s,"revision");if(!m||!T||T<1)throw new Error("The Taskset does not have an immutable published revision.");let v=p(r,"method");if(!v)throw new Error("Training recipe must declare its method.");let f=ee(r);if(c){let j=$(c,"trainingSetup"),I=$(j,"tasksetRef");if(p(I,"id")!==e.tasksetId||p(c,"profileId")!==a)throw new Error(`Model Project ${d} already exists for a different Profile or Taskset.`);if($(j,"baseModel"))throw new Error(`Model Project ${d} already exists.`);return e.client.saveModelProject(await U(O.parse({...O.strip().parse(c),defaultBaseModel:f,trainingSetup:{...j,baseModel:f,recipe:r}}),B(c,"revision")??1))}return e.client.saveModelProject(await U(O.parse({id:d,profileId:a,name:u(e.options,"name")||p(s,"name")||"Managed Model",objective:u(e.options,"objective")||p(s,"objective"),defaultBaseModel:f,defaultDestinationId:u(e.options,"destination")||"openpond_managed",trainingSetup:{tasksetRef:{id:e.tasksetId,revision:T,contentHash:m},tasksetRelease:null,harnessRelease:null,baseModel:f,method:v,destinationId:u(e.options,"destination")||"openpond_managed",managedRolloutPlacement:g,managedGpuPlacementObjective:P,managedGpuRequirement:"any",runPreset:R,recipe:r,preferredMaximumSpendUsd:h,preferredRetentionDays:k}}),0))}l(Z,"createManagedModelProject");function ee(e){let n=$(e,"baseModel"),r=p(n,"id"),t=p(n,"revision"),o=p(n,"tokenizerRevision"),s=p(n,"chatTemplateHash");if(!r||!t||!o||!s)throw new Error("Managed GRPO recipe must pin baseModel id, revision, tokenizerRevision, and chatTemplateHash.");return H.parse({schemaVersion:"openpond.baseModelPreference.v1",modelId:r,revision:t,tokenizerRevision:o,chatTemplateHash:s,modelAssetId:null,source:"managed"})}l(ee,"managedBasePreferenceFromRecipe");function ne(e,n,r,t){let o=D(e,n).find(s=>p(s,"id")===r);if(!o)throw new Error(`${t} ${r} was not found.`);return o}l(ne,"trainingStateRecord");function D(e,n){if(!e||typeof e!="object"||!(n in e))return[];let r=e[n];return Array.isArray(r)?r.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):[]}l(D,"trainingStateRecords");function B(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="number"&&Number.isFinite(r)?r:null}l(B,"objectNumber");function $(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return r&&typeof r=="object"&&!Array.isArray(r)?r:null}l($,"objectRecord");function C(e,n,r,t){let o=u(e,n)||t;if(!r.includes(o))throw new Error(`${n} must be one of ${r.join(", ")}`);return o}l(C,"enumOption");async function te(e,n){let r;try{r=JSON.parse(await x(e,"utf8"))}catch(t){throw new Error(`Could not read ${n} ${e}: ${t instanceof Error?t.message:String(t)}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${n} must be a JSON object.`);return r}l(te,"readJsonObject");async function re(e){let n=M(e.options.maxSpend,"max-spend")??null;if(n!==null&&n<0)throw new Error("max-spend must be non-negative");let r=S(e.options.retentionDays,"retention-days")??null;if(r!==null&&r<=0)throw new Error("retention-days must be a positive integer");let t=u(e.options,"manifest"),o=t?await oe(t):void 0,s=u(e.options,"comparisonSeriesEntry")||null,a={maximumSpendUsd:n,retentionDays:r},i=await e.client.prepareModelProject(e.modelRunId,a);if(e.json||(console.log("Preparation:"),console.log(JSON.stringify(i,null,2))),!(E(e.options.yes)||await se(e.dependencies.confirm)))throw new Error("Training start cancelled.");let w=await e.client.startModelProject(e.modelRunId,{...a,exportApproved:E(e.options.exportApproved),manifest:o,comparisonSeriesEntryId:s});if(b(w,e.json),E(e.options.detach))return;let y=ie(w)??e.modelRunId;await A({client:e.client,runId:y,json:e.json,intervalMs:2e3,sleep:e.dependencies.sleep})}l(re,"startTraining");async function A(e){if(e.intervalMs<250)throw new Error("interval-ms must be at least 250");let n=e.sleep??(t=>new Promise(o=>setTimeout(o,t))),r="";for(;;){let t=await e.client.modelRun(e.runId,"status","GET"),o=JSON.stringify(t);if((e.json||o!==r)&&(b(t,e.json),r=o),W.has(ae(t)))return;await n(e.intervalMs)}}l(A,"watchTraining");async function oe(e){let n;try{n=JSON.parse(await x(e,"utf8"))}catch(r){throw new Error(`Could not read Harness Run Manifest ${e}: ${r instanceof Error?r.message:String(r)}`)}if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Harness Run Manifest must be a JSON object.");return n}l(oe,"readManifest");async function se(e){let n="Start this exact prepared training run? Downloads, provisioning, or spend may begin.";if(e)return e(n);if(!process.stdin.isTTY||!process.stdout.isTTY)throw new Error("training start requires --yes when standard input is not interactive");let r=z({input:process.stdin,output:process.stdout});try{let t=await r.question(`${n} [y/N] `);return t.trim().toLowerCase()==="y"||t.trim().toLowerCase()==="yes"}finally{r.close()}}l(se,"confirmStart");function ie(e){if(!e||typeof e!="object")return null;let n="job"in e?e.job:null;return!n||typeof n!="object"||!("id"in n)?null:typeof n.id=="string"?n.id:null}l(ie,"readRunId");function ae(e){return!e||typeof e!="object"?"":"state"in e&&typeof e.state=="string"?e.state:"status"in e&&typeof e.status=="string"?e.status:""}l(ae,"readStatus");function b(e,n){if(n){console.log(JSON.stringify(e));return}console.log(JSON.stringify(e,null,2))}l(b,"printResult");export{F as a,Y as b,we as c,K as d,q as e};
|
|
2
|
+
import{k as H,o as O,q as U}from"./chunk-C7NQPICU.js";import{c as N}from"./chunk-BSHAIAXY.js";import{c as u,f as E,g as M,h as S}from"./chunk-3M53YXEI.js";import{f as L,h as _}from"./chunk-UGOK7VTC.js";import{a as l}from"./chunk-FTQLQJQV.js";import{readFile as x}from"node:fs/promises";import{request as J}from"node:http";import{randomUUID as V}from"node:crypto";import{createInterface as z}from"node:readline/promises";var F="http://127.0.0.1:17874",Y=128*1024*1024,W=new Set(["cancelled","completed","failed","succeeded"]);async function we(e,n,r={}){let t=n[0];if(t==="estimate"){await(await import("./training-hosted-XKSUTMLQ.js")).runHostedTrainingCommand(e,["hosted-estimate-model",...n.slice(1)]);return}if(t==="start"&&u(e,"teamId")){await(await import("./training-hosted-XKSUTMLQ.js")).runHostedTrainingCommand(e,["hosted-start-model",...n.slice(1)]);return}if(t?.startsWith("hosted-")){await(await import("./training-hosted-XKSUTMLQ.js")).runHostedTrainingCommand(e,n);return}let o=n[1];if(!t||!["start","status","watch","logs","cancel","resume","artifacts","benchmark","create-project","prepare-project","pull-project","projects","inspect-project"].includes(t)||!o&&t!=="projects")throw new Error("usage: training <projects|inspect-project|create-project|prepare-project|pull-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> [identifier]");if(n.length>2)throw new Error(`training ${t} accepts exactly one identifier`);if(t==="projects"&&o)throw new Error("training projects does not accept an identifier; use inspect-project <id>.");let s=t==="pull-project"?u(e,"profile"):null;if(t==="pull-project"&&!s)throw new Error("training pull-project requires --profile <local-profile-id>.");let a=N(e)??process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/,"")??F;if(["pull-project","projects","inspect-project","prepare-project"].includes(t)){let c=new URL(a);if(c.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(c.hostname)||c.username||c.password||c.search||c.hash||c.pathname!=="/")throw new Error(`training ${t} uses the local app's HTTP loopback API; the app resolves its signed-in hosted account.`)}let i=new q({baseUrl:a,request:r.request??await K(a,{maximumResponseBytes:Y,timeoutMs:t==="pull-project"?3e5:6e4})}),d=E(e.json);if(t==="projects"||t==="inspect-project"){b(await i.inspectProjects(t==="inspect-project"?o:void 0,u(e,"profile")??void 0),d);return}if(!o)throw new Error(`training ${t} requires an identifier.`);if(t==="pull-project"){let c=u(e,"snapshotFile"),g=c?await x(c):null;if(g&&g.byteLength>64*1024*1024)throw new Error("Model pull snapshot exceeds 64 MiB.");let P=g?JSON.parse(g.toString("utf8")):void 0;b(await i.pullHostedProject(o,s,P),d);return}if(t==="create-project"){let c=await Z({client:i,options:e,tasksetId:o});b(c,d);return}if(t==="prepare-project"){await(await import("./training-project-preparation-XWGRY5ME.js")).runProjectPreparation(i,o,e);return}if(t==="benchmark"){await Q({client:i,modelId:o,options:e,json:d,sleep:r.sleep});return}if(t==="resume"){let c=await i.modelRun(o,"resume","POST");b(c,d),await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}if(t==="start"){await re({client:i,dependencies:r,json:d,modelRunId:o,options:e});return}if(t==="watch"){await A({client:i,runId:o,json:d,intervalMs:S(e.intervalMs,"interval-ms")??2e3,sleep:r.sleep});return}let w=t==="status"?"status":t==="logs"?"logs":t==="artifacts"?"artifacts":"cancel",y=await i.modelRun(o,w,t==="cancel"?"POST":"GET");b(y,d)}l(we,"runTrainingCommand");async function K(e,n={}){let r=new URL(e);if(r.protocol!=="http:"||!["127.0.0.1","localhost","[::1]"].includes(r.hostname))return fetch;let t=(await x(_(L()).token,"utf8")).trim();if(!t)throw new Error("OpenPond local capability token is empty.");let o=n.maximumResponseBytes??8388608,s=n.timeoutMs??6e4;if(!Number.isSafeInteger(s)||s<1||s>864e5)throw new Error("Local request timeout must be between one millisecond and one day.");return(async(a,i={})=>{let d=a instanceof Request?new URL(a.url):new URL(String(a));if(d.origin!==r.origin||d.username||d.password)throw new Error("Local capability requests must remain on the selected server origin.");let w=new Headers(i.headers);w.set("authorization",`Bearer ${t}`);let y={};w.forEach((g,P)=>{y[P]=g});let c=i.signal?AbortSignal.any([i.signal,AbortSignal.timeout(s)]):AbortSignal.timeout(s);return new Promise((g,P)=>{let R=!1,h=J(d,{method:i.method??"GET",headers:y},m=>{let T=[],v=0;m.on("data",f=>{if(v+=f.byteLength,v>o){m.destroy(new Error(`Local response exceeds ${o} bytes.`));return}T.push(f)}),m.once("error",k),m.once("end",()=>{if(R)return;R=!0;let f=new Headers;for(let[j,I]of Object.entries(m.headers))if(Array.isArray(I))for(let G of I)f.append(j,G);else I!==void 0&&f.set(j,I);g(new Response(new Uint8Array(Buffer.concat(T)),{status:m.statusCode??500,statusText:m.statusMessage,headers:f}))})}),k=l(m=>{R||(R=!0,P(m))},"rejectOnce");if(h.once("error",k),c){let m=l(()=>h.destroy(c.reason instanceof Error?c.reason:new Error("Training API request aborted.")),"abort");c.aborted?m():c.addEventListener("abort",m,{once:!0})}if(i.body!==void 0&&i.body!==null){if(typeof i.body!="string"&&!(i.body instanceof Uint8Array)){h.destroy(new Error("Local Training API supports string or byte request bodies."));return}h.write(i.body)}h.end()})})}l(K,"createLocalAuthenticatedRequest");var q=class{static{l(this,"TrainingApiClient")}baseUrl;request;constructor(n){this.baseUrl=n.baseUrl.replace(/\/$/,""),this.request=n.request??fetch}async modelRun(n,r,t,o){let s=await this.json(`/v1/training/model-runs/${encodeURIComponent(n)}/${r}`,t,o);return await this.attachTraining({modelRunId:n}),s}prepareModelProject(n,r){return this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/prepare`,"POST",r)}async startModelProject(n,r){let t=await this.json(`/v1/training/model-projects/${encodeURIComponent(n)}/training/start`,"POST",r),o=t&&typeof t=="object"&&"job"in t?t.job:null;return o&&typeof o=="object"&&"id"in o&&typeof o.id=="string"&&await this.attachTraining({jobId:o.id}),t}async attachTraining(n){let r=process.env.OPENPOND_CHAT_INVOCATION;if(r)try{await this.json("/v1/chat-experiments","POST",{action:"attach_training",payload:n,invocationToken:r})}catch(t){console.error(`Training operation succeeded, but chat attachment failed: ${t instanceof Error?t.message:String(t)}. Inspect the saved job to retry attachment; do not submit it again.`)}}trainingState(n){let r=n?`?profileId=${encodeURIComponent(n)}`:"";return this.json(`/v1/training${r}`,"GET")}inspectProjects(n,r){let t=r?`?profileId=${encodeURIComponent(r)}`:"";return this.json(`/v1/training/model-projects${n?`/${encodeURIComponent(n)}`:""}${t}`,"GET")}pullHostedProject(n,r,t){return this.json(`/v1/training/hosted-model-projects/${encodeURIComponent(n)}/pull`,"POST",{profileId:r,...t!==void 0?{snapshot:t}:{}})}startHarnessRefinerBenchmark(n,r){return this.json(`/v1/training/models/${encodeURIComponent(n)}/harness-refiner-benchmark`,"POST",r)}importTasksetDraftPackage(n){return this.json("/v1/training/taskset-drafts/import","POST",n)}publishTasksetDraft(n,r){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}/publish`,"POST",r?{modelId:r}:{})}tasksetReadiness(n){return this.json("/v1/training/readiness","POST",{tasksetId:n})}deleteTasksetDraft(n){return this.json(`/v1/training/taskset-drafts/${encodeURIComponent(n)}`,"DELETE")}saveModelProject(n){return this.json("/v1/training/models","PUT",n)}prepareLocalModelProject(n,r){return this.json(`/v1/training/model-project-preparations/${r?"apply":"prepare"}`,"POST",n)}async json(n,r,t){let o=await this.request(`${this.baseUrl}${n}`,{method:r,headers:t===void 0?{Accept:"application/json"}:{Accept:"application/json","Content-Type":"application/json"},body:t===void 0?void 0:JSON.stringify(t)}),s=await o.text(),a=null;if(s)try{a=JSON.parse(s)}catch{a=s}if(!o.ok){let i=a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:`${o.status} ${o.statusText}`.trim();throw new Error(`Training API request failed: ${i}`)}return a}};async function Q(e){let n=await e.client.trainingState(u(e.options,"profile")),r=X(n,e.modelId),t=u(e.options,"provider")||"openpond",o=u(e.options,"model")||"openpond-chat",s=u(e.options,"reasoningEffort")||"high",a=M(e.options.maxSpend,"max-spend")??10;if(a<=0)throw new Error("max-spend must be greater than zero");if(E(e.options.detach))throw new Error("Harness Refiner benchmark runs must be watched to terminal state.");let i=await e.client.startHarnessRefinerBenchmark(e.modelId,{profileId:r.profileId,model:{providerId:t,modelId:o},reasoningEffort:s==="none"?"none":s,maximumSpendUsd:a});b(i,e.json);let d=p(i,"id");if(!d)throw new Error("Benchmark start did not return a Model Run id.");await A({client:e.client,runId:d,json:e.json,intervalMs:S(e.options.intervalMs,"interval-ms")??2e3,sleep:e.sleep})}l(Q,"startHarnessRefinerBenchmark");function X(e,n){if(!e||typeof e!="object"||!("modelProjects"in e))throw new Error("Training state did not include Models.");let t=(Array.isArray(e.modelProjects)?e.modelProjects:[]).find(s=>s&&typeof s=="object"&&"id"in s&&s.id===n),o=t&&typeof t=="object"?p(t,"profileId"):null;if(!o)throw new Error(`Model ${n} was not found.`);return{profileId:o}}l(X,"modelProject");function p(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="string"&&r?r:null}l(p,"objectString");async function Z(e){let n=u(e.options,"recipe");if(!n)throw new Error("training create-project requires --recipe <versioned-recipe.json>");let r=await te(n,"Training recipe"),t=u(e.options,"profile"),o=await e.client.trainingState(t),s=ne(o,"tasksets",e.tasksetId,"Taskset"),a=t||p(s,"profileId");if(!a)throw new Error(`The Taskset has no Profile id (received ${typeof s.profileId}: ${String(s.profileId)}).`);let i=p(s,"profileId");if(i!==a)throw new Error(`Taskset ${e.tasksetId} belongs to Profile ${i??"unknown"}, not ${a}.`);let d=u(e.options,"projectId")||`model_${V()}`,w=t?o:await e.client.trainingState(a),c=D(w,"modelProjects").find(j=>p(j,"id")===d),g=C(e.options,"rolloutPlacement",["local","remote"],"local"),P=C(e.options,"gpuPlacementObjective",["fast","balanced","economical"],"balanced"),R=C(e.options,"runPreset",["small","standard","custom","small_experiment"],"custom"),h=M(e.options.maxSpend,"max-spend")??null;if(h!==null&&h<0)throw new Error("max-spend must be non-negative");let k=S(e.options.retentionDays,"retention-days")??null;if(k!==null&&k<0)throw new Error("retention-days must be non-negative");let m=p(s,"contentHash"),T=B(s,"revision");if(!m||!T||T<1)throw new Error("The Taskset does not have an immutable published revision.");let v=p(r,"method");if(!v)throw new Error("Training recipe must declare its method.");let f=ee(r);if(c){let j=$(c,"trainingSetup"),I=$(j,"tasksetRef");if(p(I,"id")!==e.tasksetId||p(c,"profileId")!==a)throw new Error(`Model Project ${d} already exists for a different Profile or Taskset.`);if($(j,"baseModel"))throw new Error(`Model Project ${d} already exists.`);return e.client.saveModelProject(await U(O.parse({...O.strip().parse(c),defaultBaseModel:f,trainingSetup:{...j,baseModel:f,recipe:r}}),B(c,"revision")??1))}return e.client.saveModelProject(await U(O.parse({id:d,profileId:a,name:u(e.options,"name")||p(s,"name")||"Managed Model",objective:u(e.options,"objective")||p(s,"objective"),defaultBaseModel:f,defaultDestinationId:u(e.options,"destination")||"openpond_managed",trainingSetup:{tasksetRef:{id:e.tasksetId,revision:T,contentHash:m},tasksetRelease:null,harnessRelease:null,baseModel:f,method:v,destinationId:u(e.options,"destination")||"openpond_managed",managedRolloutPlacement:g,managedGpuPlacementObjective:P,managedGpuRequirement:"any",runPreset:R,recipe:r,preferredMaximumSpendUsd:h,preferredRetentionDays:k}}),0))}l(Z,"createManagedModelProject");function ee(e){let n=$(e,"baseModel"),r=p(n,"id"),t=p(n,"revision"),o=p(n,"tokenizerRevision"),s=p(n,"chatTemplateHash");if(!r||!t||!o||!s)throw new Error("Managed GRPO recipe must pin baseModel id, revision, tokenizerRevision, and chatTemplateHash.");return H.parse({schemaVersion:"openpond.baseModelPreference.v1",modelId:r,revision:t,tokenizerRevision:o,chatTemplateHash:s,modelAssetId:null,source:"managed"})}l(ee,"managedBasePreferenceFromRecipe");function ne(e,n,r,t){let o=D(e,n).find(s=>p(s,"id")===r);if(!o)throw new Error(`${t} ${r} was not found.`);return o}l(ne,"trainingStateRecord");function D(e,n){if(!e||typeof e!="object"||!(n in e))return[];let r=e[n];return Array.isArray(r)?r.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):[]}l(D,"trainingStateRecords");function B(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return typeof r=="number"&&Number.isFinite(r)?r:null}l(B,"objectNumber");function $(e,n){if(!e||typeof e!="object"||!(n in e))return null;let r=e[n];return r&&typeof r=="object"&&!Array.isArray(r)?r:null}l($,"objectRecord");function C(e,n,r,t){let o=u(e,n)||t;if(!r.includes(o))throw new Error(`${n} must be one of ${r.join(", ")}`);return o}l(C,"enumOption");async function te(e,n){let r;try{r=JSON.parse(await x(e,"utf8"))}catch(t){throw new Error(`Could not read ${n} ${e}: ${t instanceof Error?t.message:String(t)}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${n} must be a JSON object.`);return r}l(te,"readJsonObject");async function re(e){let n=M(e.options.maxSpend,"max-spend")??null;if(n!==null&&n<0)throw new Error("max-spend must be non-negative");let r=S(e.options.retentionDays,"retention-days")??null;if(r!==null&&r<=0)throw new Error("retention-days must be a positive integer");let t=u(e.options,"manifest"),o=t?await oe(t):void 0,s=u(e.options,"comparisonSeriesEntry")||null,a={maximumSpendUsd:n,retentionDays:r},i=await e.client.prepareModelProject(e.modelRunId,a);if(e.json||(console.log("Preparation:"),console.log(JSON.stringify(i,null,2))),!(E(e.options.yes)||await se(e.dependencies.confirm)))throw new Error("Training start cancelled.");let w=await e.client.startModelProject(e.modelRunId,{...a,exportApproved:E(e.options.exportApproved),manifest:o,comparisonSeriesEntryId:s});if(b(w,e.json),E(e.options.detach))return;let y=ie(w)??e.modelRunId;await A({client:e.client,runId:y,json:e.json,intervalMs:2e3,sleep:e.dependencies.sleep})}l(re,"startTraining");async function A(e){if(e.intervalMs<250)throw new Error("interval-ms must be at least 250");let n=e.sleep??(t=>new Promise(o=>setTimeout(o,t))),r="";for(;;){let t=await e.client.modelRun(e.runId,"status","GET"),o=JSON.stringify(t);if((e.json||o!==r)&&(b(t,e.json),r=o),W.has(ae(t)))return;await n(e.intervalMs)}}l(A,"watchTraining");async function oe(e){let n;try{n=JSON.parse(await x(e,"utf8"))}catch(r){throw new Error(`Could not read Harness Run Manifest ${e}: ${r instanceof Error?r.message:String(r)}`)}if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Harness Run Manifest must be a JSON object.");return n}l(oe,"readManifest");async function se(e){let n="Start this exact prepared training run? Downloads, provisioning, or spend may begin.";if(e)return e(n);if(!process.stdin.isTTY||!process.stdout.isTTY)throw new Error("training start requires --yes when standard input is not interactive");let r=z({input:process.stdin,output:process.stdout});try{let t=await r.question(`${n} [y/N] `);return t.trim().toLowerCase()==="y"||t.trim().toLowerCase()==="yes"}finally{r.close()}}l(se,"confirmStart");function ie(e){if(!e||typeof e!="object")return null;let n="job"in e?e.job:null;return!n||typeof n!="object"||!("id"in n)?null:typeof n.id=="string"?n.id:null}l(ie,"readRunId");function ae(e){return!e||typeof e!="object"?"":"state"in e&&typeof e.state=="string"?e.state:"status"in e&&typeof e.status=="string"?e.status:""}l(ae,"readStatus");function b(e,n){if(n){console.log(JSON.stringify(e));return}console.log(JSON.stringify(e,null,2))}l(b,"printResult");export{F as a,Y as b,we as c,K as d,q as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{j as Y,m as g,n as M}from"./chunk-HIQPGYVH.js";import{j as n,l as H,x,y as Z}from"./chunk-DXJC3QW7.js";import{A as W,f as Q,t as X,v as T}from"./chunk-D6L6UNUQ.js";import{Ka as C,Na as J,W as V,Za as L,fb as F,l as B,lb as K,m as N,oa as P,va as q}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as p}from"./chunk-FTQLQJQV.js";var k=e.string().regex(/^[a-f0-9]{64}$/),ee=e.object({providerId:e.literal("claude-code"),configurationHash:k,executableHash:k,version:e.string().regex(/^2\.\d+\.\d+$/),capabilityHash:k,maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5),maximumTurns:e.number().int().min(1).max(100),holdOpen:e.boolean()}).strict(),Ee=e.object({id:e.string().min(1).max(200),receiptId:e.string().min(1).max(200),sessionId:e.uuid(),operationId:e.string().min(1).max(200),action:e.enum(["message","seal"]),text:e.string().max(262144).optional()}).strict().superRefine((t,a)=>{t.action==="message"&&!t.text?.trim()&&a.addIssue({code:"custom",message:"A human intervention requires a message."}),t.action==="seal"&&t.text!==void 0&&a.addIssue({code:"custom",message:"Sealing does not add a prompt."})}),Pe=e.object({provider:e.literal("claude-code"),sessionId:e.uuid(),requestId:e.string().min(1).max(200),modelId:e.string().min(1).max(500),runtime:ee,sourceHash:k,outputHash:k,traceHash:k,runtimeEventRefs:e.array(e.string().min(1).max(200)).min(1).max(2e4),eventCount:e.number().int().positive().max(2e4),startedAt:e.iso.datetime(),completedAt:e.iso.datetime(),cleanupComplete:e.literal(!0)}).strict().superRefine((t,a)=>{(t.runtimeEventRefs.length!==t.eventCount||new Set(t.runtimeEventRefs).size!==t.eventCount)&&a.addIssue({code:"custom",message:"Process event references must match the exact retained trace population."})}),_=e.object({providerId:e.literal("codex"),configurationHash:e.string().regex(/^[a-f0-9]{64}$/),accountHash:e.string().regex(/^[a-f0-9]{64}$/),reasoningEffort:e.enum(["low","medium","high","xhigh"]),maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5)}).strict(),w=e.object({id:e.string().trim().min(1).max(240),revision:e.number().int().positive(),contentHash:e.string().regex(/^[a-f0-9]{64}$/),targetId:e.string().trim().min(1).max(240).nullable()}).strict(),ce=e.array(e.object({role:e.enum(["system","user","assistant"]),content:e.string().max(1e5)}).strict()).max(100).superRefine((t,a)=>{t.reduce((i,r)=>i+r.content.length,0)>1e5&&a.addIssue({code:"custom",message:"Evaluation prompt exceeds 100,000 characters."})}),le=e.object({schemaVersion:e.literal("openpond.experimentAttemptGrade.v1"),selectionHash:e.string().regex(/^[a-f0-9]{64}$/),grades:e.array(C).min(1).max(100),score:e.number().min(0).max(1).nullable(),passed:e.boolean(),rewardEligible:e.boolean(),gradingStatus:e.enum(["scored","pending","unscorable","not_configured"]),failureClass:Y.nullable(),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().superRefine((t,a)=>{let{contentHash:i,...r}=t;g(r)!==i&&a.addIssue({code:"custom",message:"Experiment grading integrity failed."});let s=t.grades.flatMap(o=>o.components);(s.length!==t.grades.length||new Set(s.map(o=>o.graderId)).size!==s.length)&&a.addIssue({code:"custom",message:"Each selected criterion requires exactly one distinct grader result."});for(let o of t.grades){let{contentHash:d,...c}=o;g(c)!==d&&a.addIssue({code:"custom",message:"A retained criterion changed."});for(let h of o.components){let{contentHash:E,...f}=h;g(f)!==E&&a.addIssue({code:"custom",message:"A retained grader result changed."})}}}),m=e.string().trim().min(1).max(200),y=e.string().regex(/^[a-f0-9]{64}$/),O=e.discriminatedUnion("kind",[e.object({kind:e.literal("hosted_chat"),modelId:m,localRuntime:e.union([e.object({providerId:e.literal("custom-openai-compatible"),configurationHash:y,maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5)}).strict(),ee,_]).optional(),candidate:e.object({artifactId:m,contentHash:y,preparationId:m,dispatchId:m,baseProfileId:m,workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/)}).strict().optional(),harness:F.optional(),messages:ce.optional(),maxOutputTokens:e.number().int().min(1).max(1e6).default(1e5),temperature:e.number().min(0).max(2).default(0),topP:e.number().gt(0).max(1).default(1)}).strict(),e.object({kind:e.literal("fixture"),fixtureId:m}).strict()]),te=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptRequest.v1"),operationId:m,teamId:m,modelProjectId:m.nullable(),project:w.optional(),taskset:x,taskId:m,environmentSeed:e.number().int().min(0).max(2147483647).default(0),policy:O}).strict(),pe=e.object({modelProjectId:m.nullable(),taskset:x,afterTaskId:m.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),ue=e.object({modelProjectId:m.nullable(),taskset:x,available:e.boolean(),unavailableReason:e.string().max(1e3).nullable(),models:e.array(e.object({id:m,name:e.string().max(500),maximumOutputTokens:e.number().int().min(1).max(1e6).optional(),baseModel:Z.nullable().optional()}).strict()).max(200),tasks:e.array(e.object({id:m,split:V,inputPreview:e.string().max(500),fixtures:e.array(e.object({id:m,label:e.string().max(200)}).strict()).max(1e3)}).strict()).max(100),nextCursor:m.nullable()}).strict(),j=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptSummary.v1"),id:m,revision:e.number().int().positive(),request:te,status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),policySnapshot:e.object({modelId:m,provider:m,upstreamModelId:e.string().min(1).max(500),configurationHash:y}).strict().nullable(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),cleanupComplete:e.boolean(),resultAvailable:e.boolean(),score:e.number().min(0).max(1).nullable(),gradingStatus:e.enum(["not_started","pending","scored","unscorable","not_configured"]).default("not_started"),passed:e.boolean().nullable(),outputPreview:e.string().max(500).nullable(),error:e.object({code:m,message:e.string().max(2e3)}).strict().nullable()}).strict().superRefine((t,a)=>{t.request.policy.kind==="fixture"!=(t.policySnapshot===null)&&a.addIssue({code:"custom",path:["policySnapshot"],message:"Fixture execution must not claim a model identity."}),t.status==="completed"&&(!t.cleanupComplete||!t.resultAvailable||!t.completedAt)&&a.addIssue({code:"custom",message:"Completed attempts require retained results and confirmed cleanup."})}),he=e.object({modelProjectId:m,afterId:m.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),fe=e.object({items:e.array(j).max(100),nextCursor:m.nullable()}).strict(),ge=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptResult.v1"),attempt:j,output:e.string().max(1048576).nullable(),messages:e.array(e.record(e.string(),e.unknown())).max(4002),composition:L.nullable(),grade:C.nullable().optional(),experimentGrade:le.nullable().optional(),environment:e.object({status:e.enum(["completed","budget_exhausted","cancelled","timed_out","policy_failure","environment_failure"]),collected:e.boolean(),definition:x,initialStateHash:y.nullable(),finalStateHash:y.nullable(),attemptHash:y}).strict(),native:K.optional(),providerRequestIds:e.array(m).max(1001),contentHash:y}).strict().superRefine((t,a)=>{let i=t.attempt.request.policy.kind==="hosted_chat"?t.attempt.request.policy.harness:void 0;!!i!=!!t.native&&a.addIssue({code:"custom",path:["native"],message:"Standalone Harness results require their exact native evidence."}),t.native&&(!i||g(i)!==g(t.native.source)||t.native.modelConfigurationHash!==t.attempt.policySnapshot?.configurationHash||t.environment.initialStateHash!==null||t.environment.finalStateHash!==null||t.environment.status==="completed"&&(!t.environment.collected||t.output===null||t.native.partialOutputAvailable||t.native.outputHash!==g(t.output)))&&a.addIssue({code:"custom",path:["native"],message:"Native evidence differs from the admitted source, model or output."}),t.experimentGrade&&((t.grade||t.composition)&&a.addIssue({code:"custom",message:"Selected Experiment grading cannot claim another grade population."}),(!["completed","failed"].includes(t.attempt.status)||!t.attempt.resultAvailable||t.attempt.score!==t.experimentGrade.score||t.attempt.gradingStatus!==t.experimentGrade.gradingStatus||t.attempt.passed!==(t.experimentGrade.score===null?null:t.experimentGrade.passed))&&a.addIssue({code:"custom",message:"Experiment grading differs from its retained attempt summary."})),t.grade&&(t.composition&&a.addIssue({code:"custom",path:["grade"],message:"An ordinary grade cannot also claim a Reward composition."}),(!["completed","failed"].includes(t.attempt.status)||!t.attempt.resultAvailable||t.attempt.score!==t.grade.score||t.attempt.gradingStatus!==t.grade.gradingStatus||t.attempt.passed!==(t.grade.score===null?null:t.grade.passed))&&a.addIssue({code:"custom",path:["grade"],message:"Ordinary grade differs from its terminal attempt summary."}))}),b=class extends Error{static{p(this,"OpenPondModelStarterAttemptError")}constructor(t,a,i){super(i),this.status=t,this.code=a,this.name="OpenPondModelStarterAttemptError"}status;code},$e=class{static{p(this,"OpenPondModelStarterAttemptsClient")}#e;constructor(t){let a=new URL(t.baseUrl);if(!t.apiKey.trim()||!t.teamId.trim()||!["https:","http:"].includes(a.protocol)||a.username||a.password||a.search||a.hash)throw new Error("Starter attempts require an HTTP(S) endpoint and workspace credentials.");this.#e={...t,baseUrl:a.toString().replace(/\/+$/,"")}}async create(t,a={}){let i=te.parse(t);if(i.teamId!==this.#e.teamId)throw new Error("Attempt belongs to another workspace.");let r=this.#a(await this.#t("","POST",i,a.signal));if(n(r.request)!==n(i))throw new b(502,"attempt_request_mismatch","Attempt receipt differs from the submitted request.");return r}async get(t,a={}){return this.#a(await this.#t(`/${encodeURIComponent(m.parse(t))}`,"GET",void 0,a.signal),t)}async choices(t,a={}){let i=pe.parse(t),r=new URLSearchParams({...i.modelProjectId?{modelProjectId:i.modelProjectId}:{},tasksetId:i.taskset.id,revision:String(i.taskset.revision),contentHash:i.taskset.contentHash,limit:String(i.limit)});i.afterTaskId&&r.set("afterTaskId",i.afterTaskId);let s=ue.parse(await this.#t(`/choices?${r}`,"GET",void 0,a.signal));if(s.modelProjectId!==i.modelProjectId||n(s.taskset)!==n(i.taskset)||s.tasks.length>i.limit||new Set(s.tasks.map(o=>o.id)).size!==s.tasks.length)throw new b(502,"attempt_choices_mismatch","Attempt choices differ from the selected model or Taskset.");return s}async cancel(t,a={}){return this.#a(await this.#t(`/${encodeURIComponent(m.parse(t))}/cancel`,"POST",void 0,a.signal),t)}async result(t,a={}){let i=ge.parse(await this.#t(`/${encodeURIComponent(m.parse(t))}/result`,"GET",void 0,a.signal));this.#a(i.attempt,t);let{contentHash:r,...s}=i;if(!i.attempt.resultAvailable||await H(s)!==r)throw new b(502,"attempt_result_integrity","Attempt result integrity failed.");return i}async list(t,a={}){let i=he.parse(t),r=new URLSearchParams({modelProjectId:i.modelProjectId,limit:String(i.limit)});i.afterId&&r.set("afterId",i.afterId);let s=fe.parse(await this.#t(`?${r}`,"GET",void 0,a.signal));if(s.items.length>i.limit||new Set(s.items.map(o=>o.id)).size!==s.items.length||s.items.some(o=>this.#a(o).request.modelProjectId!==i.modelProjectId))throw new b(502,"attempt_page_mismatch","Attempt page differs from the selected model.");return s}#a(t,a){let i=j.parse(t);if(i.request.teamId!==this.#e.teamId||a&&i.id!==a)throw new b(502,"attempt_identity_mismatch","Attempt receipt belongs to another identity or workspace.");return i}async#t(t,a,i,r){let s=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/model-starter-attempts${t}`,{method:a,headers:{Authorization:`Bearer ${this.#e.apiKey}`,"X-OpenPond-Team-Id":this.#e.teamId,"Content-Type":"application/json",Accept:"application/json"},...i===void 0?{}:{body:JSON.stringify(i)},signal:r,redirect:"error"}),o=s.body?.getReader();if(!o)throw new b(s.status,"attempt_empty_response","Attempt response was empty.");let d=0,c="",h=new TextDecoder;try{for(;;){let f=await o.read();if(f.done)break;if(d+=f.value.byteLength,d>16777216)throw new b(502,"attempt_response_too_large","Attempt response exceeded its byte limit.");c+=h.decode(f.value,{stream:!0})}c+=h.decode()}finally{await o.cancel(),o.releaseLock()}let E=JSON.parse(c);if(!s.ok){let f=e.object({code:m,message:e.string().max(2e3)}).safeParse(E);throw new b(s.status,f.success?f.data.code:"attempt_request_failed",f.success?f.data.message:"Attempt request failed.")}return E}};var R=e.string().trim().min(1).max(240),z=e.string().regex(/^[a-f0-9]{64}$/),A=e.object({maxOutputTokens:e.number().int().min(1).max(1e6).default(4096),temperature:e.number().min(0).max(2).default(0),topP:e.number().gt(0).max(1).default(1)}).strict();function Xe(t){return A.parse({maxOutputTokens:t.maxOutputTokens,temperature:t.temperature,topP:t.topP})}p(Xe,"resolveHarnessExperimentSampling");var I=e.object({kind:e.literal("hosted_harness"),modelId:R,maxOutputTokens:A.shape.maxOutputTokens.removeDefault().optional(),temperature:A.shape.temperature.removeDefault().optional(),topP:A.shape.topP.removeDefault().optional(),localRuntime:_.optional(),candidate:e.object({artifactId:R,contentHash:z,preparationId:R,dispatchId:R,baseProfileId:R,workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/)}).strict().optional(),sourceCandidate:q.shape.sourceCandidate,reasoningEffort:e.enum(["off","low","medium","high","xhigh","max"]).optional(),profileRepositoryId:R,source:q,modelConfigurationHash:z,packageHash:z,externalDatasetBinding:P.optional()}).strict().superRefine((t,a)=>{JSON.stringify(t.externalDatasetBinding??null)!==JSON.stringify(t.source.externalDatasetBinding??null)&&a.addIssue({code:"custom",message:"The policy and source must bind the same external Dataset recipe."}),JSON.stringify(t.sourceCandidate??null)!==JSON.stringify(t.source.sourceCandidate??null)&&a.addIssue({code:"custom",message:"The policy and prepared source must bind the same actual source candidate."})}),u=e.string().trim().min(1).max(200),ae=e.string().regex(/^[a-f0-9]{64}$/),xe=e.discriminatedUnion("kind",[O.options[0],e.object({kind:e.literal("fixture")}).strict(),I]),S=e.object({schemaVersion:e.literal("openpond.modelTasksetRunRequest.v1"),operationId:u,teamId:u,modelProjectId:u.nullable(),name:e.string().trim().min(1).max(200).optional(),project:w.optional(),taskset:x,policy:xe,population:e.array(X).min(1).max(1e4)}).strict().superRefine((t,a)=>{new Set(t.population.map(i=>i.receiptId)).size!==t.population.length&&a.addIssue({code:"custom",path:["population"],message:"Run receipt identities must be unique."}),t.population.some(i=>i.fixtureId!==null!=(t.policy.kind==="fixture"))&&a.addIssue({code:"custom",path:["population"],message:"Only fixture runs require a fixture identity for every member."}),t.population.some(i=>!/^(0|[1-9][0-9]*)$/.test(i.seed)||Number(i.seed)>2147483647)&&a.addIssue({code:"custom",path:["population"],message:"Hosted environment seeds must be integers from 0 to 2147483647."}),t.policy.kind==="hosted_harness"&&t.modelProjectId!==null&&a.addIssue({code:"custom",path:["modelProjectId"],message:"A Harness target retains its released Profile binding separately from Model artifacts."}),t.policy.kind==="hosted_harness"&&new Set(t.population.map(i=>n([i.taskId,i.seed]))).size!==t.population.length&&a.addIssue({code:"custom",path:["population"],message:"Harness case identities must be unique for each task and seed."})}),ie=e.object({schemaVersion:e.literal("openpond.modelTasksetRunSummary.v1"),id:u,revision:e.number().int().positive(),teamId:u,modelProjectId:u.nullable(),name:e.string().trim().min(1).max(200).optional(),project:w.optional(),operationId:u,taskset:x,policyKind:e.enum(["hosted_chat","fixture","hosted_harness"]),manifestHash:ae,status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),totalCount:e.number().int().min(1).max(1e4),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),completed:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative()}).strict(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),cleanupComplete:e.boolean(),resultAvailable:e.boolean(),score:e.number().min(0).max(1).nullable(),metricName:e.string().min(1).max(240),error:e.object({code:u,message:e.string().max(2e3)}).strict().nullable()}).strict().superRefine((t,a)=>{Object.values(t.counts).reduce((i,r)=>i+r,0)!==t.totalCount&&a.addIssue({code:"custom",path:["counts"],message:"Run counts must account for the complete population."}),t.status!=="completed"&&t.score!==null&&a.addIssue({code:"custom",path:["score"],message:"Only completed evaluations publish a metric value."}),["completed","failed","cancelled"].includes(t.status)&&(!t.completedAt||t.counts.pending||t.counts.running)&&a.addIssue({code:"custom",message:"Terminal runs require complete population accounting."}),t.status==="cancelled"&&!t.cleanupComplete&&a.addIssue({code:"custom",message:"Cancelled runs require confirmed cleanup."}),t.resultAvailable&&!["completed","failed","cancelled"].includes(t.status)&&a.addIssue({code:"custom",message:"Run results require terminal population accounting."}),t.status==="completed"&&(!t.cleanupComplete||!t.resultAvailable)&&a.addIssue({code:"custom",message:"Completed evaluations require retained results and confirmed cleanup."})}),se=e.object({summary:ie,request:S,manifest:T,policySnapshot:j.shape.policySnapshot}).strict(),et=e.object({modelProjectId:u.optional(),projectId:w.shape.id.optional(),afterId:u.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),tt=e.object({items:e.array(ie).max(100),nextCursor:u.nullable()}).strict(),be=e.object({schemaVersion:e.literal("openpond.modelTasksetRunResult.v1"),run:se,receipts:e.array(Q).min(1).max(1e4),metric:B.nullable(),contentHash:ae}).strict();function ye(t,a){M(a,"Taskset run manifest");let i=t.policy;if(i.kind!=="hosted_harness"||a.execution.kind!=="harness"||n(a.profileEvaluation)!==n(i.source)||n(a.execution.harnessRelease)!==n(i.source.harnessRelease)||a.metadata.profileRepositoryId!==i.profileRepositoryId||a.packageHash!==i.packageHash||a.policy.kind!=="model"||a.policy.model.provider!==(i.localRuntime?.providerId??"openpond")||a.policy.model.model!==i.modelId||a.policy.model.revision!==null||a.policy.model.artifactHash!==(i.candidate?.contentHash??null)||a.policy.model.tokenizerRevision!==null||a.policy.model.chatTemplateHash!==null||a.policy.configurationHash!==i.modelConfigurationHash||a.tasksetRelease.id!==t.taskset.id||a.tasksetRelease.contentHash!==t.taskset.contentHash||n(a.population)!==n(t.population)||a.population.some(r=>r.receiptId!==`evaluation-${g(a.profileEvaluation?.externalDatasetBinding?[a.id,r.taskId,r.seed,r.fixtureId]:[a.id,r.taskId,r.seed]).slice(0,32)}`))throw new Error("Harness evaluation differs from its admitted source, package or model configuration.")}p(ye,"verifyHarnessExperimentManifest");async function Ie(t){let a=se.parse(t),{summary:i,request:r,manifest:s,policySnapshot:o}=a;if(M(s,"Taskset run manifest"),s.contentHash!==i.manifestHash||s.id!==i.id||s.createdAt!==i.createdAt||i.teamId!==r.teamId||i.modelProjectId!==r.modelProjectId||n(i.project??null)!==n(r.project??null)||n(s.metadata.project??null)!==n(r.project??null)||(i.name??null)!==(r.name??null)||i.operationId!==r.operationId||i.policyKind!==r.policy.kind||i.totalCount!==r.population.length||i.metricName!==s.metricPolicy.primaryMetric||n(i.taskset)!==n(r.taskset)||s.tasksetRelease.id!==r.taskset.id||s.tasksetRelease.contentHash!==r.taskset.contentHash||n(s.population)!==n(r.population))throw new Error("Evaluation run differs from its admitted request or manifest.");if(r.policy.kind==="fixture"){if(s.policy.kind!=="fixture"||o!==null)throw new Error("Fixture checks cannot claim a model identity.")}else if(r.policy.kind==="hosted_harness"){if(ye(r,s),o!==null)throw new Error("Harness evaluations retain the native host model configuration.")}else if(s.policy.kind!=="model"||!o||o.modelId!==r.policy.modelId||s.policy.model.provider!==o.provider||s.policy.model.model!==o.upstreamModelId||s.policy.model.revision!==null||s.policy.model.artifactHash!==(r.policy.candidate?.contentHash??null)||s.policy.model.tokenizerRevision!==null||s.policy.model.chatTemplateHash!==null||s.policy.configurationHash!==await H({policy:r.policy,snapshot:o}))throw new Error("Evaluation model differs from its admitted policy.");return a}p(Ie,"verifyModelTasksetRunDetails");async function at(t){let a=be.parse(t),{contentHash:i,...r}=a;if(await H(r)!==i)throw new Error("Evaluation result integrity failed.");let{summary:s,manifest:o}=await Ie(a.run);if(!s.resultAvailable||!["completed","failed","cancelled"].includes(s.status))throw new Error("Evaluation result is not terminal.");let d=W(o,a.receipts);if(n(d)!==n(a.receipts))throw new Error("Evaluation receipts differ from the admitted order.");if(s.status==="completed"!=(a.metric!==null))throw new Error("Only completed evaluations retain a metric.");if(a.metric&&(N(a.metric),a.metric.runManifest.id!==o.id||a.metric.runManifest.contentHash!==o.contentHash||n(a.metric.tasksetRelease)!==n(o.tasksetRelease)||n(a.metric.policy)!==n(o.metricPolicy)||n(a.metric.receiptRefs)!==n(a.receipts.map(({id:c,contentHash:h})=>({id:c,contentHash:h})))||a.metric.value!==s.score))throw new Error("Evaluation metric differs from its admitted run or receipt population.");return a}p(at,"verifyModelTasksetRunResult");var me=e.string().min(1).max(200).refine(t=>!["__proto__","prototype","constructor"].includes(t),"Use an ordinary field name."),Se=e.array(me).min(1).max(20),re=e.enum(["input","output","expectedOutput","evaluatorContext"]),ve=e.object({destination:re,path:Se,source:re,sourcePath:e.array(me).max(20)}).strict(),U=e.array(ve).max(100).superRefine((t,a)=>{for(let[i,r]of t.entries())t.slice(0,i).some(s=>s.destination===r.destination&&(ne(s.path,r.path)||ne(r.path,s.path)))&&a.addIssue({code:"custom",path:[i,"path"],message:"Mapped destination paths must not overlap."})});function nt(t,a){let i=U.parse(a),r=structuredClone(t);for(let s of i){let o=t[s.source];for(let c of s.sourcePath){if(!oe(o)||!Object.hasOwn(o,c))throw new Error("The configured grader source field is unavailable.");o=o[c]}if(o===void 0)throw new Error("The configured grader source field is unavailable.");let d=r[s.destination];d===null&&(r[s.destination]=d={});for(let c of s.path.slice(0,-1)){let h=Object.hasOwn(d,c)?d[c]:void 0;if(h!==void 0&&!oe(h))throw new Error("A grader destination path crosses a scalar field.");h===void 0&&(d[c]={}),d=d[c]}d[s.path.at(-1)]=structuredClone(o)}return r}p(nt,"mapExperimentGradingFields");function oe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}p(oe,"record");function ne(t,a){return t.length<=a.length&&t.every((i,r)=>i===a[r])}p(ne,"prefix");var l=e.string().trim().min(1).max(200),v=e.string().regex(/^[a-f0-9]{64}$/),$=e.object({id:l,revision:e.number().int().positive(),contentHash:v}).strict(),D=e.object({id:l,version:e.string().min(1).max(200),contentHash:v,name:e.string().trim().min(1).max(500).optional(),feedbackKey:J,release:$.nullable(),mappings:U.optional()}).strict(),G=e.object({id:l,version:e.string().min(1).max(200),contentHash:v,mappings:U}).strict(),pt=e.object({operationId:l,id:l.optional(),expectedRevision:e.number().int().nonnegative(),request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(G).min(1).max(100).optional()}).strict().superRefine((t,a)=>{t.request.name||a.addIssue({code:"custom",path:["request","name"],message:"Name this Experiment before saving it."}),!!t.id!=t.expectedRevision>0&&a.addIssue({code:"custom",path:["expectedRevision"],message:"An update requires its saved definition revision."}),Math.round(t.maximumCostUsd*1e6)<1&&a.addIssue({code:"custom",path:["maximumCostUsd"],message:"The budget must be at least $0.000001."}),t.graders&&new Set(t.graders.map(i=>i.id)).size!==t.graders.length&&a.addIssue({code:"custom",path:["graders"],message:"Select each grader once."})}),ke=e.object({schemaVersion:e.literal("openpond.experimentDefinition.v1"),id:l,teamId:l,revision:e.number().int().positive(),request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).strict(),ut=ke.extend({contentHash:v}),ht=e.object({operationId:l,definition:$}).strict(),ft=e.object({projectId:l.optional(),datasetHash:v.optional(),search:e.string().trim().max(200).optional(),status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]).optional(),afterId:l.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),gt=e.object({definition:$.nullable(),configurationHash:v.optional(),admissionRequestHash:v.optional(),sourceExperimentId:l.optional(),maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100)}).strict().superRefine((t,a)=>{t.definition===null&&(!t.configurationHash||!t.admissionRequestHash)&&a.addIssue({code:"custom",path:["configurationHash"],message:"A flat Experiment requires its sealed configuration hash."})}),xt=e.object({operationId:l,profileRepositoryId:l,definitionId:l,modelId:l,localRuntime:I.shape.localRuntime,maxOutputTokens:I.shape.maxOutputTokens,temperature:I.shape.temperature,topP:I.shape.topP,reasoningEffort:e.enum(["off","low","medium","high","xhigh","max"]).optional(),maximumCostUsd:e.number().finite().positive().max(1e4),externalDatasetBinding:P.optional(),sourceCandidate:I.shape.sourceCandidate}).strict(),bt=e.object({request:S,manifest:T,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100)}).strict();var de=e.string().trim().min(1).max(200),Rt=e.object({operationId:de,request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(G).min(1).max(100).optional(),sourceExperimentId:de.optional()}).strict().superRefine((t,a)=>{t.request.name||a.addIssue({code:"custom",path:["request","name"],message:"Name this Experiment before starting it."}),t.operationId!==t.request.operationId&&a.addIssue({code:"custom",path:["request","operationId"],message:"Use one operation identity for this Experiment."}),Math.round(t.maximumCostUsd*1e6)<1&&a.addIssue({code:"custom",path:["maximumCostUsd"],message:"The spending cap must be at least $0.000001."}),t.graders&&new Set(t.graders.map(i=>i.id)).size!==t.graders.length&&a.addIssue({code:"custom",path:["graders"],message:"Select each grader once."})});export{ee as a,Ee as b,Pe as c,w as d,ce as e,le as f,O as g,pe as h,$e as i,A as j,Xe as k,I as l,S as m,se as n,et as o,tt as p,ye as q,Ie as r,at as s,U as t,nt as u,$ as v,D as w,G as x,pt as y,ut as z,ft as A,gt as B,xt as C,bt as D,Rt as E};
|
|
2
|
+
import{j as Y,m as g,n as M}from"./chunk-HIQPGYVH.js";import{j as n,l as H,x,y as Z}from"./chunk-3VT2PPKW.js";import{A as W,f as Q,t as X,v as T}from"./chunk-D6L6UNUQ.js";import{Ka as C,Na as J,W as V,Za as L,fb as F,l as B,lb as K,m as N,oa as P,va as q}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as p}from"./chunk-FTQLQJQV.js";var k=e.string().regex(/^[a-f0-9]{64}$/),ee=e.object({providerId:e.literal("claude-code"),configurationHash:k,executableHash:k,version:e.string().regex(/^2\.\d+\.\d+$/),capabilityHash:k,maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5),maximumTurns:e.number().int().min(1).max(100),holdOpen:e.boolean()}).strict(),Ee=e.object({id:e.string().min(1).max(200),receiptId:e.string().min(1).max(200),sessionId:e.uuid(),operationId:e.string().min(1).max(200),action:e.enum(["message","seal"]),text:e.string().max(262144).optional()}).strict().superRefine((t,a)=>{t.action==="message"&&!t.text?.trim()&&a.addIssue({code:"custom",message:"A human intervention requires a message."}),t.action==="seal"&&t.text!==void 0&&a.addIssue({code:"custom",message:"Sealing does not add a prompt."})}),Pe=e.object({provider:e.literal("claude-code"),sessionId:e.uuid(),requestId:e.string().min(1).max(200),modelId:e.string().min(1).max(500),runtime:ee,sourceHash:k,outputHash:k,traceHash:k,runtimeEventRefs:e.array(e.string().min(1).max(200)).min(1).max(2e4),eventCount:e.number().int().positive().max(2e4),startedAt:e.iso.datetime(),completedAt:e.iso.datetime(),cleanupComplete:e.literal(!0)}).strict().superRefine((t,a)=>{(t.runtimeEventRefs.length!==t.eventCount||new Set(t.runtimeEventRefs).size!==t.eventCount)&&a.addIssue({code:"custom",message:"Process event references must match the exact retained trace population."})}),_=e.object({providerId:e.literal("codex"),configurationHash:e.string().regex(/^[a-f0-9]{64}$/),accountHash:e.string().regex(/^[a-f0-9]{64}$/),reasoningEffort:e.enum(["low","medium","high","xhigh"]),maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5)}).strict(),w=e.object({id:e.string().trim().min(1).max(240),revision:e.number().int().positive(),contentHash:e.string().regex(/^[a-f0-9]{64}$/),targetId:e.string().trim().min(1).max(240).nullable()}).strict(),ce=e.array(e.object({role:e.enum(["system","user","assistant"]),content:e.string().max(1e5)}).strict()).max(100).superRefine((t,a)=>{t.reduce((i,r)=>i+r.content.length,0)>1e5&&a.addIssue({code:"custom",message:"Evaluation prompt exceeds 100,000 characters."})}),le=e.object({schemaVersion:e.literal("openpond.experimentAttemptGrade.v1"),selectionHash:e.string().regex(/^[a-f0-9]{64}$/),grades:e.array(C).min(1).max(100),score:e.number().min(0).max(1).nullable(),passed:e.boolean(),rewardEligible:e.boolean(),gradingStatus:e.enum(["scored","pending","unscorable","not_configured"]),failureClass:Y.nullable(),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().superRefine((t,a)=>{let{contentHash:i,...r}=t;g(r)!==i&&a.addIssue({code:"custom",message:"Experiment grading integrity failed."});let s=t.grades.flatMap(o=>o.components);(s.length!==t.grades.length||new Set(s.map(o=>o.graderId)).size!==s.length)&&a.addIssue({code:"custom",message:"Each selected criterion requires exactly one distinct grader result."});for(let o of t.grades){let{contentHash:d,...c}=o;g(c)!==d&&a.addIssue({code:"custom",message:"A retained criterion changed."});for(let h of o.components){let{contentHash:E,...f}=h;g(f)!==E&&a.addIssue({code:"custom",message:"A retained grader result changed."})}}}),m=e.string().trim().min(1).max(200),y=e.string().regex(/^[a-f0-9]{64}$/),O=e.discriminatedUnion("kind",[e.object({kind:e.literal("hosted_chat"),modelId:m,localRuntime:e.union([e.object({providerId:e.literal("custom-openai-compatible"),configurationHash:y,maximumRequestCostUsd:e.number().finite().positive().max(1e4),requestTimeoutMs:e.number().int().min(1e3).max(3e5)}).strict(),ee,_]).optional(),candidate:e.object({artifactId:m,contentHash:y,preparationId:m,dispatchId:m,baseProfileId:m,workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/)}).strict().optional(),harness:F.optional(),messages:ce.optional(),maxOutputTokens:e.number().int().min(1).max(1e6).default(1e5),temperature:e.number().min(0).max(2).default(0),topP:e.number().gt(0).max(1).default(1)}).strict(),e.object({kind:e.literal("fixture"),fixtureId:m}).strict()]),te=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptRequest.v1"),operationId:m,teamId:m,modelProjectId:m.nullable(),project:w.optional(),taskset:x,taskId:m,environmentSeed:e.number().int().min(0).max(2147483647).default(0),policy:O}).strict(),pe=e.object({modelProjectId:m.nullable(),taskset:x,afterTaskId:m.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),ue=e.object({modelProjectId:m.nullable(),taskset:x,available:e.boolean(),unavailableReason:e.string().max(1e3).nullable(),models:e.array(e.object({id:m,name:e.string().max(500),maximumOutputTokens:e.number().int().min(1).max(1e6).optional(),baseModel:Z.nullable().optional()}).strict()).max(200),tasks:e.array(e.object({id:m,split:V,inputPreview:e.string().max(500),fixtures:e.array(e.object({id:m,label:e.string().max(200)}).strict()).max(1e3)}).strict()).max(100),nextCursor:m.nullable()}).strict(),j=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptSummary.v1"),id:m,revision:e.number().int().positive(),request:te,status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),policySnapshot:e.object({modelId:m,provider:m,upstreamModelId:e.string().min(1).max(500),configurationHash:y}).strict().nullable(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),cleanupComplete:e.boolean(),resultAvailable:e.boolean(),score:e.number().min(0).max(1).nullable(),gradingStatus:e.enum(["not_started","pending","scored","unscorable","not_configured"]).default("not_started"),passed:e.boolean().nullable(),outputPreview:e.string().max(500).nullable(),error:e.object({code:m,message:e.string().max(2e3)}).strict().nullable()}).strict().superRefine((t,a)=>{t.request.policy.kind==="fixture"!=(t.policySnapshot===null)&&a.addIssue({code:"custom",path:["policySnapshot"],message:"Fixture execution must not claim a model identity."}),t.status==="completed"&&(!t.cleanupComplete||!t.resultAvailable||!t.completedAt)&&a.addIssue({code:"custom",message:"Completed attempts require retained results and confirmed cleanup."})}),he=e.object({modelProjectId:m,afterId:m.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),fe=e.object({items:e.array(j).max(100),nextCursor:m.nullable()}).strict(),ge=e.object({schemaVersion:e.literal("openpond.modelStarterAttemptResult.v1"),attempt:j,output:e.string().max(1048576).nullable(),messages:e.array(e.record(e.string(),e.unknown())).max(4002),composition:L.nullable(),grade:C.nullable().optional(),experimentGrade:le.nullable().optional(),environment:e.object({status:e.enum(["completed","budget_exhausted","cancelled","timed_out","policy_failure","environment_failure"]),collected:e.boolean(),definition:x,initialStateHash:y.nullable(),finalStateHash:y.nullable(),attemptHash:y}).strict(),native:K.optional(),providerRequestIds:e.array(m).max(1001),contentHash:y}).strict().superRefine((t,a)=>{let i=t.attempt.request.policy.kind==="hosted_chat"?t.attempt.request.policy.harness:void 0;!!i!=!!t.native&&a.addIssue({code:"custom",path:["native"],message:"Standalone Harness results require their exact native evidence."}),t.native&&(!i||g(i)!==g(t.native.source)||t.native.modelConfigurationHash!==t.attempt.policySnapshot?.configurationHash||t.environment.initialStateHash!==null||t.environment.finalStateHash!==null||t.environment.status==="completed"&&(!t.environment.collected||t.output===null||t.native.partialOutputAvailable||t.native.outputHash!==g(t.output)))&&a.addIssue({code:"custom",path:["native"],message:"Native evidence differs from the admitted source, model or output."}),t.experimentGrade&&((t.grade||t.composition)&&a.addIssue({code:"custom",message:"Selected Experiment grading cannot claim another grade population."}),(!["completed","failed"].includes(t.attempt.status)||!t.attempt.resultAvailable||t.attempt.score!==t.experimentGrade.score||t.attempt.gradingStatus!==t.experimentGrade.gradingStatus||t.attempt.passed!==(t.experimentGrade.score===null?null:t.experimentGrade.passed))&&a.addIssue({code:"custom",message:"Experiment grading differs from its retained attempt summary."})),t.grade&&(t.composition&&a.addIssue({code:"custom",path:["grade"],message:"An ordinary grade cannot also claim a Reward composition."}),(!["completed","failed"].includes(t.attempt.status)||!t.attempt.resultAvailable||t.attempt.score!==t.grade.score||t.attempt.gradingStatus!==t.grade.gradingStatus||t.attempt.passed!==(t.grade.score===null?null:t.grade.passed))&&a.addIssue({code:"custom",path:["grade"],message:"Ordinary grade differs from its terminal attempt summary."}))}),b=class extends Error{static{p(this,"OpenPondModelStarterAttemptError")}constructor(t,a,i){super(i),this.status=t,this.code=a,this.name="OpenPondModelStarterAttemptError"}status;code},$e=class{static{p(this,"OpenPondModelStarterAttemptsClient")}#e;constructor(t){let a=new URL(t.baseUrl);if(!t.apiKey.trim()||!t.teamId.trim()||!["https:","http:"].includes(a.protocol)||a.username||a.password||a.search||a.hash)throw new Error("Starter attempts require an HTTP(S) endpoint and workspace credentials.");this.#e={...t,baseUrl:a.toString().replace(/\/+$/,"")}}async create(t,a={}){let i=te.parse(t);if(i.teamId!==this.#e.teamId)throw new Error("Attempt belongs to another workspace.");let r=this.#a(await this.#t("","POST",i,a.signal));if(n(r.request)!==n(i))throw new b(502,"attempt_request_mismatch","Attempt receipt differs from the submitted request.");return r}async get(t,a={}){return this.#a(await this.#t(`/${encodeURIComponent(m.parse(t))}`,"GET",void 0,a.signal),t)}async choices(t,a={}){let i=pe.parse(t),r=new URLSearchParams({...i.modelProjectId?{modelProjectId:i.modelProjectId}:{},tasksetId:i.taskset.id,revision:String(i.taskset.revision),contentHash:i.taskset.contentHash,limit:String(i.limit)});i.afterTaskId&&r.set("afterTaskId",i.afterTaskId);let s=ue.parse(await this.#t(`/choices?${r}`,"GET",void 0,a.signal));if(s.modelProjectId!==i.modelProjectId||n(s.taskset)!==n(i.taskset)||s.tasks.length>i.limit||new Set(s.tasks.map(o=>o.id)).size!==s.tasks.length)throw new b(502,"attempt_choices_mismatch","Attempt choices differ from the selected model or Taskset.");return s}async cancel(t,a={}){return this.#a(await this.#t(`/${encodeURIComponent(m.parse(t))}/cancel`,"POST",void 0,a.signal),t)}async result(t,a={}){let i=ge.parse(await this.#t(`/${encodeURIComponent(m.parse(t))}/result`,"GET",void 0,a.signal));this.#a(i.attempt,t);let{contentHash:r,...s}=i;if(!i.attempt.resultAvailable||await H(s)!==r)throw new b(502,"attempt_result_integrity","Attempt result integrity failed.");return i}async list(t,a={}){let i=he.parse(t),r=new URLSearchParams({modelProjectId:i.modelProjectId,limit:String(i.limit)});i.afterId&&r.set("afterId",i.afterId);let s=fe.parse(await this.#t(`?${r}`,"GET",void 0,a.signal));if(s.items.length>i.limit||new Set(s.items.map(o=>o.id)).size!==s.items.length||s.items.some(o=>this.#a(o).request.modelProjectId!==i.modelProjectId))throw new b(502,"attempt_page_mismatch","Attempt page differs from the selected model.");return s}#a(t,a){let i=j.parse(t);if(i.request.teamId!==this.#e.teamId||a&&i.id!==a)throw new b(502,"attempt_identity_mismatch","Attempt receipt belongs to another identity or workspace.");return i}async#t(t,a,i,r){let s=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/model-starter-attempts${t}`,{method:a,headers:{Authorization:`Bearer ${this.#e.apiKey}`,"X-OpenPond-Team-Id":this.#e.teamId,"Content-Type":"application/json",Accept:"application/json"},...i===void 0?{}:{body:JSON.stringify(i)},signal:r,redirect:"error"}),o=s.body?.getReader();if(!o)throw new b(s.status,"attempt_empty_response","Attempt response was empty.");let d=0,c="",h=new TextDecoder;try{for(;;){let f=await o.read();if(f.done)break;if(d+=f.value.byteLength,d>16777216)throw new b(502,"attempt_response_too_large","Attempt response exceeded its byte limit.");c+=h.decode(f.value,{stream:!0})}c+=h.decode()}finally{await o.cancel(),o.releaseLock()}let E=JSON.parse(c);if(!s.ok){let f=e.object({code:m,message:e.string().max(2e3)}).safeParse(E);throw new b(s.status,f.success?f.data.code:"attempt_request_failed",f.success?f.data.message:"Attempt request failed.")}return E}};var R=e.string().trim().min(1).max(240),z=e.string().regex(/^[a-f0-9]{64}$/),A=e.object({maxOutputTokens:e.number().int().min(1).max(1e6).default(4096),temperature:e.number().min(0).max(2).default(0),topP:e.number().gt(0).max(1).default(1)}).strict();function Xe(t){return A.parse({maxOutputTokens:t.maxOutputTokens,temperature:t.temperature,topP:t.topP})}p(Xe,"resolveHarnessExperimentSampling");var I=e.object({kind:e.literal("hosted_harness"),modelId:R,maxOutputTokens:A.shape.maxOutputTokens.removeDefault().optional(),temperature:A.shape.temperature.removeDefault().optional(),topP:A.shape.topP.removeDefault().optional(),localRuntime:_.optional(),candidate:e.object({artifactId:R,contentHash:z,preparationId:R,dispatchId:R,baseProfileId:R,workerImageDigest:e.string().regex(/^sha256:[a-f0-9]{64}$/)}).strict().optional(),sourceCandidate:q.shape.sourceCandidate,reasoningEffort:e.enum(["off","low","medium","high","xhigh","max"]).optional(),profileRepositoryId:R,source:q,modelConfigurationHash:z,packageHash:z,externalDatasetBinding:P.optional()}).strict().superRefine((t,a)=>{JSON.stringify(t.externalDatasetBinding??null)!==JSON.stringify(t.source.externalDatasetBinding??null)&&a.addIssue({code:"custom",message:"The policy and source must bind the same external Dataset recipe."}),JSON.stringify(t.sourceCandidate??null)!==JSON.stringify(t.source.sourceCandidate??null)&&a.addIssue({code:"custom",message:"The policy and prepared source must bind the same actual source candidate."})}),u=e.string().trim().min(1).max(200),ae=e.string().regex(/^[a-f0-9]{64}$/),xe=e.discriminatedUnion("kind",[O.options[0],e.object({kind:e.literal("fixture")}).strict(),I]),S=e.object({schemaVersion:e.literal("openpond.modelTasksetRunRequest.v1"),operationId:u,teamId:u,modelProjectId:u.nullable(),name:e.string().trim().min(1).max(200).optional(),project:w.optional(),taskset:x,policy:xe,population:e.array(X).min(1).max(1e4)}).strict().superRefine((t,a)=>{new Set(t.population.map(i=>i.receiptId)).size!==t.population.length&&a.addIssue({code:"custom",path:["population"],message:"Run receipt identities must be unique."}),t.population.some(i=>i.fixtureId!==null!=(t.policy.kind==="fixture"))&&a.addIssue({code:"custom",path:["population"],message:"Only fixture runs require a fixture identity for every member."}),t.population.some(i=>!/^(0|[1-9][0-9]*)$/.test(i.seed)||Number(i.seed)>2147483647)&&a.addIssue({code:"custom",path:["population"],message:"Hosted environment seeds must be integers from 0 to 2147483647."}),t.policy.kind==="hosted_harness"&&t.modelProjectId!==null&&a.addIssue({code:"custom",path:["modelProjectId"],message:"A Harness target retains its released Profile binding separately from Model artifacts."}),t.policy.kind==="hosted_harness"&&new Set(t.population.map(i=>n([i.taskId,i.seed]))).size!==t.population.length&&a.addIssue({code:"custom",path:["population"],message:"Harness case identities must be unique for each task and seed."})}),ie=e.object({schemaVersion:e.literal("openpond.modelTasksetRunSummary.v1"),id:u,revision:e.number().int().positive(),teamId:u,modelProjectId:u.nullable(),name:e.string().trim().min(1).max(200).optional(),project:w.optional(),operationId:u,taskset:x,policyKind:e.enum(["hosted_chat","fixture","hosted_harness"]),manifestHash:ae,status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),totalCount:e.number().int().min(1).max(1e4),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),completed:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative()}).strict(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),cleanupComplete:e.boolean(),resultAvailable:e.boolean(),score:e.number().min(0).max(1).nullable(),metricName:e.string().min(1).max(240),error:e.object({code:u,message:e.string().max(2e3)}).strict().nullable()}).strict().superRefine((t,a)=>{Object.values(t.counts).reduce((i,r)=>i+r,0)!==t.totalCount&&a.addIssue({code:"custom",path:["counts"],message:"Run counts must account for the complete population."}),t.status!=="completed"&&t.score!==null&&a.addIssue({code:"custom",path:["score"],message:"Only completed evaluations publish a metric value."}),["completed","failed","cancelled"].includes(t.status)&&(!t.completedAt||t.counts.pending||t.counts.running)&&a.addIssue({code:"custom",message:"Terminal runs require complete population accounting."}),t.status==="cancelled"&&!t.cleanupComplete&&a.addIssue({code:"custom",message:"Cancelled runs require confirmed cleanup."}),t.resultAvailable&&!["completed","failed","cancelled"].includes(t.status)&&a.addIssue({code:"custom",message:"Run results require terminal population accounting."}),t.status==="completed"&&(!t.cleanupComplete||!t.resultAvailable)&&a.addIssue({code:"custom",message:"Completed evaluations require retained results and confirmed cleanup."})}),se=e.object({summary:ie,request:S,manifest:T,policySnapshot:j.shape.policySnapshot}).strict(),et=e.object({modelProjectId:u.optional(),projectId:w.shape.id.optional(),afterId:u.optional(),limit:e.number().int().min(1).max(100).default(25)}).strict(),tt=e.object({items:e.array(ie).max(100),nextCursor:u.nullable()}).strict(),be=e.object({schemaVersion:e.literal("openpond.modelTasksetRunResult.v1"),run:se,receipts:e.array(Q).min(1).max(1e4),metric:B.nullable(),contentHash:ae}).strict();function ye(t,a){M(a,"Taskset run manifest");let i=t.policy;if(i.kind!=="hosted_harness"||a.execution.kind!=="harness"||n(a.profileEvaluation)!==n(i.source)||n(a.execution.harnessRelease)!==n(i.source.harnessRelease)||a.metadata.profileRepositoryId!==i.profileRepositoryId||a.packageHash!==i.packageHash||a.policy.kind!=="model"||a.policy.model.provider!==(i.localRuntime?.providerId??"openpond")||a.policy.model.model!==i.modelId||a.policy.model.revision!==null||a.policy.model.artifactHash!==(i.candidate?.contentHash??null)||a.policy.model.tokenizerRevision!==null||a.policy.model.chatTemplateHash!==null||a.policy.configurationHash!==i.modelConfigurationHash||a.tasksetRelease.id!==t.taskset.id||a.tasksetRelease.contentHash!==t.taskset.contentHash||n(a.population)!==n(t.population)||a.population.some(r=>r.receiptId!==`evaluation-${g(a.profileEvaluation?.externalDatasetBinding?[a.id,r.taskId,r.seed,r.fixtureId]:[a.id,r.taskId,r.seed]).slice(0,32)}`))throw new Error("Harness evaluation differs from its admitted source, package or model configuration.")}p(ye,"verifyHarnessExperimentManifest");async function Ie(t){let a=se.parse(t),{summary:i,request:r,manifest:s,policySnapshot:o}=a;if(M(s,"Taskset run manifest"),s.contentHash!==i.manifestHash||s.id!==i.id||s.createdAt!==i.createdAt||i.teamId!==r.teamId||i.modelProjectId!==r.modelProjectId||n(i.project??null)!==n(r.project??null)||n(s.metadata.project??null)!==n(r.project??null)||(i.name??null)!==(r.name??null)||i.operationId!==r.operationId||i.policyKind!==r.policy.kind||i.totalCount!==r.population.length||i.metricName!==s.metricPolicy.primaryMetric||n(i.taskset)!==n(r.taskset)||s.tasksetRelease.id!==r.taskset.id||s.tasksetRelease.contentHash!==r.taskset.contentHash||n(s.population)!==n(r.population))throw new Error("Evaluation run differs from its admitted request or manifest.");if(r.policy.kind==="fixture"){if(s.policy.kind!=="fixture"||o!==null)throw new Error("Fixture checks cannot claim a model identity.")}else if(r.policy.kind==="hosted_harness"){if(ye(r,s),o!==null)throw new Error("Harness evaluations retain the native host model configuration.")}else if(s.policy.kind!=="model"||!o||o.modelId!==r.policy.modelId||s.policy.model.provider!==o.provider||s.policy.model.model!==o.upstreamModelId||s.policy.model.revision!==null||s.policy.model.artifactHash!==(r.policy.candidate?.contentHash??null)||s.policy.model.tokenizerRevision!==null||s.policy.model.chatTemplateHash!==null||s.policy.configurationHash!==await H({policy:r.policy,snapshot:o}))throw new Error("Evaluation model differs from its admitted policy.");return a}p(Ie,"verifyModelTasksetRunDetails");async function at(t){let a=be.parse(t),{contentHash:i,...r}=a;if(await H(r)!==i)throw new Error("Evaluation result integrity failed.");let{summary:s,manifest:o}=await Ie(a.run);if(!s.resultAvailable||!["completed","failed","cancelled"].includes(s.status))throw new Error("Evaluation result is not terminal.");let d=W(o,a.receipts);if(n(d)!==n(a.receipts))throw new Error("Evaluation receipts differ from the admitted order.");if(s.status==="completed"!=(a.metric!==null))throw new Error("Only completed evaluations retain a metric.");if(a.metric&&(N(a.metric),a.metric.runManifest.id!==o.id||a.metric.runManifest.contentHash!==o.contentHash||n(a.metric.tasksetRelease)!==n(o.tasksetRelease)||n(a.metric.policy)!==n(o.metricPolicy)||n(a.metric.receiptRefs)!==n(a.receipts.map(({id:c,contentHash:h})=>({id:c,contentHash:h})))||a.metric.value!==s.score))throw new Error("Evaluation metric differs from its admitted run or receipt population.");return a}p(at,"verifyModelTasksetRunResult");var me=e.string().min(1).max(200).refine(t=>!["__proto__","prototype","constructor"].includes(t),"Use an ordinary field name."),Se=e.array(me).min(1).max(20),re=e.enum(["input","output","expectedOutput","evaluatorContext"]),ve=e.object({destination:re,path:Se,source:re,sourcePath:e.array(me).max(20)}).strict(),U=e.array(ve).max(100).superRefine((t,a)=>{for(let[i,r]of t.entries())t.slice(0,i).some(s=>s.destination===r.destination&&(ne(s.path,r.path)||ne(r.path,s.path)))&&a.addIssue({code:"custom",path:[i,"path"],message:"Mapped destination paths must not overlap."})});function nt(t,a){let i=U.parse(a),r=structuredClone(t);for(let s of i){let o=t[s.source];for(let c of s.sourcePath){if(!oe(o)||!Object.hasOwn(o,c))throw new Error("The configured grader source field is unavailable.");o=o[c]}if(o===void 0)throw new Error("The configured grader source field is unavailable.");let d=r[s.destination];d===null&&(r[s.destination]=d={});for(let c of s.path.slice(0,-1)){let h=Object.hasOwn(d,c)?d[c]:void 0;if(h!==void 0&&!oe(h))throw new Error("A grader destination path crosses a scalar field.");h===void 0&&(d[c]={}),d=d[c]}d[s.path.at(-1)]=structuredClone(o)}return r}p(nt,"mapExperimentGradingFields");function oe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}p(oe,"record");function ne(t,a){return t.length<=a.length&&t.every((i,r)=>i===a[r])}p(ne,"prefix");var l=e.string().trim().min(1).max(200),v=e.string().regex(/^[a-f0-9]{64}$/),$=e.object({id:l,revision:e.number().int().positive(),contentHash:v}).strict(),D=e.object({id:l,version:e.string().min(1).max(200),contentHash:v,name:e.string().trim().min(1).max(500).optional(),feedbackKey:J,release:$.nullable(),mappings:U.optional()}).strict(),G=e.object({id:l,version:e.string().min(1).max(200),contentHash:v,mappings:U}).strict(),pt=e.object({operationId:l,id:l.optional(),expectedRevision:e.number().int().nonnegative(),request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(G).min(1).max(100).optional()}).strict().superRefine((t,a)=>{t.request.name||a.addIssue({code:"custom",path:["request","name"],message:"Name this Experiment before saving it."}),!!t.id!=t.expectedRevision>0&&a.addIssue({code:"custom",path:["expectedRevision"],message:"An update requires its saved definition revision."}),Math.round(t.maximumCostUsd*1e6)<1&&a.addIssue({code:"custom",path:["maximumCostUsd"],message:"The budget must be at least $0.000001."}),t.graders&&new Set(t.graders.map(i=>i.id)).size!==t.graders.length&&a.addIssue({code:"custom",path:["graders"],message:"Select each grader once."})}),ke=e.object({schemaVersion:e.literal("openpond.experimentDefinition.v1"),id:l,teamId:l,revision:e.number().int().positive(),request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).strict(),ut=ke.extend({contentHash:v}),ht=e.object({operationId:l,definition:$}).strict(),ft=e.object({projectId:l.optional(),datasetHash:v.optional(),search:e.string().trim().max(200).optional(),status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]).optional(),afterId:l.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),gt=e.object({definition:$.nullable(),configurationHash:v.optional(),admissionRequestHash:v.optional(),sourceExperimentId:l.optional(),maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100)}).strict().superRefine((t,a)=>{t.definition===null&&(!t.configurationHash||!t.admissionRequestHash)&&a.addIssue({code:"custom",path:["configurationHash"],message:"A flat Experiment requires its sealed configuration hash."})}),xt=e.object({operationId:l,profileRepositoryId:l,definitionId:l,modelId:l,localRuntime:I.shape.localRuntime,maxOutputTokens:I.shape.maxOutputTokens,temperature:I.shape.temperature,topP:I.shape.topP,reasoningEffort:e.enum(["off","low","medium","high","xhigh","max"]).optional(),maximumCostUsd:e.number().finite().positive().max(1e4),externalDatasetBinding:P.optional(),sourceCandidate:I.shape.sourceCandidate}).strict(),bt=e.object({request:S,manifest:T,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(D).min(1).max(100)}).strict();var de=e.string().trim().min(1).max(200),Rt=e.object({operationId:de,request:S,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(G).min(1).max(100).optional(),sourceExperimentId:de.optional()}).strict().superRefine((t,a)=>{t.request.name||a.addIssue({code:"custom",path:["request","name"],message:"Name this Experiment before starting it."}),t.operationId!==t.request.operationId&&a.addIssue({code:"custom",path:["request","operationId"],message:"Use one operation identity for this Experiment."}),Math.round(t.maximumCostUsd*1e6)<1&&a.addIssue({code:"custom",path:["maximumCostUsd"],message:"The spending cap must be at least $0.000001."}),t.graders&&new Set(t.graders.map(i=>i.id)).size!==t.graders.length&&a.addIssue({code:"custom",path:["graders"],message:"Select each grader once."})});export{ee as a,Ee as b,Pe as c,w as d,ce as e,le as f,O as g,pe as h,$e as i,A as j,Xe as k,I as l,S as m,se as n,et as o,tt as p,ye as q,Ie as r,at as s,U as t,nt as u,$ as v,D as w,G as x,pt as y,ut as z,ft as A,gt as B,xt as C,bt as D,Rt as E};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{d as v}from"./chunk-
|
|
2
|
+
import{d as v}from"./chunk-SVLVIYH2.js";import{h as b,i as E}from"./chunk-BQNU4HZW.js";import{b as S}from"./chunk-L3KS6MOV.js";import{m as u,o as f}from"./chunk-RCT3O3HQ.js";import{a as p}from"./chunk-FTQLQJQV.js";var c="desktop-personal",L="personal-default";async function K(s){let a=await s.store.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:c});if(a&&a.metadata.selectionEligible!==!1)return await v({store:s.store,storeDir:s.storeDir,workspaceId:a.id}),H(s.store,a.id,a.currentChannel.release?.contentHash??null);let t=(await s.store.listHarnessWorkspaces({ownerKind:"personal",ownerId:c})).find(o=>o.metadata.selectionEligible!==!1);if(t)return await s.store.selectHarnessWorkspace({ownerKind:"personal",ownerId:c,workspaceId:t.id,updatedAt:(s.now??(()=>new Date().toISOString()))()}),H(s.store,t.id,t.currentChannel.release?.contentHash??null);let r=await s.loadProfileState(),n=r.mode==="local"&&r.sourcePath&&!r.error?await E({store:s.store,storeDir:s.storeDir,id:L,ownerId:c,name:r.activeProfile?.trim()||"Personal Harness",profile:r,now:s.now}):await b({store:s.store,storeDir:s.storeDir,id:L,ownerId:c,name:"Personal Harness",now:s.now});return await s.store.selectHarnessWorkspace({ownerKind:"personal",ownerId:c,workspaceId:n.workspace.id,updatedAt:(s.now??(()=>new Date().toISOString()))()}),n.release}p(K,"ensureSelectedLocalHarnessWorkspace");async function W(s){let a=await s.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:c});return a?H(s,a.id,a.currentChannel.release?.contentHash??null):null}p(W,"resolveSelectedLocalHarnessRelease");async function H(s,a,t){if(!t)throw new Error(`Selected Harness workspace ${a} has no current release.`);let r=await s.getHarnessReleaseRecord(t);if(!r||r.workspaceId!==a)throw new Error(`Selected Harness workspace ${a} points to a missing release ${t}.`);return f(r.agentSnapshot,"Selected Agent snapshot"),f(r.harnessRelease,"Selected Harness release"),r}p(H,"requireCurrentRelease");import{promises as I}from"node:fs";import i from"node:path";async function J(s,a){if(a){let n=await s.getHarnessReleaseRecord(a.contentHash);if(!n||n.harnessRelease.id!==a.id)throw new Error("The selected immutable Harness release is unavailable.");let o=await s.getHarnessWorkspace(n.workspaceId);if(!o||o.ownerScope.kind!=="personal"||o.ownerScope.id!==c)throw new Error("The selected Harness release is not available to this local owner.");return f(n.agentSnapshot,"Selected Agent snapshot"),f(n.harnessRelease,"Selected Harness release"),A({workspace:o,release:n})}let t=await W(s);if(!t)return null;let r=await s.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:c});if(!r||r.id!==t.workspaceId)throw new Error("Selected Harness workspace changed while its release was being admitted.");return A({workspace:r,release:t})}p(J,"loadSelectedLocalHarnessRuntime");async function A(s){let{workspace:a,release:t}=s;if(t.workspaceId!==a.id)throw new Error("Harness release does not belong to the requested workspace.");let r=i.join(t.bundlePath,"source");await Promise.all(t.harnessRelease.files.map(e=>x(r,e.path,e.contentHash)));let n=await Promise.all(t.agentSnapshot.instructions.map(async e=>({path:e.path,content:await g(r,e.path,e.contentHash)}))),o=[],m=new Map;for(let e of t.agentSnapshot.skills){let l=await g(r,e.path,e.contentHash),d=S(l);if(!d.name||!d.description||d.messages.length>0)throw new Error(`Released Harness Skill ${e.path} is invalid: ${d.messages.join(" ")||"missing name or description"}`);if(m.has(d.name))throw new Error(`Released Harness has duplicate Skill ${d.name}.`);let k=`${i.posix.dirname(e.path)}/`,P=t.harnessRelease.files.filter(h=>h.visibility==="policy"&&h.path.startsWith(k)&&h.path!==e.path).map(h=>h.path.slice(k.length)).sort(),y={name:d.name,description:d.description,path:e.path,scope:"profile",enabled:!0,sourcePath:r,charCount:l.length,sourceHash:e.contentHash,validationStatus:"valid",validationMessages:[],resourceFiles:P};o.push(y),m.set(y.name,async()=>{let h=await g(r,e.path,e.contentHash),w=S(h);if(!w.name||!w.description||w.messages.length>0)throw new Error(`Released Harness Skill ${e.path} failed validation while loading.`);return{name:w.name,description:w.description,body:w.body,path:e.path,sourceHash:e.contentHash,charCount:h.length,packagePath:i.join(r,...i.posix.dirname(e.path).split("/")),resourceFiles:P}})}o.sort((e,l)=>e.name.localeCompare(l.name));let $={profileSourcePath:r,skills:o,readSkill:m.size>0?async e=>{let l=m.get(e);if(!l)throw new Error(`Released Harness Skill not found: ${e}`);return l()}:null},R=n.sort((e,l)=>e.path.localeCompare(l.path)).map(({path:e,content:l})=>[`Active Harness instruction (${e}):`,l.trim()].join(`
|
|
3
3
|
`)).filter(e=>e.trim().length>0),D=[["Harness capability receipt:",JSON.stringify({harnessRelease:{id:t.harnessRelease.id,contentHash:t.harnessRelease.contentHash},agentSnapshot:{id:t.agentSnapshot.id,contentHash:t.agentSnapshot.contentHash},files:t.harnessRelease.files.filter(e=>e.visibility==="policy").map(e=>({path:e.path,contentHash:e.contentHash})),skills:t.agentSnapshot.skills.map(e=>e.path),agents:t.agentSnapshot.agents.map(e=>e.path),tools:t.agentSnapshot.toolDeclarations.map(e=>e.name),capabilityRequirements:t.agentSnapshot.capabilityRequirements})].join(`
|
|
4
4
|
`),R.length>0?["Active Harness preflight:","Apply the following released instructions when planning work and immediately before every tool call.","Preflight each call: (1) identify any active instruction that matches the planned operation, (2) inspect the exact tool arguments for a forbidden pattern, and (3) rewrite the call before sending it when a pattern matches. Compliance is required even when the prohibited call might still succeed.",...R].join(`
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{d as c}from"./chunk-
|
|
2
|
+
import{d as c}from"./chunk-XLZMSD5K.js";import{za as f}from"./chunk-ZY32SZ2P.js";import{a as n}from"./chunk-FTQLQJQV.js";import{promises as v}from"node:fs";import u from"node:path";async function j(e){let s=await c(e.store,e.harnessRelease);if(!s)throw new Error("Profile evaluation Harness release is unavailable.");return w({...e,runtime:s})}n(j,"profileEvaluationsForRelease");async function w(e){let s=e.runtime,o=s.release.harnessRelease;if(o.id!==e.harnessRelease.id||o.contentHash!==e.harnessRelease.contentHash)throw new Error("Profile evaluation runtime differs from its requested release.");let r=o.metadata.profile;if(!r||typeof r!="object"||r.id!==e.ref.profileId||r.sourceRevision!==e.sourceRevision)throw new Error("Profile evaluation release differs from its accepted source.");let i={profileRef:e.ref,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease};if(!o.files.some(a=>a.path==="evals/catalog.json"))return{...i,catalogHash:null,definitions:[],suites:[]};let d=u.join(s.release.bundlePath,"source"),t=n(async a=>o.files.some(g=>g.path===a)?v.readFile(u.join(d,...a.split("/"))):void 0,"read"),[R,p,m]=await Promise.all([t("evals/catalog.json"),t("workflows/catalog.json"),t("workflows/actions.json")]),{catalog:l,catalogHash:h}=f({agentSnapshot:s.release.agentSnapshot,harnessRelease:o,catalogBytes:R,workflowBytes:p,actionBytes:m});return{...i,catalogHash:h,definitions:l.definitions,suites:l.suites}}n(w,"profileEvaluationsForRuntime");export{j as a,w as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b}from"./chunk-EICS777E.js";import{b as P}from"./chunk-
|
|
2
|
+
import{b}from"./chunk-EICS777E.js";import{b as P}from"./chunk-JVEIK4RH.js";import{a as T}from"./chunk-UOFDKMRU.js";import{d as q,e as I}from"./chunk-XLZMSD5K.js";import{fb as k,ob as R}from"./chunk-ZY32SZ2P.js";import{r as y}from"./chunk-OTDDXEQ6.js";import{n as i}from"./chunk-RCT3O3HQ.js";import{a as d}from"./chunk-FTQLQJQV.js";import{readFile as B}from"node:fs/promises";import A from"node:path";async function O(t){let o=k.parse(t.source),s;if(t.authorizeWorkspace){let r=await t.store.getHarnessReleaseRecord(o.harnessRelease.contentHash),m=r&&await t.store.getHarnessWorkspace(r.workspaceId);if(!r||!m||r.harnessRelease.id!==o.harnessRelease.id)throw new Error("The selected immutable Harness has no persisted owning workspace.");await t.authorizeWorkspace(o,m),s=await I({workspace:m,release:r})}else s=await q(t.store,o.harnessRelease);if(!s)throw new Error("The selected immutable Harness is unavailable.");let n=s.release;if(i(o.agentSnapshot)!==i({id:n.agentSnapshot.id,contentHash:n.agentSnapshot.contentHash}))throw new Error("The selected Harness differs from its admitted Agent snapshot.");let e=A.join(n.bundlePath,"source"),p=new Map;for(let r of n.harnessRelease.files)p.set(r.path,await B(A.join(e,...r.path.split("/"))));let l=y({agentSnapshot:n.agentSnapshot,harnessRelease:n.harnessRelease,files:p});if(l.contentHash!==o.sourcePackageHash)throw new Error("The selected Harness source bytes differ from the admitted package.");let c=T(n);return b({sourcePackage:l,expectedRelease:o.harnessRelease,baseSystemPrompt:"",runtimeId:"openpond.native-standalone-experiment.v1",tools:c.map(r=>({name:r.name,inputSchema:r.inputSchema,definition:{type:"function",function:{name:r.name,description:r.description,parameters:r.inputSchema}}})),maxContextCharacters:262144}),{runtime:s,sourcePackage:l}}d(O,"resolveStandaloneExperimentSource");function C(t){if(!t.turn.completedAt)throw new Error("Native Experiment receipt requires a settled turn.");let o=Buffer.byteLength(t.output,"utf8")>t.maxOutputBytes,s=t.cancelled?"cancelled":t.timedOut?"timed_out":t.turn.status==="interrupted"?"cancelled":t.turn.status==="completed"&&!o?"completed":"policy_failure",n=s==="completed"?null:o?"Native Harness output exceeded its admitted byte limit.":s==="timed_out"?"Native Harness case timed out.":s==="cancelled"?"Native Harness case was cancelled.":"Native Harness case failed; inspect its retained turn evidence.",e={schemaVersion:"openpond.nativeHarnessExperimentAttempt.v1",taskId:t.request.taskId,status:s,output:s==="completed"?t.output:null,error:n,messages:[{role:"user",text:JSON.stringify({instructions:t.request.instructions,input:t.request.input,policyVisibleContext:t.request.policyVisibleContext})},...s==="completed"?[{role:"assistant",text:t.output,toolCalls:[]}]:[]],collected:s==="completed",environmentCleanupComplete:!0,snapshot:null,native:{sessionId:t.turn.sessionId,turnId:t.turn.id,source:t.source,admissionHash:t.request.admissionHash,modelConfigurationHash:t.request.model.configurationHash,traceHash:t.traceHash,runtimeEventRefs:t.runtimeEventRefs,startedAt:t.turn.startedAt,completedAt:t.turn.completedAt,outputHash:i(t.output),partialOutputAvailable:s!=="completed"&&t.output.length>0}};return R(e)}d(C,"sealStandaloneExperimentReceipt");function ee(t){let o=new Map;async function s(e,p){let l=e.metadata?.standaloneExperiment;if(l===void 0)return null;let c=o.get(e.id);if(!c||i(l)!==i(c.binding)||e.currentProfile||e.profileComponentBinding||e.profileWorkflowBinding||p.sessionId!==e.id||p.profileSnapshot)throw new Error("Standalone Experiment turn has no matching active execution owner.");return c.stream}d(s,"resolveSessionModelStream");async function n(e){if(!Number.isSafeInteger(e.maxOutputBytes)||e.maxOutputBytes<1||e.maxOutputBytes>8388608)throw new Error("Native Experiment requires a bounded positive output limit.");if(!e.request.harness||i(e.request.harness)!==i(e.source))throw new Error("Native Experiment source differs from its admitted case.");if(e.request.environment.kind!=="text")throw new Error("Standalone native Harness execution requires a compatible text Dataset.");if(e.request.model.messages.length)throw new Error("Standalone Harness cases use released instructions; additional raw prompt messages are not qualified.");e.signal.throwIfAborted();let{runtime:p}=await O({store:t.store,source:e.source,authorizeWorkspace:t.authorizeWorkspace}),l={executionId:e.executionId,caseId:e.request.id,admissionHash:e.request.admissionHash,source:e.source,modelConfigurationHash:e.request.model.configurationHash},c={providerId:e.request.model.providerId,modelId:e.request.model.modelId},r=await t.createSession({provider:c.providerId,modelRef:c,currentProfile:null,hiddenFromDefaultSidebar:!0,metadata:{standaloneExperiment:l}});if(r.currentProfile||r.profileComponentBinding||r.profileWorkflowBinding)throw new Error("Standalone Experiment session acquired an unrelated Profile.");await P({store:t.store,runId:r.id,workspace:p.workspace,harnessRelease:e.source.harnessRelease,admittedAt:r.createdAt});let m=AbortSignal.any([e.signal,AbortSignal.timeout(e.request.timeoutMs)]),N=d(async function*(u){if(u.model!==c.modelId)throw new Error("Native Experiment requested a different model.");for await(let a of e.stream({...u,maxTokens:e.request.model.maxOutputTokens,temperature:e.request.model.temperature,topP:e.request.model.topP,signal:u.signal?AbortSignal.any([m,u.signal]):m}))yield a},"stream");o.set(r.id,{binding:l,stream:N});let h,x=d(()=>{h??=t.interruptSessionTurn(r.id,"Standalone Experiment case cancelled or timed out."),h.catch(()=>{})},"onAbort");m.addEventListener("abort",x,{once:!0});let w=!1,g=!1;try{m.throwIfAborted();let u=[e.request.instructions,JSON.stringify({input:e.request.input,policyVisibleContext:e.request.policyVisibleContext})].filter(Boolean).join(`
|
|
3
3
|
|
|
4
4
|
`);w=!0;let a=await t.sendTurn(r.id,{prompt:u,modelRef:c,approvalPolicy:"on-request"});if(h&&await h,!a.completedAt||a.status==="in_progress")throw new Error("Native Experiment turn did not settle.");if(g=!0,a.profileSnapshot||!a.harnessSnapshot||i(a.harnessSnapshot.harnessRelease)!==i(e.source.harnessRelease)||i(a.modelRef)!==i(c))throw new Error("Native Experiment turn differs from its admitted model or standalone Harness.");let S=await t.store.runtimeEventsForTurn(a.id);if(S.some(f=>f.sessionId!==r.id||f.turnId!==a.id))throw new Error("Native Experiment trace contains evidence from another case.");let W=S.filter(f=>f.name==="assistant.delta"&&typeof f.output=="string").map(f=>f.output).join(""),H=i(S),E=M(S),v=C({request:e.request,source:e.source,turn:a,output:W,traceHash:H,runtimeEventRefs:E,cancelled:e.signal.aborted,timedOut:m.aborted&&!e.signal.aborted,maxOutputBytes:e.maxOutputBytes});return{sessionId:r.id,turn:a,output:v.output,traceHash:H,runtimeEventRefs:E,cleanupComplete:!0,attempt:v}}catch(u){if(w&&!g){let a=await(h??t.interruptSessionTurn(r.id,"Standalone Experiment execution failed."));if(a.status==="in_progress"||!a.completedAt)throw new Error("Standalone Experiment cleanup remains unconfirmed.",{cause:u})}throw u}finally{m.removeEventListener("abort",x),o.delete(r.id)}}return d(n,"execute"),{execute:n,resolveSessionModelStream:s}}d(ee,"createStandaloneExperimentTurnOwner");function M(t){let o=-1;for(let n=t.length-1;n>=0;n--)if(t[n]?.name.endsWith(".delta")){o=n;break}let s=t.flatMap((n,e)=>n.name.endsWith(".delta")&&e!==o?[]:[n.id]);if(s.length>1e4)throw new Error("Native Experiment trace exceeds its evidence-reference limit.");return s}d(M,"retainedEventRefs");export{O as a,ee as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as t}from"./chunk-HIQPGYVH.js";import{l as r}from"./chunk-
|
|
2
|
+
import{b as t}from"./chunk-HIQPGYVH.js";import{l as r}from"./chunk-ZEOYNUHL.js";import{W as n}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";var c=e.object({id:t,scope:t,sourceId:t,name:e.string().trim().min(1).max(100),keyPrefix:e.string().min(1).max(100),createdAt:e.iso.datetime(),expiresAt:e.iso.datetime(),revokedAt:e.iso.datetime().nullable()}).strict(),s=e.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/),S=e.discriminatedUnion("action",[e.object({action:e.literal("create"),scope:t,sourceId:t,name:e.string().trim().min(1).max(100),expiresAt:e.iso.datetime(),operationId:t,apiKey:s}).strict(),e.object({action:e.literal("list"),scope:t,sourceId:t,afterId:t.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),e.object({action:e.literal("revoke"),scope:t,sourceId:t,id:t}).strict()]),g=e.object({credential:c,apiKey:s}).strict(),f=e.object({items:e.array(c).max(100),nextCursor:t.nullable()}).strict(),b=e.object({scope:t,sourceId:t}).strict(),h=e.object({scope:t,source:r,taskDefinition:r,enabled:e.boolean(),allowedSplits:e.array(n).min(1).max(4)}).strict();function x(m,i){let a=Date.parse(e.iso.datetime().parse(m));if(a<=i.getTime()||a>i.getTime()+2160*60*60*1e3)throw new Error("Source credentials must expire within 90 days.")}o(x,"assertLearningCredentialExpiry");export{c as a,s as b,S as c,g as d,f as e,b as f,h as g,x as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{Ca as b,ja as w,wa as y}from"./chunk-
|
|
2
|
+
import{Ca as b,ja as w,wa as y}from"./chunk-BYVE4TMU.js";import{i as f,n}from"./chunk-RCT3O3HQ.js";import{a as h}from"./chunk-FTQLQJQV.js";function I(r,a){if(!a)return null;let g=w(a),m=(r.environment.resources??[]).filter(o=>o.kind==="file"&&o.visibility==="policy_visible");if(!m.length)return null;let k=m.map(o=>{let l=g.files.filter(s=>s.asset.path===o.path&&s.asset.visibility==="policy");if(l.length!==1)throw new Error("Reviewed shared resource differs from the exact owner-local package.");let c=f.parse(l[0].asset),t=r.sourceRefs.find(s=>"sourceFileHashes"in s&&s.sourceFileHashes?.includes(c.contentHash)&&"originalFileNames"in s&&s.originalFileNames?.includes(c.path.split("/").at(-1))&&"mediaTypes"in s&&s.mediaTypes?.includes(c.mediaType));if(!t)throw new Error("Shared workflow files require existing source review of their exact bytes.");return{asset:c,sourceRefId:t.id}});return new Map(k.map(o=>[o.asset.id,o]))}h(I,"reviewedModelSharedResources");function O(r,a,g){if(r.profileId!==a.profileId||r.tasks.length!==a.tasks.length)throw new Error("Model Taskset review differs from its compiled task scope.");let m=new Map(a.sourceRefs.map(t=>[t.id,t])),k=I(a,g),o=r.tasks.map(t=>{let s=a.tasks.find(e=>e.id===t.id);if(!s)throw new Error("Model Taskset review is missing a compiled task.");if(n(t.input)!==n(s.input)||n(t.expectedOutput)!==n(s.expectedOutput)||n(t.policyVisibleContext)!==n(s.policyVisibleContext))throw new Error("Model Taskset review differs from its compiled task content.");let T=(t.assets??[]).map(e=>{let i=s.assets?.find(u=>u.id===e.id);if(!i){let u=k?.get(e.id),d=u?.asset,R=f.safeParse(e.metadata.portableAsset);if(!d||!R.success||n(R.data)!==n(d)||e.artifactRef!==d.path||e.stagingPath!==d.path||e.sha256!==d.contentHash||e.sizeBytes!==d.sizeBytes||e.mediaType!==d.mediaType||e.fileName!==d.path.split("/").at(-1)||e.split!==t.split)throw new Error("Model Taskset review differs from its compiled shared resource.");return{...e,sourceRefId:u.sourceRefId}}let p=f.safeParse(i?.metadata.portableAsset),P=i?.artifactRef===e.artifactRef||p.success&&p.data.path===e.artifactRef&&p.data.id===e.id&&p.data.contentHash===e.sha256&&p.data.sizeBytes===e.sizeBytes&&p.data.mediaType===e.mediaType&&p.data.visibility==="policy";if(!i||i.sha256!==e.sha256||i.sizeBytes!==e.sizeBytes||!P||i.mediaType!==e.mediaType||i.fileName!==e.fileName||i.split!==t.split||!s.sourceRefs.includes(i.sourceRefId)||!m.has(i.sourceRefId))throw new Error("Model Taskset review differs from its compiled input asset.");return{...e,sourceRefId:i.sourceRefId,...i.stagingPath===void 0?{}:{stagingPath:i.stagingPath}}});if((s.assets??[]).some(e=>!T.some(i=>i.id===e.id)))throw new Error("Model Taskset review lost an input asset.");return{...t,sourceRefs:[...new Set([...s.sourceRefs,...T.map(e=>e.sourceRefId)])],assets:T}}),l=r.metadata.rewardBinding,c=y.parse({...r,sourceRefs:a.sourceRefs,tasks:o,metadata:{...r.metadata,...Object.fromEntries(["trainingMethod","diagnosis","buildIntent"].filter(t=>a.metadata[t]!==void 0).map(t=>[t,a.metadata[t]]))},capabilities:{...r.capabilities,supportedSignals:a.capabilities.supportedSignals,compatibleMethods:a.capabilities.compatibleMethods},graderFixtures:a.graderFixtures,learningSignals:{...a.learningSignals,rewards:a.learningSignals.rewards.map(t=>l?{...t,artifactRef:l.id,rules:[{id:l.id,points:1,condition:"Execute the published Reward binding with its declared normalization, weights and required gates."}]}:t)}});return y.parse({...c,contentHash:b(c)})}h(O,"retainModelTasksetInputReview");export{O as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b}from"./chunk-
|
|
2
|
+
import{b}from"./chunk-2PVW2XFF.js";import{A as d,H as u,I as p,pa as h,qa as S,va as g}from"./chunk-BYVE4TMU.js";import{Za as c}from"./chunk-ZY32SZ2P.js";import{M as l}from"./chunk-2MEOUS24.js";import{f as i}from"./chunk-HNQPEOJD.js";import{h as m}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as s}from"./chunk-FTQLQJQV.js";var a=e.string().trim().min(1).max(240),t=e.string().trim().min(1),r=e.string().trim().min(8).max(256),f=e.record(e.string(),e.unknown()).default({}),n=a.nullable(),k=e.enum(["slash_train","session_menu","bulk_selection","training_page","task_candidate"]),T=e.enum(["defaults","customize"]),v=e.enum(["automated","manual"]),Ge=e.object({schemaVersion:e.literal("openpond.trainingSourceEstimate.v1"),sessionId:a,messageCount:e.number().int().nonnegative(),estimatedTokens:e.number().int().nonnegative(),textBytes:e.number().int().nonnegative()}),Pe=e.object({query:e.string().max(500).default(""),offset:e.number().int().nonnegative().default(0),limit:e.number().int().min(1).max(100).default(20),candidates:e.array(e.object({sessionId:a,title:e.string().trim().min(1).max(500),updatedAt:t})).max(500).default([])}),R=e.object({sessionId:a,title:e.string().trim().min(1).max(500),updatedAt:t,snippet:e.string().max(2e3).nullable()}),Ve=e.object({schemaVersion:e.literal("openpond.trainingChatSearchResult.v1"),query:e.string(),offset:e.number().int().nonnegative(),limit:e.number().int().positive(),total:e.number().int().nonnegative(),hasMore:e.boolean(),indexedChats:e.number().int().nonnegative(),totalChats:e.number().int().nonnegative(),indexing:e.boolean(),entries:e.array(R)}),y=e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]),I=e.object({graderId:a.nullable(),path:e.string().trim().min(1).max(1e3),language:e.enum(["javascript","typescript","python","json","text"]),content:e.string().max(2e6),sha256:r,declaredSha256:r.nullable(),integrity:e.enum(["verified","unverified","mismatch"])}),C=e.object({protocolVersion:e.string().trim().min(1).max(200),module:e.string().trim().min(1).max(1e3),moduleSha256:r,command:e.array(e.string().max(2e3)).max(100),cwd:e.string().trim().min(1).max(4e3),maxTurns:e.number().int().positive().max(100)}),Be=e.object({schemaVersion:e.literal("openpond.tasksetGraderDetails.v1"),taskset:m,sourceTasksetId:a,graders:e.array(u).max(1e3),runtime:C.nullable(),sources:e.array(I).max(1e3),unavailableReason:e.string().max(2e3).nullable()}),Oe=e.object({schemaVersion:e.literal("openpond.taskAttempt.v1"),id:a,tasksetId:a,taskId:a,split:d,attempt:e.number().int().nonnegative(),seed:e.number().int(),modelRef:i.nullable(),startedAt:t,completedAt:t,output:e.record(e.string(),e.unknown()),runtimeEventRefs:e.array(a).max(1e4).default([]),artifactRefs:e.array(a).max(1e4).default([]),privilegedOutcomeRef:n,infrastructureError:e.string().trim().min(1).max(1e4).nullable(),costUsd:e.number().nonnegative().nullable(),latencyMs:e.number().int().nonnegative(),userInterventions:e.number().int().nonnegative().default(0),metadata:f}),Ne=e.object({schemaVersion:e.literal("openpond.taskAttemptArtifact.v1"),id:a,tasksetId:a,taskId:a,attemptId:a,kind:e.enum(["raw_model_response","runtime_trace","environment_state","grader_evidence","output_artifact"]),path:e.string().trim().min(1).max(4e3),mediaType:e.string().trim().min(1).max(200).nullable().optional(),sha256:r,sizeBytes:e.number().int().nonnegative(),createdAt:t,metadata:f}),A=e.object({graderId:a,graderVersion:e.string().trim().min(1).max(100),score:e.number().min(0).max(1).nullable(),passed:e.boolean(),hardGate:e.boolean(),rewardEligible:e.boolean(),feedback:e.string().trim().max(2e4).nullable(),evidenceRefs:e.array(a).max(1e4).default([]),judge:i.nullable().optional().default(null),calibrationStatus:e.enum(["not_applicable","pending","passed","failed"])}),qe=e.object({schemaVersion:e.literal("openpond.gradeResult.v1"),id:a,attemptId:a,graderSetHash:r,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),components:e.array(A).min(1).max(1e3),failureClass:y.nullable(),feedback:e.array(e.string().trim().min(1).max(2e4)).max(1e3).default([]),rewardEligible:e.boolean(),rewardComposition:c.optional(),createdAt:t}),ze=e.enum(["stable_hash_top_n","rft_easy_curriculum_v1"]),He=e.object({schemaVersion:e.literal("openpond.graderAuditReport.v1"),id:a,tasksetId:a,tasksetHash:r,fixtureRefs:e.array(a).min(1).max(1e5),gradeRefs:e.array(a).min(1).max(1e5),passed:e.boolean(),hackingChecksPassed:e.boolean(),leakageChecksPassed:e.boolean(),infrastructureSafetyPassed:e.boolean(),failures:e.array(e.object({fixtureId:a,label:p,gradeId:a,reason:e.string().trim().min(1).max(5e3)})).max(1e5),createdAt:t}),Fe=48e3,j=5;function Le(x,_="New model"){let o=x?.trim().split(/\s+/).filter(Boolean)??[];return o.length===0?_:o.slice(0,j).join(" ")}s(Le,"conciseWorkproductName");var M=e.object({schemaVersion:e.literal("openpond.baseModelPreference.v1"),modelId:a,revision:e.string().trim().min(1).max(256).nullable(),tokenizerRevision:e.string().trim().min(1).max(256).nullable(),chatTemplateHash:e.string().trim().min(8).max(256).nullable(),modelAssetId:n,source:e.enum(["managed","local","builtin"])}),D=e.object({schemaVersion:e.literal("openpond.taskCreationRequest.v1"),id:a,profileId:a,surface:k,mode:T,entryMode:v.default("manual"),resourceIntent:e.enum(["workproduct","dataset"]).default("workproduct"),buildIntent:h.default("demonstrations"),buildSpecification:S.nullable().default(null),objective:e.string().trim().min(1).max(2e4).nullable(),methodHint:e.enum(["sft","dpo","grpo","ppo"]).nullable().default(null),preferredBaseModelId:a.nullable().default(null),preferredBaseModel:M.nullable().default(null),sourceIds:e.array(a).max(1e5),candidateId:n,analysisModel:i.nullable(),analysisReasoningEffort:l.nullable().default(null),createImproveRunId:n.default(null),targetIntent:e.object({kind:e.enum(["agent","skill","extension","model","configuration"]).nullable(),id:n,displayName:e.string().trim().min(1).max(500).nullable(),operation:e.enum(["create","improve"])}).default({kind:"model",id:null,displayName:null,operation:"create"}),disclosure:e.object({status:e.enum(["not_required","pending","approved","declined"]),content:e.literal("raw_excerpts"),sourceIds:e.array(a).max(1e5),providerModel:i.nullable(),approvalId:n,approvedAt:t.nullable()}).default({status:"not_required",content:"raw_excerpts",sourceIds:[],providerModel:null,approvalId:null,approvedAt:null}),createdAt:t}),w=e.object({schemaVersion:e.literal("openpond.taskCreationSnapshot.v1"),id:a,request:D,state:e.enum(["planning","awaiting_disclosure_approval","awaiting_questions","recommendation_ready","awaiting_materialization_approval","materializing","validating","ready","blocked","failed","cancelled"]),proposal:b.nullable(),materializedTasksetId:n,disclosureApprovalId:n,materializationApprovalId:n,blockingQuestions:e.array(e.object({id:a,kind:e.enum(["objective","consent","success_signal","privacy_licensing","interpretation"]),prompt:e.string().trim().min(1).max(5e3),answer:e.string().trim().min(1).max(2e4).nullable()})).default([]),transcript:e.array(e.object({id:a,role:e.enum(["user","assistant","system","tool"]),text:e.string().max(1e5),createdAt:t})).max(1e4).default([]),repairHistory:e.array(g).max(1e3).default([]),blockedReason:e.string().trim().min(1).max(1e4).nullable(),createdAt:t,updatedAt:t}),Ke=e.object({schemaVersion:e.literal("openpond.taskCreationTranscript.v1"),creationId:a,profileId:a,messages:w.shape.transcript,updatedAt:t});export{Ge as a,Pe as b,Ve as c,y as d,Be as e,Oe as f,Ne as g,qe as h,He as i,Fe as j,Le as k,M as l,D as m,w as n,Ke as o};
|