openpond 0.2.67 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +668 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
- package/dist/chunks/{acp-NASAJV5E.js → acp-2OIXATRY.js} +1 -1
- package/dist/chunks/{acp-agent-C3CRF6DT.js → acp-agent-PAGX2B47.js} +1 -1
- package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
- package/dist/chunks/{app-layer-XIEZ6ALX.js → app-layer-YNEUEOEP.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
- package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
- package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
- package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
- package/dist/chunks/apps-RSFEJOQN.js +2 -0
- package/dist/chunks/chunk-2PXKSAG6.js +2 -0
- package/dist/chunks/{chunk-XEU4J4GJ.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-AXO6OHJB.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/{chunk-V3T2OJBZ.js → chunk-4BUM6JEC.js} +2 -2
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-43QYVOYA.js → chunk-4KNPCJR4.js} +1 -1
- package/dist/chunks/chunk-4KTGYHCE.js +2 -0
- package/dist/chunks/chunk-4PUOWSDE.js +13 -0
- package/dist/chunks/chunk-55YD4UTW.js +2 -0
- package/dist/chunks/chunk-5G7BQAUA.js +2 -0
- package/dist/chunks/chunk-65FJWWXG.js +2 -0
- package/dist/chunks/{chunk-4EZI4KCT.js → chunk-65WRWLUD.js} +1 -1
- package/dist/chunks/chunk-6D3FI2XT.js +2 -0
- package/dist/chunks/chunk-73TW6BKK.js +6 -0
- package/dist/chunks/{chunk-5TPYBXWM.js → chunk-7NCM6GBN.js} +1 -1
- package/dist/chunks/chunk-7OFD6TFD.js +2 -0
- package/dist/chunks/chunk-7OKZCJHS.js +3 -0
- package/dist/chunks/{chunk-ADOCQA4D.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-YR5URT73.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-FVK4W27G.js → chunk-AFH462DO.js} +1 -1
- package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
- package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
- package/dist/chunks/{chunk-U3MVH2YT.js → chunk-APKXXAUF.js} +1 -1
- package/dist/chunks/chunk-AQUZCWM3.js +2 -0
- package/dist/chunks/chunk-AUO5DCEU.js +2 -0
- package/dist/chunks/chunk-AYOMVI7J.js +2 -0
- package/dist/chunks/{chunk-RWRKUO5D.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/{chunk-SODAOLAP.js → chunk-BHKXPWFB.js} +1 -1
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-P6NQYXN6.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-YONDU5TN.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-ATFV2NA4.js → chunk-CO23RRN7.js} +1 -1
- package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
- package/dist/chunks/chunk-DDOIPTOM.js +2 -0
- package/dist/chunks/{chunk-CSU7RDA5.js → chunk-DKOVZ6R2.js} +3 -3
- package/dist/chunks/chunk-DRLP7GIU.js +2 -0
- package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
- package/dist/chunks/{chunk-XDFXKRTI.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/{chunk-W3ZILZUL.js → chunk-DWM5G7BU.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-IDILAYCW.js → chunk-E2JB5OCO.js} +1 -1
- package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
- package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
- package/dist/chunks/{chunk-CX7HKSQ4.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-D5OFN47Z.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-R6VI7MX5.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/chunk-FKUWCJ73.js +161 -0
- package/dist/chunks/{chunk-WD6ANOLL.js → chunk-FNGZ4UDZ.js} +1 -1
- package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
- package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
- package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
- package/dist/chunks/{chunk-CWAQOFLP.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-YQBL5P6R.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/{chunk-VEXJV5H5.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-B2K5WQZE.js → chunk-IO5DZUKL.js} +1 -1
- package/dist/chunks/chunk-J256AEEE.js +2 -0
- package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
- package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
- package/dist/chunks/{chunk-YMCF5GR2.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-6LFTQBXP.js → chunk-JT5YQ52I.js} +1 -1
- package/dist/chunks/chunk-JVMSN7LH.js +2 -0
- package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
- package/dist/chunks/{chunk-WDKZMXIU.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-UBTP3QWI.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-IXZ5ZGIL.js → chunk-KOC3YJEU.js} +2 -2
- package/dist/chunks/{chunk-R6MMWEH4.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-TV2LE2BD.js → chunk-KU4TPDPH.js} +2 -2
- package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
- package/dist/chunks/chunk-LVXL7T5O.js +2 -0
- package/dist/chunks/{chunk-TSQ2I6XV.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-MX7KV5DA.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/{chunk-26ID6A5C.js → chunk-MEJLWNRS.js} +1 -1
- package/dist/chunks/{chunk-XT5WUQGT.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-4VZJQRQI.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-UKSSFB4Q.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-4B7EGNYX.js → chunk-NMMHXYDJ.js} +1 -1
- package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
- package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
- package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
- package/dist/chunks/chunk-OIH2LPIT.js +2 -0
- package/dist/chunks/chunk-OUJ63LMU.js +2 -0
- package/dist/chunks/{chunk-SD2XDZQW.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-VPAEFG7X.js → chunk-PAYFJHPO.js} +1 -1
- package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
- package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
- package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
- package/dist/chunks/{chunk-UNE52L3Y.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-2RSGVLZT.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-SVNEPXU3.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-IF5A3XWP.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-V5AOM5MZ.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-375PADDM.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-QQLS5FB7.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-6HQUIKC5.js → chunk-R4EEGWXB.js} +1 -1
- package/dist/chunks/chunk-RBTDSI4L.js +11 -0
- package/dist/chunks/chunk-RCQYEHHD.js +2 -0
- package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
- package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
- package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
- package/dist/chunks/{chunk-K3LS5SK7.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-XKZ4PFMQ.js → chunk-SO4GMSNP.js} +1 -1
- package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
- package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
- package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
- package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
- package/dist/chunks/{chunk-N54CPLVD.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-BUZ7CBJC.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-V3ILZQER.js → chunk-UMAVVMXL.js} +7 -7
- package/dist/chunks/chunk-V24VHT76.js +2 -0
- package/dist/chunks/chunk-VEBW7NKD.js +2 -0
- package/dist/chunks/chunk-VJR2GNRY.js +2 -0
- package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
- package/dist/chunks/{chunk-H2XG5N7D.js → chunk-VWWKWYSQ.js} +1 -1
- package/dist/chunks/chunk-WCNPGKST.js +2 -0
- package/dist/chunks/chunk-WD4KAKEX.js +2 -0
- package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
- package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
- package/dist/chunks/{chunk-RS526BG7.js → chunk-WZ35ICTE.js} +3 -3
- package/dist/chunks/chunk-XHACK2KR.js +2 -0
- package/dist/chunks/chunk-XOPHFUUY.js +2 -0
- package/dist/chunks/{chunk-YKTJPCYZ.js → chunk-XQAUHXL4.js} +4 -4
- package/dist/chunks/{chunk-ZVMQLIRA.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-KQD36SBJ.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-UXO33ST5.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-GC6RJBRZ.js → chunk-Y2WNZWT2.js} +1 -1
- package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
- package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
- package/dist/chunks/chunk-YI6ME6PU.js +22 -0
- package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
- package/dist/chunks/{chunk-QFL2VQKX.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/{chunk-OY4B7Y3T.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-XGJG2ZKE.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-IR2Y2VQY.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/{command-NWOZXU57.js → command-LNOVZQSK.js} +3 -3
- package/dist/chunks/{configuration-command-ZEIBQKB3.js → configuration-command-CNITTZRP.js} +1 -1
- package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
- package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
- package/dist/chunks/{connected-starting-assets-66Y46ZPM.js → connected-starting-assets-KWOFEIE4.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-TNPTWTKK.js → continual-FVOLGGOE.js} +1 -1
- package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
- package/dist/chunks/datasets-E5TXSVIY.js +2 -0
- package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
- package/dist/chunks/dist-2MKJC6HN.js +2 -0
- package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
- package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
- package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
- package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
- package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
- package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
- package/dist/chunks/{help-O53DTZGN.js → help-K6YLZ3KL.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
- package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
- package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
- package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
- package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
- package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
- package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
- package/dist/chunks/{import-OBAKUJPM.js → import-YHYKZ6JN.js} +2 -2
- package/dist/chunks/{learning-CRR6NRPN.js → learning-LAXMGWSQ.js} +1 -1
- package/dist/chunks/learning-Y3UKNUGE.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
- package/dist/chunks/{model-projects-HP4DELCP.js → model-projects-6YWVD2TS.js} +1 -1
- package/dist/chunks/opchat-XXI2ZM53.js +3 -0
- package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
- package/dist/chunks/organizations-W7HI2JA4.js +2 -0
- package/dist/chunks/{profile-3WZJ65CT.js → profile-P2SJPBOJ.js} +1 -1
- package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
- package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
- package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
- package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
- package/dist/chunks/{runtime-XP4DEGR3.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
- package/dist/chunks/{sandbox-template-YFMHEMUQ.js → sandbox-template-U536EEWY.js} +1 -1
- package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
- package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
- package/dist/chunks/setup-RMZ2BHLM.js +2 -0
- package/dist/chunks/{src-GQPWOPYA.js → src-C3ZUESMK.js} +1 -1
- package/dist/chunks/src-SGQYVBNQ.js +424 -0
- package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
- package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-VVRQO2JK.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
- package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
- package/dist/chunks/{store-create-improve-2XI36AET.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-UFY422NG.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-SGUEYDO2.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
- package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
- package/dist/chunks/{store-learning-BFOT4QVT.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-DYTMWQTC.js → store-learning-credentials-BUHR7SN6.js} +1 -1
- package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
- package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
- package/dist/chunks/{store-model-configuration-NJFWSYSA.js → store-model-configuration-6L3OYXF4.js} +1 -1
- package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
- package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
- package/dist/chunks/{store-preference-comparison-MZAYONCK.js → store-preference-comparison-5YVIQNVB.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
- package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
- package/dist/chunks/{store-task-inbox-3BREANOX.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-5HRZCDUT.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-S3FXWLT6.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-2LCXPA7G.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-7AMKS7ZW.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-PLKWRT4X.js → taskset-UDDLFYKV.js} +1 -1
- package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
- package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
- package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
- package/dist/chunks/{teams-bot-VQXUA7U4.js → teams-bot-MPWL2PP4.js} +1 -1
- package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
- package/dist/chunks/training-5NT2YB2L.js +2 -0
- package/dist/chunks/training-5UMT45UL.js +2 -0
- package/dist/chunks/training-UY6KRG4M.js +2 -0
- package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
- package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
- package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
- package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
- package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
- package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
- package/dist/chunks/{training-hosted-learning-WQ2IP5FP.js → training-hosted-learning-E2N32YU5.js} +1 -1
- package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
- package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
- package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
- package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
- package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
- package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
- package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/types/billing.d.ts +87 -6
- package/dist/sandbox/types/io.d.ts +3 -0
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
- package/dist/web/assets/App-CCuh99JW.js +54 -0
- package/dist/web/assets/{AppDialog-BvskhHE9.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-D2788RqX.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-DVluUHuc.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-DdBZ69lI.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-ba6WupeJ.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-D7wTaEgl.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-aO90qXYz.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-BPUJBSyS.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-Bo836wKJ.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
- package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
- package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
- package/dist/web/assets/{FilePagePreview-C6wIp6uX.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-CxMv8q-h.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-CEb0cS-o.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
- package/dist/web/assets/{HtmlVisual-CCuUkYT8.js → HtmlVisual-D5y2WG9L.js} +10 -10
- package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
- package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
- package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-CFROlATQ.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
- package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
- package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
- package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
- package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
- package/dist/web/assets/{MainPane-BOWkynGB.css → MainPane-BZlNLfTM.css} +1 -1
- package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
- package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
- package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-MAJWS4mL.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-MQiUBVx3.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-DpF-aRTu.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-8gH2hyDb.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BQ98oGyu.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-CGCqZz_H.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-CqpMFLxy.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-DJvIvzBb.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-D--M876l.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-DDUoHQHU.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-CwLXn3Z7.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CGwPregx.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-D-ctFM4d.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-CQ28j3R7.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BrZs6-EW.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-CU6PSjjN.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-IjXVXpIy.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-CKXrDTEU.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-D9v2cyJa.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
- package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
- package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
- package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
- package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
- package/dist/web/assets/{chunk-TLSP5JKG-BrrVo5rJ.js → chunk-3BYFS4RO-ztZjcMmt.js} +1 -1
- package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
- package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
- package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
- package/dist/web/assets/{chunk-H3JZ3P5T-CzpTARDY.js → chunk-H3JZ3P5T-DolwEJXo.js} +2 -2
- package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
- package/dist/web/assets/client-DwZ92xtu.js +1 -0
- package/dist/web/assets/{client-choice-storage-DUWsS4X0.js → client-choice-storage-DitqKiIT.js} +1 -1
- package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
- package/dist/web/assets/common-BWVSBnpX.js +1 -0
- package/dist/web/assets/copy-DTQhoBNg.js +1 -0
- package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
- package/dist/web/assets/{cssMode-SclUkqPt.js → cssMode-BRTtfXxU.js} +1 -1
- package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
- package/dist/web/assets/external-link-H1629UU6.js +1 -0
- package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
- package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
- package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
- package/dist/web/assets/{htmlMode-X3mQtOeh.js → htmlMode-BVaCcL76.js} +1 -1
- package/dist/web/assets/icons-Bk2b68aC.js +1 -0
- package/dist/web/assets/image-0DPVY6Ev.js +1 -0
- package/dist/web/assets/{index-LXNhSUEL.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/{intake-contracts-wCkD2ErR.js → intake-contracts-B8JZKYwb.js} +1 -1
- package/dist/web/assets/{jsonMode-BoKiIdHd.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-CO2mzpy1.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
- package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
- package/dist/web/assets/message-square-C889vRqm.js +1 -0
- package/dist/web/assets/{monaco.contribution-wacA5FjV.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CVe3mWSY.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-hrusiaZi.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C7CAQIKF.js → monaco.contribution-DxAV1oS5.js} +2 -2
- package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
- package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
- package/dist/web/assets/{pdf-Ct3M2mVw.js → pdf-perlzwEB.js} +1 -1
- package/dist/web/assets/play-CHXXdkuO.js +1 -0
- package/dist/web/assets/plus-DFFWjhPw.js +1 -0
- package/dist/web/assets/{ponder-desktop-D-zB6X4L.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-CCxrOCio.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-C0-pUUAU.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-DjSt-duM.js → requests-DmeUYik4.js} +1 -1
- package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
- package/dist/web/assets/save-iEMNZoPe.js +1 -0
- package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
- package/dist/web/assets/settings-BC-bzgk6.js +21 -0
- package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
- package/dist/web/assets/square-BE_4JMR3.js +1 -0
- package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
- package/dist/web/assets/{submit-issue-command-Gk3RKrY-.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BnYUBgZB.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CxR3xpmK.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-BVNyOY8h.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-4_XfwJQi.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-CVuamyT3.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-CmwN4ohy.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
- package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
- package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
- package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
- package/dist/web/assets/{workers-CjtQ2aBD.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-N1KUjBZ8.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +93 -3
- package/package.json +1 -1
- package/dist/chunks/actions-command-BYPLSGZL.js +0 -2
- package/dist/chunks/app-server-evaluations-5YZUFXQ2.js +0 -2
- package/dist/chunks/app-server-harness-services-N5F5QVZI.js +0 -2
- package/dist/chunks/app-server-runtime-HJ2N57DL.js +0 -2
- package/dist/chunks/apps-WJTW64NW.js +0 -2
- package/dist/chunks/chunk-263WS3TB.js +0 -2
- package/dist/chunks/chunk-2UZHLO2V.js +0 -23
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-46RMTR2Z.js +0 -2
- package/dist/chunks/chunk-4JJ4RYIB.js +0 -6
- package/dist/chunks/chunk-4NN5OLKW.js +0 -161
- package/dist/chunks/chunk-543QHE3D.js +0 -2
- package/dist/chunks/chunk-5QOFUGYQ.js +0 -2
- package/dist/chunks/chunk-5ZNE43XC.js +0 -10
- package/dist/chunks/chunk-6IS5OLI5.js +0 -2
- package/dist/chunks/chunk-7HAGSE7L.js +0 -2
- package/dist/chunks/chunk-AXYAEWWA.js +0 -2
- package/dist/chunks/chunk-B7XJBP4U.js +0 -2
- package/dist/chunks/chunk-BBIA24GD.js +0 -10
- package/dist/chunks/chunk-CJDGLPNX.js +0 -4
- package/dist/chunks/chunk-FCXDPVGJ.js +0 -3
- package/dist/chunks/chunk-FE2ENE3U.js +0 -2
- package/dist/chunks/chunk-H6EUFJJK.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-K6DB5QWG.js +0 -2
- package/dist/chunks/chunk-LI56PPCN.js +0 -2
- package/dist/chunks/chunk-OE2OOWEQ.js +0 -2
- package/dist/chunks/chunk-OYIFH2OM.js +0 -2
- package/dist/chunks/chunk-QOUOU7FE.js +0 -22
- package/dist/chunks/chunk-R5GRESW3.js +0 -2
- package/dist/chunks/chunk-TERKCK4I.js +0 -2
- package/dist/chunks/chunk-TS5HNRZB.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-WGISITX6.js +0 -4
- package/dist/chunks/chunk-XD4ZIQZ2.js +0 -2
- package/dist/chunks/chunk-XHU4BZQY.js +0 -13
- package/dist/chunks/chunk-ZWEY66RT.js +0 -2
- package/dist/chunks/cli-HV32F7HD.js +0 -2
- package/dist/chunks/connected-app-executor-DFHWNMRM.js +0 -2
- package/dist/chunks/connected-evidence-WOM6N5HO.js +0 -2
- package/dist/chunks/core-commands-GWRHH53F.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-WJ2XEUO7.js +0 -4
- package/dist/chunks/datasets-XIMF54QN.js +0 -2
- package/dist/chunks/desktop-test-HF42V2EP.js +0 -3
- package/dist/chunks/dist-T6ES2TSM.js +0 -2
- package/dist/chunks/evaluation-coordination-WZT6FDMS.js +0 -2
- package/dist/chunks/experiment-improvements-H35VS6XZ.js +0 -2
- package/dist/chunks/experiments-F54C32EE.js +0 -2
- package/dist/chunks/experiments-signal-ONIGTGYR.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-4HOXANWK.js +0 -2
- package/dist/chunks/hosted-app-server-composition-Y64A2A2B.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-B2V2WIUI.js +0 -3
- package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +0 -2
- package/dist/chunks/hosted-profile-candidate-CXPVEEYQ.js +0 -3
- package/dist/chunks/hosted-profile-compiler-FGCI2VRW.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-INNUYMBD.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-UPTBRYMS.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-TIQSVKLQ.js +0 -3
- package/dist/chunks/hosted-tasksets-7VMYOTIO.js +0 -2
- package/dist/chunks/human-review-7XC77NQP.js +0 -2
- package/dist/chunks/learning-3XDGIYUL.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-UIKQSAMM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-6KJN3EQL.js +0 -2
- package/dist/chunks/opchat-NWYWWIA7.js +0 -3
- package/dist/chunks/opchat-bounded-chat-ICURZM6R.js +0 -2
- package/dist/chunks/organizations-7DBQGCCV.js +0 -2
- package/dist/chunks/project-action-payload-7DRABTHY.js +0 -2
- package/dist/chunks/project-agent-AXJOWXRU.js +0 -2
- package/dist/chunks/published-experiment-source-YBBPLNF2.js +0 -2
- package/dist/chunks/refiner-profile-service-ATEFPF5O.js +0 -2
- package/dist/chunks/sandbox-command-CF2PJCFX.js +0 -2
- package/dist/chunks/saved-work-3OAVRBH3.js +0 -2
- package/dist/chunks/setup-RHIMFI2Y.js +0 -2
- package/dist/chunks/src-V236S6MV.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-CDRMGLWW.js +0 -2
- package/dist/chunks/store-chat-resources-P4EKCLSY.js +0 -2
- package/dist/chunks/store-conversation-serving-YFEZYQD3.js +0 -2
- package/dist/chunks/store-evaluation-results-VBH4R2U7.js +0 -7
- package/dist/chunks/store-human-review-RFCVZ3HP.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-FNBGGZU6.js +0 -2
- package/dist/chunks/store-local-experiments-XPXGYXNM.js +0 -97
- package/dist/chunks/store-model-batch-review-J2L5JQV2.js +0 -2
- package/dist/chunks/store-model-project-preparation-OCLIFKI2.js +0 -2
- package/dist/chunks/store-taskset-drafts-BNKUVHPA.js +0 -9
- package/dist/chunks/taskset-packages-SXBLYHSP.js +0 -2
- package/dist/chunks/taskset-packages-V5T4V7YN.js +0 -2
- package/dist/chunks/tool-learning-47XQKELE.js +0 -2
- package/dist/chunks/training-7VQNCOGH.js +0 -2
- package/dist/chunks/training-VKLPNCMC.js +0 -2
- package/dist/chunks/training-hosted-NNE6BP6S.js +0 -2
- package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +0 -2
- package/dist/chunks/training-model-start-G7YDZ7ZG.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-DmEA-Lia.js +0 -53
- package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +0 -2
- package/dist/web/assets/AppsView-B1uNg9IQ.js +0 -1
- package/dist/web/assets/BrowserSidebar-DfVQoJHn.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Bbc6HRks.js +0 -8
- package/dist/web/assets/CommunityView-mO58f2B0.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-BQIS7hkd.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-BkHeVbAx.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-YA9YckKj.js +0 -101
- package/dist/web/assets/MainChatThread-DpyPgGKW.js +0 -2
- package/dist/web/assets/MainPane-WOeodByM.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +0 -2
- package/dist/web/assets/RightChatPanelStack-Bs7A4dLs.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +0 -1
- package/dist/web/assets/TeamChatView-DjmIaLO1.js +0 -1
- package/dist/web/assets/TrainingRunLineage-CtYe1KGX.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-JDOUmrC-.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-sfL5LZeB.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-Cd761lRF.js +0 -1
- package/dist/web/assets/chat-resources-BUDXdoG0.js +0 -1
- package/dist/web/assets/chevron-down-DEbd6Ek-.js +0 -1
- package/dist/web/assets/chevron-right-DLYNg_Oq.js +0 -1
- package/dist/web/assets/chevron-up-DFJJccDl.js +0 -1
- package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +0 -9
- package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +0 -1
- package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +0 -1
- package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +0 -1
- package/dist/web/assets/client-BNjO4Xi8.js +0 -1
- package/dist/web/assets/cloud-upload-CoM1FGeB.js +0 -1
- package/dist/web/assets/common-CFsO2ppZ.js +0 -1
- package/dist/web/assets/copy-BGOhV6Pk.js +0 -1
- package/dist/web/assets/create-pipeline-DRR0Qeec.js +0 -1
- package/dist/web/assets/createLucideIcon-Bv-_eGcE.js +0 -1
- package/dist/web/assets/external-link-CVXsNeO3.js +0 -1
- package/dist/web/assets/folder-open-MnOmh19D.js +0 -1
- package/dist/web/assets/folder-plus-BRddLBtO.js +0 -1
- package/dist/web/assets/git-commit-horizontal-Bm4rkXug.js +0 -1
- package/dist/web/assets/icons-CZxmQtZs.js +0 -1
- package/dist/web/assets/image-BViGUAiq.js +0 -1
- package/dist/web/assets/info-DYPIbKKD.js +0 -1
- package/dist/web/assets/loader-circle-JFgFNsP5.js +0 -1
- package/dist/web/assets/maximize-2-DXZCQO0b.js +0 -1
- package/dist/web/assets/message-square-cOCAL8J1.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-B35XSAvn.js +0 -1
- package/dist/web/assets/paperclip-CKgDxioG.js +0 -1
- package/dist/web/assets/play-DzqLr7fM.js +0 -1
- package/dist/web/assets/plus-Ddp1vXnw.js +0 -1
- package/dist/web/assets/presentation-B0S9v7ib.js +0 -1
- package/dist/web/assets/refresh-cw-D45mW-vs.js +0 -1
- package/dist/web/assets/reward-checks-D139zwha.js +0 -7
- package/dist/web/assets/save-Gu4R_82E.js +0 -1
- package/dist/web/assets/schemas-C9IwV7NS.js +0 -64
- package/dist/web/assets/settings-DdonLCIN.js +0 -21
- package/dist/web/assets/settings-lists-CFHFtO0D.js +0 -5
- package/dist/web/assets/square-Dqduqyyu.js +0 -1
- package/dist/web/assets/square-terminal-DS3zwi6X.js +0 -1
- package/dist/web/assets/training-QBuGBGJd.js +0 -2
- package/dist/web/assets/upload-ABSJxuUM.js +0 -1
- package/dist/web/assets/useQuery-CCjwL8VI.js +0 -1
- package/dist/web/assets/wifi-off-DGJH7Pke.js +0 -1
- package/dist/web/assets/work-outputs-CnbRtTLg.js +0 -1
- package/dist/web/assets/x-B-_zJVOZ.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as ft}from"./chunk-27JGS3KB.js";import{b as Ut}from"./chunk-KP2MYTP5.js";import{i as Ze}from"./chunk-4G3GTEVS.js";import{d as bt,e as xt,f as Se,g as wt}from"./chunk-KU4TPDPH.js";import{e as kt,f as Pt,g as Et,h as Ot,i as jt,j as ke,m as At,n as qt,o as Ht,p as Tt,q as ue}from"./chunk-55YD4UTW.js";import{a as Ve}from"./chunk-J256AEEE.js";import{a as je,c as $t,d as Dt,e as Bt,f as Ye}from"./chunk-AMC4Z7G4.js";import{a as Xe,c as _t,d as Qe,f as Wt}from"./chunk-LK77GI6M.js";import{j as Pe,k as zt,l as Ee,m as Oe}from"./chunk-I6VMRQF4.js";import{h as Rt}from"./chunk-4PUOWSDE.js";import{Bb as oe,C as ee,D as te,Eb as J,Fb as Re,K as Ge,L as yt,Sa as Ce,U as vt,V as It,ea as St,fb as Ct,oa as ne,pa as me,wb as F}from"./chunk-ZY32SZ2P.js";import{p as gt}from"./chunk-OTDDXEQ6.js";import{a as Je,b as U,c as _,f as lt,h as ht}from"./chunk-JCLTFDVW.js";import{f as ut}from"./chunk-HNQPEOJD.js";import{g as f,m as pt,n as p,o as mt}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as d}from"./chunk-FTQLQJQV.js";var R=e.string().trim().min(1).max(500),re=e.string().regex(/^[a-f0-9]{64}$/),Bo=e.object({teamId:R,ownerUserId:R}).strict(),M=e.object({id:R,snapshotHash:re,boundaryId:R,boundaryRevisionHash:re}).strict(),Ae=e.object({sourceId:R,source:zt,sessionId:R,snapshotHash:re,title:e.string().max(500),projectId:R.nullable(),capturedAt:e.string().datetime(),boundaries:e.array(Oe.omit({start:!0,end:!0})).max(Pe.boundaries)}).strict(),Mt=e.object({operationId:R,conversationId:R.optional(),cursor:R.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict(),Lt=e.object({hash:re,parts:e.number().int().min(1).max(1500)}).strict(),Kt=Lt.extend({index:e.number().int().nonnegative().max(1499),base64:e.string().max(35e4)}).strict(),Mo=e.object({path:e.string().min(1).max(500),encoding:e.enum(["utf8","zstd"]),base64:e.string()}).strict(),L=e.object({upload:Lt,source:e.enum(["codex","claude_code","hermes","openclaw","opencode","grok_build","pi","oh_my_pi"]),branchLeafId:R.optional(),acquisition:e.object({machineId:R,sourceInstanceId:R}).strict().optional(),destination:e.discriminatedUnion("kind",[e.object({kind:e.literal("existing"),projectId:R}).strict(),e.object({kind:e.literal("new"),name:e.string().trim().min(1).max(200)}).strict()])}).strict(),qe=L.extend({operationId:R,previewHash:re,selection:e.array(e.object({sessionHash:re,boundaryIds:e.array(R).min(1).max(Pe.boundaries)}).strict()).min(1).max(Pe.sessions)}).strict(),qn=e.object({from:e.string().datetime(),to:e.string().datetime(),projectId:R.optional()}).strict(),Lo=e.object({teamId:R,range:qn,activity:e.object({conversations:e.number().int().nonnegative(),turns:e.number().int().nonnegative(),chatTurns:e.number().int().nonnegative(),workTurns:e.number().int().nonnegative()}).strict(),accounting:e.object({contextSnapshots:e.number().int().nonnegative()}).strict(),usage:je}).strict();var P=e.string().trim().min(1).max(240),le=e.string().regex(/^[a-f0-9]{64}$/),Vo=e.object({cursor:e.string().trim().min(1).max(2e3).optional(),projectId:P.optional(),search:e.string().trim().max(100).optional(),sort:e.enum(["id","name","updated"]).default("id"),limit:e.number().int().min(1).max(100).default(100)}).strict(),Xo=e.object({operationId:P,expectedRevision:e.number().int().nonnegative(),originProjectId:P.optional(),workspace:Ze,ownerScope:e.enum(["workspace","personal"]).optional()}).strict().superRefine((a,t)=>{a.workspace.draft.modelScope!==null&&t.addIssue({code:"custom",message:"Independent datasets cannot carry Model-owned draft preparation."}),a.workspace.draft.status!=="draft"&&t.addIssue({code:"custom",message:"Only draft workspaces can be saved."})}),he=e.object({schemaVersion:e.literal("openpond.datasetWorkspaceReceipt.v1"),teamId:P,datasetId:P,revision:e.number().int().positive(),originProjectId:P.optional(),workspace:Ze,ownerScope:e.enum(["workspace","personal"]).optional(),publication:e.object({tasksetId:P,release:Ve,packageHash:le}).strict().nullable()}).strict().superRefine((a,t)=>{(a.workspace.draft.id!==a.datasetId||a.workspace.draft.profileId!==a.teamId||a.workspace.draft.revision!==a.revision||a.workspace.draft.modelScope!==null)&&t.addIssue({code:"custom",message:"Dataset workspace scope/revision mismatch."})}),Qo=e.object({operationId:P,expectedRevision:e.number().int().positive(),workspaceHash:le,packageHash:le}).strict(),Yo=e.object({operationId:P,expectedRevision:e.number().int().positive()}).strict(),Zo=e.object({teamId:P,datasetId:P,items:e.array(e.object({workspaceRevision:e.number().int().positive(),publication:he.shape.publication.unwrap(),publishedAt:e.iso.datetime()}).strict()).max(25),nextBeforeRevision:e.number().int().positive().nullable()}).strict(),er=e.object({teamId:P,datasets:e.array(e.object({id:P,revision:e.number().int().positive(),originProjectId:P.optional(),name:e.string(),status:e.enum(["draft","published"]),ownerScope:e.enum(["workspace","personal"]).optional(),taskCount:e.number().int().nonnegative().optional(),publication:he.shape.publication,updatedAt:e.string().datetime()}).strict()).max(100),nextCursor:e.string().trim().min(1).max(2e3).nullable()}).strict(),tr=e.object({teamId:P,datasetId:P,revision:e.number().int().positive(),workspaceHash:le,packageHash:le,release:Ve}).strict();var ie=e.string().trim().min(1).max(240),fe=e.string().regex(/^[a-f0-9]{64}$/),Nt=e.object({operationId:ie,source:M,proofs:e.array(Ye).min(1).max(100)}).strict().superRefine((a,t)=>{new Set(a.proofs.map(n=>n.path)).size!==a.proofs.length&&t.addIssue({code:"custom",message:"Select each starting path once."}),new TextEncoder().encode(JSON.stringify(a)).byteLength>15*1024*1024&&t.addIssue({code:"custom",message:"Starting assets exceed the retained upload allowance."})}),Hn=e.object({path:Ye.shape.path,commitHash:e.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),gitObjectHash:e.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),mode:e.enum(["100644","100755"]),sizeBytes:e.number().int().nonnegative().max(2*1024*1024),sha256:fe}).strict(),Tn=e.object({schemaVersion:e.literal("openpond.connectedStartingAssetsReceipt.v1"),id:ie,operationId:ie,teamId:ie,ownerUserId:ie,projectId:ie,requestHash:fe,source:M,inputHash:fe,observationHash:fe,assets:e.array(Hn).min(1).max(100),selectedPathsUnmodified:e.literal(!0),dependencyClosureQualified:e.literal(!1),createdAt:e.iso.datetime(),receiptHash:fe}).strict();function et(a){let t=Tn.parse(a),{receiptHash:n,...o}=t;if(p(o)!==n||t.id!==`starting-assets-${p(t.operationId).slice(0,40)}`||new Set(t.assets.map(r=>r.path)).size!==t.assets.length||t.assets.some(r=>r.commitHash!==t.assets[0].commitHash))throw new Error("Connected starting assets receipt identity differs from its retained evidence.");return t}d(et,"verifyConnectedStartingAssetsReceipt");var j=e.string().min(1).max(200),se=e.string().regex(/^[a-f0-9]{64}$/),He=e.object({operationId:j,name:e.string().trim().min(1).max(500),projectId:j,dataset:f.extend({revision:e.number().int().positive()}).strict(),caseIds:e.array(j).min(1).max(1e4)}).strict().superRefine((a,t)=>{new Set(a.caseIds).size!==a.caseIds.length&&t.addIssue({code:"custom",message:"Select each case once."})}),Un=M.extend({inputHash:se,outputHash:se.nullable(),task:St,taskHash:se}).strict(),_n=e.object({schemaVersion:e.literal("openpond.connectedRecordedExecution.v1"),id:j,teamId:j,ownerUserId:j,request:He,manifest:F,sources:e.array(Un).min(1).max(1e4),contentHash:se}).strict();function tt(a){let t=_n.parse(a),{contentHash:n,...o}=t,{contentHash:r,...i}=t.manifest;if(p(o)!==n||p(i)!==r||t.manifest.teamId!==t.teamId||t.manifest.id!==t.id||t.manifest.operationId!==t.request.operationId||p(t.manifest.dataset)!==p(t.request.dataset)||t.sources.length!==t.request.caseIds.length||t.sources.length!==t.manifest.population.length||t.sources.some((s,c)=>s.taskHash!==p(s.task)||s.task.id!==t.request.caseIds[c]||s.boundaryId!==s.task.id||t.manifest.population[c]?.caseId!==s.boundaryId))throw new Error("Recorded execution identity or population integrity failed.");return t}d(tt,"verifyConnectedRecordedExecution");var Ft=e.object({projectId:j.optional(),cursor:j.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict(),Wn=e.object({id:j,teamId:j,ownerUserId:j,projectId:j,name:e.string().min(1).max(500),dataset:He.shape.dataset,manifestHash:se,contentHash:se,caseCount:e.number().int().min(1).max(1e4),createdAt:e.string().datetime()}).strict(),Jt=e.object({teamId:j,items:e.array(Wn).max(50),nextCursor:j.nullable()}).strict();var Gt=e.object({datasetId:e.string().trim().min(1).max(240),expectedRevision:e.number().int().positive(),operationId:e.string().trim().min(1).max(240),graders:e.array(Ce).min(1).max(100).optional()}).strict().superRefine((a,t)=>{a.graders&&new Set(a.graders.map(n=>n.id)).size!==a.graders.length&&t.addIssue({code:"custom",path:["graders"],message:"Choose one exact revision of each grader."})});async function K(a,t,n,o){let r=new AbortController,i=n.signal,s=d(()=>r.abort(i?.reason),"forward");i?.aborted?s():i?.addEventListener("abort",s,{once:!0});let c=setTimeout(()=>r.abort(new Error("Connected evidence request timed out.")),6e4),l,m=d(()=>{l&&l.cancel(r.signal.reason).catch(()=>{})},"abortReader");r.signal.addEventListener("abort",m,{once:!0});let h=new Promise((y,u)=>{let g=d(()=>u(r.signal.reason??new DOMException("Request aborted","AbortError")),"abort");r.signal.aborted?g():r.signal.addEventListener("abort",g,{once:!0})});try{let y=a(t,{...n,signal:r.signal}).then(O=>{if(r.signal.aborted)throw O.body?.cancel(r.signal.reason).catch(()=>{}),r.signal.reason;return O}),u=await Promise.race([y,h]),g=u.headers.get("content-length");if(l=u.body?.getReader(),r.signal.aborted)throw await l?.cancel(r.signal.reason),r.signal.reason;if(g&&Number(g)>8388608)throw await l?.cancel(),o(502,"connected_response_too_large","Connected evidence response exceeds 8 MiB.");let S=[],T=0;if(l)for(;;){let O=await Promise.race([l.read(),h]);if(O.done)break;if(T+=O.value.byteLength,T>8388608)throw await l.cancel(),o(502,"connected_response_too_large","Connected evidence response exceeds 8 MiB.");S.push(O.value)}let N=new Uint8Array(T),D=0;for(let O of S)N.set(O,D),D+=O.byteLength;let B;try{B=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(N))}catch{throw o(502,"connected_response_invalid","Connected evidence response is not valid JSON.")}return{response:u,value:B}}finally{clearTimeout(c),i?.removeEventListener("abort",s),r.signal.removeEventListener("abort",m),l?.releaseLock()}}d(K,"fetchConnectedJson");var ge=e.string().min(1).max(500),H=e.number().int().nonnegative(),Vt=e.object({teamId:ge,ownerUserId:ge,projectId:ge.nullable(),status:e.enum(["active","paused","archived"]),revision:H,state:e.enum(["collecting","pending","attention","paused","archived"]),lastReconciledAt:e.string().datetime().nullable(),lastCapturedAt:e.string().datetime().nullable(),historyDays:e.number().int().positive(),sources:H,tasks:H,datasets:e.array(e.object({datasetId:ge,projection:e.enum(["turn","conversation"]),revision:H}).strict()).max(2),latestBatch:e.object({operationId:ge,updatedAt:e.string().datetime(),scanned:H,captured:H,unchanged:H,pending:H,failed:H,excluded:H,paused:H,hasMore:e.boolean()}).strict().nullable()}).strict();var b=e.string().min(1).max(500),q=e.string().regex(/^[a-f0-9]{64}$/),Xt=e.object({teamId:b,projectId:b.nullable(),status:e.enum(["active","paused","archived"]),revision:e.number().int().nonnegative()}).strict(),zn=e.object({teamId:b,operationId:b,projectId:b.nullable(),outcomes:e.array(e.object({conversationId:b,state:e.enum(["captured","unchanged","pending","paused","excluded","failed"]),sourceId:b.optional(),snapshotHash:q.optional(),reason:e.string().optional()}).strict()).max(50),nextCursor:b.nullable()}).strict(),$n=e.object({teamId:b,ref:M,origin:Ae.shape.source,sessionId:b,projectId:b,capturedAt:e.string().datetime(),unmappedEvidence:e.object({count:e.number().int().nonnegative().max(1e5),contentHash:q}).strict(),evidence:e.object({input:e.array(Ee),observed:e.array(Ee),answer:e.json(),boundary:Oe}).strict()}).strict(),Dn=e.object({teamId:b,sourceId:b,snapshotHash:q,contentHash:q,count:e.number().int().nonnegative(),offset:e.number().int().nonnegative(),events:e.array(Ee).max(50),nextOffset:e.number().int().nonnegative().nullable()}).strict(),Bn=e.object({teamId:b,source:L.shape.source,sourceHash:q,previewHash:q,destination:L.shape.destination,issues:e.array(e.object({file:e.string(),message:e.string()}).strict()).max(100),sessions:e.array(e.object({sessionHash:q,sessionId:b,origin:Ae.shape.source,exporterVersion:e.string().nullable(),eventCount:e.number().int().nonnegative(),boundaries:e.array(e.object({id:b,projection:e.enum(["turn","conversation"]),answer:e.boolean(),process:e.enum(["retained","partial","absent"]),terminal:e.enum(["completed","failed","cancelled","unknown"])}).strict()).max(5001),warnings:e.array(e.string()).max(100),sample:e.array(e.object({role:e.enum(["user","assistant","system","tool"]).nullable(),text:e.string().max(4e3)}).strict()).max(3)}).strict()).max(1e3)}).strict(),Qt=e.object({teamId:b,operationId:b,requestHash:q,previewHash:q,projectId:b.optional(),state:e.enum(["admitting","publishing","completed","failed"]),outcomes:e.array(e.object({sessionHash:q,sourceId:b,status:e.enum(["imported","already_present"]),datasets:e.array(e.object({datasetId:b,revision:e.number().int().positive(),changed:e.boolean()}).strict()).max(2)}).strict()).max(1e3),error:e.string().optional()}).strict(),Te=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="ConnectedEvidenceError"}status;code;static{d(this,"ConnectedEvidenceError")}},Ue=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=n.toString().replace(/\/+$/,"")}options;static{d(this,"ConnectedEvidenceClient")}baseUrl;async capture(t,n){let o=Mt.parse(t),r=zn.parse(await this.request("/capture","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.outcomes.length>o.limit||o.conversationId&&r.outcomes.some(i=>i.conversationId!==o.conversationId))throw new Error("Capture receipt differs from its requested source or operation.");return r}async retainStartingAssets(t,n){let o=Nt.parse(t),r=et(await this.request("/starting-assets","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.requestHash!==p(o)||p(r.source)!==p(o.source)||r.assets.length!==o.proofs.length||r.assets.some((i,s)=>i.path!==o.proofs[s].path))throw new Error("Starting assets differ from the exact source, operation or selected paths.");return r}async startingAssets(t,n){let o=et(await this.request(`/starting-assets/${encodeURIComponent(b.parse(t))}`,"GET",void 0,n));if(this.scope(o.teamId),o.id!==t)throw new Error("Starting assets identity mismatch.");return o}async list(t={},n){let o=e.object({projectId:b.optional(),cursor:b.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict().parse(t),r=new URLSearchParams(Object.entries(o).filter(([,s])=>s!==void 0).map(([s,c])=>[s,String(c)])),i=e.object({teamId:b,items:e.array(Ae).max(50),nextCursor:b.nullable()}).strict().parse(await this.request(`?${r}`,"GET",void 0,n));if(this.scope(i.teamId),i.items.length>o.limit||new Set(i.items.map(s=>s.sourceId)).size!==i.items.length||i.nextCursor!==null&&i.nextCursor===o.cursor||o.projectId&&i.items.some(s=>s.projectId!==o.projectId))throw new Error("Connected source page differs from its requested scope.");return i}async read(t,n){let o=M.parse(t),r=$n.parse(await this.request(`/${encodeURIComponent(o.id)}/cases/${encodeURIComponent(o.boundaryId)}?snapshotHash=${o.snapshotHash}&revisionHash=${o.boundaryRevisionHash}`,"GET",void 0,n));if(this.scope(r.teamId),p(r.ref)!==p(o)||r.evidence.boundary.id!==o.boundaryId||r.evidence.boundary.revisionHash!==o.boundaryRevisionHash||p(r.evidence.input)!==r.evidence.boundary.inputHash||p(r.evidence.observed)!==o.boundaryRevisionHash||r.evidence.boundary.outputHash!==null&&p(r.evidence.answer)!==r.evidence.boundary.outputHash)throw new Error("Connected case readback differs from its exact snapshot or cutoff.");return r}async setCollection(t,n){let o=Xt.parse(await this.request("/collection","PUT",e.object({paused:e.boolean()}).strict().parse({paused:t}),n));return this.scope(o.teamId),o}async collection(t){let n=Xt.parse(await this.request("/collection","GET",void 0,t));return this.scope(n.teamId),n}async collectionStatus(t){let n=Vt.parse(await this.request("/collection/status","GET",void 0,t));return this.scope(n.teamId),n}async unmappedEvents(t,n){let o=e.object({id:b,snapshotHash:q,contentHash:q,offset:e.number().int().nonnegative().default(0),limit:e.number().int().min(1).max(50).default(20)}).strict().parse(t),r=Dn.parse(await this.request(`/${encodeURIComponent(o.id)}/unmapped-events?snapshotHash=${o.snapshotHash}&offset=${o.offset}&limit=${o.limit}`,"GET",void 0,n));if(this.scope(r.teamId),r.sourceId!==o.id||r.snapshotHash!==o.snapshotHash||r.contentHash!==o.contentHash||r.offset!==o.offset||r.events.length>o.limit||r.events.some((i,s)=>i.sequence!==o.offset+s)||r.nextOffset!==null&&r.nextOffset!==o.offset+r.events.length)throw new Error("Unmapped source event page differs from its pinned snapshot.");return r}async homeSummary(t,n){let o=e.object({from:e.string().datetime(),to:e.string().datetime(),projectId:b.optional()}).strict(),r=o.parse(t),i=new URLSearchParams(Object.entries(r)),s=e.object({teamId:b,range:o,activity:e.object({conversations:e.number().int().nonnegative(),turns:e.number().int().nonnegative(),chatTurns:e.number().int().nonnegative(),workTurns:e.number().int().nonnegative()}).strict(),accounting:e.object({contextSnapshots:e.number().int().nonnegative()}).strict(),usage:je}).strict().parse(await this.request(`/summary?${i}`,"GET",void 0,n));if(this.scope(s.teamId),p(s.range)!==p(r)||s.activity.chatTurns+s.activity.workTurns!==s.activity.turns)throw new Error("Activity summary differs from its requested range.");for(let c of[s.usage.days,s.usage.modes,s.usage.models]){if(new Set(c.map(l=>l.key)).size!==c.length)throw new Error("Duplicate usage summary group.");for(let l of Object.keys(s.usage.total))if(c.reduce((m,h)=>m+h[l],0)!==s.usage.total[l])throw new Error("Usage totals differ from their displayed groups.")}return s}async uploadPart(t,n){let o=Kt.parse(t),r=e.object({teamId:b,hash:q,parts:e.number().int(),index:e.number().int()}).strict().parse(await this.request("/imports/upload","POST",o,n));if(this.scope(r.teamId),r.hash!==o.hash||r.parts!==o.parts||r.index!==o.index)throw new Error("Upload receipt differs from its part identity.");return r}async preview(t,n){let o=L.parse(t),r=Bn.parse(await this.request("/imports/preview","POST",o,n));if(this.scope(r.teamId),r.source!==o.source||p(r.destination)!==p(o.destination)||r.sessions.some(i=>i.origin!==o.source)||new Set(r.sessions.map(i=>i.sessionHash)).size!==r.sessions.length)throw new Error("Import preview differs from its source or destination.");return r}async commit(t,n){let o=qe.parse(t),r=Qt.parse(await this.request("/imports/commit","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.previewHash!==o.previewHash||r.requestHash!==p(o)||r.outcomes.some(i=>!o.selection.some(s=>s.sessionHash===i.sessionHash))||r.state==="completed"&&r.outcomes.length!==o.selection.length)throw new Error("Import receipt differs from its exact selection or operation.");return r}async readImport(t,n){let o=b.parse(t),r=Qt.parse(await this.request(`/imports/${encodeURIComponent(o)}`,"GET",void 0,n));if(this.scope(r.teamId),r.operationId!==o)throw new Error("Import identity mismatch.");return r}async prepareRecorded(t,n){let o=He.parse(t),r=tt(await this.request("/recorded-executions","POST",o,n));if(this.scope(r.teamId),p(r.request)!==p(o))throw new Error("Recorded admission differs from its selected Dataset/cases.");return r}async listRecordedExecutions(t={},n){let o=Ft.parse(t),r=new URLSearchParams(Object.entries(o).filter(([,s])=>s!==void 0).map(([s,c])=>[s,String(c)])),i=Jt.parse(await this.request(`/recorded-executions?${r}`,"GET",void 0,n));if(this.scope(i.teamId),i.items.length>o.limit||i.items.some((s,c)=>s.teamId!==i.teamId||o.projectId&&s.projectId!==o.projectId||o.cursor&&s.id<=o.cursor||c>0&&s.id<=i.items[c-1].id)||i.items.some(s=>s.ownerUserId!==i.items[0]?.ownerUserId)||i.nextCursor!==null&&(o.cursor!==void 0&&i.nextCursor<=o.cursor||i.items.length>0&&i.nextCursor<i.items.at(-1).id))throw new Error("Recorded execution page differs from its requested scope or cursor.");return i}async recordedExecution(t,n){let o=tt(await this.request(`/recorded-executions/${encodeURIComponent(b.parse(t))}`,"GET",void 0,n));if(this.scope(o.teamId),o.id!==t)throw new Error("Recorded execution identity mismatch.");return o}async publishDataset(t,n){let o=Gt.parse(t),r=he.parse(await this.request("/datasets/publish","POST",o,n));this.scope(r.teamId);let i=r.workspace.draft.metadata.connectedPublication;if(r.datasetId!==o.datasetId||!r.publication||!i||typeof i!="object"||!("requestHash"in i)||i.requestHash!==p(o))throw new Error("Published Dataset identity or original selection mismatch.");return r}async createSelection(t,n){let o=e.object({operationId:b.max(240),projectId:b.max(240),name:e.string().trim().min(1).max(200),cases:e.array(M).min(1).max(500)}).strict().parse(t),r=he.parse(await this.request("/datasets/selection","POST",o,n));if(this.scope(r.teamId),r.originProjectId!==o.projectId||r.workspace.draft.tasks.length!==o.cases.length||r.workspace.draft.tasks.some((i,s)=>p(i.input&&typeof i.input=="object"&&!Array.isArray(i.input)?i.input.connectedEvidenceRef:null)!==p(o.cases[s])))throw new Error("Selected Dataset differs from its exact source population.");return r}scope(t){if(t!==this.options.teamId)throw new Error("Connected evidence workspace mismatch.")}async request(t,n,o,r){let{response:i,value:s}=await K(this.options.fetch??fetch,`${this.baseUrl}/v1/connected-evidence${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}},(c,l,m)=>new Te(c,l,m));if(!i.ok){let c=e.object({code:e.string(),message:e.string()}).safeParse(s);throw new Te(i.status,c.success?c.data.code:"connected_request_failed",c.success?c.data.message:"Connected evidence request failed.")}return s}};var I=e.string().trim().min(1).max(240),Mn=e.object({id:I,expectedRevision:e.number().int().positive(),manifest:$t}).strict().refine(a=>a.id===a.manifest.connectionId&&a.expectedRevision===a.manifest.connectionRevision,"Collector coverage scope differs from its connection."),Ln=e.object({id:I,cutoff:e.iso.datetime().optional()}).strict(),Kn=e.object({schemaVersion:e.literal("openpond.connectedSyncCoverageReceipt.v1"),id:I,teamId:I,ownerUserId:I,connectionId:I,connectionRevision:e.number().int().positive(),receivedAt:e.iso.datetime(),summary:Dt}).strict(),Nn=e.object({id:I,source:L.shape.source,machineId:I,sourceInstanceId:I,sourceLabel:e.string().trim().min(1).max(200),sourceRoot:e.string().min(1).max(2e3),destination:L.shape.destination,since:e.string().datetime().nullable(),keepSyncing:e.boolean(),expectedRevision:e.number().int().nonnegative()}).strict(),Fn=e.object({id:I,expectedRevision:e.number().int().positive(),action:e.enum(["pause","resume","disconnect"])}).strict(),Jn=e.object({id:I,operationId:I,expectedRevision:e.number().int().positive()}).strict(),Gn=e.object({id:I,expectedRevision:e.number().int().positive(),pendingOperations:e.number().int().min(0).max(1e4),error:e.string().max(500).nullable(),completedSyncRevision:e.number().int().nonnegative().default(0)}).strict(),Yt=e.object({teamId:I,id:I,revision:e.number().int().positive(),source:L.shape.source,sourceLabel:e.string(),sourceRoot:e.string(),taskDatasetId:I.nullable(),conversationDatasetId:I.nullable(),machineId:I,sourceInstanceId:I,projectId:I,datasetIds:e.array(I).max(2),since:e.string().datetime().nullable(),keepSyncing:e.boolean(),state:e.enum(["active","paused","disconnected"]),health:e.enum(["online","offline"]),lastHeartbeatAt:e.string().datetime().nullable(),lastAdmissionAt:e.string().datetime().nullable(),pendingOperations:e.number().int().nonnegative(),admittedTasks:e.number().int().nonnegative(),error:e.string().nullable(),requestedSyncRevision:e.number().int().nonnegative().default(0),completedSyncRevision:e.number().int().nonnegative().default(0),syncRequestedAt:e.string().datetime().nullable().default(null),syncCompletedAt:e.string().datetime().nullable().default(null)}).strict().refine(a=>a.completedSyncRevision<=a.requestedSyncRevision&&a.requestedSyncRevision<=a.revision,"Invalid sync acknowledgement generation."),Vn=e.object({connectionId:I,expectedRevision:e.number().int().positive(),request:qe}).strict(),Zt=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash)throw new Error("Invalid connected-sync API origin.")}options;static{d(this,"ConnectedSyncClient")}async list(t){let n=e.object({teamId:I,items:e.array(Yt).max(100)}).strict().parse(await this.request("","GET",void 0,t));if(n.teamId!==this.options.teamId||n.items.some(o=>o.teamId!==n.teamId))throw new Error("Sync workspace mismatch.");return n}async register(t,n){return this.connection(await this.request("","POST",Nn.parse(t),n),t.id)}async control(t,n){return this.connection(await this.request("/control","POST",Fn.parse(t),n),t.id)}async heartbeat(t,n){return this.connection(await this.request("/heartbeat","POST",Gn.parse(t),n),t.id)}async requestSync(t,n){return this.connection(await this.request("/sync-now","POST",Jn.parse(t),n),t.id)}async commit(t,n){return this.request("/commit","POST",Vn.parse(t),n)}async publishCoverage(t,n){let o=Mn.parse(t),r=this.coverageReceipt(await this.request("/coverage","POST",{action:"publish",...o},n),o.id);if(!r||r.connectionRevision!==o.expectedRevision||r.summary.manifestHash!==Bt(o.manifest).manifestHash)throw new Error("Collector coverage acknowledgement differs from the retained manifest.");return r}async readCoverage(t,n){let o=Ln.parse(t),r=new URLSearchParams(o.cutoff?{cutoff:o.cutoff}:{});return this.coverageReceipt(await this.request(`/${encodeURIComponent(o.id)}/coverage?${r}`,"GET",void 0,n),o.id)}coverageReceipt(t,n){if(t===null)return null;let o=Kn.parse(t);if(o.teamId!==this.options.teamId||o.connectionId!==n)throw new Error("Collector coverage workspace mismatch.");return o}connection(t,n){let o=Yt.parse(t);if(o.teamId!==this.options.teamId||o.id!==n)throw new Error("Sync connection identity mismatch.");return o}async request(t,n,o,r){let{response:i,value:s}=await K(this.options.fetch??fetch,`${this.options.baseUrl.replace(/\/+$/u,"")}/v1/connected-evidence/sync/connections${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}},(c,l,m)=>new Error(m));if(!i.ok)throw Object.assign(new Error(`Sync request failed (${i.status}).`),{status:i.status});return s}};var be=e.string().trim().min(1).max(200),ae=e.object({operationId:be,execution:f,executionKind:e.literal("recorded_evidence").optional(),graders:e.array(Ce).min(1).max(100),maximumCostUsd:e.number().finite().min(1e-6).max(1e4),mappings:e.array(e.object({graderId:be,fields:jt}).strict()).max(100).optional()}).strict().superRefine((a,t)=>{new Set(a.graders.map(n=>n.id)).size!==a.graders.length&&t.addIssue({code:"custom",path:["graders"],message:"Select each grader once."}),a.mappings&&(new Set(a.mappings.map(n=>n.graderId)).size!==a.mappings.length||a.mappings.some(n=>!a.graders.some(o=>o.id===n.graderId)))&&t.addIssue({code:"custom",path:["mappings"],message:"Map each selected grader at most once."})}),Xn=e.object({schemaVersion:e.literal("openpond.experimentScoringPass.v1"),id:be,teamId:be,revision:e.number().int().positive(),request:ae,graders:e.array(ke).min(1).max(100),status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),totalCount:e.number().int().min(1).max(1e4),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),scored:e.number().int().nonnegative(),unavailable:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative()}).strict(),resultAvailable:e.boolean(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),error:e.object({code:be,message:e.string().max(2e3)}).strict().nullable()}).strict(),Qn=Xn.extend({contentHash:e.string().regex(/^[a-f0-9]{64}$/)});function en(a){let t=Qn.parse(a),{contentHash:n,...o}=t;if(p(o)!==n||Object.values(t.counts).reduce((i,s)=>i+s,0)!==t.totalCount)throw new Error("Scoring pass integrity or population accounting failed.");let r=["completed","failed","cancelled"].includes(t.status);if(r&&(!t.completedAt||t.counts.pending||t.counts.running)||!r&&(t.completedAt!==null||t.resultAvailable)||t.status==="completed"&&!t.resultAvailable)throw new Error("Scoring pass lifecycle differs from its retained result.");if(t.graders.length!==t.request.graders.length||new Set(t.graders.map(i=>i.feedbackKey)).size!==t.graders.length||t.graders.some((i,s)=>p(i.release)!==p(t.request.graders[s])||p(i.mappings??[])!==p(t.request.mappings?.find(c=>c.graderId===i.release?.id)?.fields??[])))throw new Error("Scoring pass graders differ from their exact admission.");return t}d(en,"verifyExperimentScoringPass");var tn=e.string().regex(/^[a-f0-9]{64}$/),nn=e.object({request:kt,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(ke).min(1).max(100),admissionRequestHash:tn.optional(),sourceExperimentId:e.string().trim().min(1).max(200).optional()}).strict(),Yn=nn.extend({configurationHash:tn}).strict(),Zn=Pt.extend({configuration:Yn}).strict();function ce(a){return a.policy.kind==="hosted_harness"?{...a,population:a.population.map(({receiptId:t,...n})=>n)}:a}d(ce,"experimentConfigurationRequest");function eo(a){let t=nn.parse(a);return p({...t,request:ce(t.request)})}d(eo,"experimentRunConfigurationHash");async function on(a){let t=Zn.parse(a),{configuration:n,...o}=t,r=await Ot(o),{configurationHash:i,...s}=n;if(i!==eo(s)||p(ce(n.request))!==p(ce(r.request))||n.maximumCostUsd!==r.manifest.limits.maximumSpendUsd)throw new Error("Experiment configuration differs from its retained run.");if(r.manifest.metadata.experimentDefinition===null){let c=qt.parse({definition:null,configurationHash:n.configurationHash,maximumCostUsd:n.maximumCostUsd,graders:n.graders,...n.admissionRequestHash?{admissionRequestHash:n.admissionRequestHash}:{},...n.sourceExperimentId?{sourceExperimentId:n.sourceExperimentId}:{}});if(r.manifest.metadata.experimentConfigurationHash!==p(c))throw new Error("Experiment configuration differs from its admitted manifest.")}return{...r,configuration:n}}d(on,"verifyExperimentRunDetails");var rn=e.object({teamId:e.string().trim().min(1).max(240),items:e.array(e.object({name:e.string().trim().min(1).max(500),source:Ct,ready:e.boolean(),reason:e.string().min(1).max(2e3).nullable()}).strict()).max(8),nextCursor:e.string().min(1).max(8192).nullable()}).strict();var W=e.string().min(1).max(500),sn=e.string().regex(/^[a-f0-9]{64}$/),X=e.iso.datetime(),xe=e.number().finite().nonnegative().nullable(),G=e.number().int().nonnegative().nullable(),to=e.object({id:W,sequence:e.number().int().nonnegative(),at:X.nullable(),type:e.string().max(160),action:e.string().max(160).nullable(),correlationId:W.nullable(),attempt:G,taskId:W.nullable(),status:e.string().max(100).nullable(),errorCode:e.string().max(200).nullable(),cleanupComplete:e.boolean().nullable()}).strict(),no=e.object({id:W,kind:e.string().max(100),status:e.string().max(100),receiptId:W.nullable(),maximumUsd:xe,settledUsd:xe,model:e.string().max(200).nullable(),durationMs:G,inputTokens:G,outputTokens:G,totalTokens:G}).strict(),oo=e.object({schemaVersion:e.literal("openpond.runDiagnostics.v1"),teamId:W,runId:W,location:e.enum(["local","hosted"]),manifestHash:sn,observedAt:X,status:e.string().max(100),startedAt:X.nullable(),completedAt:X.nullable(),error:e.string().max(8192).nullable(),resultAvailable:e.boolean(),parent:e.object({id:W,status:e.string().max(100),attempt:G,heartbeatAt:X.nullable(),leaseExpiresAt:X.nullable(),releasedAt:X.nullable(),errorCode:e.string().max(200).nullable()}).strict().nullable(),accounting:e.object({maximumUsd:xe,settledUsd:xe,outstandingUsd:xe,outstandingCount:G,final:e.boolean(),receiptCount:G}).strict(),events:e.array(to).max(100),nextEventCursor:e.number().int().nonnegative().nullable(),eventCount:e.number().int().nonnegative(),calls:e.array(no).max(100),nextCallCursor:W.nullable(),callCount:e.number().int().nonnegative(),limitations:e.array(e.string().max(1e3)).max(30)}).strict(),ro=oo.extend({contentHash:sn}).strict(),an=e.object({afterSequence:e.number().int().nonnegative().optional(),afterCallId:W.optional()}).strict();function cn(a,t){let n=ro.parse(a),{contentHash:o,...r}=n;if(o!==p(r)||n.teamId!==t.teamId||n.runId!==t.runId||t.manifestHash&&n.manifestHash!==t.manifestHash)throw new Error("Diagnostics differ from the selected workspace, run or retained evidence.");if(n.events.length>n.eventCount||n.calls.length>n.callCount||new Set(n.events.map(i=>i.id)).size!==n.events.length||n.events.some((i,s)=>i.sequence<=(s?n.events[s-1].sequence:t.afterSequence??-1))||n.calls.some((i,s)=>i.id<=(s?n.calls[s-1].id:t.afterCallId??""))||n.nextEventCursor!==null&&n.nextEventCursor!==n.events.at(-1)?.sequence||n.nextCallCursor!==null&&n.nextCallCursor!==n.calls.at(-1)?.id||n.accounting.final&&(n.accounting.outstandingCount!==0||n.accounting.settledUsd===null||!n.accounting.receiptCount))throw new Error("Diagnostic evidence pagination or final accounting is inconsistent.");return n}d(cn,"verifyRunDiagnostics");var v=e.string().trim().min(1).max(200),nt=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="OpenPondExperimentError"}status;code;static{d(this,"OpenPondExperimentError")}},_e=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=n.toString().replace(/\/+$/,"")}options;static{d(this,"OpenPondExperimentsClient")}baseUrl;async defaults(t){return e.object({maximumSpendUsd:e.number().finite().min(1e-6).max(1e4),maximumComparisonSpendUsd:e.number().finite().min(1e-6).max(1e4),initialOutputTokens:e.number().int().positive()}).strict().parse(await this.request("/defaults","GET",void 0,t))}async createComparisonBudget(t,n){let o=e.object({id:v,operationIds:e.array(v).min(1).max(100),maximumSpendUsd:e.number().finite().min(1e-6).max(1e4).optional()}).strict().parse(t),r=this.comparisonBudgetResult(await this.request("/comparison-budgets","POST",o,n),o.id);if(p(r.operations.map(i=>i.operationId).sort())!==p([...o.operationIds].sort())||o.maximumSpendUsd!==void 0&&r.maximumSpendUsd!==o.maximumSpendUsd)throw new Error("Comparison admission differs from its requested operations or ceiling.");return r}async comparisonBudget(t,n){return this.comparisonBudgetResult(await this.request(`/comparison-budgets/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n),t)}comparisonBudgetResult(t,n){let o=e.object({id:v,teamId:v,maximumSpendUsd:e.number().finite().positive(),settledUsd:e.number().finite().nonnegative(),reservedUsd:e.number().finite().nonnegative(),remainingUsd:e.number().finite().nonnegative(),operations:e.array(e.object({operationId:v,runId:v.nullable()}).strict()).min(1).max(100)}).strict().parse(t);if(o.id!==n||o.teamId!==this.options.teamId)throw new Error("Comparison budget scope mismatch.");return o}async harnessSources(t={}){let n=t.cursor===void 0?void 0:e.string().min(1).max(8192).parse(t.cursor),o=new URLSearchParams(n?{cursor:n}:{}),r=rn.parse(await this.request(`/harness-sources?${o}`,"GET",void 0,t.signal));if(r.teamId!==this.options.teamId||new Set(r.items.map(i=>p(i.source))).size!==r.items.length||r.nextCursor!==null&&r.nextCursor===n||r.items.some(i=>i.ready!==(i.reason===null)))throw new Error("Harness catalog differs from its workspace, readiness or continuation.");return r}async prepareHarness(t,n){let o=Ht.parse({...t,maximumCostUsd:t.maximumCostUsd??(await this.defaults(n)).maximumSpendUsd}),r=Tt.parse(await this.request("/harness-setup","POST",o,n));Et(r.request,r.manifest);let i=r.request.policy;if(r.request.teamId!==this.options.teamId||r.request.operationId!==o.operationId||i.kind!=="hosted_harness"||i.profileRepositoryId!==o.profileRepositoryId||i.source.definitionId!==o.definitionId||i.modelId!==o.modelId||i.reasoningEffort!==o.reasoningEffort||r.maximumCostUsd!==o.maximumCostUsd||r.manifest.limits.maximumSpendUsd!==o.maximumCostUsd)throw new Error("Harness preparation differs from its requested scope or configuration.");return r}async run(t,n){let o=ue.parse({...t,maximumCostUsd:t.maximumCostUsd??(await this.defaults(n)).maximumSpendUsd});if(o.request.teamId!==this.options.teamId)throw new Error("Experiment workspace mismatch.");let r=await this.details(await this.request("","POST",{...o,maximumCostUsd:t.maximumCostUsd},n));if(t.maximumCostUsd===void 0&&(o.maximumCostUsd=r.configuration.maximumCostUsd),p(ce(r.request))!==p(ce(o.request))||r.configuration.maximumCostUsd!==o.maximumCostUsd||r.configuration.sourceExperimentId!==o.sourceExperimentId||r.configuration.admissionRequestHash!==p(o))throw new Error("Experiment admission differs from its submitted configuration.");if(o.graders&&p(o.graders)!==p(r.configuration.graders.map(i=>({id:i.id,version:i.version,contentHash:i.contentHash,mappings:i.mappings??[]}))))throw new Error("Experiment admission differs from its selected graders or mappings.");return r}async get(t,n={}){return this.details(await this.request(`/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n.signal),t)}async diagnostics(t,n={}){let o=an.parse({afterSequence:n.afterSequence,afterCallId:n.afterCallId}),r=new URLSearchParams(Object.entries(o).filter(([,i])=>i!==void 0).map(([i,s])=>[i,String(s)]));return cn(await this.request(`/${encodeURIComponent(v.parse(t))}/diagnostics?${r}`,"GET",void 0,n.signal),{teamId:this.options.teamId,runId:t,manifestHash:n.manifestHash,afterSequence:n.afterSequence,afterCallId:n.afterCallId})}async list(t={},n){let o=At.parse(t),r=new URLSearchParams(Object.entries(o).filter(([,c])=>c!==void 0).map(([c,l])=>[c,String(l)])),i=e.object({items:e.array(e.unknown()).max(100),nextCursor:v.nullable()}).strict().parse(await this.request(`?${r}`,"GET",void 0,n)),s=await Promise.all(i.items.map(c=>this.details(c)));if(s.length>o.limit||new Set(s.map(c=>c.summary.id)).size!==s.length||i.nextCursor!==null&&i.nextCursor!==s.at(-1)?.summary.id||s.some(c=>o.projectId&&c.request.project?.id!==o.projectId||o.datasetHash&&c.request.taskset.contentHash!==o.datasetHash||o.status&&c.summary.status!==o.status))throw new Error("Experiment page differs from its selected scope.");return{items:s,nextCursor:i.nextCursor}}async result(t,n){let o=e.object({executionId:v,passId:v.nullable(),manifest:e.unknown(),result:e.unknown()}).strict().parse(await this.request(`/${encodeURIComponent(v.parse(t))}/result`,"GET",void 0,n)),r=J(o);if(o.executionId!==t||r.manifest.teamId!==this.options.teamId||r.manifest.lineage?.execution.id!==t||r.manifest.lineage.scoringPassId!==o.passId)throw new Error("Experiment result identity mismatch.");return{...r,executionId:t,passId:o.passId}}async cancel(t,n){return this.details(await this.request(`/${encodeURIComponent(v.parse(t))}/cancel`,"POST",{},n),t)}async duplicate(t,n,o){let r=await this.details(await this.request(`/${encodeURIComponent(v.parse(t))}/duplicate`,"POST",{operationId:v.parse(n)},o));if(r.request.operationId!==n||r.configuration.sourceExperimentId!==t||r.summary.id===t)throw new Error("Duplicate Experiment admission differs from its source or operation.");return r}async score(t,n){let o=ae.parse(t),r=this.pass(await this.request(`/${encodeURIComponent(o.execution.id)}/scoring-passes`,"POST",o,n));if(p(r.request)!==p(o))throw new Error("Scoring admission differs from its submitted inputs.");return r}async scoringPass(t,n){return this.pass(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n),t)}async scoringPasses(t,n={}){let o=new URLSearchParams(n.afterId?{afterId:v.parse(n.afterId)}:{});n.executionKind&&o.set("executionKind",e.literal("recorded_evidence").parse(n.executionKind));let r=e.object({items:e.array(e.unknown()).max(30),nextCursor:v.nullable()}).strict().parse(await this.request(`/${encodeURIComponent(v.parse(t))}/scoring-passes?${o}`,"GET",void 0,n.signal)),i=r.items.map(s=>this.pass(s));if(i.some(s=>s.request.execution.id!==t||s.request.executionKind!==n.executionKind)||new Set(i.map(s=>s.id)).size!==i.length)throw new Error("Scoring pass page differs from its execution ownership.");return{items:i,nextCursor:r.nextCursor}}async cancelScoringPass(t,n){return this.pass(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}/cancel`,"POST",{},n),t)}async scoringResult(t,n){let o=e.object({executionId:v,passId:v,manifest:e.unknown(),result:e.unknown()}).strict().parse(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}/result`,"GET",void 0,n)),r=J(o);if(o.passId!==t||r.manifest.teamId!==this.options.teamId||r.manifest.id!==t||r.manifest.lineage?.execution.id!==o.executionId||r.manifest.lineage.scoringPassId!==t)throw new Error("Scoring result identity mismatch.");return{...r,executionId:o.executionId,passId:t}}async compare(t,n,o){let r=d(c=>c.startsWith("score_")?this.scoringResult(c,o):this.result(c,o),"read"),[i,s]=await Promise.all([r(t),r(n)]);return{baseline:i,candidate:s,comparison:Re(i,s)}}async details(t,n){let o=await on(t);if(o.summary.teamId!==this.options.teamId||n&&o.summary.id!==n)throw new Error("Experiment identity mismatch.");return o}pass(t,n){let o=en(t);if(o.teamId!==this.options.teamId||n&&o.id!==n)throw new Error("Scoring pass identity mismatch.");return o}async request(t,n,o,r){let i=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/experiments${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}}),s=await i.json();if(!i.ok){let c=e.object({code:e.string(),message:e.string()}).safeParse(s);throw new nt(i.status,c.success?c.data.code:"experiment_request_failed",c.success?c.data.message:"Experiment request failed.")}return s}};var E=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="HumanReviewClientError"}status;code;static{d(this,"HumanReviewClientError")}},We=class{static{d(this,"OpenPondHumanReviewClient")}options;constructor(t){let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.hash||n.search||!t.apiKey.trim()||!t.scope.trim()||t.scope!==t.scope.trim()||/[\r\n]/.test(t.scope))throw new Error("Use a scoped key and a plain HTTP(S) API endpoint.");this.options={...t,baseUrl:n.toString().replace(/\/+$/,"")}}async command(t,n){let o=Ge.parse(await this.request({endpoint:"command",scope:this.options.scope,command:t},n)),r=t.action==="cancel"?o.status==="cancelled"&&o.revision>=t.expectedRevision+1:o.revision===t.expectedRevision+1;if(o.id!==t.id||o.scope!==this.options.scope||!r)throw new E(502,"human_response_identity_mismatch","Review response differs from the submitted operation.");return o}async get(t,n,o){let r=Ge.parse(await this.request({endpoint:"get",scope:this.options.scope,id:t,...n?{revision:n}:{}},o));if(r.id!==t||r.scope!==this.options.scope||n!==void 0&&r.revision!==n)throw new E(502,"human_response_identity_mismatch","Review response differs from the requested identity.");return r}async inbox(t,n){let o=yt.parse(await this.request({...t,endpoint:"inbox",scope:this.options.scope},n));if(o.items.some(r=>r.scope!==this.options.scope||t.projectId&&r.projectId!==t.projectId))throw new E(502,"human_inbox_scope_mismatch","Inbox response differs from the authorized scope.");return o}async snapshot(t,n){return e.object({evidence:te,form:ee}).strict().parse(await this.request({...t,endpoint:"snapshot",scope:this.options.scope},n))}async taskSnapshot(t,n){return e.object({evidence:te,form:ee}).strict().parse(await this.request({...t,endpoint:"snapshot_tasks",scope:this.options.scope},n))}async inspect(t,n,o){let r=It.parse(await this.request({endpoint:"inspect",scope:this.options.scope,id:t,...o},n));if(r.some(i=>i.reviewId!==t))throw new E(502,"human_inspection_identity_mismatch","Inspection differs from selected review.");return r}async results(t,n,o){return Xe.parse(await this.request({endpoint:"results",scope:this.options.scope,executionId:t,...n?{selection:n}:{}},o))}async members(t){return e.array(e.object({userId:e.string(),name:e.string().nullable(),email:e.string().nullable(),role:e.string()}).strict()).parse(await this.request({endpoint:"members",scope:this.options.scope},t))}async request(t,n){let o=vt.parse(t);if(o.scope!==this.options.scope)throw new E(403,"human_scope_denied","Request differs from the scoped client workspace.");let r=JSON.stringify(o);if(new TextEncoder().encode(r).byteLength>1048576)throw new E(422,"human_request_too_large","Review request exceeds its bounded transport.");let i=await(this.options.fetch??globalThis.fetch)(`${this.options.baseUrl}/v1/human-review`,{method:"POST",headers:{authorization:`Bearer ${this.options.apiKey}`,"content-type":"application/json","x-openpond-team-id":this.options.scope},body:r,signal:n,redirect:"error"}),s=i.body?.getReader(),c=[],l=0;if(s)try{for(;;){let u=await s.read();if(u.done)break;if(l+=u.value.byteLength,l>8388608)throw await s.cancel(),new E(502,"human_response_too_large","Review response exceeds its bounded transport.");c.push(u.value)}}finally{s.releaseLock()}let m=new Uint8Array(l),h=0;for(let u of c)m.set(u,h),h+=u.byteLength;let y;try{y=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(m))}catch{throw new E(502,"human_response_invalid","Review response is not valid JSON.")}if(!i.ok){let u=e.object({code:e.string().optional(),error:e.string().optional()}).passthrough().safeParse(y);throw new E(i.status,u.success?u.data.code??"human_request_failed":"human_request_failed",u.success?u.data.error??"Review request failed.":"Review request failed.")}if(o.endpoint==="results"){let u=Xe.parse(y),{contentHash:g,...S}=u;if(u.executionId!==o.executionId||p(S)!==g||o.selection!==void 0&&p(u.selection)!==p(o.selection))throw new E(502,"human_result_identity_mismatch","Human results differ from the exact retained execution or selected reviews.")}if(o.endpoint==="snapshot"||o.endpoint==="publish_evidence"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(u.evidence.graderBinding.id!==o.graderId||u.evidence.attempts.length!==o.selections.length||u.evidence.attempts.some((g,S)=>g.experimentId!==o.selections[S].executionId||g.attemptId!==o.selections[S].receiptId))throw new E(502,"human_snapshot_identity_mismatch","Review snapshot differs from selected retained evidence.")}if(o.endpoint==="publish_local"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(!u.evidence.publication||u.evidence.attempts.length!==o.evidence.attempts.length||u.evidence.attempts.some((g,S)=>g.localSource?.kind!=="owner_attested_local"||g.experimentId!==o.evidence.attempts[S].executionId||g.attemptId!==o.evidence.attempts[S].receiptId||g.localSource.retainedAttemptHash!==o.evidence.attempts[S].origin.retainedAttemptHash))throw new E(502,"human_publication_identity_mismatch","Published review differs from the exact local-origin export.")}if(o.endpoint==="snapshot_tasks"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(u.evidence.graderBinding.id!==o.graderId||p(u.evidence.dataset)!==p(o.dataset)||o.taskIds!==void 0&&p(u.evidence.taskIds)!==p(o.taskIds)||!u.evidence.taskIds?.length||new Set(u.evidence.taskIds).size!==u.evidence.taskIds.length)throw new E(502,"human_snapshot_identity_mismatch","Task snapshot differs from the selected exact tasks.")}return y}};var dn=e.object({sourcePass:f,graders:ae.shape.graders,mappings:ae.shape.mappings,maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),ze=e.object({externalDatasetBinding:ne,scoring:dn.optional(),modelId:e.string().min(1).max(300),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),ot=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}).strict(),x=e.string().min(1).max(240),A=e.string().regex(/^[a-f0-9]{64}$/),Q=e.object({schemaVersion:e.literal("openpond.experimentImprovement.v1"),id:x,operationId:x,requestHash:A,actorId:x,teamId:x,projectId:x.nullable(),ownerWorkspaceId:x,ownerRevision:e.number().int().nonnegative(),ownerSourceRevision:e.string().min(1).max(500),baseRelease:f,profileRef:ot,baseProfileSourceRevision:e.string().min(1).max(500),evidence:e.object({manifest:F,result:oe}).strict(),component:e.object({kind:e.enum(["skill","workflow","agent","instruction"]),path:e.string().min(1).max(2e3),workflowId:x.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:x,turnId:x,revision:e.number().int().positive(),startedAt:e.string().datetime()}).strict().nullable(),frozen:e.object({release:f,sourceRevision:e.string().min(1).max(500),profileSourceRevision:e.string().min(1).max(500),authoringHash:A,partitionHash:A,executableSourceHash:A,protectedClosureHash:A,candidateRevision:e.number().int().positive(),diff:e.array(e.object({path:e.string(),before:A.nullable(),after:A.nullable()}).strict()).max(1e4)}).strict().nullable(),test:e.object({recipe:ze,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:x,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:oe}).strict(),candidate:e.object({manifest:F,result:oe}).strict(),frozenHash:A,humanProjection:Qe.optional()}).strict().nullable(),adoptionIntent:e.object({operationId:x,expectedOwnerRevision:e.number().int().nonnegative(),frozenHash:A,humanProjection:Qe.optional()}).strict().nullable(),acceptance:f.nullable(),rollback:f.nullable(),error:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime(),contentHash:A}).strict();function pn(a){let t=Q.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Improvement state integrity failed.");if(J(t.evidence),t.evidence.manifest.teamId!==t.teamId||t.evidence.result.status!=="completed"||!t.evidence.result.cases.some(r=>r.status==="completed"))throw new Error("Improvement requires usable completed owner evidence.");if(t.test&&(p(t.test.recipe)!==t.test.recipeHash||me(t.test.recipe.externalDatasetBinding).profileId!==t.profileRef.profileId))throw new Error("The test recipe changed its exact selected Profile.");if(t.comparison?.humanProjection){let r=Wt(t.comparison.humanProjection);if(r.teamId!==t.teamId||r.projectId!==t.projectId||p(r.baseline)!==p(t.comparison.baseline)||p(r.candidate)!==p(t.comparison.candidate))throw new Error("Human comparison projection differs from its exact owner evidence.")}if(t.comparison&&(J(t.comparison.baseline),J(t.comparison.candidate),!t.frozen||t.comparison.frozenHash!==p(t.frozen)||!Re(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!==p(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}d(pn,"verifyExperimentImprovementState");var mn=e.object({states:e.array(Q).max(50),nextCursor:x.nullable()}).strict(),io=e.object({operationId:x,ownerWorkspaceId:x,expectedOwnerRevision:e.number().int().nonnegative(),baseRelease:f,profileRef:ot,profileSourceRevision:e.string().min(1).max(500),projectId:x.nullable(),evidence:f,component:Q.shape.component,mode:Q.shape.mode,limits:Q.shape.limits}).strict(),un=e.discriminatedUnion("operation",[e.object({operation:e.literal("list"),limit:e.number().int().min(1).max(50).default(30),cursor:x.optional()}).strict(),e.object({operation:e.literal("options"),evidence:f}).strict(),e.object({operation:e.literal("start"),request:io}).strict(),e.object({operation:e.enum(["read","humanComparisonOptions"]),id:x}).strict(),e.object({operation:e.literal("instructions"),id:x}).strict(),e.object({operation:e.literal("edit"),id:x,revision:e.number().int().positive(),expectedFileHash:A,text:e.string().max(25e4)}).strict(),e.object({operation:e.literal("mode"),id:x,revision:e.number().int().positive(),mode:e.enum(["manual","llm_assisted"])}).strict(),e.object({operation:e.literal("author"),id:x,revision:e.number().int().positive(),modelId:x,prompt:e.string().min(1).max(2e4)}).strict(),e.object({operation:e.enum(["freeze","finishAuthoring","useCandidate","discard","cancel","rollback"]),id:x,revision:e.number().int().positive()}).strict(),e.object({operation:e.literal("test"),id:x,revision:e.number().int().positive(),recipe:ze}).strict(),e.object({operation:e.literal("compare"),id:x,revision:e.number().int().positive(),baseline:f,candidate:f,humanSelections:_t.optional()}).strict()]),we=e.object({teamId:x,evidence:f,scoring:dn.optional(),profiles:e.array(e.object({id:A,name:e.string(),profileRef:ot,ownerWorkspaceId:x,ownerRevision:e.number().int().nonnegative(),baseRelease:f,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:ne}).strict()).max(500)}).strict()).max(100)}).strict(),so=e.object({candidateId:x,actorId:x,teamId:x,projectId:x.nullable(),candidateRevision:e.number().int().positive(),recipeHash:A,baseline:e.object({manifest:F,result:oe}).strict(),candidate:e.object({manifest:F,result:oe}).strict(),contentHash:A}).strict();function ln(a){let t=so.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Accepted Human discovery integrity failed.");for(let r of[t.baseline,t.candidate])if(J(r),r.manifest.teamId!==t.teamId||r.manifest.lineage?.humanProjection)throw new Error("Discovery must retain original owner evidence.");return t}d(ln,"verifyExperimentImprovementHumanOptions");var C=e.string().min(1).max(240),z=e.string().regex(/^[a-f0-9]{64}$/),rt=e.string().regex(/^[a-f0-9]{40}$/),hn=e.object({schemaVersion:e.literal("openpond.hostedProfileCandidateExport.v1"),actorId:C,teamId:C,candidateId:C,candidateRevision:e.number().int().positive(),projectId:C.nullable(),profileRef:e.object({source:e.literal("openpond_git"),repositoryId:C,profileId:C}).strict(),expectedCommit:rt,component:Q.shape.component,baseRelease:f,frozenHash:z,executableSourceHash:z,protectedClosureHash:z,compiler:e.object({workspaceId:C,name:e.string().max(500),repositoryId:C}).strict(),sourceManifest:e.object({base64:e.string().max(28e5),contentHash:z,sizeBytes:e.number().int().positive().max(2e6)}).strict(),policySource:gt,qualification:e.object({kind:e.enum(["owner_attested_local","hosted_execution"]),ownerActorId:C,teamId:C,originalEvidence:f,baseline:f,candidate:f,comparisonHash:z,recipe:ze}).strict(),createdAt:e.string().datetime(),contentHash:z}).strict();var ao=e.object({schemaVersion:e.literal("openpond.hostedProfileCandidateAdoption.v1"),id:C,operationId:C,actorId:C,teamId:C,candidateId:C,exportHash:z,executionOrigin:e.enum(["owner_attested_local","hosted_execution"]),qualification:hn.shape.qualification,testedCandidateRelease:f,activeRelease:f,expectedCommit:rt,committedProfileGit:rt,executableSourceHash:z,protectedClosureHash:z,createdAt:e.string().datetime(),contentHash:z}).strict();function fn(a){let t=ao.parse(a),{contentHash:n,...o}=t;if(p(o)!==n||t.executionOrigin!==t.qualification.kind||t.qualification.ownerActorId!==t.actorId||t.qualification.teamId!==t.teamId)throw new Error("Hosted candidate receipt integrity differs.");return t}d(fn,"verifyHostedProfileCandidateReceipt");var gn=e.discriminatedUnion("operation",[e.object({operation:e.literal("adopt"),operationId:C,export:hn}).strict(),e.object({operation:e.enum(["read","rollback"]),operationId:C,adoptionOperationId:C,profileRepositoryId:C}).strict()]);var bn=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.hash||n.search||!t.apiKey.trim()||!t.teamId.trim()||!t.actorId.trim())throw new Error("Select the authenticated Improve owner and API origin.");this.origin=n.toString().replace(/\/+$/,"")}options;static{d(this,"ExperimentImprovementClient")}origin;async hostedCandidate(t,n){let o=gn.parse(t);if(o.operation==="adopt"&&(o.export.actorId!==this.options.actorId||o.export.teamId!==this.options.teamId))throw new Error("The hosted candidate export belongs to a different owner.");let{response:r,value:i}=await K(this.options.fetch??fetch,`${this.origin}/v1/profile-candidate-adoptions`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"Content-Type":"application/json","X-OpenPond-Team-Id":this.options.teamId},body:JSON.stringify({teamId:this.options.teamId,command:o}),signal:n},(c,l,m)=>Object.assign(new Error(m),{status:c,code:l}));if(!r.ok){let c=e.object({code:e.string(),message:e.string().optional(),error:e.string().optional()}).passthrough().safeParse(i);throw Object.assign(new Error(c.success?c.data.message??c.data.error??c.data.code:"Hosted candidate operation failed."),{status:r.status,code:c.success?c.data.code:void 0})}let s=fn(i);if(s.actorId!==this.options.actorId||s.teamId!==this.options.teamId||s.operationId!==o.operationId||o.operation==="adopt"&&(s.exportHash!==o.export.contentHash||s.candidateId!==o.export.candidateId||s.testedCandidateRelease.contentHash!==o.export.policySource.harnessRelease.contentHash))throw new Error("Hosted candidate readback differs from the exact owner request.");return s}async command(t,n){let o=un.parse(t),{response:r,value:i}=await K(this.options.fetch??fetch,`${this.origin}/v1/experiment-improvements`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"Content-Type":"application/json","X-OpenPond-Team-Id":this.options.teamId},body:JSON.stringify({teamId:this.options.teamId,request:o}),signal:n},(m,h,y)=>Object.assign(new Error(y),{status:m,code:h}));if(!r.ok){let m=e.object({error:e.string(),code:e.string().optional()}).passthrough().safeParse(i);throw Object.assign(new Error(m.success?m.data.error:"The Improve operation failed."),{status:r.status,code:m.success?m.data.code:void 0})}if(o.operation==="options"){let m=we.parse(i);if(m.teamId!==this.options.teamId||p(m.evidence)!==p(o.evidence))throw new Error("The Improve choices changed their exact originating evidence.");return m}if(o.operation==="humanComparisonOptions"){let m=ln(i);if(m.candidateId!==o.id||m.actorId!==this.options.actorId||m.teamId!==this.options.teamId)throw new Error("Human discovery belongs to another owner or candidate.");return m}if(o.operation==="instructions"){let m=e.object({candidateId:e.string(),candidateRevision:e.number().int().positive(),path:e.string(),text:e.string().max(25e4),textHash:e.string().regex(/^[a-f0-9]{64}$/),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(i);if(m.candidateId!==o.id||pt(m.text)!==m.textHash)throw new Error("The candidate instructions belong to a different revision.");return m}let s=o.operation==="list"?mn.parse(i):null;if(o.operation==="list"&&s&&(s.states.length>o.limit||s.states.some((m,h)=>o.cursor&&m.id<=o.cursor||h>0&&m.id<=s.states[h-1].id)||s.nextCursor&&(o.cursor&&s.nextCursor<=o.cursor||s.states.some(m=>m.id>s.nextCursor))))throw new Error("The retained candidate page changed its scan boundary.");let l=(s?s.states:[i]).map(m=>{let h=pn(m);if(h.actorId!==this.options.actorId||h.teamId!==this.options.teamId||"id"in o&&h.id!==o.id)throw new Error("The Improve response belongs to a different owner or candidate.");if(o.operation==="start"&&h.requestHash!==p(o.request))throw new Error("The Improve request identity changed.");return h});return s?{states:l,nextCursor:s.nextCursor}:l[0]}};var de=class{constructor(t){this.access=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.actorId.trim()||!t.teamId.trim())throw new Error("Select the current evaluation owner and HTTP API origin.");this.origin=n.toString().replace(/\/+$/,"")}access;static{d(this,"EvaluationCoordinationTransport")}origin;async post(t,n,o){let r=JSON.stringify({teamId:this.access.teamId,projectId:this.access.projectId,request:n});if(new TextEncoder().encode(r).byteLength>1048576)throw new Error("The reviewed evaluation command exceeds 1 MiB.");let{response:i,value:s}=await K(this.access.fetch??fetch,`${this.origin}/v1/${t}`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.access.apiKey}`,"X-OpenPond-Team-Id":this.access.teamId,"Content-Type":"application/json"},body:r,signal:o},(c,l,m)=>Object.assign(new Error(m),{status:c,code:l}));if(!i.ok){let c=e.object({error:e.string().optional(),message:e.string().optional(),code:e.string().optional()}).passthrough().safeParse(s);throw Object.assign(new Error(c.success?c.data.error??c.data.message??"Evaluation operation failed.":"Evaluation operation failed."),{status:i.status,code:c.success?c.data.code:void 0})}return s}};var k=e.string().trim().min(1).max(200),ye=e.string().regex(/^[a-f0-9]{64}$/),ve=e.string().datetime(),wn=e.object({operationId:k,id:k.optional(),expectedRevision:e.number().int().nonnegative(),teamId:k,projectId:k.nullable(),enabled:e.boolean(),configuration:ue,cadence:e.discriminatedUnion("kind",[e.object({kind:e.literal("interval"),seconds:e.number().int().min(60).max(31536e3)}).strict(),e.object({kind:e.literal("nightly"),calendar:Rt}).strict()]),maximumTotalSpendUsd:e.number().finite().positive().max(1e4),maximumAttempts:e.number().int().min(1).max(20)}).strict().superRefine((a,t)=>{(a.configuration.request.teamId!==a.teamId||(a.configuration.request.project?.id??null)!==a.projectId)&&t.addIssue({code:"custom",message:"The scheduled Experiment must retain its actual workspace and Project."}),a.configuration.maximumCostUsd>a.maximumTotalSpendUsd&&t.addIssue({code:"custom",message:"The run ceiling exceeds the approved cumulative schedule ceiling."})}),co=e.object({id:k,scheduledAt:ve,coalescedThroughAt:ve,coalescedCount:e.number().int().nonnegative(),configurationHash:ye,operationId:k,state:e.enum(["reserved","dispatching","running","cleaning","completed","failed","cancelled","uncertain"]),executionId:k.nullable(),attempt:e.number().int().positive(),maximumCostUsd:e.number().finite().positive(),actualSpendUsd:e.number().finite().nonnegative().nullable(),cleanupComplete:e.boolean(),error:e.string().max(4e3).nullable()}).strict(),po=e.object({schemaVersion:e.literal("openpond.experimentEvaluationSchedule.v1"),id:k,revision:e.number().int().positive(),actorId:k,teamId:k,projectId:k.nullable(),operationId:k,requestHash:ye,configuration:ue,configurationHash:ye,cadence:wn.shape.cadence,state:e.enum(["scheduled","disabled","blocked"]),nextRunAt:ve.nullable(),maximumTotalSpendUsd:e.number().finite().positive(),maximumAttempts:e.number().int().positive(),lastEvaluatedConfigurationHash:ye.nullable(),newerUnevaluatedRelease:f.nullable(),fires:e.array(co).max(1e4),reason:e.string().max(4e3).nullable(),createdAt:ve,updatedAt:ve,contentHash:ye}).strict();function mo(a){let{operationId:t,request:n,...o}=a,{operationId:r,...i}=n;return p({...o,request:i})}d(mo,"scheduledExperimentHash");function uo(a){let t=po.parse(a);if(mt(t,"Scheduled Experiment"),t.configurationHash!==mo(t.configuration)||t.configuration.request.teamId!==t.teamId||(t.configuration.request.project?.id??null)!==t.projectId)throw new Error("Scheduled Experiment immutable authority differs from its recipe.");return t}d(uo,"verifyExperimentEvaluationSchedule");var lo=e.object({teamId:k,id:k,operationId:k,expectedRevision:e.number().int().positive(),action:e.enum(["cancel_active","retry_active","pause"])}).strict(),ho=e.discriminatedUnion("operation",[e.object({operation:e.literal("publish"),request:wn}).strict(),e.object({operation:e.literal("control"),request:lo}).strict(),e.object({operation:e.literal("read"),id:k}).strict(),e.object({operation:e.literal("list"),cursor:k.optional(),limit:e.number().int().min(1).max(100).default(50)}).strict()]),xn=class{static{d(this,"OpenPondExperimentEvaluationScheduleClient")}transport;constructor(t){this.transport=new de(t)}async command(t,n){let o=ho.parse(t),r=this.transport.access;if(o.operation==="publish"&&(o.request.teamId!==r.teamId||o.request.projectId!==r.projectId)||o.operation==="control"&&o.request.teamId!==r.teamId)throw new Error("The schedule command belongs to another workspace or Project.");let i=await this.transport.post("experiment-evaluation-schedules",o,n),s=o.operation==="list"?e.object({items:e.array(e.unknown()).max(o.limit),nextCursor:e.string().nullable()}).strict().parse(i):null,c=(s?.items??[i]).map(l=>{let m=uo(l);if(m.actorId!==r.actorId||m.teamId!==r.teamId||m.projectId!==r.projectId||o.operation==="read"&&m.id!==o.id||o.operation==="control"&&m.id!==o.request.id||o.operation==="publish"&&(m.requestHash!==p(o.request)||o.request.id&&m.id!==o.request.id))throw new Error("Schedule readback differs from its exact owner command.");return m});return s?{items:c,nextCursor:s.nextCursor}:c[0]}};var w=e.string().trim().min(1).max(240),$=e.string().regex(/^[a-f0-9]{64}$/),$e=e.object({schemaVersion:e.literal("openpond.advancedRefinerEvaluation.v1"),operationId:w,actorId:w,teamId:w,projectId:w.nullable(),mode:e.enum(["review_quality","downstream_adaptation"]),profileRef:e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:w,profileId:w}).strict(),sourceRevision:e.string().min(1).max(500),baselineRelease:f,refinerRelease:f,evidence:f,externalDatasetBinding:ne,adaptationDatasetBinding:ne,privateClosureHash:$,adaptationTaskIds:e.array(w).min(1).max(1e4),holdoutTaskIds:e.array(w).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:$}).strict(),e.object({kind:e.literal("frozen_observations"),environmentHash:$}).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:$}).strict();function fo(a){let t=$e.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Advanced Refiner evaluation admission changed.");let r=me(t.externalDatasetBinding);if(r.profileId!==t.profileRef.profileId||r.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 i=me(t.adaptationDatasetBinding);if(i.profileId!==r.profileId||i.packageHash!==r.packageHash||p(i.dataset)!==p(r.dataset)||p(i.target)!==p(r.target)||i.protectedProfileClosureHash!==r.protectedProfileClosureHash)throw new Error("This native advanced adapter needs separate adaptation and holdout recipes from the same exact released package and target.");if(i.split!==t.adaptationSplit||r.split!==t.holdoutSplit)throw new Error("Advanced split policies differ from their exact admitted recipes.");let s=new Set(r.population.map(l=>l.taskId)),c=new Set(i.population.map(l=>l.taskId));if(t.holdoutTaskIds.some(l=>!s.has(l))||t.adaptationTaskIds.some(l=>!c.has(l)))throw new Error("Advanced evaluation selected cases outside its exact Dataset recipe.");return t}d(fo,"verifyAdvancedRefinerEvaluationPin");var go=e.object({pin:$e,modelId:w,profileId:w,model:ut,seed:e.number().int(),reasoningEffort:e.enum(["none","off","low","medium","high","xhigh","max"]).nullable()}).strict(),bo=e.discriminatedUnion("operation",[e.object({operation:e.literal("start"),request:go}).strict(),e.object({operation:e.enum(["read","cancel","resume"]),id:w}).strict(),e.object({operation:e.literal("list")}).strict()]),xo=e.object({taskId:w,sourceCaseHash:$,reviewSessionId:w,reviewTurnId:w,inputHarness:f,trigger:f,decision:e.enum(["no_action","route_deterministically","queue_refiner"]),outcome:f.nullable(),proposal:f.nullable(),validations:e.array(f).max(100),grade:e.object({id:w,contentHash:$,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),failureClass:e.string().nullable()}).strict(),resetComplete:e.boolean()}).strict(),ps=e.object({schemaVersion:e.literal("openpond.advancedRefinerReviewReceipt.v1"),id:w,runId:w,pinHash:$,ownerActorId:w,teamId:w,privateClosureHash:$,refinerRelease:f,cases:e.array(xo).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:$}).strict();var yn=we.shape.profiles.element,wo=we.extend({profiles:e.array(yn.extend({components:e.array(yn.shape.components.element.extend({adaptationSplits:e.array(e.object({split:e.enum(["train","validation","test","frozen_eval"]),taskIds:e.array(w)})),environmentHash:$,resettable:e.boolean(),reviewQuality:e.boolean()}))})),refinerReleases:e.array(f),activeRefiner:f.nullable(),models:e.array(e.object({id:w,profileId:w,name:e.string(),location:e.enum(["local","hosted"])}))}),yo=e.object({operation:e.literal("prepare"),evidence:f,profileOptionId:w,componentLabel:w,mode:e.enum(["review_quality","downstream_adaptation"]),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),operationId:w,refinerRelease:f,maximumCostUsd:e.number().positive(),maximumDurationMs:e.number().int().positive(),maximumModelSteps:e.number().int().positive()}).strict(),vo=e.union([bo,yo,e.object({operation:e.literal("options"),evidence:f}).strict()]),ms=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(),vn=class{static{d(this,"OpenPondAdvancedRefinerEvaluationClient")}transport;constructor(t){this.transport=new de(t)}async command(t,n){let o=vo.parse(t),r=this.transport.access,i=d(m=>{let h=fo(m);if(h.actorId!==r.actorId||h.teamId!==r.teamId||h.projectId!==r.projectId)throw new Error("The advanced pin belongs to another evaluation owner.");return h},"assertPin");o.operation==="start"&&i(o.request.pin);let s=await this.transport.post("advanced-refiner-evaluations",o,n);if(o.operation==="options"){let m=wo.parse(s);if(m.teamId!==r.teamId||p(m.evidence)!==p(o.evidence))throw new Error("Advanced options changed their reviewed evidence.");return m}if(o.operation==="prepare"){let m=e.object({pin:$e}).strict().parse(s),h=i(m.pin);if(h.operationId!==o.operationId||p(h.profileRef)!==o.profileOptionId||p(h.evidence)!==p(o.evidence)||h.mode!==o.mode||p(h.refinerRelease)!==p(o.refinerRelease)||h.adaptationSplit!==o.adaptationSplit||h.maximumCostUsd!==o.maximumCostUsd||h.maximumDurationMs!==o.maximumDurationMs||h.maximumModelSteps!==o.maximumModelSteps)throw new Error("Advanced preparation changed its reviewed command.");return{pin:h}}if(o.operation==="list")return e.object({items:e.array(e.object({id:w,status:e.enum(["prepared","running","succeeded","failed","cancelled"]),mode:e.enum(["review_quality","downstream_adaptation"]),startedAt:e.string().datetime().nullable(),completedAt:e.string().datetime().nullable(),failure:e.string().nullable()}).strict()).max(1e4)}).strict().parse(s);if(o.operation==="cancel"){let m=e.object({id:w,status:e.enum(["prepared","running","succeeded","failed","cancelled"])}).strict().parse(s);if(m.id!==o.id)throw new Error("Advanced cancellation returned another Run.");return m}let c=e.object({schemaVersion:e.literal("openpond.modelRun.v1"),id:w,kind:e.literal("evaluation"),modelId:w,profileId:w,evaluation:e.object({benchmarkId:e.literal("harness-refiner"),advancedEvaluation:$e}).passthrough()}).passthrough().parse(s),l=i(c.evaluation.advancedEvaluation);if(o.operation==="start"?l.contentHash!==o.request.pin.contentHash||c.modelId!==o.request.modelId||c.profileId!==o.request.profileId:c.id!==o.id)throw new Error("The advanced Run differs from its exact retained request.");return c}};import{randomUUID as So}from"node:crypto";function In(a,t){return{supportsResume:!t,get:d((...n)=>a.get(...n),"get"),start:t?async()=>{throw new Error("This runtime does not support resuming a stopped guest; start fresh Work with saved outputs")}:(...n)=>a.start(...n),exec:d((n,o)=>a.exec(n,t?{...o,timeoutSeconds:Math.min(o.timeoutSeconds??30,60)}:o),"exec"),mkdir:d((...n)=>a.mkdir(...n),"mkdir"),uploadFile:d((...n)=>a.uploadFile(...n),"uploadFile"),uploadFileBase64:d((...n)=>a.uploadFileBase64(...n),"uploadFileBase64"),listFiles:d((...n)=>a.listFiles(...n),"listFiles"),downloadFileResponse:d((...n)=>a.downloadFileResponse(...n),"downloadFileResponse"),stop:d((...n)=>a.stop(...n),"stop"),delete:d((...n)=>a.delete(...n),"delete"),createWork:d(({requestId:n,repo:o,budgetUsd:r,metadata:i})=>{if(t){if(o?.trim())throw new Error("This runtime does not support repository provisioning; provide Work inputs instead");if(r!==void 0)throw new Error("Hosted spending budgets are not supported by this runtime");let c={resources:t.resources??{cpu:1,memoryGb:2,diskGb:10},...n?{requestId:n}:{}};return a.create(c)}let s=r?.trim()||"1.00";return a.create({...o?.trim()?{repo:o.trim()}:{},runtimeProfileId:"openpond-work-v1",resources:{cpu:2,memoryGb:4,diskGb:16},budget:{maxUsd:s},quotas:{maxSpendUsd:s,maxDurationSeconds:3600,idleTimeoutSeconds:900,maxCommands:200,maxOpenPorts:4},metadata:{source:"openpond-sdk-work",...i,...n?{workRequestId:n}:{}}},{async:!0})},"createWork")}}d(In,"workSandbox");function it(a,t){let n=new URL(a);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash)throw new Error(`${t} must be an HTTP(S) endpoint without embedded credentials, query or fragment`);return n.toString().replace(/\/$/,"")}d(it,"configuredEndpoint");function De(a,t){if(!a?.trim())throw new Error(`${t} is required`);return a.trim()}d(De,"configuredKey");var Io=e.object({choices:e.array(e.object({message:e.object({content:e.string().nullable().optional(),tool_calls:e.array(e.object({id:e.string().min(1),type:e.literal("function"),function:e.object({name:e.string().min(1),arguments:e.string()})})).optional()})})).min(1)});async function Sn(a,t){if(!t)return ht(a);let n=await fetch(`${a.apiBaseUrl}/chat/completions`,{method:"POST",headers:{authorization:`Bearer ${a.token}`,"content-type":"application/json"},body:JSON.stringify({model:a.model,messages:a.messages,tools:a.tools,tool_choice:"auto",stream:!1}),signal:a.signal,redirect:"error"});if(!n.ok)throw new Error(`Configured model request failed (${n.status})`);return Io.parse(await n.json())}d(Sn,"workModelTurn");var Co="openpond-chat",Ro=24,ko=4e4,st=2e4,Y="outputs",at="inputs/previous-outputs",En="inputs/.openpond-context.json",Po=100,Cn=100,Rn=100*1024*1024,Me=class{static{d(this,"OpenPondWorkClient")}#t;#n;#o;#e;#r;#i;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl,this.#o=t.chatApiBaseUrl,this.#e=In(t.sandboxes,t.sandboxConfig),this.#r=t.defaultModel??Co,this.#i=t.customModel??!1}async run(t){let n=t.prompt.trim();if(!n)throw new Error("Work prompt is required");t.signal?.throwIfAborted();let o=bt(t.requiredOutputs??[]),r=d(async u=>t.onEvent?.(u),"emit"),i=t.cleanup??"keep",s=jo(i),c=null,l=null,m=!1,h=Pn(t.maxSteps,1,100,Ro),y="";try{await r({type:"status",message:"Preparing sandbox"}),c=await this.#h(t),await r({type:"sandbox",sandboxId:c.id,state:c.state}),await this.#u(c.id,t.inputs??[]),l=await this.#l(c.id);let u=[{role:"system",content:Oo(c.id,(t.inputs?.length??0)>0)},...(t.history??[]).map(g=>({...g})),{role:"user",content:n+(t.requiredOutputs?.length?`
|
|
3
|
+
Required outputs under outputs/: `+JSON.stringify(t.requiredOutputs):"")}];for(let g=1;g<=h;g+=1){t.signal?.throwIfAborted(),await r({type:"status",message:`Thinking \xB7 step ${g}`});let T=(await Sn({apiBaseUrl:this.#o,token:this.#t,model:t.model?.trim()||this.#r,messages:u,tools:[...Eo,...o],toolChoice:"auto",signal:t.signal,metadata:{source:"openpond-sdk-work",sandboxId:c.id,apiBaseUrl:this.#n,...t.metadata}},this.#i)).choices?.[0],N=T?.message?.content?.trim()??"",D=T?.message?.tool_calls??[];if(u.push({role:"assistant",content:N||null,...D.length>0?{tool_calls:D}:{}}),N&&(y=N,await r({type:"assistant",text:N})),D.length===0){let B;try{B=await this.#d(c.id,l,t.requiredOutputs)}catch(pe){u.push({role:"user",content:"Output acceptance failed. Correct the required outputs and submit again: "+Z(pe)});continue}for(let pe of B)await r({type:"output",output:pe});m=!0,await this.#s(c.id,B,t,s,r);let O={sandboxId:c.id,text:y,steps:g,outputs:B,lifecycle:s};return await r({type:"done",...O}),O}for(let[B,O]of D.entries()){t.signal?.throwIfAborted();let pe=await this.#f(c.id,O,B,t.timeoutSeconds,r,t.requiredOutputs);u.push(pe)}}throw new Error(`Work did not finish within ${h} steps`)}catch(u){if(c&&l&&!m)try{let g=await this.#d(c.id,l,t.requiredOutputs);for(let S of g)await r({type:"output",output:S});await this.#s(c.id,g,t,s,r)}catch(g){kn(u,s,g)}throw kn(u,s),u}}async deleteSandbox(t){try{if((await this.#e.get(t)).state==="deleted")return;await this.#e.delete(t)}catch(n){if(n instanceof Je&&n.status===404)return;throw n}}async#u(t,n){if(n.length===0)return;if(n.length>Cn)throw new Error(`Work inputs exceed the ${Cn} file limit`);if(n.reduce((s,c)=>s+Buffer.byteLength(c.contentsBase64,"base64"),0)>Rn)throw new Error(`Work inputs exceed the ${Rn} byte limit`);await this.#e.mkdir(t,{path:at,recursive:!0});let r=new Set,i=[];for(let[s,c]of n.entries()){let l=qo(c,s,r),m=`${at}/${l}`;await this.#e.uploadFileBase64(t,m,c.contentsBase64),i.push({id:c.id,path:m,name:c.name,mimeType:c.mimeType??null,checksumSha256:c.checksumSha256??null,revision:c.revision??null,metadata:c.metadata??{}})}await this.#e.uploadFile(t,En,JSON.stringify({version:1,files:i},null,2))}async#s(t,n,o,r,i){if(r.persistence.outputCount=n.length,n.length===0)r.persistence.status="not_needed";else if(o.persistOutput){r.persistence.status="running";for(let s of n){await i({type:"persistence",output:s,status:"started"});try{let c=Ao(this.#e,t,s),l=d(async()=>{let m=await c(),h=o.requiredOutputs?.find(y=>Be(s.path)===`${Y}/${y.path}`);if(h){let y=Se(h,Buffer.from(m.file.contentsBase64,"base64"));if(s.validation&&y?.artifactHash!==s.validation.artifactHash)throw new Error("work_saved_output_changed")}return m},"download");await o.persistOutput({output:s,download:l}),r.persistence.persistedCount+=1,await i({type:"persistence",output:s,status:"succeeded"})}catch(c){let l=Z(c);throw r.persistence.status="failed",r.persistence.error=l,await i({type:"persistence",output:s,status:"failed",error:l}),(o.cleanup??"keep")!=="keep"&&await this.#a(t,r,i),c}}r.persistence.status="complete"}else{if((o.cleanup??"keep")==="delete"&&!o.discardOutputs)throw r.persistence.status="failed",r.persistence.error="Deleting a Work sandbox with outputs requires persistOutput or discardOutputs: true",await this.#a(t,r,i),new Error(r.persistence.error);r.persistence.status="not_requested"}await this.#c(t,o.cleanup??"keep",r,i)}async#a(t,n,o){if(this.#e.supportsResume){await this.#c(t,"stop",n,o);return}n.cleanup.status="pending",n.cleanup.finalSandboxState="running",n.cleanup.error="Output persistence must be retried before guest deletion",await o({type:"cleanup",policy:n.cleanupPolicy,status:"pending",sandboxState:"running",error:n.cleanup.error})}async#c(t,n,o,r){if(n!=="keep"){o.cleanup.status="running",await r({type:"cleanup",policy:n,status:"started"});try{let i=n==="delete"?await this.#e.delete(t):(await this.#e.stop(t)).sandbox;o.cleanup.finalSandboxState=i.state,o.cleanup.status=n==="delete"&&i.state==="deleted"||n==="stop"&&i.state==="stopped"?"complete":"pending",await r({type:"cleanup",policy:n,status:o.cleanup.status,sandboxState:i.state})}catch(i){let s=Z(i);throw o.cleanup.status="failed",o.cleanup.error=s,await r({type:"cleanup",policy:n,status:"failed",error:s}),i}}}downloadOutput(t,n){return this.#e.downloadFileResponse(t,typeof n=="string"?n:n.path)}async#l(t){return await this.#e.mkdir(t,{path:Y,recursive:!0}),Ho(await this.#p(t))}async#d(t,n,o){let i=(await this.#p(t)).filter(s=>n.get(s.path)!==On(s)).sort((s,c)=>s.path.localeCompare(c.path)).slice(0,Po).map(To);for(let s of o??[]){let c=i.find(m=>Be(m.path)===`${Y}/${s.path}`);if(!c)throw new Error("work_required_output_missing:"+s.path);let l=await this.#e.downloadFileResponse(t,c.path);if(l.file.truncated)throw new Error("work_output_download_truncated");c.validation=Se(s,Buffer.from(l.file.contentsBase64,"base64"))}return i}async#p(t){return(await this.#e.listFiles(t,{path:Y,recursive:!0,maxEntries:500})).files.filter(o=>o.type==="file"&&!Be(o.path).includes("/.openpond-"))}async#h(t){if(t.sandboxId){let o=await this.#e.get(t.sandboxId);if(o.state==="stopped")await this.#e.start(o.id,{async:!0});else if(o.state==="deleted"||o.state==="error")throw new Error(`Cannot resume sandbox ${o.id} in state ${o.state}`);return await this.#m(o.id,t.signal)}let n=await this.#e.createWork(t);return this.#m(n.id,t.signal)}async#m(t,n){let o=Date.now()+72e4,r=await this.#e.get(t);for(;Date.now()<o;){if(n?.throwIfAborted(),r.state==="running")return r;if(r.state==="error"||r.state==="deleted")throw new Error(`Sandbox ${r.id} entered ${r.state}${r.logs.length?`: ${r.logs.join(`
|
|
4
|
+
`)}`:""}`);await zo(2e3,n),r=await this.#e.get(t)}throw new Error(`Sandbox ${t} did not become ready before timeout`)}async#f(t,n,o,r,i,s){let c=n.id||`work_tool_${o}`,l=n.function?.name,m=xt(s??[],l??"");if(m)try{let u=wt(m,JSON.parse(n.function?.arguments||"{}")),g=`${Y}/${m.path}`,S=`${Y}/.openpond-${So()}`;await this.#e.uploadFileBase64(t,S,Buffer.from(u).toString("base64"));let T=d(D=>"'"+D.replaceAll("'","'\\''")+"'","quote");if((await this.#e.exec(t,{command:`mkdir -p -- ${T(g.slice(0,g.lastIndexOf("/")))} && mv -f -- ${T(S)} ${T(g)}`,timeoutSeconds:30})).command.exitCode!==0)throw new Error("work_output_registration_failed");return V(c,{ok:!0,path:g,validation:Se(m,u)})}catch(u){return V(c,{ok:!1,error:Z(u)})}if(l!=="run_command")return V(c,{error:`Unknown tool: ${l??"missing"}`});let h;try{h=JSON.parse(n.function?.arguments||"{}")}catch(u){return V(c,{error:`Invalid tool arguments: ${Z(u)}`})}let y=typeof h.command=="string"?h.command.trim():"";if(!y)return V(c,{error:"command is required"});if(y.length>st){let u=`command exceeds the ${st} character limit`;return await i({type:"tool",toolCallId:c,command:y,status:"failed",output:u}),V(c,{status:"failed",error:u})}await i({type:"tool",toolCallId:c,command:y,status:"started"});try{let u=await this.#e.exec(t,{command:y,timeoutSeconds:Pn(r,1,900,180)}),g=Wo(u.command.output,ko),S=u.command.status==="succeeded"?"succeeded":"failed";return await i({type:"tool",toolCallId:c,command:y,status:S,output:g,exitCode:u.command.exitCode}),V(c,{status:u.command.status,exitCode:u.command.exitCode,output:g})}catch(u){if(u instanceof Je)throw u;let g=Z(u);return await i({type:"tool",toolCallId:c,command:y,status:"failed",output:g}),V(c,{status:"failed",error:g})}}},Eo=[{type:"function",function:{name:"run_command",description:"Run a shell command inside the persistent OpenPond sandbox. Use standard shell tools to inspect, edit, build, and test files. Commands start in the repository workspace.",parameters:{type:"object",additionalProperties:!1,properties:{command:{type:"string",minLength:1,maxLength:st,description:"Shell command to execute."}},required:["command"]}}}];function Oo(a,t){return["You are OpenPond Work, a careful coding agent operating in an isolated Linux sandbox.",`The active sandbox is ${a}.`,...t?[`The authoritative saved files for this turn are staged under /workspace/${at}; their manifest is /workspace/${En}.`,"Before revising a previous output, read its staged file and manifest. Copy the staged input into the output directory before editing it; previous output paths may not exist in this sandbox.","Preserve the actual file bytes. Never reconstruct a saved file from the conversation or claim to have preserved it without reading the staged input."]:[],"Use run_command to inspect the workspace, edit files, and validate your work.",`Place completed user-facing files in ${Y}. The runtime collects new and revised files there automatically when the turn completes.`,"Do the requested work completely. Preserve existing user changes and avoid destructive commands.","Keep the user informed with concise prose, but call tools whenever verification or file changes are needed.","Before finishing, run relevant tests and summarize the concrete result."].join(`
|
|
5
|
+
`)}d(Oo,"systemPrompt");function jo(a){return{cleanupPolicy:a,persistence:{status:"not_requested",outputCount:0,persistedCount:0},cleanup:{status:"not_requested"}}}d(jo,"initialLifecycle");function Ao(a,t,n){let o=null;return()=>(o??=a.downloadFileResponse(t,{path:n.path,maxBytes:Math.max(1,n.sizeBytes)}).then(r=>{let i=Buffer.byteLength(r.file.contentsBase64,"base64");if(r.file.truncated||r.file.returnedBytes!==r.file.totalSizeBytes||i!==n.sizeBytes)throw new Error(`Output download was incomplete for ${n.name}`);return r}),o)}d(Ao,"lazyOutputDownload");function qo(a,t,n){let o=a.id.replace(/[^a-zA-Z0-9._-]+/g,"-").slice(0,80)||`input-${t+1}`,r=a.name.replace(/[^a-zA-Z0-9._-]+/g,"-").slice(-120)||"file",i=`${o}-${r}`,s=i,c=1;for(;n.has(s);)c+=1,s=`${i}-${c}`;return n.add(s),s}d(qo,"uniqueInputName");function kn(a,t,n){!a||typeof a!="object"||Object.assign(a,{workLifecycle:t,...n?{workFinalizationError:Z(n)}:{}})}d(kn,"attachWorkFailure");function Ho(a){return new Map(a.map(t=>[t.path,On(t)]))}d(Ho,"outputSignatures");function On(a){return`${a.sizeBytes}:${a.updatedAt}`}d(On,"outputSignature");function To(a){let t=Be(a.path).split("/").at(-1)||a.path,n=Uo(t);return{path:a.path,name:t,mimeType:n,sizeBytes:a.sizeBytes,updatedAt:a.updatedAt,isBinary:a.isBinary??null,previewable:a.previewable??(n.startsWith("image/")||n==="application/pdf"||n.startsWith("text/"))}}d(To,"workOutputFromFile");function Be(a){return a.replaceAll("\\","/")}d(Be,"normalizedOutputPath");function Uo(a){let t=a.toLowerCase().match(/\.[^.]+$/)?.[0]??"";return _o[t]??"application/octet-stream"}d(Uo,"workOutputMimeType");var _o=Object.freeze({".avif":"image/avif",".csv":"text/csv",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".gif":"image/gif",".html":"text/html",".jpeg":"image/jpeg",".jpg":"image/jpeg",".json":"application/json",".m4a":"audio/mp4",".md":"text/markdown",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".pdf":"application/pdf",".png":"image/png",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".svg":"image/svg+xml",".tsv":"text/tab-separated-values",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".webp":"image/webp",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});function V(a,t){return{role:"tool",tool_call_id:a,content:JSON.stringify(t)}}d(V,"toolMessage");function Pn(a,t,n,o){return Number.isFinite(a)?Math.min(n,Math.max(t,Math.floor(a))):o}d(Pn,"boundedInteger");function Wo(a,t){return a.length<=t?a:`${a.slice(0,t)}
|
|
6
|
+
\u2026 output truncated by openpond-sdk`}d(Wo,"truncate");function Z(a){return a instanceof Error?a.message:String(a)}d(Z,"errorMessage");function zo(a,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason);return}let r=setTimeout(n,a);r.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(r),o(t.reason)},{once:!0})})}d(zo,"sleep");import{promises as jn}from"node:fs";var Ke=class{static{d(this,"OpenPondProjectActionsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async list(t){let n=await U(this.#n,this.#t,Le(t.projectId,"releases",t.teamId));return(await _(n,"List Project Action releases")).releases}async catalog(t){let n=await U(this.#n,this.#t,Le(t.projectId,"catalog",t.teamId));return(await _(n,"Get Project Action catalog")).catalog}async publish(t){let[n,o]=await Promise.all([jn.readFile(t.build.bundlePath),jn.readFile(t.build.runnerPath)]),r=await U(this.#n,this.#t,Le(t.projectId,"releases",t.teamId),{method:"POST",body:JSON.stringify({sourceRef:t.sourceRef,sourceCommitSha:t.sourceCommitSha,bundleBase64:n.toString("base64"),runnerBase64:o.toString("base64"),registry:t.build.registry,manifest:t.build.manifest,metadata:t.metadata})});return(await _(r,"Publish Project Actions")).release}async run(t){let n=await U(this.#n,this.#t,Le(t.projectId,`actions/${encodeURIComponent(t.actionId)}`,t.teamId),{method:"POST",body:JSON.stringify({input:t.value??{},releaseId:t.releaseId,idempotencyKey:t.idempotencyKey,callerType:t.callerType??"sdk",callerId:t.callerId}),signal:t.signal,timeoutMs:9e5});return(await _(n,"Run Project Action")).invocation}};function Le(a,t,n){return`/v1/project-actions/${encodeURIComponent(a)}/${t}?teamId=${encodeURIComponent(n)}`}d(Le,"projectActionPath");var Ne=class{static{d(this,"OpenPondProfileActionsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async catalog(t){let n=Ie(t.teamId,"teamId"),o=new URLSearchParams({teamId:n});t.profileId?.trim()&&o.set("profileId",t.profileId.trim()),t.profileName?.trim()&&o.set("profileName",t.profileName.trim());let r=await U(this.#n,this.#t,`/v1/profile/actions?${o.toString()}`);return(await _(r,"Get Profile Action catalog")).catalog}async run(t){let n=Ie(t.teamId,"teamId"),o=Ie(t.actionKey,"actionKey"),r=Ie(t.idempotencyKey,"idempotencyKey"),i=Ie(t.catalogVersion,"catalogVersion"),s=await U(this.#n,this.#t,`/v1/profile/actions/run?${new URLSearchParams({teamId:n}).toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t.profileId?.trim()?{profileId:t.profileId.trim()}:{},...t.profileName?.trim()?{profileName:t.profileName.trim()}:{},actionKey:o,value:t.value??{},conversationId:t.conversationId??null,createConversation:t.createConversation,conversationTitle:t.conversationTitle??null,idempotencyKey:r,catalogVersion:i,externalCapabilityLeases:t.externalCapabilityLeases})});return _(s,"Run Profile Action")}};function Ie(a,t){let n=a.trim();if(!n)throw new Error(`${t} is required`);return n}d(Ie,"requiredValue");import{randomUUID as An}from"node:crypto";var Fe=class{static{d(this,"OpenPondWorkflowsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async list(t={}){return this.#o("","List Workflows",{signal:t.signal})}async create(t,n={}){return this.#o("","Create Workflow",{method:"POST",body:JSON.stringify({...t,clientRequestId:t.clientRequestId?.trim()||An()}),signal:n.signal})}async update(t,n,o={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}`,"Update Workflow",{method:"PATCH",body:JSON.stringify(n),signal:o.signal})}async delete(t,n={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}`,"Delete Workflow",{method:"DELETE",signal:n.signal})}async runNow(t,n={},o={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}/run`,"Run Workflow",{method:"POST",body:JSON.stringify({clientRequestId:n.clientRequestId?.trim()||An()}),signal:o.signal})}async#o(t,n,o={}){let r=await U(this.#n,this.#t,`/v1/saved-work${t}`,o);return _(r,n)}};function ct(a,t){let n=a.trim();if(!n)throw new Error(`${t} is required`);return n}d(ct,"requiredId");var dt=class{static{d(this,"OpenPondClient")}sandboxes;work;workflows;actions;profileActions;learning;experiments;connectedEvidence;humanReview;constructor(t){let n=t.apiKey?.trim()??"";if(!n&&(!t.sandbox||!t.model))throw new Error("OpenPond API key is required when using a default sandbox or model");let o=t.sandbox?{...t.sandbox,endpoint:it(t.sandbox.endpoint,"Sandbox endpoint"),apiKey:De(t.sandbox.apiKey,"Sandbox API key")}:void 0,r=t.model?{endpoint:it(t.model.endpoint,"Model endpoint"),apiKey:De(t.model.apiKey,"Model API key"),model:De(t.model.model,"Model ID")}:void 0,i=t.baseUrl?.trim()||"https://api.openpond.ai";this.learning=s=>new Ut({apiKey:n,baseUrl:i,scope:s}),this.experiments=s=>new _e({apiKey:n,baseUrl:i,teamId:s}),this.connectedEvidence=s=>new Ue({apiKey:n,baseUrl:i,teamId:s}),this.humanReview=s=>new We({apiKey:n,baseUrl:i,scope:s}),this.sandboxes=ft({apiKey:o?.apiKey??n,baseUrl:i,sandboxApiUrl:o?.endpoint??t.sandboxApiUrl,customEndpoint:!!o}),this.work=new Me({apiKey:r?.apiKey??n,apiBaseUrl:i,chatApiBaseUrl:r?.endpoint||t.chatApiUrl?.trim()||lt({apiBaseUrl:i,env:{}}),sandboxes:this.sandboxes,sandboxConfig:o,defaultModel:r?.model,customModel:!!r}),this.workflows=new Fe({apiKey:n,apiBaseUrl:i}),this.actions=new Ke({apiKey:n,apiBaseUrl:i}),this.profileActions=new Ne({apiKey:n,apiBaseUrl:i})}};function Vs(a){return new dt(a)}d(Vs,"createOpenPondClient");export{M as a,Vo as b,Xo as c,he as d,Qo as e,Yo as f,Zo as g,er as h,tr as i,Nt as j,Qt as k,Ue as l,Zt as m,ae as n,_e as o,We as p,un as q,bn as r,ho as s,xn as t,vo as u,vn as v,Vs as w};
|
|
@@ -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-LI56PPCN.js";import{j as y}from"./chunk-5ZNE43XC.js";import{f as i,m as s}from"./chunk-HIQPGYVH.js";import{c as H,d as w,f as k}from"./chunk-LK77GI6M.js";import{Bb as h,Eb as I,Fb as E,oa as v,pa as g,wb as f}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.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-Y4I6CFZJ.js";import{j as y}from"./chunk-BU6MW65V.js";import{f as i,m as s}from"./chunk-HIQPGYVH.js";import{c as H,d as w,f as k}from"./chunk-LK77GI6M.js";import{Bb as h,Eb as I,Fb as E,oa as v,pa as g,wb as f}from"./chunk-ZY32SZ2P.js";import{A as e}from"./chunk-X2J2P5ZT.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{Rc as l,fe as h,fh as w,ih as f,jh as g,kh as E,lj as a,nj as I,qh as S,yj as y}from"./chunk-6D3FI2XT.js";import{c as s,f as c,h as p}from"./chunk-3M53YXEI.js";import{A as u}from"./chunk-X2J2P5ZT.js";import{a as m}from"./chunk-FTQLQJQV.js";var M=u.object({modelProjectId:a.shape.modelProjectId,request:I}).strict(),C=new Set(["hosted-decision-capability","hosted-compile-decision","hosted-prepare-decision","hosted-start-decision","hosted-cancel-decision","hosted-decision-execution","hosted-decision-executions","hosted-save-decision-model","hosted-score-decision","hosted-decision-serving","hosted-control-decision-serving"]);async function b(D){let{action:i,target:d,teamId:o,options:t,client:n,readInput:x}=D;if(i==="hosted-decision-execution"){if(!d)throw new Error("Supply the original decision execution ID.");return n.getDecisionExecution(o,d)}if(i==="hosted-decision-executions"){if(d)throw new Error("List decision executions using filters.");let e=S.parse(Object.fromEntries(Object.entries({id:s(t,"id")||void 0,projectId:s(t,"projectId")||void 0,mode:s(t,"mode")||void 0,phase:s(t,"phase")||void 0,cursor:s(t,"cursor")||void 0,limit:p(t.limit,"--limit")}).filter(([,v])=>v!==void 0)));return n.listDecisionExecutions(o,e)}let r=await x();if(i==="hosted-decision-serving"){let e=a.parse(r);return n.decisionModelServing(e.modelProjectId,{teamId:o,versionHash:e.versionHash})}if(i==="hosted-control-decision-serving"){let e=y.parse(r);if(e.request.teamId!==o)throw new Error("Use this Model's original workspace.");if(e.request.action==="activate"&&!c(t.yes))throw new Error("Activating billed decision serving capacity requires --yes.");return n.controlDecisionModelServing(e.modelProjectId,e.request)}if(i==="hosted-score-decision"){let e=M.parse(r);if(e.request.teamId!==o)throw new Error("Use this Model's original workspace.");if(!c(t.yes))throw new Error("Billed decision scoring requires --yes.");return n.scoreDecisionModel(e.modelProjectId,e.request)}if(i==="hosted-decision-capability"){let e=h.parse(r);if(e.teamId!==o)throw new Error("Use this input's original workspace.");return n.decisionExecutionCapability(e)}if(i==="hosted-compile-decision"){let e=w.parse(r);if(e.teamId!==o)throw new Error("Use this input's original workspace.");return n.compileDecisionExecution(e)}if(i==="hosted-prepare-decision"){let e=f.parse(r);if(e.teamId!==o)throw new Error("Use this input's original workspace.");return n.prepareDecisionExecution(e)}if(i==="hosted-start-decision"){let e=g.parse(r);if(e.teamId!==o)throw new Error("Use this execution's original workspace.");if(!c(t.yes))throw new Error("Starting paid decision execution requires --yes.");return n.startDecisionExecution(e)}if(i==="hosted-cancel-decision"){let e=E.parse(r);if(e.teamId!==o)throw new Error("Use this execution's original workspace.");return n.cancelDecisionExecution(e)}if(i==="hosted-save-decision-model"){let e=l.parse(r);if(e.teamId!==o)throw new Error("Use this result's original workspace.");return n.saveDecisionResultModel(e)}throw new Error("Unsupported decision command.")}m(b,"runHostedDecisionCommand");export{C as a,b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as le,b as De,c as Be}from"./chunk-UTIELP6F.js";import{k as re,q as oe,t as se}from"./chunk-7NCM6GBN.js";import{d as ie,f as Ee,g as He,h as Oe,i as ze,l as B,n as Ve}from"./chunk-JT5YQ52I.js";import{a as Pe}from"./chunk-PAYFJHPO.js";import{i as D}from"./chunk-WD4KAKEX.js";import{a as Te}from"./chunk-2PXKSAG6.js";import{B as Ce,k as te,m as ne,oa as we,ta as Me,wa as ae}from"./chunk-BU6MW65V.js";import{H as Ae}from"./chunk-DXJC3QW7.js";import{h as je}from"./chunk-D6L6UNUQ.js";import{f as V}from"./chunk-HNQPEOJD.js";import{c as n,d as o,e as c,g as r,h as g}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as v}from"./chunk-FTQLQJQV.js";var L=e.string().trim().min(1).max(240),N=e.string().trim().min(1),me=e.string().trim().min(8).max(256),Le=e.record(e.string(),e.unknown()).default({}),Ct=e.enum(["created","inspecting","awaiting_source_review","awaiting_mapping","awaiting_materialization_approval","materializing","validating","ready","cancelling","cancelled","failed"]),qe=e.object({schemaVersion:e.literal("openpond.huggingFaceDatasetLocator.v1"),repositoryId:e.string().trim().regex(/^[^/\s]+\/[^/\s]+$/).max(500),repositoryUrl:e.string().url().max(2e3),requestedRevision:e.string().trim().min(1).max(256).nullable()}),wt=e.object({path:e.string().trim().min(1).max(1e3),logicalType:e.string().trim().min(1).max(500),nullable:e.boolean(),sampleValues:e.array(e.unknown()).max(5)}),Mt=e.object({configuration:e.string().trim().min(1).max(500),split:e.string().trim().min(1).max(500),rowCount:e.number().int().nonnegative().nullable(),sizeBytes:e.number().int().nonnegative().nullable()}),Pt=e.object({schemaVersion:e.literal("openpond.huggingFaceDatasetInspection.v1"),id:L,locator:qe,resolvedRevision:e.string().trim().min(7).max(256),title:e.string().trim().min(1).max(500),description:e.string().max(2e4).nullable(),declaredLicense:e.string().trim().min(1).max(500).nullable(),gated:e.boolean(),private:e.boolean(),configurations:e.array(e.string().trim().min(1).max(500)).min(1).max(1e3),splits:e.array(Mt).min(1).max(1e4),columns:e.array(wt).min(1).max(1e4),previewRows:e.array(e.record(e.string(),e.unknown())).max(25),sourceFiles:e.array(e.object({path:e.string().trim().min(1).max(2e3),configuration:e.string().trim().min(1).max(500),split:e.string().trim().min(1).max(500),revision:e.string().trim().min(7).max(256),sizeBytes:e.number().int().nonnegative().nullable(),contentHash:me.nullable()})).max(1e5),inspectedAt:N,metadata:Le}),Et=e.enum(["row_id","cluster_id","prompt","messages","demonstration","chosen","rejected","expected_output","privileged_context","reward","feedback","tag","metadata"]),Ht=e.object({sourcePath:e.string().trim().min(1).max(1e3),target:Et,transform:e.enum(["identity","string","json","messages","numeric","math_final_answer"]),policy:e.enum(["visible","privileged","metadata"]),required:e.boolean()}),Ue=e.object({schemaVersion:e.literal("openpond.datasetImportMapping.v1"),sourceSchemaHash:me,configuration:e.string().trim().min(1).max(500),upstreamSplits:e.array(e.string().trim().min(1).max(500)).min(1).max(1e3),preset:e.enum(["prompt_only","prompt_completion","messages","preference","prompt_expected_answer","prompt_privileged_solution","prompt_feedback"]),bindings:e.array(Ht).min(1).max(1e4),nullPolicy:e.enum(["reject","drop","preserve"]),invalidRowPolicy:e.enum(["reject_import","drop_with_receipt"]),splitPolicy:e.object({seed:e.number().int(),assignments:e.record(e.string(),te),validationPercent:e.number().min(0).max(100),frozenEvalPercent:e.number().min(0).max(100)}),importerVersion:e.string().trim().min(1).max(200),mappingHash:me}),Ot=e.object({phase:e.enum(["idle","metadata","download","mapping","parquet_write","verification","publish"]),completedBytes:e.number().int().nonnegative(),totalBytes:e.number().int().nonnegative().nullable(),completedRows:e.number().int().nonnegative(),totalRows:e.number().int().nonnegative().nullable(),message:e.string().trim().min(1).max(2e3).nullable()}),Ne=e.object({schemaVersion:e.literal("openpond.datasetImportJob.v1"),id:L,profileId:L,sourceKind:e.enum(["huggingface","uploaded_file"]),status:Ct,locator:qe.nullable(),inspection:Pt.nullable(),mapping:Ue.nullable(),progress:Ot,targetStorageRoot:e.string().trim().min(1).max(4e3).nullable(),tasksetId:L.nullable(),tasksetRevision:e.number().int().positive().nullable(),artifactId:L.nullable(),error:e.string().trim().min(1).max(2e4).nullable(),cancellationRequested:e.boolean(),createdAt:N,updatedAt:N,completedAt:N.nullable(),metadata:Le}),ya=e.object({profileId:L,url:e.string().trim().min(1).max(2e3)}),_a=e.object({name:e.string().trim().min(1).max(500),objective:e.string().trim().min(1).max(2e4),mapping:Ue,targetStorageRoot:e.string().trim().min(1).max(4e3).nullable(),licenseApproved:e.boolean().default(!1)});var y=e.string().trim().min(1).max(240),w=e.string().trim().min(1),$e=e.record(e.string(),e.unknown()).default({}),Fe=e.enum(["nominated","needs_review","approved_for_creation","creating","needs_task_review","baselining","ready_for_export","rejected","dismissed","retired","blocked"]),zt=e.object({id:y,kind:e.enum(["repeated_success","accepted_correction","agent_action_recurrence","outcome_linked_change","frontier_cost","expert_label","runtime_feedback"]),sourceRefIds:e.array(y).min(1).max(1e4),occurredAt:w,signature:e.string().trim().min(1).max(2e3),summary:e.string().trim().min(1).max(5e3),confidence:e.number().min(0).max(1),consented:e.boolean(),metadata:$e}),Vt=e.object({frequency:e.number().min(0).max(1),businessValue:e.number().min(0).max(1),frontierCost:e.number().min(0).max(1),signalQuality:e.number().min(0).max(1),verifiability:e.number().min(0).max(1),repeatability:e.number().min(0).max(1),privacyRisk:e.number().min(0).max(1),overall:e.number().min(0).max(1)}),Dt=e.object({tactic:Pe,eligible:e.boolean(),reasons:e.array(e.string().trim().min(1).max(5e3)).min(1).max(100),blockers:e.array(e.string().trim().min(1).max(5e3)).max(100).default([]),requiredSignals:e.array(e.string().trim().min(1).max(500)).max(100).default([]),generatedBy:e.enum(["decision_table","baseline_reassessment"])}),ce=e.object({schemaVersion:e.literal("openpond.taskCandidate.v1"),id:y,profileId:y,status:Fe,fingerprint:e.string().trim().min(1).max(512),title:e.string().trim().min(1).max(500),summary:e.string().trim().min(1).max(1e4),workflowSignature:e.string().trim().min(1).max(2e3),evidence:e.array(zt).min(1).max(1e5),scorecard:Vt,recommendation:Dt,mergedIntoId:y.nullable(),createdAt:w,updatedAt:w,metadata:$e}),q=e.object({schemaVersion:e.literal("openpond.taskMinerConfig.v1"),enabled:e.boolean().default(!1),localOnly:e.boolean().default(!0),observationWindowDays:e.number().int().min(1).max(365).default(30),minimumRecurrence:e.number().int().min(2).max(100).default(3),clustering:e.literal("hybrid_deterministic_first").default("hybrid_deterministic_first"),consentRequired:e.boolean().default(!0)}),ja=e.object({items:e.array(ce),generatedAt:w,config:q}),Ta=e.object({status:Fe.optional(),mergeIntoId:y.nullable().optional()}),Aa=e.object({profileId:y,sourceIds:e.array(y).max(1e5).default([]),sessionIds:e.array(y).max(1e5).default([]),config:q.optional()}),Ge=e.object({schemaVersion:e.literal("openpond.taskMinerRun.v1"),id:y,profileId:y,status:e.enum(["queued","running","cancelling","cancelled","succeeded","failed"]),config:q,sourceIds:e.array(y).max(1e5),sessionIds:e.array(y).max(1e5).default([]),progress:e.object({stage:e.enum(["queued","ingesting","preparing","clustering","persisting","complete"]),processedSources:e.number().int().nonnegative(),totalSources:e.number().int().nonnegative(),candidatesFound:e.number().int().nonnegative(),skippedSources:e.number().int().nonnegative().default(0)}),candidateIds:e.array(y).max(1e5),cancelRequested:e.boolean(),error:e.string().trim().min(1).max(2e4).nullable(),createdAt:w,startedAt:w.nullable(),completedAt:w.nullable(),updatedAt:w});var Bt=e.enum(["draft","active","completed","archived"]),Lt=e.enum(["draft","ready","queued","running","candidate","accepted","rejected","no_signal","failed","cancelled"]),Je=e.enum(["seed","daily_residual","rank_candidate","weekly_rollup","full_refresh"]),qt=e.enum(["base_model","previous_release","seed_release","accepted_daily_head","accepted_seed"]),Ut=e.enum(["seed_taskset","nightly_selection","daily_cohort_union","eligible_task_pool"]),Nt=e.enum(["live_client","evaluation_attempt","replay_evidence","manual"]),$t=e.object({id:n,ordinal:e.number().int().nonnegative(),label:e.string().trim().min(1).max(100),role:Je,parentRule:qt,taskSource:Ut,trainableRank:e.number().int().positive().max(1024),minimumTasks:e.number().int().nonnegative().max(1e5),maximumTasks:e.number().int().positive().max(1e5)}).strict().superRefine((t,i)=>{t.minimumTasks>t.maximumTasks&&i.addIssue({code:"custom",path:["minimumTasks"],message:"The minimum task count cannot exceed the maximum task count."});let s={seed:{parentRules:["base_model"],taskSource:"seed_taskset"},daily_residual:{parentRules:["previous_release","accepted_daily_head"],taskSource:"nightly_selection"},rank_candidate:{parentRules:["seed_release"],taskSource:"eligible_task_pool"},weekly_rollup:{parentRules:["seed_release","accepted_seed"],taskSource:"daily_cohort_union"},full_refresh:{parentRules:["base_model"],taskSource:"eligible_task_pool"}},{parentRules:l,taskSource:f}=s[t.role];l.includes(t.parentRule)||i.addIssue({code:"custom",path:["parentRule"],message:`${t.role} requires parent rule ${l.join(" or ")}.`}),t.taskSource!==f&&i.addIssue({code:"custom",path:["taskSource"],message:`${t.role} requires task source ${f}.`}),t.ordinal===0&&t.role!=="seed"&&i.addIssue({code:"custom",path:["role"],message:"The first series entry must be the seed."})}),Ft=e.object({id:n,version:e.number().int().positive(),requireCheckpoint:e.boolean(),requireAppliedOptimizerUpdate:e.boolean(),minimumCurrentCohortMeanImprovement:e.number().finite(),maximumRetainedMeanRegression:e.number().finite().nonnegative(),blockCriticalInvariantRegression:e.boolean(),automaticDailyAdvancement:e.boolean()}).strict(),We=e.object({schemaVersion:e.literal("openpond.modelComparisonSeries.v1"),id:n,profileId:n,modelProjectId:n,name:e.string().trim().min(1).max(500),objective:e.string().trim().min(1).max(2e4),status:Bt,revision:e.number().int().positive(),productionBinding:e.object({role:e.literal("chat_manual"),roleTargetId:n}).strict(),baseModel:e.object({id:n,revision:e.string().trim().min(1).max(256)}).strict(),seedTaskset:g,eligibleTaskPool:g,evaluationTasksets:e.object({development:g,retained:g,frozenFinal:g}).strict(),grader:r,benchmarkProtocol:Be.nullable().default(null),automaticEvaluation:e.object({enabled:e.boolean()}).strict().default({enabled:!1}),residualProfile:e.object({profileId:n,serializedEnvelopeRank:e.number().int().positive().max(1024),maximumEnabledRank:e.number().int().positive().max(1024),topology:e.literal("uniform_block_masked")}).strict(),schedule:e.array($t).min(1).max(1e3),scheduleSealedAt:c.nullable(),advancementPolicy:Ft,executionPolicy:e.object({startWhenReady:e.literal(!1)}).strict(),acceptedSeedEntryId:n.nullable(),acceptedDailyHeadEntryId:n.nullable(),promotedBindingId:n.nullable(),createdBy:n,createdAt:c,updatedAt:c}).strict().superRefine((t,i)=>{[...t.schedule].sort((d,j)=>d.ordinal-j.ordinal).some((d,j)=>d.ordinal!==j)&&i.addIssue({code:"custom",path:["schedule"],message:"Schedule ordinals must be unique and contiguous from zero."}),(new Set(t.schedule.map(d=>d.id)).size!==t.schedule.length||new Set(t.schedule.map(d=>d.label)).size!==t.schedule.length)&&i.addIssue({code:"custom",path:["schedule"],message:"Schedule ids and labels must be unique."}),t.residualProfile.maximumEnabledRank>t.residualProfile.serializedEnvelopeRank&&i.addIssue({code:"custom",path:["residualProfile"],message:"Maximum enabled rank cannot exceed the serialized envelope."});let l=Object.values(t.evaluationTasksets);new Set(l.map(d=>`${d.id}:${d.revision}:${d.contentHash}`)).size!==l.length&&i.addIssue({code:"custom",path:["evaluationTasksets"],message:"Development, retained, and frozen-final cohorts require distinct immutable Taskset releases."});let f=t.schedule.find(d=>d.role==="seed");if(!f||t.schedule.filter(d=>d.role==="seed").length!==1){i.addIssue({code:"custom",path:["schedule"],message:"A series requires exactly one seed entry."});return}let h=t.schedule.filter(d=>d.role==="rank_candidate");h.length===1&&i.addIssue({code:"custom",path:["schedule"],message:"A causal rank comparison requires at least two rank candidates."}),new Set(h.map(d=>d.trainableRank)).size!==h.length&&i.addIssue({code:"custom",path:["schedule"],message:"Causal rank candidates must use distinct trainable ranks."}),[f.trainableRank+t.schedule.filter(d=>d.role==="daily_residual").reduce((d,j)=>d+j.trainableRank,0),...t.schedule.filter(d=>d.role==="weekly_rollup").map(d=>f.trainableRank+d.trainableRank),...t.schedule.filter(d=>d.role==="rank_candidate").map(d=>f.trainableRank+d.trainableRank),...t.schedule.filter(d=>d.role==="full_refresh").map(d=>d.trainableRank)].some(d=>d>t.residualProfile.maximumEnabledRank)&&i.addIssue({code:"custom",path:["schedule"],message:"A declared branch exceeds the maximum enabled rank."})}),Ye=e.object({source:Nt,taskIds:e.array(n).min(1).max(1e5),observedFrom:c,observedTo:c,reviewedAt:c,reviewedBy:n,sourceTaskset:g}).strict(),Gt=Ye.extend({derivedFamilyKeys:e.array(n).min(1).max(1e5),familyDerivation:e.object({algorithm:n,sourceTasksetHash:o}).strict(),selectionHash:o}).strict(),de=e.discriminatedUnion("kind",[e.object({kind:e.literal("base_model"),id:n,revision:e.string().trim().min(1).max(256)}).strict(),e.object({kind:e.literal("model_version"),id:n,contentHash:o}).strict()]),Jt=e.object({id:n,branchOrdinal:e.number().int().nonnegative(),rank:e.number().int().positive().max(1024),offsetStart:e.number().int().nonnegative(),offsetEnd:e.number().int().positive(),optimizationRole:e.enum(["frozen","trainable"]),artifactLineageId:n.nullable()}).strict().superRefine((t,i)=>{t.offsetEnd-t.offsetStart!==t.rank&&i.addIssue({code:"custom",path:["offsetEnd"],message:"Block offsets must span exactly the declared rank."})}),Wt=e.object({disposition:e.enum(["advance","hold","no_signal"]),policy:e.object({id:n,version:e.number().int().positive()}).strict(),reasonCodes:e.array(n).min(1).max(100),summary:e.string().trim().min(1).max(5e3),decidedBy:n,decidedAt:c}).strict(),Yt=e.object({evaluationRunId:n,modelVersionId:n,taskset:g,grader:r,cohortRole:e.enum(["current","correction","sibling_verification","cumulative_known","development","retained","prior_disclosed","frozen_final"]),panelId:n.nullable().default(null),protocol:e.object({id:n,revision:e.number().int().positive(),contentHash:o}).strict().nullable().default(null)}).strict(),Kt=e.object({attemptOrdinal:e.number().int().positive(),trainingPlanId:n.nullable(),modelRunId:n.nullable(),terminalStatus:e.enum(["failed","cancelled"]),queuedAt:c.nullable(),startedAt:c.nullable(),completedAt:c}).strict(),A=e.object({seriesId:n,entryId:n,scheduleEntryId:n,ordinal:e.number().int().nonnegative(),releaseHash:o}).strict(),Ke=e.object({schemaVersion:e.literal("openpond.modelComparisonSeriesEntry.v1"),id:n,seriesId:n,profileId:n,modelProjectId:n,scheduleEntryId:n,releaseHash:o,ordinal:e.number().int().nonnegative(),label:e.string().trim().min(1).max(100),role:Je,branch:e.enum(["daily","rank_candidate","weekly_rollup","full_refresh"]),status:Lt,parent:de,taskset:g,sourceTasksets:e.array(g).min(1).max(1e3),taskSelection:Gt.nullable(),trainableRank:e.number().int().positive().max(1024),serializedEnvelopeRank:e.number().int().positive().max(1024),enabledCumulativeRank:e.number().int().positive().max(1024),trainableBlockId:n,residualBlocks:e.array(Jt).min(1).max(1024),attemptOrdinal:e.number().int().positive().default(1),priorRunAttempts:e.array(Kt).max(100).default([]),trainingPlanId:n.nullable(),modelRunId:n.nullable(),modelVersionId:n.nullable(),evaluations:e.array(Yt).max(1e5),decision:Wt.nullable(),promotionBindingId:n.nullable(),queuedAt:c.nullable(),startedAt:c.nullable(),completedAt:c.nullable(),createdAt:c,updatedAt:c}).strict().superRefine((t,i)=>{let s=[...t.residualBlocks].sort((x,k)=>x.offsetStart-k.offsetStart);s.some((x,k)=>x.offsetStart!==(k===0?0:s[k-1].offsetEnd))&&i.addIssue({code:"custom",path:["residualBlocks"],message:"Residual block offsets must be contiguous from zero."});let l=s.at(-1)?.offsetEnd??0;(l!==t.enabledCumulativeRank||l>t.serializedEnvelopeRank)&&i.addIssue({code:"custom",path:["enabledCumulativeRank"],message:"Enabled rank must match the block inventory and fit the envelope."});let f=t.residualBlocks.filter(x=>x.optimizationRole==="trainable");(f.length!==1||f[0]?.id!==t.trainableBlockId||f[0]?.rank!==t.trainableRank)&&i.addIssue({code:"custom",path:["trainableBlockId"],message:"Exactly one block must be trainable during the Run and match trainableRank."});let h=t.priorRunAttempts.map(x=>x.attemptOrdinal);(t.priorRunAttempts.length!==t.attemptOrdinal-1||h.some((x,k)=>x!==k+1))&&i.addIssue({code:"custom",path:["priorRunAttempts"],message:"Prior Run attempts must be a contiguous history before the active attempt."})}),Ea=e.object({seriesId:n,scheduleEntryId:n,taskSelection:Ye.nullable(),expectedSeriesRevision:e.number().int().positive()}).strict();var M=n.nullable(),C=e.number().int().nonnegative(),Qt=e.string().regex(/^[a-f0-9]{40}$/),Zt=e.object({name:e.string().trim().min(1).max(160),startedAt:c,completedAt:c,durationMs:e.number().nonnegative(),clock:e.enum(["monotonic","provider","wall"]),outcome:e.enum(["succeeded","failed","cancelled"])}).strict(),Qe=e.object({schemaVersion:e.literal("openpond.correlatedTelemetryReceipt.v1"),stage:e.enum(["training","evaluation","deployment","inference"]),correlation:e.object({modelRunId:M,modelVersionId:M,policyVersion:C.nullable(),taskId:M,rolloutGroupId:M,providerResourceId:M,deploymentId:M,inferenceRequestId:M}).strict(),spans:e.array(Zt).max(1e4),usage:e.object({promptTokens:C.nullable(),generatedTokens:C.nullable(),gpuSeconds:e.number().nonnegative().nullable(),workerActiveSeconds:e.number().nonnegative().nullable(),optimizerSteps:C.nullable(),rolloutGroups:C.nullable(),successfulTrajectories:C.nullable(),failedTrajectories:C.nullable(),peakGpuMemoryBytes:C.nullable(),peakGpuUtilizationPercent:e.number().min(0).max(100).nullable()}).strict(),resource:e.object({provider:n,resourceIds:e.array(n).max(1e3),gpuType:e.string().trim().min(1).max(300).nullable(),gpuCount:C.nullable(),baseProfileId:M,baseRepository:e.string().trim().min(1).max(512).nullable(),baseRevision:Qt.nullable(),adapterContentHash:o.nullable()}).strict(),cost:e.object({currency:e.literal("USD"),providerReportedUsd:e.number().nonnegative().nullable(),quotedHourlyUsd:e.number().nonnegative().nullable(),estimatedUsd:e.number().nonnegative().nullable(),methodologyVersion:e.string().trim().min(1).max(160),pricingInputs:e.record(e.string().trim().min(1).max(160),e.number().finite()),unitEstimates:e.record(e.string().trim().min(1).max(160),e.number().nonnegative())}).strict(),recordedAt:c,contentHash:o}).strict();var Xt=e.enum(["base_reference","lora_adapter"]),ue=e.object({baseModel:e.object({source:e.literal("huggingface"),repoId:n,revision:e.string().regex(/^[a-f0-9]{40}$/),configHash:o,tokenizerHash:o,licenseId:n,gated:e.boolean()}).strict(),processor:e.object({repository:n,revision:e.string().regex(/^[a-f0-9]{40}$/),configHash:o}).strict()}).strict().superRefine((t,i)=>{(t.baseModel.repoId!==t.processor.repository||t.baseModel.revision!==t.processor.revision)&&i.addIssue({code:"custom",path:["processor"],message:"Reward Model processor must match the pinned scorer base model."})}),tt=e.object({schemaVersion:e.literal("openpond.modelVersion.v1"),id:n,modelId:n,profileId:n,version:e.number().int().nonnegative(),kind:Xt,status:e.enum(["available","failed"]),baseModel:B,taskset:g,comparisonSeriesEntry:A.nullable().optional(),evaluationTasksetRef:g.nullable().optional(),releaseGraph:e.object({resolvedBundleHash:o,profileRelease:g,harnessRelease:r,agentRelease:r.nullable(),grader:e.object({id:n,contentHash:o}).strict()}).strict(),artifactLineageId:n.nullable(),adapterStatus:e.enum(["not_trained","trained"]),createdAt:c,contentHash:o}).strict().superRefine((t,i)=>{t.kind==="base_reference"&&(t.version!==0||t.adapterStatus!=="not_trained"||t.artifactLineageId!==null)&&i.addIssue({code:"custom",message:"A base-reference Model Version must be version 0 without adapter lineage."}),t.kind==="lora_adapter"&&(t.version===0||t.adapterStatus!=="trained"||!t.artifactLineageId)&&i.addIssue({code:"custom",message:"A LoRA Model Version must be version 1+ with adapter lineage."})}),nt=e.object({schemaVersion:e.literal("openpond.rewardModelVersion.v1"),id:n,modelId:n,profileId:n,version:e.number().int().positive(),role:e.literal("reward"),status:e.enum(["available","failed"]),scope:e.enum(["synthetic_smoke","human_preference"]),baseModel:B,runtime:ue.nullable().default(null),taskset:g,preferenceDatasetRelease:r,releaseGraph:e.object({resolvedBundleHash:o,profileRelease:g,harnessRelease:r,grader:e.object({id:n,contentHash:o}).strict()}).strict(),artifacts:e.object({checkpoint:r.extend({objectRef:e.string().regex(/^r2:\/\/[A-Za-z0-9._/-]+$/),files:e.array(e.object({path:e.string().trim().min(1).max(512),sizeBytes:e.number().int().positive(),sha256:o}).strict()).min(4).max(128)}).strict(),adapter:r,scalarHead:r,bucketHead:r.nullable(),processorRelease:r}).strict(),qualificationReport:r.nullable(),createdAt:c,contentHash:o}).strict(),en=e.object({schemaVersion:e.literal("openpond.rewardModelRunReceipt.v1"),provider:n,providerRunId:n,resolvedBundleHash:o,finalCheckpoint:r.extend({objectRef:e.string().regex(/^r2:\/\/[A-Za-z0-9._/-]+$/)}).strict(),adapter:r,scalarHead:r,bucketHead:r.nullable(),processorRelease:r,optimizerEvidence:r,managedExecutionReceipt:r.nullable().default(null),parameterDeltaHash:o,cleanup:e.object({computeReleased:e.boolean(),providerTerminalObserved:e.boolean()}).strict(),contentHash:o}).strict(),at=e.preprocess(t=>{if(!t||typeof t!="object"||Array.isArray(t))return t;let i=t;if(i.tasksetRelease!==void 0)return t;let s=i.taskset;if(!s||typeof s!="object"||Array.isArray(s))return t;let l=s;return typeof l.id!="string"||typeof l.contentHash!="string"?t:{...i,tasksetRelease:{id:l.id,contentHash:l.contentHash}}},e.object({schemaVersion:e.literal("openpond.rewardModelRun.v1"),id:n,rewardModelId:n,rewardModelVersionId:n.nullable(),profileId:n,role:e.literal("reward"),scope:e.enum(["synthetic_smoke","human_preference"]),status:e.enum(["prepared","running","succeeded","failed","cancelled"]),taskset:g,tasksetRelease:r,preferenceDatasetRelease:r,recipeRelease:r,destinationId:n,quote:e.object({maximumSpendUsd:e.number().positive(),hourlyCostUsd:e.number().nonnegative().nullable()}).strict(),managedRunId:n.nullable(),progress:e.object({completedSteps:e.number().int().nonnegative(),totalSteps:e.number().int().positive(),latestLoss:e.number().finite().nullable()}).strict(),receipt:en.nullable(),qualificationReport:r.nullable(),accruedSpendUsd:e.number().nonnegative().nullable(),failureOwner:e.enum(["authoring","admission","provider","runner","artifact","qualification","cleanup"]).nullable(),failure:e.string().trim().min(1).max(5e3).nullable(),startedAt:c,completedAt:c.nullable(),updatedAt:c}).strict()).superRefine((t,i)=>{t.status==="succeeded"&&!t.receipt&&i.addIssue({code:"custom",message:"A successful Reward Model Run requires a canonical receipt."}),t.status!=="succeeded"&&t.rewardModelVersionId!==null&&i.addIssue({code:"custom",message:"Only a successful Reward Model Run can publish a Reward Model Version."})}),tn=e.object({schemaVersion:e.literal("openpond.modelRunReceipt.v1"),provider:n,providerRunId:n,assignmentHash:o,resultHash:o,transcriptHash:o,traceHash:o.nullable(),resolvedBundleHash:o,artifactPath:e.string().trim().min(1).max(2e3),cleanup:e.object({computeReleased:e.boolean(),tunnelClosed:e.boolean()}).strict(),telemetry:Qe.nullable().default(null),contentHash:o}).strict(),P=e.object({inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),totalTokens:e.number().int().nonnegative(),costUsd:e.number().nonnegative().nullable()}).strict(),Ze=e.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),pe=e.object({phase:e.enum(["baseline","adaptation","candidate_adaptation","candidate"]),taskId:n,attemptId:n,sessionId:n.nullable(),turnId:n.nullable(),passed:e.boolean(),score:e.number().min(0).max(1).nullable(),failureClass:ie.nullable(),inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),totalTokens:e.number().int().nonnegative(),latencyMs:e.number().int().nonnegative(),costUsd:e.number().nonnegative().nullable(),startedAt:c}).strict(),Xe=e.object({targetTaskCount:e.number().int().nonnegative(),comparedTaskCount:e.number().int().nonnegative(),passedTaskCount:e.number().int().nonnegative(),failedTaskCount:e.number().int().nonnegative(),lowerTaskCount:e.number().int().nonnegative(),higherTaskCount:e.number().int().nonnegative(),unchangedTaskCount:e.number().int().nonnegative()}).strict(),it=e.object({target:e.literal("all_tasks_lower"),targetTaskCount:e.number().int().nonnegative(),comparedTaskCount:e.number().int().nonnegative(),passedTaskCount:e.number().int().nonnegative(),failedTaskCount:e.number().int().nonnegative(),lowerTaskCount:e.number().int().nonnegative(),higherTaskCount:e.number().int().nonnegative(),unchangedTaskCount:e.number().int().nonnegative(),baselineTokens:e.number().int().nonnegative(),refinedTokens:e.number().int().nonnegative(),tokenDelta:e.number().int(),tokenDeltaPercent:e.number().finite().nullable(),complete:e.boolean(),passed:e.boolean(),cohorts:e.object({adaptation:Xe,heldOut:Xe}).strict()}).strict(),be=e.object({baseline:P,adaptation:P,candidateAdaptation:P,candidate:P,refiner:P,grader:P}).strict(),nn=e.object({usage:be,observedSpendUsd:e.number().nonnegative(),attempts:e.array(pe).max(1e4)}).strict(),an=e.object({id:n,contentHash:o,artifactPath:e.string().trim().min(1).max(2e3)}).strict(),rn=e.object({schemaVersion:e.literal("openpond.modelEvaluationReceipt.v1"),benchmarkId:n,resultManifest:e.object({id:n,contentHash:o,artifactPath:e.string().trim().min(1).max(2e3)}).strict(),stages:e.object({baseline:r,adaptation:r,refiner:r,candidateAdaptation:r,candidate:r,comparison:r}).strict(),usage:be,quality:e.object({baselinePassRate:e.number().min(0).max(1),candidatePassRate:e.number().min(0).max(1),adaptationBaselinePassRate:e.number().min(0).max(1),adaptationCandidatePassRate:e.number().min(0).max(1),adaptationCandidatePassed:e.boolean(),heldOutCandidatePassed:e.boolean(),passed:e.boolean()}).strict(),foregroundTokenDelta:e.number().int(),foregroundTokenDeltaPercent:e.number().finite().nullable(),taskEfficiency:it.optional(),efficiency:e.object({grossForegroundTokenSavings:e.number().int(),overheadTokens:e.number().int().nonnegative(),firstPassNetTokenSavings:e.number().int(),breakEvenReuseCount:e.number().int().nonnegative().nullable(),amortizedTokenSavings:e.number().int(),amortizedReuseCount:e.number().int().positive()}).strict(),budget:e.object({maximumSpendUsd:e.number().nonnegative(),observedSpendUsd:e.number().nonnegative(),enforced:e.boolean()}).strict(),evidenceSnapshot:r,lineage:e.object({adaptationEvidenceHash:o,refinerInputHash:o,refinerOutcomeHash:o,validationHash:o,applyReceiptHash:o,candidateRelease:r,valid:e.boolean()}).strict(),invalidReasons:e.array(e.string().trim().min(1).max(2e3)).max(100),attempts:e.array(pe).max(1e4).default([]),terminalClassification:e.enum(["improved","no_improvement","regressed","inconclusive","cancelled","infrastructure_failure"]),profileGit:e.object({ref:e.string().trim().min(1).max(2e3),commit:Ze,baseCommit:Ze}).strict().nullable(),contentHash:o}).strict(),on=e.object({schemaVersion:e.literal("openpond.modelEvaluationStopReceipt.v1"),benchmarkId:n,terminalClassification:e.literal("inconclusive"),stopReason:e.enum(["candidate_harness_unchanged","candidate_lineage_invalid"]),reason:e.string().trim().min(1).max(5e3),stoppedAfter:e.literal("refiner"),baselineHarness:r,candidateHarness:r,refiner:e.object({id:n,contentHash:o,outcomeCount:e.number().int().nonnegative()}).strict(),usage:be,budget:e.object({maximumSpendUsd:e.number().nonnegative(),observedSpendUsd:e.number().nonnegative(),enforced:e.boolean()}).strict(),evidenceSnapshot:r,attempts:e.array(pe).max(1e4),contentHash:o}).strict(),et=e.object({level:e.literal(.95),lower:e.number().finite(),upper:e.number().finite()}).strict().superRefine((t,i)=>{t.lower>t.upper&&i.addIssue({code:"custom",message:"A confidence interval's lower bound cannot exceed its upper bound."})}),sn=e.object({schemaVersion:e.literal("openpond.modelComparisonBenchmarkReceipt.v1"),benchmarkId:e.literal("model-comparison"),target:e.object({kind:e.enum(["base_model","model_version","external_reference"]),label:e.string().trim().min(1).max(300),modelVersionId:n.nullable(),model:V.nullable()}).strict(),taskset:g,grader:r,sampling:e.object({seeds:e.array(e.number().int()).min(1).max(100),repetitions:e.number().int().positive().max(20)}).strict(),deterministic:e.object({attemptedTaskCount:e.number().int().nonnegative(),completedTaskCount:e.number().int().nonnegative(),passedTaskCount:e.number().int().nonnegative(),failedTaskCount:e.number().int().nonnegative(),meanScore:e.number().finite().nullable(),passRate:e.number().min(0).max(1).nullable(),passRateCi95:et.nullable()}).strict(),judge:e.object({judgeModel:V,judgeRelease:r,rubricRelease:r,calibrationRelease:r,score:e.number().min(0).max(100),scoreCi95:et,comparisonCount:e.number().int().positive(),wins:e.number().int().nonnegative(),ties:e.number().int().nonnegative(),losses:e.number().int().nonnegative(),referenceLabel:e.string().trim().min(1).max(300)}).strict().superRefine((t,i)=>{t.wins+t.ties+t.losses!==t.comparisonCount&&i.addIssue({code:"custom",message:"Judge win, tie, and loss counts must equal comparisonCount."})}).nullable(),attempts:e.array(e.object({attemptId:n.nullable().default(null),taskId:n,seed:e.number().int(),repetition:e.number().int().nonnegative(),status:e.enum(["succeeded","failed"]),deterministicScore:e.number().finite().nullable(),passed:e.boolean().nullable(),judgeScore:e.number().min(0).max(100).nullable(),judgePreference:e.enum(["win","tie","loss"]).nullable(),transcriptHash:o.nullable(),traceHash:o.nullable(),transcriptArtifact:e.object({artifactPath:e.string().trim().min(1).max(2e3),jsonPointer:e.string().trim().min(1).max(1e3)}).strict().nullable().default(null),traceArtifact:e.object({artifactPath:e.string().trim().min(1).max(2e3),jsonPointer:e.string().trim().min(1).max(1e3)}).strict().nullable().default(null),latencyMs:e.number().int().nonnegative().nullable().default(null),failureClass:ie.nullable()}).strict()).max(1e5),usage:e.object({policy:P.nullable(),judge:P.nullable(),observedSpendUsd:e.number().nonnegative().nullable(),evaluationGpuSeconds:e.number().nonnegative().nullable().default(null)}).strict(),managedServing:e.object({jobId:n,terminalState:e.enum(["completed","cancelled","failed","budget_exhausted"]),sourcePolicyVersion:e.number().int().nonnegative(),sourceAdapterSha256:o.nullable(),servedPolicyVersion:e.number().int().nonnegative().nullable(),servedAdapterSha256:o.nullable(),accruedSpendUsd:e.number().nonnegative(),cleanupAttestationHash:o,resourceCount:e.number().int().nonnegative(),activeResourceCount:e.literal(0)}).strict().nullable().default(null),evidenceSnapshot:e.object({id:n,contentHash:o,artifactPath:e.string().trim().min(1).max(2e3)}).strict(),completedAt:c,contentHash:o}).strict().superRefine((t,i)=>{let s=t.deterministic;s.completedTaskCount>s.attemptedTaskCount&&i.addIssue({code:"custom",message:"Completed task count cannot exceed attempted task count."}),s.passedTaskCount+s.failedTaskCount!==s.completedTaskCount&&i.addIssue({code:"custom",message:"Passed and failed task counts must equal completed task count."}),s.completedTaskCount===0!=(s.meanScore===null)&&i.addIssue({code:"custom",message:"Deterministic mean score is available exactly when tasks completed."}),s.completedTaskCount===0!=(s.passRate===null)&&i.addIssue({code:"custom",message:"Deterministic pass rate is available exactly when tasks completed."})}),ln=e.object({advancedEvaluation:re.optional(),benchmarkId:e.literal("harness-refiner"),model:V,upstreamModel:e.object({providerId:n,modelId:e.string().trim().min(1).max(300),revision:e.string().trim().min(1).max(300),pricing:e.object({version:e.string().trim().min(1).max(300),source:e.string().trim().min(1).max(300),effectiveAt:c,inputUsdPerMillionTokens:e.number().nonnegative(),cachedInputUsdPerMillionTokens:e.number().nonnegative(),outputUsdPerMillionTokens:e.number().nonnegative()}).strict().optional()}).strict(),reasoningEffort:e.string().trim().min(1).max(100).nullable(),seeds:e.array(e.number().int()).min(1).max(100),repetitions:e.number().int().positive().max(20),maximumSpendUsd:e.number().nonnegative(),attemptPlan:e.array(e.object({stage:e.enum(["baseline","adaptation","candidate_adaptation","candidate"]),split:e.string().trim().min(1).max(100),taskIds:e.array(n).min(1).max(1e5),attemptCount:e.number().int().positive()}).strict()).length(4)}).strict(),mn=e.object({benchmarkId:e.literal("model-comparison"),target:e.object({kind:e.enum(["base_model","model_version","external_reference"]),label:e.string().trim().min(1).max(300),modelVersionId:n.nullable(),model:V.nullable()}).strict(),grader:r,judge:e.object({model:V,release:r,rubricRelease:r,calibrationRelease:r,referenceLabel:e.string().trim().min(1).max(300)}).strict().nullable(),seeds:e.array(e.number().int()).min(1).max(100),repetitions:e.number().int().positive().max(20),maximumSpendUsd:e.number().nonnegative(),series:e.object({id:n,protocol:e.object({id:n,revision:e.number().int().positive(),contentHash:o}).strict()}).strict().nullable().default(null),panel:e.object({id:n,role:e.enum(["correction","sibling_verification","cumulative_known","development","retained","frozen_final"]),passLabel:n.nullable()}).strict().nullable().default(null),comparisonPair:e.object({entryId:n,parent:de,candidateModelVersionId:n}).strict().nullable().default(null),attemptPlan:e.array(e.object({stage:e.literal("comparison"),split:e.string().trim().min(1).max(100),taskIds:e.array(n).min(1).max(1e5),attemptCount:e.number().int().positive()}).strict()).length(1)}).strict(),cn=e.union([ln,mn]),rt=e.object({schemaVersion:e.literal("openpond.modelRun.v1"),id:n,modelId:n,modelVersionId:n.nullable(),profileId:n,kind:e.enum(["rollout_smoke","training","evaluation"]),status:e.enum(["prepared","running","succeeded","failed","cancelled"]),method:e.enum(["sft","dpo","grpo","ppo","sdft","opd","opsd","sdpo"]).nullable(),destinationId:n.nullable(),taskset:g,comparisonSeriesEntry:A.nullable().optional(),evaluationTasksetRef:g.nullable().optional(),harnessRelease:r.nullable().optional(),quote:e.object({maximumSpendUsd:e.number().nonnegative(),hourlyCostUsd:e.number().nonnegative().nullable()}).strict().nullable(),evaluation:cn.nullable().default(null),evaluationProgress:e.object({stage:e.enum(["baseline","adaptation","refiner","candidate_adaptation","candidate","comparison"]),completedAttempts:e.number().int().nonnegative(),totalAttempts:e.number().int().positive(),accounting:nn.nullable().default(null),advancedAccounting:se.optional(),evidenceSnapshot:an.nullable().default(null)}).strict().nullable().default(null),reward:e.object({raw:e.number(),components:e.record(e.string(),e.number())}).strict().nullable(),receipt:e.union([tn,rn,on,sn,oe]).nullable(),adapterArtifactLineageId:n.nullable(),failure:e.string().trim().min(1).max(5e3).nullable(),startedAt:c,completedAt:c.nullable(),updatedAt:c}).strict().superRefine((t,i)=>{t.status==="succeeded"&&!t.receipt&&i.addIssue({code:"custom",message:"A successful Model Run requires a canonical receipt."}),t.kind==="evaluation"&&(t.method!==null||t.destinationId!==null||!t.evaluation||t.adapterArtifactLineageId!==null)&&i.addIssue({code:"custom",message:"An evaluation Model Run requires evaluation configuration and cannot claim training method, destination, or adapter lineage."}),t.kind==="evaluation"&&t.receipt&&t.receipt.schemaVersion!=="openpond.modelEvaluationReceipt.v1"&&t.receipt.schemaVersion!=="openpond.modelEvaluationStopReceipt.v1"&&t.receipt.schemaVersion!=="openpond.modelComparisonBenchmarkReceipt.v1"&&t.receipt.schemaVersion!=="openpond.advancedRefinerReviewReceipt.v1"&&i.addIssue({code:"custom",message:"An evaluation Model Run requires an evaluation receipt."}),t.kind!=="evaluation"&&(t.method===null||t.destinationId===null||t.quote===null)&&i.addIssue({code:"custom",message:"A training or rollout Model Run requires method, destination, and quote."}),t.kind==="rollout_smoke"&&t.adapterArtifactLineageId!==null&&i.addIssue({code:"custom",message:"A rollout smoke cannot claim adapter artifacts."})});function ai(t){let i=new Map;for(let p of t.attempts){let T=`${p.phase}\0${p.taskId}`,S=i.get(T);(!S||p.startedAt>S.startedAt||p.startedAt===S.startedAt&&p.attemptId>S.attemptId)&&i.set(T,p)}let s=[...i.values()],l=[["adaptation","adaptation","candidate_adaptation"],["held_out","baseline","candidate"]].flatMap(([p,T,S])=>{let At=new Map(s.filter(R=>R.phase===S).map(R=>[R.taskId,R]));return s.filter(R=>R.phase===T).flatMap(R=>{let ee=At.get(R.taskId);return ee?[{cohort:p,taskId:R.taskId,baseline:R,refined:ee,tokenDelta:ee.totalTokens-R.totalTokens}]:[]})}),f=new Set(s.filter(p=>p.phase==="baseline"||p.phase==="adaptation").map(p=>p.taskId)).size,h=t.targetTaskCount??f;if(!Number.isInteger(h)||h<0)throw new Error("Benchmark task-efficiency target must be a non-negative integer.");let x={adaptation:new Set(s.filter(p=>p.phase==="adaptation").map(p=>p.taskId)).size,held_out:new Set(s.filter(p=>p.phase==="baseline").map(p=>p.taskId)).size},k=v((p,T)=>({targetTaskCount:T,comparedTaskCount:p.length,passedTaskCount:p.filter(S=>S.tokenDelta<0).length,failedTaskCount:p.filter(S=>S.tokenDelta>=0).length,lowerTaskCount:p.filter(S=>S.tokenDelta<0).length,higherTaskCount:p.filter(S=>S.tokenDelta>0).length,unchangedTaskCount:p.filter(S=>S.tokenDelta===0).length}),"summarizePairs"),d=k(l,h),j=l.reduce((p,T)=>p+T.baseline.totalTokens,0),ke=l.reduce((p,T)=>p+T.refined.totalTokens,0),Re=ke-j,Ie=l.length===h;return{summary:it.parse({target:"all_tasks_lower",...d,baselineTokens:j,refinedTokens:ke,tokenDelta:Re,tokenDeltaPercent:j>0?Re/j*100:null,complete:Ie,passed:Ie&&d.passedTaskCount===h,cohorts:{adaptation:k(l.filter(p=>p.cohort==="adaptation"),x.adaptation),heldOut:k(l.filter(p=>p.cohort==="held_out"),x.held_out)}}),pairs:l}}v(ai,"summarizeModelEvaluationTaskEfficiency");var dn=e.enum(["measuring","up_to_date","needs_attention"]),un=e.enum(["fixed","retained","regressed","unresolved","unavailable"]),ot=e.object({evaluationRunId:n,attemptKey:n,artifactPath:e.string().trim().min(1).max(2e3),jsonPointer:e.string().trim().min(1).max(1e3),transcriptHash:o.nullable(),traceHash:o.nullable()}).strict(),ge=e.object({level:e.literal(.95),lower:e.number().finite(),upper:e.number().finite()}).strict(),pn=e.object({panelId:n,panelRole:le,passLabel:n.nullable(),taskset:g,attempted:e.number().int().nonnegative(),available:e.number().int().nonnegative(),passed:e.number().int().nonnegative(),strictSuccess:e.number().min(0).max(1).nullable(),strictSuccessCi95:ge.nullable(),judgeScore:e.number().min(0).max(100).nullable(),judgeScoreCi95:ge.nullable()}).strict(),st=e.object({schemaVersion:e.literal("openpond.modelCurrencySnapshot.v1"),id:n,contentHash:o,seriesId:n,protocol:e.object({id:n,revision:e.number().int().positive(),contentHash:o}).strict(),entryId:n,passLabel:n,parent:e.discriminatedUnion("kind",[e.object({kind:e.literal("base_model"),id:n,revision:e.string().trim().min(1).max(500)}).strict(),e.object({kind:e.literal("model_version"),id:n,contentHash:o}).strict()]),candidate:e.object({kind:e.literal("model_version"),id:n,contentHash:o}).strict(),sources:e.object({evaluationRunIds:e.array(n).max(1e5),attemptIds:e.array(n).max(1e6),tasksets:e.array(g).max(1e4),grader:r,judge:r.nullable(),calibration:r.nullable()}).strict(),matches:e.array(e.object({key:n,panelId:n,panelRole:le,taskId:n,issueFamilyId:n,seed:e.number().int(),repetition:e.number().int().nonnegative(),classification:un,parentPassed:e.boolean().nullable(),candidatePassed:e.boolean().nullable(),parentAttempt:ot.nullable(),candidateAttempt:ot.nullable()}).strict()).max(1e6),taskIds:e.object({fixed:e.array(n).max(1e6),retained:e.array(n).max(1e6),regressed:e.array(n).max(1e6),unresolved:e.array(n).max(1e6),unavailable:e.array(n).max(1e6)}).strict(),panels:e.array(pn).max(1e4),metrics:e.object({knownIssueCoverage:e.number().min(0).max(1).nullable(),issueFamilyGeneralization:e.number().min(0).max(1).nullable(),behavioralRetention:e.number().min(0).max(1).nullable(),currentAcquisitionDelta:e.number().finite().nullable(),retainedDeltaPoints:e.number().finite().nullable(),frontierStrictDelta:e.number().finite().nullable(),pairedPValue:e.number().min(0).max(1).nullable(),wins:e.number().int().nonnegative(),ties:e.number().int().nonnegative(),losses:e.number().int().nonnegative()}).strict(),statistics:e.object({matchedAttemptCount:e.number().int().nonnegative(),strictDelta:e.number().finite().nullable(),strictDeltaCi95:ge.nullable(),exactPairedBinaryPValue:e.number().min(0).max(1).nullable(),pairedBootstrapSamples:e.number().int().positive()}).strict(),criteria:e.object({allRequiredAttemptsTerminal:e.boolean(),criticalCorrectionPassRate:e.number().min(0).max(1).nullable(),siblingPassRate:e.number().min(0).max(1).nullable(),behavioralRetentionRate:e.number().min(0).max(1).nullable(),retainedRegressionPoints:e.number().finite().nullable(),criticalPriorRegressionCount:e.number().int().nonnegative(),thresholdRelease:r}).strict(),efficiency:e.object({inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),totalTokens:e.number().int().nonnegative(),costUsd:e.number().nonnegative().nullable(),latencyMs:e.number().int().nonnegative(),tokensPerSuccess:e.number().nonnegative().nullable(),throughputPerHour:e.number().nonnegative().nullable(),gpuSeconds:e.number().nonnegative().nullable()}).strict(),invariants:e.object({systemPromptHash:o,toolSchema:r,application:r,harness:r,runtime:r,grader:r,autoRefinerEnabled:e.boolean()}).strict(),evidenceState:dn,evidenceReasons:e.array(n).max(100),projectedAt:c}).strict();var $=e.discriminatedUnion("kind",[e.object({kind:e.literal("base_model"),id:n,revision:e.string().trim().min(1).max(500),label:e.string().trim().min(1).max(300)}).strict(),e.object({kind:e.literal("model_version"),id:n,label:e.string().trim().min(1).max(300)}).strict(),e.object({kind:e.literal("captured_model"),id:n,label:e.string().trim().min(1).max(300)}).strict()]),U=e.union([e.object({source:e.literal("evaluation_run").default("evaluation_run"),evaluationRunId:n,attemptId:n,modelLabel:e.string().trim().min(1).max(300).nullable().default(null),modelVersionId:n.nullable().default(null),reward:e.number().finite().nullable(),components:e.record(e.string(),e.number().finite()).default({})}).strict(),e.object({source:e.literal("imported_response"),modelLabel:e.string().trim().min(1).max(300),modelVersionId:n.nullable().default(null),response:e.unknown().refine(t=>t!==void 0,"An imported model response is required."),reward:e.number().finite().nullable().default(null),components:e.record(e.string(),e.number().finite()).default({})}).strict()]),bn=e.union([e.object({taskId:n,target:$,attempt:U}).strict(),e.object({taskId:n,target:e.enum(["base","current"]).default("current"),attempt:U}).strict(),e.object({taskId:n,target:e.enum(["base","current"]).default("current"),evaluationRunId:n,attemptId:n,reward:e.number().finite().nullable(),components:e.record(e.string(),e.number().finite()).default({})}).strict().transform(({taskId:t,target:i,...s})=>({taskId:t,target:i,attempt:{source:"evaluation_run",modelLabel:null,modelVersionId:null,...s}}))]),bi=e.object({schemaVersion:e.literal("openpond.continualLearningDailyBatchManifest.v1"),id:n,seriesId:n,scheduleEntryId:n,dayOrdinal:e.number().int().positive().max(1e4),sourceTaskset:g,taskIds:e.array(n).min(1).max(1e3),observedAttempts:e.array(bn).max(1e3).default([]),sourceFileName:e.string().trim().min(1).max(500).nullable().default(null),availableAt:c}).strict().superRefine((t,i)=>{new Set(t.taskIds).size!==t.taskIds.length&&i.addIssue({code:"custom",path:["taskIds"],message:"A daily batch cannot repeat a task."}),new Set(t.observedAttempts.map(l=>`${l.taskId}:${gn(l.target)}`)).size!==t.observedAttempts.length&&i.addIssue({code:"custom",path:["observedAttempts"],message:"An intake batch cannot repeat a task and Policy target pair."});let s=new Set(t.taskIds);t.observedAttempts.some(l=>!s.has(l.taskId))&&i.addIssue({code:"custom",path:["observedAttempts"],message:"Observed attempts must belong to tasks in the daily batch."})}),lt=e.object({schemaVersion:e.literal("openpond.continualLearningDailyBatch.v1"),id:n,seriesId:n,scheduleEntryId:n,dayOrdinal:e.number().int().positive().max(1e4),label:e.string().trim().min(1).max(100),runMode:e.enum(["automatic","manual"]).optional(),source:e.enum(["json_upload","sealed_fixture"]),sourceFileName:e.string().trim().min(1).max(500).nullable(),sourceTaskset:g,tasks:e.array(e.object({taskId:n,taskContentHash:o,familyKey:n,disposition:e.enum(["include","defer","exclude"]).nullable(),oracleReview:e.enum(["pending","confirmed","needs_correction"]),note:e.string().trim().max(2e3),observedAttempt:U.nullable(),baselineAttempt:U.nullable().default(null),responses:e.array(e.object({target:$,attempt:U}).strict()).max(100).default([]),stagedAt:c.nullable().default(null),queuedEntry:A.nullable().default(null)}).strict()).min(1).max(1e3),intakeEvaluation:e.object({status:e.enum(["awaiting","running","ready","failed"]),requestedTargets:e.array(e.enum(["base","current"])).max(2).default(["base","current"]),requestedPolicies:e.array($).max(100).default([]),runs:e.array(e.object({target:$,runId:n}).strict()).max(100).default([]),baselineRunId:n.nullable(),currentRunId:n.nullable(),currentPolicy:e.discriminatedUnion("kind",[e.object({kind:e.literal("base_model"),id:n}).strict(),e.object({kind:e.literal("model_version"),id:n}).strict()]).nullable(),failure:e.string().trim().min(1).max(2e3).nullable()}).strict().default({status:"awaiting",requestedTargets:["base","current"],requestedPolicies:[],runs:[],baselineRunId:null,currentRunId:null,currentPolicy:null,failure:null}),status:e.enum(["pending","reviewed","queued"]),queuedEntry:A.nullable(),reviewedBy:n.nullable(),reviewedAt:c.nullable(),availableAt:c,revision:e.number().int().positive(),createdAt:c,updatedAt:c}).strict().superRefine((t,i)=>{new Set(t.tasks.map(l=>l.taskId)).size!==t.tasks.length&&i.addIssue({code:"custom",path:["tasks"],message:"A daily batch cannot repeat a task."});for(let[l,f]of t.tasks.entries()){let h=f.responses.map(x=>ct(x.target));new Set(h).size!==h.length&&i.addIssue({code:"custom",path:["tasks",l,"responses"],message:"A task cannot repeat a model response target."})}let s=t.tasks.every(l=>l.disposition!==null&&l.oracleReview!=="pending"&&(l.oracleReview!=="needs_correction"||l.note.length>0));t.status!=="pending"&&!s&&i.addIssue({code:"custom",path:["tasks"],message:"Every task requires a decision and oracle review before the day completes."}),t.status==="queued"!=(t.queuedEntry!==null)&&i.addIssue({code:"custom",path:["queuedEntry"],message:"Only a queued day carries an exact series-entry reference."}),t.status==="pending"&&(t.reviewedAt!==null||t.reviewedBy!==null)&&i.addIssue({code:"custom",path:["reviewedAt"],message:"A pending day cannot carry reviewer completion identity."}),t.status!=="pending"&&(t.reviewedAt===null||t.reviewedBy===null)&&i.addIssue({code:"custom",path:["reviewedAt"],message:"Reviewed identity is required after a day review completes."})}),mt=e.object({schemaVersion:e.literal("openpond.continualBenchIssueReview.v1"),id:n,seriesId:n,scheduleEntryId:n,passLabel:n,packet:De,splitManifest:e.object({id:n,contentHash:o}).strict(),decisions:e.array(e.object({taskId:n,disposition:e.enum(["include","defer","exclude"]).nullable(),note:e.string().trim().max(2e3)}).strict()).min(2).max(1e4),status:e.enum(["pending","reviewed","queued"]),queuedEntry:A.nullable(),reviewedBy:n.nullable(),reviewedAt:c.nullable(),revision:e.number().int().positive(),createdAt:c,updatedAt:c}).strict().superRefine((t,i)=>{let s=[...t.packet.cases.map(h=>h.taskId)].sort(),l=[...t.decisions.map(h=>h.taskId)].sort();JSON.stringify(s)!==JSON.stringify(l)&&i.addIssue({code:"custom",path:["decisions"],message:"Review decisions must cover the exact issue-packet cases."});let f=t.decisions.every(h=>h.disposition!==null&&h.note.length>0);t.status!=="pending"&&!f&&i.addIssue({code:"custom",path:["decisions"],message:"Every case requires a disposition and note before review completes."}),t.status==="queued"!=(t.queuedEntry!==null)&&i.addIssue({code:"custom",path:["queuedEntry"],message:"Only a queued review carries an exact series-entry reference."})}).readonly();function ct(t){return`${t.kind}:${t.id}`}v(ct,"responseTargetKey");function gn(t){return typeof t=="string"?t:ct(t)}v(gn,"observedTargetKey");var I=e.string().trim().min(1).max(240),_=e.string().trim().min(8).max(256),F=e.enum(["grpo","dapo","gspo-token"]),H=e.object({id:I,revision:e.string().trim().min(1).max(256),tokenizerRevision:e.string().trim().min(1).max(256),chatTemplateHash:_}),dt=e.object({maxRollouts:e.number().int().positive().max(1e6),maxEnvironmentExecutions:e.number().int().positive().max(1e6),maxInputTokens:e.number().int().positive(),maxOutputTokens:e.number().int().positive(),maxOptimizerSteps:e.number().int().positive().max(1e6),wallTimeMs:e.number().int().positive(),maximumCostUsd:e.number().nonnegative().nullable()}),ut=e.object({method:e.literal("grpo"),groupSize:e.number().int().min(2).max(128),normalization:e.literal("group_standardized"),advantageEpsilon:e.number().positive().max(.01).default(1e-8),loss:F,clipRange:e.number().positive().max(1).default(.2),iterations:e.number().int().min(2).max(16).default(2),microbatchSize:e.number().int().positive().max(128).default(1),gradientAccumulationSteps:e.number().int().positive().max(128).default(1),adamw:D}),G=e.object({method:e.literal("ppo"),valueModel:H,gamma:e.number().min(0).max(1),gaeLambda:e.number().min(0).max(1),policyClip:e.number().positive().max(1),valueClip:e.number().positive().max(10),valueLossCoefficient:e.number().nonnegative().max(10),ppoEpochs:e.number().int().positive().max(100),minibatchSize:e.number().int().positive().max(1e5)}),pt=e.discriminatedUnion("method",[ut,G]),J=e.object({rewardModelVersion:e.object({id:I,contentHash:_}).strict(),qualificationReport:e.object({id:I,contentHash:_}).strict().nullable().default(null),evaluationReferences:e.array(e.object({id:I,contentHash:_}).strict()).max(1e3).default([]),checkpoint:e.object({id:I,contentHash:_,objectRef:e.string().regex(/^r2:\/\/[A-Za-z0-9._/-]+$/),files:e.array(e.object({path:e.string().trim().min(1).max(512),sizeBytes:e.number().int().positive(),sha256:_}).strict()).min(4).max(128)}).strict(),runtime:ue,processorRelease:e.object({id:I,contentHash:_}).strict(),rewardComposerRelease:e.object({id:I,contentHash:_}).strict(),executionReceipt:e.object({id:I,contentHash:_}).strict()}).strict(),W=e.object({schemaVersion:e.literal("openpond.policyOptimization.v1"),policyModel:H,referenceModel:H,dataset:e.object({tasksetId:I,tasksetHash:_,split:e.literal("train"),selectionStrategy:e.enum(["stable_hash_top_n","rft_easy_curriculum_v1"]),selectionSeed:e.number().int(),maxExamples:e.number().int().positive().max(1e5)}),sampler:e.object({temperature:e.number().min(0).max(2),topP:e.number().min(0).max(1),maxOutputTokens:e.number().int().positive().max(32768),maxTurns:e.number().int().positive().max(1e3),concurrency:e.number().int().positive().max(1e3)}),environment:e.object({id:I,version:e.string().trim().min(1).max(256),toolContractHash:_}),reward:e.object({graderId:I,graderHash:_,learnedPreference:J.nullable().default(null)}),kl:e.object({coefficient:e.number().nonnegative().nullable(),referenceConstraint:e.literal("fixed_reference")}),budgets:dt,checkpointEverySteps:e.number().int().positive(),seed:e.number().int(),evaluationSplit:e.literal("frozen_eval"),optimizer:pt});var a=e.string().trim().min(1).max(240),b=e.string().trim().min(1),m=e.string().trim().min(8).max(256),O=e.record(e.string(),e.unknown()).default({});var he=e.object({schemaVersion:e.literal("openpond.localModelChatConfiguration.v1").default("openpond.localModelChatConfiguration.v1"),profile:e.enum(["efficient","full_harness","custom"]).default("efficient"),systemPromptMode:e.enum(["lean","full_harness","custom"]).default("lean"),customSystemPrompt:e.string().max(2e4).nullable().default(null),contextWindowTokens:e.number().int().min(128).max(32768).default(1024),maxOutputTokens:e.number().int().min(1).max(512).default(64),temperature:e.number().min(0).max(2).default(0),repetitionPenalty:e.number().min(.5).max(2).default(1.1),noRepeatNgramSize:e.number().int().min(0).max(10).default(3),compaction:e.enum(["off","when_needed"]).default("when_needed"),keepWarmSeconds:e.number().int().min(0).max(3600).default(300),updatedAt:b.nullable().default(null)}),bt=he.parse({}),gt=e.object({schemaVersion:e.literal("openpond.managedAdapterServingProjection.v1"),teamId:a.nullable().default(null),source:e.literal("sandbox_managed_rl"),sourceRef:a,canonicalArtifactId:a.nullable(),canonicalModelName:e.string().trim().min(1).max(256).nullable().default(null),canonicalArtifactState:e.enum(["imported_unvalidated","evaluating","promotable","rejected","deleted"]).nullable(),canonicalDeploymentId:a.nullable(),canonicalDeploymentState:e.enum(["requested","deploying","ready","degraded","deleting","deleted","failed"]).nullable(),state:e.enum(["pending","imported","ready","failed"]),customerBindingAllowed:e.boolean().default(!1),artifactContentHash:m.nullable().default(null),baseProfileId:a.nullable().default(null),publishedAt:b.nullable(),lastSyncedAt:b,lastError:e.string().trim().min(1).max(5e3).nullable()});function hn(t){return t.state==="ready"&&t.canonicalArtifactState==="promotable"&&t.canonicalDeploymentState==="ready"&&t.customerBindingAllowed&&!!t.teamId&&!!t.canonicalArtifactId&&!!t.canonicalDeploymentId}v(hn,"managedAdapterProjectionReady");function ji(t){let i=t.managedServing;return i?hn(i)&&i.canonicalArtifactId&&i.canonicalDeploymentId?{kind:"sandbox_serving",canonicalArtifactId:i.canonicalArtifactId,canonicalDeploymentId:i.canonicalDeploymentId}:null:{kind:"source_artifact",canonicalArtifactId:null,canonicalDeploymentId:null}}v(ji,"resolveModelBindingEligibility");var ye="openpond.crossSystemOperations.v1",wi="1.0.0",ft="openpond.crossSystemTools.v1",fn=["search_crm","query_billing","search_support","run_python"],vn=e.enum(["train","validation","frozen_eval"]),xn=e.enum(["easy","medium","hard"]),Sn=e.enum(["renewal_risk_v2"]),Mi=e.enum(["renewal_exposure","collections_prioritization","invoice_reconciliation","sla_escalation","contract_billing_mismatch"]),Pi=e.object({seed:e.number().int().nonnegative(),split:vn,difficulty:xn,scenarioProfile:Sn.optional()});var fe={anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}],default:null},ve={type:"integer",minimum:1,maximum:50,default:25},vt=[{name:"search_crm",description:"Search synthetic CRM accounts and contacts. Results are scoped, projected, paginated, and budgeted.",parameters:{type:"object",additionalProperties:!1,required:["query","fields","cursor","limit"],properties:{query:{type:"string",minLength:1,maxLength:500},fields:{type:"array",minItems:1,maxItems:12,uniqueItems:!0,items:{type:"string",enum:["account_id","name","aliases","contact_ids","contract_value_usd_cents","renewal_date","tier","active_contract_id","contract_term_months"]}},cursor:fe,limit:ve}}},{name:"query_billing",description:"Query synthetic invoices and payments for explicit account IDs and a bounded date range.",parameters:{type:"object",additionalProperties:!1,required:["account_ids","date_range","status","cursor","limit"],properties:{account_ids:{type:"array",minItems:1,maxItems:50,uniqueItems:!0,items:{type:"string",minLength:1,maxLength:100}},date_range:{type:"object",additionalProperties:!1,required:["from","to"],properties:{from:{type:"string",format:"date"},to:{type:"string",format:"date"}}},status:{type:"array",minItems:1,maxItems:6,uniqueItems:!0,items:{type:"string",enum:["open","overdue","paid","disputed","scheduled","void"]}},cursor:fe,limit:ve}}},{name:"search_support",description:"Search synthetic support cases for explicit account IDs, severity, and state filters.",parameters:{type:"object",additionalProperties:!1,required:["account_ids","severity","state","cursor","limit"],properties:{account_ids:{type:"array",minItems:1,maxItems:50,uniqueItems:!0,items:{type:"string",minLength:1,maxLength:100}},severity:{type:"array",minItems:1,maxItems:4,uniqueItems:!0,items:{type:"string",enum:["P1","P2","P3","P4"]}},state:{type:"array",minItems:1,maxItems:5,uniqueItems:!0,items:{type:"string",enum:["new","investigating","waiting_customer","resolved","closed"]}},cursor:fe,limit:ve}}},{name:"run_python",description:"Run standard-library-only Python in the persistent synthetic attempt sandbox with strict limits and no network.",parameters:{type:"object",additionalProperties:!1,required:["code"],properties:{code:{type:"string",minLength:1,maxLength:1e4}}}}],Z=Cn({schemaVersion:ft,tools:vt}),yn=[`Use only the four registered synthetic Cross-System Operations tools. Contract ${Z}.`,"Treat every filter as exact. An overdue-only query_billing call returns invoice rows; payment rows are included only when paid is requested.","For cross-system joins, retrieve the bounded projected rows and use run_python for date filtering, set intersection, and arithmetic before answering.","Finish with ANSWER: JSON."].join(" "),_n=15;function kn(t="auto"){return[yn,"LOCAL TOOL PROTOCOL (strict):","Use only the registered functions below. Never invent, rename, or call any other tool.","For one tool call, output exactly one JSON object and no prose:",'{"type":"tool_call","name":"registered_name","arguments":{}}',"Tool results arrive as exactly one JSON object:",'{"type":"tool_result","name":"registered_name","ok":true,"result":{},"error":null}','After one tool result, either call one registered tool again or answer normally. A JSON final may use {"type":"final","content":"..."}.',`Tool choice: ${JSON.stringify(t)}. Maximum tool turns: ${_n}.`,`Registered tool signatures: ${vt.map(Rn).join("; ")}`].join(`
|
|
3
|
+
`)}v(kn,"crossSystemLocalToolSystemPrompt");var Ei=kn();function Rn(t){let i=K(t.parameters),s=K(i.properties),l=xt(i.required),f=Object.fromEntries(l.map(h=>[h,Y(s[h])]));return`${t.name}(${JSON.stringify(f)})`}v(Rn,"compactToolSignature");function Y(t){let i=K(t),s=xe(i.anyOf);if(s.length)return s.map(Y).join("|");let l=xe(i.enum);if(l.length)return l.join("|");if(i.type==="array")return[Y(i.items)];if(i.type==="object"){let f=K(i.properties),h=xt(i.required);return Object.fromEntries(h.map(x=>[x,Y(f[x])]))}return typeof i.type=="string"?i.type:"unknown"}v(Y,"compactSchema");function K(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}v(K,"recordValue");function xe(t){return Array.isArray(t)?t:[]}v(xe,"arrayValue");function xt(t){return xe(t).filter(i=>typeof i=="string")}v(xt,"stringValues");var Q=e.enum(fn),In=e.discriminatedUnion("kind",[e.object({kind:e.literal("model"),turn:e.number().int().nonnegative(),content:e.string().max(1e5)}),e.object({kind:e.literal("tool_call"),turn:e.number().int().nonnegative(),callId:e.string().trim().min(1).max(240),name:Q,arguments:e.record(e.string(),e.unknown())}),e.object({kind:e.literal("tool_result"),turn:e.number().int().nonnegative(),callId:e.string().trim().min(1).max(240),name:Q,ok:e.boolean(),result:e.unknown(),rows:e.number().int().nonnegative(),bytes:e.number().int().nonnegative(),durationMs:e.number().int().nonnegative(),error:e.string().trim().min(1).max(2e4).nullable()}),e.object({kind:e.literal("final"),turn:e.number().int().nonnegative(),content:e.string().max(1e5)})]),St=e.object({schemaVersion:e.literal(ye),id:e.string().trim().min(1).max(240),worldId:e.string().trim().min(1).max(240),taskId:e.string().trim().min(1).max(240),toolContractHash:e.literal(Z),modelRef:e.object({providerId:e.string().trim().min(1),modelId:e.string().trim().min(1)}).nullable(),status:e.enum(["completed","budget_exhausted","cancelled","infrastructure_failure"]),steps:e.array(In).max(1e3),startedAt:e.string().trim().min(1),completedAt:e.string().trim().min(1),infrastructureError:e.string().trim().min(1).max(2e4).nullable(),metadata:e.record(e.string(),e.unknown()).default({})}),yt=e.object({schemaVersion:e.literal(ye),trajectoryId:e.string().trim().min(1).max(240),outcome:e.enum(["correct","incorrect","parse_failure","budget_exhausted","tool_schema_violation","infrastructure_failure","cancelled"]),reward:e.number().min(0).max(1.15).nullable(),rewardEligible:e.boolean(),exactAnswer:e.boolean(),components:e.object({exactAnswer:e.number().min(0).max(1),efficiency:e.number().min(0).max(.1),conciseOutput:e.number().min(0).max(.05)}),metrics:e.object({toolCalls:e.number().int().nonnegative(),rowsRead:e.number().int().nonnegative(),bytesRead:e.number().int().nonnegative(),consecutiveRetrievalCalls:e.number().int().nonnegative(),wallTimeMs:e.number().int().nonnegative(),parseFailures:e.number().int().nonnegative(),budgetExhausted:e.boolean()}),parsedAnswer:e.unknown().nullable(),feedback:e.array(e.string().trim().min(1).max(5e3)).max(100)}),jn=e.object({id:e.string().trim().min(1).max(240),type:e.literal("function"),function:e.object({name:Q,arguments:e.string().max(2e4)})}),_t=e.object({role:e.enum(["system","user","assistant","tool"]),content:e.string().max(2e5).nullable(),tool_call_id:e.string().trim().min(1).max(240).optional(),tool_calls:e.array(jn).max(4).optional()}),Hi=e.object({schemaVersion:e.literal(ye),id:e.string().trim().min(1).max(240),taskId:e.string().trim().min(1).max(240),worldId:e.string().trim().min(1).max(240),trajectoryId:e.string().trim().min(1).max(240),toolContractHash:e.literal(Z),approval:e.object({status:e.literal("approved"),approvedBy:e.string().trim().min(1).max(240),approvedAt:e.string().trim().min(1)}),messages:e.array(_t).min(3).max(1e3)}),Tn=e.object({tasksetTaskId:e.string().trim().min(1).max(240),environmentTaskId:e.string().trim().min(1).max(240),family:e.enum(["renewal_exposure","collections_prioritization","invoice_reconciliation","sla_escalation","contract_billing_mismatch"]),prompt:e.string().trim().min(1).max(1e5),finalAnswer:e.string().trim().min(1).max(2e5),trajectoryId:e.string().trim().min(1).max(240),trajectoryHash:e.string().trim().min(8).max(256),toolNames:e.array(Q).min(1).max(100),toolCallCount:e.number().int().positive(),messageCount:e.number().int().min(3),reward:e.number().min(0).max(1.15),messages:e.array(_t).min(3).max(1e3)}),An=e.object({status:e.literal("approved"),approvedBy:e.string().trim().min(1).max(240),approvedAt:e.string().trim().min(1),previewHash:e.string().trim().min(8).max(256),trajectoryCount:e.number().int().positive()}),Oi=e.object({schemaVersion:e.literal("openpond.crossSystemExpertBootstrapPreview.v1"),tasksetId:e.string().trim().min(1).max(240),tasksetHash:e.string().trim().min(8).max(256),tasksetRevision:e.number().int().positive(),previewHash:e.string().trim().min(8).max(256),toolContractHash:e.literal(Z),status:e.enum(["ready_for_review","approved"]),approval:An.nullable(),tasks:e.array(Tn).min(1).max(100)});function Cn(t){let i=Se(t),s=2166136261,l=2654435769;for(let f=0;f<i.length;f+=1){let h=i.charCodeAt(f);s=Math.imul(s^h,16777619),l=Math.imul(l^h,2246822507)}return`${ft}:${ht(s)}${ht(l)}`}v(Cn,"contractHash");function Se(t){return Array.isArray(t)?`[${t.map(Se).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([i],[s])=>i.localeCompare(s)).map(([i,s])=>`${JSON.stringify(i)}:${Se(s)}`).join(",")}}`:JSON.stringify(t)}v(Se,"stableJson");function ht(t){return(t>>>0).toString(16).padStart(8,"0")}v(ht,"hex");var wn=e.object({schemaVersion:e.literal("openpond.singleTurnPolicyTrajectory.v1"),id:a,taskId:a,status:e.enum(["completed","infrastructure_failure"]),promptHash:m,responseText:e.string().max(2e6),infrastructureError:e.string().trim().min(1).max(1e4).nullable(),startedAt:b,completedAt:b,metadata:O}),Mn=e.object({schemaVersion:e.literal("openpond.ppoTrajectory.v1"),id:a,taskId:a,policyModelId:a,referenceModelId:a,valueModelId:a,steps:e.array(e.object({index:e.number().int().nonnegative(),observationHash:m,actionTokenIds:e.array(e.number().int().nonnegative()).min(1),terminated:e.boolean(),truncated:e.boolean(),reward:e.number(),policyLogProbability:e.number(),referenceLogProbability:e.number(),valuePrediction:e.number(),return:e.number(),advantage:e.number(),mask:e.number().min(0).max(1)})).min(1).max(1e5),createdAt:b}),Pn=e.object({schemaVersion:e.literal("openpond.exactAnswerVerifierResult.v1"),outcome:e.enum(["correct","incorrect","parse_failure","infrastructure_failure"]),graderSetHash:m,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),rewardEligible:e.boolean(),expectedAnswerHash:m,extractedAnswer:e.string().max(2e4).nullable(),feedback:e.array(e.string().trim().min(1).max(2e4)).max(1e3)}),kt=e.object({schemaVersion:e.literal("openpond.rolloutTrajectoryReceipt.v1"),id:a,jobId:a,planId:a,tasksetId:a,tasksetHash:m,taskId:a,split:e.literal("train"),correlationId:a,provider:a,providerTrace:e.object({invocationId:a,experimentId:a,rolloutId:a,runId:a,rowId:a}),optimizerMethod:e.enum(["grpo","ppo"]).default("grpo"),evidenceLevels:e.object({requested:e.enum(["trajectory","aggregate","provider_reported"]),observed:e.enum(["trajectory","aggregate","provider_reported"]),providerReported:e.enum(["trajectory","aggregate","provider_reported"])}).default({requested:"trajectory",observed:"trajectory",providerReported:"provider_reported"}),budgetUsage:e.object({rollouts:e.number().int().nonnegative(),environmentExecutions:e.number().int().nonnegative(),inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),optimizerSteps:e.number().int().nonnegative(),costUsd:e.number().nonnegative()}).default({rollouts:0,environmentExecutions:0,inputTokens:0,outputTokens:0,optimizerSteps:0,costUsd:0}),environment:e.object({id:a,version:e.string().trim().min(1).max(256),worldId:a,worldHash:m,toolContractHash:m}),policy:e.object({modelId:a,checkpointId:a.nullable(),completionParametersHash:m}),status:e.enum(["received","running","succeeded","failed"]),failureClass:e.enum(["policy_failure","parse_failure","tool_schema_violation","budget_exhausted","cancelled","environment_failure","infrastructure_failure"]).nullable(),reward:e.object({eligible:e.boolean(),raw:e.number().min(0).max(1.15).nullable(),normalized:e.number().min(0).max(1).nullable(),components:e.record(e.string(),e.number())}),trajectory:e.union([St,wn,Mn]).nullable(),verifier:e.union([yt,Pn]).nullable(),providerStatus:e.record(e.string(),e.unknown()).default({}),receivedAt:b,startedAt:b.nullable(),completedAt:b.nullable(),updatedAt:b});function u(t){let i;return new e.ZodObject({type:"object",get shape(){return i??=t()}})}v(u,"deferredObject");var E=e.enum(["sft","dpo","grpo","ppo","sdft","opd","opsd","sdpo"]),X=e.enum(["lora","full"]),z=e.enum(["openpond_managed"]),dr=u(()=>({id:a,input:e.record(e.string(),e.unknown()),expectedOutput:e.record(e.string(),e.unknown()),tags:e.array(a).max(100).default([])})),ur=u(()=>({id:a,prompt:e.string().min(1).max(5e5),chosen:e.string().min(1).max(5e5),rejected:e.string().min(1).max(5e5),sourceRefs:e.array(a).min(1).max(1e4)})),pr=u(()=>({id:a,input:e.record(e.string(),e.unknown()),tags:e.array(a).max(100).default([])})),br=u(()=>({schemaVersion:e.literal("openpond.rewardModelRecipe.v1"),method:e.literal("reward_model"),parameterization:e.literal("lora_with_scalar_head"),runScope:e.enum(["synthetic_smoke","human_preference"]),baseModel:e.object({id:a,revision:e.string().trim().min(1).max(256),tokenizerRevision:e.string().trim().min(1).max(256),processorRevision:e.string().trim().min(1).max(256),chatTemplateHash:m}).strict(),tasksetRelease:r,preferenceDatasetRelease:r,processorRelease:r,input:e.object({kind:e.literal("structured_text"),serialization:e.enum(["scenario_input_and_candidate_json_v1","visible_agent_trajectory_v1"]),maxCharacters:e.number().int().positive().max(5e5)}).strict().default({kind:"structured_text",serialization:"scenario_input_and_candidate_json_v1",maxCharacters:32e3}),lora:e.object({rank:e.number().int().positive().max(256),alpha:e.number().positive().max(1024),dropout:e.number().min(0).max(1),targetModules:e.array(a).min(1).max(100)}).strict(),heads:e.object({scalar:e.literal("pooled_hidden_state_linear"),bucket:e.enum(["none","three_class"]).default("three_class")}).strict(),loss:e.object({ranking:e.literal("bradley_terry"),rankingWeight:e.number().positive(),bucketWeight:e.number().nonnegative(),tieWeight:e.number().nonnegative()}).strict(),optimizer:e.object({learningRate:e.number().positive(),maxSteps:e.number().int().positive().max(1e5),batchSize:e.number().int().positive().max(1e4),gradientAccumulationSteps:e.number().int().positive().max(1e4),seed:e.number().int(),checkpointEverySteps:e.number().int().positive().max(1e5)}).strict(),resourceLimits:e.object({wallTimeMs:e.number().int().positive().max(1440*60*1e3),maxExamples:e.number().int().positive().max(1e5),maxInputCharacters:e.number().int().positive().max(5e5).default(32e3),maxImagePixels:e.number().int().positive().max(1e8).optional(),maximumSpendUsd:e.number().nonnegative().max(1e5)}).strict()})).superRefine((t,i)=>{t.runScope==="synthetic_smoke"&&(t.optimizer.maxSteps>100||t.resourceLimits.maximumSpendUsd>10)&&i.addIssue({code:"custom",path:["resourceLimits"],message:"Synthetic-smoke Reward Model runs are limited to 100 steps and USD 10."})}),En=u(()=>({schemaVersion:e.literal("openpond.rftRecipe.v1"),method:e.literal("grpo"),parameterization:e.literal("lora"),baseModel:e.object({id:a,revision:e.string().trim().min(1).max(256),tokenizerRevision:e.string().trim().min(1).max(256),chatTemplateHash:m}),dataset:e.object({trainSplit:e.literal("train"),validationSplit:e.enum(["validation","frozen_eval"]),maxPromptTokens:e.number().int().positive().max(32768),maxExamples:e.number().int().positive().max(1e5).default(1e3),selectionStrategy:e.enum(["stable_hash_top_n","rft_easy_curriculum_v1"]).default("stable_hash_top_n")}),lora:e.object({rank:e.number().int().positive().max(256)}),rollout:e.object({groupSize:e.number().int().min(2).max(64),concurrency:e.number().int().positive().max(32),maxTurns:e.number().int().positive().max(100),maxOutputTokens:e.number().int().positive().max(8192),temperature:e.number().min(0).max(2),topP:e.number().positive().max(1),seed:e.number().int()}),optimizer:e.object({learningRate:e.number().positive(),maxSteps:e.number().int().positive().max(1e5),clipRange:e.number().positive().max(1).default(.2),iterations:e.number().int().min(2).max(16).default(2),microbatchSize:e.number().int().positive().max(64).default(1),gradientAccumulationSteps:e.number().int().positive().max(64).default(1),advantageEpsilon:e.number().positive().max(.01).default(1e-8),adamw:D}),loss:e.object({method:F.default("grpo"),klBeta:e.number().min(0).nullable().default(null)}).default({method:"grpo",klBeta:null}),reward:e.object({graderId:a,graderHash:m,environmentId:a,environmentVersion:e.string().trim().min(1).max(256),toolContractHash:m,learnedPreference:J.nullable().optional()}),resourceLimits:e.object({wallTimeMs:e.number().int().positive().max(1440*60*1e3),maxGpuSeconds:e.number().int().positive().max(21600).optional(),warmupDeadlineSeconds:e.number().int().positive().max(3600).optional(),maxRollouts:e.number().int().positive().max(1e5),maxPayloadBytes:e.number().int().positive().max(10*1024*1024)}),policyOptimization:W.nullable().default(null),continuation:e.object({schemaVersion:e.literal("openpond.crossJobContinuationRequest.v1"),parentArtifact:r,sourceArtifact:e.object({jobId:a,artifactId:a,checkpointId:a,contentHash:m}).strict(),optimizerMode:e.enum(["continue","reset"]),adapterMode:e.enum(["residual_append","shared","sequential_merge"]).optional()}).strict().optional()})),Hn=u(()=>({schemaVersion:e.literal("openpond.dpoRecipe.v1"),method:e.literal("dpo"),parameterization:e.literal("lora"),policyModel:H,referenceModel:H,dataset:e.object({trainSplit:e.literal("train"),validationSplit:e.enum(["validation","frozen_eval"]),maxPairs:e.number().int().positive().max(1e5),maxPromptTokens:e.number().int().positive().max(32768),maxCompletionTokens:e.number().int().positive().max(32768),selectionStrategy:e.literal("stable_hash_top_n"),selectionSeed:e.number().int()}),lora:e.object({rank:e.number().int().positive().max(256),alpha:e.number().positive().max(1024),dropout:e.number().min(0).max(1),targetModules:e.array(a).min(1).max(100)}),loss:e.object({variant:e.literal("sigmoid"),beta:e.number().positive().max(10),labelSmoothing:e.number().min(0).max(.5).default(0)}),optimizer:e.object({learningRate:e.number().positive(),epochs:e.number().positive().max(100),maxSteps:e.number().int().positive().max(1e6),batchSize:e.number().int().positive().max(1e4),gradientAccumulationSteps:e.number().int().positive().max(1e4),seed:e.number().int()}),referenceLogprobs:e.object({cacheSchemaVersion:e.literal("openpond.dpoReferenceLogprobs.v1"),cacheKey:m,invalidationHash:m}),resourceLimits:e.object({cpuThreads:e.number().int().positive().max(256),memoryBytes:e.number().int().positive(),wallTimeMs:e.number().int().positive()})})),On=u(()=>({schemaVersion:e.literal("openpond.ppoRecipe.v1"),method:e.literal("ppo"),parameterization:e.literal("lora"),policyOptimization:W.extend({optimizer:G}),lora:e.object({rank:e.number().int().positive().max(256),alpha:e.number().positive().max(1024),dropout:e.number().min(0).max(1),targetModules:e.array(a).min(1).max(100)}),valueHead:e.object({initialization:e.literal("policy_hidden_state_linear"),optimizerLearningRate:e.number().positive(),artifactName:e.literal("value_head.safetensors")}),policyLearningRate:e.number().positive(),resume:e.object({checkpointId:a.nullable(),policyHash:m,referenceHash:m,valueModelHash:m,optimizerStateHash:m.nullable()}),resourceLimits:e.object({cpuThreads:e.number().int().positive().max(256),memoryBytes:e.number().int().positive(),wallTimeMs:e.number().int().positive()})})),zn=u(()=>({schemaVersion:e.literal("openpond.unsupportedRecipe.v1"),method:E.exclude(["sft","dpo","grpo","ppo"]),parameterization:X,unsupportedReason:e.string().trim().min(1).max(5e3)})),Vn=e.union([Te,Hn,En,On,zn]),Dn=u(()=>({schemaVersion:e.literal("openpond.trainingDestinationCapabilities.v1"),destinationId:z,available:e.boolean(),methods:e.array(E),parameterizations:e.array(X),modelAllowlist:e.array(a).default([]),maxDatasetBytes:e.number().int().nonnegative().nullable(),environmentPlacements:e.array(e.enum(["none","local","remote","colocated","provider_native"])),nonProduction:e.boolean(),unavailableReason:e.string().trim().min(1).max(5e3).nullable(),checkedAt:b})),Bn=u(()=>({destinationId:z,available:e.boolean(),methods:e.array(E),parameterizations:e.array(X),nonProduction:e.boolean(),unavailableReason:e.string().trim().min(1).max(5e3).nullable()})),Ln=u(()=>({schemaVersion:e.literal("openpond.baseModelCandidate.v1"),selectionKey:a,label:e.string().trim().min(1).max(500),sourceLabel:e.string().trim().min(1).max(500),preference:B,available:e.boolean(),nonProduction:e.boolean(),unavailableReason:e.string().trim().min(1).max(5e3).nullable(),methods:e.array(E),executionOptions:e.array(Bn).min(1)})),qn=u(()=>({code:a,severity:e.enum(["warning","error"]),path:e.string().trim().max(2e3).nullable(),message:e.string().trim().min(1).max(5e3)})),Un=u(()=>({schemaVersion:e.literal("openpond.trainingCompatibility.v1"),compatible:e.boolean(),destinationId:z,tasksetId:a,recipeMethod:E,issues:e.array(qn),checkedAt:b})),Nn=e.union([Me,e.enum(["destination_unavailable","destination_method_unsupported","destination_model_unsupported","destination_parameterization_unsupported","experimental_destination"])]),gr=u(()=>({method:E,state:e.enum(["recommended","compatible","needs_dataset_work","destination_unavailable","experimental_destination"]),reasonCodes:e.array(Nn).default([]),reasons:e.array(e.string().trim().min(1).max(5e3)).default([]),destinationId:z.nullable().default(null)})),hr=e.enum(["small","standard","custom","small_experiment"]);var $n=Ae,jt=u(()=>({schemaVersion:e.literal("openpond.trainingPlan.v1"),id:a,modelId:a,tasksetId:a,tasksetHash:m,comparisonSeriesEntry:A.nullable().optional(),evaluationTasksetRef:g.nullable().optional(),harnessRelease:r.nullable().optional(),modelImprovementQualification:r.nullable().optional(),destinationId:z,recipe:Vn,environmentPlacement:e.enum(["none","local","remote","colocated","provider_native"]),compatibility:Un,dataPolicy:e.object({exportApproved:e.boolean(),approvedSourceIds:e.array(a),retentionDays:e.number().int().nonnegative().nullable(),region:e.string().trim().min(1).max(200).nullable()}),estimatedCostUsd:e.number().nonnegative().nullable(),createdAt:b,contentHash:m})),Fn=u(()=>({path:e.string().trim().min(1).max(2e3),sha256:m,sizeBytes:e.number().int().nonnegative(),role:e.enum(["manifest","task_data","grader","environment","recipe","policy","provenance"])})),_e=u(()=>({schemaVersion:e.literal("openpond.trainingBundle.v1"),id:a,planId:a,tasksetId:a,tasksetHash:m,recipeHash:m,files:e.array(Fn).min(1).max(1e6),totalSizeBytes:e.number().int().nonnegative(),sourceIds:e.array(a),excludedSourceIds:e.array(a),containsRawChats:e.literal(!1),containsSecrets:e.literal(!1),containsHiddenGraderAssets:e.literal(!1),createdAt:b,contentHash:m})),fr=u(()=>({schemaVersion:e.literal("openpond.trainingBundleExport.v1"),manifest:_e,files:e.array(e.object({path:e.string().trim().min(1).max(2e3),sha256:m,sizeBytes:e.number().int().nonnegative(),encoding:e.literal("base64"),content:e.string()})).min(1),contentHash:m})),vr=u(()=>({schemaVersion:e.literal("openpond.trainingPreparedStart.v1"),plan:jt,bundle:_e,approvalActor:a.nullable(),preparedAt:b})),xr=u(()=>({schemaVersion:e.literal("openpond.trainingApproval.v1"),evaluationTasksetRef:g.nullable().optional(),id:a,planId:a,bundleHash:m,harnessRelease:r.nullable().optional(),modelImprovementQualification:r.nullable().optional(),destinationId:z,modelId:a,method:E,parameterization:X,maximumCostUsd:e.number().nonnegative().nullable(),approvedBy:a,approvedAt:b})),Sr=u(()=>({schemaVersion:e.literal("openpond.trainingJobSourceSnapshot.v1"),evaluationTasksetRef:g.nullable().optional(),modelProjectId:a,sourceProjectRevision:e.number().int().positive(),profileId:a,taskset:e.object({id:a,revision:e.number().int().positive(),contentHash:m}).strict(),tasksetRelease:r,harnessRelease:r,baseModel:B,method:E})).strict(),Gn=e.enum(["queued","starting","running","cancelling","cancelled","succeeded","failed","reconciling"]),Tt=u(()=>({schemaVersion:e.literal("openpond.trainingJob.v1"),id:a,planId:a,bundleHash:m,approvalId:a,destinationId:z,status:Gn,nonProduction:e.boolean(),workerPid:e.number().int().positive().nullable(),startedAt:b.nullable(),completedAt:b.nullable(),error:e.string().trim().min(1).max(2e4).nullable(),createdAt:b,updatedAt:b,metadata:O})),Jn=u(()=>({schemaVersion:e.literal("openpond.trainingJobEvent.v1"),id:a,jobId:a,sequence:e.number().int().nonnegative(),type:e.enum(["queued","start","progress","metric","checkpoint","cancel","complete","failure","reconcile"]),timestamp:b,payload:O})),Wn=u(()=>({schemaVersion:e.literal("openpond.sftStepMetric.v1"),step:e.number().int().nonnegative(),maxSteps:e.number().int().positive(),timestamp:b,epoch:e.number().nonnegative().nullable(),loss:e.number().nullable(),learningRate:e.number().nonnegative().nullable(),gradientNorm:e.number().nonnegative().nullable(),entropy:e.number().nonnegative().nullable(),meanTokenAccuracy:e.number().min(0).max(1).nullable(),preferenceAccuracy:e.number().min(0).max(1).nullable().default(null),preferenceMargin:e.number().nullable().default(null),chosenReward:e.number().nullable().default(null),rejectedReward:e.number().nullable().default(null),chosenLogProbability:e.number().nullable().default(null),rejectedLogProbability:e.number().nullable().default(null),reward:e.number().nullable().default(null),policyLoss:e.number().nullable().default(null),advantageLoss:e.number().nullable().default(null),inputTokensSeen:e.number().int().nonnegative().nullable(),memoryBytes:e.number().int().nonnegative().nullable(),elapsedSeconds:e.number().nonnegative().nullable()})),Yn=u(()=>({schemaVersion:e.literal("openpond.policyOptimizationMetric.v1"),method:e.enum(["grpo","ppo"]),step:e.number().int().nonnegative(),timestamp:b,learningRate:e.number().nonnegative().nullable().default(null),policyLoss:e.number().nullable(),valueLoss:e.number().nullable(),gradientNorm:e.number().nonnegative().nullable().default(null),meanReward:e.number().nullable(),meanReturn:e.number().nullable(),kl:e.number().nullable(),behaviorPolicyKlPreUpdate:e.number().nonnegative().nullable().default(null),entropy:e.number().nullable(),policyClipFraction:e.number().min(0).max(1).nullable(),behaviorPolicyClipFractionPreUpdate:e.number().min(0).max(1).nullable().default(null),valueClipFraction:e.number().min(0).max(1).nullable(),explainedVariance:e.number().nullable(),rolloutLearnerLag:e.number().int().nonnegative().nullable(),inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),environmentExecutions:e.number().int().nonnegative(),trajectoryCount:e.number().int().nonnegative().nullable().default(null),costUsd:e.number().nonnegative().nullable()})),Kn=u(()=>({schemaVersion:e.literal("openpond.managedTrainingRunEvidence.v2"),provider:a,providerRunId:a,state:a,progress:e.object({targetOptimizerSteps:e.number().int().nonnegative(),committedOptimizerSteps:e.number().int().nonnegative(),skippedOptimizerSteps:e.number().int().nonnegative()}),reward:e.object({finalMean:e.number().nullable(),variance:e.number().nonnegative().nullable(),minimum:e.number().nullable(),maximum:e.number().nullable(),distinctValueCount:e.number().int().nonnegative(),noSignalGroupCount:e.number().int().nonnegative(),trajectoryCount:e.number().int().nonnegative(),eligibleTrajectoryCount:e.number().int().nonnegative()}),usage:e.object({inputTokens:e.number().int().nonnegative(),outputTokens:e.number().int().nonnegative(),environmentExecutions:e.number().int().nonnegative()}),resource:e.object({provider:a,gpuType:e.string().trim().min(1).max(300).nullable(),gpuCount:e.number().int().nonnegative().nullable(),hourlyCostUsd:e.number().nonnegative().nullable(),durationSeconds:e.number().nonnegative().nullable(),gpuSeconds:e.number().nonnegative().nullable()}),cost:e.object({totalUsd:e.number().nonnegative().nullable()}),checkpoint:e.object({id:a,policyVersion:e.number().int().nonnegative(),sha256:m.nullable(),sizeBytes:e.number().int().nonnegative().nullable()}).nullable(),movement:e.object({adapterDeltaNorm:e.number().nonnegative().nullable()}),evaluations:e.array(e.object({reference:e.object({id:a,contentHash:m}).nullable().optional(),kind:e.enum(["baseline","candidate"]),policyVersion:e.number().int().nonnegative(),taskCount:e.number().int().nonnegative().nullable().optional(),targetTaskCount:e.number().int().nonnegative().nullable().optional(),score:e.number().nullable(),threshold:e.number().nullable(),passed:e.boolean().nullable()})),canonicalPublication:e.object({state:a.nullable(),artifactId:a.nullable()}),syncedAt:b})),Rt=u(()=>({count:e.number().int().nonnegative(),scoredCount:e.number().int().nonnegative(),meanScore:e.number().min(0).max(1).nullable(),passedCount:e.number().int().nonnegative(),passRate:e.number().min(0).max(1).nullable()})),It=u(()=>({status:e.enum(["scored","unavailable"]),score:e.number().min(0).max(1).nullable(),passed:e.boolean(),rewardEligible:e.boolean(),failureClass:e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]).nullable(),feedback:e.array(e.string().trim().min(1).max(2e4)).max(1e3),components:e.array(e.object({graderId:a,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),feedback:e.string().trim().max(2e4).nullable()})).max(1e3)})),Qn=u(()=>({taskId:a,input:e.record(e.string(),e.unknown()),baseOutput:e.record(e.string(),e.unknown()).nullable(),trainedOutput:e.record(e.string(),e.unknown()).nullable(),baseGrade:It.nullable(),trainedGrade:It.nullable()})),Zn=u(()=>({schemaVersion:e.literal("openpond.trainingEvaluationSummary.v1"),jobId:a,tasksetId:a,base:Rt,trained:Rt,meanScoreDelta:e.number().min(-1).max(1).nullable(),examples:e.array(Qn).max(1e6)})),yr=u(()=>({schemaVersion:e.literal("openpond.trainingRunDetail.v1"),job:Tt,events:e.array(Jn),stepMetrics:e.array(Wn),policyMetrics:e.array(Yn).default([]),managedEvidence:Kn.nullable().default(null),evaluation:Zn.nullable(),generatedAt:b})),Xn=u(()=>({schemaVersion:e.literal("openpond.trainingArtifact.v1"),id:a,jobId:a,kind:e.enum(["adapter","checkpoint","metrics","log","manifest","evaluation"]),path:e.string().trim().min(1).max(4e3),sha256:m,sizeBytes:e.number().int().nonnegative(),baseModelId:a.nullable(),baseModelRevision:e.string().trim().min(1).max(256).nullable(),tokenizerRevision:e.string().trim().min(1).max(256).nullable(),chatTemplateHash:m.nullable(),nonProduction:e.boolean(),createdAt:b,metadata:O})),ea=u(()=>({schemaVersion:e.literal("openpond.modelArtifactLineage.v1"),id:a,modelId:a,artifactId:a,jobId:a,tasksetId:a,tasksetHash:m,graderHash:m,planHash:m,bundleHash:m,recipeHash:m,workerVersion:e.string().trim().min(1).max(256),trainerVersion:e.string().trim().min(1).max(256),importedAt:b,frozenEvaluationArtifactId:a.nullable(),promotable:e.boolean(),pinned:e.boolean().default(!1),status:e.enum(["imported","rejected"]).default("imported"),rejectedAt:b.nullable().default(null),rejectionReason:e.string().trim().min(1).max(5e3).nullable().default(null),chatConfiguration:he.default(bt),managedServing:gt.nullable().default(null)})),ta=e.enum(["chat_manual","agent","extension","authoring_optimizer"]),na=u(()=>({schemaVersion:e.literal("openpond.modelBinding.v1"),id:a,profileId:a,role:ta,roleTargetId:a,modelArtifactLineageId:a,tasksetId:a,evaluationArtifactId:a.nullable(),status:e.enum(["active","rolled_back"]),priorBindingId:a.nullable(),rollbackTargetBindingId:a.nullable(),promotedBy:a,promotedAt:b,rolledBackAt:b.nullable(),metadata:O})),_r=u(()=>({schemaVersion:e.literal("openpond.trainingActivity.v1"),profileId:a,active:e.boolean(),activeCounts:e.object({jobs:e.number().int().nonnegative(),creations:e.number().int().nonnegative(),minerRuns:e.number().int().nonnegative(),datasetImports:e.number().int().nonnegative()}),revision:m,generatedAt:b})),kr=u(()=>({schemaVersion:e.literal("openpond.tasksetOperationalState.v1"),tasksetId:a,attempts:e.array(Ee),artifacts:e.array(He),grades:e.array(Oe),evaluationResults:e.array(je).default([]),generatedAt:b})),Rr=u(()=>({schemaVersion:e.literal("openpond.trainingState.v1"),profileId:a,sources:e.array(Ce),creations:e.array(Ve),tasksetDrafts:e.array(we).default([]),tasksets:e.array(ae),benchmarkRuns:e.array(e.custom()).default([]),benchmarkComparisons:e.array(e.custom()).default([]),datasetImports:e.array(Ne).default([]),datasetArtifacts:e.array(ne).default([]),graderAuditReports:e.array(ze),evaluationResults:e.array(e.custom()).default([]),candidates:e.array(ce),minerConfig:q,minerRuns:e.array(Ge).default([]),modelProjects:e.array($n).default([]),modelVersions:e.array(tt).default([]),modelRuns:e.array(rt).default([]),comparisonSeries:e.array(We).default([]),comparisonSeriesEntries:e.array(Ke).default([]),modelCurrencySnapshots:e.array(st).default([]),continualBenchIssueReviews:e.array(mt).default([]),continualLearningDailyBatches:e.array(lt).default([]),rewardModelVersions:e.array(nt).default([]),rewardModelRuns:e.array(at).default([]),modelTasksets:e.array(ae).default([]),plans:e.array(jt),bundles:e.array(_e),jobs:e.array(Tt),artifacts:e.array(Xn),models:e.array(ea),rolloutReceipts:e.array(kt).default([]),modelBindings:e.array(na).default([]),destinations:e.array(Dn),baseModelCandidates:e.array(Ln).default([]),activityRevision:m.optional(),generatedAt:b}));export{qe as a,Pt as b,Ue as c,Ne as d,ya as e,_a as f,Dt as g,ce as h,q as i,Ta as j,Aa as k,Ge as l,Lt as m,We as n,Gt as o,Wt as p,Yt as q,A as r,Ke as s,Ea as t,tt as u,nt as v,en as w,at as x,rn as y,sn as z,rt as A,ai as B,st as C,$ as D,bi as E,lt as F,mt as G,J as H,he as I,gt as J,hn as K,ji as L,ye as M,wi as N,ft as O,fn as P,Pi as Q,vt as R,Z as S,Ei as T,St as U,yt as V,_t as W,Hi as X,An as Y,Oi as Z,kt as _,z as $,br as aa,Vn as ba,Dn as ca,Ln as da,Un as ea,$n as fa,jt as ga,_e as ha,fr as ia,vr as ja,xr as ka,Sr as la,Tt as ma,Jn as na,Wn as oa,Yn as pa,Kn as qa,Zn as ra,yr as sa,Xn as ta,ea as ua,ta as va,na as wa,kr as xa};
|