openpond 0.2.59 → 0.2.60
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/README.md +27 -0
- package/dist/app-server.d.ts +7 -0
- package/dist/app-server.js +1 -1
- package/dist/chunks/acp-ARBNMIPT.js +2 -0
- package/dist/chunks/acp-agent-53COYDHB.js +21 -0
- package/dist/chunks/{actions-command-JJ3CU7J6.js → actions-command-6YSZ7EJS.js} +1 -1
- package/dist/chunks/{app-layer-KAUZAHGE.js → app-layer-TVG7KTW6.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-SXGZOUJJ.js → app-server-connected-apps-K62M6LCT.js} +1 -1
- package/dist/chunks/{app-server-evaluations-N4OMTPCI.js → app-server-evaluations-RM6WXX3H.js} +1 -1
- package/dist/chunks/app-server-harness-services-RLKMWOQ4.js +2 -0
- package/dist/chunks/app-server-runtime-OKMEHNEU.js +2 -0
- package/dist/chunks/apps-YWZL2H34.js +2 -0
- package/dist/chunks/{chunk-JUQMSHNR.js → chunk-23P2O7PH.js} +1 -1
- package/dist/chunks/{chunk-PF5R6CMP.js → chunk-2GICDASL.js} +1 -1
- package/dist/chunks/{chunk-6MI4KKWF.js → chunk-2ITZW2CN.js} +1 -1
- package/dist/chunks/chunk-2MMCZHKL.js +2 -0
- package/dist/chunks/{chunk-EOBHQ3JT.js → chunk-2PAJCXFC.js} +1 -1
- package/dist/chunks/{chunk-GYJQKCEO.js → chunk-2RNCXDJC.js} +1 -1
- package/dist/chunks/{chunk-APB2STJK.js → chunk-2SUMZ73C.js} +1 -1
- package/dist/chunks/{chunk-DZUN5YWB.js → chunk-3CWRTKHY.js} +1 -1
- package/dist/chunks/{chunk-TRQQNFMO.js → chunk-44LWH5U6.js} +1 -1
- package/dist/chunks/{chunk-BVQWVIGK.js → chunk-52KIORRX.js} +1 -1
- package/dist/chunks/{chunk-TG7P7BSV.js → chunk-5RHYSQZ5.js} +1 -1
- package/dist/chunks/{chunk-3QIB5FXI.js → chunk-5ZBLCWEJ.js} +1 -1
- package/dist/chunks/{chunk-25JDHAZ5.js → chunk-637UACKH.js} +1 -1
- package/dist/chunks/{chunk-VRODAXFS.js → chunk-655DQ6AX.js} +26 -26
- package/dist/chunks/{chunk-N4FFQPLR.js → chunk-6GWOVHIG.js} +1 -1
- package/dist/chunks/chunk-6HQB3MQO.js +2 -0
- package/dist/chunks/{chunk-GOPFFQZU.js → chunk-7LZISGTA.js} +2 -2
- package/dist/chunks/{chunk-MMQRHR3V.js → chunk-7RC5WPVT.js} +1 -1
- package/dist/chunks/{chunk-H6IW2R22.js → chunk-7YTHEMWI.js} +1 -1
- package/dist/chunks/{chunk-PCSIOUHF.js → chunk-A3L74U3W.js} +1 -1
- package/dist/chunks/{chunk-XMKCCLGB.js → chunk-A66CSUBJ.js} +1 -1
- package/dist/chunks/{chunk-OUVIWDL2.js → chunk-AGVOGPAZ.js} +1 -1
- package/dist/chunks/{chunk-U2MAPON2.js → chunk-AW5Q6NXT.js} +1 -1
- package/dist/chunks/{chunk-7AVNZF36.js → chunk-B46HZ3MX.js} +1 -1
- package/dist/chunks/{chunk-KGNCKIFP.js → chunk-BIPQCJ5V.js} +1 -1
- package/dist/chunks/{chunk-776WNDV2.js → chunk-BIQ33JV5.js} +1 -1
- package/dist/chunks/{chunk-JFXWI3EN.js → chunk-BK63OQRW.js} +1 -1
- package/dist/chunks/{chunk-BO5JZYWG.js → chunk-CFSIU6CW.js} +1 -1
- package/dist/chunks/{chunk-WC42WOLG.js → chunk-D3RRUWNN.js} +1 -1
- package/dist/chunks/{chunk-X4OSOOSU.js → chunk-D4UX2O45.js} +1 -1
- package/dist/chunks/{chunk-GJ2ZJFDD.js → chunk-DG4TYVPF.js} +1 -1
- package/dist/chunks/{chunk-QIKWJ2AA.js → chunk-DGIEXZJV.js} +1 -1
- package/dist/chunks/{chunk-JMBQYBPI.js → chunk-DIGX56JY.js} +1 -1
- package/dist/chunks/{chunk-4GPXTISD.js → chunk-DISNCX6R.js} +1 -1
- package/dist/chunks/{chunk-EWOSLZDX.js → chunk-DK7IKI7O.js} +1 -1
- package/dist/chunks/{chunk-74IIXVAE.js → chunk-DX7YEUNQ.js} +1 -1
- package/dist/chunks/{chunk-523TE4BI.js → chunk-E63VWAQA.js} +1 -1
- package/dist/chunks/{chunk-OLDK2LKJ.js → chunk-EL454L26.js} +1 -1
- package/dist/chunks/{chunk-WRI4XKSK.js → chunk-ENSB6ZTM.js} +1 -1
- package/dist/chunks/{chunk-EAPFMACH.js → chunk-ERJV5BMC.js} +1 -1
- package/dist/chunks/{chunk-RNIAFXMB.js → chunk-EXJGCNRS.js} +1 -1
- package/dist/chunks/chunk-F5KCCDQM.js +2 -0
- package/dist/chunks/{chunk-57TRXBLT.js → chunk-FSQWAANK.js} +1 -1
- package/dist/chunks/{chunk-BGJYITVI.js → chunk-G5B3PB5X.js} +1 -1
- package/dist/chunks/{chunk-ARLOVWQ3.js → chunk-GAWGIJQG.js} +1 -1
- package/dist/chunks/{chunk-ABZ2ZOLU.js → chunk-GGGF5NHJ.js} +1 -1
- package/dist/chunks/{chunk-4EDIRCD3.js → chunk-GOYBYYPQ.js} +1 -1
- package/dist/chunks/{chunk-H7ATCPPB.js → chunk-H3BSIAQO.js} +1 -1
- package/dist/chunks/{chunk-RBZH6A6M.js → chunk-HCEJAOIF.js} +1 -1
- package/dist/chunks/{chunk-OPNRWESL.js → chunk-IFQCOSU6.js} +1 -1
- package/dist/chunks/{chunk-VGRMAGOK.js → chunk-IJHZBHEK.js} +2 -2
- package/dist/chunks/{chunk-GUOLMLZN.js → chunk-ISFIDCIH.js} +1 -1
- package/dist/chunks/{chunk-PY6K2JRH.js → chunk-ITKTILKI.js} +1 -1
- package/dist/chunks/{chunk-3CDEBKSU.js → chunk-IUBARBGI.js} +1 -1
- package/dist/chunks/{chunk-2L5XWJJ5.js → chunk-J24I74EM.js} +1 -1
- package/dist/chunks/{chunk-IRV6GWGG.js → chunk-J7QGHA7G.js} +3 -3
- package/dist/chunks/{chunk-FAYASU7Z.js → chunk-JGWINTT5.js} +1 -1
- package/dist/chunks/{chunk-GL3NX3F3.js → chunk-JHEFWB6O.js} +1 -1
- package/dist/chunks/{chunk-V34H7Y2T.js → chunk-JHMS2WXM.js} +2 -2
- package/dist/chunks/{chunk-PSGGOZFM.js → chunk-JHR3LF2F.js} +1 -1
- package/dist/chunks/{chunk-O4VIXU7A.js → chunk-KGLJU66U.js} +3 -3
- package/dist/chunks/{chunk-XEOEKFG6.js → chunk-KJFRCVQC.js} +1 -1
- package/dist/chunks/chunk-KNO355LC.js +2 -0
- package/dist/chunks/{chunk-BQS7Z4AP.js → chunk-LD7PGREF.js} +2 -2
- package/dist/chunks/{chunk-MNC4YUDI.js → chunk-LHA7RQBA.js} +1 -1
- package/dist/chunks/{chunk-RZUEVS64.js → chunk-LO3O45IX.js} +1 -1
- package/dist/chunks/{chunk-TIHXUKFD.js → chunk-M2SKXY5C.js} +2 -2
- package/dist/chunks/{chunk-2IHO4GDJ.js → chunk-M3ZQDPRS.js} +1 -1
- package/dist/chunks/{chunk-DPHAN6N3.js → chunk-M4ZF44H5.js} +1 -1
- package/dist/chunks/{chunk-Y4OWBBDD.js → chunk-M55H7KVR.js} +1 -1
- package/dist/chunks/{chunk-NTB2O4RP.js → chunk-MGKMIRYG.js} +1 -1
- package/dist/chunks/{chunk-XJZSIXEO.js → chunk-MJGU2JJ2.js} +2 -2
- package/dist/chunks/{chunk-7K7O3CKY.js → chunk-MS37ISA4.js} +2 -2
- package/dist/chunks/{chunk-BRORSFJX.js → chunk-NCKXI2VB.js} +11 -11
- package/dist/chunks/chunk-NHUUCNAD.js +2 -0
- package/dist/chunks/{chunk-2WKUBGIF.js → chunk-O3VP46SE.js} +1 -1
- package/dist/chunks/{chunk-EUMXMT3S.js → chunk-O4FBOUNX.js} +1 -1
- package/dist/chunks/chunk-O6IFVTZT.js +9 -0
- package/dist/chunks/{chunk-ZH3K7LKQ.js → chunk-O7B44IYN.js} +1 -1
- package/dist/chunks/{chunk-ZAN4DYLH.js → chunk-OGMDEA3Y.js} +1 -1
- package/dist/chunks/{chunk-BL3YH2QU.js → chunk-OKBIWRHC.js} +1 -1
- package/dist/chunks/{chunk-FFRFSDBM.js → chunk-ON2RNOCG.js} +1 -1
- package/dist/chunks/{chunk-76M2MEHV.js → chunk-ONDCV5QC.js} +1 -1
- package/dist/chunks/{chunk-UCPGRPWY.js → chunk-OQ4VGCRG.js} +1 -1
- package/dist/chunks/{chunk-GVZLGS2U.js → chunk-OWK7HU5I.js} +1 -1
- package/dist/chunks/{chunk-JQKSXCAJ.js → chunk-OY5HC2P6.js} +1 -1
- package/dist/chunks/{chunk-T5AACNJI.js → chunk-P7HRF4FM.js} +1 -1
- package/dist/chunks/{chunk-7ED24PP6.js → chunk-PCNLC5H3.js} +1 -1
- package/dist/chunks/{chunk-ES2ISFJC.js → chunk-PF56N7ZY.js} +1 -1
- package/dist/chunks/{chunk-OX3XZKGK.js → chunk-PKALOVHC.js} +2 -2
- package/dist/chunks/{chunk-ZCHXGRRU.js → chunk-PR5TYTY4.js} +1 -1
- package/dist/chunks/{chunk-Q4TBTRIG.js → chunk-PWK5Z5S3.js} +1 -1
- package/dist/chunks/chunk-PXS4SVQG.js +16 -0
- package/dist/chunks/{chunk-AY64VY4E.js → chunk-QGOPYQW3.js} +1 -1
- package/dist/chunks/{chunk-LPWBIGKW.js → chunk-R7YEURUQ.js} +1 -1
- package/dist/chunks/{chunk-ACYFMLWG.js → chunk-RCA6NGVA.js} +2 -2
- package/dist/chunks/{chunk-DUURYZOI.js → chunk-RG3NH6YQ.js} +1 -1
- package/dist/chunks/{chunk-ATAOHSFR.js → chunk-RJIUOLWY.js} +1 -1
- package/dist/chunks/{chunk-37MWETFU.js → chunk-RXE3FYMJ.js} +1 -1
- package/dist/chunks/chunk-RYGWCN2R.js +2 -0
- package/dist/chunks/{chunk-VYLGI3IH.js → chunk-SFNCAPCJ.js} +1 -1
- package/dist/chunks/{chunk-Z4Z5UOZM.js → chunk-SG6JZ7HD.js} +1 -1
- package/dist/chunks/{chunk-IFDALGZE.js → chunk-SKRNWRKV.js} +5 -5
- package/dist/chunks/{chunk-ANFDRKUU.js → chunk-SLZH4Z6C.js} +1 -1
- package/dist/chunks/{chunk-WN3V6KDN.js → chunk-SPDSSMFD.js} +1 -1
- package/dist/chunks/{chunk-EQOV34UH.js → chunk-STWRTNRK.js} +1 -1
- package/dist/chunks/{chunk-XMWXH7TS.js → chunk-T5J7HIHR.js} +1 -1
- package/dist/chunks/{chunk-E72UU4VX.js → chunk-TBUAQWFS.js} +1 -1
- package/dist/chunks/{chunk-ZUJ3XUCP.js → chunk-TEPRCBDV.js} +1 -1
- package/dist/chunks/{chunk-2G4BEISF.js → chunk-TOFMA2L5.js} +2 -2
- package/dist/chunks/{chunk-TKLBP3MM.js → chunk-UFHLLSCE.js} +1 -1
- package/dist/chunks/{chunk-BE6SS65L.js → chunk-UJKQLO6B.js} +2 -2
- package/dist/chunks/{chunk-O3RF72BT.js → chunk-UZQNFTLR.js} +1 -1
- package/dist/chunks/{chunk-F74GBN6K.js → chunk-V2HMWCT6.js} +1 -1
- package/dist/chunks/{chunk-6ZFPQYHG.js → chunk-V4KT5FCJ.js} +1 -1
- package/dist/chunks/{chunk-TVQAPBLZ.js → chunk-VHSX3JPX.js} +1 -1
- package/dist/chunks/{chunk-22VMH6JV.js → chunk-W2SXOGTQ.js} +1 -1
- package/dist/chunks/{chunk-PH6IORGZ.js → chunk-WDEO44UN.js} +1 -1
- package/dist/chunks/{chunk-LNCHFVHT.js → chunk-WEHBK3MC.js} +1 -1
- package/dist/chunks/{chunk-KO3HNMLJ.js → chunk-WGX7WY4N.js} +1 -1
- package/dist/chunks/{chunk-CKMSBAI2.js → chunk-WHREO7A2.js} +1 -1
- package/dist/chunks/{chunk-N6ENLEMY.js → chunk-WS2ZZBAQ.js} +3 -3
- package/dist/chunks/{chunk-DIO5CB6U.js → chunk-WYZWDMMF.js} +1 -1
- package/dist/chunks/{chunk-MQULU465.js → chunk-XO3H32KX.js} +1 -1
- package/dist/chunks/{chunk-FKJHEZCW.js → chunk-XQBIHPPX.js} +1 -1
- package/dist/chunks/chunk-XRKFTPHD.js +2 -0
- package/dist/chunks/{chunk-YHHF4Q7Y.js → chunk-XSCIOQYE.js} +1 -1
- package/dist/chunks/{chunk-COHMDT7A.js → chunk-XTWEWYK7.js} +7 -7
- package/dist/chunks/{chunk-AQD7K4Z5.js → chunk-Y3GIM6WK.js} +1 -1
- package/dist/chunks/{chunk-74ZXXBGN.js → chunk-Y54RKLOI.js} +1 -1
- package/dist/chunks/{chunk-C37PUHA6.js → chunk-Y777GISF.js} +1 -1
- package/dist/chunks/{chunk-PFSMXKTI.js → chunk-YDU3S6UT.js} +1 -1
- package/dist/chunks/{chunk-UGL7WF3W.js → chunk-YOZIZYSC.js} +1 -1
- package/dist/chunks/{chunk-OSIO7PLX.js → chunk-YQKOB56U.js} +1 -1
- package/dist/chunks/chunk-YVNDDNMK.js +3 -0
- package/dist/chunks/{chunk-U5FKRYJO.js → chunk-ZAZKJJOT.js} +1 -1
- package/dist/chunks/{chunk-2RNQQNB7.js → chunk-ZR7LIMJS.js} +1 -1
- package/dist/chunks/{chunk-PQJTYOR2.js → chunk-ZTJOOY2F.js} +1 -1
- package/dist/chunks/{chunk-GPVCOEUH.js → chunk-ZTVXRZ6D.js} +1 -1
- package/dist/chunks/cli-CNYNXKGQ.js +2 -0
- package/dist/chunks/configuration-command-5K7EE2J5.js +2 -0
- package/dist/chunks/connected-app-executor-E25XCNAS.js +2 -0
- package/dist/chunks/connected-evidence-QNSO5BTF.js +2 -0
- package/dist/chunks/connection-Y2KCMBYD.js +2 -0
- package/dist/chunks/{continual-WFPIDWPH.js → continual-SOO3QBNQ.js} +1 -1
- package/dist/chunks/core-commands-ZTWPYAFQ.js +2 -0
- package/dist/chunks/datasets-XPUMWGOC.js +2 -0
- package/dist/chunks/desktop-test-HVSW4JHY.js +3 -0
- package/dist/chunks/dist-4N6AHWNN.js +2 -0
- package/dist/chunks/{dist-OMGUJYPD.js → dist-N6R6VNFD.js} +1 -1
- package/dist/chunks/{dist-OGLX76LL.js → dist-QN7WKZ2D.js} +1 -1
- package/dist/chunks/{enclave-QS4BUNDU.js → enclave-VURYNILU.js} +1 -1
- package/dist/chunks/evaluation-coordination-AOTFPVMS.js +2 -0
- package/dist/chunks/experiment-improvements-75CN3VI7.js +2 -0
- package/dist/chunks/experiments-AGAHM2AK.js +2 -0
- package/dist/chunks/{experiments-VFQGE4HC.js → experiments-DYSHYBGB.js} +1 -1
- package/dist/chunks/{extension-JCUA3RWV.js → extension-UT4CSDJF.js} +1 -1
- package/dist/chunks/help-KU52CFMW.js +8 -0
- package/dist/chunks/host-profile-evaluation-tools-LZDMQCMT.js +2 -0
- package/dist/chunks/host-profile-external-dataset-VK3NJHMC.js +2 -0
- package/dist/chunks/hosted-app-server-composition-P7V7K7CG.js +2 -0
- package/dist/chunks/{hosted-experiment-improvement-42YWXB3P.js → hosted-experiment-improvement-P433KDX2.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-Y4DONWPC.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-HVVC43XQ.js → hosted-profile-candidate-72MMPN6U.js} +1 -1
- package/dist/chunks/hosted-profile-compiler-RXHLK224.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-LS4DCSDO.js +2 -0
- package/dist/chunks/{hosted-profile-evaluation-inspection-BUWLCKCD.js → hosted-profile-evaluation-inspection-3Q6EHO66.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-3XLRR6UH.js → hosted-profile-evaluation-preparation-ZD27HNLF.js} +1 -1
- package/dist/chunks/{hosted-tasksets-THKM5QY5.js → hosted-tasksets-V2PQZJN4.js} +1 -1
- package/dist/chunks/human-review-4FJFINQX.js +2 -0
- package/dist/chunks/{import-CBDJ4DME.js → import-GBHSLA3G.js} +1 -1
- package/dist/chunks/{learning-ACEVFL5M.js → learning-U3FZL5YB.js} +1 -1
- package/dist/chunks/local-harness-improvement-runtime-UP2P7UT4.js +2 -0
- package/dist/chunks/local-harness-taskset-review-ZNOKSPJJ.js +2 -0
- package/dist/chunks/{local-scope-HVF2GZ5W.js → local-scope-62GWHDXS.js} +1 -1
- package/dist/chunks/{model-projects-QPO22JPA.js → model-projects-LQ4C6R3X.js} +1 -1
- package/dist/chunks/opchat-Q4PIWPYW.js +3 -0
- package/dist/chunks/organizations-TEH6HBQ3.js +2 -0
- package/dist/chunks/{profile-Y2MCSOUK.js → profile-SWPVCGTR.js} +1 -1
- package/dist/chunks/{profile-training-source-6GOT7AHM.js → profile-training-source-J73ZLNSC.js} +1 -1
- package/dist/chunks/project-action-payload-OU3ZPHW7.js +2 -0
- package/dist/chunks/project-agent-J7ILCRBS.js +2 -0
- package/dist/chunks/{published-experiment-source-5TMGLKDM.js → published-experiment-source-HVHKSYDL.js} +1 -1
- package/dist/chunks/refiner-profile-service-E7YU4E3N.js +2 -0
- package/dist/chunks/{runtime-QFXCXSVB.js → runtime-LIPHPKKJ.js} +2 -2
- package/dist/chunks/sandbox-command-G6KID3OP.js +2 -0
- package/dist/chunks/{sandbox-template-XWWPWWNR.js → sandbox-template-MZTMAUFS.js} +1 -1
- package/dist/chunks/saved-work-LOUWLF37.js +2 -0
- package/dist/chunks/{send-turn-SIXOZUVJ.js → send-turn-UEUEGY5W.js} +1 -1
- package/dist/chunks/{src-EZAKCCUV.js → src-7WMZOWZZ.js} +102 -95
- package/dist/chunks/{src-6SHCCYEN.js → src-MVAK6D6Y.js} +1 -1
- package/dist/chunks/standalone-experiment-turn-owner-YRKEOEJ2.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-GDX6CSUU.js → store-continual-support-reviews-FJLLNKCY.js} +1 -1
- package/dist/chunks/{store-conversation-serving-W55XMDH4.js → store-conversation-serving-4KWR4IZY.js} +1 -1
- package/dist/chunks/{store-create-improve-A7E7CUPZ.js → store-create-improve-JWBJZRAU.js} +1 -1
- package/dist/chunks/{store-datasets-HKF3EO7B.js → store-datasets-4N2M6Y3K.js} +2 -2
- package/dist/chunks/{store-evaluation-results-645RFBGR.js → store-evaluation-results-OBM4623U.js} +1 -1
- package/dist/chunks/{store-harness-memory-VINCZ4GK.js → store-harness-memory-4HUEMRCD.js} +1 -1
- package/dist/chunks/{store-harness-refinement-candidates-EA5KFQPH.js → store-harness-refinement-candidates-NMRWMN23.js} +1 -1
- package/dist/chunks/store-harness-workspaces-BGONIQDY.js +2 -0
- package/dist/chunks/{store-human-review-F5KESW52.js → store-human-review-J75SIZAL.js} +1 -1
- package/dist/chunks/store-learned-preference-migration-validation-VLASM4CT.js +2 -0
- package/dist/chunks/store-learning-TUCQFBLT.js +2 -0
- package/dist/chunks/{store-learning-credentials-WZQJ4HPJ.js → store-learning-credentials-S4RF57NV.js} +1 -1
- package/dist/chunks/{store-local-experiments-HWQWNTIU.js → store-local-experiments-LULRLTII.js} +5 -5
- package/dist/chunks/{store-model-batch-review-TOCSDVAP.js → store-model-batch-review-SVL4MT6D.js} +1 -1
- package/dist/chunks/{store-model-configuration-6543ASY2.js → store-model-configuration-ZHDSM3XM.js} +2 -2
- package/dist/chunks/{store-preference-comparison-LV32MHVL.js → store-preference-comparison-YMMCKXS5.js} +1 -1
- package/dist/chunks/{store-schedules-VGTEQVKH.js → store-schedules-6Z4QS3NU.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-53B7QIGS.js → store-sidebar-file-bookmarks-MX6EP6OB.js} +2 -2
- package/dist/chunks/{store-sidebar-preferences-YXGEJVUO.js → store-sidebar-preferences-VYREPW26.js} +1 -1
- package/dist/chunks/{store-subagents-HRCAK7VZ.js → store-subagents-WGBCRALX.js} +1 -1
- package/dist/chunks/{store-task-inbox-WF74W4U2.js → store-task-inbox-43BNZSB7.js} +6 -6
- package/dist/chunks/{store-task-inventory-KHCTEZVK.js → store-task-inventory-AEW4POAJ.js} +2 -2
- package/dist/chunks/{store-taskset-drafts-3ACG5AVX.js → store-taskset-drafts-DKFO2CYB.js} +1 -1
- package/dist/chunks/{store-training-R46WOGXB.js → store-training-6PFFR6ST.js} +1 -1
- package/dist/chunks/{store-training-jobs-D4LECE7O.js → store-training-jobs-ANDEBQ67.js} +2 -2
- package/dist/chunks/{store-training-models-EQVNXOVB.js → store-training-models-OOI4ZJPX.js} +2 -2
- package/dist/chunks/{store-usage-IE2U2FD3.js → store-usage-U72RNW64.js} +1 -1
- package/dist/chunks/{store-work-evidence-QQDKM5AQ.js → store-work-evidence-NY5OBATB.js} +1 -1
- package/dist/chunks/{taskset-NR2X2UOK.js → taskset-SL3YOXW7.js} +1 -1
- package/dist/chunks/{taskset-packages-ONULEIVI.js → taskset-packages-3PCEYYDA.js} +1 -1
- package/dist/chunks/{teams-bot-CHUYMD6K.js → teams-bot-IDEF3BMI.js} +1 -1
- package/dist/chunks/{training-IDSGYGU2.js → training-57ISIC7U.js} +1 -1
- package/dist/chunks/web-search-222Y63QW.js +2 -0
- package/dist/chunks/{workspaces-2TJRDM5K.js → workspaces-5DF4H5EX.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/web/assets/{App-CaRMZoxo.css → App-DbYvV_W6.css} +1 -1
- package/dist/web/assets/{App-pcwmC4IR.js → App-nzE7JU_O.js} +4 -4
- package/dist/web/assets/{AppDialog-CdHad7GT.js → AppDialog-VtNvqbDm.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-CrmoOgd4.js → AppTerminalPanel-BMfKdrrN.js} +2 -2
- package/dist/web/assets/{AppsView-0P6cBsD4.js → AppsView-CdWyrDEb.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-Cb6edJw6.js → BrowserSidebar-CtOIciOa.js} +1 -1
- package/dist/web/assets/{CartesianChart-B2Sxi0lv.js → CartesianChart-u1lvLM30.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-PP0AIXhb.js → CollaborationTabs-CaBfDYRW.js} +1 -1
- package/dist/web/assets/{CommandMenu-GfQIMe6W.js → CommandMenu-CFW3WJ11.js} +1 -1
- package/dist/web/assets/{CommunityView-V6KmMl5n.js → CommunityView-D2EjaeuH.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-oeVeyhPX.js → ComposerCreateImproveStrip-6wYSJdzv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-CuQcvVgE.js → ConversationImportsSettings-BJ4QhF7p.js} +1 -1
- package/dist/web/assets/{GetStartedView-2oZ068h_.js → GetStartedView-DBcOwIJn.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-DLzak_Vf.js → HostedModelLearningReview-BNpK6_W9.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-Eca6Pd9R.js → HostedModelLearningSettings-SrsdeeoA.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-DsBblnMp.js → LabModelVersionDetailPage-Cd6bRHt9.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-DDknttrB.js → LabSkillSidebar-CQfvel4w.js} +1 -1
- package/dist/web/assets/{LabsRoute-CgNiUHsy.js → LabsRoute-sXLJt1KR.js} +4 -4
- package/dist/web/assets/{MainChatThread-yCVg99LU.js → MainChatThread-dlDDK2JM.js} +2 -2
- package/dist/web/assets/{MainPane-C86le7UF.js → MainPane-DCz38-qy.js} +4 -4
- package/dist/web/assets/{MarkdownText-BBVriBCj.js → MarkdownText-Drjq6-JM.js} +1 -1
- package/dist/web/assets/{NativeSkillSidebar-D2uVZkqh.js → NativeSkillSidebar-jncZijt-.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-DuD6GScJ.js → NewExperienceSwitcher-DXKzoMaM.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-B6XZkJrU.js → NewProjectDialog-DIyjAxJG.js} +1 -1
- package/dist/web/assets/{OutputsPage-PUlmcWjv.js → OutputsPage-Dy1cNr3n.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DWBRmej6.js → ProjectsPage-D2EeybIv.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-HaCVep4t.js → RightChatPanelStack-4wUL-W9_.js} +1 -1
- package/dist/web/assets/{RightSidebarHomePanel-BUtdPb2L.js → RightSidebarHomePanel-Bd_AHUp8.js} +1 -1
- package/dist/web/assets/{ScheduledWorkPage-Dg9GkGrT.js → ScheduledWorkPage-BJkSzwz2.js} +1 -1
- package/dist/web/assets/{SettingsView-DtldfnV-.js → SettingsView-BhcP72KH.js} +3 -3
- package/dist/web/assets/{TeamChatView-C71JX4je.js → TeamChatView-CR0fdicZ.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-B4F6Q36s.js → TerminalOverlay-DGrZRZ_3.js} +10 -10
- package/dist/web/assets/{TrainingCreationPanel-B9MxFzQx.js → TrainingCreationPanel-BsTG7aFS.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-7C48sHfC.js → TrainingDraftPanel-ByErrht7.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CC57FcUB.js → UsageSettingsSection-DeYTJbcM.js} +1 -1
- package/dist/web/assets/{WorkSidebarPanel-Cto1usLM.js → WorkSidebarPanel-DcNvEEoy.js} +1 -1
- package/dist/web/assets/{WorkspaceDiffPanel-CL7wi3kp.js → WorkspaceDiffPanel-CdPRcYWN.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-zdzSDofs.js → WorkspaceEnvironmentMenu-xUYg-iGn.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-CZSmjnrc.js → WorkspaceGitDialogs-CBViLL3S.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-TrUDJMKb.js → WorkspaceMonacoEditor-frxie2_S.js} +3 -3
- package/dist/web/assets/{agent-connections-4Dza2mDg.js → agent-connections-D7ao-vbU.js} +1 -1
- package/dist/web/assets/{arrow-up-right-xKb5kWQJ.js → arrow-up-right-DCWPxdbD.js} +1 -1
- package/dist/web/assets/{chunk-P3BRSSRD-BsGTkgyC.js → chunk-P3BRSSRD-B5JXa0Nh.js} +1 -1
- package/dist/web/assets/{clipboard-BgjV3aCx.js → clipboard-B-GnMVLp.js} +1 -1
- package/dist/web/assets/{cloud-upload-Bw9XUsKQ.js → cloud-upload-DpaGFZ9J.js} +1 -1
- package/dist/web/assets/{cssMode-DxsFJGb-.js → cssMode-DJHE7R3W.js} +1 -1
- package/dist/web/assets/{folder-open-CbmUjIYS.js → folder-open-B-DFLDFH.js} +1 -1
- package/dist/web/assets/{folder-plus-slsst7Ct.js → folder-plus-CPXxPvSH.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-BIS-8MuS.js → git-commit-horizontal-DCTzcivA.js} +1 -1
- package/dist/web/assets/{htmlMode-BE4VOrZo.js → htmlMode-DxZVBAYd.js} +1 -1
- package/dist/web/assets/index-BojtIRzO.css +1 -0
- package/dist/web/assets/{index-DEg0S7Qk.js → index-Di1MU6Xr.js} +2 -2
- package/dist/web/assets/{info-5bL9xSSf.js → info-BMxsR_bn.js} +1 -1
- package/dist/web/assets/{jsonMode-CYimnBhD.js → jsonMode-CzWoMkpp.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CiFuk-P7.js → lspLanguageFeatures-15K7ND6Q.js} +1 -1
- package/dist/web/assets/{minimize-2-BGVWKvTg.js → minimize-2-DwUgqXoR.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DkLVGT8N.js → monaco.contribution-BBLKjER5.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BTY4dJ0f.js → monaco.contribution-DBjvSu8p.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DUE3CQph.js → monaco.contribution-DUWvjhIG.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C7sMrcos.js → monaco.contribution-w0zfkYLX.js} +2 -2
- package/dist/web/assets/{monitor-B5hx_tzp.js → monitor-Ihu5LVYx.js} +1 -1
- package/dist/web/assets/{play-pmSO95Qg.js → play-D_YGCdxU.js} +1 -1
- package/dist/web/assets/{python-CiZvL3LX.js → python-Q4OuoXYc.js} +1 -1
- package/dist/web/assets/{save-CvYL4DUg.js → save-DJYUOhtD.js} +1 -1
- package/dist/web/assets/{square-DT_uFOml.js → square-DXtoCBNw.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-CrE1_HY0.js → toggleHighContrast-CaNeuWVE.js} +1 -1
- package/dist/web/assets/{tsMode-CI_PdZmj.js → tsMode-CJnQ2wmM.js} +1 -1
- package/dist/web/assets/{upload-PVi8vC3T.js → upload-fCP3_OEO.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-BHJNVf42.js → useLocalAgentSchedules-BFoH_gwZ.js} +1 -1
- package/dist/web/assets/{useProviderSettings-CU3zXyie.js → useProviderSettings-2eysgqiA.js} +1 -1
- package/dist/web/assets/{useSessionTurnCache-BE7cipLX.js → useSessionTurnCache-DLF5SPD-.js} +1 -1
- package/dist/web/assets/{wifi-off-7WiFuOhD.js → wifi-off-DZoiFrRz.js} +1 -1
- package/dist/web/assets/{workers-Cv8r4CvM.js → workers-D5nr74M-.js} +1 -1
- package/dist/web/assets/{yaml-Bj7mdkV2.js → yaml-CwsoTJmk.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +12 -0
- package/package.json +1 -1
- package/dist/chunks/app-server-harness-services-DDFUMNYC.js +0 -2
- package/dist/chunks/app-server-runtime-SVB6L26M.js +0 -2
- package/dist/chunks/apps-EZB56RHV.js +0 -2
- package/dist/chunks/chunk-7UH4YDA7.js +0 -3
- package/dist/chunks/chunk-CGWA54LE.js +0 -2
- package/dist/chunks/chunk-K44RHALX.js +0 -2
- package/dist/chunks/chunk-MFMYWZK2.js +0 -2
- package/dist/chunks/chunk-P2RSBSCT.js +0 -2
- package/dist/chunks/chunk-QDC4OW3S.js +0 -2
- package/dist/chunks/chunk-SF5HJ7PL.js +0 -16
- package/dist/chunks/chunk-YBT2NB32.js +0 -2
- package/dist/chunks/chunk-YCQSVHCD.js +0 -9
- package/dist/chunks/cli-5DFVQL5Y.js +0 -2
- package/dist/chunks/configuration-command-JS6U3RMC.js +0 -2
- package/dist/chunks/connected-app-executor-UBMGMV76.js +0 -2
- package/dist/chunks/connected-evidence-NLAIEVQ3.js +0 -2
- package/dist/chunks/connection-NZSD3U5O.js +0 -2
- package/dist/chunks/core-commands-U4IBRRY5.js +0 -2
- package/dist/chunks/datasets-UX47DTTB.js +0 -2
- package/dist/chunks/desktop-test-UUU7PD4P.js +0 -3
- package/dist/chunks/dist-W5MJYSPF.js +0 -2
- package/dist/chunks/evaluation-coordination-3YQN5JQW.js +0 -2
- package/dist/chunks/experiment-improvements-ZRVD2AGY.js +0 -2
- package/dist/chunks/experiments-JEB5A2N5.js +0 -2
- package/dist/chunks/help-KA4OINP5.js +0 -8
- package/dist/chunks/host-profile-evaluation-tools-2URLU5SG.js +0 -2
- package/dist/chunks/host-profile-external-dataset-B2AQNSDR.js +0 -2
- package/dist/chunks/hosted-app-server-composition-VJQ3FM4I.js +0 -2
- package/dist/chunks/hosted-harness-runtime-BM4WONJN.js +0 -2
- package/dist/chunks/hosted-profile-compiler-RKDWHYK3.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-57V24UGU.js +0 -2
- package/dist/chunks/human-review-CSYAW4PC.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-3T6E7I5Q.js +0 -2
- package/dist/chunks/local-harness-taskset-review-LQPQBALH.js +0 -2
- package/dist/chunks/opchat-6ADSONAD.js +0 -3
- package/dist/chunks/organizations-GT24ZTCN.js +0 -2
- package/dist/chunks/project-action-payload-GHSLE7K3.js +0 -2
- package/dist/chunks/project-agent-YYSQIHVE.js +0 -2
- package/dist/chunks/refiner-profile-service-ZK7KAFP5.js +0 -2
- package/dist/chunks/sandbox-command-U6346TVJ.js +0 -2
- package/dist/chunks/saved-work-SWHZ4OLO.js +0 -2
- package/dist/chunks/standalone-experiment-turn-owner-LIAQWTGI.js +0 -2
- package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +0 -2
- package/dist/chunks/store-learned-preference-migration-validation-V27XD4I7.js +0 -2
- package/dist/chunks/store-learning-WLG6KFIO.js +0 -2
- package/dist/chunks/web-search-BPON7H5N.js +0 -2
- package/dist/web/assets/index-erq7hUne.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{m as c}from"./chunk-
|
|
2
|
+
import{m as c}from"./chunk-ZR7LIMJS.js";import{a as i}from"./chunk-FTQLQJQV.js";import{access as k,readFile as m}from"node:fs/promises";import{createHash as d}from"node:crypto";import o from"node:path";import{fileURLToPath as g}from"node:url";var a="openpond-taskset-authoring",u="artifact.json",h=o.dirname(g(import.meta.url));async function P(e=process.cwd()){return(await p(e)).bundle}i(P,"loadTasksetAuthoringSkillBundle");async function p(e=process.cwd()){let s=await f(e),t=JSON.parse(await m(o.join(s,u),"utf8"));if(t.schemaVersion!==1||t.skillName!==a||!t.artifactVersion||!t.bundle||!/^[a-f0-9]{64}$/.test(t.contentHash))throw new Error("Bundled Taskset Authoring artifact is invalid.");let{contentHash:r,...n}=t;if(d("sha256").update(JSON.stringify(n)).digest("hex")!==r)throw new Error("Bundled Taskset Authoring artifact hash does not match.");for(let l of t.files)if(d("sha256").update(l.contents).digest("hex")!==l.sha256)throw new Error(`Bundled Taskset Authoring file hash does not match: ${l.path}`);return t}i(p,"loadTasksetAuthoringSkillArtifact");async function S(e=process.cwd()){let s=await f(e),t=await p(e),r=t.bundle,n=c[0];return{...n,path:o.join(s,"SKILL.md"),sourcePath:s,charCount:r.length,sourceHash:t.contentHash,validationMessages:[...n.validationMessages],resourceFiles:[...n.resourceFiles]}}i(S,"loadTasksetAuthoringProfileSkill");async function O(e=process.cwd()){let s=await S(e),t=await P(e);return{name:s.name,description:s.description,body:t,path:s.path,sourceHash:s.sourceHash,charCount:s.charCount,packagePath:s.sourcePath,resourceFiles:s.resourceFiles}}i(O,"readTasksetAuthoringProfileSkill");async function f(e=process.cwd(),s=process.execPath){let t=[process.env.OPENPOND_TASKSET_AUTHORING_SKILL_ROOT,o.resolve(e,"apps","cli","skills",a),o.resolve(e,"dist","skills",a),o.resolve(o.dirname(s),"skills",a),o.resolve(h,"skills",a),o.resolve(h,"..","skills",a)].filter(r=>!!r);for(let r of t)if(await k(o.join(r,u)).then(()=>!0,()=>!1))return r;throw new Error(`Bundled Taskset Authoring skill was not found. Checked: ${t.join(", ")}`)}i(f,"resolveTasksetAuthoringSkillRoot");export{p as a,S as b,O as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{A as me,B as Ye,D as Qe,k as Z,n as de,q as We,r as Ke,u as Je,v as Xe}from"./chunk-25JDHAZ5.js";import{C as je,Eb as Ue,F as Ve,Fb as we,Gb as Ze,Ib as Re,Kb as et,L as $e,Mb as tt,N as qe,P as Fe,U as Le,W as Oe,X as ce,a as Ae,aa as ze,c as Ce,ca as W,d as G,da as K,e as oe,ea as ke,fa as Ge,ga as Ne,ka as Q,la as D,ma as J,ua as $,xa as U}from"./chunk-XMKCCLGB.js";import{g as ie,k as N,l as p}from"./chunk-WN3V6KDN.js";import{l as De}from"./chunk-APB2STJK.js";import{ha as _e,ja as Be}from"./chunk-Y4OWBBDD.js";import{B as re,D as Ee,N as k,O as V,P as E,Q as Pe,b as se,ba as z,d as ae,lb as ve,mb as ge,n as O,nb as Me,o as X,r as F,v as ne,y as Y}from"./chunk-VYLGI3IH.js";import{Ea as Se,Ia as xe,Ja as ye,Ka as He,La as Ie,h as A,qa as te}from"./chunk-ACYFMLWG.js";import{b as w}from"./chunk-ES2ISFJC.js";import{a as S}from"./chunk-FTQLQJQV.js";var le=X.shape.id,st=w.object({schemaVersion:w.literal("openpond.modelBatchReviewInspection.v1"),packageHash:w.string().regex(/^[a-f0-9]{64}$/),definition:F,binding:Se,evidence:w.array(Y).min(1).max(1e4),decisions:w.array(Ee).min(1).max(1e4)}).strict(),be=w.object({schemaVersion:w.literal("openpond.modelBatchReviewRequest.v1"),operationId:le,modelId:le,expectedModelRevision:w.number().int().positive(),tasksetRef:X,rewardBindingRef:X.nullable(),definition:w.object({name:w.string().trim().min(1).max(500).optional(),instructions:w.string().trim().min(1).max(2e4).optional(),inputSchema:O.optional(),outputSchema:O.optional(),requiredOutputs:F.shape.requiredOutputs}).strict(),examples:w.array(w.object({evidence:X,input:O.optional(),expected:O.nullable().optional(),evaluatorContext:O.nullable().optional(),proposedTarget:O.nullable().optional()}).strict()).max(1e4)}).strict(),at=w.object({schemaVersion:w.literal("openpond.modelBatchReviewReceipt.v1"),operationId:le,modelId:le,source:ne,evidence:w.array(Y).min(1).max(1e4),proposals:w.array(re).max(1e4)}).strict();function mt(s){let e=D(s.source),t=D(s.edited),a=s.preparation;if(a.authoringGraph!=="bound"||!e.modelResources||e.learningResources||t.modelResources||t.learningResources)throw new Error("Bound task editing requires its source Reward and an ordinary edited workspace.");if(e.contentHash!==a.sourcePackageHash||!V(k(e.taskset),a.sourceTasksetRef))throw new Error("Bound draft differs from its retained source package.");let n=S(x=>x.taskset.graders.map(j=>j.kind==="custom_verifier"?{...j,exportName:j.exportName??"verify"}:j),"normalizedGraders");if(p(n(e))!==p(n(t)))throw new Error("Edit the saved Reward in Rewards before changing this Taskset's graders.");let c=e.modelResources,m=new Map(c.assets.map(x=>[x.id,x])),h=K(t),b=K(e),u=S(x=>{let{id:j,revision:fe,contentHash:ue,metadata:he,...dt}=x,{javascriptEnvironment:bt,...Te}=he;return{...dt,metadata:{...Te,resources:Te.resources??[]}}},"environmentContent"),i=S(x=>{if(!x)return null;let{id:j,revision:fe,contentHash:ue,...he}=x.execution.javascript;return he},"javascriptContent"),R=p(u(e.environment))===p(u(t.environment))&&p(i(b))===p(i(h)),d=R?e.environment:t.environment,f=R?b:h,l=new Set([...c.assets.map(x=>x.id),...t.taskset.tasks.flatMap(x=>x.privilegedContextRef?[x.privilegedContextRef]:[]),...[t.environment.actionSchemaRef,t.environment.observationSchemaRef,t.environment.stateSchemaRef].flatMap(x=>x?[x.id]:[]),...h?.assets.map(x=>x.id)??[]]);for(let x of l){let j=t.files.find(ue=>ue.asset.id===x);if(!j)throw new Error(`Bound Taskset asset is missing: ${x}.`);let fe=new TextDecoder("utf-8",{fatal:!0}).decode(W(j));m.set(x,se.parse(E({schemaVersion:"openpond.learningTextAsset.v1",id:x,revision:1,asset:j.asset,text:fe})))}let I=Q(t),{contentHash:P,..._}=c.taskDefinition,{policy:g,environment:y,environmentRelease:C,tools:q,capabilities:r,verifierSetRelease:v}=t.taskset,T=F.parse(E({..._,instructions:I,execution:{policy:g,environment:y,environmentRelease:C,tools:q,capabilities:r,verifierSetRelease:v}})),{contentHash:M,...o}=t.taskset,H=te.parse(E({...o,tasks:t.taskset.tasks.map(x=>c.instructionMode==="per_task"?x:{...x,policyVisibleContext:{...x.policyVisibleContext,instructions:I}})})),B=ce({owner:a.lineage.owner,source:{...c,taskset:e.taskset,executionResources:{environment:e.environment,verifierSet:e.verifierSet}},rewardBinding:c.rewardBinding,rewards:c.rewards,assets:[...m.values()],edits:{taskset:H,taskDefinition:T,executionResources:{environment:d,verifierSet:t.verifierSet},...f?{execution:f.execution}:{}}}),L=Le.parse(B.taskset.metadata.modelTasksetDerivation);if(B.taskset.id!==a.tasksetId||B.taskset.revision!==a.tasksetRevision||p({...L,schemaVersion:a.lineage.schemaVersion})!==p(a.lineage))throw new Error("Bound draft differs from its retained ownership lineage.");let{taskset:pe,executionResources:it,...ct}=B;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:pe,...it,modelResources:ct,files:t.files})}S(mt,"publishBoundModelTasksetDraftPackage");function Vt(s){let e=Ce.parse(s.request),t=Ae.parse(s.owner),a=D(s.source);if(a.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(a.contentHash!==e.sourcePackageHash)throw new Error("Taskset draft source package changed.");if(a.modelResources){let b=Oe({owner:t,source:{...a.modelResources,taskset:a.taskset,executionResources:{environment:a.environment,verifierSet:a.verifierSet}},rewardBinding:a.modelResources.rewardBinding,rewards:a.modelResources.rewards,assets:a.modelResources.assets}),u=b.taskset.metadata.modelTasksetDerivation;return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${p({owner:t,operationId:e.operationId})}`,requestHash:p(e),sourcePackageHash:a.contentHash,sourceTasksetRef:k(a.taskset),tasksetId:b.taskset.id,tasksetRevision:b.taskset.revision,lineage:{...u,schemaVersion:"openpond.modelTasksetAuthoring.v1"},authoringGraph:"bound"})}let n=Ne(a.taskset),c=n&&p(n.owner)===p(t),m=c?n.root:k(a.taskset),h={schemaVersion:"openpond.modelTasksetAuthoring.v1",owner:t,root:m,parent:k(a.taskset)};return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${p({owner:t,operationId:e.operationId})}`,requestHash:p(e),sourcePackageHash:a.contentHash,sourceTasksetRef:k(a.taskset),tasksetId:Ge(h),tasksetRevision:c?a.taskset.revision+1:1,lineage:h})}S(Vt,"prepareModelTasksetDraft");function lt(s){let e=G.parse(s.preparation);if(!V(e.sourceTasksetRef,e.lineage.parent))throw new Error("Taskset draft preparation differs from its source lineage.");if(e.authoringGraph==="bound"){if(!s.source)throw new Error("Bound Taskset authoring requires its retained source package.");return mt({preparation:e,source:s.source,edited:s.edited})}let t=pt(s.edited),{contentHash:a,...n}=t.verifierSet,c=Be({...n,id:`${e.tasksetId}-verifiers`,revision:e.tasksetRevision,calibrationReceiptRefs:[],metadata:{sourceVerifierSet:k(t.verifierSet)}}),{contentHash:m,...h}=t.taskset,b=te.parse(E({...h,id:e.tasksetId,revision:e.tasksetRevision,verifierSetRelease:{id:c.id,contentHash:c.contentHash},metadata:{modelTasksetAuthoring:e.lineage,...t.taskset.metadata.environmentResources===void 0?{}:{environmentResources:t.taskset.metadata.environmentResources},...t.taskset.metadata.ordinaryAuthoring===void 0?{}:{ordinaryAuthoring:t.taskset.metadata.ordinaryAuthoring}}})),u=K(t),i=u?[...t.files.filter(R=>R.asset.id!==Fe(t.taskset)),ke({...u.execution,verifierSet:c})]:t.files;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:b,environment:t.environment,verifierSet:c,files:i})}S(lt,"publishModelTasksetDraftPackage");function pt(s){let e=D(s);if(e.modelResources||e.learningResources)throw new Error("This Taskset requires its bound or reviewed authoring workflow.");return e}S(pt,"requireOrdinaryPackage");function ft(s,e,t,a){if(s.environment.entrypoint!=="openpond.javascript-environment.v1")return{taskset:s,inventory:t,generatedFiles:[]};let n="environment/execution.json",c=e.get(n);if(!c||c.length>524288)throw new Error("Authored tool environment requires its bounded private execution declaration.");let m=qe.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(c))),h=S(_=>{if(!_)return null;let g=t.find(y=>y.asset.id===_.id&&y.asset.path===_.path);if(!g)throw new Error(`Authored environment dependency is missing: ${_.id}.`);return g.asset},"repin"),{contentHash:b,...u}=m.javascript,i=De.parse(E({...u,id:`javascript-${s.id}`,revision:s.revision,module:h(m.javascript.module)}));if(p(i.tools)!==p(s.environment.metadata.portableTools)||p(i.tools.map(_=>_.name))!==p(s.environment.toolNames))throw new Error("Authored environment tools differ from the Taskset's declared tools.");let R=_e({schemaVersion:"openpond.environmentRelease.v1",id:`environment-${s.id}`,revision:s.revision,contract:et(s),actionSchemaRef:h(m.environment.actionSchemaRef),observationSchemaRef:h(m.environment.observationSchemaRef),stateSchemaRef:h(m.environment.stateSchemaRef),artifactCollection:m.environment.artifactCollection,adapterConformanceHashes:{},metadata:{javascriptEnvironment:k(i),resources:s.environment.resources??[]}}),d=$.parse({...s,environment:{...s.environment,metadata:{...s.environment.metadata,portableExecutionResources:{environment:R}}}}),f=Re({taskset:d,adapterId:a}),l=ke({javascript:i,environment:R,verifierSet:f.verifierSetRelease}),I=[...t.filter(_=>_.sourcePath!==n),{asset:l.asset,sourcePath:n}],P=$.parse({...d,metadata:{...d.metadata,portableFileInventory:I}});return{taskset:$.parse({...P,contentHash:U(P)}),inventory:I,generatedFiles:[{path:n,role:"environment",content:new TextDecoder().decode(W(l))}]}}S(ft,"prepareAuthoredToolEnvironment");var ee=w.array(w.object({asset:ie,sourcePath:w.string().min(1)}).strict()).max(1e4),ut=new Set(["taskset.json","capabilities.json","data/tasks.jsonl","graders/graders.json","fixtures/grader-fixtures.json","environment/taskset.ts"]);function ht(s){return ut.has(s)}S(ht,"isGeneratedTasksetPublicationFilePath");function vt(s,e,t){let a=$.parse(s);if(a.metadata.taskDefinition!==void 0||a.metadata.rewardBinding!==void 0)return{taskset:a,generatedFiles:[]};let n=new Map,c=0;for(let[r,v]of e){if(oe.parse(r),c+=v.byteLength,n.size>=1e4||c>ze*3/4)throw new Error("Taskset source exceeds the package byte limit.");n.set(r,v.slice())}let m=a.metrics?.customAggregator,h=m?n.get(m.module):void 0;if(m&&!h)throw new Error("Declared Taskset metric module is missing.");let b=m&&h?{...a.metrics,customAggregator:{...m,contentHash:N(h)}}:a.metrics,u=new Map,i=new Set,R=[],d=S((r,v,T,M)=>{let o=n.get(v);if(!o)throw new Error(`Declared Taskset file is missing: ${v}.`);return{id:r,path:v,contentHash:N(o),sizeBytes:o.byteLength,mediaType:T,visibility:M}},"ref"),f=S((r,v=r.path)=>{let T=u.get(r.id);if(T&&p(T)!==p({asset:r,sourcePath:v}))throw new Error(`Conflicting Taskset file identity: ${r.id}.`);let M=n.get(v);if(!M||M.length!==r.sizeBytes||N(M)!==r.contentHash)throw new Error(`Taskset file differs from its declared bytes: ${r.id}.`);u.set(r.id,{asset:r,sourcePath:v}),i.add(v)},"add");for(let r of a.tasks){let v=tt(r);for(let T of v.artifactRefs)f(T,r.assets?.find(M=>M.id===T.id)?.artifactRef??T.path);for(let T of v.requiredOutputs??[])T.schemaRef&&f(T.schemaRef)}for(let r of a.environment.resources??[])f(d(r.id,r.path,r.mediaType??"application/octet-stream",r.visibility==="policy_visible"?"policy":"host_private"));let l=a.graders.map(r=>{if(r.kind==="custom_verifier"){let v=d(`verifier-${r.id}`,r.module,"application/javascript","host_private"),T=ie.safeParse(r.metadata.portableVerifierRef);return T.success&&T.data.contentHash===v.contentHash&&T.data.sizeBytes===v.sizeBytes&&(v=T.data),f(v,r.module),{...r,metadata:{...r.metadata,portableVerifierRef:v}}}if(r.kind==="human"||r.kind==="model_judge"){let v=new TextEncoder().encode(r.rubric),T=`graders/rubric-${N(v)}.md`;n.set(T,v);let M=d(`rubric-${r.id}`,T,"text/markdown","verifier"),o=ie.safeParse(r.metadata.portableRubricRef);if(o.success&&o.data.contentHash===M.contentHash&&o.data.sizeBytes===M.sizeBytes){if(o.data.visibility==="policy")throw new Error("A grader rubric cannot become policy-visible.");M=o.data}return f(M,T),R.push({path:T,role:"verifier",content:r.rubric}),{...r,metadata:{...r.metadata,portableRubricRef:M}}}return r});m&&![...u.values()].some(r=>r.asset.path===m.module&&r.sourcePath===m.module&&r.asset.visibility!=="policy")&&f(d(`metric-${p(m.module)}`,m.module,"application/javascript","host_private"));let I=ee.parse(a.metadata.portableFileInventory??[]);for(let r of[...n.keys()].sort())if(!i.has(r)){let v=I.find(T=>T.sourcePath===r&&!u.has(T.asset.id));f(v?{...d(v.asset.id,r,v.asset.mediaType,v.asset.visibility),path:v.asset.path}:d(`taskset-file-${p(r)}`,r,"application/octet-stream","host_private"),r)}let{importedPackageHash:P,derivedPortableMetadata:_,...g}=a.metadata,y={...a.environment.metadata};if(y.portableExecutionResources!==void 0){let r=w.object({environment:w.unknown(),verifierSet:w.unknown().optional()}).parse(y.portableExecutionResources);y.portableExecutionResources={environment:r.environment}}let C=$.parse({...a,graders:l,metrics:b,environment:{...a.environment,metadata:y},metadata:{...g,...P===void 0?{}:{sourceImportedPackageHash:P},portableFileInventory:ee.parse([...u.values()].sort((r,v)=>r.asset.id.localeCompare(v.asset.id)))}}),q=ft(C,n,[...u.values()],t);return{taskset:$.parse({...q.taskset,contentHash:U(q.taskset)}),generatedFiles:[...R,...q.generatedFiles]}}S(vt,"prepareAuthoredTasksetSource");function gt(s){let e=Xe(s.workspace),t=s.preparation===null?null:G.parse(s.preparation);if(t?e.draft.id!==t.draftId||e.draft.modelScope?.modelId!==t.lineage.owner.modelId||e.draft.profileId!==t.lineage.owner.scopeId||p(e.draft.modelScope?.source??null)!==p(t):e.draft.modelScope?.source!==void 0)throw new Error("Taskset draft differs from its retained source preparation.");let a=Qe({draft:e.draft,now:e.draft.updatedAt,sourcePackageHash:e.contentHash}),n=new Map(e.files.map(u=>[u.path,me(u)]));for(let[u,i]of Ke(e.draft))ht(u)||n.set(u,new TextEncoder().encode(i));let c=vt(a,n,s.adapterId);for(let u of c.generatedFiles)n.set(u.path,new TextEncoder().encode(u.content));let m=Re({taskset:c.taskset,adapterId:s.adapterId}),h=ee.parse(c.taskset.metadata.portableFileInventory),b=J({schemaVersion:"openpond.tasksetPackage.v1",taskset:m.tasksetRelease,environment:m.environmentRelease,verifierSet:m.verifierSetRelease,files:h.map(u=>{let i=n.get(u.sourcePath);if(!i)throw new Error(`Captured Taskset file is missing: ${u.sourcePath}.`);return{asset:u.asset,base64:Buffer.from(i).toString("base64")}})});return t?lt({preparation:t,edited:b,source:s.source}):b}S(gt,"compileTasksetDraftWorkspace");function Ot(s){if(!s.workspace.draft.modelScope)throw new Error("Taskset draft requires a Model owner.");return gt(s)}S(Ot,"compileModelTasksetDraftWorkspace");function es(s){let e=D(s.source);if(e.modelResources||e.learningResources)throw new Error("Binding an ordinary Reward requires an ordinary source package.");let t=Q(e);if(!t.trim())throw new Error("Add collection instructions before selecting a saved Reward.");let a=new Map,n=K(e);for(let g of n?.assets??[])a.set(g.id,g);let c=new Set([...e.taskset.tasks.flatMap(g=>g.privilegedContextRef?[g.privilegedContextRef]:[]),...[e.environment.actionSchemaRef,e.environment.observationSchemaRef,e.environment.stateSchemaRef].flatMap(g=>g?[g.id]:[])]);for(let g of c){if(a.has(g))continue;let y=e.files.find(q=>q.asset.id===g);if(!y)throw new Error(`Source Taskset context is missing: ${g}.`);let C=new TextDecoder("utf-8",{fatal:!0}).decode(W(y));a.set(g,se.parse(E({schemaVersion:"openpond.learningTextAsset.v1",id:g,revision:1,asset:y.asset,text:C})))}for(let g of s.assets){let y=e.files.find(C=>C.asset.id===g.id);if(y&&E({asset:y.asset}).contentHash!==E({asset:g.asset}).contentHash)throw new Error(`Selected Reward conflicts with a source asset: ${g.id}.`);a.set(g.id,g)}let{policy:m,environment:h,environmentRelease:b,tools:u,capabilities:i,verifierSetRelease:R}=e.taskset,d=F.parse(E({schemaVersion:"openpond.taskDefinition.v1",id:`${e.taskset.id}-definition`,revision:1,name:e.taskset.id,description:"",instructions:t,category:"custom",familyNamespace:e.taskset.id,inputSchema:{type:"object"},outputSchema:{type:"object"},rewardBinding:k(s.rewardBinding),harness:null,execution:{policy:m,environment:h,environmentRelease:b,tools:u,capabilities:i,verifierSetRelease:R}})),f=ce({...s,assets:[...a.values()],source:{taskset:e.taskset,taskDefinition:d,instructionMode:"per_task",executionResources:{environment:e.environment,verifierSet:e.verifierSet},...n?{execution:n.execution}:{}}}),l=new Map(e.files.map(g=>[g.asset.id,g]));for(let g of f.assets){let y="";for(let C of new TextEncoder().encode(g.text))y+=String.fromCharCode(C);l.set(g.id,{asset:g.asset,base64:btoa(y)})}let{taskset:I,executionResources:P,..._}=f;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:I,...P,modelResources:_,files:[...l.values()]})}S(es,"bindOrdinaryModelTasksetReward");function kt(s){let{request:e,package:t}=s,a=t.learningResources;if(!a)throw new A("model_review_batch_required",422);let n=z(t.taskset),c=`model-review-${p([s.scope,e.modelId,e.operationId])}`,m=new Map(e.examples.map(o=>[p(o.evidence),o])),h=new Set(a.evidence.map(o=>p(k(o)))),b=new Map(a.decisions.map(o=>[p(o.evidence),o]));if(m.size!==e.examples.length||e.examples.some(o=>!h.has(p(o.evidence))))throw new A("model_review_evidence_mismatch",409);for(let o of[s.binding,...s.rewards,...s.assets])Pe(o);He(s.binding,s.rewards);let u=new Map;for(let o of s.binding.sources){let H=s.rewards.find(pe=>V(k(pe),o.reward)),{contentHash:B,...L}=H;u.set(H.contentHash,xe({...L,id:`${c}-reward-${H.contentHash}`,revision:1}))}let i=[...u.values()],{contentHash:R,recipeRef:d,...f}=s.binding,l=ye({...f,id:`${c}-binding`,revision:1,sources:s.binding.sources.map(o=>({...o,reward:k(u.get(o.reward.contentHash))}))},i),I=i.flatMap(o=>[...o.assets,..."verifierRef"in o.implementation?[o.implementation.verifierRef]:[],..."rubricRef"in o.implementation?[o.implementation.rubricRef]:[],..."inputContract"in o.implementation?[o.implementation.inputContract]:[]]),P=[...new Map(I.map(o=>{let H=s.assets.find(B=>B.id===o.id);if(!H)throw new A("model_review_reward_asset_missing",422);if(ae(H,o),o.visibility==="policy")throw new A("reward_asset_visibility_invalid",422);return[H.id,H]})).values()],{environmentRelease:_,verifierSetRelease:g,...y}=n.definition.execution,{contentHash:C,...q}=n.definition,r=F.parse(E({...q,...e.definition,id:`${c}-definition`,revision:1,rewardBinding:k(l),execution:{...y,policy:{...y.policy,hiddenGraderRefs:Ie(l,i).filter(o=>o.privileged).map(o=>o.id)}}})),v=ne.parse(E({schemaVersion:"openpond.learningSource.v1",id:c,revision:1,name:`${r.name} review`,kind:"direct",taskDefinition:k(r),enabled:!0,allowedSplits:[...new Set(a.evidence.map(o=>o.submission.split))],mapping:null,adapterVersion:null,reviewOrigin:{modelId:e.modelId,packageHash:t.contentHash,taskset:k(t.taskset),batch:k(a.batch),rewardBinding:k(s.binding)}})),T=a.evidence.map(o=>{let H=m.get(p(k(o))),B=`review-${o.contentHash}`,L=p({instructions:r.instructions,inputSchema:r.inputSchema,outputSchema:r.outputSchema,requiredOutputs:r.requiredOutputs??[],input:H?.input??o.submission.input})!==p({instructions:n.definition.instructions,inputSchema:n.definition.inputSchema,outputSchema:n.definition.outputSchema,requiredOutputs:n.definition.requiredOutputs??[],input:o.submission.input});return Y.parse(E({schemaVersion:"openpond.taskEvidence.v1",id:Me(v.id,o.submission.exampleId,B),revision:1,source:k(v),submission:{...o.submission,sourceId:v.id,taskDefinition:k(r),attemptId:B,observedOutput:L?null:o.submission.observedOutput,idempotencyKey:`${c}-${o.contentHash}`,...H?.input===void 0?{}:{input:H.input},...H?.expected===void 0?{}:{expected:H.expected},...H?.evaluatorContext===void 0?{}:{evaluatorContext:H.evaluatorContext}},supersedes:k(o),correctionFeedbackId:null,receivedAt:s.now}))}),M=T.flatMap(o=>{let H=m.get(p(o.supersedes)),B=b.get(p(o.supersedes)),L=H?.proposedTarget===void 0?B.approvedTarget:H.proposedTarget;return L===null?[]:[re.parse({schemaVersion:"openpond.taskFeedbackRecord.v1",id:`feedback-${p([c,o.id])}`,revision:1,submission:{schemaVersion:"openpond.taskFeedback.v1",sourceId:v.id,idempotencyKey:`${c}-${o.id}`,exampleId:o.submission.exampleId,attemptId:o.submission.attemptId,expectedEvidenceHash:o.contentHash,occurredAt:s.now,kind:"target_correction",value:L,note:"Proposed target for the revised task. Grade and review before admission."},status:"pending_review",evidence:k(o),createdAt:s.now,review:null})]});return{source:v,definition:r,binding:l,rewards:i,assets:P,evidence:T,proposals:M}}S(kt,"prepareModelBatchReview");var nt=S(s=>`model-batch-review-${p([s.modelId,s.operationId])}`,"operation");function rs(s){let e=D(s);if(!e.learningResources)throw new A("model_review_batch_required",422);let t=z(e.taskset);return st.parse({schemaVersion:"openpond.modelBatchReviewInspection.v1",packageHash:e.contentHash,definition:t.definition,binding:t.binding,evidence:e.learningResources.evidence,decisions:e.learningResources.decisions})}S(rs,"inspectModelBatchPackage");async function wt(s,e){let t=be.parse(e),a=await s.operation(nt(t));if(!a)return null;if(a.requestHash!==p(t))throw new A("learning_idempotency_conflict",409);return rt(s,t,a.resources)}S(wt,"findModelBatchReview");async function os(s,e){let t=be.parse(e.request),a=await wt(s,t);if(a)return a;let n=D(e.package);if(!n.learningResources)throw new A("model_review_batch_required",422);let c=z(n.taskset),m=t.rewardBindingRef,h=!m||V(m,k(c.binding)),b=h?c.binding:await ge(s,"binding",m),u=h?c.rewards:await Promise.all(b.sources.map(l=>ge(s,"reward",l.reward))),i=new Set(u.flatMap(l=>[...l.assets,..."verifierRef"in l.implementation?[l.implementation.verifierRef]:[],..."rubricRef"in l.implementation?[l.implementation.rubricRef]:[],..."inputContract"in l.implementation?[l.implementation.inputContract]:[]]).map(l=>l.id)),R=h?n.learningResources.assets:await Promise.all([...i].map(l=>ve(s,"asset",l,1))),d=kt({...e,request:t,package:n,binding:b,rewards:u,assets:R}),f=[];for(let l of d.assets){let I=await s.get("asset",l.id,1);if(I&&I.contentHash!==l.contentHash)throw new A("model_review_asset_conflict",409);I||await s.put("asset",l,0)}for(let l of d.rewards)await s.put("reward",l,0);await s.put("binding",d.binding,0),await s.put("definition",d.definition,0),await s.put("source",d.source,0,{parentId:t.modelId}),f.push({kind:"source",id:d.source.id,revision:1});for(let l of d.evidence)await s.put("evidence",l,0,{parentId:d.source.id}),f.push({kind:"evidence",id:l.id,revision:1});for(let l of d.proposals)await s.put("feedback",l,0,{parentId:l.evidence.id,status:l.status}),f.push({kind:"feedback",id:l.id,revision:1});return await s.saveOperation(nt(t),{requestHash:p(t),resources:f}),rt(s,t,f)}S(os,"beginModelBatchReview");async function rt(s,e,t){let a=await Promise.all(t.map(n=>ve(s,n.kind,n.id,n.revision)));return at.parse({schemaVersion:"openpond.modelBatchReviewReceipt.v1",operationId:e.operationId,modelId:e.modelId,source:a.find(n=>n.schemaVersion==="openpond.learningSource.v1"),evidence:a.filter(n=>n.schemaVersion==="openpond.taskEvidence.v1"),proposals:a.filter(n=>n.schemaVersion==="openpond.taskFeedbackRecord.v1")})}S(rt,"readReceipt");function cs(s){let e=D(s.package),t=e.taskset,a=e.modelResources,n=e.learningResources?z(t):void 0,c=je.parse({schemaVersion:"openpond.uploadedFileDatasetSource.v1",kind:"uploaded_file",id:`package-source-${p({profileId:s.profileId,packageHash:e.contentHash})}`,profileId:s.profileId,title:s.name,sourceHash:e.contentHash,occurredAt:s.createdAt,licensingStatus:"pending",secretScanStatus:"pending",piiScanStatus:"pending",originalFileNames:["taskset-package.json"],mediaTypes:["application/json"],sourceFileHashes:[e.contentHash],totalBytes:new TextEncoder().encode(JSON.stringify(e)).byteLength,parserVersion:"openpond.tasksetPackage.v1",metadata:{}}),m=Ye({profileId:s.profileId,id:`${t.id}-import`,name:s.name,now:s.createdAt}),h=[];for(let d of t.graders)if(d.kind==="custom_verifier"){let f=a?.assets.find(P=>P.id===d.verifierRef.id),l=e.files.find(P=>P.asset.id===d.verifierRef.id);if(!l)throw new Error(`Imported verifier source is missing: ${d.id}.`);let I=Ze(d.verifierRef.contentHash);h.some(P=>P.path===I)||h.push({path:I,role:"verifier",content:f?ae(f,d.verifierRef):new TextDecoder("utf-8",{fatal:!0}).decode(W(l))})}let b=t.metadata.ordinaryAuthoring??t.metadata.starterAuthoring,u=$e.array().max(1e5).parse(b?.graderFixtures??[]),i=t.environment.kind==="text"?"chat":t.environment.kind==="custom_program"?"program":t.environment.kind,R=$.parse({schemaVersion:"openpond.taskset.v1",id:t.id,revision:t.revision,profileId:s.profileId,profileRelease:null,createImproveRunId:null,name:s.name,objective:Q(e),status:"needs_review",sourceRefs:[c],datasetArtifact:null,policy:t.policy,environment:{...m.environment,kind:i,entrypoint:t.environment.entrypoint,resources:Ve.array().max(1e4).parse(t.metadata.environmentResources??[]),stateful:t.environment.stateful,deterministicSeeds:t.environment.deterministicSeeds,toolNames:t.tools.map(d=>d.name),defaultTimeoutMs:t.environment.defaultTimeoutMs,networkPolicy:t.environment.networkPolicy,metadata:{runtimeSourceTasksetId:Rt(s.profileId,e.contentHash),portableEnvironment:t.environment,portableTools:t.tools,portableExecutionResources:{environment:e.environment,verifierSet:e.verifierSet}}},capabilities:{...m.capabilities,taskKind:i==="chat"?"chat":i==="program"?"custom_program":"single_agent",compatibleMethods:["none"],requiresTools:t.tools.length>0,requiresState:t.environment.stateful,rewardKinds:[...new Set(t.graders.map(d=>d.kind==="human"?"human":d.kind==="model_judge"?"model_judge":"deterministic"))]},tasks:t.tasks.map(d=>({...d,schemaVersion:"openpond.taskData.v1",sourceRefs:[c.id],assets:d.artifactRefs.map(f=>({id:f.id,sourceRefId:c.id,artifactRef:f.path,fileName:f.path.split("/").at(-1),mediaType:f.mediaType,sha256:f.contentHash,sizeBytes:f.sizeBytes,split:d.split,metadata:{portableAsset:f}})),...d.requiredOutputs?{requiredOutputs:d.requiredOutputs.map(f=>({...f,schemaRef:f.schemaRef?.id??null,maxBytes:f.maxBytes??void 0}))}:{},metadata:{portableTaskRecord:d,exampleOrigin:"imported"}})),graders:a?we(a.rewardBinding,a.rewards,a.assets):n?we(n.binding,n.rewards,e.learningResources.assets):Ue(e),graderFixtures:u,learningSignals:m.learningSignals,...t.metrics?{metrics:t.metrics}:{},authoringProvenance:{schemaVersion:"openpond.taskAuthoringProvenance.v1",model:null,modelConfig:{},skillHash:p("openpond-package-import-v1"),promptTemplateVersion:"package-import-v1",buildIntent:"discovery",buildSpecification:null,evidenceHashes:[e.contentHash],tasksetSdkVersion:"package-import-v1",sourceCommit:null,repairHistory:[],createdAt:s.createdAt},readiness:null,contentHash:"00000000",createdAt:s.createdAt,updatedAt:s.createdAt,metadata:{importedPackageHash:e.contentHash,tasksetOutputContract:t.metadata.tasksetOutputContract??null,...n?{learning:n}:{},portableFileInventory:e.files.map(d=>({asset:d.asset,sourcePath:d.asset.path})),...a?{taskDefinition:k(a.taskDefinition),rewardBinding:k(a.rewardBinding),rewardExecution:{binding:a.rewardBinding,rewards:a.rewards}}:{},portableCapabilities:t.capabilities,derivedPortableMetadata:t.metadata,...t.metadata.modelTasksetDerivation?{modelTasksetDerivation:t.metadata.modelTasksetDerivation}:{}}});return{package:e,taskset:$.parse({...R,contentHash:U(R)}),generatedFiles:h}}S(cs,"prepareImportedTasksetPackage");function Rt(s,e){return`package-${p({profileId:s,packageHash:e})}`}S(Rt,"tasksetPackageSourceId");var ot=w.object({draft:Z,filePaths:w.array(w.object({assetId:w.string().min(1),paths:w.array(oe).min(1).max(1e4)}).strict()).max(1e4)}).strict();function ls(s){let e=D(s.source),t=Z.parse(s.sourceDraft),a=G.parse(s.preparation);if(e.contentHash!==a.sourcePackageHash||!V(k(e.taskset),a.sourceTasksetRef))throw new Error("Taskset draft preparation differs from its source package.");if(e.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(!!e.modelResources!=(a.authoringGraph==="bound"))throw new Error("Taskset draft authoring graph differs from its source.");let n=ee.parse(t.metadata.portableFileInventory??[]),c=S(i=>de(i)?`source-artifacts/${e.contentHash}/${p(i)}/${i.split("/").at(-1)}`:i,"sourcePath");if([...t.tasks.flatMap(i=>(i.assets??[]).map(R=>R.artifactRef)),...(t.environment.resources??[]).map(i=>i.path),...e.taskset.tasks.flatMap(i=>(i.requiredOutputs??[]).flatMap(R=>R.schemaRef?[R.schemaRef.path]:[])),...t.metrics.customAggregator?[t.metrics.customAggregator.module]:[],...t.graders.flatMap(i=>i.kind==="custom_verifier"?[i.module]:[])].some(de))throw new Error("A referenced source asset occupies a reserved Taskset authoring path.");let h=e.files.map(i=>{let R=new Set([i.asset.path]);for(let d of n)d.asset.id===i.asset.id&&R.add(d.sourcePath);for(let d of t.tasks)for(let f of d.assets??[])f.id===i.asset.id&&R.add(f.artifactRef);for(let d of e.taskset.graders)if(d.kind==="custom_verifier"&&d.verifierRef.id===i.asset.id){let f=t.graders.find(l=>l.id===d.id);f?.kind==="custom_verifier"&&R.add(f.module)}return{assetId:i.asset.id,paths:[...R].map(c)}}),b={...t.metadata};if(e.modelResources)for(let i of["taskDefinition","rewardBinding","rewardExecution","derivedPortableMetadata","modelTasksetDerivation","importedPackageHash"])delete b[i];let u=Z.parse({...t,id:a.draftId,revision:1,status:"draft",graders:t.graders.map(i=>({...i,metadata:{...i.metadata,portableGrader:e.taskset.graders.find(R=>R.id===i.id)}})),environment:{...t.environment,metadata:{...t.environment.metadata,portableExecutionResources:{environment:e.environment}}},modelScope:{modelId:a.lineage.owner.modelId,expectedModelRevision:s.expectedModelRevision,source:a},publishedTasksetRef:a.tasksetRevision>1?a.sourceTasksetRef:null,metadata:{...b,modelTasksetAuthoring:a.lineage,portableFileInventory:n.map(i=>({...i,sourcePath:c(i.sourcePath),asset:{...i.asset,id:de(i.sourcePath)?`source-artifact-${p({packageHash:e.contentHash,assetId:i.asset.id})}`:i.asset.id,path:c(i.asset.path)}}))}});return ot.parse({draft:u,filePaths:h})}S(ls,"prepareTasksetDraftSource");function ps(s){let e=ot.parse(s.initialized),t=D(s.source);if(e.draft.modelScope?.source?.sourcePackageHash!==t.contentHash)throw new Error("Taskset draft lost its source preparation.");let a=new Map;for(let c of e.filePaths){let m=t.files.find(h=>h.asset.id===c.assetId);if(!m)throw new Error("Taskset draft source asset is missing.");for(let h of c.paths){let b=a.get(h);if(b&&b.contentHash!==m.asset.contentHash)throw new Error("Taskset draft source paths conflict.");a.set(h,{path:h,contentHash:m.asset.contentHash,sizeBytes:m.asset.sizeBytes,base64:m.base64})}}for(let c of We(e.draft))if(!a.has(c.relativePath)){let m=new TextEncoder().encode(c.source);a.set(c.relativePath,{path:c.relativePath,contentHash:N(m),sizeBytes:m.byteLength,base64:Buffer.from(m).toString("base64")})}let n=e.draft;if(n.metrics.customAggregator){let c=a.get(n.metrics.customAggregator.module);if(!c)throw new Error("Declared Taskset metric module is missing.");me(c),n=Z.parse({...n,metrics:{...n.metrics,customAggregator:{...n.metrics.customAggregator,contentHash:c.contentHash}}})}return Je({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:n,files:[...a.values()]})}S(ps,"materializeTasksetDraftWorkspace");export{st as a,be as b,at as c,Vt as d,lt as e,ee as f,ht as g,vt as h,Ot as i,es as j,rs as k,wt as l,os as m,cs as n,Rt as o,ot as p,ls as q,ps as r};
|
|
2
|
+
import{A as me,B as Ye,D as Qe,k as Z,n as de,q as We,r as Ke,u as Je,v as Xe}from"./chunk-637UACKH.js";import{C as je,Eb as Ue,F as Ve,Fb as we,Gb as Ze,Ib as Re,Kb as et,L as $e,Mb as tt,N as qe,P as Fe,U as Le,W as Oe,X as ce,a as Ae,aa as ze,c as Ce,ca as W,d as G,da as K,e as oe,ea as ke,fa as Ge,ga as Ne,ka as Q,la as D,ma as J,ua as $,xa as U}from"./chunk-A66CSUBJ.js";import{g as ie,k as N,l as p}from"./chunk-SPDSSMFD.js";import{l as De}from"./chunk-2SUMZ73C.js";import{ha as _e,ja as Be}from"./chunk-M55H7KVR.js";import{B as re,D as Ee,N as k,O as V,P as E,Q as Pe,b as se,ba as z,d as ae,lb as ve,mb as ge,n as O,nb as Me,o as X,r as F,v as ne,y as Y}from"./chunk-SFNCAPCJ.js";import{Ba as te,Pa as Se,Ta as xe,Ua as ye,Va as He,Wa as Ie,h as A}from"./chunk-RCA6NGVA.js";import{A as w}from"./chunk-PF56N7ZY.js";import{a as S}from"./chunk-FTQLQJQV.js";var le=X.shape.id,st=w.object({schemaVersion:w.literal("openpond.modelBatchReviewInspection.v1"),packageHash:w.string().regex(/^[a-f0-9]{64}$/),definition:F,binding:Se,evidence:w.array(Y).min(1).max(1e4),decisions:w.array(Ee).min(1).max(1e4)}).strict(),be=w.object({schemaVersion:w.literal("openpond.modelBatchReviewRequest.v1"),operationId:le,modelId:le,expectedModelRevision:w.number().int().positive(),tasksetRef:X,rewardBindingRef:X.nullable(),definition:w.object({name:w.string().trim().min(1).max(500).optional(),instructions:w.string().trim().min(1).max(2e4).optional(),inputSchema:O.optional(),outputSchema:O.optional(),requiredOutputs:F.shape.requiredOutputs}).strict(),examples:w.array(w.object({evidence:X,input:O.optional(),expected:O.nullable().optional(),evaluatorContext:O.nullable().optional(),proposedTarget:O.nullable().optional()}).strict()).max(1e4)}).strict(),at=w.object({schemaVersion:w.literal("openpond.modelBatchReviewReceipt.v1"),operationId:le,modelId:le,source:ne,evidence:w.array(Y).min(1).max(1e4),proposals:w.array(re).max(1e4)}).strict();function mt(s){let e=D(s.source),t=D(s.edited),a=s.preparation;if(a.authoringGraph!=="bound"||!e.modelResources||e.learningResources||t.modelResources||t.learningResources)throw new Error("Bound task editing requires its source Reward and an ordinary edited workspace.");if(e.contentHash!==a.sourcePackageHash||!V(k(e.taskset),a.sourceTasksetRef))throw new Error("Bound draft differs from its retained source package.");let n=S(x=>x.taskset.graders.map(j=>j.kind==="custom_verifier"?{...j,exportName:j.exportName??"verify"}:j),"normalizedGraders");if(p(n(e))!==p(n(t)))throw new Error("Edit the saved Reward in Rewards before changing this Taskset's graders.");let c=e.modelResources,m=new Map(c.assets.map(x=>[x.id,x])),h=K(t),b=K(e),u=S(x=>{let{id:j,revision:fe,contentHash:ue,metadata:he,...dt}=x,{javascriptEnvironment:bt,...Te}=he;return{...dt,metadata:{...Te,resources:Te.resources??[]}}},"environmentContent"),i=S(x=>{if(!x)return null;let{id:j,revision:fe,contentHash:ue,...he}=x.execution.javascript;return he},"javascriptContent"),R=p(u(e.environment))===p(u(t.environment))&&p(i(b))===p(i(h)),d=R?e.environment:t.environment,f=R?b:h,l=new Set([...c.assets.map(x=>x.id),...t.taskset.tasks.flatMap(x=>x.privilegedContextRef?[x.privilegedContextRef]:[]),...[t.environment.actionSchemaRef,t.environment.observationSchemaRef,t.environment.stateSchemaRef].flatMap(x=>x?[x.id]:[]),...h?.assets.map(x=>x.id)??[]]);for(let x of l){let j=t.files.find(ue=>ue.asset.id===x);if(!j)throw new Error(`Bound Taskset asset is missing: ${x}.`);let fe=new TextDecoder("utf-8",{fatal:!0}).decode(W(j));m.set(x,se.parse(E({schemaVersion:"openpond.learningTextAsset.v1",id:x,revision:1,asset:j.asset,text:fe})))}let I=Q(t),{contentHash:P,..._}=c.taskDefinition,{policy:g,environment:y,environmentRelease:C,tools:q,capabilities:r,verifierSetRelease:v}=t.taskset,T=F.parse(E({..._,instructions:I,execution:{policy:g,environment:y,environmentRelease:C,tools:q,capabilities:r,verifierSetRelease:v}})),{contentHash:M,...o}=t.taskset,H=te.parse(E({...o,tasks:t.taskset.tasks.map(x=>c.instructionMode==="per_task"?x:{...x,policyVisibleContext:{...x.policyVisibleContext,instructions:I}})})),B=ce({owner:a.lineage.owner,source:{...c,taskset:e.taskset,executionResources:{environment:e.environment,verifierSet:e.verifierSet}},rewardBinding:c.rewardBinding,rewards:c.rewards,assets:[...m.values()],edits:{taskset:H,taskDefinition:T,executionResources:{environment:d,verifierSet:t.verifierSet},...f?{execution:f.execution}:{}}}),L=Le.parse(B.taskset.metadata.modelTasksetDerivation);if(B.taskset.id!==a.tasksetId||B.taskset.revision!==a.tasksetRevision||p({...L,schemaVersion:a.lineage.schemaVersion})!==p(a.lineage))throw new Error("Bound draft differs from its retained ownership lineage.");let{taskset:pe,executionResources:it,...ct}=B;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:pe,...it,modelResources:ct,files:t.files})}S(mt,"publishBoundModelTasksetDraftPackage");function Vt(s){let e=Ce.parse(s.request),t=Ae.parse(s.owner),a=D(s.source);if(a.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(a.contentHash!==e.sourcePackageHash)throw new Error("Taskset draft source package changed.");if(a.modelResources){let b=Oe({owner:t,source:{...a.modelResources,taskset:a.taskset,executionResources:{environment:a.environment,verifierSet:a.verifierSet}},rewardBinding:a.modelResources.rewardBinding,rewards:a.modelResources.rewards,assets:a.modelResources.assets}),u=b.taskset.metadata.modelTasksetDerivation;return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${p({owner:t,operationId:e.operationId})}`,requestHash:p(e),sourcePackageHash:a.contentHash,sourceTasksetRef:k(a.taskset),tasksetId:b.taskset.id,tasksetRevision:b.taskset.revision,lineage:{...u,schemaVersion:"openpond.modelTasksetAuthoring.v1"},authoringGraph:"bound"})}let n=Ne(a.taskset),c=n&&p(n.owner)===p(t),m=c?n.root:k(a.taskset),h={schemaVersion:"openpond.modelTasksetAuthoring.v1",owner:t,root:m,parent:k(a.taskset)};return G.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${p({owner:t,operationId:e.operationId})}`,requestHash:p(e),sourcePackageHash:a.contentHash,sourceTasksetRef:k(a.taskset),tasksetId:Ge(h),tasksetRevision:c?a.taskset.revision+1:1,lineage:h})}S(Vt,"prepareModelTasksetDraft");function lt(s){let e=G.parse(s.preparation);if(!V(e.sourceTasksetRef,e.lineage.parent))throw new Error("Taskset draft preparation differs from its source lineage.");if(e.authoringGraph==="bound"){if(!s.source)throw new Error("Bound Taskset authoring requires its retained source package.");return mt({preparation:e,source:s.source,edited:s.edited})}let t=pt(s.edited),{contentHash:a,...n}=t.verifierSet,c=Be({...n,id:`${e.tasksetId}-verifiers`,revision:e.tasksetRevision,calibrationReceiptRefs:[],metadata:{sourceVerifierSet:k(t.verifierSet)}}),{contentHash:m,...h}=t.taskset,b=te.parse(E({...h,id:e.tasksetId,revision:e.tasksetRevision,verifierSetRelease:{id:c.id,contentHash:c.contentHash},metadata:{modelTasksetAuthoring:e.lineage,...t.taskset.metadata.environmentResources===void 0?{}:{environmentResources:t.taskset.metadata.environmentResources},...t.taskset.metadata.ordinaryAuthoring===void 0?{}:{ordinaryAuthoring:t.taskset.metadata.ordinaryAuthoring}}})),u=K(t),i=u?[...t.files.filter(R=>R.asset.id!==Fe(t.taskset)),ke({...u.execution,verifierSet:c})]:t.files;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:b,environment:t.environment,verifierSet:c,files:i})}S(lt,"publishModelTasksetDraftPackage");function pt(s){let e=D(s);if(e.modelResources||e.learningResources)throw new Error("This Taskset requires its bound or reviewed authoring workflow.");return e}S(pt,"requireOrdinaryPackage");function ft(s,e,t,a){if(s.environment.entrypoint!=="openpond.javascript-environment.v1")return{taskset:s,inventory:t,generatedFiles:[]};let n="environment/execution.json",c=e.get(n);if(!c||c.length>524288)throw new Error("Authored tool environment requires its bounded private execution declaration.");let m=qe.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(c))),h=S(_=>{if(!_)return null;let g=t.find(y=>y.asset.id===_.id&&y.asset.path===_.path);if(!g)throw new Error(`Authored environment dependency is missing: ${_.id}.`);return g.asset},"repin"),{contentHash:b,...u}=m.javascript,i=De.parse(E({...u,id:`javascript-${s.id}`,revision:s.revision,module:h(m.javascript.module)}));if(p(i.tools)!==p(s.environment.metadata.portableTools)||p(i.tools.map(_=>_.name))!==p(s.environment.toolNames))throw new Error("Authored environment tools differ from the Taskset's declared tools.");let R=_e({schemaVersion:"openpond.environmentRelease.v1",id:`environment-${s.id}`,revision:s.revision,contract:et(s),actionSchemaRef:h(m.environment.actionSchemaRef),observationSchemaRef:h(m.environment.observationSchemaRef),stateSchemaRef:h(m.environment.stateSchemaRef),artifactCollection:m.environment.artifactCollection,adapterConformanceHashes:{},metadata:{javascriptEnvironment:k(i),resources:s.environment.resources??[]}}),d=$.parse({...s,environment:{...s.environment,metadata:{...s.environment.metadata,portableExecutionResources:{environment:R}}}}),f=Re({taskset:d,adapterId:a}),l=ke({javascript:i,environment:R,verifierSet:f.verifierSetRelease}),I=[...t.filter(_=>_.sourcePath!==n),{asset:l.asset,sourcePath:n}],P=$.parse({...d,metadata:{...d.metadata,portableFileInventory:I}});return{taskset:$.parse({...P,contentHash:U(P)}),inventory:I,generatedFiles:[{path:n,role:"environment",content:new TextDecoder().decode(W(l))}]}}S(ft,"prepareAuthoredToolEnvironment");var ee=w.array(w.object({asset:ie,sourcePath:w.string().min(1)}).strict()).max(1e4),ut=new Set(["taskset.json","capabilities.json","data/tasks.jsonl","graders/graders.json","fixtures/grader-fixtures.json","environment/taskset.ts"]);function ht(s){return ut.has(s)}S(ht,"isGeneratedTasksetPublicationFilePath");function vt(s,e,t){let a=$.parse(s);if(a.metadata.taskDefinition!==void 0||a.metadata.rewardBinding!==void 0)return{taskset:a,generatedFiles:[]};let n=new Map,c=0;for(let[r,v]of e){if(oe.parse(r),c+=v.byteLength,n.size>=1e4||c>ze*3/4)throw new Error("Taskset source exceeds the package byte limit.");n.set(r,v.slice())}let m=a.metrics?.customAggregator,h=m?n.get(m.module):void 0;if(m&&!h)throw new Error("Declared Taskset metric module is missing.");let b=m&&h?{...a.metrics,customAggregator:{...m,contentHash:N(h)}}:a.metrics,u=new Map,i=new Set,R=[],d=S((r,v,T,M)=>{let o=n.get(v);if(!o)throw new Error(`Declared Taskset file is missing: ${v}.`);return{id:r,path:v,contentHash:N(o),sizeBytes:o.byteLength,mediaType:T,visibility:M}},"ref"),f=S((r,v=r.path)=>{let T=u.get(r.id);if(T&&p(T)!==p({asset:r,sourcePath:v}))throw new Error(`Conflicting Taskset file identity: ${r.id}.`);let M=n.get(v);if(!M||M.length!==r.sizeBytes||N(M)!==r.contentHash)throw new Error(`Taskset file differs from its declared bytes: ${r.id}.`);u.set(r.id,{asset:r,sourcePath:v}),i.add(v)},"add");for(let r of a.tasks){let v=tt(r);for(let T of v.artifactRefs)f(T,r.assets?.find(M=>M.id===T.id)?.artifactRef??T.path);for(let T of v.requiredOutputs??[])T.schemaRef&&f(T.schemaRef)}for(let r of a.environment.resources??[])f(d(r.id,r.path,r.mediaType??"application/octet-stream",r.visibility==="policy_visible"?"policy":"host_private"));let l=a.graders.map(r=>{if(r.kind==="custom_verifier"){let v=d(`verifier-${r.id}`,r.module,"application/javascript","host_private"),T=ie.safeParse(r.metadata.portableVerifierRef);return T.success&&T.data.contentHash===v.contentHash&&T.data.sizeBytes===v.sizeBytes&&(v=T.data),f(v,r.module),{...r,metadata:{...r.metadata,portableVerifierRef:v}}}if(r.kind==="human"||r.kind==="model_judge"){let v=new TextEncoder().encode(r.rubric),T=`graders/rubric-${N(v)}.md`;n.set(T,v);let M=d(`rubric-${r.id}`,T,"text/markdown","verifier"),o=ie.safeParse(r.metadata.portableRubricRef);if(o.success&&o.data.contentHash===M.contentHash&&o.data.sizeBytes===M.sizeBytes){if(o.data.visibility==="policy")throw new Error("A grader rubric cannot become policy-visible.");M=o.data}return f(M,T),R.push({path:T,role:"verifier",content:r.rubric}),{...r,metadata:{...r.metadata,portableRubricRef:M}}}return r});m&&![...u.values()].some(r=>r.asset.path===m.module&&r.sourcePath===m.module&&r.asset.visibility!=="policy")&&f(d(`metric-${p(m.module)}`,m.module,"application/javascript","host_private"));let I=ee.parse(a.metadata.portableFileInventory??[]);for(let r of[...n.keys()].sort())if(!i.has(r)){let v=I.find(T=>T.sourcePath===r&&!u.has(T.asset.id));f(v?{...d(v.asset.id,r,v.asset.mediaType,v.asset.visibility),path:v.asset.path}:d(`taskset-file-${p(r)}`,r,"application/octet-stream","host_private"),r)}let{importedPackageHash:P,derivedPortableMetadata:_,...g}=a.metadata,y={...a.environment.metadata};if(y.portableExecutionResources!==void 0){let r=w.object({environment:w.unknown(),verifierSet:w.unknown().optional()}).parse(y.portableExecutionResources);y.portableExecutionResources={environment:r.environment}}let C=$.parse({...a,graders:l,metrics:b,environment:{...a.environment,metadata:y},metadata:{...g,...P===void 0?{}:{sourceImportedPackageHash:P},portableFileInventory:ee.parse([...u.values()].sort((r,v)=>r.asset.id.localeCompare(v.asset.id)))}}),q=ft(C,n,[...u.values()],t);return{taskset:$.parse({...q.taskset,contentHash:U(q.taskset)}),generatedFiles:[...R,...q.generatedFiles]}}S(vt,"prepareAuthoredTasksetSource");function gt(s){let e=Xe(s.workspace),t=s.preparation===null?null:G.parse(s.preparation);if(t?e.draft.id!==t.draftId||e.draft.modelScope?.modelId!==t.lineage.owner.modelId||e.draft.profileId!==t.lineage.owner.scopeId||p(e.draft.modelScope?.source??null)!==p(t):e.draft.modelScope?.source!==void 0)throw new Error("Taskset draft differs from its retained source preparation.");let a=Qe({draft:e.draft,now:e.draft.updatedAt,sourcePackageHash:e.contentHash}),n=new Map(e.files.map(u=>[u.path,me(u)]));for(let[u,i]of Ke(e.draft))ht(u)||n.set(u,new TextEncoder().encode(i));let c=vt(a,n,s.adapterId);for(let u of c.generatedFiles)n.set(u.path,new TextEncoder().encode(u.content));let m=Re({taskset:c.taskset,adapterId:s.adapterId}),h=ee.parse(c.taskset.metadata.portableFileInventory),b=J({schemaVersion:"openpond.tasksetPackage.v1",taskset:m.tasksetRelease,environment:m.environmentRelease,verifierSet:m.verifierSetRelease,files:h.map(u=>{let i=n.get(u.sourcePath);if(!i)throw new Error(`Captured Taskset file is missing: ${u.sourcePath}.`);return{asset:u.asset,base64:Buffer.from(i).toString("base64")}})});return t?lt({preparation:t,edited:b,source:s.source}):b}S(gt,"compileTasksetDraftWorkspace");function Ot(s){if(!s.workspace.draft.modelScope)throw new Error("Taskset draft requires a Model owner.");return gt(s)}S(Ot,"compileModelTasksetDraftWorkspace");function es(s){let e=D(s.source);if(e.modelResources||e.learningResources)throw new Error("Binding an ordinary Reward requires an ordinary source package.");let t=Q(e);if(!t.trim())throw new Error("Add collection instructions before selecting a saved Reward.");let a=new Map,n=K(e);for(let g of n?.assets??[])a.set(g.id,g);let c=new Set([...e.taskset.tasks.flatMap(g=>g.privilegedContextRef?[g.privilegedContextRef]:[]),...[e.environment.actionSchemaRef,e.environment.observationSchemaRef,e.environment.stateSchemaRef].flatMap(g=>g?[g.id]:[])]);for(let g of c){if(a.has(g))continue;let y=e.files.find(q=>q.asset.id===g);if(!y)throw new Error(`Source Taskset context is missing: ${g}.`);let C=new TextDecoder("utf-8",{fatal:!0}).decode(W(y));a.set(g,se.parse(E({schemaVersion:"openpond.learningTextAsset.v1",id:g,revision:1,asset:y.asset,text:C})))}for(let g of s.assets){let y=e.files.find(C=>C.asset.id===g.id);if(y&&E({asset:y.asset}).contentHash!==E({asset:g.asset}).contentHash)throw new Error(`Selected Reward conflicts with a source asset: ${g.id}.`);a.set(g.id,g)}let{policy:m,environment:h,environmentRelease:b,tools:u,capabilities:i,verifierSetRelease:R}=e.taskset,d=F.parse(E({schemaVersion:"openpond.taskDefinition.v1",id:`${e.taskset.id}-definition`,revision:1,name:e.taskset.id,description:"",instructions:t,category:"custom",familyNamespace:e.taskset.id,inputSchema:{type:"object"},outputSchema:{type:"object"},rewardBinding:k(s.rewardBinding),harness:null,execution:{policy:m,environment:h,environmentRelease:b,tools:u,capabilities:i,verifierSetRelease:R}})),f=ce({...s,assets:[...a.values()],source:{taskset:e.taskset,taskDefinition:d,instructionMode:"per_task",executionResources:{environment:e.environment,verifierSet:e.verifierSet},...n?{execution:n.execution}:{}}}),l=new Map(e.files.map(g=>[g.asset.id,g]));for(let g of f.assets){let y="";for(let C of new TextEncoder().encode(g.text))y+=String.fromCharCode(C);l.set(g.id,{asset:g.asset,base64:btoa(y)})}let{taskset:I,executionResources:P,..._}=f;return J({schemaVersion:"openpond.tasksetPackage.v1",taskset:I,...P,modelResources:_,files:[...l.values()]})}S(es,"bindOrdinaryModelTasksetReward");function kt(s){let{request:e,package:t}=s,a=t.learningResources;if(!a)throw new A("model_review_batch_required",422);let n=z(t.taskset),c=`model-review-${p([s.scope,e.modelId,e.operationId])}`,m=new Map(e.examples.map(o=>[p(o.evidence),o])),h=new Set(a.evidence.map(o=>p(k(o)))),b=new Map(a.decisions.map(o=>[p(o.evidence),o]));if(m.size!==e.examples.length||e.examples.some(o=>!h.has(p(o.evidence))))throw new A("model_review_evidence_mismatch",409);for(let o of[s.binding,...s.rewards,...s.assets])Pe(o);He(s.binding,s.rewards);let u=new Map;for(let o of s.binding.sources){let H=s.rewards.find(pe=>V(k(pe),o.reward)),{contentHash:B,...L}=H;u.set(H.contentHash,xe({...L,id:`${c}-reward-${H.contentHash}`,revision:1}))}let i=[...u.values()],{contentHash:R,recipeRef:d,...f}=s.binding,l=ye({...f,id:`${c}-binding`,revision:1,sources:s.binding.sources.map(o=>({...o,reward:k(u.get(o.reward.contentHash))}))},i),I=i.flatMap(o=>[...o.assets,..."verifierRef"in o.implementation?[o.implementation.verifierRef]:[],..."rubricRef"in o.implementation?[o.implementation.rubricRef]:[],..."inputContract"in o.implementation?[o.implementation.inputContract]:[]]),P=[...new Map(I.map(o=>{let H=s.assets.find(B=>B.id===o.id);if(!H)throw new A("model_review_reward_asset_missing",422);if(ae(H,o),o.visibility==="policy")throw new A("reward_asset_visibility_invalid",422);return[H.id,H]})).values()],{environmentRelease:_,verifierSetRelease:g,...y}=n.definition.execution,{contentHash:C,...q}=n.definition,r=F.parse(E({...q,...e.definition,id:`${c}-definition`,revision:1,rewardBinding:k(l),execution:{...y,policy:{...y.policy,hiddenGraderRefs:Ie(l,i).filter(o=>o.privileged).map(o=>o.id)}}})),v=ne.parse(E({schemaVersion:"openpond.learningSource.v1",id:c,revision:1,name:`${r.name} review`,kind:"direct",taskDefinition:k(r),enabled:!0,allowedSplits:[...new Set(a.evidence.map(o=>o.submission.split))],mapping:null,adapterVersion:null,reviewOrigin:{modelId:e.modelId,packageHash:t.contentHash,taskset:k(t.taskset),batch:k(a.batch),rewardBinding:k(s.binding)}})),T=a.evidence.map(o=>{let H=m.get(p(k(o))),B=`review-${o.contentHash}`,L=p({instructions:r.instructions,inputSchema:r.inputSchema,outputSchema:r.outputSchema,requiredOutputs:r.requiredOutputs??[],input:H?.input??o.submission.input})!==p({instructions:n.definition.instructions,inputSchema:n.definition.inputSchema,outputSchema:n.definition.outputSchema,requiredOutputs:n.definition.requiredOutputs??[],input:o.submission.input});return Y.parse(E({schemaVersion:"openpond.taskEvidence.v1",id:Me(v.id,o.submission.exampleId,B),revision:1,source:k(v),submission:{...o.submission,sourceId:v.id,taskDefinition:k(r),attemptId:B,observedOutput:L?null:o.submission.observedOutput,idempotencyKey:`${c}-${o.contentHash}`,...H?.input===void 0?{}:{input:H.input},...H?.expected===void 0?{}:{expected:H.expected},...H?.evaluatorContext===void 0?{}:{evaluatorContext:H.evaluatorContext}},supersedes:k(o),correctionFeedbackId:null,receivedAt:s.now}))}),M=T.flatMap(o=>{let H=m.get(p(o.supersedes)),B=b.get(p(o.supersedes)),L=H?.proposedTarget===void 0?B.approvedTarget:H.proposedTarget;return L===null?[]:[re.parse({schemaVersion:"openpond.taskFeedbackRecord.v1",id:`feedback-${p([c,o.id])}`,revision:1,submission:{schemaVersion:"openpond.taskFeedback.v1",sourceId:v.id,idempotencyKey:`${c}-${o.id}`,exampleId:o.submission.exampleId,attemptId:o.submission.attemptId,expectedEvidenceHash:o.contentHash,occurredAt:s.now,kind:"target_correction",value:L,note:"Proposed target for the revised task. Grade and review before admission."},status:"pending_review",evidence:k(o),createdAt:s.now,review:null})]});return{source:v,definition:r,binding:l,rewards:i,assets:P,evidence:T,proposals:M}}S(kt,"prepareModelBatchReview");var nt=S(s=>`model-batch-review-${p([s.modelId,s.operationId])}`,"operation");function rs(s){let e=D(s);if(!e.learningResources)throw new A("model_review_batch_required",422);let t=z(e.taskset);return st.parse({schemaVersion:"openpond.modelBatchReviewInspection.v1",packageHash:e.contentHash,definition:t.definition,binding:t.binding,evidence:e.learningResources.evidence,decisions:e.learningResources.decisions})}S(rs,"inspectModelBatchPackage");async function wt(s,e){let t=be.parse(e),a=await s.operation(nt(t));if(!a)return null;if(a.requestHash!==p(t))throw new A("learning_idempotency_conflict",409);return rt(s,t,a.resources)}S(wt,"findModelBatchReview");async function os(s,e){let t=be.parse(e.request),a=await wt(s,t);if(a)return a;let n=D(e.package);if(!n.learningResources)throw new A("model_review_batch_required",422);let c=z(n.taskset),m=t.rewardBindingRef,h=!m||V(m,k(c.binding)),b=h?c.binding:await ge(s,"binding",m),u=h?c.rewards:await Promise.all(b.sources.map(l=>ge(s,"reward",l.reward))),i=new Set(u.flatMap(l=>[...l.assets,..."verifierRef"in l.implementation?[l.implementation.verifierRef]:[],..."rubricRef"in l.implementation?[l.implementation.rubricRef]:[],..."inputContract"in l.implementation?[l.implementation.inputContract]:[]]).map(l=>l.id)),R=h?n.learningResources.assets:await Promise.all([...i].map(l=>ve(s,"asset",l,1))),d=kt({...e,request:t,package:n,binding:b,rewards:u,assets:R}),f=[];for(let l of d.assets){let I=await s.get("asset",l.id,1);if(I&&I.contentHash!==l.contentHash)throw new A("model_review_asset_conflict",409);I||await s.put("asset",l,0)}for(let l of d.rewards)await s.put("reward",l,0);await s.put("binding",d.binding,0),await s.put("definition",d.definition,0),await s.put("source",d.source,0,{parentId:t.modelId}),f.push({kind:"source",id:d.source.id,revision:1});for(let l of d.evidence)await s.put("evidence",l,0,{parentId:d.source.id}),f.push({kind:"evidence",id:l.id,revision:1});for(let l of d.proposals)await s.put("feedback",l,0,{parentId:l.evidence.id,status:l.status}),f.push({kind:"feedback",id:l.id,revision:1});return await s.saveOperation(nt(t),{requestHash:p(t),resources:f}),rt(s,t,f)}S(os,"beginModelBatchReview");async function rt(s,e,t){let a=await Promise.all(t.map(n=>ve(s,n.kind,n.id,n.revision)));return at.parse({schemaVersion:"openpond.modelBatchReviewReceipt.v1",operationId:e.operationId,modelId:e.modelId,source:a.find(n=>n.schemaVersion==="openpond.learningSource.v1"),evidence:a.filter(n=>n.schemaVersion==="openpond.taskEvidence.v1"),proposals:a.filter(n=>n.schemaVersion==="openpond.taskFeedbackRecord.v1")})}S(rt,"readReceipt");function cs(s){let e=D(s.package),t=e.taskset,a=e.modelResources,n=e.learningResources?z(t):void 0,c=je.parse({schemaVersion:"openpond.uploadedFileDatasetSource.v1",kind:"uploaded_file",id:`package-source-${p({profileId:s.profileId,packageHash:e.contentHash})}`,profileId:s.profileId,title:s.name,sourceHash:e.contentHash,occurredAt:s.createdAt,licensingStatus:"pending",secretScanStatus:"pending",piiScanStatus:"pending",originalFileNames:["taskset-package.json"],mediaTypes:["application/json"],sourceFileHashes:[e.contentHash],totalBytes:new TextEncoder().encode(JSON.stringify(e)).byteLength,parserVersion:"openpond.tasksetPackage.v1",metadata:{}}),m=Ye({profileId:s.profileId,id:`${t.id}-import`,name:s.name,now:s.createdAt}),h=[];for(let d of t.graders)if(d.kind==="custom_verifier"){let f=a?.assets.find(P=>P.id===d.verifierRef.id),l=e.files.find(P=>P.asset.id===d.verifierRef.id);if(!l)throw new Error(`Imported verifier source is missing: ${d.id}.`);let I=Ze(d.verifierRef.contentHash);h.some(P=>P.path===I)||h.push({path:I,role:"verifier",content:f?ae(f,d.verifierRef):new TextDecoder("utf-8",{fatal:!0}).decode(W(l))})}let b=t.metadata.ordinaryAuthoring??t.metadata.starterAuthoring,u=$e.array().max(1e5).parse(b?.graderFixtures??[]),i=t.environment.kind==="text"?"chat":t.environment.kind==="custom_program"?"program":t.environment.kind,R=$.parse({schemaVersion:"openpond.taskset.v1",id:t.id,revision:t.revision,profileId:s.profileId,profileRelease:null,createImproveRunId:null,name:s.name,objective:Q(e),status:"needs_review",sourceRefs:[c],datasetArtifact:null,policy:t.policy,environment:{...m.environment,kind:i,entrypoint:t.environment.entrypoint,resources:Ve.array().max(1e4).parse(t.metadata.environmentResources??[]),stateful:t.environment.stateful,deterministicSeeds:t.environment.deterministicSeeds,toolNames:t.tools.map(d=>d.name),defaultTimeoutMs:t.environment.defaultTimeoutMs,networkPolicy:t.environment.networkPolicy,metadata:{runtimeSourceTasksetId:Rt(s.profileId,e.contentHash),portableEnvironment:t.environment,portableTools:t.tools,portableExecutionResources:{environment:e.environment,verifierSet:e.verifierSet}}},capabilities:{...m.capabilities,taskKind:i==="chat"?"chat":i==="program"?"custom_program":"single_agent",compatibleMethods:["none"],requiresTools:t.tools.length>0,requiresState:t.environment.stateful,rewardKinds:[...new Set(t.graders.map(d=>d.kind==="human"?"human":d.kind==="model_judge"?"model_judge":"deterministic"))]},tasks:t.tasks.map(d=>({...d,schemaVersion:"openpond.taskData.v1",sourceRefs:[c.id],assets:d.artifactRefs.map(f=>({id:f.id,sourceRefId:c.id,artifactRef:f.path,fileName:f.path.split("/").at(-1),mediaType:f.mediaType,sha256:f.contentHash,sizeBytes:f.sizeBytes,split:d.split,metadata:{portableAsset:f}})),...d.requiredOutputs?{requiredOutputs:d.requiredOutputs.map(f=>({...f,schemaRef:f.schemaRef?.id??null,maxBytes:f.maxBytes??void 0}))}:{},metadata:{portableTaskRecord:d,exampleOrigin:"imported"}})),graders:a?we(a.rewardBinding,a.rewards,a.assets):n?we(n.binding,n.rewards,e.learningResources.assets):Ue(e),graderFixtures:u,learningSignals:m.learningSignals,...t.metrics?{metrics:t.metrics}:{},authoringProvenance:{schemaVersion:"openpond.taskAuthoringProvenance.v1",model:null,modelConfig:{},skillHash:p("openpond-package-import-v1"),promptTemplateVersion:"package-import-v1",buildIntent:"discovery",buildSpecification:null,evidenceHashes:[e.contentHash],tasksetSdkVersion:"package-import-v1",sourceCommit:null,repairHistory:[],createdAt:s.createdAt},readiness:null,contentHash:"00000000",createdAt:s.createdAt,updatedAt:s.createdAt,metadata:{importedPackageHash:e.contentHash,tasksetOutputContract:t.metadata.tasksetOutputContract??null,...n?{learning:n}:{},portableFileInventory:e.files.map(d=>({asset:d.asset,sourcePath:d.asset.path})),...a?{taskDefinition:k(a.taskDefinition),rewardBinding:k(a.rewardBinding),rewardExecution:{binding:a.rewardBinding,rewards:a.rewards}}:{},portableCapabilities:t.capabilities,derivedPortableMetadata:t.metadata,...t.metadata.modelTasksetDerivation?{modelTasksetDerivation:t.metadata.modelTasksetDerivation}:{}}});return{package:e,taskset:$.parse({...R,contentHash:U(R)}),generatedFiles:h}}S(cs,"prepareImportedTasksetPackage");function Rt(s,e){return`package-${p({profileId:s,packageHash:e})}`}S(Rt,"tasksetPackageSourceId");var ot=w.object({draft:Z,filePaths:w.array(w.object({assetId:w.string().min(1),paths:w.array(oe).min(1).max(1e4)}).strict()).max(1e4)}).strict();function ls(s){let e=D(s.source),t=Z.parse(s.sourceDraft),a=G.parse(s.preparation);if(e.contentHash!==a.sourcePackageHash||!V(k(e.taskset),a.sourceTasksetRef))throw new Error("Taskset draft preparation differs from its source package.");if(e.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(!!e.modelResources!=(a.authoringGraph==="bound"))throw new Error("Taskset draft authoring graph differs from its source.");let n=ee.parse(t.metadata.portableFileInventory??[]),c=S(i=>de(i)?`source-artifacts/${e.contentHash}/${p(i)}/${i.split("/").at(-1)}`:i,"sourcePath");if([...t.tasks.flatMap(i=>(i.assets??[]).map(R=>R.artifactRef)),...(t.environment.resources??[]).map(i=>i.path),...e.taskset.tasks.flatMap(i=>(i.requiredOutputs??[]).flatMap(R=>R.schemaRef?[R.schemaRef.path]:[])),...t.metrics.customAggregator?[t.metrics.customAggregator.module]:[],...t.graders.flatMap(i=>i.kind==="custom_verifier"?[i.module]:[])].some(de))throw new Error("A referenced source asset occupies a reserved Taskset authoring path.");let h=e.files.map(i=>{let R=new Set([i.asset.path]);for(let d of n)d.asset.id===i.asset.id&&R.add(d.sourcePath);for(let d of t.tasks)for(let f of d.assets??[])f.id===i.asset.id&&R.add(f.artifactRef);for(let d of e.taskset.graders)if(d.kind==="custom_verifier"&&d.verifierRef.id===i.asset.id){let f=t.graders.find(l=>l.id===d.id);f?.kind==="custom_verifier"&&R.add(f.module)}return{assetId:i.asset.id,paths:[...R].map(c)}}),b={...t.metadata};if(e.modelResources)for(let i of["taskDefinition","rewardBinding","rewardExecution","derivedPortableMetadata","modelTasksetDerivation","importedPackageHash"])delete b[i];let u=Z.parse({...t,id:a.draftId,revision:1,status:"draft",graders:t.graders.map(i=>({...i,metadata:{...i.metadata,portableGrader:e.taskset.graders.find(R=>R.id===i.id)}})),environment:{...t.environment,metadata:{...t.environment.metadata,portableExecutionResources:{environment:e.environment}}},modelScope:{modelId:a.lineage.owner.modelId,expectedModelRevision:s.expectedModelRevision,source:a},publishedTasksetRef:a.tasksetRevision>1?a.sourceTasksetRef:null,metadata:{...b,modelTasksetAuthoring:a.lineage,portableFileInventory:n.map(i=>({...i,sourcePath:c(i.sourcePath),asset:{...i.asset,id:de(i.sourcePath)?`source-artifact-${p({packageHash:e.contentHash,assetId:i.asset.id})}`:i.asset.id,path:c(i.asset.path)}}))}});return ot.parse({draft:u,filePaths:h})}S(ls,"prepareTasksetDraftSource");function ps(s){let e=ot.parse(s.initialized),t=D(s.source);if(e.draft.modelScope?.source?.sourcePackageHash!==t.contentHash)throw new Error("Taskset draft lost its source preparation.");let a=new Map;for(let c of e.filePaths){let m=t.files.find(h=>h.asset.id===c.assetId);if(!m)throw new Error("Taskset draft source asset is missing.");for(let h of c.paths){let b=a.get(h);if(b&&b.contentHash!==m.asset.contentHash)throw new Error("Taskset draft source paths conflict.");a.set(h,{path:h,contentHash:m.asset.contentHash,sizeBytes:m.asset.sizeBytes,base64:m.base64})}}for(let c of We(e.draft))if(!a.has(c.relativePath)){let m=new TextEncoder().encode(c.source);a.set(c.relativePath,{path:c.relativePath,contentHash:N(m),sizeBytes:m.byteLength,base64:Buffer.from(m).toString("base64")})}let n=e.draft;if(n.metrics.customAggregator){let c=a.get(n.metrics.customAggregator.module);if(!c)throw new Error("Declared Taskset metric module is missing.");me(c),n=Z.parse({...n,metrics:{...n.metrics,customAggregator:{...n.metrics.customAggregator,contentHash:c.contentHash}}})}return Je({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:n,files:[...a.values()]})}S(ps,"materializeTasksetDraftWorkspace");export{st as a,be as b,at as c,Vt as d,lt as e,ee as f,ht as g,vt as h,Ot as i,es as j,rs as k,wt as l,os as m,cs as n,Rt as o,ot as p,ls as q,ps as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as j}from"./chunk-KO3HNMLJ.js";import{j as y}from"./chunk-XMKCCLGB.js";import{e as i,l as s}from"./chunk-WN3V6KDN.js";import{c as H,d as w,f as k}from"./chunk-YBT2NB32.js";import{Cb as I,Db as E,Ta as v,Ua as g,ub as f,zb as h}from"./chunk-ACYFMLWG.js";import{b as e}from"./chunk-ES2ISFJC.js";import{a as m}from"./chunk-FTQLQJQV.js";var A=e.object({sourcePass:i,graders:j.shape.graders,mappings:j.shape.mappings,maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),C=e.object({externalDatasetBinding:v,scoring:A.optional(),modelId:e.string().min(1).max(300),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),R=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}).strict(),n=e.string().min(1).max(240),c=e.string().regex(/^[a-f0-9]{64}$/),x=e.object({schemaVersion:e.literal("openpond.experimentImprovement.v1"),id:n,operationId:n,requestHash:c,actorId:n,teamId:n,projectId:n.nullable(),ownerWorkspaceId:n,ownerRevision:e.number().int().nonnegative(),ownerSourceRevision:e.string().min(1).max(500),baseRelease:i,profileRef:R,baseProfileSourceRevision:e.string().min(1).max(500),evidence:e.object({manifest:f,result:h}).strict(),component:e.object({kind:e.enum(["skill","workflow","agent","instruction"]),path:e.string().min(1).max(2e3),workflowId:n.optional()}).strict(),mode:e.enum(["manual","llm_assisted"]),status:e.enum(["draft","authoring_queued","authoring","frozen","testing","ready_for_review","adopting","accepted","rolled_back","declined","failed","cancelled"]),revision:e.number().int().positive(),limits:e.object({maximumCostUsd:e.number().finite().positive(),maximumAuthoringSteps:e.number().int().min(1).max(500),maximumDurationMs:e.number().int().min(1e3).max(864e5)}).strict(),authoringSteps:e.number().int().nonnegative().max(500),work:e.object({sessionId:n,turnId:n,revision:e.number().int().positive(),startedAt:e.string().datetime()}).strict().nullable(),frozen:e.object({release:i,sourceRevision:e.string().min(1).max(500),profileSourceRevision:e.string().min(1).max(500),authoringHash:c,partitionHash:c,executableSourceHash:c,protectedClosureHash:c,candidateRevision:e.number().int().positive(),diff:e.array(e.object({path:e.string(),before:c.nullable(),after:c.nullable()}).strict()).max(1e4)}).strict().nullable(),test:e.object({recipe:C,recipeHash:e.string().regex(/^[a-f0-9]{64}$/),baselineOperationId:e.string(),candidateOperationId:e.string(),cancelRequestedAt:e.string().datetime().nullable(),dispatching:e.object({kind:e.enum(["baseline","candidate"]),token:n,pid:e.number().int().positive(),processStart:e.string().nullable(),startedAt:e.string().datetime()}).strict().nullable()}).strict().nullable(),comparison:e.object({baseline:e.object({manifest:f,result:h}).strict(),candidate:e.object({manifest:f,result:h}).strict(),frozenHash:c,humanProjection:w.optional()}).strict().nullable(),adoptionIntent:e.object({operationId:n,expectedOwnerRevision:e.number().int().nonnegative(),frozenHash:c,humanProjection:w.optional()}).strict().nullable(),acceptance:i.nullable(),rollback:i.nullable(),error:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime(),contentHash:c}).strict();function D(r){let t=x.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Improvement state integrity failed.");if(I(t.evidence),t.evidence.manifest.teamId!==t.teamId||t.evidence.result.status!=="completed"||!t.evidence.result.cases.some(o=>o.status==="completed"))throw new Error("Improvement requires usable completed owner evidence.");if(t.test&&(s(t.test.recipe)!==t.test.recipeHash||g(t.test.recipe.externalDatasetBinding).profileId!==t.profileRef.profileId))throw new Error("The test recipe changed its exact selected Profile.");if(t.comparison?.humanProjection){let o=k(t.comparison.humanProjection);if(o.teamId!==t.teamId||o.projectId!==t.projectId||s(o.baseline)!==s(t.comparison.baseline)||s(o.candidate)!==s(t.comparison.candidate))throw new Error("Human comparison projection differs from its exact owner evidence.")}if(t.comparison&&(I(t.comparison.baseline),I(t.comparison.candidate),!t.frozen||t.comparison.frozenHash!==s(t.frozen)||!E(t.comparison.baseline,t.comparison.candidate).comparable))throw new Error("Improvement comparison is not bound to a comparable frozen candidate.");if(t.status==="ready_for_review"&&(!t.frozen||!t.comparison))throw new Error("Improvement is missing qualification.");if(t.status==="adopting"&&(!t.adoptionIntent||!t.frozen||t.adoptionIntent.frozenHash!==s(t.frozen)))throw new Error("Improvement adoption intent is not bound to its tested revision.");if(t.status==="accepted"&&(!t.acceptance||!t.comparison||!t.frozen))throw new Error("Improvement acceptance is missing its exact qualification receipt.");if(t.status==="rolled_back"&&(!t.acceptance||!t.rollback))throw new Error("Profile rollback is missing its durable owner receipt.");return t}m(D,"verifyExperimentImprovementState");function X(r){return D({...r,contentHash:s(r)})}m(X,"sealExperimentImprovementState");var Y=e.object({states:e.array(x).max(50),nextCursor:n.nullable()}).strict(),T=e.object({operationId:n,ownerWorkspaceId:n,expectedOwnerRevision:e.number().int().nonnegative(),baseRelease:i,profileRef:R,profileSourceRevision:e.string().min(1).max(500),projectId:n.nullable(),evidence:i,component:x.shape.component,mode:x.shape.mode,limits:x.shape.limits}).strict(),Z=e.discriminatedUnion("operation",[e.object({operation:e.literal("list"),limit:e.number().int().min(1).max(50).default(30),cursor:n.optional()}).strict(),e.object({operation:e.literal("options"),evidence:i}).strict(),e.object({operation:e.literal("start"),request:T}).strict(),e.object({operation:e.enum(["read","humanComparisonOptions"]),id:n}).strict(),e.object({operation:e.literal("instructions"),id:n}).strict(),e.object({operation:e.literal("edit"),id:n,revision:e.number().int().positive(),expectedFileHash:c,text:e.string().max(25e4)}).strict(),e.object({operation:e.literal("mode"),id:n,revision:e.number().int().positive(),mode:e.enum(["manual","llm_assisted"])}).strict(),e.object({operation:e.literal("author"),id:n,revision:e.number().int().positive(),modelId:n,prompt:e.string().min(1).max(2e4)}).strict(),e.object({operation:e.enum(["freeze","finishAuthoring","useCandidate","discard","cancel","rollback"]),id:n,revision:e.number().int().positive()}).strict(),e.object({operation:e.literal("test"),id:n,revision:e.number().int().positive(),recipe:C}).strict(),e.object({operation:e.literal("compare"),id:n,revision:e.number().int().positive(),baseline:i,candidate:i,humanSelections:H.optional()}).strict()]),S=e.object({teamId:n,evidence:i,scoring:A.optional(),profiles:e.array(e.object({id:c,name:e.string(),profileRef:R,ownerWorkspaceId:n,ownerRevision:e.number().int().nonnegative(),baseRelease:i,profileSourceRevision:e.string(),components:e.array(e.object({kind:e.enum(["skill","instruction","agent","workflow"]),path:e.string(),agentId:e.string().optional(),workflowId:e.string().optional(),label:e.string(),binding:v}).strict()).max(500)}).strict()).max(100)}).strict(),O=e.object({candidateId:n,actorId:n,teamId:n,projectId:n.nullable(),candidateRevision:e.number().int().positive(),recipeHash:c,baseline:e.object({manifest:f,result:h}).strict(),candidate:e.object({manifest:f,result:h}).strict(),contentHash:c}).strict();function U(r){let t=O.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Accepted Human discovery integrity failed.");for(let o of[t.baseline,t.candidate])if(I(o),o.manifest.teamId!==t.teamId||o.manifest.lineage?.humanProjection)throw new Error("Discovery must retain original owner evidence.");return t}m(U,"verifyExperimentImprovementHumanOptions");function ee(r,t){if(!r.test||r.test.cancelRequestedAt)throw new Error("The paired test is unavailable.");let l={candidateId:r.id,actorId:r.actorId,teamId:r.teamId,projectId:r.projectId,candidateRevision:r.revision,recipeHash:r.test.recipeHash,...t};return U({...l,contentHash:s(l)})}m(ee,"sealExperimentImprovementHumanOptions");var a=e.string().trim().min(1).max(240),d=e.string().regex(/^[a-f0-9]{64}$/),_=e.object({schemaVersion:e.literal("openpond.advancedRefinerEvaluation.v1"),operationId:a,actorId:a,teamId:a,projectId:a.nullable(),mode:e.enum(["review_quality","downstream_adaptation"]),profileRef:e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:a,profileId:a}).strict(),sourceRevision:e.string().min(1).max(500),baselineRelease:i,refinerRelease:i,evidence:i,externalDatasetBinding:v,adaptationDatasetBinding:v,privateClosureHash:d,adaptationTaskIds:e.array(a).min(1).max(1e4),holdoutTaskIds:e.array(a).min(1).max(1e4),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),holdoutSplit:e.enum(["train","validation","test","frozen_eval"]),environmentPolicy:e.discriminatedUnion("kind",[e.object({kind:e.literal("resettable"),environmentHash:d}).strict(),e.object({kind:e.literal("frozen_observations"),environmentHash:d}).strict()]),maximumCostUsd:e.number().finite().positive().max(1e4),maximumDurationMs:e.number().int().min(1e3).max(864e5),maximumModelSteps:e.number().int().min(1).max(1e3),contentHash:d}).strict();function M(r){let t=_.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Advanced Refiner evaluation admission changed.");let o=g(t.externalDatasetBinding);if(o.profileId!==t.profileRef.profileId||o.protectedProfileClosureHash!==t.privateClosureHash)throw new Error("Advanced evaluation changed its Profile or protected evaluator closure.");if(t.adaptationSplit===t.holdoutSplit||new Set([...t.adaptationTaskIds,...t.holdoutTaskIds]).size!==t.adaptationTaskIds.length+t.holdoutTaskIds.length)throw new Error("Adaptation and private holdout must be disjoint ordered cases.");let p=g(t.adaptationDatasetBinding);if(p.profileId!==o.profileId||p.packageHash!==o.packageHash||s(p.dataset)!==s(o.dataset)||s(p.target)!==s(o.target)||p.protectedProfileClosureHash!==o.protectedProfileClosureHash)throw new Error("This native advanced adapter needs separate adaptation and holdout recipes from the same exact released package and target.");if(p.split!==t.adaptationSplit||o.split!==t.holdoutSplit)throw new Error("Advanced split policies differ from their exact admitted recipes.");let q=new Set(o.population.map(u=>u.taskId)),z=new Set(p.population.map(u=>u.taskId));if(t.holdoutTaskIds.some(u=>!q.has(u))||t.adaptationTaskIds.some(u=>!z.has(u)))throw new Error("Advanced evaluation selected cases outside its exact Dataset recipe.");return t}m(M,"verifyAdvancedRefinerEvaluationPin");function ce(r){return M({...r,contentHash:s(r)})}m(ce,"sealAdvancedRefinerEvaluationPin");var B=e.object({pin:_,modelId:a,profileId:a,model:y,seed:e.number().int(),reasoningEffort:e.enum(["none","off","low","medium","high","xhigh","max"]).nullable()}).strict(),V=e.discriminatedUnion("operation",[e.object({operation:e.literal("start"),request:B}).strict(),e.object({operation:e.enum(["read","cancel","resume"]),id:a}).strict(),e.object({operation:e.literal("list")}).strict()]),W=e.object({taskId:a,sourceCaseHash:d,reviewSessionId:a,reviewTurnId:a,inputHarness:i,trigger:i,decision:e.enum(["no_action","route_deterministically","queue_refiner"]),outcome:i.nullable(),proposal:i.nullable(),validations:e.array(i).max(100),grade:e.object({id:a,contentHash:d,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),failureClass:e.string().nullable()}).strict(),resetComplete:e.boolean()}).strict(),$=e.object({schemaVersion:e.literal("openpond.advancedRefinerReviewReceipt.v1"),id:a,runId:a,pinHash:d,ownerActorId:a,teamId:a,privateClosureHash:d,refinerRelease:i,cases:e.array(W).min(1).max(1e4),reviewScore:e.number().min(0).max(1).nullable(),completedCases:e.number().int().nonnegative(),noActionCases:e.number().int().nonnegative(),routedCases:e.number().int().nonnegative(),proposalCases:e.number().int().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),cleanupComplete:e.boolean(),createdAt:e.string().datetime(),contentHash:d}).strict();function de(r){return $.parse({...r,contentHash:s(r)})}m(de,"sealAdvancedRefinerReviewReceipt");var P=S.shape.profiles.element,me=S.extend({profiles:e.array(P.extend({components:e.array(P.shape.components.element.extend({adaptationSplits:e.array(e.object({split:e.enum(["train","validation","test","frozen_eval"]),taskIds:e.array(a)})),environmentHash:d,resettable:e.boolean(),reviewQuality:e.boolean()}))})),refinerReleases:e.array(i),activeRefiner:i.nullable(),models:e.array(e.object({id:a,profileId:a,name:e.string(),location:e.enum(["local","hosted"])}))}),L=e.object({operation:e.literal("prepare"),evidence:i,profileOptionId:a,componentLabel:a,mode:e.enum(["review_quality","downstream_adaptation"]),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),operationId:a,refinerRelease:i,maximumCostUsd:e.number().positive(),maximumDurationMs:e.number().int().positive(),maximumModelSteps:e.number().int().positive()}).strict(),le=e.union([V,L,e.object({operation:e.literal("options"),evidence:i}).strict()]),pe=e.object({modelRequests:e.number().int().nonnegative(),knownSpendUsd:e.number().nonnegative(),totalSpendUsd:e.number().nonnegative().nullable(),heldUsd:e.number().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict();export{C as a,x as b,D as c,X as d,Y as e,T as f,Z as g,S as h,U as i,ee as j,_ as k,M as l,ce as m,B as n,V as o,W as p,$ as q,de as r,L as s,pe as t};
|
|
2
|
+
import{a as j}from"./chunk-WGX7WY4N.js";import{j as y}from"./chunk-A66CSUBJ.js";import{e as i,l as s}from"./chunk-SPDSSMFD.js";import{c as H,d as w,f as k}from"./chunk-KNO355LC.js";import{Fb as f,Kb as h,Nb as I,Ob as E,cb as v,db as g}from"./chunk-RCA6NGVA.js";import{A as e}from"./chunk-PF56N7ZY.js";import{a as m}from"./chunk-FTQLQJQV.js";var A=e.object({sourcePass:i,graders:j.shape.graders,mappings:j.shape.mappings,maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),C=e.object({externalDatasetBinding:v,scoring:A.optional(),modelId:e.string().min(1).max(300),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),R=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}).strict(),n=e.string().min(1).max(240),c=e.string().regex(/^[a-f0-9]{64}$/),x=e.object({schemaVersion:e.literal("openpond.experimentImprovement.v1"),id:n,operationId:n,requestHash:c,actorId:n,teamId:n,projectId:n.nullable(),ownerWorkspaceId:n,ownerRevision:e.number().int().nonnegative(),ownerSourceRevision:e.string().min(1).max(500),baseRelease:i,profileRef:R,baseProfileSourceRevision:e.string().min(1).max(500),evidence:e.object({manifest:f,result:h}).strict(),component:e.object({kind:e.enum(["skill","workflow","agent","instruction"]),path:e.string().min(1).max(2e3),workflowId:n.optional()}).strict(),mode:e.enum(["manual","llm_assisted"]),status:e.enum(["draft","authoring_queued","authoring","frozen","testing","ready_for_review","adopting","accepted","rolled_back","declined","failed","cancelled"]),revision:e.number().int().positive(),limits:e.object({maximumCostUsd:e.number().finite().positive(),maximumAuthoringSteps:e.number().int().min(1).max(500),maximumDurationMs:e.number().int().min(1e3).max(864e5)}).strict(),authoringSteps:e.number().int().nonnegative().max(500),work:e.object({sessionId:n,turnId:n,revision:e.number().int().positive(),startedAt:e.string().datetime()}).strict().nullable(),frozen:e.object({release:i,sourceRevision:e.string().min(1).max(500),profileSourceRevision:e.string().min(1).max(500),authoringHash:c,partitionHash:c,executableSourceHash:c,protectedClosureHash:c,candidateRevision:e.number().int().positive(),diff:e.array(e.object({path:e.string(),before:c.nullable(),after:c.nullable()}).strict()).max(1e4)}).strict().nullable(),test:e.object({recipe:C,recipeHash:e.string().regex(/^[a-f0-9]{64}$/),baselineOperationId:e.string(),candidateOperationId:e.string(),cancelRequestedAt:e.string().datetime().nullable(),dispatching:e.object({kind:e.enum(["baseline","candidate"]),token:n,pid:e.number().int().positive(),processStart:e.string().nullable(),startedAt:e.string().datetime()}).strict().nullable()}).strict().nullable(),comparison:e.object({baseline:e.object({manifest:f,result:h}).strict(),candidate:e.object({manifest:f,result:h}).strict(),frozenHash:c,humanProjection:w.optional()}).strict().nullable(),adoptionIntent:e.object({operationId:n,expectedOwnerRevision:e.number().int().nonnegative(),frozenHash:c,humanProjection:w.optional()}).strict().nullable(),acceptance:i.nullable(),rollback:i.nullable(),error:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime(),contentHash:c}).strict();function D(r){let t=x.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Improvement state integrity failed.");if(I(t.evidence),t.evidence.manifest.teamId!==t.teamId||t.evidence.result.status!=="completed"||!t.evidence.result.cases.some(o=>o.status==="completed"))throw new Error("Improvement requires usable completed owner evidence.");if(t.test&&(s(t.test.recipe)!==t.test.recipeHash||g(t.test.recipe.externalDatasetBinding).profileId!==t.profileRef.profileId))throw new Error("The test recipe changed its exact selected Profile.");if(t.comparison?.humanProjection){let o=k(t.comparison.humanProjection);if(o.teamId!==t.teamId||o.projectId!==t.projectId||s(o.baseline)!==s(t.comparison.baseline)||s(o.candidate)!==s(t.comparison.candidate))throw new Error("Human comparison projection differs from its exact owner evidence.")}if(t.comparison&&(I(t.comparison.baseline),I(t.comparison.candidate),!t.frozen||t.comparison.frozenHash!==s(t.frozen)||!E(t.comparison.baseline,t.comparison.candidate).comparable))throw new Error("Improvement comparison is not bound to a comparable frozen candidate.");if(t.status==="ready_for_review"&&(!t.frozen||!t.comparison))throw new Error("Improvement is missing qualification.");if(t.status==="adopting"&&(!t.adoptionIntent||!t.frozen||t.adoptionIntent.frozenHash!==s(t.frozen)))throw new Error("Improvement adoption intent is not bound to its tested revision.");if(t.status==="accepted"&&(!t.acceptance||!t.comparison||!t.frozen))throw new Error("Improvement acceptance is missing its exact qualification receipt.");if(t.status==="rolled_back"&&(!t.acceptance||!t.rollback))throw new Error("Profile rollback is missing its durable owner receipt.");return t}m(D,"verifyExperimentImprovementState");function X(r){return D({...r,contentHash:s(r)})}m(X,"sealExperimentImprovementState");var Y=e.object({states:e.array(x).max(50),nextCursor:n.nullable()}).strict(),T=e.object({operationId:n,ownerWorkspaceId:n,expectedOwnerRevision:e.number().int().nonnegative(),baseRelease:i,profileRef:R,profileSourceRevision:e.string().min(1).max(500),projectId:n.nullable(),evidence:i,component:x.shape.component,mode:x.shape.mode,limits:x.shape.limits}).strict(),Z=e.discriminatedUnion("operation",[e.object({operation:e.literal("list"),limit:e.number().int().min(1).max(50).default(30),cursor:n.optional()}).strict(),e.object({operation:e.literal("options"),evidence:i}).strict(),e.object({operation:e.literal("start"),request:T}).strict(),e.object({operation:e.enum(["read","humanComparisonOptions"]),id:n}).strict(),e.object({operation:e.literal("instructions"),id:n}).strict(),e.object({operation:e.literal("edit"),id:n,revision:e.number().int().positive(),expectedFileHash:c,text:e.string().max(25e4)}).strict(),e.object({operation:e.literal("mode"),id:n,revision:e.number().int().positive(),mode:e.enum(["manual","llm_assisted"])}).strict(),e.object({operation:e.literal("author"),id:n,revision:e.number().int().positive(),modelId:n,prompt:e.string().min(1).max(2e4)}).strict(),e.object({operation:e.enum(["freeze","finishAuthoring","useCandidate","discard","cancel","rollback"]),id:n,revision:e.number().int().positive()}).strict(),e.object({operation:e.literal("test"),id:n,revision:e.number().int().positive(),recipe:C}).strict(),e.object({operation:e.literal("compare"),id:n,revision:e.number().int().positive(),baseline:i,candidate:i,humanSelections:H.optional()}).strict()]),S=e.object({teamId:n,evidence:i,scoring:A.optional(),profiles:e.array(e.object({id:c,name:e.string(),profileRef:R,ownerWorkspaceId:n,ownerRevision:e.number().int().nonnegative(),baseRelease:i,profileSourceRevision:e.string(),components:e.array(e.object({kind:e.enum(["skill","instruction","agent","workflow"]),path:e.string(),agentId:e.string().optional(),workflowId:e.string().optional(),label:e.string(),binding:v}).strict()).max(500)}).strict()).max(100)}).strict(),O=e.object({candidateId:n,actorId:n,teamId:n,projectId:n.nullable(),candidateRevision:e.number().int().positive(),recipeHash:c,baseline:e.object({manifest:f,result:h}).strict(),candidate:e.object({manifest:f,result:h}).strict(),contentHash:c}).strict();function U(r){let t=O.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Accepted Human discovery integrity failed.");for(let o of[t.baseline,t.candidate])if(I(o),o.manifest.teamId!==t.teamId||o.manifest.lineage?.humanProjection)throw new Error("Discovery must retain original owner evidence.");return t}m(U,"verifyExperimentImprovementHumanOptions");function ee(r,t){if(!r.test||r.test.cancelRequestedAt)throw new Error("The paired test is unavailable.");let l={candidateId:r.id,actorId:r.actorId,teamId:r.teamId,projectId:r.projectId,candidateRevision:r.revision,recipeHash:r.test.recipeHash,...t};return U({...l,contentHash:s(l)})}m(ee,"sealExperimentImprovementHumanOptions");var a=e.string().trim().min(1).max(240),d=e.string().regex(/^[a-f0-9]{64}$/),_=e.object({schemaVersion:e.literal("openpond.advancedRefinerEvaluation.v1"),operationId:a,actorId:a,teamId:a,projectId:a.nullable(),mode:e.enum(["review_quality","downstream_adaptation"]),profileRef:e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:a,profileId:a}).strict(),sourceRevision:e.string().min(1).max(500),baselineRelease:i,refinerRelease:i,evidence:i,externalDatasetBinding:v,adaptationDatasetBinding:v,privateClosureHash:d,adaptationTaskIds:e.array(a).min(1).max(1e4),holdoutTaskIds:e.array(a).min(1).max(1e4),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),holdoutSplit:e.enum(["train","validation","test","frozen_eval"]),environmentPolicy:e.discriminatedUnion("kind",[e.object({kind:e.literal("resettable"),environmentHash:d}).strict(),e.object({kind:e.literal("frozen_observations"),environmentHash:d}).strict()]),maximumCostUsd:e.number().finite().positive().max(1e4),maximumDurationMs:e.number().int().min(1e3).max(864e5),maximumModelSteps:e.number().int().min(1).max(1e3),contentHash:d}).strict();function M(r){let t=_.parse(r),{contentHash:l,...b}=t;if(s(b)!==l)throw new Error("Advanced Refiner evaluation admission changed.");let o=g(t.externalDatasetBinding);if(o.profileId!==t.profileRef.profileId||o.protectedProfileClosureHash!==t.privateClosureHash)throw new Error("Advanced evaluation changed its Profile or protected evaluator closure.");if(t.adaptationSplit===t.holdoutSplit||new Set([...t.adaptationTaskIds,...t.holdoutTaskIds]).size!==t.adaptationTaskIds.length+t.holdoutTaskIds.length)throw new Error("Adaptation and private holdout must be disjoint ordered cases.");let p=g(t.adaptationDatasetBinding);if(p.profileId!==o.profileId||p.packageHash!==o.packageHash||s(p.dataset)!==s(o.dataset)||s(p.target)!==s(o.target)||p.protectedProfileClosureHash!==o.protectedProfileClosureHash)throw new Error("This native advanced adapter needs separate adaptation and holdout recipes from the same exact released package and target.");if(p.split!==t.adaptationSplit||o.split!==t.holdoutSplit)throw new Error("Advanced split policies differ from their exact admitted recipes.");let q=new Set(o.population.map(u=>u.taskId)),z=new Set(p.population.map(u=>u.taskId));if(t.holdoutTaskIds.some(u=>!q.has(u))||t.adaptationTaskIds.some(u=>!z.has(u)))throw new Error("Advanced evaluation selected cases outside its exact Dataset recipe.");return t}m(M,"verifyAdvancedRefinerEvaluationPin");function ce(r){return M({...r,contentHash:s(r)})}m(ce,"sealAdvancedRefinerEvaluationPin");var B=e.object({pin:_,modelId:a,profileId:a,model:y,seed:e.number().int(),reasoningEffort:e.enum(["none","off","low","medium","high","xhigh","max"]).nullable()}).strict(),V=e.discriminatedUnion("operation",[e.object({operation:e.literal("start"),request:B}).strict(),e.object({operation:e.enum(["read","cancel","resume"]),id:a}).strict(),e.object({operation:e.literal("list")}).strict()]),W=e.object({taskId:a,sourceCaseHash:d,reviewSessionId:a,reviewTurnId:a,inputHarness:i,trigger:i,decision:e.enum(["no_action","route_deterministically","queue_refiner"]),outcome:i.nullable(),proposal:i.nullable(),validations:e.array(i).max(100),grade:e.object({id:a,contentHash:d,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),failureClass:e.string().nullable()}).strict(),resetComplete:e.boolean()}).strict(),$=e.object({schemaVersion:e.literal("openpond.advancedRefinerReviewReceipt.v1"),id:a,runId:a,pinHash:d,ownerActorId:a,teamId:a,privateClosureHash:d,refinerRelease:i,cases:e.array(W).min(1).max(1e4),reviewScore:e.number().min(0).max(1).nullable(),completedCases:e.number().int().nonnegative(),noActionCases:e.number().int().nonnegative(),routedCases:e.number().int().nonnegative(),proposalCases:e.number().int().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),cleanupComplete:e.boolean(),createdAt:e.string().datetime(),contentHash:d}).strict();function de(r){return $.parse({...r,contentHash:s(r)})}m(de,"sealAdvancedRefinerReviewReceipt");var P=S.shape.profiles.element,me=S.extend({profiles:e.array(P.extend({components:e.array(P.shape.components.element.extend({adaptationSplits:e.array(e.object({split:e.enum(["train","validation","test","frozen_eval"]),taskIds:e.array(a)})),environmentHash:d,resettable:e.boolean(),reviewQuality:e.boolean()}))})),refinerReleases:e.array(i),activeRefiner:i.nullable(),models:e.array(e.object({id:a,profileId:a,name:e.string(),location:e.enum(["local","hosted"])}))}),L=e.object({operation:e.literal("prepare"),evidence:i,profileOptionId:a,componentLabel:a,mode:e.enum(["review_quality","downstream_adaptation"]),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),operationId:a,refinerRelease:i,maximumCostUsd:e.number().positive(),maximumDurationMs:e.number().int().positive(),maximumModelSteps:e.number().int().positive()}).strict(),le=e.union([V,L,e.object({operation:e.literal("options"),evidence:i}).strict()]),pe=e.object({modelRequests:e.number().int().nonnegative(),knownSpendUsd:e.number().nonnegative(),totalSpendUsd:e.number().nonnegative().nullable(),heldUsd:e.number().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict();export{C as a,x as b,D as c,X as d,Y as e,T as f,Z as g,S as h,U as i,ee as j,_ as k,M as l,ce as m,B as n,V as o,W as p,$ as q,de as r,L as s,pe as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{Ib as P,Lb as h,Mb as E}from"./chunk-
|
|
2
|
+
import{Ib as P,Lb as h,Mb as E}from"./chunk-M55H7KVR.js";import{b as u,m as f}from"./chunk-BIPQCJ5V.js";import{A as d}from"./chunk-PF56N7ZY.js";import{a as c}from"./chunk-FTQLQJQV.js";var S=d.object({id:u,runIds:d.array(u).min(2).max(100)}).strict();function j(r){return async s=>{let i=S.parse(s),l=await r.selectedProfile();if(!l)throw new Error("Select a Profile before comparing its evaluation runs.");let a=[];for(let e of i.runIds){let t=await r.store.getProfileEvaluationRun(e);if(!t||f(t.profileRef)!==f(l.ref))throw new Error(`Profile evaluation run ${e} is unavailable in the selected Profile.`);a.push({manifest:t.manifest,result:t.metric})}let o=await r.store.getProfileEvaluationComparison(i.id),n=P({id:i.id,members:a,createdAt:o?.createdAt??new Date().toISOString()});return r.store.saveProfileEvaluationComparison(l.ref,n)}}c(j,"createProfileEvaluationComparisonService");import{promises as m}from"node:fs";import v from"node:path";var y=d.object({id:u,evidenceKind:d.enum(["run","suite","comparison"]),evidenceId:u}).strict();function w(r){return v.join(r,"evals","reports")}c(w,"reportDirectory");async function R(r){let s=await m.lstat(r).catch(i=>{if(i.code==="ENOENT")return null;throw i});if(s&&(!s.isDirectory()||s.isSymbolicLink()))throw new Error("Profile evaluation report directory must be a regular directory.");s||await m.mkdir(r)}c(R,"ensureRegularDirectory");async function k(r){let s,i;if(r.evidenceKind==="run")s=[r.evidenceId],i="";else if(r.evidenceKind==="suite"){let o=await r.store.getProfileEvaluationSuiteRun(r.evidenceId);if(!o||o.profileId!==r.profileRef.profileId)throw new Error("Profile evaluation suite is unavailable.");s=o.members.map(n=>n.runManifest.id),i=o.contentHash}else{let o=await r.store.getProfileEvaluationComparison(r.evidenceId);if(!o)throw new Error("Profile evaluation comparison is unavailable.");s=o.members.map(n=>n.runManifest.id),i=o.contentHash}let l=await Promise.all(s.map(o=>r.store.getProfileEvaluationRun(o)));if(l.some(o=>!o||f(o.profileRef)!==f(r.profileRef)))throw new Error("Profile evaluation report is missing authorized run evidence.");let a=l;if(r.evidenceKind==="run"&&(i=a[0].contentHash),r.evidenceKind!=="run"){let o=r.evidenceKind==="suite"?(await r.store.getProfileEvaluationSuiteRun(r.evidenceId)).members.map(n=>n.runHash):(await r.store.getProfileEvaluationComparison(r.evidenceId)).members.map(n=>n.metricResultHash);for(let[n,e]of a.entries())if(r.evidenceKind==="suite"&&o[n]!==e.contentHash||r.evidenceKind==="comparison"&&o[n]!==e.metric.contentHash)throw new Error("Profile evaluation report evidence differs from retained member runs.")}return{runs:a,primary:{kind:r.evidenceKind,id:r.evidenceId,contentHash:i}}}c(k,"loadRuns");async function H(r){let s=y.parse(r.request),{runs:i,primary:l}=await k({store:r.store,profileRef:r.profileRef,evidenceKind:s.evidenceKind,evidenceId:s.evidenceId}),a=c(e=>[...new Map(e.map(t=>[f(t),t])).values()],"unique"),o=a(i.map(e=>f(e.manifest.metricPolicy))),n=i.map(e=>e.metric.value).filter(e=>e!==null);return h({schemaVersion:"openpond.profileEvaluationReport.v1",id:s.id,createdAt:new Date().toISOString(),testedSources:a(i.map(e=>({profileId:e.manifest.profileEvaluation.profileId,sourceRevision:e.manifest.profileEvaluation.sourceRevision,harnessRelease:e.manifest.profileEvaluation.harnessRelease}))),tasksetReleases:a(i.map(e=>e.manifest.tasksetRelease)),metricPolicyHashes:o,modelConfigurationHashes:a(i.map(e=>e.manifest.policy.kind==="model"?e.manifest.policy.configurationHash:f(e.manifest.policy))),evidence:[l,...i.filter(e=>l.kind!=="run"||e.manifest.id!==l.id).map(e=>({kind:"run",id:e.manifest.id,contentHash:e.contentHash}))],summary:{totalChecks:i.length,passedChecks:i.filter(e=>e.passed).length,failedChecks:i.filter(e=>!e.passed&&e.metric.value!==null).length,unscoredChecks:i.filter(e=>!e.passed&&e.metric.value===null).length,meanScore:o.length===1&&n.length===i.length?n.reduce((e,t)=>e+t,0)/n.length:null}})}c(H,"buildProfileEvaluationReport");function q(r){return{list:c(async()=>{let l=await r.selectedProfile();if(!l)return[];let a=w(l.sourcePath),o=await m.lstat(a).catch(t=>{if(t.code==="ENOENT")return null;throw t});if(!o)return[];if(!o.isDirectory()||o.isSymbolicLink())throw new Error("Profile evaluation report directory is unsafe.");let n=await m.readdir(a,{withFileTypes:!0});return(await Promise.all(n.filter(t=>t.name.endsWith(".json")).map(async t=>{if(!t.isFile()||t.isSymbolicLink())throw new Error("Profile evaluation report must be a regular file.");let p=E(JSON.parse(await m.readFile(v.join(a,t.name),"utf8")));if(`${p.id}.json`!==t.name||p.testedSources.some(g=>g.profileId!==l.ref.profileId))throw new Error("Profile evaluation report differs from its source location.");return p}))).sort((t,p)=>p.createdAt.localeCompare(t.createdAt))},"list"),save:c(async l=>{let a=await r.selectedProfile();if(!a?.gitBacked)throw new Error("Select a Git-backed Profile before saving an evaluation report.");let o=await H({store:r.store,profileRef:a.ref,request:l}),n=v.join(a.sourcePath,"evals");await R(n);let e=w(a.sourcePath);return await R(e),await m.writeFile(v.join(e,`${o.id}.json`),`${JSON.stringify(o,null,2)}
|
|
3
3
|
`,{flag:"wx"}),o},"save")}}c(q,"createProfileEvaluationReportService");export{j as a,H as b,q as c};
|