openpond 0.2.66 → 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 +691 -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-YYZ3ZO3Q.js → acp-2OIXATRY.js} +1 -1
- package/dist/chunks/{acp-agent-T26S7TU2.js → acp-agent-PAGX2B47.js} +1 -1
- package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
- package/dist/chunks/{app-layer-5XUMNHDO.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-GRLQHYAU.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/chunk-4BUM6JEC.js +33 -0
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-FUFI4THX.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-2GJD23CM.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-6S2MWJVD.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-NTM3KQ25.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-6TRVEA3T.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-APKXXAUF.js +2 -0
- 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-EVQISX7M.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-BHKXPWFB.js} +1 -1
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.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-ZU3YBRXS.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-W22KWKF6.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/{chunk-NABPZ7AK.js → chunk-DWM5G7BU.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.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-WKHGXLJD.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/chunk-FKUWCJ73.js +161 -0
- package/dist/chunks/{chunk-U2BD545L.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-JLW5BQVO.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-Q4AXZY2P.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-5AU5Y6KS.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.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-OTUS7NTQ.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-KOC3YJEU.js} +2 -2
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.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-5KWKSR4P.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-MEJLWNRS.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.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-DXA2UHBE.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-AF3AVDPP.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-W7NXFRHN.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-PLVWARB7.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-KOKBDIGR.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-67HXM6AL.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-DIDQHTAX.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-LARJARMS.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-FHLSLOKH.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-5Z3AU5CL.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-GFAI2MCJ.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-UXPO3ZV7.js → chunk-XQAUHXL4.js} +4 -4
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.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-D7R2AAX2.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/command-LNOVZQSK.js +58 -0
- package/dist/chunks/{configuration-command-4WTS2MZS.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-4LDXQVLN.js → connected-starting-assets-KWOFEIE4.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.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-JQA3YMCX.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-CLWTKDG6.js → import-YHYKZ6JN.js} +2 -2
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.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-GHWCKDON.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-RIDNU2I5.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-VSOOPNYN.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
- package/dist/chunks/{sandbox-template-NN3XQI7M.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-662QOKNP.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-7PDLGRWF.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-G46KIUVT.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.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-6P6IS7GH.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.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-T6XJJDAB.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-XQFTLMGH.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-VVXZUJIO.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.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-FXMCOCPP.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-checkpoint-evaluation-2X7RSOLC.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-YN5VD3PW.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-report-T633TNJG.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-hosted-workers-Y2PO5IOA.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-DuSd0wk6.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-Dklk6CaG.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DipNT6Tj.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-UU1sdoUO.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-BWYRQ1PE.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-B08F9x5g.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-srWBKvCv.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DqTpU5cO.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-2KC-KQvu.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-B-iUVPhh.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-5v0vBWXy.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-Bn4072K-.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-C2WsMj90.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-C50P74LI.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-Dje-hfUM.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-Clv0IWyn.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cw_F5Eaa.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-Btyiie4B.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-BLLw_cEA.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BpSHWQgj.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-WytWGQgw.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-BJq5zNkv.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BxFEWI9W.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-C7OM2F0-.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-KH5GFacT.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DzOw13Md.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-nZHno_4P.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-1U8DDj1J.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BO1EUA3G.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Rqq_sKW_.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-zmmMp09R.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DNbhGjkE.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.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-3BYFS4RO-ztZjcMmt.js +1 -0
- 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-DolwEJXo.js +2 -0
- 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-CXlWJW5g.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-Cps-05f3.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-Do72TyNy.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-D7igQSAg.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/intake-contracts-B8JZKYwb.js +1 -0
- package/dist/web/assets/{jsonMode-B2N7W15Y.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DPmyOFVA.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-DqqJBDzF.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BfOxF9PJ.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DNONXznc.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CRdTg0FH.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-BCq2Oosd.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-Dm7tOkKo.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-DuGMr666.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-BCbaFiqV.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-wfngGS6Y.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-cl0cw2QK.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CWnu1bz9.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-DLEc0PYL.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-ByxjI9BG.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-Df64T07n.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-DNh_x9gQ.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-CnqrOtic.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-C9vtYV4w.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +100 -4
- package/package.json +1 -1
- package/dist/chunks/actions-command-VLKMHCMI.js +0 -2
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +0 -2
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +0 -2
- package/dist/chunks/app-server-runtime-TH56EG2Z.js +0 -2
- package/dist/chunks/apps-MNT3KXIY.js +0 -2
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-2ZNW6GUU.js +0 -2
- package/dist/chunks/chunk-3BJ7LPE3.js +0 -2
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-4MQHIFZL.js +0 -2
- package/dist/chunks/chunk-55Q64WWF.js +0 -2
- package/dist/chunks/chunk-5KJMFK65.js +0 -2
- package/dist/chunks/chunk-5WPMI6QX.js +0 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +0 -2
- package/dist/chunks/chunk-ANG2YMMD.js +0 -2
- package/dist/chunks/chunk-BQVB2SPF.js +0 -10
- package/dist/chunks/chunk-DMO3UIS7.js +0 -6
- package/dist/chunks/chunk-FEQ7HNJR.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-H5ML7735.js +0 -2
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-JKI53ED7.js +0 -161
- package/dist/chunks/chunk-JRGECNP3.js +0 -2
- package/dist/chunks/chunk-L4EJ5R3B.js +0 -23
- package/dist/chunks/chunk-LXZLLTYQ.js +0 -2
- package/dist/chunks/chunk-MHPCVQOE.js +0 -2
- package/dist/chunks/chunk-MVPKU72J.js +0 -4
- package/dist/chunks/chunk-OKEC2EIE.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-QCJY6FTC.js +0 -3
- package/dist/chunks/chunk-SBQ6KLXB.js +0 -33
- package/dist/chunks/chunk-TVDZXDQW.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-VD2TQCMH.js +0 -2
- package/dist/chunks/chunk-WLZJOCLA.js +0 -10
- package/dist/chunks/chunk-Y3B6ZUE6.js +0 -22
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/chunk-ZWW227M3.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NW6BGKOM.js +0 -13
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +0 -2
- package/dist/chunks/connected-evidence-D7C45HYD.js +0 -2
- package/dist/chunks/core-commands-RXPXOYOP.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +0 -4
- package/dist/chunks/datasets-LBLEKLCS.js +0 -2
- package/dist/chunks/desktop-test-INJPZ5VP.js +0 -3
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/evaluation-coordination-3ARLJAFH.js +0 -2
- package/dist/chunks/experiment-improvements-UB4C5CSP.js +0 -2
- package/dist/chunks/experiments-AHHKFJD6.js +0 -2
- package/dist/chunks/experiments-signal-MTR475QV.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +0 -2
- package/dist/chunks/hosted-app-server-composition-GPXH3BOG.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +0 -3
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +0 -3
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +0 -3
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +0 -2
- package/dist/chunks/human-review-DVHVJXBA.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +0 -2
- package/dist/chunks/opchat-LMKH3OWR.js +0 -3
- package/dist/chunks/opchat-bounded-chat-PPOWO7H4.js +0 -2
- package/dist/chunks/organizations-T6ZUSHNJ.js +0 -2
- package/dist/chunks/project-action-payload-2G57RL74.js +0 -2
- package/dist/chunks/project-agent-GBMVDJY3.js +0 -2
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +0 -2
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +0 -2
- package/dist/chunks/sandbox-command-L5VQ2T6C.js +0 -2
- package/dist/chunks/saved-work-LAVTNKPT.js +0 -2
- package/dist/chunks/setup-TXEM2QSG.js +0 -2
- package/dist/chunks/src-HJHIBDFX.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +0 -2
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +0 -2
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +0 -2
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +0 -7
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +0 -2
- package/dist/chunks/store-local-experiments-CBJA56X2.js +0 -97
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +0 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +0 -2
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +0 -9
- package/dist/chunks/taskset-packages-NRRPON7B.js +0 -2
- package/dist/chunks/taskset-packages-RW4SFGDU.js +0 -2
- package/dist/chunks/tool-learning-O7QTTEDB.js +0 -2
- package/dist/chunks/training-XFM3OOPN.js +0 -2
- package/dist/chunks/training-XILDD5RG.js +0 -2
- package/dist/chunks/training-hosted-6BX2IASC.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/chunks/training-model-start-E5MP3URL.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-CNQi3RlI.js +0 -53
- package/dist/web/assets/AppTerminalPanel-DLz34eSs.js +0 -2
- package/dist/web/assets/AppsView-DkCMr67-.js +0 -1
- package/dist/web/assets/BrowserSidebar-BBaaanMS.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Ct59FKw1.js +0 -8
- package/dist/web/assets/CommunityView-BLTlSxyb.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-DWF6WPao.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BYl-2j7B.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CQz29DwD.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-DJRgF1kQ.js +0 -101
- package/dist/web/assets/MainChatThread-gwmhe1Nw.js +0 -2
- package/dist/web/assets/MainPane-CqtgV9rU.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-DrQldDsG.js +0 -2
- package/dist/web/assets/RightChatPanelStack-xW5rKbp0.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-BDmIxvIm.js +0 -1
- package/dist/web/assets/TeamChatView-BisSMAXy.js +0 -1
- package/dist/web/assets/TrainingRunLineage-B2WBOchk.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-D3Ub_jVj.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-CyTa8Cjs.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-CtZzxQ1e.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-D-eTQib6.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-down-75im8nFF.js +0 -1
- package/dist/web/assets/chevron-right-CpbCIUFo.js +0 -1
- package/dist/web/assets/chevron-up-BD8jg0bQ.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/cloud-upload-4lP-5zmp.js +0 -1
- package/dist/web/assets/common-BMjyKlX-.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/copy-DRnATDDY.js +0 -1
- package/dist/web/assets/create-pipeline-CyUZrbbO.js +0 -1
- package/dist/web/assets/createLucideIcon-CmkSm39S.js +0 -1
- package/dist/web/assets/external-link-D_nBEDFO.js +0 -1
- package/dist/web/assets/folder-open-tD5Lle1M.js +0 -1
- package/dist/web/assets/folder-plus-DlZ4hM48.js +0 -1
- package/dist/web/assets/git-commit-horizontal-g8KBhvfr.js +0 -1
- package/dist/web/assets/icons-B8_Rkg-l.js +0 -1
- package/dist/web/assets/image-CUZMnZYi.js +0 -1
- package/dist/web/assets/info-SmuBZiE5.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-D_KVxLLz.js +0 -1
- package/dist/web/assets/maximize-2-B8HN3jsA.js +0 -1
- package/dist/web/assets/message-square-CrDvzn66.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-CW-M_aaj.js +0 -1
- package/dist/web/assets/paperclip-DL449Io5.js +0 -1
- package/dist/web/assets/play-DYLqBrwg.js +0 -1
- package/dist/web/assets/plus-DXZIpQuY.js +0 -1
- package/dist/web/assets/presentation-CupIXaYv.js +0 -1
- package/dist/web/assets/refresh-cw-CzVf5_oo.js +0 -1
- package/dist/web/assets/reward-checks-Bcq9ETCA.js +0 -7
- package/dist/web/assets/save-DatjrYPV.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-D7C-Auyi.js +0 -21
- package/dist/web/assets/settings-lists-D2ol3uNK.js +0 -5
- package/dist/web/assets/square-BWB1nbZF.js +0 -1
- package/dist/web/assets/square-terminal-Buj-s-fz.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/upload-DaFVH6R1.js +0 -1
- package/dist/web/assets/useQuery-yUz7Ui8g.js +0 -1
- package/dist/web/assets/wifi-off-CtNwnIJc.js +0 -1
- package/dist/web/assets/work-outputs-CK0nHe4g.js +0 -1
- package/dist/web/assets/x-Bhl-4Zlt.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as R}from"./chunk-KCJVFLBB.js";import{
|
|
2
|
+
import{a as R}from"./chunk-KCJVFLBB.js";import{mb as u,ob as E}from"./chunk-4PUOWSDE.js";import{a as d}from"./chunk-FTQLQJQV.js";var S=class extends R{static{d(this,"SqliteLearningStore")}async listLearningScopes(){return await this.ready,await this.writeQueue,(await this.all("SELECT DISTINCT scope FROM learning_resources ORDER BY scope",[])).map(t=>t.scope)}learningRepository(){return{transaction:d(async(t,o)=>{if(!t.trim())throw new Error("learning_scope_required");await this.ready;let a=this.writeQueue.then(async()=>{let e=this.db;if(!e)throw new Error("learning_store_closed");e.exec("BEGIN IMMEDIATE");let n=!0,i=_(e,t,()=>{if(!n)throw new Error("learning_transaction_closed")});try{let r=await o(i);return e.exec("COMMIT"),r}catch(r){throw e.exec("ROLLBACK"),r}finally{n=!1}});return this.writeQueue=a.then(()=>{},()=>{}),a},"transaction")}}};function _(s,t,o){let a=d((e,n)=>u[e].parse(JSON.parse(n.payload)),"parse");return{async get(e,n,i){o();let r=i===void 0?s.get(`SELECT history.payload FROM learning_resources current
|
|
3
3
|
JOIN learning_revisions history USING (scope, kind, id, revision)
|
|
4
4
|
WHERE current.scope = ? AND current.kind = ? AND current.id = ?`,[t,e,n]):s.get("SELECT payload FROM learning_revisions WHERE scope = ? AND kind = ? AND id = ? AND revision = ?",[t,e,n,i]);return r?a(e,r):null},async put(e,n,i,r){o(),N(s,t,e,n,i,r)},async list(e,n){o();let i=Math.max(1,Math.min(100,Math.trunc(n.limit)));if(!Number.isFinite(i))throw new Error("learning_query_limit_invalid");let r=["current.scope = ?","current.kind = ?"],c=[t,e];if(n.reviewState!==void 0){if(e!=="evidence")throw new Error("learning_review_filter_requires_evidence");let l=`EXISTS (SELECT 1 FROM learning_resources decision
|
|
5
5
|
JOIN learning_revisions decision_history USING (scope, kind, id, revision)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{A as t}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";var m=t.string().trim().min(1).max(500),y=t.string().regex(/^[a-f0-9]{64}$/),u=t.object({id:m,revision:t.number().int().positive(),contentHash:y}).strict(),p=t.object({schemaVersion:t.literal("openpond.hostedTasksetSummary.v1"),id:m,teamId:m,release:u,name:t.string().min(1).max(500),description:t.string().max(2e4),taskCount:t.number().int().nonnegative(),buildIntent:t.string().min(1).max(100),methodHint:t.string().min(1).max(100).nullable(),packageBytes:t.number().int().nonnegative().nullable(),storedBytes:t.number().int().nonnegative().nullable(),createdAt:t.string().datetime({offset:!0})}).strict(),k=t.object({afterId:t.string().trim().min(1).max(2e3).optional(),limit:t.number().int().min(1).max(100).default(30),modelProjectId:m.optional(),projectId:m.optional(),search:t.string().trim().max(100).optional(),sort:t.enum(["id","name","updated"]).default("id")}).strict(),w=t.object({items:t.array(p).max(100),nextCursor:t.string().trim().min(1).max(2e3).nullable()}).strict(),b=t.object({code:t.string().min(1),message:t.string().min(1)}).strict(),i=class extends Error{constructor(s,e,a){super(a);this.status=s;this.code=e;this.name="OpenPondTasksetCatalogError"}status;code;static{l(this,"OpenPondTasksetCatalogError")}},g=class{static{l(this,"OpenPondTasksetCatalogClient")}#e;constructor(r){if(!r.apiKey.trim()||!r.teamId.trim())throw new Error("Taskset API key and workspace are required.");let s=new URL(r.baseUrl);if(!["http:","https:"].includes(s.protocol)||s.username||s.password||s.search||s.hash)throw new Error("Taskset base URL must be an HTTP(S) endpoint without credentials, query, or fragment.");this.#e={...r,baseUrl:s.toString().replace(/\/+$/,"")}}async list(r={},s={}){let e=k.parse(r),a=new URLSearchParams({limit:String(e.limit)});e.afterId&&a.set("afterId",e.afterId),e.modelProjectId&&a.set("modelProjectId",e.modelProjectId),e.projectId&&a.set("projectId",e.projectId),e.search!==void 0&&a.set("search",e.search),a.set("sort",e.sort);let n=w.parse(await this.#t(`?${a}`,s.signal));if(n.items.length>e.limit||new Set(n.items.map(c=>c.id)).size!==n.items.length||n.items.some(c=>c.teamId!==this.#e.teamId))throw new i(502,"catalog_scope_mismatch","Taskset inventory did not match the requested workspace or page size.");return n}async get(r,s={}){let e=m.parse(r),a=p.parse(await this.#t(`/${encodeURIComponent(e)}`,s.signal));if(a.id!==e||a.teamId!==this.#e.teamId)throw new i(502,"catalog_identity_mismatch","Taskset metadata did not match the requested identity.");return a}async resolve(r,s={}){let e=u.parse(r),a=p.parse(await this.#t(`/releases/${encodeURIComponent(e.id)}/${e.revision}/${e.contentHash}`,s.signal));if(a.teamId!==this.#e.teamId||a.release.id!==e.id||a.release.revision!==e.revision||a.release.contentHash!==e.contentHash)throw new i(502,"catalog_release_mismatch","Taskset metadata did not match the requested immutable release.");return a}async#t(r,s){let e=await(this.#e.fetch??globalThis.fetch)(`${this.#e.baseUrl}/v1/taskset-catalog${r}`,{headers:{Authorization:`Bearer ${this.#e.apiKey}`,"X-OpenPond-Team-Id":this.#e.teamId,Accept:"application/json"},signal:s,redirect:"error"}),a=e.body?.getReader();if(!a)throw new i(e.status,"empty_response","Taskset catalog response was empty.");let n=new TextDecoder,c=0,d="";try{for(;;){let o=await a.read();if(o.done)break;if(c+=o.value.byteLength,c>4194304)throw new i(e.status,"response_too_large","Taskset catalog response exceeded 4 MiB.");d+=n.decode(o.value,{stream:!0})}d+=n.decode()}finally{await a.cancel(),a.releaseLock()}let h=JSON.parse(d);if(!e.ok){let o=b.safeParse(h);throw new i(e.status,o.success?o.data.code:"invalid_error_response",o.success?o.data.message:`Taskset catalog request failed (${e.status}).`)}return h}};export{u as a,p as b,k as c,w as d,b as e,i as f,g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b as u}from"./chunk-KTIBXRWQ.js";import{a as x,b as T}from"./chunk-GLUWATL5.js";import{E as S,F as f}from"./chunk-SH7POUVX.js";import{f as y}from"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";async function v(n,s,t,e,o){let r=await a(n,s,`/v4/apps/${t}/commits`,{method:"POST",body:JSON.stringify({files:e,message:o})});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Commit failed: ${r.status} ${p}`)}return await r.json()}i(v,"commitFiles");async function I(n,s,t,e){let o=e?.environment??"production",r=await a(n,s,`/v4/apps/${t}/deployments`,{method:"POST",body:JSON.stringify({environment:o,...e?.commitSha?{commitSha:e.commitSha}:{},...e?.branch?{branch:e.branch}:{}})});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Deploy failed: ${r.status} ${p}`)}return await r.json()}i(I,"deployApp");async function D(n,s,t,e){let o=await a(n,s,`/v4/apps/${encodeURIComponent(t)}/deployments/promote-preview`,{method:"POST",body:JSON.stringify(e)});return u(o,"Preview promotion")}i(D,"promotePreviewToProduction");async function q(n,s,t,e){let o=await a(n,s,`/v1/apps/${encodeURIComponent(t)}/lifecycle/start`,{method:"POST",body:JSON.stringify(e)});return u(o,"App lifecycle start")}i(q,"startAppLifecycle");async function C(n,s,t){let e=await a(n,s,`/apps/deployments/${t}/logs`,{method:"GET"});if(!e.ok){let p=await e.text().catch(()=>"");throw new Error(`Deployment logs failed: ${e.status} ${p}`)}let o=await e.json().catch(()=>({}));return(Array.isArray(o.logs)?o.logs:[]).map(p=>{let l=typeof p.createdAt=="string"?p.createdAt:p.createdAt instanceof Date?p.createdAt.toISOString():new Date().toISOString();return{id:typeof p.id=="string"?p.id:`${Math.random()}`,type:typeof p.type=="string"?p.type:void 0,message:typeof p.message=="string"?p.message:"",createdAt:l}})}i(C,"getDeploymentLogs");async function N(n,s,t){let e=await a(n,s,`/apps/deployments/${t}/status`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment status failed: ${e.status} ${r}`)}return{status:(await e.json().catch(()=>({}))).deployment?.status}}i(N,"getDeploymentStatus");async function U(n,s,t,e){let o=new URLSearchParams;e?.status&&e.status.length>0&&o.set("status",e.status.join(",")),e?.createdAfter&&o.set("createdAfter",e.createdAfter),e?.branch&&o.set("branch",e.branch);let r=o.toString(),p=await a(n,s,`/apps/${t}/deployments/latest${r?`?${r}`:""}`,{method:"GET"});if(!p.ok){let d=await p.text().catch(()=>"");throw new Error(`Latest deployment lookup failed: ${p.status} ${d}`)}let l=await p.json().catch(()=>({}));return l.deployment?{id:l.deployment.id,status:l.deployment.status}:null}i(U,"getLatestDeploymentForApp");async function j(n,s,t){let e=await a(n,s,`/apps/deployments/${t}`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment fetch failed: ${e.status} ${r}`)}return(await e.json().catch(()=>({}))).deployment??null}i(j,"getDeploymentDetail");var G=new URL(T).hostname,P=new URL(x).hostname;async function Q(n,s,t){let e=new URLSearchParams;t?.handle&&e.set("handle",t.handle),typeof t?.limit=="number"&&Number.isFinite(t.limit)&&e.set("limit",String(Math.max(1,Math.floor(t.limit)))),typeof t?.offset=="number"&&Number.isFinite(t.offset)&&e.set("offset",String(Math.max(0,Math.floor(t.offset)))),typeof t?.includeScheduled=="boolean"&&e.set("includeScheduled",t.includeScheduled?"true":"false");let o=e.toString(),r=await a(n,s,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let l=await r.text().catch(()=>"");throw new Error(`Apps list failed: ${r.status} ${l}`)}let p=await r.json().catch(()=>({}));return Array.isArray(p.apps)?p.apps:[]}i(Q,"listApps");async function Y(n,s,t){let e=await a(n,s,"/api/projects/local",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Create project failed: ${e.status} ${o}`)}return await e.json()}i(Y,"createLocalProject");async function Z(n,s,t){let e=await a(n,s,"/apps/repo/create",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Repo create failed: ${e.status} ${o}`)}return await e.json()}i(Z,"createRepo");async function ee(n,s,t,e){let o=await a(n,s,`/apps/${encodeURIComponent(t)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:e})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${r}`)}return await o.json()}i(ee,"updateAppCodeVisibility");async function te(n,s,t,e){let o=await a(n,s,"/v4/apps/headless",{method:"POST",body:JSON.stringify({items:t,...e?{teamId:e}:{}})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Headless create failed: ${o.status} ${r}`)}return await o.json()}i(te,"createHeadlessApps");async function ne(n,s,t){let e=await a(n,s,`/v4/apps/${t}/template/status`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template status failed: ${e.status} ${o}`)}return await e.json()}i(ne,"getTemplateStatus");async function se(n,s,t){let e=await a(n,s,`/v4/apps/${t}/template/branches`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template branches failed: ${e.status} ${o}`)}return await e.json()}i(se,"listTemplateBranches");async function oe(n,s,t,e){let o=await a(n,s,`/v4/apps/${t}/template/deploy-latest`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Template deploy failed: ${o.status} ${r}`)}return await o.json()}i(oe,"deployLatestTemplate");async function re(n,s,t,e){let o=await a(n,s,`/v4/apps/${t}/environment`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Environment update failed: ${o.status} ${r}`)}return await o.json()}i(re,"updateAppEnvironment");async function ie(n,s,t){let e=await a(n,s,`/v4/apps/${t}/environment`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Environment get failed: ${e.status} ${o}`)}return await e.json()}i(ie,"getAppEnvironment");async function ae(n,s){let t=await a(n,s,"/api/tools/manifest",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Manifest fetch failed: ${t.status} ${e}`)}return await t.json()}i(ae,"fetchToolManifest");async function pe(n,s){let t=await a(n,s,"/apps/tools",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Tools lookup failed: ${t.status} ${e}`)}return await t.json()}i(pe,"listUserTools");async function ce(n,s,t){let e=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Schedules lookup failed: ${e.status} ${r}`)}let o=await e.json().catch(()=>({}));return{schedules:Array.isArray(o.schedules)?o.schedules:[]}}i(ce,"listAppSchedules");async function ue(n,s,t={}){let e=new URLSearchParams;t.domain&&e.set("domain",t.domain),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion),typeof t.limit=="number"&&e.set("limit",String(t.limit));for(let p of t.tags??[])e.append("tag",p);let o=e.toString(),r=await a(n,s,`/v1/opentool/recipes${o?`?${o}`:""}`,{method:"GET"});return u(r,"OpenTool recipe list")}i(ue,"listOpenToolRecipes");async function le(n,s,t){let e=await a(n,s,"/v1/opentool/recipes/search",{method:"POST",body:JSON.stringify(t)});return u(e,"OpenTool recipe search")}i(le,"searchOpenToolRecipes");async function de(n,s,t){let e=new URLSearchParams;typeof t.includeExamples=="boolean"&&e.set("includeExamples",String(t.includeExamples)),typeof t.includeTests=="boolean"&&e.set("includeTests",String(t.includeTests)),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion);let o=e.toString(),r=await a(n,s,`/v1/opentool/recipes/${encodeURIComponent(t.id)}${o?`?${o}`:""}`,{method:"GET"});return u(r,"OpenTool recipe get")}i(de,"getOpenToolRecipe");async function me(n,s,t){let e=await a(n,s,"/v1/opentool/rules",{method:"POST",body:JSON.stringify(t)});return u(e,"OpenTool rules get")}i(me,"getOpenToolRules");function R(n){let s=new URLSearchParams;typeof n=="number"&&Number.isFinite(n)&&s.set("limit",String(Math.max(1,Math.floor(n))));let t=s.toString();return t?`?${t}`:""}i(R,"buildLimitQuery");function A(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return[];let s=n;return Array.isArray(s.logs)?s.logs:Array.isArray(s.runs)?s.runs:Array.isArray(s.scheduleRuns)?s.scheduleRuns:Array.isArray(s.items)?s.items:[]}i(A,"normalizeScheduleExecutionLogs");async function ge(n,s,t,e){let o={...e?.preferredScheduleId?{preferredScheduleId:e.preferredScheduleId}:{},...e?.scheduleId?{scheduleId:e.scheduleId}:{},...e?.startAt?{startAt:e.startAt}:{},...e&&"endAt"in e?{endAt:e.endAt??null}:{}},r=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/start`,{method:"POST",body:JSON.stringify(o)});return u(r,"Schedule start")}i(ge,"startAppSchedules");async function he(n,s,t){let e=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/stop`,{method:"POST",body:JSON.stringify({})});return u(e,"Schedule stop")}i(he,"stopAppSchedules");async function ye(n,s){let t=await a(n,s,"/apps/schedules/current/stop",{method:"POST",body:JSON.stringify({})});return u(t,"Current schedule stop")}i(ye,"stopCurrentAppSchedules");async function fe(n,s,t){let e=await a(n,s,"/v1/schedules/run",{method:"POST",body:JSON.stringify({scheduleId:t.scheduleId})});return u(e,"Schedule run")}i(fe,"runScheduleNow");async function Re(n,s,t,e){let o=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/${encodeURIComponent(e)}`,{method:"DELETE"});return u(o,"Schedule delete")}i(Re,"deleteOrArchiveSchedule");async function we(n,s,t,e){let o=await a(n,s,`/v1/schedules/${encodeURIComponent(t)}/execution-logs${R(e?.limit)}`,{method:"GET"}),r=await u(o,"Schedule execution logs");return{logs:A(r)}}i(we,"listScheduleExecutionLogs");async function Se(n,s,t,e){let o=await a(n,s,`/v1/deployments/${encodeURIComponent(t)}/schedule-execution-logs${R(e?.limit)}`,{method:"GET"}),r=await u(o,"Deployment schedule execution logs");return{logs:A(r)}}i(Se,"listDeploymentScheduleExecutionLogs");async function xe(n,s,t){let e=await a(n,s,`/v1/schedule-execution-logs/${encodeURIComponent(t)}`,{method:"GET"});return u(e,"Schedule execution log")}i(xe,"getScheduleExecutionLog");async function Te(n,s,t,e){let o=await a(n,s,`/v1/apps/${encodeURIComponent(t)}/execution-timeline${R(e?.limit)}`,{method:"GET"});return u(o,"App execution timeline")}i(Te,"getAppExecutionTimeline");async function Pe(n,s,t){return a(n,s,"/apps/agent/create",{method:"POST",body:JSON.stringify(t)})}i(Pe,"createAgentFromPrompt");async function Ae(n,s,t){let e=new URLSearchParams;t?.appId&&e.set("appId",t.appId);let o=e.toString(),r=await a(n,s,`/apps/performance${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Performance lookup failed: ${r.status} ${p}`)}return await r.json()}i(Ae,"getUserPerformance");async function Oe(n,s,t){let e=new URLSearchParams({appId:t}),o=await a(n,s,`/apps/summary?${e.toString()}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Summary lookup failed: ${o.status} ${r}`)}return await o.json()}i(Oe,"getAppRuntimeSummary");async function _(n,s){let t=await a(n,s,"/v1/account",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Account lookup failed: ${t.status} ${e}`)}return await t.json()}i(_,"getOpenPondAccount");async function Ee(n,s){let t=new Date().toISOString(),e=Date.now(),o=n.replace(/\/$/,"");try{let r=await a(o,null,"/health",{method:"GET",headers:{Accept:"application/json"}}),p=Date.now()-e,l=await r.json().catch(()=>({})),d=null,g=null;if(s?.trim())try{let m=await _(o,s);d=!0,g=m.account}catch{d=!1}return{reachable:r.ok,authenticated:d,apiBase:o,latencyMs:p,status:r.status,service:typeof l.service=="string"?l.service:null,checkedAt:t,account:g,...r.ok?{}:{error:r.statusText||`HTTP ${r.status}`}}}catch(r){return{reachable:!1,authenticated:s?.trim()?!1:null,apiBase:o,latencyMs:Date.now()-e,status:null,service:null,checkedAt:t,error:r instanceof Error?r.message:String(r)}}}i(Ee,"checkOpenPondApiHealth");async function be(n,s,t){let e=await a(n,s,"/apps/assistant/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Assistant run failed: ${e.status} ${o}`)}return await e.json()}i(be,"runAssistantMode");async function $e(n,s,t){let e=await a(n,s,"/apps/agent/digest",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Agent digest failed: ${e.status} ${o}`)}return await e.json()}i($e,"postAgentDigest");async function ke(n,s,t){let e=await a(n,s,"/apps/tools/execute",{method:"POST",body:JSON.stringify(t)}),o=await e.text().catch(()=>""),r=null;try{r=o?JSON.parse(o):null}catch{r=o}return e.ok?{ok:!0,status:e.status,data:r}:{ok:!1,status:e.status,error:r&&typeof r=="object"&&"error"in r?String(r.error):o||e.statusText}}i(ke,"executeUserTool");async function Le(n,s,t){let e=await a(n,s,"/apps/backtests/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Backtest run failed: ${e.status} ${o}`)}return await e.json()}i(Le,"submitBacktestRun");async function ve(n,s,t){let e=t.query&&Object.keys(t.query).length>0?`?${new URLSearchParams(t.query).toString()}`:"",o=await a(n,s,`/apps/backtests/tx${e}`,{method:t.method,body:t.method==="POST"&&t.body!==void 0?JSON.stringify(t.body):void 0});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtests request failed: ${o.status} ${r}`)}return await o.json()}i(ve,"submitBacktestTx");async function Ie(n,s,t){let e=new URLSearchParams(t).toString(),o=await a(n,s,`/apps/backtests/detail?${e}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtest detail failed: ${o.status} ${r}`)}return await o.json()}i(Ie,"submitBacktestDetail");function B(n){let s=n.trim().replace(/^\/+/,"");return encodeURIComponent(s||"tool")}i(B,"normalizeToolPathSegment");function J(n){let s=n.replace(/\/$/,""),t=process.env.OPENPOND_TOOL_URL;if(t)return t.replace(/\/$/,"");try{let e=new URL(s),o=e.hostname.toLowerCase(),r=o==="apps.openpond.live"?null:o===G||o===P||o===`www.${P}`||o==="openpond.live"||o==="www.openpond.live"?"https://apps.openpond.live":null;if(r)return r;let p=o==="localhost"||o==="127.0.0.1",l=e.port||(e.protocol==="https:"?"443":"80");if(p&&l==="3000")return s}catch{}return s}i(J,"resolveWorkerBaseUrl");async function De(n,s,t){let e=J(n),o=B(t.toolName),p=`${t.deploymentId?`/${t.appId}/deployments/${t.deploymentId}`:`/${t.appId}`}/${o}`,l=new Headers(t.headers||{}),d=t.method??"POST",g=t.body===void 0||d==="GET"?void 0:JSON.stringify(t.body),m=await a(e,s,p,{method:d,body:g,headers:l}),h=await m.text().catch(()=>""),c=null;try{c=h?JSON.parse(h):null}catch{c=h}let E=c&&typeof c=="object"&&"ok"in c?!!c.ok:!0,b=m.ok&&E,$=c&&typeof c=="object"&&"status"in c&&Number(c.status)||m.status,k=c&&typeof c=="object"&&"error"in c?String(c.error):m.ok?void 0:h||m.statusText,L=c&&typeof c=="object"&&"data"in c?c.data:c;return{ok:b,status:$,data:L,error:k}}i(De,"executeHostedTool");import{createHash as H}from"node:crypto";var M=3600*1e3;function w(n){return H("sha256").update(JSON.stringify([n.apiBase.replace(/\/$/,""),n.apiKey.trim()])).digest("hex")}i(w,"buildCacheKey");async function O(n,s){let t=await S(y(),n,w(s),{allowStale:!0});return!t||Date.now()-Date.parse(t.updatedAt)>=(s.ttlMs??M)?null:t.payload}i(O,"cached");async function Be(n){return O("cloud.apps",n)}i(Be,"getCachedApps");async function Je(n){await f(y(),"cloud.apps",w(n),n.apps)}i(Je,"setCachedApps");async function He(n){return O("cloud.tools",n)}i(He,"getCachedTools");async function Me(n){await f(y(),"cloud.tools",w(n),n.tools)}i(Me,"setCachedTools");var Ye=["openpond-generic-v1","openpond-work-v1","openpond-coding-core-v1","openpond-agent-harness-v1"];export{v as a,I as b,D as c,q as d,C as e,N as f,U as g,j as h,Q as i,Y as j,Z as k,ee as l,te as m,ne as n,se as o,oe as p,re as q,ie as r,ae as s,pe as t,ce as u,ue as v,le as w,de as x,me as y,ge as z,he as A,ye as B,fe as C,Re as D,we as E,Se as F,xe as G,Te as H,Pe as I,Ae as J,Oe as K,_ as L,Ee as M,be as N,$e as O,ke as P,Le as Q,ve as R,Ie as S,J as T,De as U,M as V,Be as W,Je as X,He as Y,Me as Z,Ye as _};
|
|
2
|
+
import{a,b as u}from"./chunk-KTIBXRWQ.js";import{a as x,b as T}from"./chunk-GLUWATL5.js";import{E as S,F as f}from"./chunk-SV7ZBEK2.js";import{f as y}from"./chunk-UGOK7VTC.js";import{a as i}from"./chunk-FTQLQJQV.js";async function v(n,s,t,e,o){let r=await a(n,s,`/v4/apps/${t}/commits`,{method:"POST",body:JSON.stringify({files:e,message:o})});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Commit failed: ${r.status} ${p}`)}return await r.json()}i(v,"commitFiles");async function I(n,s,t,e){let o=e?.environment??"production",r=await a(n,s,`/v4/apps/${t}/deployments`,{method:"POST",body:JSON.stringify({environment:o,...e?.commitSha?{commitSha:e.commitSha}:{},...e?.branch?{branch:e.branch}:{}})});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Deploy failed: ${r.status} ${p}`)}return await r.json()}i(I,"deployApp");async function D(n,s,t,e){let o=await a(n,s,`/v4/apps/${encodeURIComponent(t)}/deployments/promote-preview`,{method:"POST",body:JSON.stringify(e)});return u(o,"Preview promotion")}i(D,"promotePreviewToProduction");async function q(n,s,t,e){let o=await a(n,s,`/v1/apps/${encodeURIComponent(t)}/lifecycle/start`,{method:"POST",body:JSON.stringify(e)});return u(o,"App lifecycle start")}i(q,"startAppLifecycle");async function C(n,s,t){let e=await a(n,s,`/apps/deployments/${t}/logs`,{method:"GET"});if(!e.ok){let p=await e.text().catch(()=>"");throw new Error(`Deployment logs failed: ${e.status} ${p}`)}let o=await e.json().catch(()=>({}));return(Array.isArray(o.logs)?o.logs:[]).map(p=>{let l=typeof p.createdAt=="string"?p.createdAt:p.createdAt instanceof Date?p.createdAt.toISOString():new Date().toISOString();return{id:typeof p.id=="string"?p.id:`${Math.random()}`,type:typeof p.type=="string"?p.type:void 0,message:typeof p.message=="string"?p.message:"",createdAt:l}})}i(C,"getDeploymentLogs");async function N(n,s,t){let e=await a(n,s,`/apps/deployments/${t}/status`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment status failed: ${e.status} ${r}`)}return{status:(await e.json().catch(()=>({}))).deployment?.status}}i(N,"getDeploymentStatus");async function U(n,s,t,e){let o=new URLSearchParams;e?.status&&e.status.length>0&&o.set("status",e.status.join(",")),e?.createdAfter&&o.set("createdAfter",e.createdAfter),e?.branch&&o.set("branch",e.branch);let r=o.toString(),p=await a(n,s,`/apps/${t}/deployments/latest${r?`?${r}`:""}`,{method:"GET"});if(!p.ok){let d=await p.text().catch(()=>"");throw new Error(`Latest deployment lookup failed: ${p.status} ${d}`)}let l=await p.json().catch(()=>({}));return l.deployment?{id:l.deployment.id,status:l.deployment.status}:null}i(U,"getLatestDeploymentForApp");async function j(n,s,t){let e=await a(n,s,`/apps/deployments/${t}`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Deployment fetch failed: ${e.status} ${r}`)}return(await e.json().catch(()=>({}))).deployment??null}i(j,"getDeploymentDetail");var G=new URL(T).hostname,P=new URL(x).hostname;async function Q(n,s,t){let e=new URLSearchParams;t?.handle&&e.set("handle",t.handle),typeof t?.limit=="number"&&Number.isFinite(t.limit)&&e.set("limit",String(Math.max(1,Math.floor(t.limit)))),typeof t?.offset=="number"&&Number.isFinite(t.offset)&&e.set("offset",String(Math.max(0,Math.floor(t.offset)))),typeof t?.includeScheduled=="boolean"&&e.set("includeScheduled",t.includeScheduled?"true":"false");let o=e.toString(),r=await a(n,s,`/apps/list${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let l=await r.text().catch(()=>"");throw new Error(`Apps list failed: ${r.status} ${l}`)}let p=await r.json().catch(()=>({}));return Array.isArray(p.apps)?p.apps:[]}i(Q,"listApps");async function Y(n,s,t){let e=await a(n,s,"/api/projects/local",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Create project failed: ${e.status} ${o}`)}return await e.json()}i(Y,"createLocalProject");async function Z(n,s,t){let e=await a(n,s,"/apps/repo/create",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Repo create failed: ${e.status} ${o}`)}return await e.json()}i(Z,"createRepo");async function ee(n,s,t,e){let o=await a(n,s,`/apps/${encodeURIComponent(t)}/code-visibility`,{method:"PATCH",body:JSON.stringify({codeVisibility:e})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Code visibility update failed: ${o.status} ${r}`)}return await o.json()}i(ee,"updateAppCodeVisibility");async function te(n,s,t,e){let o=await a(n,s,"/v4/apps/headless",{method:"POST",body:JSON.stringify({items:t,...e?{teamId:e}:{}})});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Headless create failed: ${o.status} ${r}`)}return await o.json()}i(te,"createHeadlessApps");async function ne(n,s,t){let e=await a(n,s,`/v4/apps/${t}/template/status`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template status failed: ${e.status} ${o}`)}return await e.json()}i(ne,"getTemplateStatus");async function se(n,s,t){let e=await a(n,s,`/v4/apps/${t}/template/branches`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Template branches failed: ${e.status} ${o}`)}return await e.json()}i(se,"listTemplateBranches");async function oe(n,s,t,e){let o=await a(n,s,`/v4/apps/${t}/template/deploy-latest`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Template deploy failed: ${o.status} ${r}`)}return await o.json()}i(oe,"deployLatestTemplate");async function re(n,s,t,e){let o=await a(n,s,`/v4/apps/${t}/environment`,{method:"POST",body:JSON.stringify(e)});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Environment update failed: ${o.status} ${r}`)}return await o.json()}i(re,"updateAppEnvironment");async function ie(n,s,t){let e=await a(n,s,`/v4/apps/${t}/environment`,{method:"GET"});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Environment get failed: ${e.status} ${o}`)}return await e.json()}i(ie,"getAppEnvironment");async function ae(n,s){let t=await a(n,s,"/api/tools/manifest",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Manifest fetch failed: ${t.status} ${e}`)}return await t.json()}i(ae,"fetchToolManifest");async function pe(n,s){let t=await a(n,s,"/apps/tools",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Tools lookup failed: ${t.status} ${e}`)}return await t.json()}i(pe,"listUserTools");async function ce(n,s,t){let e=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules`,{method:"GET"});if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`Schedules lookup failed: ${e.status} ${r}`)}let o=await e.json().catch(()=>({}));return{schedules:Array.isArray(o.schedules)?o.schedules:[]}}i(ce,"listAppSchedules");async function ue(n,s,t={}){let e=new URLSearchParams;t.domain&&e.set("domain",t.domain),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion),typeof t.limit=="number"&&e.set("limit",String(t.limit));for(let p of t.tags??[])e.append("tag",p);let o=e.toString(),r=await a(n,s,`/v1/opentool/recipes${o?`?${o}`:""}`,{method:"GET"});return u(r,"OpenTool recipe list")}i(ue,"listOpenToolRecipes");async function le(n,s,t){let e=await a(n,s,"/v1/opentool/recipes/search",{method:"POST",body:JSON.stringify(t)});return u(e,"OpenTool recipe search")}i(le,"searchOpenToolRecipes");async function de(n,s,t){let e=new URLSearchParams;typeof t.includeExamples=="boolean"&&e.set("includeExamples",String(t.includeExamples)),typeof t.includeTests=="boolean"&&e.set("includeTests",String(t.includeTests)),t.opentoolVersion&&e.set("opentoolVersion",t.opentoolVersion);let o=e.toString(),r=await a(n,s,`/v1/opentool/recipes/${encodeURIComponent(t.id)}${o?`?${o}`:""}`,{method:"GET"});return u(r,"OpenTool recipe get")}i(de,"getOpenToolRecipe");async function me(n,s,t){let e=await a(n,s,"/v1/opentool/rules",{method:"POST",body:JSON.stringify(t)});return u(e,"OpenTool rules get")}i(me,"getOpenToolRules");function R(n){let s=new URLSearchParams;typeof n=="number"&&Number.isFinite(n)&&s.set("limit",String(Math.max(1,Math.floor(n))));let t=s.toString();return t?`?${t}`:""}i(R,"buildLimitQuery");function A(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return[];let s=n;return Array.isArray(s.logs)?s.logs:Array.isArray(s.runs)?s.runs:Array.isArray(s.scheduleRuns)?s.scheduleRuns:Array.isArray(s.items)?s.items:[]}i(A,"normalizeScheduleExecutionLogs");async function ge(n,s,t,e){let o={...e?.preferredScheduleId?{preferredScheduleId:e.preferredScheduleId}:{},...e?.scheduleId?{scheduleId:e.scheduleId}:{},...e?.startAt?{startAt:e.startAt}:{},...e&&"endAt"in e?{endAt:e.endAt??null}:{}},r=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/start`,{method:"POST",body:JSON.stringify(o)});return u(r,"Schedule start")}i(ge,"startAppSchedules");async function he(n,s,t){let e=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/stop`,{method:"POST",body:JSON.stringify({})});return u(e,"Schedule stop")}i(he,"stopAppSchedules");async function ye(n,s){let t=await a(n,s,"/apps/schedules/current/stop",{method:"POST",body:JSON.stringify({})});return u(t,"Current schedule stop")}i(ye,"stopCurrentAppSchedules");async function fe(n,s,t){let e=await a(n,s,"/v1/schedules/run",{method:"POST",body:JSON.stringify({scheduleId:t.scheduleId})});return u(e,"Schedule run")}i(fe,"runScheduleNow");async function Re(n,s,t,e){let o=await a(n,s,`/apps/${encodeURIComponent(t)}/schedules/${encodeURIComponent(e)}`,{method:"DELETE"});return u(o,"Schedule delete")}i(Re,"deleteOrArchiveSchedule");async function we(n,s,t,e){let o=await a(n,s,`/v1/schedules/${encodeURIComponent(t)}/execution-logs${R(e?.limit)}`,{method:"GET"}),r=await u(o,"Schedule execution logs");return{logs:A(r)}}i(we,"listScheduleExecutionLogs");async function Se(n,s,t,e){let o=await a(n,s,`/v1/deployments/${encodeURIComponent(t)}/schedule-execution-logs${R(e?.limit)}`,{method:"GET"}),r=await u(o,"Deployment schedule execution logs");return{logs:A(r)}}i(Se,"listDeploymentScheduleExecutionLogs");async function xe(n,s,t){let e=await a(n,s,`/v1/schedule-execution-logs/${encodeURIComponent(t)}`,{method:"GET"});return u(e,"Schedule execution log")}i(xe,"getScheduleExecutionLog");async function Te(n,s,t,e){let o=await a(n,s,`/v1/apps/${encodeURIComponent(t)}/execution-timeline${R(e?.limit)}`,{method:"GET"});return u(o,"App execution timeline")}i(Te,"getAppExecutionTimeline");async function Pe(n,s,t){return a(n,s,"/apps/agent/create",{method:"POST",body:JSON.stringify(t)})}i(Pe,"createAgentFromPrompt");async function Ae(n,s,t){let e=new URLSearchParams;t?.appId&&e.set("appId",t.appId);let o=e.toString(),r=await a(n,s,`/apps/performance${o?`?${o}`:""}`,{method:"GET"});if(!r.ok){let p=await r.text().catch(()=>"");throw new Error(`Performance lookup failed: ${r.status} ${p}`)}return await r.json()}i(Ae,"getUserPerformance");async function Oe(n,s,t){let e=new URLSearchParams({appId:t}),o=await a(n,s,`/apps/summary?${e.toString()}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Summary lookup failed: ${o.status} ${r}`)}return await o.json()}i(Oe,"getAppRuntimeSummary");async function _(n,s){let t=await a(n,s,"/v1/account",{method:"GET"});if(!t.ok){let e=await t.text().catch(()=>"");throw new Error(`Account lookup failed: ${t.status} ${e}`)}return await t.json()}i(_,"getOpenPondAccount");async function Ee(n,s){let t=new Date().toISOString(),e=Date.now(),o=n.replace(/\/$/,"");try{let r=await a(o,null,"/health",{method:"GET",headers:{Accept:"application/json"}}),p=Date.now()-e,l=await r.json().catch(()=>({})),d=null,g=null;if(s?.trim())try{let m=await _(o,s);d=!0,g=m.account}catch{d=!1}return{reachable:r.ok,authenticated:d,apiBase:o,latencyMs:p,status:r.status,service:typeof l.service=="string"?l.service:null,checkedAt:t,account:g,...r.ok?{}:{error:r.statusText||`HTTP ${r.status}`}}}catch(r){return{reachable:!1,authenticated:s?.trim()?!1:null,apiBase:o,latencyMs:Date.now()-e,status:null,service:null,checkedAt:t,error:r instanceof Error?r.message:String(r)}}}i(Ee,"checkOpenPondApiHealth");async function be(n,s,t){let e=await a(n,s,"/apps/assistant/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Assistant run failed: ${e.status} ${o}`)}return await e.json()}i(be,"runAssistantMode");async function $e(n,s,t){let e=await a(n,s,"/apps/agent/digest",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Agent digest failed: ${e.status} ${o}`)}return await e.json()}i($e,"postAgentDigest");async function ke(n,s,t){let e=await a(n,s,"/apps/tools/execute",{method:"POST",body:JSON.stringify(t)}),o=await e.text().catch(()=>""),r=null;try{r=o?JSON.parse(o):null}catch{r=o}return e.ok?{ok:!0,status:e.status,data:r}:{ok:!1,status:e.status,error:r&&typeof r=="object"&&"error"in r?String(r.error):o||e.statusText}}i(ke,"executeUserTool");async function Le(n,s,t){let e=await a(n,s,"/apps/backtests/run",{method:"POST",body:JSON.stringify(t)});if(!e.ok){let o=await e.text().catch(()=>"");throw new Error(`Backtest run failed: ${e.status} ${o}`)}return await e.json()}i(Le,"submitBacktestRun");async function ve(n,s,t){let e=t.query&&Object.keys(t.query).length>0?`?${new URLSearchParams(t.query).toString()}`:"",o=await a(n,s,`/apps/backtests/tx${e}`,{method:t.method,body:t.method==="POST"&&t.body!==void 0?JSON.stringify(t.body):void 0});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtests request failed: ${o.status} ${r}`)}return await o.json()}i(ve,"submitBacktestTx");async function Ie(n,s,t){let e=new URLSearchParams(t).toString(),o=await a(n,s,`/apps/backtests/detail?${e}`,{method:"GET"});if(!o.ok){let r=await o.text().catch(()=>"");throw new Error(`Backtest detail failed: ${o.status} ${r}`)}return await o.json()}i(Ie,"submitBacktestDetail");function B(n){let s=n.trim().replace(/^\/+/,"");return encodeURIComponent(s||"tool")}i(B,"normalizeToolPathSegment");function J(n){let s=n.replace(/\/$/,""),t=process.env.OPENPOND_TOOL_URL;if(t)return t.replace(/\/$/,"");try{let e=new URL(s),o=e.hostname.toLowerCase(),r=o==="apps.openpond.live"?null:o===G||o===P||o===`www.${P}`||o==="openpond.live"||o==="www.openpond.live"?"https://apps.openpond.live":null;if(r)return r;let p=o==="localhost"||o==="127.0.0.1",l=e.port||(e.protocol==="https:"?"443":"80");if(p&&l==="3000")return s}catch{}return s}i(J,"resolveWorkerBaseUrl");async function De(n,s,t){let e=J(n),o=B(t.toolName),p=`${t.deploymentId?`/${t.appId}/deployments/${t.deploymentId}`:`/${t.appId}`}/${o}`,l=new Headers(t.headers||{}),d=t.method??"POST",g=t.body===void 0||d==="GET"?void 0:JSON.stringify(t.body),m=await a(e,s,p,{method:d,body:g,headers:l}),h=await m.text().catch(()=>""),c=null;try{c=h?JSON.parse(h):null}catch{c=h}let E=c&&typeof c=="object"&&"ok"in c?!!c.ok:!0,b=m.ok&&E,$=c&&typeof c=="object"&&"status"in c&&Number(c.status)||m.status,k=c&&typeof c=="object"&&"error"in c?String(c.error):m.ok?void 0:h||m.statusText,L=c&&typeof c=="object"&&"data"in c?c.data:c;return{ok:b,status:$,data:L,error:k}}i(De,"executeHostedTool");import{createHash as H}from"node:crypto";var M=3600*1e3;function w(n){return H("sha256").update(JSON.stringify([n.apiBase.replace(/\/$/,""),n.apiKey.trim()])).digest("hex")}i(w,"buildCacheKey");async function O(n,s){let t=await S(y(),n,w(s),{allowStale:!0});return!t||Date.now()-Date.parse(t.updatedAt)>=(s.ttlMs??M)?null:t.payload}i(O,"cached");async function Be(n){return O("cloud.apps",n)}i(Be,"getCachedApps");async function Je(n){await f(y(),"cloud.apps",w(n),n.apps)}i(Je,"setCachedApps");async function He(n){return O("cloud.tools",n)}i(He,"getCachedTools");async function Me(n){await f(y(),"cloud.tools",w(n),n.tools)}i(Me,"setCachedTools");var Ye=["openpond-generic-v1","openpond-work-v1","openpond-coding-core-v1","openpond-agent-harness-v1"];export{v as a,I as b,D as c,q as d,C as e,N as f,U as g,j as h,Q as i,Y as j,Z as k,ee as l,te as m,ne as n,se as o,oe as p,re as q,ie as r,ae as s,pe as t,ce as u,ue as v,le as w,de as x,me as y,ge as z,he as A,ye as B,fe as C,Re as D,we as E,Se as F,xe as G,Te as H,Pe as I,Ae as J,Oe as K,_ as L,Ee as M,be as N,$e as O,ke as P,Le as Q,ve as R,Ie as S,J as T,De as U,M as V,Be as W,Je as X,He as Y,Me as Z,Ye as _};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{c as _}from"./chunk-
|
|
2
|
+
import{c as _}from"./chunk-RFQD6B44.js";import{V as y,W as C,X as N,Y as D,Z as k,_ as K,e as L,f as U,i as M,t as $}from"./chunk-JEMECEQH.js";import{b as O}from"./chunk-27JGS3KB.js";import{d as I}from"./chunk-RPM4FDRX.js";import{e as B,f as T,g as A}from"./chunk-BSHAIAXY.js";import{f as w}from"./chunk-3M53YXEI.js";import{b as v}from"./chunk-GLUWATL5.js";import{a as o}from"./chunk-FTQLQJQV.js";function ce(e){if(e.repoUrl)return e.repoUrl;if(e.gitHost&&e.gitOwner&&e.gitRepo)return`https://${e.gitHost}/${e.gitOwner}/${e.gitRepo}.git`;throw new Error("repoUrl missing from API response")}o(ce,"resolveRepoUrl");function le(e,t){let n=new URL(e),r=encodeURIComponent(t);return`${n.protocol}//x-access-token:${r}@${n.host}${n.pathname}`}o(le,"formatTokenizedRepoUrl");function fe(e){let t=new URL(e);return`${t.protocol}//x-access-token:$OPENPOND_API_KEY@${t.host}${t.pathname}`}o(fe,"formatTokenizedRepoUrlForPrint");function me(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@")}o(me,"redactToken");function pe(e){let t=process.env.OPENPOND_BASE_URL;if(t)try{let n=new URL(t).hostname,r=new URL(e).hostname;n&&r&&n!==r&&(console.warn(`warning: repo host (${r}) does not match OPENPOND_BASE_URL (${n})`),console.warn("warning: verify your git host configuration matches OPENPOND_BASE_URL."))}catch{}}o(pe,"warnOnRepoHostMismatch");function W(e){let t=e.split("/").filter(Boolean);if(t.length!==2)throw new Error("expected <handle>/<repo>");return{handle:t[0],repo:t[1]}}o(W,"parseHandleRepo");function S(e){return(e||"").trim().toLowerCase()}o(S,"normalizeRepoName");async function ee(e){if(!e.forceRefresh){let n=await C({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(n)return n}let t=await M(e.apiBase,e.apiKey);return await N({apiBase:e.apiBase,apiKey:e.apiKey,apps:t}),t}o(ee,"fetchAppsWithCache");async function Re(e){if(!e.forceRefresh){let r=await D({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(r)return r}let t=await $(e.apiBase,e.apiKey),n=Array.isArray(t.tools)?t.tools:[];return await k({apiBase:e.apiBase,apiKey:e.apiKey,tools:n}),n}o(Re,"fetchToolsWithCache");async function Pe(e,t,n){let{handle:r,repo:s}=W(n),i=await ee({apiBase:e,apiKey:t}),a=S(s),d=i.find(u=>u.handle&&u.handle!==r?!1:[u.repo,u.gitRepo,u.id].map(S).includes(a));if(!d)throw new Error(`app not found for ${r}/${s}`);return{app:d,handle:r,repo:s}}o(Pe,"resolveAppTarget");async function Ee(e){let t=e.intervalMs??5e3,n=e.timeoutMs??240*1e3,r=new Set,s=Date.now();for(;Date.now()-s<n;){let a=(await L(e.baseUrl,e.apiKey,e.deploymentId)).filter(u=>!r.has(u.id));for(let u of a)r.add(u.id);for(let u of a)console.log(`${e.prefix}${u.message}`);let d=await U(e.baseUrl,e.apiKey,e.deploymentId);if(d.status==="failed"){console.log(`${e.prefix}deployment failed`);return}if(d.status==="running"||d.status==="deployed"){console.log(`${e.prefix}deployment complete`);return}await new Promise(u=>setTimeout(u,t))}console.log(`${e.prefix}deployment still in progress`)}o(Ee,"pollDeploymentLogs");import{stdin as q,stdout as H}from"node:process";import{createInterface as F}from"node:readline/promises";async function z(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(String(t)));return Buffer.concat(e).toString("utf8").replace(/\r?\n$/,"")}o(z,"readAllStdin");function V(e){return new Promise((t,n)=>{let r=process.stdin,s=process.stderr,i="",a=r.isRaw;function d(){r.off("data",u),r.setRawMode&&r.setRawMode(a),r.pause(),s.write(`
|
|
3
3
|
`)}o(d,"cleanup");function u(m){let f=Buffer.isBuffer(m)?m:Buffer.from(m);for(let c of f){if(c===3){d(),n(new Error("secret prompt cancelled"));return}if(c===13||c===10){d(),t(i);return}if(c===127||c===8){i.length>0&&(i=i.slice(0,-1),s.write("\b \b"));continue}i+=Buffer.from([c]).toString("utf8"),s.write("*")}}o(u,"onData"),s.write(e),r.resume(),r.setRawMode&&r.setRawMode(!0),r.on("data",u)})}o(V,"readMaskedLine");async function Ae(e,t=!1){let n=F({input:q,output:H});try{let r=t?"[Y/n]":"[y/N]",s=(await n.question(`${e} ${r} `)).trim().toLowerCase();return s?s==="y"||s==="yes":t}finally{n.close()}}o(Ae,"promptConfirm");async function Ie(e){let t=F({input:q,output:H});try{return(await t.question(`Local path (default: ${e}): `)).trim()||e}finally{t.close()}}o(Ie,"promptForPath");var X=["readonly","attempt","feature","rollout","replay","template_build","scheduled_run","patch_only","hotfix","multi_feature_batch"],j=["none","manual","auto_after_checks"],G=[...K];function te(e,t){return(process.env.OPENPOND_SANDBOX_BASE_URL||process.env.OPENPOND_API_URL||e.apiBaseUrl||A(process.env.OPENPOND_BASE_URL||e.baseUrl)||v).replace(/\/$/,"")}o(te,"resolveSandboxBaseUrl");async function We(e){let t=await ne(e),n=T(t),r=await _(t,n),s=B(e)||process.env.OPENPOND_SANDBOX_API_URL?.trim()||null,i=te(t,e);return O(s?{apiKey:r,sandboxApiUrl:s}:{apiKey:r,baseUrl:i})}o(We,"resolveSandboxClient");async function ne(e){return I()}o(ne,"loadSandboxConfig");function qe(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("workflow-mode must be a non-empty value");let t=e.trim();if(!X.includes(t))throw new Error(`workflow-mode must be one of ${X.join(", ")}`);return t}o(qe,"parseSandboxWorkflowModeOption");function He(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("runtime-promotion-policy must be a non-empty value");let t=e.trim();if(!j.includes(t))throw new Error(`runtime-promotion-policy must be one of ${j.join(", ")}`);return t}o(He,"parseSandboxRuntimePromotionPolicyOption");function Fe(e){if(typeof e!="string"||!e.trim())return;let t=e.trim();if(!G.includes(t))throw new Error(`runtime-profile-id must be one of ${G.join(", ")}`);return t}o(Fe,"parseSandboxRuntimeProfileIdOption");function re(e){let t=Y(e.envRef,"env-ref").map(({name:i,value:a})=>({name:i,secretRef:a})),n=Y(e.envLiteral,"env-literal").map(({name:i,value:a})=>{if(oe(i)&&!w(e.allowPlainSecretEnv))throw new Error(`refusing plaintext value for secret-like env ${i}; create a sandbox secret and pass --env-ref ${i}=openpond://secret/...`);return{name:i,value:a}}),r=[...t,...n],s=new Set;for(let i of r){if(s.has(i.name))throw new Error(`duplicate sandbox env var: ${i.name}`);s.add(i.name)}return r}o(re,"parseSandboxEnvOptions");function ze(e,t){let n=re(t),r=new Set(n.map(a=>a.name)),s=new Map(n.map(a=>[a.name,a]));for(let a of e.inputs.env)if(s.get(a.name)?.value!==void 0&&a.secret!==!1)throw new Error(`sandbox template env ${a.name} requires a secret ref. Pass --env-ref ${a.name}=openpond://secret/...`);let i=e.inputs.env.filter(a=>a.required&&!r.has(a.name)).map(a=>a.name);if(i.length>0)throw new Error(`missing required sandbox template env refs: ${i.join(", ")}. Pass --env-ref NAME=openpond://secret/...`);return n}o(ze,"parseSandboxTemplateEnvOptions");function Y(e,t){return typeof e!="string"?[]:e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>{let r=n.indexOf("=");if(r<=0)throw new Error(`${t} entries must use NAME=value`);let s=n.slice(0,r).trim(),i=n.slice(r+1).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(s))throw new Error(`${t} has invalid env name: ${s}`);if(!i)throw new Error(`${t} value is required for ${s}`);return{name:s,value:i}})}o(Y,"parseSandboxEnvAssignments");function oe(e){return/(?:SECRET|TOKEN|KEY|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|DATABASE_URL|DSN)/i.test(e)}o(oe,"isSecretLikeEnvName");async function Ve(e,t){if(typeof e.value=="string"||typeof e.secretValue=="string")throw new Error("sandbox secret values must be provided with --stdin or the masked prompt");if(w(e.stdin)){let s=await z();if(!s)throw new Error(`${t} read no secret value from stdin`);return s}if(!process.stdin.isTTY)throw new Error(`${t} requires --stdin when not running in a TTY`);let r=await V(`${t}: `);if(!r)throw new Error(`${t} cannot be empty`);return r}o(Ve,"readSandboxSecretValue");function Xe(e){return{id:e.id,teamId:e.teamId,name:e.name,scope:e.scope,status:e.status,secretRef:e.secretRef,currentVersion:e.currentVersion,updatedAt:e.updatedAt,lastUsedAt:e.lastUsedAt,attachedDestinations:e.attachments?.length??0}}o(Xe,"summarizeSandboxSecret");import{Buffer as b}from"node:buffer";import{spawn as Q}from"node:child_process";var ie=600*1e3,se=2*1024*1024;function R(e,t=[],n={}){return n.inherit&&n.terminateWhenStdoutIncludes!==void 0?Promise.reject(new Error("terminateWhenStdoutIncludes requires captured stdout")):n.terminateWhenStdoutIncludes===""?Promise.reject(new Error("terminateWhenStdoutIncludes must not be empty")):new Promise((r,s)=>{let i=Q(e,t,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:void 0,shell:n.shell,detached:n.detached??process.platform!=="win32",stdio:n.inherit?"inherit":[n.stdin===void 0?"ignore":"pipe","pipe","pipe"]}),a=new h(J(n)),d=new h(J(n)),u=!1,m=n.timeoutMs??ie,f,c,x=null,g=!1,P=o(()=>{f&&clearTimeout(f),c&&clearTimeout(c)},"clearTimers"),E=o(l=>{x!==null||g||(x=l,u=l==="timeout",f&&(clearTimeout(f),f=void 0),Z(i.pid,"SIGTERM"),c=setTimeout(()=>{i.exitCode===null&&i.signalCode===null&&Z(i.pid,"SIGKILL")},5e3))},"requestTermination");m>0&&(f=setTimeout(()=>{E("timeout")},m)),n.inherit||(i.stdout?.on("data",l=>{a.append(l);let p=n.terminateWhenStdoutIncludes;p!==void 0&&a.text().includes(p)&&E("output")}),i.stderr?.on("data",l=>{d.append(l)})),i.on("error",l=>{P(),g=!0,s(l)}),i.on("close",(l,p)=>{g||(g=!0,P(),r({code:l,signal:p,terminationReason:x??(p?"signal":"exit"),stdout:a.text(),stderr:d.text(),timedOut:u,stdoutTruncated:a.truncated,stderrTruncated:d.truncated}))}),n.stdin!==void 0&&i.stdin?.end(n.stdin)})}o(R,"runProcessCommand");var h=class{static{o(this,"BoundedOutput")}#t=[];#n;#e=0;truncated=!1;constructor(t){this.#n=t}append(t){let n=b.isBuffer(t)?t:b.from(t),r=this.#n-this.#e;if(r<=0){n.byteLength>0&&(this.truncated=!0);return}if(n.byteLength<=r){this.#t.push(n),this.#e+=n.byteLength;return}this.#t.push(n.subarray(0,r)),this.#e+=r,this.truncated=!0}text(){let t=b.concat(this.#t,this.#e).toString("utf8");return this.truncated?`${t}
|
|
4
4
|
[truncated after ${this.#n} bytes]
|
|
5
5
|
`:t}};function J(e){let t=e.maxOutputBytes??se;return Math.max(0,Math.floor(t))}o(J,"maxOutputBytes");function Z(e,t){if(e){if(process.platform==="win32"){let n=["/PID",String(e),"/T"];t==="SIGKILL"&&n.push("/F"),Q("taskkill",n,{stdio:"ignore",windowsHide:!0}).unref();return}try{process.kill(-e,t)}catch(n){if(n.code!=="ESRCH")throw n}}}o(Z,"terminateProcessTree");async function ae(e,t,n={}){return R(e,t,{cwd:n.cwd,inherit:n.inherit,timeoutMs:n.timeoutMs,maxOutputBytes:n.maxOutputBytes,terminateWhenStdoutIncludes:n.terminateWhenStdoutIncludes})}o(ae,"runCommand");async function rt(e,t={}){let n=t.timeoutSeconds===void 0?void 0:t.timeoutSeconds*1e3;return R(e,[],{cwd:t.cwd,env:t.env,shell:!0,inherit:t.inherit,timeoutMs:n,maxOutputBytes:t.maxOutputBytes})}o(rt,"runShellCommand");async function ot(e,t){let n=await ae("git",["remote","get-url",t],{cwd:e});if(n.code!==0)return null;let r=n.stdout.trim();return r.length>0?r:null}o(ot,"getGitRemoteUrl");export{ce as a,le as b,fe as c,me as d,pe as e,S as f,ee as g,Re as h,Pe as i,Ee as j,Ae as k,Ie as l,We as m,qe as n,He as o,Fe as p,re as q,ze as r,Ve as s,Xe as t,R as u,ae as v,rt as w,ot as x};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{ja as h}from"./chunk-
|
|
2
|
+
import{ja as h}from"./chunk-HG2YFMVU.js";import{m as f}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as m}from"./chunk-FTQLQJQV.js";var g=e.object({schemaVersion:e.literal("openpond.profileWorkCompletion.v1"),sessionId:e.string().min(1),turnId:e.string().min(1),responsePath:e.string().min(1),responseSha256:e.string().regex(/^[a-f0-9]{64}$/),responseBytes:e.number().int().min(1).max(1048576),responseChunks:e.array(e.string().max(65536)).min(1).max(32),outputs:e.array(e.object({id:e.string(),revision:e.number().int(),sha256:e.string(),sizeBytes:e.number().int(),contentType:e.string(),sourceTaskId:e.string(),sourceTurnId:e.string(),title:e.string()}).strict()).min(1).max(100)}).strict();function W(s){let u=new TextDecoder("utf-8",{fatal:!0}).decode(s.response),i=[];for(let r=0;r<u.length;r+=65536)i.push(u.slice(r,r+65536));return g.parse({schemaVersion:"openpond.profileWorkCompletion.v1",sessionId:s.sessionId,turnId:s.turnId,responsePath:s.responsePath,responseSha256:f(s.response),responseBytes:s.response.length,responseChunks:i,outputs:s.outputs.map(({id:r,revision:t,sha256:a,sizeBytes:p,contentType:c,sourceTaskId:o,sourceTurnId:d,title:n})=>({id:r,revision:t,sha256:a,sizeBytes:p,contentType:c,sourceTaskId:o,sourceTurnId:d,title:n}))})}m(W,"createProfileWorkCompletion");function _(s){let u=s.filter(o=>o.name==="tool.completed"&&o.action==="work_finish"&&o.status==="completed");if(!u.length)return null;if(u.length!==1)throw new Error("The case has multiple Work completion receipts.");let i=u[0],r=i.data,t=g.parse(r?.result);if(t.sessionId!==i.sessionId||t.turnId!==i.turnId)throw new Error("Work completion belongs to another case or turn.");let a=t.responseChunks.join(""),p=Buffer.from(a,"utf8");if(p.length!==t.responseBytes||f(p)!==t.responseSha256)throw new Error("Work completion response differs from its sealed content.");if(new Set(t.outputs.map(o=>`${o.id}/${o.revision}`)).size!==t.outputs.length)throw new Error("Work completion repeats a saved output.");let c=s.slice(0,s.indexOf(i));for(let o of t.outputs){if(o.sourceTaskId!==t.sessionId||o.sourceTurnId!==t.turnId)throw new Error("Work completion output belongs to another case or turn.");if(c.filter(n=>n.name==="workspace_action_result"&&n.action==="work_output_save"&&n.status==="completed"&&n.sessionId===t.sessionId&&n.turnId===t.turnId).flatMap(n=>{let l=h.safeParse(n.data?.outputRef);return l.success&&Object.entries(o).every(([k,I])=>l.data[k]===I)?[l.data]:[]}).length!==1)throw new Error("Work completion lacks an exact prior saved-output receipt.")}return a}m(_,"completedProfileWorkResponse");export{W as a,_ as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b}from"./chunk-
|
|
2
|
+
import{b}from"./chunk-PAYFJHPO.js";import{A as d,H as u,I as p,pa as h,qa as S,va as g}from"./chunk-BU6MW65V.js";import{Za as c}from"./chunk-ZY32SZ2P.js";import{M as l}from"./chunk-2MEOUS24.js";import{f as i}from"./chunk-HNQPEOJD.js";import{h as m}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as s}from"./chunk-FTQLQJQV.js";var a=e.string().trim().min(1).max(240),t=e.string().trim().min(1),r=e.string().trim().min(8).max(256),f=e.record(e.string(),e.unknown()).default({}),n=a.nullable(),k=e.enum(["slash_train","session_menu","bulk_selection","training_page","task_candidate"]),T=e.enum(["defaults","customize"]),v=e.enum(["automated","manual"]),Ge=e.object({schemaVersion:e.literal("openpond.trainingSourceEstimate.v1"),sessionId:a,messageCount:e.number().int().nonnegative(),estimatedTokens:e.number().int().nonnegative(),textBytes:e.number().int().nonnegative()}),Pe=e.object({query:e.string().max(500).default(""),offset:e.number().int().nonnegative().default(0),limit:e.number().int().min(1).max(100).default(20),candidates:e.array(e.object({sessionId:a,title:e.string().trim().min(1).max(500),updatedAt:t})).max(500).default([])}),R=e.object({sessionId:a,title:e.string().trim().min(1).max(500),updatedAt:t,snippet:e.string().max(2e3).nullable()}),Ve=e.object({schemaVersion:e.literal("openpond.trainingChatSearchResult.v1"),query:e.string(),offset:e.number().int().nonnegative(),limit:e.number().int().positive(),total:e.number().int().nonnegative(),hasMore:e.boolean(),indexedChats:e.number().int().nonnegative(),totalChats:e.number().int().nonnegative(),indexing:e.boolean(),entries:e.array(R)}),y=e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]),I=e.object({graderId:a.nullable(),path:e.string().trim().min(1).max(1e3),language:e.enum(["javascript","typescript","python","json","text"]),content:e.string().max(2e6),sha256:r,declaredSha256:r.nullable(),integrity:e.enum(["verified","unverified","mismatch"])}),C=e.object({protocolVersion:e.string().trim().min(1).max(200),module:e.string().trim().min(1).max(1e3),moduleSha256:r,command:e.array(e.string().max(2e3)).max(100),cwd:e.string().trim().min(1).max(4e3),maxTurns:e.number().int().positive().max(100)}),Be=e.object({schemaVersion:e.literal("openpond.tasksetGraderDetails.v1"),taskset:m,sourceTasksetId:a,graders:e.array(u).max(1e3),runtime:C.nullable(),sources:e.array(I).max(1e3),unavailableReason:e.string().max(2e3).nullable()}),Oe=e.object({schemaVersion:e.literal("openpond.taskAttempt.v1"),id:a,tasksetId:a,taskId:a,split:d,attempt:e.number().int().nonnegative(),seed:e.number().int(),modelRef:i.nullable(),startedAt:t,completedAt:t,output:e.record(e.string(),e.unknown()),runtimeEventRefs:e.array(a).max(1e4).default([]),artifactRefs:e.array(a).max(1e4).default([]),privilegedOutcomeRef:n,infrastructureError:e.string().trim().min(1).max(1e4).nullable(),costUsd:e.number().nonnegative().nullable(),latencyMs:e.number().int().nonnegative(),userInterventions:e.number().int().nonnegative().default(0),metadata:f}),Ne=e.object({schemaVersion:e.literal("openpond.taskAttemptArtifact.v1"),id:a,tasksetId:a,taskId:a,attemptId:a,kind:e.enum(["raw_model_response","runtime_trace","environment_state","grader_evidence","output_artifact"]),path:e.string().trim().min(1).max(4e3),mediaType:e.string().trim().min(1).max(200).nullable().optional(),sha256:r,sizeBytes:e.number().int().nonnegative(),createdAt:t,metadata:f}),A=e.object({graderId:a,graderVersion:e.string().trim().min(1).max(100),score:e.number().min(0).max(1).nullable(),passed:e.boolean(),hardGate:e.boolean(),rewardEligible:e.boolean(),feedback:e.string().trim().max(2e4).nullable(),evidenceRefs:e.array(a).max(1e4).default([]),judge:i.nullable().optional().default(null),calibrationStatus:e.enum(["not_applicable","pending","passed","failed"])}),qe=e.object({schemaVersion:e.literal("openpond.gradeResult.v1"),id:a,attemptId:a,graderSetHash:r,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),components:e.array(A).min(1).max(1e3),failureClass:y.nullable(),feedback:e.array(e.string().trim().min(1).max(2e4)).max(1e3).default([]),rewardEligible:e.boolean(),rewardComposition:c.optional(),createdAt:t}),ze=e.enum(["stable_hash_top_n","rft_easy_curriculum_v1"]),He=e.object({schemaVersion:e.literal("openpond.graderAuditReport.v1"),id:a,tasksetId:a,tasksetHash:r,fixtureRefs:e.array(a).min(1).max(1e5),gradeRefs:e.array(a).min(1).max(1e5),passed:e.boolean(),hackingChecksPassed:e.boolean(),leakageChecksPassed:e.boolean(),infrastructureSafetyPassed:e.boolean(),failures:e.array(e.object({fixtureId:a,label:p,gradeId:a,reason:e.string().trim().min(1).max(5e3)})).max(1e5),createdAt:t}),Fe=48e3,j=5;function Le(x,_="New model"){let o=x?.trim().split(/\s+/).filter(Boolean)??[];return o.length===0?_:o.slice(0,j).join(" ")}s(Le,"conciseWorkproductName");var M=e.object({schemaVersion:e.literal("openpond.baseModelPreference.v1"),modelId:a,revision:e.string().trim().min(1).max(256).nullable(),tokenizerRevision:e.string().trim().min(1).max(256).nullable(),chatTemplateHash:e.string().trim().min(8).max(256).nullable(),modelAssetId:n,source:e.enum(["managed","local","builtin"])}),D=e.object({schemaVersion:e.literal("openpond.taskCreationRequest.v1"),id:a,profileId:a,surface:k,mode:T,entryMode:v.default("manual"),resourceIntent:e.enum(["workproduct","dataset"]).default("workproduct"),buildIntent:h.default("demonstrations"),buildSpecification:S.nullable().default(null),objective:e.string().trim().min(1).max(2e4).nullable(),methodHint:e.enum(["sft","dpo","grpo","ppo"]).nullable().default(null),preferredBaseModelId:a.nullable().default(null),preferredBaseModel:M.nullable().default(null),sourceIds:e.array(a).max(1e5),candidateId:n,analysisModel:i.nullable(),analysisReasoningEffort:l.nullable().default(null),createImproveRunId:n.default(null),targetIntent:e.object({kind:e.enum(["agent","skill","extension","model","configuration"]).nullable(),id:n,displayName:e.string().trim().min(1).max(500).nullable(),operation:e.enum(["create","improve"])}).default({kind:"model",id:null,displayName:null,operation:"create"}),disclosure:e.object({status:e.enum(["not_required","pending","approved","declined"]),content:e.literal("raw_excerpts"),sourceIds:e.array(a).max(1e5),providerModel:i.nullable(),approvalId:n,approvedAt:t.nullable()}).default({status:"not_required",content:"raw_excerpts",sourceIds:[],providerModel:null,approvalId:null,approvedAt:null}),createdAt:t}),w=e.object({schemaVersion:e.literal("openpond.taskCreationSnapshot.v1"),id:a,request:D,state:e.enum(["planning","awaiting_disclosure_approval","awaiting_questions","recommendation_ready","awaiting_materialization_approval","materializing","validating","ready","blocked","failed","cancelled"]),proposal:b.nullable(),materializedTasksetId:n,disclosureApprovalId:n,materializationApprovalId:n,blockingQuestions:e.array(e.object({id:a,kind:e.enum(["objective","consent","success_signal","privacy_licensing","interpretation"]),prompt:e.string().trim().min(1).max(5e3),answer:e.string().trim().min(1).max(2e4).nullable()})).default([]),transcript:e.array(e.object({id:a,role:e.enum(["user","assistant","system","tool"]),text:e.string().max(1e5),createdAt:t})).max(1e4).default([]),repairHistory:e.array(g).max(1e3).default([]),blockedReason:e.string().trim().min(1).max(1e4).nullable(),createdAt:t,updatedAt:t}),Ke=e.object({schemaVersion:e.literal("openpond.taskCreationTranscript.v1"),creationId:a,profileId:a,messages:w.shape.transcript,updatedAt:t});export{Ge as a,Pe as b,Ve as c,y as d,Be as e,Oe as f,Ne as g,qe as h,He as i,Fe as j,Le as k,M as l,D as m,w as n,Ke as o};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{j as Q,m as We,n as Ke,r as Xe,s as Ye,x as ke,z as Qe}from"./chunk-YI6ME6PU.js";import{c as Ue,d as De,e as Ze,f as et,g as tt}from"./chunk-DRLP7GIU.js";import{Ca as Ee,Ia as Ie,Ka as Je,L as He,Ma as ge,N as Le,S as Ve,U as Fe,V as he,_ as ze,a as $e,aa as J,ba as W,c as Oe,ca as ve,d as N,da as Ge,e as pe,ea as Ne,ia as X,ja as C,ka as Y,oa as Z,wa as K,x as fe,y as xe,z as le}from"./chunk-BU6MW65V.js";import{h as me,l as G,m}from"./chunk-HIQPGYVH.js";import{d as je}from"./chunk-I6VMRQF4.js";import{ha as Ae,ja as Ce}from"./chunk-D6L6UNUQ.js";import{L as w,M as $,N as P,O as oe,Q as ce,S as de,da as L,k as U,o as F,pb as ye,qb as _e,rb as ue,t as ne,w as ie,z as re}from"./chunk-4PUOWSDE.js";import{$a as qe,Aa as x,_a as Be,ab as se,bb as ae,ga as te,x as Me}from"./chunk-ZY32SZ2P.js";import{A as j}from"./chunk-X2J2P5ZT.js";import{a as S}from"./chunk-FTQLQJQV.js";function ot(s){let e=C(s.source),t=C(s.edited),a=s.preparation;if(a.authoringGraph!=="bound"||!e.modelResources||e.learningResources||t.modelResources||t.learningResources)throw new Error("Bound task editing requires its source Reward and an ordinary edited workspace.");if(e.contentHash!==a.sourcePackageHash||!$(w(e.taskset),a.sourceTasksetRef))throw new Error("Bound draft differs from its retained source package.");let c=S(_=>_.taskset.graders.map(q=>q.kind==="custom_verifier"?{...q,exportName:q.exportName??"verify"}:q),"normalizedGraders");if(m(c(e))!==m(c(t)))throw new Error("Edit the saved Reward in Rewards before changing this Taskset's graders.");let o=e.modelResources,l=new Map(o.assets.map(_=>[_.id,_])),n=W(t),p=W(e),f=S(_=>{let{id:q,revision:be,contentHash:Se,metadata:Te,...rt}=_,{javascriptEnvironment:Rt,...Pe}=Te;return{...rt,metadata:{...Pe,resources:Pe.resources??[]}}},"environmentContent"),d=S(_=>{if(!_)return null;let{id:q,revision:be,contentHash:Se,...Te}=_.execution.javascript;return Te},"javascriptContent"),b=m(f(e.environment))===m(f(t.environment))&&m(d(p))===m(d(n)),k=b?e.environment:t.environment,v=b?p:n,h=new Set([...o.assets.map(_=>_.id),...t.taskset.tasks.flatMap(_=>_.privilegedContextRef?[_.privilegedContextRef]:[]),...[t.environment.actionSchemaRef,t.environment.observationSchemaRef,t.environment.stateSchemaRef].flatMap(_=>_?[_.id]:[]),...n?.assets.map(_=>_.id)??[]]),I=new Set([...h,...t.taskset.tasks.flatMap(_=>[..._.artifactRefs.map(q=>q.id),...(_.requiredOutputs??[]).flatMap(q=>q.schemaRef?[q.schemaRef.id]:[])])]),A=ct(e,t,I);for(let _ of h){let q=A.find(Se=>Se.asset.id===_);if(!q)throw new Error(`Bound Taskset asset is missing: ${_}.`);let be=new TextDecoder("utf-8",{fatal:!0}).decode(J(q));l.set(_,ce.parse(P({schemaVersion:"openpond.learningTextAsset.v1",id:_,revision:1,asset:q.asset,text:be})))}let M=X(t),{contentHash:V,...O}=o.taskDefinition,{policy:R,environment:D,environmentRelease:H,tools:u,capabilities:g,verifierSetRelease:T}=t.taskset,r=F.parse(P({...O,instructions:M,execution:{policy:R,environment:D,environmentRelease:H,tools:u,capabilities:g,verifierSetRelease:T}})),{contentHash:i,...y}=t.taskset,E=te.parse(P({...y,tasks:t.taskset.tasks.map(_=>o.instructionMode==="per_task"?_:{..._,policyVisibleContext:{..._.policyVisibleContext,instructions:M}})})),B=he({owner:a.lineage.owner,source:{...o,taskset:e.taskset,executionResources:{environment:e.environment,verifierSet:e.verifierSet}},rewardBinding:o.rewardBinding,rewards:o.rewards,assets:[...l.values()],edits:{taskset:E,taskDefinition:r,executionResources:{environment:k,verifierSet:t.verifierSet},...v?{execution:v.execution}:{}}}),z=Ve.parse(B.taskset.metadata.modelTasksetDerivation);if(B.taskset.id!==a.tasksetId||B.taskset.revision!==a.tasksetRevision||m({...z,schemaVersion:a.lineage.schemaVersion})!==m(a.lineage))throw new Error("Bound draft differs from its retained ownership lineage.");let{taskset:we,executionResources:Re,...it}=B;return Y({schemaVersion:"openpond.tasksetPackage.v1",taskset:we,...Re,modelResources:it,files:A})}S(ot,"publishBoundModelTasksetDraftPackage");function ct(s,e,t){let a=e.files,c=new Map(s.files.map(n=>[n.asset.id,{file:n,assetHash:m(n.asset)}])),o=S(n=>{let p=c.get(n.asset.id);return p!==void 0&&p.file.base64===n.base64&&p.assetHash===m(n.asset)},"isSourceFile"),l=s.files.filter(n=>Q(n.asset.path)).map(n=>{let p=`source-artifact-${m({packageHash:s.contentHash,assetId:n.asset.id})}`;return{original:n,asset:{...n.asset,id:p,path:`source-artifacts/${s.contentHash}/${m(n.asset.path)}/${n.asset.path.split("/").at(-1)}`}}});for(let{original:n,asset:p}of l){let f=l.filter(v=>m({...v.original.asset,id:n.asset.id})===m(n.asset)),b=e.files.find(v=>v.asset.id===p.id)??f.flatMap(v=>e.files.filter(h=>m(h.asset)===m(v.asset)))[0];if(!b||b.base64!==n.base64||!f.some(v=>m(v.asset)===m(b.asset)))throw new Error(`Retained Taskset source artifact differs from its original bytes: ${n.asset.id}.`);let k=a.filter(v=>v.asset.path===n.asset.path||v.asset.id===n.asset.id);if(k.some(v=>v.asset.path!==n.asset.path||v.asset.id!==n.asset.id&&v.asset.id!==`taskset-file-${m(n.asset.path)}`&&!o(v)))throw new Error(`Retained Taskset source artifact conflicts with an authored file: ${n.asset.id}.`);a=[...a.filter(v=>v.asset.id!==p.id&&v.asset.id!==n.asset.id&&(!k.includes(v)||o(v))),n]}for(let n of s.files.filter(p=>!a.some(f=>f.asset.id===p.asset.id))){if(n.asset.path==="environment/execution.json"){let d=He.safeParse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(J(n))));if(d.success&&m(ve(d.data))===m(n))continue}let p=a.filter(d=>d.asset.path===n.asset.path),f=S(d=>m({...d.asset,id:n.asset.id})===m(n.asset)&&d.base64===n.base64,"sameEnvelope");if(t.has(n.asset.id)||!p.length||p.some(d=>!f(d)))throw new Error(`Retained Taskset source alias differs from its original bytes: ${n.asset.id}.`);a=[...a,n]}return a}S(ct,"retainSourceFileIdentities");function Mt(s){let e=Oe.parse(s.request),t=$e.parse(s.owner),a=C(s.source);if(a.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(a.contentHash!==e.sourcePackageHash)throw new Error("Taskset draft source package changed.");if(a.modelResources){let p=Fe({owner:t,source:{...a.modelResources,taskset:a.taskset,executionResources:{environment:a.environment,verifierSet:a.verifierSet}},rewardBinding:a.modelResources.rewardBinding,rewards:a.modelResources.rewards,assets:a.modelResources.assets}),f=p.taskset.metadata.modelTasksetDerivation;return N.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${m({owner:t,operationId:e.operationId})}`,requestHash:m(e),sourcePackageHash:a.contentHash,sourceTasksetRef:w(a.taskset),tasksetId:p.taskset.id,tasksetRevision:p.taskset.revision,lineage:{...f,schemaVersion:"openpond.modelTasksetAuthoring.v1"},authoringGraph:"bound"})}let c=Ne(a.taskset),o=c&&m(c.owner)===m(t),l=o?c.root:w(a.taskset),n={schemaVersion:"openpond.modelTasksetAuthoring.v1",owner:t,root:l,parent:w(a.taskset)};return N.parse({schemaVersion:"openpond.modelTasksetDraftPreparation.v1",draftId:`model-taskset-draft-${m({owner:t,operationId:e.operationId})}`,requestHash:m(e),sourcePackageHash:a.contentHash,sourceTasksetRef:w(a.taskset),tasksetId:Ge(n),tasksetRevision:o?a.taskset.revision+1:1,lineage:n})}S(Mt,"prepareModelTasksetDraft");function dt(s){let e=N.parse(s.preparation);if(!$(e.sourceTasksetRef,e.lineage.parent))throw new Error("Taskset draft preparation differs from its source lineage.");if(e.authoringGraph==="bound"){if(!s.source)throw new Error("Bound Taskset authoring requires its retained source package.");return ot({preparation:e,source:s.source,edited:s.edited})}let t=ut(s.edited),{contentHash:a,...c}=t.verifierSet,o=Ce({...c,id:`${e.tasksetId}-verifiers`,revision:e.tasksetRevision,calibrationReceiptRefs:[],metadata:{sourceVerifierSet:w(t.verifierSet)}}),{contentHash:l,...n}=t.taskset,p=te.parse(P({...n,id:e.tasksetId,revision:e.tasksetRevision,verifierSetRelease:{id:o.id,contentHash:o.contentHash},metadata:{modelTasksetAuthoring:e.lineage,...t.taskset.metadata.environmentResources===void 0?{}:{environmentResources:t.taskset.metadata.environmentResources},...t.taskset.metadata.ordinaryAuthoring===void 0?{}:{ordinaryAuthoring:t.taskset.metadata.ordinaryAuthoring}}})),f=W(t),d=f?[...t.files.filter(b=>b.asset.id!==Le(t.taskset)),ve({...f.execution,verifierSet:o})]:t.files;return Y({schemaVersion:"openpond.tasksetPackage.v1",taskset:p,environment:t.environment,verifierSet:o,files:d})}S(dt,"publishModelTasksetDraftPackage");function ut(s){let e=C(s);if(e.modelResources||e.learningResources)throw new Error("This Taskset requires its bound or reviewed authoring workflow.");return e}S(ut,"requireOrdinaryPackage");function mt(s,e,t,a){if(s.environment.entrypoint!=="openpond.javascript-environment.v1")return{taskset:s,inventory:t,generatedFiles:[]};let c="environment/execution.json",o=e.get(c);if(!o||o.length>524288)throw new Error("Authored tool environment requires its bounded private execution declaration.");let l=He.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(o))),n=S(M=>{if(!M)return null;let V=t.find(O=>O.asset.id===M.id&&O.asset.path===M.path);if(!V)throw new Error(`Authored environment dependency is missing: ${M.id}.`);return V.asset},"repin"),{contentHash:p,...f}=l.javascript,d=je.parse(P({...f,id:`javascript-${s.id}`,revision:s.revision,module:n(l.javascript.module)}));if(m(d.tools)!==m(s.environment.metadata.portableTools)||m(d.tools.map(M=>M.name))!==m(s.environment.toolNames))throw new Error("Authored environment tools differ from the Taskset's declared tools.");let b=Ae({schemaVersion:"openpond.environmentRelease.v1",id:`environment-${s.id}`,revision:s.revision,contract:Je(s),actionSchemaRef:n(l.environment.actionSchemaRef),observationSchemaRef:n(l.environment.observationSchemaRef),stateSchemaRef:n(l.environment.stateSchemaRef),artifactCollection:l.environment.artifactCollection,adapterConformanceHashes:{},metadata:{javascriptEnvironment:w(d),resources:s.environment.resources??[]}}),k=K.parse({...s,environment:{...s.environment,metadata:{...s.environment.metadata,portableExecutionResources:{environment:b}}}}),v=Ie({taskset:k,adapterId:a}),h=ve({javascript:d,environment:b,verifierSet:v.verifierSetRelease}),I=[...t.filter(M=>M.sourcePath!==c),{asset:h.asset,sourcePath:c}],A=K.parse({...k,metadata:{...k.metadata,portableFileInventory:I}});return{taskset:K.parse({...A,contentHash:Ee(A)}),inventory:I,generatedFiles:[{path:c,role:"environment",content:new TextDecoder().decode(J(h))}]}}S(mt,"prepareAuthoredToolEnvironment");var ee=j.array(j.object({asset:me,sourcePath:j.string().min(1)}).strict()).max(1e4),pt=new Set(["taskset.json","capabilities.json","data/tasks.jsonl","graders/graders.json","fixtures/grader-fixtures.json","environment/taskset.ts"]);function ft(s){return pt.has(s)}S(ft,"isGeneratedTasksetPublicationFilePath");function lt(s,e,t,a=ze){let c=K.parse(s);for(let u of c.tasks)for(let g of u.requiredOutputs??[])if(fe(g.metadata)&&g.submissionMode!=="structured_json")throw new Error("Sampling schema requires a structured output.");if(c.metadata.taskDefinition!==void 0||c.metadata.rewardBinding!==void 0){for(let u of c.tasks)for(let g of ge(u).requiredOutputs??[]){let T=fe(g.metadata);if(!T)continue;let r=ge(u).artifactRefs.find(z=>z.id===T.schemaRef.id);if(!r||m(r)!==m(T.schemaRef)||!g.schemaRef)throw new Error("Sampling schema must match an ordinary declared policy artifact.");let i=S((z,we)=>u.assets?.find(Re=>Re.id===z)?.artifactRef??we,"sourcePath"),y=e.get(i(g.schemaRef.id,g.schemaRef.path)),E=e.get(i(r.id,r.path));if(!y||!E)throw new Error("Sampling schema source bytes are missing.");let B=le(y,g.schemaRef.contentHash);xe(B,T,E)}return{taskset:c,generatedFiles:[]}}let o=new Map,l=0;for(let[u,g]of e){if(pe.parse(u),l+=g.byteLength,o.size>=1e4||l>a*3/4)throw new Error("Taskset source exceeds the package byte limit.");o.set(u,g.slice())}let n=c.metrics?.customAggregator,p=n?o.get(n.module):void 0;if(n&&!p)throw new Error("Declared Taskset metric module is missing.");let f=n&&p?{...c.metrics,customAggregator:{...n,contentHash:G(p)}}:c.metrics,d=new Map,b=new Set,k=[],v=S((u,g,T,r)=>{let i=o.get(g);if(!i)throw new Error(`Declared Taskset file is missing: ${g}.`);return{id:u,path:g,contentHash:G(i),sizeBytes:i.byteLength,mediaType:T,visibility:r}},"ref"),h=S((u,g=u.path)=>{let T=d.get(u.id);if(T&&m(T)!==m({asset:u,sourcePath:g}))throw new Error(`Conflicting Taskset file identity: ${u.id}.`);let r=o.get(g);if(!r||r.length!==u.sizeBytes||G(r)!==u.contentHash)throw new Error(`Taskset file differs from its declared bytes: ${u.id}.`);d.set(u.id,{asset:u,sourcePath:g}),b.add(g)},"add");for(let u of c.tasks){let g={};for(let r of u.requiredOutputs??[])if(r.submissionMode==="structured_json"){if(!r.schemaRef||r.mediaType!=="application/json")throw new Error("Structured outputs require a JSON schemaRef and application/json.");let i=u.metadata.portableTaskRecord?.requiredOutputs?.find(B=>B.path===r.path)?.schemaRef,y=i?.id===r.schemaRef?i.path:r.schemaRef,E=v(r.schemaRef,y,"application/schema+json","policy");if(i&&i.id===r.schemaRef&&i.visibility!=="policy")throw new Error("Structured output schema must be policy-visible.");le(o.get(y),E.contentHash),g[r.schemaRef]=E}Object.keys(g).length&&(u.metadata={...u.metadata,outputSchemaRefs:g});let T=ge(u);for(let r of T.artifactRefs)h(r,u.assets?.find(i=>i.id===r.id)?.artifactRef??r.path);for(let r of T.requiredOutputs??[])r.schemaRef&&h(r.schemaRef);for(let r of T.requiredOutputs??[]){let i=fe(r.metadata);if(!i)continue;let y=d.get(i.schemaRef.id);if(!y||m(y.asset)!==m(i.schemaRef)||!T.artifactRefs.some(B=>B.id===i.schemaRef.id)||!r.schemaRef)throw new Error("Sampling schema must match an ordinary declared policy artifact.");let E=le(o.get(d.get(r.schemaRef.id).sourcePath),r.schemaRef.contentHash);xe(E,i,o.get(y.sourcePath))}}for(let u of c.environment.resources??[])h(v(u.id,u.path,u.mediaType??"application/octet-stream",u.visibility==="policy_visible"?"policy":"host_private"));let I=c.graders.map(u=>{if(u.kind==="custom_verifier"){let g=v(`verifier-${u.id}`,u.module,"application/javascript","host_private"),T=me.safeParse(u.metadata.portableVerifierRef);return T.success&&T.data.contentHash===g.contentHash&&T.data.sizeBytes===g.sizeBytes&&(g=T.data),h(g,u.module),{...u,metadata:{...u.metadata,portableVerifierRef:g}}}if(u.kind==="human"||u.kind==="model_judge"){let g=new TextEncoder().encode(u.rubric),T=`graders/rubric-${G(g)}.md`;o.set(T,g);let r=v(`rubric-${u.id}`,T,"text/markdown","verifier"),i=me.safeParse(u.metadata.portableRubricRef);if(i.success&&i.data.contentHash===r.contentHash&&i.data.sizeBytes===r.sizeBytes){if(i.data.visibility==="policy")throw new Error("A grader rubric cannot become policy-visible.");r=i.data}return h(r,T),k.push({path:T,role:"verifier",content:u.rubric}),{...u,metadata:{...u.metadata,portableRubricRef:r}}}return u});n&&![...d.values()].some(u=>u.asset.path===n.module&&u.sourcePath===n.module&&u.asset.visibility!=="policy")&&h(v(`metric-${m(n.module)}`,n.module,"application/javascript","host_private"));let A=ee.parse(c.metadata.portableFileInventory??[]);for(let u of[...o.keys()].sort())if(!b.has(u)){let g=A.find(T=>T.sourcePath===u&&!d.has(T.asset.id));h(g?{...v(g.asset.id,u,g.asset.mediaType,g.asset.visibility),path:g.asset.path}:v(`taskset-file-${m(u)}`,u,"application/octet-stream","host_private"),u)}let{importedPackageHash:M,derivedPortableMetadata:V,...O}=c.metadata,R={...c.environment.metadata};if(R.portableExecutionResources!==void 0){let u=j.object({environment:j.unknown(),verifierSet:j.unknown().optional()}).parse(R.portableExecutionResources);R.portableExecutionResources={environment:u.environment}}let D=K.parse({...c,graders:I,metrics:f,environment:{...c.environment,metadata:R},metadata:{...O,...M===void 0?{}:{sourceImportedPackageHash:M},portableFileInventory:ee.parse([...d.values()].sort((u,g)=>u.asset.id.localeCompare(g.asset.id)))}}),H=mt(D,o,[...d.values()],t);return{taskset:K.parse({...H.taskset,contentHash:Ee(H.taskset)}),generatedFiles:[...k,...H.generatedFiles]}}S(lt,"prepareAuthoredTasksetSource");function ht(s){let e=Ye(s.workspace,s.maximumBytes),t=s.preparation===null?null:N.parse(s.preparation);if(t?e.draft.id!==t.draftId||e.draft.modelScope?.modelId!==t.lineage.owner.modelId||e.draft.profileId!==t.lineage.owner.scopeId||m(e.draft.modelScope?.source??null)!==m(t):e.draft.modelScope?.source!==void 0)throw new Error("Taskset draft differs from its retained source preparation.");let a=Qe({draft:e.draft,now:e.draft.updatedAt,sourcePackageHash:s.sourceWorkspaceHash??e.contentHash}),c=new Map(e.files.map(f=>[f.path,ke(f)]));for(let[f,d]of Ke(e.draft))ft(f)||c.set(f,new TextEncoder().encode(d));let o=lt(a,c,s.adapterId,s.maximumBytes);for(let f of o.generatedFiles)c.set(f.path,new TextEncoder().encode(f.content));let l=Ie({taskset:o.taskset,adapterId:s.adapterId}),n=ee.parse(o.taskset.metadata.portableFileInventory),p=Y({schemaVersion:"openpond.tasksetPackage.v1",taskset:l.tasksetRelease,environment:l.environmentRelease,verifierSet:l.verifierSetRelease,files:n.map(f=>{let d=c.get(f.sourcePath);if(!d)throw new Error(`Captured Taskset file is missing: ${f.sourcePath}.`);return{asset:f.asset,base64:Buffer.from(d).toString("base64")}})},s.maximumBytes);return t?dt({preparation:t,edited:p,source:s.source}):p}S(ht,"compileTasksetDraftWorkspace");function jt(s){if(!s.workspace.draft.modelScope)throw new Error("Taskset draft requires a Model owner.");return ht(s)}S(jt,"compileModelTasksetDraftWorkspace");function Xt(s){let e=C(s.source);if(e.modelResources||e.learningResources)throw new Error("Binding an ordinary Reward requires an ordinary source package.");let t=X(e);if(!t.trim())throw new Error("Add collection instructions before selecting a saved Reward.");let a=new Map,c=W(e);for(let R of c?.assets??[])a.set(R.id,R);let o=new Set([...e.taskset.tasks.flatMap(R=>R.privilegedContextRef?[R.privilegedContextRef]:[]),...[e.environment.actionSchemaRef,e.environment.observationSchemaRef,e.environment.stateSchemaRef].flatMap(R=>R?[R.id]:[])]);for(let R of o){if(a.has(R))continue;let D=e.files.find(u=>u.asset.id===R);if(!D)throw new Error(`Source Taskset context is missing: ${R}.`);let H=new TextDecoder("utf-8",{fatal:!0}).decode(J(D));a.set(R,ce.parse(P({schemaVersion:"openpond.learningTextAsset.v1",id:R,revision:1,asset:D.asset,text:H})))}for(let R of s.assets){let D=e.files.find(H=>H.asset.id===R.id);if(D&&P({asset:D.asset}).contentHash!==P({asset:R.asset}).contentHash)throw new Error(`Selected Reward conflicts with a source asset: ${R.id}.`);a.set(R.id,R)}let{policy:l,environment:n,environmentRelease:p,tools:f,capabilities:d,verifierSetRelease:b}=e.taskset,k=e.taskset.metadata.tasksetOutputContract,v=k&&typeof k=="object"&&!Array.isArray(k)&&"mode"in k&&k.mode==="structured_json"?"jsonSchema"in k?k.jsonSchema:null:{type:"object"},h=F.parse(P({schemaVersion:"openpond.taskDefinition.v1",id:`${e.taskset.id}-definition`,revision:1,name:e.taskset.id,description:"",instructions:t,category:"custom",familyNamespace:e.taskset.id,inputSchema:{type:"object"},outputSchema:v,rewardBinding:w(s.rewardBinding),harness:null,execution:{policy:l,environment:n,environmentRelease:p,tools:f,capabilities:d,verifierSetRelease:b}})),I=he({...s,assets:[...a.values()],source:{taskset:e.taskset,taskDefinition:h,instructionMode:"per_task",executionResources:{environment:e.environment,verifierSet:e.verifierSet},...c?{execution:c.execution}:{}}}),A=new Map(e.files.map(R=>[R.asset.id,R]));for(let R of I.assets){let D="";for(let H of new TextEncoder().encode(R.text))D+=String.fromCharCode(H);A.set(R.id,{asset:R.asset,base64:btoa(D)})}let{taskset:M,executionResources:V,...O}=I;return Y({schemaVersion:"openpond.tasksetPackage.v1",taskset:M,...V,modelResources:O,files:[...A.values()]})}S(Xt,"bindOrdinaryModelTasksetReward");function vt(s){let{request:e,package:t}=s,a=t.learningResources;if(!a)throw new x("model_review_batch_required",422);let c=L(t.taskset),o=`model-review-${m([s.scope,e.modelId,e.operationId])}`,l=new Map(e.examples.map(r=>[m(r.evidence),r])),n=new Set(a.evidence.map(r=>m(w(r)))),p=new Map(a.decisions.map(r=>[m(r.evidence),r]));if(l.size!==e.examples.length||e.examples.some(r=>!n.has(m(r.evidence))))throw new x("model_review_evidence_mismatch",409);for(let r of[s.binding,...s.rewards,...s.assets])oe(r);se(s.binding,s.rewards);let f=new Map;for(let r of s.binding.sources){let i=s.rewards.find(B=>$(w(B),r.reward)),{contentHash:y,...E}=i;f.set(i.contentHash,Be({...E,id:`${o}-reward-${i.contentHash}`,revision:1}))}let d=[...f.values()],{contentHash:b,recipeRef:k,...v}=s.binding,h=qe({...v,id:`${o}-binding`,revision:1,sources:s.binding.sources.map(r=>({...r,reward:w(f.get(r.reward.contentHash))}))},d),I=d.flatMap(r=>[...r.assets,..."verifierRef"in r.implementation?[r.implementation.verifierRef]:[],..."rubricRef"in r.implementation?[r.implementation.rubricRef]:[],..."inputContract"in r.implementation?[r.implementation.inputContract]:[]]),A=[...new Map(I.map(r=>{let i=s.assets.find(y=>y.id===r.id);if(!i)throw new x("model_review_reward_asset_missing",422);if(de(i,r),r.visibility==="policy")throw new x("reward_asset_visibility_invalid",422);return[i.id,i]})).values()],{environmentRelease:M,verifierSetRelease:V,...O}=c.definition.execution,{contentHash:R,...D}=c.definition,H=F.parse(P({...D,...e.definition,id:`${o}-definition`,revision:1,rewardBinding:w(h),execution:{...O,policy:{...O.policy,hiddenGraderRefs:ae(h,d).filter(r=>r.privileged).map(r=>r.id)}}})),u=ne.parse(P({schemaVersion:"openpond.learningSource.v1",id:o,revision:1,name:`${H.name} review`,kind:"direct",taskDefinition:w(H),enabled:!0,allowedSplits:[...new Set(a.evidence.map(r=>r.submission.split))],mapping:null,adapterVersion:null,reviewOrigin:{modelId:e.modelId,packageHash:t.contentHash,taskset:w(t.taskset),batch:w(a.batch),rewardBinding:w(s.binding)}})),g=a.evidence.map(r=>{let i=l.get(m(w(r))),y=`review-${r.contentHash}`,E=m({instructions:H.instructions,inputSchema:H.inputSchema,outputSchema:H.outputSchema,requiredOutputs:H.requiredOutputs??[],input:i?.input??r.submission.input})!==m({instructions:c.definition.instructions,inputSchema:c.definition.inputSchema,outputSchema:c.definition.outputSchema,requiredOutputs:c.definition.requiredOutputs??[],input:r.submission.input});return ie.parse(P({schemaVersion:"openpond.taskEvidence.v1",id:ue(u.id,r.submission.exampleId,y),revision:1,source:w(u),submission:{...r.submission,sourceId:u.id,taskDefinition:w(H),attemptId:y,observedOutput:E?null:r.submission.observedOutput,idempotencyKey:`${o}-${r.contentHash}`,...i?.input===void 0?{}:{input:i.input},...i?.expected===void 0?{}:{expected:i.expected},...i?.evaluatorContext===void 0?{}:{evaluatorContext:i.evaluatorContext}},supersedes:w(r),correctionFeedbackId:null,receivedAt:s.now}))}),T=g.flatMap(r=>{let i=l.get(m(r.supersedes)),y=p.get(m(r.supersedes)),E=i?.proposedTarget===void 0?y.approvedTarget:i.proposedTarget;return E===null?[]:[re.parse({schemaVersion:"openpond.taskFeedbackRecord.v1",id:`feedback-${m([o,r.id])}`,revision:1,submission:{schemaVersion:"openpond.taskFeedback.v1",sourceId:u.id,idempotencyKey:`${o}-${r.id}`,exampleId:r.submission.exampleId,attemptId:r.submission.attemptId,expectedEvidenceHash:r.contentHash,occurredAt:s.now,kind:"target_correction",value:E,note:"Proposed target for the revised task. Grade and review before admission."},status:"pending_review",evidence:w(r),createdAt:s.now,review:null})]});return{source:u,definition:H,binding:h,rewards:d,assets:A,evidence:g,proposals:T}}S(vt,"prepareModelBatchReview");var st=S(s=>`model-batch-review-${m([s.modelId,s.operationId])}`,"operation");function es(s){let e=C(s);if(!e.learningResources)throw new x("model_review_batch_required",422);let t=L(e.taskset);return Ue.parse({schemaVersion:"openpond.modelBatchReviewInspection.v1",packageHash:e.contentHash,definition:t.definition,binding:t.binding,evidence:e.learningResources.evidence,decisions:e.learningResources.decisions})}S(es,"inspectModelBatchPackage");async function gt(s,e){let t=De.parse(e),a=await s.operation(st(t));if(!a)return null;if(a.requestHash!==m(t))throw new x("learning_idempotency_conflict",409);return at(s,t,a.resources)}S(gt,"findModelBatchReview");async function ts(s,e){let t=De.parse(e.request),a=await gt(s,t);if(a)return a;let c=C(e.package);if(!c.learningResources)throw new x("model_review_batch_required",422);let o=L(c.taskset),l=t.rewardBindingRef,n=!l||$(l,w(o.binding)),p=n?o.binding:await _e(s,"binding",l),f=n?o.rewards:await Promise.all(p.sources.map(h=>_e(s,"reward",h.reward))),d=new Set(f.flatMap(h=>[...h.assets,..."verifierRef"in h.implementation?[h.implementation.verifierRef]:[],..."rubricRef"in h.implementation?[h.implementation.rubricRef]:[],..."inputContract"in h.implementation?[h.implementation.inputContract]:[]]).map(h=>h.id)),b=n?c.learningResources.assets:await Promise.all([...d].map(h=>ye(s,"asset",h,1))),k=vt({...e,request:t,package:c,binding:p,rewards:f,assets:b}),v=[];for(let h of k.assets){let I=await s.get("asset",h.id,1);if(I&&I.contentHash!==h.contentHash)throw new x("model_review_asset_conflict",409);I||await s.put("asset",h,0)}for(let h of k.rewards)await s.put("reward",h,0);await s.put("binding",k.binding,0),await s.put("definition",k.definition,0),await s.put("source",k.source,0,{parentId:t.modelId}),v.push({kind:"source",id:k.source.id,revision:1});for(let h of k.evidence)await s.put("evidence",h,0,{parentId:k.source.id}),v.push({kind:"evidence",id:h.id,revision:1});for(let h of k.proposals)await s.put("feedback",h,0,{parentId:h.evidence.id,status:h.status}),v.push({kind:"feedback",id:h.id,revision:1});return await s.saveOperation(st(t),{requestHash:m(t),resources:v}),at(s,t,v)}S(ts,"beginModelBatchReview");async function at(s,e,t){let a=await Promise.all(t.map(c=>ye(s,c.kind,c.id,c.revision)));return Ze.parse({schemaVersion:"openpond.modelBatchReviewReceipt.v1",operationId:e.operationId,modelId:e.modelId,source:a.find(c=>c.schemaVersion==="openpond.learningSource.v1"),evidence:a.filter(c=>c.schemaVersion==="openpond.taskEvidence.v1"),proposals:a.filter(c=>c.schemaVersion==="openpond.taskFeedbackRecord.v1")})}S(at,"readReceipt");function as(s,e){let t=C(s),a=e?new Set(e):null,c=t.taskset.tasks.filter(p=>!a||a.has(p.id));if(!c.length||a&&c.length!==a.size)throw new x("dataset_review_selection_mismatch",409);let o=c.flatMap(p=>[...p.artifactRefs,...(p.requiredOutputs??[]).flatMap(f=>f.schemaRef?[f.schemaRef]:[])]),l=W(t);o.push(...[t.environment.actionSchemaRef,t.environment.observationSchemaRef,t.environment.stateSchemaRef,l?.execution.javascript.module].flatMap(p=>p?[p]:[]));let n=new Map;for(let p of o){let f=t.files.find(d=>d.asset.id===p.id);if(!f||m(f.asset)!==m(p))throw new x("dataset_review_asset_mismatch",409);n.set(f.asset.id,f)}for(let p of[t.taskset.metadata.environmentResources,t.environment.metadata.resources])if(p!==void 0){if(!Array.isArray(p))throw new x("dataset_review_environment_resources_invalid",422);for(let f of p){if(!f||typeof f!="object"||!("path"in f))throw new x("dataset_review_environment_resources_invalid",422);let d=t.files.filter(b=>b.asset.path===f.path);if(d.length!==1)throw new x("dataset_review_environment_resource_ambiguous",422);n.set(d[0].asset.id,d[0])}}return[...n.values()]}S(as,"datasetTrainingReviewFiles");function is(s){let e=C(s),t=e.learningResources?L(e.taskset):null,a=t?.definition??e.modelResources?.taskDefinition,c=t?.binding??e.modelResources?.rewardBinding,o=a?.instructions??X(e),l=e.taskset.metadata.tasksetOutputContract,n=l&&typeof l=="object"&&!Array.isArray(l)&&"mode"in l&&l.mode==="structured_json"&&"jsonSchema"in l?U.parse(l.jsonSchema):null,p=a?.outputSchema??n;return tt.parse({schemaVersion:"openpond.datasetTrainingReviewSource.v1",dataset:w(e.taskset),packageHash:e.contentHash,taskCount:e.taskset.tasks.length,definition:{name:a?.name??e.taskset.id,...o?.trim()?{instructions:o}:{},...a?{inputSchema:a.inputSchema}:{},...p?{outputSchema:p}:{},...a?.requiredOutputs?{requiredOutputs:a.requiredOutputs}:{}},rewardBinding:c?w(c):null,hasParentTargets:e.learningResources?.decisions.some(f=>f.approvedTarget!==null)??!1})}S(is,"inspectDatasetTrainingReviewPackage");function kt(s,e,t){return`dataset-review-${m([s,e,t])}`}S(kt,"datasetTrainingReviewIdentity");function ds(s){let e=et.parse(s.request),t=C(s.package);if(t.contentHash!==e.packageHash||!$(w(t.taskset),e.dataset))throw new x("dataset_review_source_mismatch",409);let a=kt(e.teamId,s.actorId,e.operationId),c=t.learningResources?L(t.taskset):null,o=c?.definition??t.modelResources?.taskDefinition,l=c?{binding:c.binding,rewards:c.rewards,assets:t.learningResources.assets}:t.modelResources?{binding:t.modelResources.rewardBinding,rewards:t.modelResources.rewards,assets:t.modelResources.assets}:null,n=s.graph??l;if(!n)throw new x("dataset_review_reward_required",422,"Select an exact saved Reward binding before importing this Dataset for review.");let p=e.rewardBindingRef??l?.binding;if(!p||!$(w(n.binding),p))throw new x("dataset_review_reward_mismatch",409);for(let i of[n.binding,...n.rewards,...n.assets])oe(i);se(n.binding,n.rewards);let f=n.rewards.flatMap(i=>[...i.assets,..."verifierRef"in i.implementation?[i.implementation.verifierRef]:[],..."rubricRef"in i.implementation?[i.implementation.rubricRef]:[],..."inputContract"in i.implementation?[i.implementation.inputContract]:[]]),d=[...new Map(f.map(i=>{let y=n.assets.find(B=>B.id===i.id);if(!y||i.visibility==="policy")throw new x("dataset_review_reward_asset_missing",422);de(y,i);let E=t.files.find(B=>B.asset.id===i.id);if(E&&m(E.asset)!==m(i))throw new x("dataset_review_asset_conflict",409);return[y.id,y]})).values()],b=e.taskIds?new Set(e.taskIds):null,k=t.taskset.tasks.filter(i=>!b||b.has(i.id));if(!k.length||k.length>1e4||b&&k.length!==b.size)throw new x("dataset_review_selection_mismatch",409);if(e.targetSource==="approved_parent"&&!t.learningResources)throw new x("dataset_review_parent_targets_unavailable",422);let v=o?.familyNamespace??s.familyNamespace;if(!v)throw new x("dataset_review_family_required",422,"Resolve the Dataset's stable family before importing its versions.");let h=e.definition.instructions??o?.instructions??X(t);if(!h.trim())throw new x("dataset_review_instructions_required",422,"Provide the task instructions before importing this Dataset.");let I=t.taskset.metadata.tasksetOutputContract,A=I&&typeof I=="object"&&!Array.isArray(I)&&"mode"in I&&I.mode==="structured_json"&&"jsonSchema"in I?U.parse(I.jsonSchema):null,M=e.definition.outputSchema??o?.outputSchema??A;if(!M)throw new x("dataset_review_output_contract_required",422,"Provide the actual output contract for this Dataset; importing does not infer a target schema.");let{environmentRelease:V,verifierSetRelease:O,...R}=t.taskset,D=F.parse(P({schemaVersion:"openpond.taskDefinition.v1",id:`${a}-definition`,revision:1,name:e.definition.name??o?.name??t.taskset.id,description:o?.description??"",instructions:h,category:o?.category??"custom",familyNamespace:v,inputSchema:e.definition.inputSchema??o?.inputSchema??{type:"object"},outputSchema:M,...e.definition.requiredOutputs??o?.requiredOutputs?{requiredOutputs:e.definition.requiredOutputs??o?.requiredOutputs}:{},...o?.contextRequirements?{contextRequirements:o.contextRequirements}:{},harness:o?.harness??null,rewardBinding:w(n.binding),execution:{policy:{...R.policy,hiddenGraderRefs:ae(n.binding,n.rewards).filter(i=>i.privileged).map(i=>i.id)},environment:R.environment,tools:R.tools,capabilities:R.capabilities}})),H=ne.parse(P({schemaVersion:"openpond.learningSource.v1",id:a,revision:1,name:`${D.name.slice(0,480)} review`,kind:"direct",taskDefinition:w(D),enabled:!0,allowedSplits:[...new Set(k.map(i=>i.split))],mapping:null,adapterVersion:null,datasetOrigin:{receiptId:a,packageHash:t.contentHash,taskset:w(t.taskset)}})),u=new Map(t.learningResources?.evidence.map(i=>[i.id,i])??[]),g=new Map(t.learningResources?.decisions.map(i=>[m(i.evidence),i])??[]),T=k.map(i=>{let y=u.get(i.id),E=y?.submission.evaluatorContext??wt(t,i.privilegedContextRef),B={...i.policyVisibleContext,...e.definition.instructions===void 0?{}:{instructions:D.instructions}},z=e.definition.instructions!==void 0&&e.definition.instructions!==o?.instructions;return ie.parse(P({schemaVersion:"openpond.taskEvidence.v1",id:ue(H.id,i.id,`dataset-${t.contentHash}`),revision:1,source:w(H),supersedes:y?w(y):null,correctionFeedbackId:null,receivedAt:s.now,submission:{schemaVersion:"openpond.taskExample.v1",sourceId:H.id,idempotencyKey:`${a}-${m(i.id)}`,taskDefinition:w(D),exampleId:i.id,attemptId:`dataset-${t.contentHash}`,occurredAt:y?.submission.occurredAt??s.now,familyKey:i.clusterKey,split:i.split,input:i.input,policyVisibleContext:B,observedOutput:!z&&y?y.submission.observedOutput:null,expected:i.expectedOutput,evaluatorContext:E,assets:i.artifactRefs,...i.requiredOutputs?{requiredOutputs:i.requiredOutputs}:{},provenance:{sourceRecordRef:JSON.stringify({dataset:e.dataset,taskId:i.id}),mappingHash:m({schemaVersion:"openpond.datasetTrainingReviewMapping.v1",dataset:e.dataset,packageHash:t.contentHash})}}}))}),r=T.flatMap(i=>{let y=u.get(i.submission.exampleId),E=e.targetSource==="expected_output"?i.submission.expected:e.targetSource==="approved_parent"&&y?g.get(m(w(y)))?.approvedTarget??null:null;if(E===null)return[];if(!Me(D.outputSchema,E).valid)throw new x("dataset_review_target_schema_mismatch",422,"A proposed Dataset target differs from the selected output contract. Import without proposals or provide the matching contract.");return[re.parse({schemaVersion:"openpond.taskFeedbackRecord.v1",id:`feedback-${m([H.id,i.id])}`,revision:1,submission:{schemaVersion:"openpond.taskFeedback.v1",sourceId:H.id,idempotencyKey:`${H.id}-${m(i.id)}`,exampleId:i.submission.exampleId,attemptId:i.submission.attemptId,expectedEvidenceHash:i.contentHash,occurredAt:s.now,kind:"target_correction",value:E,note:"Dataset target proposal. Grade and review this exact evidence before admission."},status:"pending_review",evidence:w(i),createdAt:s.now,review:null})]});return{id:a,request:e,source:H,definition:D,binding:n.binding,rewards:n.rewards,assets:d,evidence:T,proposals:r}}S(ds,"prepareDatasetTrainingReview");function wt(s,e){if(!e)return null;let t=s.files.find(a=>a.asset.id===e);if(!t||t.asset.visibility!=="host_private")throw new x("dataset_review_private_context_missing",422);try{return U.parse(JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(J(t))))}catch{throw new x("dataset_review_private_context_unsupported",422,"This Dataset's private context is not an object envelope supported by the review engine.")}}S(wt,"readPrivateContext");var nt=j.object({draft:Z,filePaths:j.array(j.object({assetId:j.string().min(1),paths:j.array(pe).min(1).max(1e4)}).strict()).max(1e4)}).strict();function ps(s){let e=C(s.source),t=Z.parse(s.sourceDraft),a=N.parse(s.preparation);if(e.contentHash!==a.sourcePackageHash||!$(w(e.taskset),a.sourceTasksetRef))throw new Error("Taskset draft preparation differs from its source package.");if(e.learningResources)throw new Error("Reviewed Tasksets require their reviewed authoring workflow.");if(!!e.modelResources!=(a.authoringGraph==="bound"))throw new Error("Taskset draft authoring graph differs from its source.");let c=ee.parse(t.metadata.portableFileInventory??[]),o=S(d=>Q(d)?`source-artifacts/${e.contentHash}/${m(d)}/${d.split("/").at(-1)}`:d,"sourcePath");if([...t.tasks.flatMap(d=>(d.assets??[]).map(b=>b.artifactRef)),...(t.environment.resources??[]).map(d=>d.path),...e.taskset.tasks.flatMap(d=>(d.requiredOutputs??[]).flatMap(b=>b.schemaRef?[b.schemaRef.path]:[])),...t.metrics.customAggregator?[t.metrics.customAggregator.module]:[],...t.graders.flatMap(d=>d.kind==="custom_verifier"?[d.module]:[])].some(Q))throw new Error("A referenced source asset occupies a reserved Taskset authoring path.");let n=e.files.map(d=>{let b=new Set([d.asset.path]);for(let k of c)k.asset.id===d.asset.id&&b.add(k.sourcePath);for(let k of t.tasks)for(let v of k.assets??[])v.id===d.asset.id&&b.add(v.artifactRef);for(let k of e.taskset.graders)if(k.kind==="custom_verifier"&&k.verifierRef.id===d.asset.id){let v=t.graders.find(h=>h.id===k.id);v?.kind==="custom_verifier"&&b.add(v.module)}return{assetId:d.asset.id,paths:[...b].map(o)}}),p={...t.metadata};if(e.modelResources)for(let d of["taskDefinition","rewardBinding","rewardExecution","derivedPortableMetadata","modelTasksetDerivation","importedPackageHash"])delete p[d];let f=Z.parse({...t,id:a.draftId,revision:1,status:"draft",graders:t.graders.map(d=>({...d,metadata:{...d.metadata,portableGrader:e.taskset.graders.find(b=>b.id===d.id)}})),environment:{...t.environment,metadata:{...t.environment.metadata,portableExecutionResources:{environment:e.environment}}},modelScope:{modelId:a.lineage.owner.modelId,expectedModelRevision:s.expectedModelRevision,source:a},publishedTasksetRef:a.tasksetRevision>1?a.sourceTasksetRef:null,metadata:{...p,modelTasksetAuthoring:a.lineage,portableFileInventory:c.map(d=>({...d,sourcePath:o(d.sourcePath),asset:{...d.asset,id:Q(d.sourcePath)?`source-artifact-${m({packageHash:e.contentHash,assetId:d.asset.id})}`:d.asset.id,path:o(d.asset.path)}}))}});return nt.parse({draft:f,filePaths:n})}S(ps,"prepareTasksetDraftSource");function fs(s){let e=nt.parse(s.initialized),t=C(s.source);if(e.draft.modelScope?.source?.sourcePackageHash!==t.contentHash)throw new Error("Taskset draft lost its source preparation.");let a=new Map;for(let o of e.filePaths){let l=t.files.find(n=>n.asset.id===o.assetId);if(!l)throw new Error("Taskset draft source asset is missing.");for(let n of o.paths){let p=a.get(n);if(p&&p.contentHash!==l.asset.contentHash)throw new Error("Taskset draft source paths conflict.");a.set(n,{path:n,contentHash:l.asset.contentHash,sizeBytes:l.asset.sizeBytes,base64:l.base64})}}for(let o of We(e.draft))if(!a.has(o.relativePath)){let l=new TextEncoder().encode(o.source);a.set(o.relativePath,{path:o.relativePath,contentHash:G(l),sizeBytes:l.byteLength,base64:Buffer.from(l).toString("base64")})}let c=e.draft;if(c.metrics.customAggregator){let o=a.get(c.metrics.customAggregator.module);if(!o)throw new Error("Declared Taskset metric module is missing.");ke(o),c=Z.parse({...c,metrics:{...c.metrics,customAggregator:{...c.metrics.customAggregator,contentHash:o.contentHash}}})}return Xe({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:c,files:[...a.values()]})}S(fs,"materializeTasksetDraftWorkspace");export{Mt as a,dt as b,ee as c,ft as d,lt as e,ht as f,jt as g,Xt as h,es as i,gt as j,ts as k,as as l,is as m,kt as n,ds as o,nt as p,ps as q,fs as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{b as t}from"./chunk-NXN7GJOH.js";import{a as e}from"./chunk-TBODQT4W.js";import{a as s}from"./chunk-FTQLQJQV.js";function d(n){return n instanceof e?{code:n.code,message:n.message,status:n.status,retryable:n.status===429||n.status>=500,requestId:null}:n instanceof t?{code:n.code,message:n.message,status:n.status,retryable:n.retryable,requestId:n.requestId}:null}s(d,"trainingCliError");export{d as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{va as t}from"./chunk-
|
|
2
|
+
import{va as t}from"./chunk-7OKZCJHS.js";import{A as e}from"./chunk-X2J2P5ZT.js";var n=e.string().trim().min(1).max(240),a=e.object({id:n,revision:e.number().int().positive(),ownerInstanceId:n,teamId:n,profileId:n,projectId:n,hostedModelId:n,role:t,roleTargetId:n,expectedBindingId:n,policyId:n.nullable(),authorizedConfigurationHash:e.string().length(64).nullable(),enabled:e.boolean(),updatedAt:e.string().datetime()}).strict(),o=e.object({id:n,grantId:n,revision:e.number().int().positive(),jobId:n,artifactHash:e.string().length(64),priorBindingId:n,bindingId:n.nullable(),restoredBindingId:n.nullable(),status:e.enum(["prepared","binding","canary","active","superseded","rolling_back","rolled_back","failed"]),leaseId:n,canarySeconds:e.number().int().min(30).max(600),activatedAt:e.string().datetime().nullable(),failure:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict();export{a,o as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as Me,b as Be}from"./chunk-
|
|
2
|
+
import{a as Me,b as Be}from"./chunk-3A2Y7UK3.js";import{b as Te}from"./chunk-65WRWLUD.js";import{c as Le}from"./chunk-AN525SPP.js";import{a as te,c as ae}from"./chunk-EYTTZ5H4.js";import{a as _e,b as De}from"./chunk-XY7HFXLH.js";import{b as Oe}from"./chunk-YU3C6U5V.js";import{g as Ie,j as ne}from"./chunk-4V73I4OL.js";import{q as ee,r as xe,s as Pe,t as qe}from"./chunk-LE75SVEL.js";import{d as Se,f as Ae,h as Ce}from"./chunk-AJXWJLZA.js";import{n as D}from"./chunk-RCT3O3HQ.js";import{A as C}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";function ze(e){let t=new Map,s=new Map,r=new Map,i=new Map(e.triggers.map(a=>[L(a),a])),u=new Map(e.observations.map(a=>[L(a),a])),c=new Map(e.outcomes.map(a=>[L(a.trigger),a]));return async a=>{let[p,f,R]=await Promise.all([d(a.runRef),m(a.runRef),e.store.getSession(a.runRef)]),A=f.slice().sort((S,x)=>S.startedAt.localeCompare(x.startedAt)),w=A.find(S=>S.id===a.turnId)??await e.store.getTurn(a.turnId),T=A.findIndex(S=>S.id===a.turnId),M=T>0?A.slice(0,T):[],F=M.slice(-e.limits.maxPrecedingTurns),$=tt(F,p,e.limits.maxConversationChars),W=p.filter(S=>S.turnId===a.turnId).filter(S=>["tool.completed","validation.completed","workspace_action_result"].includes(S.name)).filter(S=>S.status==="failed"||["validation.completed","workspace_action_result"].includes(S.name)),O=r.get(a.runRef);O||(O=await Me(R?.cwd),r.set(a.runRef,O));let g=e.sourcePolicies.get(a.runRef)??null,v=H(a),_=b(a),I=_.results,E={schemaVersion:"openpond.localHarnessDeepReviewContext.v1",binding:{ownerScope:e.workspace.ownerScope,workspaceId:e.workspace.id,sourceRef:a.runRef,sourceTurn:a.turnId,admittedHarness:a.harnessRelease,observation:Q(a),refinerOutcome:v?Q(v):null,sourcePolicy:g?{policy:g.policy,state:g.state,checkedAt:g.checkedAt}:null},conversation:{precedingTurns:$,currentTurn:w?We(w,p,2e3,6e3):null},artifactDiagnostics:O.slice(0,e.limits.maxArtifactDiagnostics),events:W.slice(-e.limits.maxContextEvents).map(nt),currentResult:v?l(v):null,laterResults:I,truncation:{availablePrecedingTurns:M.length,includedPrecedingTurns:$.length,precedingTurnsTruncated:M.length>$.length,conversationChars:rt($),availableContextEvents:W.length,includedContextEvents:Math.min(W.length,e.limits.maxContextEvents),availableArtifactDiagnostics:O.length,includedArtifactDiagnostics:Math.min(O.length,e.limits.maxArtifactDiagnostics),availableLaterResults:_.total,includedLaterResults:I.length,laterResultsTruncated:_.total>I.length,sessionMissing:R===null,turnMissing:w===null}};return{...E,contentHash:D(E)}};async function d(a){let p=t.get(a);if(p)return p;let f=await e.store.runtimeEventsForSession(a);return t.set(a,f),f}async function m(a){let p=s.get(a);if(p)return p;let f=await e.store.turnsForSession(a,500);return s.set(a,f),f}function H(a){for(let p of e.triggers)if(p.observations.some(f=>L(f)===L(a)))return c.get(L(p))??null;return null}function b(a){if(!a.deterministicClass)return{results:[],total:0};let f=e.outcomes.flatMap(R=>R.createdAt<=a.createdAt?[]:(i.get(L(R.trigger))?.observations.map(T=>u.get(L(T))).filter(T=>!!T)??[]).some(T=>T.deterministicClass===a.deterministicClass)?[l(R)]:[]).sort((R,A)=>String(R.createdAt).localeCompare(String(A.createdAt)));return{results:f.slice(0,e.limits.maxLaterResults),total:f.length}}function l(a){let p=a.proposal?e.applyReceipts.filter(w=>L(w.proposal)===L(a.proposal)):[],f=a.proposal?e.advanceReceipts.filter(w=>w.proposal&&L(w.proposal)===L(a.proposal)):[],R=new Set(f.map(w=>L(w))),A=e.advanceReceipts.filter(w=>w.rollbackOf&&R.has(L(w.rollbackOf)));return{outcome:Q(a),decision:a.decision,reason:N(a.reason,1500),proposal:a.proposal,createdAt:a.createdAt,applyReceipts:p.map(w=>({...Q(w),decision:w.decision,createdAt:w.createdAt})),advanceReceipts:f.map(w=>({...Q(w),decision:w.decision,previousRelease:w.previousRelease,nextRelease:w.nextRelease,createdAt:w.createdAt})),rollbackReceipts:A.map(w=>({...Q(w),decision:w.decision,rollbackOf:w.rollbackOf,nextRelease:w.nextRelease,createdAt:w.createdAt}))}}}o(ze,"createLocalHarnessDeepReviewContextLoader");function tt(e,t,s){if(!e.length||s<=0)return[];let r=Math.max(1,Math.floor(s/(e.length*2)));return e.map(i=>We(i,t,r,r))}o(tt,"boundedConversationTurns");function We(e,t,s,r){return{id:e.id,startedAt:e.startedAt,completedAt:e.completedAt,status:e.status,error:N(e.error??"",1e3),prompt:N(e.prompt,s),assistantOutput:N(st(t,e.id),r)}}o(We,"boundedTurn");function st(e,t){return e.filter(s=>s.turnId===t&&s.name==="assistant.delta").map(s=>s.output??"").join("")}o(st,"assistantOutputForTurn");function rt(e){return e.reduce((t,s)=>t+(typeof s.prompt=="string"?s.prompt.length:0)+(typeof s.assistantOutput=="string"?s.assistantOutput.length:0),0)}o(rt,"conversationCharacterCount");function nt(e){let t=$e(e.data),s=$e(t.result);return{id:e.id,name:e.name,action:e.action??(typeof t.tool=="string"?t.tool:null),status:e.status??null,error:N(e.error??"",750),output:N(typeof s.output=="string"?s.output:e.output??"",750),stderr:N(typeof s.stderr=="string"?s.stderr:"",750),exitCode:typeof s.exitCode=="number"?s.exitCode:null,timedOut:s.timedOut===!0}}o(nt,"boundedReviewEvent");function N(e,t){if(!e||t<=0)return null;let s=e.replace(/\bBearer\s+[A-Za-z0-9._~+/=-]+/gi,"Bearer [redacted]").replace(/\b(api[_-]?key|access[_-]?token|auth(?:orization)?|password|secret)(\s*[:=]\s*)([^\s,;]+)/gi,"$1$2[redacted]");if(s.length<=t)return s;let r=`
|
|
3
3
|
[... middle omitted ...]
|
|
4
4
|
`;if(r.length>=t)return s.slice(0,t);let i=Math.max(0,t-r.length),u=Math.ceil(i/2),c=Math.floor(i/2);return`${s.slice(0,u)}${r}${s.slice(-c)}`}o(N,"boundedReviewText");function Q(e){return{id:e.id,contentHash:e.contentHash}}o(Q,"artifactRef");function L(e){return`${e.id}:${e.contentHash}`}o(L,"artifactKey");function $e(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}o($e,"asRecord");var at=2160*60*60*1e3;async function fe(e){let t=[],s=await e.store.listHarnessRefinementCandidates(e.workspace.id),r=e.upsertReviewClaim!==!1&&e.review.classification==="harness_maintenance"?e.review.claim?.fingerprint??null:null;for(let c of s){if(c.fingerprint===r)continue;let d=ot({...e,candidate:c});d&&(await e.store.saveHarnessRefinementCandidateTransition({workspaceId:e.workspace.id,...d}),t.push(d.receipt))}let i=null;if(e.upsertReviewClaim!==!1&&e.review.classification==="harness_maintenance"&&e.review.claim){let c=await e.store.getHarnessRefinementCandidateByFingerprint(e.workspace.id,e.review.claim.fingerprint),d=it({...e,candidate:c});d?(await e.store.saveHarnessRefinementCandidateTransition({workspaceId:e.workspace.id,...d}),t.push(d.receipt),i=d.candidate):i=c}let u=await e.store.listHarnessRefinementCandidates(e.workspace.id);return e.upsertReviewClaim===!1&&(i=u.find(c=>c.status==="confirmed"&&c.sourceReviews.some(d=>d.id===e.review.id&&d.contentHash===e.review.contentHash))??null),{activeCandidate:i,candidates:u,lifecycleReceipts:t}}o(fe,"reconcileLocalHarnessRefinementCandidates");async function Ue(e){if(!["unresolved","confirmed"].includes(e.candidate.status))return e.candidate;let t=ee({...we(e.candidate),sourceReviews:V([...e.candidate.sourceReviews,z(e.review)]),relatedHarnessReleases:V([...e.candidate.relatedHarnessReleases,...e.relatedHarnessRelease?[e.relatedHarnessRelease]:[]]),lastReviewedAt:e.now,updatedAt:e.now,resolution:null}),s=ie({before:e.candidate,candidate:t,review:e.review,decision:"merged",addedEvidence:[],removedEvidence:[],reason:e.reason,now:e.now});return await e.store.saveHarnessRefinementCandidateTransition({workspaceId:e.candidate.workspaceRef,...s}),t}o(Ue,"recordAppliedLocalHarnessRefinementCandidate");async function Fe(e){if(e.candidate.status!=="confirmed")throw new Error("Later-success resolution requires a confirmed candidate.");let t=e.review.harnessRelease,s=e.candidate.relatedHarnessReleases.at(-1);if(e.candidate.relatedHarnessReleases.length<2||!s||s.id!==t.id||s.contentHash!==t.contentHash)throw new Error("Later-success evidence is not bound to the candidate's applied Harness release.");let r=new Set(e.candidate.occurrences.map(d=>d.sourceRef)),i=e.evidence.filter(d=>!r.has(d.sourceRef));if(i.length===0)throw new Error("Later-success resolution requires evidence from an independent work source.");let u=ee({...we(e.candidate),status:"resolved",sourceReviews:V([...e.candidate.sourceReviews,z(e.review)]),lastReviewedAt:e.now,updatedAt:e.now,resolution:{kind:"later_success",reason:e.reason,evidenceRefs:V(i.map(d=>d.evidence)),resolvedAt:e.now}}),c=ie({before:e.candidate,candidate:u,review:e.review,decision:"resolved",addedEvidence:i,removedEvidence:[],reason:e.reason,now:e.now});return await e.store.saveHarnessRefinementCandidateTransition({workspaceId:e.candidate.workspaceRef,...c}),u}o(Fe,"resolveLocalHarnessRefinementCandidateFromLaterSuccess");function ot(e){if(!["unresolved","confirmed"].includes(e.candidate.status))return null;let t=[],s=oe(e.candidate.occurrences,e.sourcePolicies,t),r=oe(e.candidate.counterevidence,e.sourcePolicies,t),i=V([...e.candidate.sourceReviews,z(e.review)]),u=Date.parse(e.candidate.expiresAt)<=Date.parse(e.now),c=s.length===0,d=c?"rejected":u?"expired":t.length>0?"unresolved":e.candidate.status,m=c?"rejected":u?"expired":"merged";if(!(t.length>0||e.candidate.lastReviewedAt!==e.now||e.candidate.sourceReviews.length!==i.length)&&!u)return null;let b=c?"All supporting occurrences were revoked, deleted, expired, or unavailable at review time.":u?"The bounded candidate lifetime elapsed without sufficient confirming evidence.":"Candidate evidence was reauthorized against the current source policy set.",l=ee({...we(e.candidate),status:d,occurrences:s,counterevidence:r,sourceReviews:i,lastReviewedAt:e.now,updatedAt:e.now,expiresAt:u?e.now:e.candidate.expiresAt,resolution:c||u?{kind:c?"source_revoked":"expired",reason:b,evidenceRefs:t.map(a=>a.evidence),resolvedAt:e.now}:null});return ie({before:e.candidate,candidate:l,review:e.review,decision:m,addedEvidence:[],removedEvidence:t.map(a=>a.evidence),reason:b,now:e.now})}o(ot,"reauthorizeOrExpireCandidate");function it(e){let t=e.review.claim,s=e.candidate,r=[],i=s?oe(s.occurrences,e.sourcePolicies,r):[],u=s?oe(s.counterevidence,e.sourcePolicies,r):[],c=new Set(s&&["unresolved","confirmed"].includes(s.status)?i.map(f=>f.occurrenceKey):[]),d=e.review.selectedEvidence.filter(f=>!c.has(f.occurrenceKey));if(s&&d.length===0&&r.length===0&&["unresolved","confirmed"].includes(s.status))return null;let m=ct([...i,...e.review.selectedEvidence]),H=t.candidateDisposition==="confirm"?"confirmed":"unresolved",b=m.map(f=>f.occurredAt).sort()[0],l=m.map(f=>f.occurredAt).sort().at(-1),a=ee({schemaVersion:"openpond.harnessRefinementCandidate.v1",id:s?.id??`refinement-candidate-${t.fingerprint.slice(0,24)}`,ownerScope:e.workspace.ownerScope,workspaceRef:e.workspace.id,fingerprint:t.fingerprint,recurrenceFamily:t.recurrenceFamily,statement:t.statement,status:H,occurrences:m,counterevidence:u,sourceReviews:V([...s?.sourceReviews??[],z(e.review)]),relatedHarnessReleases:V([...s?.relatedHarnessReleases??[],e.review.harnessRelease]),firstSeenAt:b,lastSeenAt:l,lastReviewedAt:e.now,expiresAt:new Date(Date.parse(e.now)+at).toISOString(),resolution:null,createdAt:s?.createdAt??e.now,updatedAt:e.now}),p=s?["resolved","rejected","expired"].includes(s.status)?"reopened":"merged":"created";return ie({before:s,candidate:a,review:e.review,decision:p,addedEvidence:d,removedEvidence:r.map(f=>f.evidence),reason:p==="created"?"Created a bounded candidate from an authorized cross-Work Harness claim.":p==="reopened"?"New authorized evidence reopened the prior candidate.":"Merged new authorized evidence into the existing candidate.",now:e.now})}o(it,"upsertCandidateFromReview");function ie(e){let t=xe({schemaVersion:"openpond.harnessRefinementCandidateLifecycleReceipt.v1",id:`candidate-lifecycle-${D({candidate:z(e.candidate),review:z(e.review),decision:e.decision}).slice(0,24)}`,candidateId:e.candidate.id,decision:e.decision,beforeCandidate:e.before?z(e.before):null,afterCandidate:z(e.candidate),review:z(e.review),addedEvidence:e.addedEvidence,removedEvidence:e.removedEvidence,reason:e.reason,createdAt:e.now});return{candidate:e.candidate,receipt:t}}o(ie,"transition");function oe(e,t,s){return e.flatMap(r=>{let i=t.get(r.sourceRef);return!i||i.state!=="authorized"?(s.push(r),[]):[{...r,sourcePolicy:i}]})}o(oe,"reauthorizedEvidence");function ct(e){return[...new Map(e.map(t=>[t.occurrenceKey,t])).values()].sort((t,s)=>t.occurredAt.localeCompare(s.occurredAt)||t.occurrenceKey.localeCompare(s.occurrenceKey))}o(ct,"uniqueEvidence");function V(e){return[...new Map(e.map(t=>[`${t.id}:${t.contentHash}`,t])).values()]}o(V,"uniqueRefs");function z(e){return{id:e.id,contentHash:e.contentHash}}o(z,"artifactRef");function we(e){let{contentHash:t,...s}=e;return s}o(we,"withoutHash");var dt={memory:!0,prompt:!0,skill:!0,agent:!1};async function je(e){if(e.candidate.status!=="confirmed")return null;if(e.review.classification!=="harness_maintenance"||e.review.contentHash!==e.candidate.sourceReviews.at(-1)?.contentHash)throw new Error("Cross-run continuation requires the candidate's confirming Harness review.");let t=await e.store.getHarnessWorkspace(e.candidate.workspaceRef),s=t?.currentChannel.release??null;if(!t||t.location!=="local"||!s)throw new Error("Cross-run continuation requires an active Local Harness release.");let r=Pe({workspaceRef:t.id,candidateFingerprint:e.candidate.fingerprint,admittedHarness:s}),i=(e.now??(()=>new Date().toISOString()))(),u=qe({schemaVersion:"openpond.harnessCrossRunRefinementRequest.v1",id:`cross-run-refinement-${r.slice(0,24)}`,ownerScope:t.ownerScope,workspaceRef:t.id,candidate:ce(e.candidate),candidateFingerprint:e.candidate.fingerprint,review:ce(e.review),admittedHarness:s,evidence:e.candidate.occurrences,capabilities:dt,deduplicationKey:r,createdAt:i}),c=await e.store.saveHarnessCrossRunRefinementRequestIfAbsent({workspaceId:t.id,request:u});if(!c.created)return null;let d=await ut(e.store,t.id,c.request.evidence);if(d.length===0)throw new Error("Confirmed cross-run candidate has no verifiable source observations.");let m=`cross-run-${c.request.deduplicationKey.slice(0,24)}`,H=await Te({store:e.store,runId:m,workspace:t,harnessRelease:c.request.admittedHarness,admittedAt:c.request.createdAt}),b=lt({request:c.request,overlay:H,observations:d});await e.store.saveHarnessImprovementArtifact(t.id,"trigger_decision",b);let l=await Be({store:e.store,storeDir:e.storeDir,trigger:b,additionalEvidence:{reviewScope:"cross_run_candidate",request:c.request,candidate:e.candidate,review:e.review},reviewScope:"cross_run_candidate",stream:e.stream,signal:e.signal,now:e.now}),a=e.candidate;return l.applyReceipt?.decision==="applied"&&(a=await Ue({store:e.store,candidate:a,review:e.review,relatedHarnessRelease:l.workspace.currentChannel.release??null,reason:"The confirmed candidate produced a validated applied Harness change and now awaits independent outcome evidence.",now:(e.now??(()=>new Date().toISOString()))()})),{candidate:a,worker:l}}o(je,"continueConfirmedLocalHarnessCandidate");function lt(e){let t=e.observations.slice(0,100).map(ce);return Ie({schemaVersion:"openpond.refinementTriggerDecision.v1",id:`cross-run-trigger-${e.request.deduplicationKey.slice(0,24)}`,runRef:e.overlay.runId,turnId:`candidate-${e.request.candidate.id}`,harnessRelease:e.request.admittedHarness,overlay:{id:e.overlay.id,revision:e.overlay.revision,contentHash:e.overlay.contentHash},observations:t,decision:"queue_refiner",deterministicRoute:null,suggestedRoutes:[],reason:"A confirmed authorized cross-Work candidate is ready for one bounded Refiner continuation.",deduplicationKey:e.request.deduplicationKey,policy:{schemaVersion:"openpond.refinementTriggerPolicy.v1",maxEstimatedCostUsd:.05,cooldownMs:0,maxPendingPlans:1,maxEvidenceEvents:100,maxProposalEdits:4,maxProposalBytes:2e4},estimatedMaxCostUsd:.05,pendingPlanCount:0,boundary:{kind:"turn_completed",eventSequence:0,occurredAt:e.request.createdAt},cooldownUntil:null,createdAt:e.request.createdAt,metadata:{origin:"cross_run_candidate",crossRunRefinementRequest:ce(e.request),candidate:e.request.candidate}})}o(lt,"createCrossRunTrigger");async function ut(e,t,s){let[r,i,u,c]=await Promise.all([e.listHarnessImprovementArtifacts(t,"observation",1e3),e.listHarnessImprovementArtifacts(t,"trigger_decision",1e3),e.listHarnessImprovementArtifacts(t,"route_decision",1e3),e.listHarnessImprovementArtifacts(t,"refiner_outcome",1e3)]),d=new Map(r.map(a=>[B(a),a])),m=new Map(i.map(a=>[B(a),a])),H=new Map(u.map(a=>[B(a),a])),b=new Map(c.map(a=>[B(a),a])),l=new Map;for(let a of s){if(a.kind==="observation"){let R=d.get(B(a.evidence));R&&l.set(B(R),R);continue}let p=a.kind==="route_decision"?H.get(B(a.evidence))?.trigger:a.kind==="refiner_outcome"?b.get(B(a.evidence))?.trigger:null,f=p?m.get(B(p)):null;for(let R of f?.observations??[]){let A=d.get(B(R));A&&l.set(B(A),A)}}return[...l.values()].sort((a,p)=>a.createdAt.localeCompare(p.createdAt)||a.id.localeCompare(p.id))}o(ut,"resolveCandidateObservations");function ce(e){return{id:e.id,contentHash:e.contentHash}}o(ce,"artifactRef");function B(e){return`${e.id}:${e.contentHash}`}o(B,"artifactKey");var mt=C.object({sourceRef:C.string().trim().min(1),policy:C.object({id:C.string().trim().min(1),contentHash:C.string().regex(/^[a-f0-9]{64}$/)}).strict(),state:C.enum(["authorized","revoked","deleted","expired"]),checkedAt:C.string().datetime()}).strict(),vt=C.object({previousWatermark:Se.nullable().optional(),sourcePolicies:C.array(mt).max(1e4).default([]),limits:C.object({maxEvidence:C.number().int().min(1).max(1e3).default(200),maxTokens:C.number().int().min(1).max(1e6).default(5e4),maxDurationMs:C.number().int().min(1).max(3e5).default(24e4),maxEstimatedCostUsd:C.number().finite().nonnegative().default(.1),maxPrecedingTurns:C.number().int().min(0).max(10).default(3),maxConversationChars:C.number().int().min(0).max(1e5).default(12e3),maxContextEvents:C.number().int().min(1).max(100).default(12),maxArtifactDiagnostics:C.number().int().min(0).max(100).default(20),maxLaterResults:C.number().int().min(0).max(50).default(8)}).strict().default({maxEvidence:200,maxTokens:5e4,maxDurationMs:24e4,maxEstimatedCostUsd:.1,maxPrecedingTurns:3,maxConversationChars:12e3,maxContextEvents:12,maxArtifactDiagnostics:20,maxLaterResults:8})}).strict(),de=new WeakMap;function Qe(e){let t=de.get(e.store);if(t)return t;let s=pt(e).finally(()=>{de.get(e.store)===s&&de.delete(e.store)});return de.set(e.store,s),s}o(Qe,"reviewSelectedLocalHarnessEvaluation");async function pt(e){let t=vt.parse(e.request??{}),s=performance.now(),r=await ae(e.store);if(!r)throw new Error("No Local Harness release is selected for evaluation review.");let i=await e.store.getHarnessWorkspace(r.workspaceId);if(!i)throw new Error(`Selected Harness workspace ${r.workspaceId} does not exist.`);let[u,c,d,m,H,b,l,a]=await Promise.all([e.store.listHarnessImprovementArtifacts(i.id,"evaluation_review",1e3),e.store.listHarnessImprovementArtifacts(i.id,"route_decision",1e3),e.store.listHarnessImprovementArtifacts(i.id,"trigger_decision",1e3),e.store.listHarnessImprovementArtifacts(i.id,"observation",1e3),e.store.listHarnessImprovementArtifacts(i.id,"apply_receipt",1e3),e.store.listHarnessImprovementArtifacts(i.id,"refiner_outcome",1e3),e.store.listHarnessAdvanceReceipts(i.id),e.store.listHarnessRefinementCandidates(i.id)]),p=u[0]??null,f=t.previousWatermark??p?.nextWatermark??null,R=c,A=d,w=m,T=H,M=b,F=[...R,...w,...M];if(t.previousWatermark===void 0&&p&&!F.some(n=>n.createdAt>p.nextWatermark.throughCreatedAt)){let n=(e.now??(()=>new Date().toISOString()))(),y=await fe({store:e.store,workspace:i,review:p,sourcePolicies:new Map(t.sourcePolicies.map(k=>[k.sourceRef,J(k)])),now:n,upsertReviewClaim:!1});return await Ke({...e,candidate:y.activeCandidate,review:p}),p}let $=new Map(A.map(n=>[P(n),n])),Y=new Set(A.filter(n=>n.metadata.origin==="cross_run_candidate").map(P)),W=new Map(w.map(n=>[P(n),n])),O=new Map(t.sourcePolicies.map(n=>[n.sourceRef,n])),g=ze({store:e.store,workspace:i,sourcePolicies:O,observations:w,triggers:A,outcomes:M,applyReceipts:T,advanceReceipts:l,limits:{maxPrecedingTurns:t.limits.maxPrecedingTurns,maxConversationChars:t.limits.maxConversationChars,maxContextEvents:t.limits.maxContextEvents,maxArtifactDiagnostics:t.limits.maxArtifactDiagnostics,maxLaterResults:t.limits.maxLaterResults}}),v=[],_=[],I=new Set,E=new Set(R.map(n=>P(n.trigger)));for(let n of R){let y=$.get(P(n.trigger));if(!y){v.push({evidence:q(n),sourcePolicy:null,reason:"unverified"});continue}if(Y.has(P(y))){v.push({evidence:q(n),sourcePolicy:null,reason:"resolved"});continue}let k=y.observations.map(j=>W.get(P(j))).filter(j=>!!j);for(let j of k)I.add(P(j));_.push({id:`route_decision:${n.id}`,artifact:n,kind:"route_decision",sourceRef:k[0]?.runRef??y.runRef,payload:{routeDecision:n,trigger:y,observations:k,turnContexts:await Ve(k,g)}})}for(let n of M){if(E.has(P(n.trigger)))continue;let y=$.get(P(n.trigger));if(!y){v.push({evidence:q(n),sourcePolicy:null,reason:"unverified"});continue}if(Y.has(P(y))){v.push({evidence:q(n),sourcePolicy:null,reason:"resolved"});continue}let k=y.observations.map(K=>W.get(P(K))).filter(K=>!!K);for(let K of k)I.add(P(K));let j=n.proposal?T.filter(K=>P(K.proposal)===P(n.proposal)):[];_.push({id:`refiner_outcome:${n.id}`,artifact:n,kind:"refiner_outcome",sourceRef:k[0]?.runRef??y.runRef,payload:{outcome:n,trigger:y,observations:k,turnContexts:await Ve(k,g),applyReceipts:j}})}for(let n of w)I.has(P(n))||_.push({id:`observation:${n.id}`,artifact:n,kind:"observation",sourceRef:n.runRef,payload:{observation:n,turnContext:await g(n)}});let S=[],x=[],Z=0,ue=0;for(let n of _.slice().sort((y,k)=>y.artifact.createdAt.localeCompare(k.artifact.createdAt)||y.id.localeCompare(k.id))){if(performance.now()-s>=t.limits.maxDurationMs){v.push({evidence:q(n.artifact),sourcePolicy:null,reason:"budget"});continue}if(f&&n.artifact.createdAt<=f.throughCreatedAt){v.push({evidence:q(n.artifact),sourcePolicy:null,reason:"before_watermark"});continue}if(Z>=t.limits.maxEvidence){v.push({evidence:q(n.artifact),sourcePolicy:null,reason:"budget"});continue}Z+=1;let y=Math.ceil(JSON.stringify(n.payload).length/4);if(ue+y>t.limits.maxTokens){v.push({evidence:q(n.artifact),sourcePolicy:null,reason:"budget"});continue}ue+=y,x.push(n.artifact);let k=O.get(n.sourceRef);if(!k||k.state!=="authorized"){v.push({evidence:q(n.artifact),sourcePolicy:k?J(k):null,reason:k&&k.state!=="authorized"?k.state:"unverified"});continue}S.push(n)}let h={schemaVersion:"openpond.harnessEvaluationReviewModelDecision.v2",decision:"no_action",reason:"No authorized unresolved evidence qualified for model review.",ignoredEvidence:[]},G={promptTokens:0,completionTokens:0,totalTokens:0},se={selectedIds:null};if(S.length>0&&t.limits.maxEstimatedCostUsd===0){for(let n of S)v.push({evidence:q(n.artifact),sourcePolicy:J(O.get(n.sourceRef)),reason:"budget"});h={schemaVersion:"openpond.harnessEvaluationReviewModelDecision.v2",decision:"no_action",reason:"Continuous review is disabled by a zero model-cost ceiling.",ignoredEvidence:S.map(n=>({id:n.id,reason:"The configured model-cost ceiling is zero."}))}}else if(S.length>0){if(!e.stream)throw new Error("Harness continuous review requires a model stream.");h=await Ce({evidence:S.map(n=>({id:n.id,evidence:q(n.artifact),kind:n.kind,sourceRef:n.sourceRef,occurredAt:n.artifact.createdAt,payload:n.payload})),harnessRelease:q(r.harnessRelease),previousReviews:u.slice(0,20),candidates:a.map(n=>({id:n.id,fingerprint:n.fingerprint,statement:n.statement,status:n.status,occurrences:n.occurrences,relatedHarnessReleases:n.relatedHarnessReleases,resolution:n.resolution})),stream:o(async function*(n){let y=null;for await(let k of e.stream(n))k.usage&&(y=k.usage),yield k;y&&(G={promptTokens:G.promptTokens+y.promptTokens,completionTokens:G.completionTokens+y.completionTokens,totalTokens:G.totalTokens+y.totalTokens})},"stream"),signal:e.signal??new AbortController().signal,timeoutMs:t.limits.maxDurationMs,onNavigation:o(n=>{se.selectedIds=new Set(n.selectedEvidenceIds)},"onNavigation")})}let He=se.selectedIds?S.filter(n=>!se.selectedIds.has(n.id)):[];for(let n of He)v.push({evidence:q(n.artifact),sourcePolicy:J(O.get(n.sourceRef)),reason:"budget"});let me=h.decision==="review"||h.decision==="resolve_candidate"?h.selectedEvidenceIds.map(n=>{let y=S.find(k=>k.id===n);if(!y)throw new Error(`Review selected unavailable evidence ${n}.`);return y}):[],ve=h.decision==="review"?h.classification:"no_action",pe=me.map(n=>ft(n,O.get(n.sourceRef))),re=(e.now??(()=>new Date().toISOString()))(),Xe=new Set(He.map(n=>P(n.artifact))),he=x.filter(n=>!Xe.has(P(n))),ye=he.map(n=>n.createdAt).sort().at(-1),ke=ye?Ne(f?.throughCreatedAt,ye):Ne(f?.throughCreatedAt,re),Ee=D({previousCursor:f?.cursor??null,throughCreatedAt:ke,examined:he.map(q)}),et=`evaluation-review-${D({workspaceId:i.id,harnessRelease:r.harnessRelease,previousWatermark:f,cursor:Ee}).slice(0,24)}`,X=Ae({schemaVersion:"openpond.harnessEvaluationReviewReceipt.v1",id:et,ownerScope:i.ownerScope,workspaceRef:i.id,harnessRelease:q(r.harnessRelease),previousWatermark:f,nextWatermark:{cursor:Ee,throughCreatedAt:ke},selectedEvidence:pe,excludedEvidence:v,claim:h.decision==="review"?{fingerprint:D({schemaVersion:"openpond.harnessRefinementCandidateFingerprint.v1",classification:ve,triageLayer:h.triageLayer,recurrenceFamily:Rt(h.recurrenceFamily)}),recurrenceFamily:h.recurrenceFamily,statement:h.statement,...h.classification==="harness_maintenance"?{candidateDisposition:h.candidateDisposition}:{},independentOccurrences:new Set(me.map(n=>n.sourceRef)).size,unresolvedOccurrences:new Set(me.map(n=>n.sourceRef)).size}:null,classification:ve,triage:h.decision==="review"?[{layer:h.triageLayer,status:"unresolved",reason:h.reason,evidenceRefs:pe.map(n=>n.evidence)}]:[],reason:h.reason,nextAuthority:wt(ve),maxEstimatedCostUsd:t.limits.maxEstimatedCostUsd,tasksetProposal:null,evaluation:null,trainingQualification:null,policyVersion:"public-model-driven-harness-review-v1",createdAt:re,metadata:{examinedEvidence:Z,fullyReviewedEvidence:se.selectedIds?.size??S.length,estimatedTokens:ue,elapsedMs:performance.now()-s,explicitInvocation:!0,modelDecision:h.decision,modelConfidence:h.decision==="review"||h.decision==="resolve_candidate"?h.confidence:null,counterevidence:h.decision==="review"?h.counterevidence:null,expectedOutcome:h.decision==="review"?h.expectedOutcome:null,ignoredEvidence:h.ignoredEvidence,modelUsage:G}});await e.store.saveHarnessImprovementArtifact(i.id,"evaluation_review",X);let be=await fe({store:e.store,workspace:i,review:X,sourcePolicies:new Map(t.sourcePolicies.map(n=>[n.sourceRef,J(n)])),now:re});if(h.decision==="resolve_candidate"){let n=be.candidates.find(y=>y.id===h.candidateId&&y.fingerprint===h.candidateFingerprint);if(!n)throw new Error("Later-success decision referenced an unavailable candidate.");await Fe({store:e.store,candidate:n,review:X,evidence:pe,reason:h.reason,now:re})}return await Ke({...e,candidate:be.activeCandidate,review:X}),X}o(pt,"runSelectedLocalHarnessEvaluation");async function Ke(e){!e.continuation||e.candidate?.status!=="confirmed"||await je({store:e.store,storeDir:e.continuation.storeDir,candidate:e.candidate,review:e.review,stream:e.continuation.stream,signal:e.signal??new AbortController().signal,now:e.now})}o(Ke,"continueCandidateIfEnabled");function q(e){return{id:e.id,contentHash:e.contentHash}}o(q,"artifactRef");function P(e){return`${e.id}:${e.contentHash}`}o(P,"artifactKey");function J(e){return{policy:e.policy,state:e.state,checkedAt:e.checkedAt}}o(J,"sourcePolicyRef");function ft(e,t){return{evidence:q(e.artifact),kind:e.kind,sourceRef:e.sourceRef,sourcePolicy:J(t),occurrenceKey:D({evidence:q(e.artifact),sourceRef:e.sourceRef}),occurredAt:e.artifact.createdAt}}o(ft,"evidenceRef");function wt(e){return e==="runtime"?"runtime_service":e==="product"?"product_team":e==="taskset"||e==="harness_maintenance"?"human_review":e==="model_improvement"?"training_system":"none"}o(wt,"nextAuthority");function Ne(...e){return e.filter(t=>!!t).sort().at(-1)}o(Ne,"maxTimestamp");function Rt(e){return e.trim().toLocaleLowerCase("en-US").replace(/\s+/g," ")}o(Rt,"normalizeRecurrenceFamily");async function Ve(e,t){let s=new Map;for(let r of e)s.set(`${r.runRef}:${r.turnId}`,r);return Promise.all([...s.values()].map(t))}o(Ve,"uniqueTurnContexts");var Je="local-personal-work-v1";async function le(e){let t=await ae(e.store);if(!t||t.workspaceId!==e.workspaceId)throw new Error("Evaluation review requires the selected Personal Local Harness.");let s=await e.store.getHarnessWorkspace(e.workspaceId);if(!s||s.ownerScope.kind!=="personal"||s.location!=="local")throw new Error("Evaluation review requires the selected Personal Local Harness.");let[r,i]=await Promise.all([e.store.listHarnessImprovementArtifacts(e.workspaceId,"observation",1e4),e.store.listHarnessImprovementArtifacts(e.workspaceId,"trigger_decision",1e4)]),u=new Set([...r.map(m=>m.runRef),...i.map(m=>m.runRef)]),c=(e.now??(()=>new Date().toISOString()))(),d=await Promise.all([...u].sort().map(async m=>{let H=await e.store.getSession(m);return{sourceRef:m,policy:{id:`source-policy-${D({workspaceId:e.workspaceId,sourceRef:m,policyVersion:Je}).slice(0,24)}`,contentHash:D({workspaceId:e.workspaceId,sourceRef:m,policyVersion:Je})},state:H?"authorized":"deleted",checkedAt:c}}));return Qe({store:e.store,request:{sourcePolicies:d,limits:{maxEvidence:200,maxTokens:5e4,maxDurationMs:24e4,maxEstimatedCostUsd:e.maxEstimatedCostUsd}},stream:e.stream,signal:e.signal,now:e.now,continuation:e.stream?{storeDir:e.storeDir,stream:e.stream}:void 0})}o(le,"reviewSelectedLocalHarnessEvaluationFromHost");var gt=15e3;function Re(e,t){if(e==="manual")return null;let s=new Date(t);return s.setUTCDate(s.getUTCDate()+(e==="daily"?1:7)),s.toISOString()}o(Re,"nextHarnessEvaluationReviewRunAt");function us(e){let t=null,s=null,r=e.now??(()=>new Date().toISOString());async function i(){return s||(s=(async()=>{let u=await e.store.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:te});if(!u)return null;let c=await e.store.getHarnessEvaluationReviewSettings(u.id),d=r();if(!c.enabled&&!c.activityEnabled)return null;let m=c.enabled&&c.cadence!=="manual"&&!!c.nextRunAt&&c.nextRunAt<=d,H=c.activityEnabled&&await Ht({store:e.store,workspaceId:u.id,batchSize:c.activityBatchSize});if(!m&&!H)return null;let b={...c,nextRunAt:m?Re(c.cadence,d):c.nextRunAt,lastRunAt:d,lastError:null,updatedAt:d};await e.store.setHarnessEvaluationReviewSettings({workspaceId:u.id,settings:b});try{let l=await le({store:e.store,storeDir:e.storeDir,workspaceId:u.id,maxEstimatedCostUsd:c.maxEstimatedCostUsd,stream:e.stream,now:r});return await e.store.setHarnessEvaluationReviewSettings({workspaceId:u.id,settings:{...b,lastResult:{id:l.id,contentHash:l.contentHash,classification:l.classification},updatedAt:r()}}),e.logger?.info("Harness evaluation review schedule completed",{workspaceId:u.id,reviewId:l.id,classification:l.classification}),l}catch(l){let a=l instanceof Error?l.message:String(l);return await e.store.setHarnessEvaluationReviewSettings({workspaceId:u.id,settings:{...b,lastError:a,updatedAt:r()}}),e.logger?.warn("Harness evaluation review schedule failed",{workspaceId:u.id,error:a}),null}})().finally(()=>{s=null}),s)}return o(i,"runDueNow"),{start(){t||(t=setInterval(()=>{e.isClosing()||i()},e.tickMs??gt),t.unref?.(),i())},async stop(){t&&clearInterval(t),t=null,await s},runDueNow:i}}o(us,"createLocalHarnessEvaluationReviewScheduler");async function Ht(e){let[t,s]=await Promise.all([e.store.listHarnessImprovementArtifacts(e.workspaceId,"refiner_outcome",e.batchSize),e.store.listHarnessImprovementArtifacts(e.workspaceId,"evaluation_review",1)]),r=s[0]?.nextWatermark.throughCreatedAt??null;return t.filter(i=>!r||i.createdAt>r).length>=e.batchSize}o(Ht,"hasEventDrivenReviewBatch");import ge from"node:path";function Us(e){return{harnessHistoryPayload:o(()=>U(e.store),"harnessHistoryPayload"),updateHarnessBackgroundReviewPayload:o(t=>It({store:e.store,request:kt(t)}),"updateHarnessBackgroundReviewPayload"),reviewHarnessEvaluationPayload:o(t=>At({store:e.store,storeDir:e.storeDir,stream:e.evaluationReviewStream,request:ht(t)}),"reviewHarnessEvaluationPayload"),updateHarnessEvaluationReviewSchedulePayload:o(t=>Ct({store:e.store,request:yt(t)}),"updateHarnessEvaluationReviewSchedulePayload"),harnessDiffPayload:o(t=>qt({...e,request:Et(t)}),"harnessDiffPayload"),rollbackHarnessPayload:o(t=>_t({...e,request:bt(t)}),"rollbackHarnessPayload"),reviewHarnessProposalPayload:o(t=>Dt({...e,request:St(t)}),"reviewHarnessProposalPayload")}}o(Us,"createLocalHarnessSettingsRoutePayloads");function ht(e){if(!e||typeof e!="object")throw new Error("Harness evaluation review requires a workspace.");let t=e;if(typeof t.workspaceId!="string")throw new Error("Harness evaluation review requires a workspace.");if(t.maxEstimatedCostUsd!==void 0&&(typeof t.maxEstimatedCostUsd!="number"||!Number.isFinite(t.maxEstimatedCostUsd)||t.maxEstimatedCostUsd<0))throw new Error("Harness evaluation review cost must be a non-negative number.");return{workspaceId:t.workspaceId,maxEstimatedCostUsd:t.maxEstimatedCostUsd}}o(ht,"parseHarnessEvaluationReviewRequest");function yt(e){if(!e||typeof e!="object")throw new Error("Harness evaluation review schedule requires a workspace and cadence.");let t=e;if(typeof t.workspaceId!="string"||typeof t.enabled!="boolean"||typeof t.activityEnabled!="boolean"||typeof t.activityBatchSize!="number"||!Number.isInteger(t.activityBatchSize)||t.activityBatchSize<1||t.activityBatchSize>100||t.cadence!=="manual"&&t.cadence!=="daily"&&t.cadence!=="weekly"||typeof t.maxEstimatedCostUsd!="number"||!Number.isFinite(t.maxEstimatedCostUsd)||t.maxEstimatedCostUsd<0)throw new Error("Harness evaluation review schedule requires a valid workspace, cadence, and cost limit.");return{workspaceId:t.workspaceId,enabled:t.enabled,activityEnabled:t.activityEnabled,activityBatchSize:t.activityBatchSize,cadence:t.cadence,maxEstimatedCostUsd:t.maxEstimatedCostUsd}}o(yt,"parseHarnessEvaluationReviewScheduleRequest");function kt(e){if(!e||typeof e!="object")throw new Error("Harness background review requires a workspace and enabled state.");let t=e;if(typeof t.workspaceId!="string"||typeof t.enabled!="boolean")throw new Error("Harness background review requires a workspace and enabled state.");return{workspaceId:t.workspaceId,enabled:t.enabled}}o(kt,"parseHarnessBackgroundReviewRequest");function Ye(e,t){if(!e||typeof e!="object")throw new Error(`${t} requires an id and content hash.`);let s=e;if(typeof s.id!="string"||typeof s.contentHash!="string")throw new Error(`${t} requires an id and content hash.`);return{id:s.id,contentHash:s.contentHash}}o(Ye,"parseHarnessReleaseRef");function Et(e){if(!e||typeof e!="object")throw new Error("Harness release diff requires a workspace and target release.");let t=e;if(typeof t.workspaceId!="string")throw new Error("Harness release diff requires a workspace and target release.");return{workspaceId:t.workspaceId,baseRelease:t.baseRelease===null?null:Ye(t.baseRelease,"Harness base release"),targetRelease:Ye(t.targetRelease,"Harness target release")}}o(Et,"parseHarnessReleaseDiffRequest");function bt(e){if(!e||typeof e!="object")throw new Error("Harness rollback requires a workspace and target release.");let t=e,s=t.targetRelease;if(typeof t.workspaceId!="string"||!s||typeof s!="object")throw new Error("Harness rollback requires a workspace and target release.");let r=s;if(typeof r.id!="string"||typeof r.contentHash!="string")throw new Error("Harness rollback target requires an id and content hash.");return{workspaceId:t.workspaceId,targetRelease:{id:r.id,contentHash:r.contentHash}}}o(bt,"parseHarnessRollbackRequest");function St(e){if(!e||typeof e!="object")throw new Error("Harness review requires a workspace, proposal, and decision.");let t=e,s=t.proposal;if(typeof t.workspaceId!="string"||t.decision!=="approve"&&t.decision!=="decline"||!s||typeof s!="object")throw new Error("Harness review requires a workspace, proposal, and decision.");let r=s;if(typeof r.id!="string"||typeof r.contentHash!="string")throw new Error("Harness proposal review requires an id and content hash.");return{workspaceId:t.workspaceId,proposal:{id:r.id,contentHash:r.contentHash},decision:t.decision}}o(St,"parseHarnessProposalReviewRequest");async function U(e){let t=await e.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:te});if(!t)return{workspace:null,backgroundReview:{enabled:!1,updatedAt:null},evaluationReviewSchedule:{enabled:!1,activityEnabled:!1,activityBatchSize:10,cadence:"manual",maxEstimatedCostUsd:0,nextRunAt:null,lastRunAt:null,lastResult:null,lastError:null,updatedAt:null},releases:[],changes:[],routes:[],evaluationReviews:[],refinementCandidates:[],modelImprovementQualifications:[],pendingReviews:[],memories:[]};let[s,r,i,u,c,d,m,H,b,l,a,p,f]=await Promise.all([e.getHarnessBackgroundReviewSettings(t.id),e.getHarnessEvaluationReviewSettings(t.id),e.listHarnessReleaseRecords(t.id),e.listHarnessAdvanceReceipts(t.id),e.listHarnessImprovementArtifacts(t.id,"proposal",1e3),e.listHarnessImprovementArtifacts(t.id,"targeted_validation",1e3),e.listHarnessImprovementArtifacts(t.id,"route_decision",1e3),e.listHarnessImprovementArtifacts(t.id,"evaluation_review",1e3),e.listHarnessRefinementCandidates(t.id),e.listHarnessImprovementArtifacts(t.id,"training_qualification",1e3),e.listHarnessImprovementArtifacts(t.id,"apply_receipt",1e3),e.listHarnessImprovementArtifacts(t.id,"refiner_outcome",1e3),e.listHarnessImprovementArtifacts(t.id,"trigger_decision",1e3)]),R=c,A=d,w=m,T=a,M=p,F=f,$=u.slice().reverse().map(g=>{let v=g.proposal?R.find(E=>E.id===g.proposal.id&&E.contentHash===g.proposal.contentHash)??null:null,_=v?M.find(E=>E.proposal?.id===v.id&&E.proposal.contentHash===v.contentHash)??null:null,I=_?F.find(E=>E.id===_.trigger.id&&E.contentHash===_.trigger.contentHash)??null:null;return{receipt:g,proposal:v,validations:v?A.filter(E=>E.proposal.id===v.id&&E.proposal.contentHash===v.contentHash):[],routeDecision:v?w.find(E=>E.metadata.proposalId===v.id)??null:null,applyReceipt:v?T.find(E=>E.proposal.id===v.id&&E.proposal.contentHash===v.contentHash)??null:null,outcome:_,trigger:I}}),Y=new Set($.flatMap(g=>g.routeDecision?[g.routeDecision.id]:[])),W=w.filter(g=>!Y.has(g.id)).map(g=>{let v=F.find(I=>I.id===g.trigger.id&&I.contentHash===g.trigger.contentHash)??null,_=M.find(I=>I.trigger.id===g.trigger.id&&I.trigger.contentHash===g.trigger.contentHash)??null;return{decision:g,trigger:v,outcome:_}}),O=R.reduce((g,v)=>{let I=T.filter(x=>x.proposal.id===v.id&&x.proposal.contentHash===v.contentHash).sort((x,Z)=>Z.createdAt.localeCompare(x.createdAt))[0]??null;if(!I||I.decision!=="retained")return g;let E=M.find(x=>x.proposal?.id===v.id&&x.proposal.contentHash===v.contentHash)??null,S=E?F.find(x=>x.id===E.trigger.id&&x.contentHash===E.trigger.contentHash)??null:null;return g.push({proposal:v,validations:A.filter(x=>x.proposal.id===v.id&&x.proposal.contentHash===v.contentHash),applyReceipt:I,outcome:E,trigger:S}),g},[]);return{workspace:t,backgroundReview:s,evaluationReviewSchedule:r,releases:i.map(g=>({id:g.harnessRelease.id,contentHash:g.harnessRelease.contentHash,sourceRevision:g.sourceRevision,createdAt:g.createdAt,current:t.currentChannel.release?.contentHash===g.harnessRelease.contentHash,files:g.harnessRelease.files.map(v=>({id:v.id,path:v.path,contentHash:v.contentHash,sizeBytes:v.sizeBytes,mediaType:v.mediaType}))})),changes:$,routes:W,evaluationReviews:H,refinementCandidates:b,modelImprovementQualifications:l,pendingReviews:O,memories:await e.listHarnessMemories(t.id)}}o(U,"localHarnessHistoryPayload");async function At(e){let t=await e.store.getHarnessEvaluationReviewSettings(e.request.workspaceId),s=await le({store:e.store,storeDir:e.storeDir,workspaceId:e.request.workspaceId,maxEstimatedCostUsd:e.request.maxEstimatedCostUsd??t.maxEstimatedCostUsd,stream:e.stream}),r=new Date().toISOString();return await e.store.setHarnessEvaluationReviewSettings({workspaceId:e.request.workspaceId,settings:{...t,lastRunAt:r,lastResult:{id:s.id,contentHash:s.contentHash,classification:s.classification},lastError:null,updatedAt:r}}),{receipt:s,history:await U(e.store)}}o(At,"reviewLocalHarnessEvaluationFromSettings");async function Ct(e){let t=await e.store.getHarnessWorkspace(e.request.workspaceId);if(!t||t.ownerScope.kind!=="personal"||t.location!=="local")throw new Error("Evaluation review schedule requires the selected Personal Local Harness.");if((await e.store.getSelectedHarnessWorkspace({ownerKind:"personal",ownerId:te}))?.id!==t.id)throw new Error("Evaluation review schedule requires the selected Personal Local Harness.");let r=await e.store.getHarnessEvaluationReviewSettings(t.id),i=new Date().toISOString(),u=e.request.enabled&&e.request.cadence!=="manual";return await e.store.setHarnessEvaluationReviewSettings({workspaceId:t.id,settings:{...r,enabled:u,activityEnabled:e.request.activityEnabled,activityBatchSize:e.request.activityBatchSize,cadence:e.request.cadence,maxEstimatedCostUsd:e.request.maxEstimatedCostUsd,nextRunAt:u?Re(e.request.cadence,i):null,lastError:null,updatedAt:i}}),{history:await U(e.store)}}o(Ct,"updateLocalHarnessEvaluationReviewScheduleFromSettings");async function It(e){let t=await e.store.getHarnessWorkspace(e.request.workspaceId);if(!t||t.ownerScope.kind!=="personal"||t.location!=="local")throw new Error("Background review settings require the selected Personal Local Harness.");return await e.store.setHarnessBackgroundReviewSettings({workspaceId:t.id,enabled:e.request.enabled,updatedAt:new Date().toISOString()}),{history:await U(e.store)}}o(It,"updateLocalHarnessBackgroundReviewFromSettings");async function Ze(e){let t=await e.store.getHarnessReleaseRecord(e.release.contentHash);if(!t||t.workspaceId!==e.workspaceId||t.harnessRelease.id!==e.release.id||t.harnessRelease.contentHash!==e.release.contentHash)throw new Error(`${e.label} is unavailable or hash-mismatched.`);return t}o(Ze,"requireHarnessReleaseRecord");function Ge(e,t){let s=ge.resolve(e.bundlePath,"source"),r=ge.resolve(s,...t.split("/"));if(r!==s&&!r.startsWith(`${s}${ge.sep}`))throw new Error(`Harness release contains an unsafe file path: ${t}.`);return r}o(Ge,"releaseSourcePath");function xt(e){return e.patch.split(`
|
|
5
5
|
`).map(t=>t.startsWith("diff --git ")?`diff --git a/${e.filePath} b/${e.filePath}`:t.startsWith("--- ")?e.baseExists?`--- a/${e.filePath}`:"--- /dev/null":t.startsWith("+++ ")?e.targetExists?`+++ b/${e.filePath}`:"+++ /dev/null":t).join(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{v as r}from"./chunk-HG2YFMVU.js";import{v as o}from"./chunk-D6L6UNUQ.js";import{l as t}from"./chunk-ZY32SZ2P.js";import{g as a}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";var s=e.object({profileRef:r,manifest:o,metric:t,gradeRefs:e.array(a),receiptRefs:e.array(a),passRate:e.number().min(0).max(1),passed:e.boolean(),completedAt:e.string().datetime(),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict();export{s as a};
|