openpond 0.2.67 → 0.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +668 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/account-context-V3KLSNKS.js +12 -0
- package/dist/chunks/{acp-NASAJV5E.js → acp-ER6CUXG2.js} +1 -1
- package/dist/chunks/{acp-agent-C3CRF6DT.js → acp-agent-AYJ5RPVF.js} +1 -1
- package/dist/chunks/actions-command-BBUS3HDK.js +2 -0
- package/dist/chunks/{app-layer-XIEZ6ALX.js → app-layer-JCEWGUDH.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-ILXBFD3S.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-43MCH5SY.js +2 -0
- package/dist/chunks/apps-VNFGMQFG.js +2 -0
- package/dist/chunks/{chunk-W3ZILZUL.js → chunk-22RLEU3Q.js} +1 -1
- package/dist/chunks/chunk-2PXKSAG6.js +2 -0
- package/dist/chunks/{chunk-XEU4J4GJ.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-AXO6OHJB.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/{chunk-V3T2OJBZ.js → chunk-4BUM6JEC.js} +2 -2
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-43QYVOYA.js → chunk-4KNPCJR4.js} +1 -1
- package/dist/chunks/chunk-4KTGYHCE.js +2 -0
- package/dist/chunks/chunk-4PUOWSDE.js +13 -0
- package/dist/chunks/chunk-55YD4UTW.js +2 -0
- package/dist/chunks/chunk-5G7BQAUA.js +2 -0
- package/dist/chunks/chunk-65FJWWXG.js +2 -0
- package/dist/chunks/{chunk-4EZI4KCT.js → chunk-65WRWLUD.js} +1 -1
- package/dist/chunks/chunk-6D3FI2XT.js +2 -0
- package/dist/chunks/chunk-7EQLW2KM.js +12 -0
- package/dist/chunks/{chunk-5TPYBXWM.js → chunk-7NCM6GBN.js} +1 -1
- package/dist/chunks/chunk-7OFD6TFD.js +2 -0
- package/dist/chunks/chunk-7OKZCJHS.js +3 -0
- package/dist/chunks/{chunk-ADOCQA4D.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-YR5URT73.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-FVK4W27G.js → chunk-AFH462DO.js} +1 -1
- package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
- package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
- package/dist/chunks/{chunk-U3MVH2YT.js → chunk-APKXXAUF.js} +1 -1
- package/dist/chunks/chunk-AQUZCWM3.js +2 -0
- package/dist/chunks/chunk-AUO5DCEU.js +2 -0
- package/dist/chunks/chunk-AYOMVI7J.js +2 -0
- package/dist/chunks/{chunk-RWRKUO5D.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/chunk-BDZDWHBJ.js +6 -0
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-P6NQYXN6.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-YONDU5TN.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-ATFV2NA4.js → chunk-CO23RRN7.js} +1 -1
- package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
- package/dist/chunks/chunk-DDOIPTOM.js +2 -0
- package/dist/chunks/{chunk-CSU7RDA5.js → chunk-DKOVZ6R2.js} +3 -3
- package/dist/chunks/chunk-DRLP7GIU.js +2 -0
- package/dist/chunks/{chunk-XDFXKRTI.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-IDILAYCW.js → chunk-E2JB5OCO.js} +1 -1
- package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
- package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
- package/dist/chunks/{chunk-CX7HKSQ4.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-D5OFN47Z.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-36FNNR5N.js → chunk-EWDDDHJN.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-R6VI7MX5.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/{chunk-WD6ANOLL.js → chunk-FNGZ4UDZ.js} +1 -1
- package/dist/chunks/{chunk-YKTJPCYZ.js → chunk-G4FRBT7G.js} +4 -4
- package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
- package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
- package/dist/chunks/{chunk-CWAQOFLP.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-YQBL5P6R.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/{chunk-VEXJV5H5.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-B2K5WQZE.js → chunk-IO5DZUKL.js} +1 -1
- package/dist/chunks/chunk-J256AEEE.js +2 -0
- package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
- package/dist/chunks/{chunk-YMCF5GR2.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-6LFTQBXP.js → chunk-JT5YQ52I.js} +1 -1
- package/dist/chunks/chunk-JVMSN7LH.js +2 -0
- package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
- package/dist/chunks/{chunk-WDKZMXIU.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-UBTP3QWI.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-R6MMWEH4.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-TV2LE2BD.js → chunk-KU4TPDPH.js} +2 -2
- package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
- package/dist/chunks/chunk-LSKMALD6.js +161 -0
- package/dist/chunks/chunk-LVXL7T5O.js +2 -0
- package/dist/chunks/{chunk-TSQ2I6XV.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-MX7KV5DA.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/chunk-M5X7XKXY.js +12 -0
- package/dist/chunks/{chunk-XT5WUQGT.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-4VZJQRQI.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-UKSSFB4Q.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-4B7EGNYX.js → chunk-NMMHXYDJ.js} +1 -1
- package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
- package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
- package/dist/chunks/chunk-NW6WGGSL.js +2 -0
- package/dist/chunks/{chunk-7P5SH3CI.js → chunk-NZDLL6JN.js} +1 -1
- package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
- package/dist/chunks/chunk-OUJ63LMU.js +2 -0
- package/dist/chunks/{chunk-SD2XDZQW.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-VPAEFG7X.js → chunk-PAYFJHPO.js} +1 -1
- package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
- package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
- package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
- package/dist/chunks/{chunk-UNE52L3Y.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-2RSGVLZT.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-SVNEPXU3.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-IF5A3XWP.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-V5AOM5MZ.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-375PADDM.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-QQLS5FB7.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-6HQUIKC5.js → chunk-R4EEGWXB.js} +1 -1
- package/dist/chunks/chunk-R6I623SZ.js +11 -0
- package/dist/chunks/chunk-RCQYEHHD.js +2 -0
- package/dist/chunks/{chunk-26ID6A5C.js → chunk-RCRZXHAI.js} +1 -1
- package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
- package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
- package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
- package/dist/chunks/{chunk-K3LS5SK7.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-XKZ4PFMQ.js → chunk-SO4GMSNP.js} +1 -1
- package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
- package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
- package/dist/chunks/{chunk-SODAOLAP.js → chunk-TB5P3FWM.js} +1 -1
- package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
- package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
- package/dist/chunks/{chunk-N54CPLVD.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-BUZ7CBJC.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-V3ILZQER.js → chunk-UMAVVMXL.js} +7 -7
- package/dist/chunks/chunk-V24VHT76.js +2 -0
- package/dist/chunks/chunk-VEBW7NKD.js +2 -0
- package/dist/chunks/chunk-VJR2GNRY.js +2 -0
- package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
- package/dist/chunks/{chunk-H2XG5N7D.js → chunk-VWWKWYSQ.js} +1 -1
- package/dist/chunks/chunk-WCNPGKST.js +2 -0
- package/dist/chunks/chunk-WD4KAKEX.js +2 -0
- package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
- package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
- package/dist/chunks/{chunk-RS526BG7.js → chunk-WZ35ICTE.js} +3 -3
- package/dist/chunks/chunk-XHACK2KR.js +2 -0
- package/dist/chunks/chunk-XOPHFUUY.js +2 -0
- package/dist/chunks/{chunk-ZVMQLIRA.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-KQD36SBJ.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-UXO33ST5.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-GC6RJBRZ.js → chunk-Y2WNZWT2.js} +1 -1
- package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
- package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
- package/dist/chunks/chunk-YI6ME6PU.js +22 -0
- package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
- package/dist/chunks/{chunk-QFL2VQKX.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/chunk-Z5CQXPIS.js +6 -0
- package/dist/chunks/{chunk-OY4B7Y3T.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-XGJG2ZKE.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-IR2Y2VQY.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/{command-NWOZXU57.js → command-LNOVZQSK.js} +3 -3
- package/dist/chunks/{configuration-command-ZEIBQKB3.js → configuration-command-C3QBDFND.js} +1 -1
- package/dist/chunks/connected-app-executor-LAEAQUJS.js +2 -0
- package/dist/chunks/connected-evidence-VKY6O2JW.js +2 -0
- package/dist/chunks/{connected-starting-assets-66Y46ZPM.js → connected-starting-assets-5LAJ7CZY.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-TNPTWTKK.js → continual-FVOLGGOE.js} +1 -1
- package/dist/chunks/core-commands-5TNBVR72.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
- package/dist/chunks/datasets-BIDZJYDC.js +2 -0
- package/dist/chunks/desktop-test-BY2MS3UL.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-FXB4DXZA.js +2 -0
- package/dist/chunks/experiment-improvements-JPDLKZXD.js +2 -0
- package/dist/chunks/experiments-IEN7RXLX.js +2 -0
- package/dist/chunks/experiments-signal-L32D36NH.js +2 -0
- package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
- package/dist/chunks/{help-O53DTZGN.js → help-PLQJOP4P.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-GZES7QXJ.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-V24IBVJX.js +2 -0
- package/dist/chunks/human-review-6V6EMNVN.js +2 -0
- package/dist/chunks/{import-OBAKUJPM.js → import-SI24Z7EF.js} +2 -2
- package/dist/chunks/{learning-CRR6NRPN.js → learning-LAXMGWSQ.js} +1 -1
- package/dist/chunks/learning-Y3UKNUGE.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
- package/dist/chunks/{model-projects-HP4DELCP.js → model-projects-6YWVD2TS.js} +1 -1
- package/dist/chunks/opchat-SV67HVMX.js +3 -0
- package/dist/chunks/opchat-bounded-chat-KLMIYSZZ.js +2 -0
- package/dist/chunks/organizations-OZZFX7RG.js +2 -0
- package/dist/chunks/{profile-3WZJ65CT.js → profile-TD5U3INY.js} +1 -1
- package/dist/chunks/project-action-payload-TK6G4VMC.js +2 -0
- package/dist/chunks/project-agent-FFXPNXCO.js +2 -0
- package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
- package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
- package/dist/chunks/{runtime-XP4DEGR3.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-4BCUDAED.js +2 -0
- package/dist/chunks/{sandbox-template-YFMHEMUQ.js → sandbox-template-GOY7QQUY.js} +1 -1
- package/dist/chunks/saved-work-M6PUHKCC.js +2 -0
- package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
- package/dist/chunks/setup-RMZ2BHLM.js +2 -0
- package/dist/chunks/{src-GQPWOPYA.js → src-C3ZUESMK.js} +1 -1
- package/dist/chunks/src-MT4B43TD.js +424 -0
- package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
- package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-VVRQO2JK.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
- package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
- package/dist/chunks/{store-create-improve-2XI36AET.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-UFY422NG.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-SGUEYDO2.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
- package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
- package/dist/chunks/{store-learning-BFOT4QVT.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-DYTMWQTC.js → store-learning-credentials-BUHR7SN6.js} +1 -1
- package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
- package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
- package/dist/chunks/{store-model-configuration-NJFWSYSA.js → store-model-configuration-6L3OYXF4.js} +1 -1
- package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
- package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
- package/dist/chunks/{store-preference-comparison-MZAYONCK.js → store-preference-comparison-5YVIQNVB.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
- package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
- package/dist/chunks/{store-task-inbox-3BREANOX.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-5HRZCDUT.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-S3FXWLT6.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-2LCXPA7G.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-7AMKS7ZW.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-PLKWRT4X.js → taskset-UDDLFYKV.js} +1 -1
- package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
- package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
- package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
- package/dist/chunks/{teams-bot-VQXUA7U4.js → teams-bot-YCUTDDDC.js} +1 -1
- package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
- package/dist/chunks/training-5NT2YB2L.js +2 -0
- package/dist/chunks/training-5UMT45UL.js +2 -0
- package/dist/chunks/training-UY6KRG4M.js +2 -0
- package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
- package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
- package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
- package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
- package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
- package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
- package/dist/chunks/{training-hosted-learning-WQ2IP5FP.js → training-hosted-learning-E2N32YU5.js} +1 -1
- package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
- package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
- package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
- package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
- package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
- package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
- package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/runtime-handle.d.ts +3 -5
- package/dist/sandbox/sandbox-instance-client.d.ts +11 -5
- package/dist/sandbox/types/billing.d.ts +140 -6
- package/dist/sandbox/types/io.d.ts +3 -0
- package/dist/sandbox/types/responses.d.ts +11 -1
- package/dist/sandbox/types/snapshots.d.ts +52 -3
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
- package/dist/web/assets/App-CCuh99JW.js +54 -0
- package/dist/web/assets/{AppDialog-BvskhHE9.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-D2788RqX.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AttachmentTypeIcon-DVluUHuc.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-DdBZ69lI.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-ba6WupeJ.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-D7wTaEgl.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-aO90qXYz.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-BPUJBSyS.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-Bo836wKJ.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
- package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
- package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
- package/dist/web/assets/{FilePagePreview-C6wIp6uX.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-CxMv8q-h.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-CEb0cS-o.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
- package/dist/web/assets/{HtmlVisual-CCuUkYT8.js → HtmlVisual-D5y2WG9L.js} +10 -10
- package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
- package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
- package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-CFROlATQ.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
- package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
- package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
- package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
- package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
- package/dist/web/assets/{MainPane-BOWkynGB.css → MainPane-BZlNLfTM.css} +1 -1
- package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
- package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
- package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-MAJWS4mL.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-MQiUBVx3.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-DpF-aRTu.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-8gH2hyDb.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BQ98oGyu.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-CGCqZz_H.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-CqpMFLxy.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-DJvIvzBb.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-D--M876l.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-DDUoHQHU.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-CwLXn3Z7.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CGwPregx.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-D-ctFM4d.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-CQ28j3R7.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BrZs6-EW.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-CU6PSjjN.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-IjXVXpIy.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-CKXrDTEU.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-D9v2cyJa.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
- package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
- package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
- package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
- package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
- package/dist/web/assets/{chunk-TLSP5JKG-BrrVo5rJ.js → chunk-3BYFS4RO-ztZjcMmt.js} +1 -1
- package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
- package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
- package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
- package/dist/web/assets/{chunk-H3JZ3P5T-CzpTARDY.js → chunk-H3JZ3P5T-DolwEJXo.js} +2 -2
- package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
- package/dist/web/assets/client-DwZ92xtu.js +1 -0
- package/dist/web/assets/{client-choice-storage-DUWsS4X0.js → client-choice-storage-DitqKiIT.js} +1 -1
- package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
- package/dist/web/assets/common-BWVSBnpX.js +1 -0
- package/dist/web/assets/copy-DTQhoBNg.js +1 -0
- package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
- package/dist/web/assets/{cssMode-SclUkqPt.js → cssMode-BRTtfXxU.js} +1 -1
- package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
- package/dist/web/assets/external-link-H1629UU6.js +1 -0
- package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
- package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
- package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
- package/dist/web/assets/{htmlMode-X3mQtOeh.js → htmlMode-BVaCcL76.js} +1 -1
- package/dist/web/assets/icons-Bk2b68aC.js +1 -0
- package/dist/web/assets/image-0DPVY6Ev.js +1 -0
- package/dist/web/assets/{index-LXNhSUEL.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/{intake-contracts-wCkD2ErR.js → intake-contracts-B8JZKYwb.js} +1 -1
- package/dist/web/assets/{jsonMode-BoKiIdHd.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-CO2mzpy1.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
- package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
- package/dist/web/assets/message-square-C889vRqm.js +1 -0
- package/dist/web/assets/{monaco.contribution-wacA5FjV.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CVe3mWSY.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-hrusiaZi.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C7CAQIKF.js → monaco.contribution-DxAV1oS5.js} +2 -2
- package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
- package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
- package/dist/web/assets/{pdf-Ct3M2mVw.js → pdf-perlzwEB.js} +1 -1
- package/dist/web/assets/play-CHXXdkuO.js +1 -0
- package/dist/web/assets/plus-DFFWjhPw.js +1 -0
- package/dist/web/assets/{ponder-desktop-D-zB6X4L.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-CCxrOCio.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-C0-pUUAU.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-DjSt-duM.js → requests-DmeUYik4.js} +1 -1
- package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
- package/dist/web/assets/save-iEMNZoPe.js +1 -0
- package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
- package/dist/web/assets/settings-BC-bzgk6.js +21 -0
- package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
- package/dist/web/assets/square-BE_4JMR3.js +1 -0
- package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
- package/dist/web/assets/{submit-issue-command-Gk3RKrY-.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BnYUBgZB.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CxR3xpmK.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-BVNyOY8h.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-4_XfwJQi.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-CVuamyT3.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-CmwN4ohy.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
- package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
- package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
- package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
- package/dist/web/assets/{workers-CjtQ2aBD.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-N1KUjBZ8.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +104 -3
- package/package.json +1 -1
- package/dist/chunks/account-context-TIJOM22A.js +0 -12
- package/dist/chunks/actions-command-BYPLSGZL.js +0 -2
- package/dist/chunks/app-server-evaluations-5YZUFXQ2.js +0 -2
- package/dist/chunks/app-server-harness-services-N5F5QVZI.js +0 -2
- package/dist/chunks/app-server-runtime-HJ2N57DL.js +0 -2
- package/dist/chunks/apps-WJTW64NW.js +0 -2
- package/dist/chunks/chunk-263WS3TB.js +0 -2
- package/dist/chunks/chunk-27JGS3KB.js +0 -12
- package/dist/chunks/chunk-2UZHLO2V.js +0 -23
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-46RMTR2Z.js +0 -2
- package/dist/chunks/chunk-4JJ4RYIB.js +0 -6
- package/dist/chunks/chunk-4NN5OLKW.js +0 -161
- package/dist/chunks/chunk-543QHE3D.js +0 -2
- package/dist/chunks/chunk-5QOFUGYQ.js +0 -2
- package/dist/chunks/chunk-5ZNE43XC.js +0 -10
- package/dist/chunks/chunk-6IS5OLI5.js +0 -2
- package/dist/chunks/chunk-7HAGSE7L.js +0 -2
- package/dist/chunks/chunk-AXYAEWWA.js +0 -2
- package/dist/chunks/chunk-B7XJBP4U.js +0 -2
- package/dist/chunks/chunk-BBIA24GD.js +0 -10
- package/dist/chunks/chunk-CJDGLPNX.js +0 -4
- package/dist/chunks/chunk-DAEUVT2I.js +0 -6
- package/dist/chunks/chunk-FCXDPVGJ.js +0 -3
- package/dist/chunks/chunk-FE2ENE3U.js +0 -2
- package/dist/chunks/chunk-H6EUFJJK.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-IXZ5ZGIL.js +0 -12
- package/dist/chunks/chunk-K6DB5QWG.js +0 -2
- package/dist/chunks/chunk-LI56PPCN.js +0 -2
- package/dist/chunks/chunk-OE2OOWEQ.js +0 -2
- package/dist/chunks/chunk-OYIFH2OM.js +0 -2
- package/dist/chunks/chunk-QOUOU7FE.js +0 -22
- package/dist/chunks/chunk-R5GRESW3.js +0 -2
- package/dist/chunks/chunk-TERKCK4I.js +0 -2
- package/dist/chunks/chunk-TS5HNRZB.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-WGISITX6.js +0 -4
- package/dist/chunks/chunk-XD4ZIQZ2.js +0 -2
- package/dist/chunks/chunk-XHU4BZQY.js +0 -13
- package/dist/chunks/chunk-ZWEY66RT.js +0 -2
- package/dist/chunks/cli-HV32F7HD.js +0 -2
- package/dist/chunks/connected-app-executor-DFHWNMRM.js +0 -2
- package/dist/chunks/connected-evidence-WOM6N5HO.js +0 -2
- package/dist/chunks/core-commands-GWRHH53F.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-WJ2XEUO7.js +0 -4
- package/dist/chunks/datasets-XIMF54QN.js +0 -2
- package/dist/chunks/desktop-test-HF42V2EP.js +0 -3
- package/dist/chunks/dist-T6ES2TSM.js +0 -2
- package/dist/chunks/evaluation-coordination-WZT6FDMS.js +0 -2
- package/dist/chunks/experiment-improvements-H35VS6XZ.js +0 -2
- package/dist/chunks/experiments-F54C32EE.js +0 -2
- package/dist/chunks/experiments-signal-ONIGTGYR.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-4HOXANWK.js +0 -2
- package/dist/chunks/hosted-app-server-composition-Y64A2A2B.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-B2V2WIUI.js +0 -3
- package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +0 -2
- package/dist/chunks/hosted-profile-candidate-CXPVEEYQ.js +0 -3
- package/dist/chunks/hosted-profile-compiler-FGCI2VRW.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-INNUYMBD.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-UPTBRYMS.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-TIQSVKLQ.js +0 -3
- package/dist/chunks/hosted-tasksets-7VMYOTIO.js +0 -2
- package/dist/chunks/human-review-7XC77NQP.js +0 -2
- package/dist/chunks/learning-3XDGIYUL.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-UIKQSAMM.js +0 -2
- package/dist/chunks/local-harness-taskset-review-6KJN3EQL.js +0 -2
- package/dist/chunks/opchat-NWYWWIA7.js +0 -3
- package/dist/chunks/opchat-bounded-chat-ICURZM6R.js +0 -2
- package/dist/chunks/organizations-7DBQGCCV.js +0 -2
- package/dist/chunks/project-action-payload-7DRABTHY.js +0 -2
- package/dist/chunks/project-agent-AXJOWXRU.js +0 -2
- package/dist/chunks/published-experiment-source-YBBPLNF2.js +0 -2
- package/dist/chunks/refiner-profile-service-ATEFPF5O.js +0 -2
- package/dist/chunks/sandbox-command-CF2PJCFX.js +0 -2
- package/dist/chunks/saved-work-3OAVRBH3.js +0 -2
- package/dist/chunks/setup-RHIMFI2Y.js +0 -2
- package/dist/chunks/src-V236S6MV.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-CDRMGLWW.js +0 -2
- package/dist/chunks/store-chat-resources-P4EKCLSY.js +0 -2
- package/dist/chunks/store-conversation-serving-YFEZYQD3.js +0 -2
- package/dist/chunks/store-evaluation-results-VBH4R2U7.js +0 -7
- package/dist/chunks/store-human-review-RFCVZ3HP.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-FNBGGZU6.js +0 -2
- package/dist/chunks/store-local-experiments-XPXGYXNM.js +0 -97
- package/dist/chunks/store-model-batch-review-J2L5JQV2.js +0 -2
- package/dist/chunks/store-model-project-preparation-OCLIFKI2.js +0 -2
- package/dist/chunks/store-taskset-drafts-BNKUVHPA.js +0 -9
- package/dist/chunks/taskset-packages-SXBLYHSP.js +0 -2
- package/dist/chunks/taskset-packages-V5T4V7YN.js +0 -2
- package/dist/chunks/tool-learning-47XQKELE.js +0 -2
- package/dist/chunks/training-7VQNCOGH.js +0 -2
- package/dist/chunks/training-VKLPNCMC.js +0 -2
- package/dist/chunks/training-hosted-NNE6BP6S.js +0 -2
- package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +0 -2
- package/dist/chunks/training-model-start-G7YDZ7ZG.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-DmEA-Lia.js +0 -53
- package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +0 -2
- package/dist/web/assets/AppsView-B1uNg9IQ.js +0 -1
- package/dist/web/assets/BrowserSidebar-DfVQoJHn.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Bbc6HRks.js +0 -8
- package/dist/web/assets/CommunityView-mO58f2B0.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-BQIS7hkd.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-BkHeVbAx.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-YA9YckKj.js +0 -101
- package/dist/web/assets/MainChatThread-DpyPgGKW.js +0 -2
- package/dist/web/assets/MainPane-WOeodByM.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +0 -2
- package/dist/web/assets/RightChatPanelStack-Bs7A4dLs.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +0 -1
- package/dist/web/assets/TeamChatView-DjmIaLO1.js +0 -1
- package/dist/web/assets/TrainingRunLineage-CtYe1KGX.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-JDOUmrC-.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-sfL5LZeB.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-Cd761lRF.js +0 -1
- package/dist/web/assets/chat-resources-BUDXdoG0.js +0 -1
- package/dist/web/assets/chevron-down-DEbd6Ek-.js +0 -1
- package/dist/web/assets/chevron-right-DLYNg_Oq.js +0 -1
- package/dist/web/assets/chevron-up-DFJJccDl.js +0 -1
- package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +0 -9
- package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +0 -1
- package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +0 -1
- package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +0 -1
- package/dist/web/assets/client-BNjO4Xi8.js +0 -1
- package/dist/web/assets/cloud-upload-CoM1FGeB.js +0 -1
- package/dist/web/assets/common-CFsO2ppZ.js +0 -1
- package/dist/web/assets/copy-BGOhV6Pk.js +0 -1
- package/dist/web/assets/create-pipeline-DRR0Qeec.js +0 -1
- package/dist/web/assets/createLucideIcon-Bv-_eGcE.js +0 -1
- package/dist/web/assets/external-link-CVXsNeO3.js +0 -1
- package/dist/web/assets/folder-open-MnOmh19D.js +0 -1
- package/dist/web/assets/folder-plus-BRddLBtO.js +0 -1
- package/dist/web/assets/git-commit-horizontal-Bm4rkXug.js +0 -1
- package/dist/web/assets/icons-CZxmQtZs.js +0 -1
- package/dist/web/assets/image-BViGUAiq.js +0 -1
- package/dist/web/assets/info-DYPIbKKD.js +0 -1
- package/dist/web/assets/loader-circle-JFgFNsP5.js +0 -1
- package/dist/web/assets/maximize-2-DXZCQO0b.js +0 -1
- package/dist/web/assets/message-square-cOCAL8J1.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-B35XSAvn.js +0 -1
- package/dist/web/assets/paperclip-CKgDxioG.js +0 -1
- package/dist/web/assets/play-DzqLr7fM.js +0 -1
- package/dist/web/assets/plus-Ddp1vXnw.js +0 -1
- package/dist/web/assets/presentation-B0S9v7ib.js +0 -1
- package/dist/web/assets/refresh-cw-D45mW-vs.js +0 -1
- package/dist/web/assets/reward-checks-D139zwha.js +0 -7
- package/dist/web/assets/save-Gu4R_82E.js +0 -1
- package/dist/web/assets/schemas-C9IwV7NS.js +0 -64
- package/dist/web/assets/settings-DdonLCIN.js +0 -21
- package/dist/web/assets/settings-lists-CFHFtO0D.js +0 -5
- package/dist/web/assets/square-Dqduqyyu.js +0 -1
- package/dist/web/assets/square-terminal-DS3zwi6X.js +0 -1
- package/dist/web/assets/training-QBuGBGJd.js +0 -2
- package/dist/web/assets/upload-ABSJxuUM.js +0 -1
- package/dist/web/assets/useQuery-CCjwL8VI.js +0 -1
- package/dist/web/assets/wifi-off-DGJH7Pke.js +0 -1
- package/dist/web/assets/work-outputs-CnbRtTLg.js +0 -1
- package/dist/web/assets/x-B-_zJVOZ.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as ft}from"./chunk-7EQLW2KM.js";import{b as Ut}from"./chunk-KP2MYTP5.js";import{i as Ze}from"./chunk-4G3GTEVS.js";import{d as bt,e as xt,f as Se,g as wt}from"./chunk-KU4TPDPH.js";import{e as kt,f as Pt,g as Et,h as Ot,i as jt,j as ke,m as At,n as qt,o as Ht,p as Tt,q as ue}from"./chunk-55YD4UTW.js";import{a as Ve}from"./chunk-J256AEEE.js";import{a as je,c as $t,d as Dt,e as Bt,f as Ye}from"./chunk-AMC4Z7G4.js";import{a as Xe,c as _t,d as Qe,f as Wt}from"./chunk-LK77GI6M.js";import{j as Pe,k as zt,l as Ee,m as Oe}from"./chunk-I6VMRQF4.js";import{h as Rt}from"./chunk-4PUOWSDE.js";import{Bb as oe,C as ee,D as te,Eb as J,Fb as Re,K as Ge,L as yt,Sa as Ce,U as vt,V as It,ea as St,fb as Ct,oa as ne,pa as me,wb as F}from"./chunk-ZY32SZ2P.js";import{p as gt}from"./chunk-OTDDXEQ6.js";import{a as Je,b as U,c as _,f as lt,h as ht}from"./chunk-JCLTFDVW.js";import{f as ut}from"./chunk-HNQPEOJD.js";import{g as f,m as pt,n as p,o as mt}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as d}from"./chunk-FTQLQJQV.js";var R=e.string().trim().min(1).max(500),re=e.string().regex(/^[a-f0-9]{64}$/),Bo=e.object({teamId:R,ownerUserId:R}).strict(),M=e.object({id:R,snapshotHash:re,boundaryId:R,boundaryRevisionHash:re}).strict(),Ae=e.object({sourceId:R,source:zt,sessionId:R,snapshotHash:re,title:e.string().max(500),projectId:R.nullable(),capturedAt:e.string().datetime(),boundaries:e.array(Oe.omit({start:!0,end:!0})).max(Pe.boundaries)}).strict(),Mt=e.object({operationId:R,conversationId:R.optional(),cursor:R.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict(),Lt=e.object({hash:re,parts:e.number().int().min(1).max(1500)}).strict(),Kt=Lt.extend({index:e.number().int().nonnegative().max(1499),base64:e.string().max(35e4)}).strict(),Mo=e.object({path:e.string().min(1).max(500),encoding:e.enum(["utf8","zstd"]),base64:e.string()}).strict(),L=e.object({upload:Lt,source:e.enum(["codex","claude_code","hermes","openclaw","opencode","grok_build","pi","oh_my_pi"]),branchLeafId:R.optional(),acquisition:e.object({machineId:R,sourceInstanceId:R}).strict().optional(),destination:e.discriminatedUnion("kind",[e.object({kind:e.literal("existing"),projectId:R}).strict(),e.object({kind:e.literal("new"),name:e.string().trim().min(1).max(200)}).strict()])}).strict(),qe=L.extend({operationId:R,previewHash:re,selection:e.array(e.object({sessionHash:re,boundaryIds:e.array(R).min(1).max(Pe.boundaries)}).strict()).min(1).max(Pe.sessions)}).strict(),qn=e.object({from:e.string().datetime(),to:e.string().datetime(),projectId:R.optional()}).strict(),Lo=e.object({teamId:R,range:qn,activity:e.object({conversations:e.number().int().nonnegative(),turns:e.number().int().nonnegative(),chatTurns:e.number().int().nonnegative(),workTurns:e.number().int().nonnegative()}).strict(),accounting:e.object({contextSnapshots:e.number().int().nonnegative()}).strict(),usage:je}).strict();var P=e.string().trim().min(1).max(240),le=e.string().regex(/^[a-f0-9]{64}$/),Vo=e.object({cursor:e.string().trim().min(1).max(2e3).optional(),projectId:P.optional(),search:e.string().trim().max(100).optional(),sort:e.enum(["id","name","updated"]).default("id"),limit:e.number().int().min(1).max(100).default(100)}).strict(),Xo=e.object({operationId:P,expectedRevision:e.number().int().nonnegative(),originProjectId:P.optional(),workspace:Ze,ownerScope:e.enum(["workspace","personal"]).optional()}).strict().superRefine((a,t)=>{a.workspace.draft.modelScope!==null&&t.addIssue({code:"custom",message:"Independent datasets cannot carry Model-owned draft preparation."}),a.workspace.draft.status!=="draft"&&t.addIssue({code:"custom",message:"Only draft workspaces can be saved."})}),he=e.object({schemaVersion:e.literal("openpond.datasetWorkspaceReceipt.v1"),teamId:P,datasetId:P,revision:e.number().int().positive(),originProjectId:P.optional(),workspace:Ze,ownerScope:e.enum(["workspace","personal"]).optional(),publication:e.object({tasksetId:P,release:Ve,packageHash:le}).strict().nullable()}).strict().superRefine((a,t)=>{(a.workspace.draft.id!==a.datasetId||a.workspace.draft.profileId!==a.teamId||a.workspace.draft.revision!==a.revision||a.workspace.draft.modelScope!==null)&&t.addIssue({code:"custom",message:"Dataset workspace scope/revision mismatch."})}),Qo=e.object({operationId:P,expectedRevision:e.number().int().positive(),workspaceHash:le,packageHash:le}).strict(),Yo=e.object({operationId:P,expectedRevision:e.number().int().positive()}).strict(),Zo=e.object({teamId:P,datasetId:P,items:e.array(e.object({workspaceRevision:e.number().int().positive(),publication:he.shape.publication.unwrap(),publishedAt:e.iso.datetime()}).strict()).max(25),nextBeforeRevision:e.number().int().positive().nullable()}).strict(),er=e.object({teamId:P,datasets:e.array(e.object({id:P,revision:e.number().int().positive(),originProjectId:P.optional(),name:e.string(),status:e.enum(["draft","published"]),ownerScope:e.enum(["workspace","personal"]).optional(),taskCount:e.number().int().nonnegative().optional(),publication:he.shape.publication,updatedAt:e.string().datetime()}).strict()).max(100),nextCursor:e.string().trim().min(1).max(2e3).nullable()}).strict(),tr=e.object({teamId:P,datasetId:P,revision:e.number().int().positive(),workspaceHash:le,packageHash:le,release:Ve}).strict();var ie=e.string().trim().min(1).max(240),fe=e.string().regex(/^[a-f0-9]{64}$/),Nt=e.object({operationId:ie,source:M,proofs:e.array(Ye).min(1).max(100)}).strict().superRefine((a,t)=>{new Set(a.proofs.map(n=>n.path)).size!==a.proofs.length&&t.addIssue({code:"custom",message:"Select each starting path once."}),new TextEncoder().encode(JSON.stringify(a)).byteLength>15*1024*1024&&t.addIssue({code:"custom",message:"Starting assets exceed the retained upload allowance."})}),Hn=e.object({path:Ye.shape.path,commitHash:e.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),gitObjectHash:e.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),mode:e.enum(["100644","100755"]),sizeBytes:e.number().int().nonnegative().max(2*1024*1024),sha256:fe}).strict(),Tn=e.object({schemaVersion:e.literal("openpond.connectedStartingAssetsReceipt.v1"),id:ie,operationId:ie,teamId:ie,ownerUserId:ie,projectId:ie,requestHash:fe,source:M,inputHash:fe,observationHash:fe,assets:e.array(Hn).min(1).max(100),selectedPathsUnmodified:e.literal(!0),dependencyClosureQualified:e.literal(!1),createdAt:e.iso.datetime(),receiptHash:fe}).strict();function et(a){let t=Tn.parse(a),{receiptHash:n,...o}=t;if(p(o)!==n||t.id!==`starting-assets-${p(t.operationId).slice(0,40)}`||new Set(t.assets.map(r=>r.path)).size!==t.assets.length||t.assets.some(r=>r.commitHash!==t.assets[0].commitHash))throw new Error("Connected starting assets receipt identity differs from its retained evidence.");return t}d(et,"verifyConnectedStartingAssetsReceipt");var j=e.string().min(1).max(200),se=e.string().regex(/^[a-f0-9]{64}$/),He=e.object({operationId:j,name:e.string().trim().min(1).max(500),projectId:j,dataset:f.extend({revision:e.number().int().positive()}).strict(),caseIds:e.array(j).min(1).max(1e4)}).strict().superRefine((a,t)=>{new Set(a.caseIds).size!==a.caseIds.length&&t.addIssue({code:"custom",message:"Select each case once."})}),Un=M.extend({inputHash:se,outputHash:se.nullable(),task:St,taskHash:se}).strict(),_n=e.object({schemaVersion:e.literal("openpond.connectedRecordedExecution.v1"),id:j,teamId:j,ownerUserId:j,request:He,manifest:F,sources:e.array(Un).min(1).max(1e4),contentHash:se}).strict();function tt(a){let t=_n.parse(a),{contentHash:n,...o}=t,{contentHash:r,...i}=t.manifest;if(p(o)!==n||p(i)!==r||t.manifest.teamId!==t.teamId||t.manifest.id!==t.id||t.manifest.operationId!==t.request.operationId||p(t.manifest.dataset)!==p(t.request.dataset)||t.sources.length!==t.request.caseIds.length||t.sources.length!==t.manifest.population.length||t.sources.some((s,c)=>s.taskHash!==p(s.task)||s.task.id!==t.request.caseIds[c]||s.boundaryId!==s.task.id||t.manifest.population[c]?.caseId!==s.boundaryId))throw new Error("Recorded execution identity or population integrity failed.");return t}d(tt,"verifyConnectedRecordedExecution");var Ft=e.object({projectId:j.optional(),cursor:j.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict(),Wn=e.object({id:j,teamId:j,ownerUserId:j,projectId:j,name:e.string().min(1).max(500),dataset:He.shape.dataset,manifestHash:se,contentHash:se,caseCount:e.number().int().min(1).max(1e4),createdAt:e.string().datetime()}).strict(),Jt=e.object({teamId:j,items:e.array(Wn).max(50),nextCursor:j.nullable()}).strict();var Gt=e.object({datasetId:e.string().trim().min(1).max(240),expectedRevision:e.number().int().positive(),operationId:e.string().trim().min(1).max(240),graders:e.array(Ce).min(1).max(100).optional()}).strict().superRefine((a,t)=>{a.graders&&new Set(a.graders.map(n=>n.id)).size!==a.graders.length&&t.addIssue({code:"custom",path:["graders"],message:"Choose one exact revision of each grader."})});async function K(a,t,n,o){let r=new AbortController,i=n.signal,s=d(()=>r.abort(i?.reason),"forward");i?.aborted?s():i?.addEventListener("abort",s,{once:!0});let c=setTimeout(()=>r.abort(new Error("Connected evidence request timed out.")),6e4),l,m=d(()=>{l&&l.cancel(r.signal.reason).catch(()=>{})},"abortReader");r.signal.addEventListener("abort",m,{once:!0});let h=new Promise((y,u)=>{let g=d(()=>u(r.signal.reason??new DOMException("Request aborted","AbortError")),"abort");r.signal.aborted?g():r.signal.addEventListener("abort",g,{once:!0})});try{let y=a(t,{...n,signal:r.signal}).then(O=>{if(r.signal.aborted)throw O.body?.cancel(r.signal.reason).catch(()=>{}),r.signal.reason;return O}),u=await Promise.race([y,h]),g=u.headers.get("content-length");if(l=u.body?.getReader(),r.signal.aborted)throw await l?.cancel(r.signal.reason),r.signal.reason;if(g&&Number(g)>8388608)throw await l?.cancel(),o(502,"connected_response_too_large","Connected evidence response exceeds 8 MiB.");let S=[],T=0;if(l)for(;;){let O=await Promise.race([l.read(),h]);if(O.done)break;if(T+=O.value.byteLength,T>8388608)throw await l.cancel(),o(502,"connected_response_too_large","Connected evidence response exceeds 8 MiB.");S.push(O.value)}let N=new Uint8Array(T),D=0;for(let O of S)N.set(O,D),D+=O.byteLength;let B;try{B=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(N))}catch{throw o(502,"connected_response_invalid","Connected evidence response is not valid JSON.")}return{response:u,value:B}}finally{clearTimeout(c),i?.removeEventListener("abort",s),r.signal.removeEventListener("abort",m),l?.releaseLock()}}d(K,"fetchConnectedJson");var ge=e.string().min(1).max(500),H=e.number().int().nonnegative(),Vt=e.object({teamId:ge,ownerUserId:ge,projectId:ge.nullable(),status:e.enum(["active","paused","archived"]),revision:H,state:e.enum(["collecting","pending","attention","paused","archived"]),lastReconciledAt:e.string().datetime().nullable(),lastCapturedAt:e.string().datetime().nullable(),historyDays:e.number().int().positive(),sources:H,tasks:H,datasets:e.array(e.object({datasetId:ge,projection:e.enum(["turn","conversation"]),revision:H}).strict()).max(2),latestBatch:e.object({operationId:ge,updatedAt:e.string().datetime(),scanned:H,captured:H,unchanged:H,pending:H,failed:H,excluded:H,paused:H,hasMore:e.boolean()}).strict().nullable()}).strict();var b=e.string().min(1).max(500),q=e.string().regex(/^[a-f0-9]{64}$/),Xt=e.object({teamId:b,projectId:b.nullable(),status:e.enum(["active","paused","archived"]),revision:e.number().int().nonnegative()}).strict(),zn=e.object({teamId:b,operationId:b,projectId:b.nullable(),outcomes:e.array(e.object({conversationId:b,state:e.enum(["captured","unchanged","pending","paused","excluded","failed"]),sourceId:b.optional(),snapshotHash:q.optional(),reason:e.string().optional()}).strict()).max(50),nextCursor:b.nullable()}).strict(),$n=e.object({teamId:b,ref:M,origin:Ae.shape.source,sessionId:b,projectId:b,capturedAt:e.string().datetime(),unmappedEvidence:e.object({count:e.number().int().nonnegative().max(1e5),contentHash:q}).strict(),evidence:e.object({input:e.array(Ee),observed:e.array(Ee),answer:e.json(),boundary:Oe}).strict()}).strict(),Dn=e.object({teamId:b,sourceId:b,snapshotHash:q,contentHash:q,count:e.number().int().nonnegative(),offset:e.number().int().nonnegative(),events:e.array(Ee).max(50),nextOffset:e.number().int().nonnegative().nullable()}).strict(),Bn=e.object({teamId:b,source:L.shape.source,sourceHash:q,previewHash:q,destination:L.shape.destination,issues:e.array(e.object({file:e.string(),message:e.string()}).strict()).max(100),sessions:e.array(e.object({sessionHash:q,sessionId:b,origin:Ae.shape.source,exporterVersion:e.string().nullable(),eventCount:e.number().int().nonnegative(),boundaries:e.array(e.object({id:b,projection:e.enum(["turn","conversation"]),answer:e.boolean(),process:e.enum(["retained","partial","absent"]),terminal:e.enum(["completed","failed","cancelled","unknown"])}).strict()).max(5001),warnings:e.array(e.string()).max(100),sample:e.array(e.object({role:e.enum(["user","assistant","system","tool"]).nullable(),text:e.string().max(4e3)}).strict()).max(3)}).strict()).max(1e3)}).strict(),Qt=e.object({teamId:b,operationId:b,requestHash:q,previewHash:q,projectId:b.optional(),state:e.enum(["admitting","publishing","completed","failed"]),outcomes:e.array(e.object({sessionHash:q,sourceId:b,status:e.enum(["imported","already_present"]),datasets:e.array(e.object({datasetId:b,revision:e.number().int().positive(),changed:e.boolean()}).strict()).max(2)}).strict()).max(1e3),error:e.string().optional()}).strict(),Te=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="ConnectedEvidenceError"}status;code;static{d(this,"ConnectedEvidenceError")}},Ue=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=n.toString().replace(/\/+$/,"")}options;static{d(this,"ConnectedEvidenceClient")}baseUrl;async capture(t,n){let o=Mt.parse(t),r=zn.parse(await this.request("/capture","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.outcomes.length>o.limit||o.conversationId&&r.outcomes.some(i=>i.conversationId!==o.conversationId))throw new Error("Capture receipt differs from its requested source or operation.");return r}async retainStartingAssets(t,n){let o=Nt.parse(t),r=et(await this.request("/starting-assets","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.requestHash!==p(o)||p(r.source)!==p(o.source)||r.assets.length!==o.proofs.length||r.assets.some((i,s)=>i.path!==o.proofs[s].path))throw new Error("Starting assets differ from the exact source, operation or selected paths.");return r}async startingAssets(t,n){let o=et(await this.request(`/starting-assets/${encodeURIComponent(b.parse(t))}`,"GET",void 0,n));if(this.scope(o.teamId),o.id!==t)throw new Error("Starting assets identity mismatch.");return o}async list(t={},n){let o=e.object({projectId:b.optional(),cursor:b.optional(),limit:e.number().int().min(1).max(50).default(20)}).strict().parse(t),r=new URLSearchParams(Object.entries(o).filter(([,s])=>s!==void 0).map(([s,c])=>[s,String(c)])),i=e.object({teamId:b,items:e.array(Ae).max(50),nextCursor:b.nullable()}).strict().parse(await this.request(`?${r}`,"GET",void 0,n));if(this.scope(i.teamId),i.items.length>o.limit||new Set(i.items.map(s=>s.sourceId)).size!==i.items.length||i.nextCursor!==null&&i.nextCursor===o.cursor||o.projectId&&i.items.some(s=>s.projectId!==o.projectId))throw new Error("Connected source page differs from its requested scope.");return i}async read(t,n){let o=M.parse(t),r=$n.parse(await this.request(`/${encodeURIComponent(o.id)}/cases/${encodeURIComponent(o.boundaryId)}?snapshotHash=${o.snapshotHash}&revisionHash=${o.boundaryRevisionHash}`,"GET",void 0,n));if(this.scope(r.teamId),p(r.ref)!==p(o)||r.evidence.boundary.id!==o.boundaryId||r.evidence.boundary.revisionHash!==o.boundaryRevisionHash||p(r.evidence.input)!==r.evidence.boundary.inputHash||p(r.evidence.observed)!==o.boundaryRevisionHash||r.evidence.boundary.outputHash!==null&&p(r.evidence.answer)!==r.evidence.boundary.outputHash)throw new Error("Connected case readback differs from its exact snapshot or cutoff.");return r}async setCollection(t,n){let o=Xt.parse(await this.request("/collection","PUT",e.object({paused:e.boolean()}).strict().parse({paused:t}),n));return this.scope(o.teamId),o}async collection(t){let n=Xt.parse(await this.request("/collection","GET",void 0,t));return this.scope(n.teamId),n}async collectionStatus(t){let n=Vt.parse(await this.request("/collection/status","GET",void 0,t));return this.scope(n.teamId),n}async unmappedEvents(t,n){let o=e.object({id:b,snapshotHash:q,contentHash:q,offset:e.number().int().nonnegative().default(0),limit:e.number().int().min(1).max(50).default(20)}).strict().parse(t),r=Dn.parse(await this.request(`/${encodeURIComponent(o.id)}/unmapped-events?snapshotHash=${o.snapshotHash}&offset=${o.offset}&limit=${o.limit}`,"GET",void 0,n));if(this.scope(r.teamId),r.sourceId!==o.id||r.snapshotHash!==o.snapshotHash||r.contentHash!==o.contentHash||r.offset!==o.offset||r.events.length>o.limit||r.events.some((i,s)=>i.sequence!==o.offset+s)||r.nextOffset!==null&&r.nextOffset!==o.offset+r.events.length)throw new Error("Unmapped source event page differs from its pinned snapshot.");return r}async homeSummary(t,n){let o=e.object({from:e.string().datetime(),to:e.string().datetime(),projectId:b.optional()}).strict(),r=o.parse(t),i=new URLSearchParams(Object.entries(r)),s=e.object({teamId:b,range:o,activity:e.object({conversations:e.number().int().nonnegative(),turns:e.number().int().nonnegative(),chatTurns:e.number().int().nonnegative(),workTurns:e.number().int().nonnegative()}).strict(),accounting:e.object({contextSnapshots:e.number().int().nonnegative()}).strict(),usage:je}).strict().parse(await this.request(`/summary?${i}`,"GET",void 0,n));if(this.scope(s.teamId),p(s.range)!==p(r)||s.activity.chatTurns+s.activity.workTurns!==s.activity.turns)throw new Error("Activity summary differs from its requested range.");for(let c of[s.usage.days,s.usage.modes,s.usage.models]){if(new Set(c.map(l=>l.key)).size!==c.length)throw new Error("Duplicate usage summary group.");for(let l of Object.keys(s.usage.total))if(c.reduce((m,h)=>m+h[l],0)!==s.usage.total[l])throw new Error("Usage totals differ from their displayed groups.")}return s}async uploadPart(t,n){let o=Kt.parse(t),r=e.object({teamId:b,hash:q,parts:e.number().int(),index:e.number().int()}).strict().parse(await this.request("/imports/upload","POST",o,n));if(this.scope(r.teamId),r.hash!==o.hash||r.parts!==o.parts||r.index!==o.index)throw new Error("Upload receipt differs from its part identity.");return r}async preview(t,n){let o=L.parse(t),r=Bn.parse(await this.request("/imports/preview","POST",o,n));if(this.scope(r.teamId),r.source!==o.source||p(r.destination)!==p(o.destination)||r.sessions.some(i=>i.origin!==o.source)||new Set(r.sessions.map(i=>i.sessionHash)).size!==r.sessions.length)throw new Error("Import preview differs from its source or destination.");return r}async commit(t,n){let o=qe.parse(t),r=Qt.parse(await this.request("/imports/commit","POST",o,n));if(this.scope(r.teamId),r.operationId!==o.operationId||r.previewHash!==o.previewHash||r.requestHash!==p(o)||r.outcomes.some(i=>!o.selection.some(s=>s.sessionHash===i.sessionHash))||r.state==="completed"&&r.outcomes.length!==o.selection.length)throw new Error("Import receipt differs from its exact selection or operation.");return r}async readImport(t,n){let o=b.parse(t),r=Qt.parse(await this.request(`/imports/${encodeURIComponent(o)}`,"GET",void 0,n));if(this.scope(r.teamId),r.operationId!==o)throw new Error("Import identity mismatch.");return r}async prepareRecorded(t,n){let o=He.parse(t),r=tt(await this.request("/recorded-executions","POST",o,n));if(this.scope(r.teamId),p(r.request)!==p(o))throw new Error("Recorded admission differs from its selected Dataset/cases.");return r}async listRecordedExecutions(t={},n){let o=Ft.parse(t),r=new URLSearchParams(Object.entries(o).filter(([,s])=>s!==void 0).map(([s,c])=>[s,String(c)])),i=Jt.parse(await this.request(`/recorded-executions?${r}`,"GET",void 0,n));if(this.scope(i.teamId),i.items.length>o.limit||i.items.some((s,c)=>s.teamId!==i.teamId||o.projectId&&s.projectId!==o.projectId||o.cursor&&s.id<=o.cursor||c>0&&s.id<=i.items[c-1].id)||i.items.some(s=>s.ownerUserId!==i.items[0]?.ownerUserId)||i.nextCursor!==null&&(o.cursor!==void 0&&i.nextCursor<=o.cursor||i.items.length>0&&i.nextCursor<i.items.at(-1).id))throw new Error("Recorded execution page differs from its requested scope or cursor.");return i}async recordedExecution(t,n){let o=tt(await this.request(`/recorded-executions/${encodeURIComponent(b.parse(t))}`,"GET",void 0,n));if(this.scope(o.teamId),o.id!==t)throw new Error("Recorded execution identity mismatch.");return o}async publishDataset(t,n){let o=Gt.parse(t),r=he.parse(await this.request("/datasets/publish","POST",o,n));this.scope(r.teamId);let i=r.workspace.draft.metadata.connectedPublication;if(r.datasetId!==o.datasetId||!r.publication||!i||typeof i!="object"||!("requestHash"in i)||i.requestHash!==p(o))throw new Error("Published Dataset identity or original selection mismatch.");return r}async createSelection(t,n){let o=e.object({operationId:b.max(240),projectId:b.max(240),name:e.string().trim().min(1).max(200),cases:e.array(M).min(1).max(500)}).strict().parse(t),r=he.parse(await this.request("/datasets/selection","POST",o,n));if(this.scope(r.teamId),r.originProjectId!==o.projectId||r.workspace.draft.tasks.length!==o.cases.length||r.workspace.draft.tasks.some((i,s)=>p(i.input&&typeof i.input=="object"&&!Array.isArray(i.input)?i.input.connectedEvidenceRef:null)!==p(o.cases[s])))throw new Error("Selected Dataset differs from its exact source population.");return r}scope(t){if(t!==this.options.teamId)throw new Error("Connected evidence workspace mismatch.")}async request(t,n,o,r){let{response:i,value:s}=await K(this.options.fetch??fetch,`${this.baseUrl}/v1/connected-evidence${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}},(c,l,m)=>new Te(c,l,m));if(!i.ok){let c=e.object({code:e.string(),message:e.string()}).safeParse(s);throw new Te(i.status,c.success?c.data.code:"connected_request_failed",c.success?c.data.message:"Connected evidence request failed.")}return s}};var I=e.string().trim().min(1).max(240),Mn=e.object({id:I,expectedRevision:e.number().int().positive(),manifest:$t}).strict().refine(a=>a.id===a.manifest.connectionId&&a.expectedRevision===a.manifest.connectionRevision,"Collector coverage scope differs from its connection."),Ln=e.object({id:I,cutoff:e.iso.datetime().optional()}).strict(),Kn=e.object({schemaVersion:e.literal("openpond.connectedSyncCoverageReceipt.v1"),id:I,teamId:I,ownerUserId:I,connectionId:I,connectionRevision:e.number().int().positive(),receivedAt:e.iso.datetime(),summary:Dt}).strict(),Nn=e.object({id:I,source:L.shape.source,machineId:I,sourceInstanceId:I,sourceLabel:e.string().trim().min(1).max(200),sourceRoot:e.string().min(1).max(2e3),destination:L.shape.destination,since:e.string().datetime().nullable(),keepSyncing:e.boolean(),expectedRevision:e.number().int().nonnegative()}).strict(),Fn=e.object({id:I,expectedRevision:e.number().int().positive(),action:e.enum(["pause","resume","disconnect"])}).strict(),Jn=e.object({id:I,operationId:I,expectedRevision:e.number().int().positive()}).strict(),Gn=e.object({id:I,expectedRevision:e.number().int().positive(),pendingOperations:e.number().int().min(0).max(1e4),error:e.string().max(500).nullable(),completedSyncRevision:e.number().int().nonnegative().default(0)}).strict(),Yt=e.object({teamId:I,id:I,revision:e.number().int().positive(),source:L.shape.source,sourceLabel:e.string(),sourceRoot:e.string(),taskDatasetId:I.nullable(),conversationDatasetId:I.nullable(),machineId:I,sourceInstanceId:I,projectId:I,datasetIds:e.array(I).max(2),since:e.string().datetime().nullable(),keepSyncing:e.boolean(),state:e.enum(["active","paused","disconnected"]),health:e.enum(["online","offline"]),lastHeartbeatAt:e.string().datetime().nullable(),lastAdmissionAt:e.string().datetime().nullable(),pendingOperations:e.number().int().nonnegative(),admittedTasks:e.number().int().nonnegative(),error:e.string().nullable(),requestedSyncRevision:e.number().int().nonnegative().default(0),completedSyncRevision:e.number().int().nonnegative().default(0),syncRequestedAt:e.string().datetime().nullable().default(null),syncCompletedAt:e.string().datetime().nullable().default(null)}).strict().refine(a=>a.completedSyncRevision<=a.requestedSyncRevision&&a.requestedSyncRevision<=a.revision,"Invalid sync acknowledgement generation."),Vn=e.object({connectionId:I,expectedRevision:e.number().int().positive(),request:qe}).strict(),Zt=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash)throw new Error("Invalid connected-sync API origin.")}options;static{d(this,"ConnectedSyncClient")}async list(t){let n=e.object({teamId:I,items:e.array(Yt).max(100)}).strict().parse(await this.request("","GET",void 0,t));if(n.teamId!==this.options.teamId||n.items.some(o=>o.teamId!==n.teamId))throw new Error("Sync workspace mismatch.");return n}async register(t,n){return this.connection(await this.request("","POST",Nn.parse(t),n),t.id)}async control(t,n){return this.connection(await this.request("/control","POST",Fn.parse(t),n),t.id)}async heartbeat(t,n){return this.connection(await this.request("/heartbeat","POST",Gn.parse(t),n),t.id)}async requestSync(t,n){return this.connection(await this.request("/sync-now","POST",Jn.parse(t),n),t.id)}async commit(t,n){return this.request("/commit","POST",Vn.parse(t),n)}async publishCoverage(t,n){let o=Mn.parse(t),r=this.coverageReceipt(await this.request("/coverage","POST",{action:"publish",...o},n),o.id);if(!r||r.connectionRevision!==o.expectedRevision||r.summary.manifestHash!==Bt(o.manifest).manifestHash)throw new Error("Collector coverage acknowledgement differs from the retained manifest.");return r}async readCoverage(t,n){let o=Ln.parse(t),r=new URLSearchParams(o.cutoff?{cutoff:o.cutoff}:{});return this.coverageReceipt(await this.request(`/${encodeURIComponent(o.id)}/coverage?${r}`,"GET",void 0,n),o.id)}coverageReceipt(t,n){if(t===null)return null;let o=Kn.parse(t);if(o.teamId!==this.options.teamId||o.connectionId!==n)throw new Error("Collector coverage workspace mismatch.");return o}connection(t,n){let o=Yt.parse(t);if(o.teamId!==this.options.teamId||o.id!==n)throw new Error("Sync connection identity mismatch.");return o}async request(t,n,o,r){let{response:i,value:s}=await K(this.options.fetch??fetch,`${this.options.baseUrl.replace(/\/+$/u,"")}/v1/connected-evidence/sync/connections${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}},(c,l,m)=>new Error(m));if(!i.ok)throw Object.assign(new Error(`Sync request failed (${i.status}).`),{status:i.status});return s}};var be=e.string().trim().min(1).max(200),ae=e.object({operationId:be,execution:f,executionKind:e.literal("recorded_evidence").optional(),graders:e.array(Ce).min(1).max(100),maximumCostUsd:e.number().finite().min(1e-6).max(1e4),mappings:e.array(e.object({graderId:be,fields:jt}).strict()).max(100).optional()}).strict().superRefine((a,t)=>{new Set(a.graders.map(n=>n.id)).size!==a.graders.length&&t.addIssue({code:"custom",path:["graders"],message:"Select each grader once."}),a.mappings&&(new Set(a.mappings.map(n=>n.graderId)).size!==a.mappings.length||a.mappings.some(n=>!a.graders.some(o=>o.id===n.graderId)))&&t.addIssue({code:"custom",path:["mappings"],message:"Map each selected grader at most once."})}),Xn=e.object({schemaVersion:e.literal("openpond.experimentScoringPass.v1"),id:be,teamId:be,revision:e.number().int().positive(),request:ae,graders:e.array(ke).min(1).max(100),status:e.enum(["queued","running","cancelling","completed","failed","cancelled"]),totalCount:e.number().int().min(1).max(1e4),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),scored:e.number().int().nonnegative(),unavailable:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative()}).strict(),resultAvailable:e.boolean(),createdAt:e.iso.datetime(),startedAt:e.iso.datetime().nullable(),completedAt:e.iso.datetime().nullable(),error:e.object({code:be,message:e.string().max(2e3)}).strict().nullable()}).strict(),Qn=Xn.extend({contentHash:e.string().regex(/^[a-f0-9]{64}$/)});function en(a){let t=Qn.parse(a),{contentHash:n,...o}=t;if(p(o)!==n||Object.values(t.counts).reduce((i,s)=>i+s,0)!==t.totalCount)throw new Error("Scoring pass integrity or population accounting failed.");let r=["completed","failed","cancelled"].includes(t.status);if(r&&(!t.completedAt||t.counts.pending||t.counts.running)||!r&&(t.completedAt!==null||t.resultAvailable)||t.status==="completed"&&!t.resultAvailable)throw new Error("Scoring pass lifecycle differs from its retained result.");if(t.graders.length!==t.request.graders.length||new Set(t.graders.map(i=>i.feedbackKey)).size!==t.graders.length||t.graders.some((i,s)=>p(i.release)!==p(t.request.graders[s])||p(i.mappings??[])!==p(t.request.mappings?.find(c=>c.graderId===i.release?.id)?.fields??[])))throw new Error("Scoring pass graders differ from their exact admission.");return t}d(en,"verifyExperimentScoringPass");var tn=e.string().regex(/^[a-f0-9]{64}$/),nn=e.object({request:kt,maximumCostUsd:e.number().finite().positive().max(1e4),graders:e.array(ke).min(1).max(100),admissionRequestHash:tn.optional(),sourceExperimentId:e.string().trim().min(1).max(200).optional()}).strict(),Yn=nn.extend({configurationHash:tn}).strict(),Zn=Pt.extend({configuration:Yn}).strict();function ce(a){return a.policy.kind==="hosted_harness"?{...a,population:a.population.map(({receiptId:t,...n})=>n)}:a}d(ce,"experimentConfigurationRequest");function eo(a){let t=nn.parse(a);return p({...t,request:ce(t.request)})}d(eo,"experimentRunConfigurationHash");async function on(a){let t=Zn.parse(a),{configuration:n,...o}=t,r=await Ot(o),{configurationHash:i,...s}=n;if(i!==eo(s)||p(ce(n.request))!==p(ce(r.request))||n.maximumCostUsd!==r.manifest.limits.maximumSpendUsd)throw new Error("Experiment configuration differs from its retained run.");if(r.manifest.metadata.experimentDefinition===null){let c=qt.parse({definition:null,configurationHash:n.configurationHash,maximumCostUsd:n.maximumCostUsd,graders:n.graders,...n.admissionRequestHash?{admissionRequestHash:n.admissionRequestHash}:{},...n.sourceExperimentId?{sourceExperimentId:n.sourceExperimentId}:{}});if(r.manifest.metadata.experimentConfigurationHash!==p(c))throw new Error("Experiment configuration differs from its admitted manifest.")}return{...r,configuration:n}}d(on,"verifyExperimentRunDetails");var rn=e.object({teamId:e.string().trim().min(1).max(240),items:e.array(e.object({name:e.string().trim().min(1).max(500),source:Ct,ready:e.boolean(),reason:e.string().min(1).max(2e3).nullable()}).strict()).max(8),nextCursor:e.string().min(1).max(8192).nullable()}).strict();var W=e.string().min(1).max(500),sn=e.string().regex(/^[a-f0-9]{64}$/),X=e.iso.datetime(),xe=e.number().finite().nonnegative().nullable(),G=e.number().int().nonnegative().nullable(),to=e.object({id:W,sequence:e.number().int().nonnegative(),at:X.nullable(),type:e.string().max(160),action:e.string().max(160).nullable(),correlationId:W.nullable(),attempt:G,taskId:W.nullable(),status:e.string().max(100).nullable(),errorCode:e.string().max(200).nullable(),cleanupComplete:e.boolean().nullable()}).strict(),no=e.object({id:W,kind:e.string().max(100),status:e.string().max(100),receiptId:W.nullable(),maximumUsd:xe,settledUsd:xe,model:e.string().max(200).nullable(),durationMs:G,inputTokens:G,outputTokens:G,totalTokens:G}).strict(),oo=e.object({schemaVersion:e.literal("openpond.runDiagnostics.v1"),teamId:W,runId:W,location:e.enum(["local","hosted"]),manifestHash:sn,observedAt:X,status:e.string().max(100),startedAt:X.nullable(),completedAt:X.nullable(),error:e.string().max(8192).nullable(),resultAvailable:e.boolean(),parent:e.object({id:W,status:e.string().max(100),attempt:G,heartbeatAt:X.nullable(),leaseExpiresAt:X.nullable(),releasedAt:X.nullable(),errorCode:e.string().max(200).nullable()}).strict().nullable(),accounting:e.object({maximumUsd:xe,settledUsd:xe,outstandingUsd:xe,outstandingCount:G,final:e.boolean(),receiptCount:G}).strict(),events:e.array(to).max(100),nextEventCursor:e.number().int().nonnegative().nullable(),eventCount:e.number().int().nonnegative(),calls:e.array(no).max(100),nextCallCursor:W.nullable(),callCount:e.number().int().nonnegative(),limitations:e.array(e.string().max(1e3)).max(30)}).strict(),ro=oo.extend({contentHash:sn}).strict(),an=e.object({afterSequence:e.number().int().nonnegative().optional(),afterCallId:W.optional()}).strict();function cn(a,t){let n=ro.parse(a),{contentHash:o,...r}=n;if(o!==p(r)||n.teamId!==t.teamId||n.runId!==t.runId||t.manifestHash&&n.manifestHash!==t.manifestHash)throw new Error("Diagnostics differ from the selected workspace, run or retained evidence.");if(n.events.length>n.eventCount||n.calls.length>n.callCount||new Set(n.events.map(i=>i.id)).size!==n.events.length||n.events.some((i,s)=>i.sequence<=(s?n.events[s-1].sequence:t.afterSequence??-1))||n.calls.some((i,s)=>i.id<=(s?n.calls[s-1].id:t.afterCallId??""))||n.nextEventCursor!==null&&n.nextEventCursor!==n.events.at(-1)?.sequence||n.nextCallCursor!==null&&n.nextCallCursor!==n.calls.at(-1)?.id||n.accounting.final&&(n.accounting.outstandingCount!==0||n.accounting.settledUsd===null||!n.accounting.receiptCount))throw new Error("Diagnostic evidence pagination or final accounting is inconsistent.");return n}d(cn,"verifyRunDiagnostics");var v=e.string().trim().min(1).max(200),nt=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="OpenPondExperimentError"}status;code;static{d(this,"OpenPondExperimentError")}},_e=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=n.toString().replace(/\/+$/,"")}options;static{d(this,"OpenPondExperimentsClient")}baseUrl;async defaults(t){return e.object({maximumSpendUsd:e.number().finite().min(1e-6).max(1e4),maximumComparisonSpendUsd:e.number().finite().min(1e-6).max(1e4),initialOutputTokens:e.number().int().positive()}).strict().parse(await this.request("/defaults","GET",void 0,t))}async createComparisonBudget(t,n){let o=e.object({id:v,operationIds:e.array(v).min(1).max(100),maximumSpendUsd:e.number().finite().min(1e-6).max(1e4).optional()}).strict().parse(t),r=this.comparisonBudgetResult(await this.request("/comparison-budgets","POST",o,n),o.id);if(p(r.operations.map(i=>i.operationId).sort())!==p([...o.operationIds].sort())||o.maximumSpendUsd!==void 0&&r.maximumSpendUsd!==o.maximumSpendUsd)throw new Error("Comparison admission differs from its requested operations or ceiling.");return r}async comparisonBudget(t,n){return this.comparisonBudgetResult(await this.request(`/comparison-budgets/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n),t)}comparisonBudgetResult(t,n){let o=e.object({id:v,teamId:v,maximumSpendUsd:e.number().finite().positive(),settledUsd:e.number().finite().nonnegative(),reservedUsd:e.number().finite().nonnegative(),remainingUsd:e.number().finite().nonnegative(),operations:e.array(e.object({operationId:v,runId:v.nullable()}).strict()).min(1).max(100)}).strict().parse(t);if(o.id!==n||o.teamId!==this.options.teamId)throw new Error("Comparison budget scope mismatch.");return o}async harnessSources(t={}){let n=t.cursor===void 0?void 0:e.string().min(1).max(8192).parse(t.cursor),o=new URLSearchParams(n?{cursor:n}:{}),r=rn.parse(await this.request(`/harness-sources?${o}`,"GET",void 0,t.signal));if(r.teamId!==this.options.teamId||new Set(r.items.map(i=>p(i.source))).size!==r.items.length||r.nextCursor!==null&&r.nextCursor===n||r.items.some(i=>i.ready!==(i.reason===null)))throw new Error("Harness catalog differs from its workspace, readiness or continuation.");return r}async prepareHarness(t,n){let o=Ht.parse({...t,maximumCostUsd:t.maximumCostUsd??(await this.defaults(n)).maximumSpendUsd}),r=Tt.parse(await this.request("/harness-setup","POST",o,n));Et(r.request,r.manifest);let i=r.request.policy;if(r.request.teamId!==this.options.teamId||r.request.operationId!==o.operationId||i.kind!=="hosted_harness"||i.profileRepositoryId!==o.profileRepositoryId||i.source.definitionId!==o.definitionId||i.modelId!==o.modelId||i.reasoningEffort!==o.reasoningEffort||r.maximumCostUsd!==o.maximumCostUsd||r.manifest.limits.maximumSpendUsd!==o.maximumCostUsd)throw new Error("Harness preparation differs from its requested scope or configuration.");return r}async run(t,n){let o=ue.parse({...t,maximumCostUsd:t.maximumCostUsd??(await this.defaults(n)).maximumSpendUsd});if(o.request.teamId!==this.options.teamId)throw new Error("Experiment workspace mismatch.");let r=await this.details(await this.request("","POST",{...o,maximumCostUsd:t.maximumCostUsd},n));if(t.maximumCostUsd===void 0&&(o.maximumCostUsd=r.configuration.maximumCostUsd),p(ce(r.request))!==p(ce(o.request))||r.configuration.maximumCostUsd!==o.maximumCostUsd||r.configuration.sourceExperimentId!==o.sourceExperimentId||r.configuration.admissionRequestHash!==p(o))throw new Error("Experiment admission differs from its submitted configuration.");if(o.graders&&p(o.graders)!==p(r.configuration.graders.map(i=>({id:i.id,version:i.version,contentHash:i.contentHash,mappings:i.mappings??[]}))))throw new Error("Experiment admission differs from its selected graders or mappings.");return r}async get(t,n={}){return this.details(await this.request(`/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n.signal),t)}async diagnostics(t,n={}){let o=an.parse({afterSequence:n.afterSequence,afterCallId:n.afterCallId}),r=new URLSearchParams(Object.entries(o).filter(([,i])=>i!==void 0).map(([i,s])=>[i,String(s)]));return cn(await this.request(`/${encodeURIComponent(v.parse(t))}/diagnostics?${r}`,"GET",void 0,n.signal),{teamId:this.options.teamId,runId:t,manifestHash:n.manifestHash,afterSequence:n.afterSequence,afterCallId:n.afterCallId})}async list(t={},n){let o=At.parse(t),r=new URLSearchParams(Object.entries(o).filter(([,c])=>c!==void 0).map(([c,l])=>[c,String(l)])),i=e.object({items:e.array(e.unknown()).max(100),nextCursor:v.nullable()}).strict().parse(await this.request(`?${r}`,"GET",void 0,n)),s=await Promise.all(i.items.map(c=>this.details(c)));if(s.length>o.limit||new Set(s.map(c=>c.summary.id)).size!==s.length||i.nextCursor!==null&&i.nextCursor!==s.at(-1)?.summary.id||s.some(c=>o.projectId&&c.request.project?.id!==o.projectId||o.datasetHash&&c.request.taskset.contentHash!==o.datasetHash||o.status&&c.summary.status!==o.status))throw new Error("Experiment page differs from its selected scope.");return{items:s,nextCursor:i.nextCursor}}async result(t,n){let o=e.object({executionId:v,passId:v.nullable(),manifest:e.unknown(),result:e.unknown()}).strict().parse(await this.request(`/${encodeURIComponent(v.parse(t))}/result`,"GET",void 0,n)),r=J(o);if(o.executionId!==t||r.manifest.teamId!==this.options.teamId||r.manifest.lineage?.execution.id!==t||r.manifest.lineage.scoringPassId!==o.passId)throw new Error("Experiment result identity mismatch.");return{...r,executionId:t,passId:o.passId}}async cancel(t,n){return this.details(await this.request(`/${encodeURIComponent(v.parse(t))}/cancel`,"POST",{},n),t)}async duplicate(t,n,o){let r=await this.details(await this.request(`/${encodeURIComponent(v.parse(t))}/duplicate`,"POST",{operationId:v.parse(n)},o));if(r.request.operationId!==n||r.configuration.sourceExperimentId!==t||r.summary.id===t)throw new Error("Duplicate Experiment admission differs from its source or operation.");return r}async score(t,n){let o=ae.parse(t),r=this.pass(await this.request(`/${encodeURIComponent(o.execution.id)}/scoring-passes`,"POST",o,n));if(p(r.request)!==p(o))throw new Error("Scoring admission differs from its submitted inputs.");return r}async scoringPass(t,n){return this.pass(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}`,"GET",void 0,n),t)}async scoringPasses(t,n={}){let o=new URLSearchParams(n.afterId?{afterId:v.parse(n.afterId)}:{});n.executionKind&&o.set("executionKind",e.literal("recorded_evidence").parse(n.executionKind));let r=e.object({items:e.array(e.unknown()).max(30),nextCursor:v.nullable()}).strict().parse(await this.request(`/${encodeURIComponent(v.parse(t))}/scoring-passes?${o}`,"GET",void 0,n.signal)),i=r.items.map(s=>this.pass(s));if(i.some(s=>s.request.execution.id!==t||s.request.executionKind!==n.executionKind)||new Set(i.map(s=>s.id)).size!==i.length)throw new Error("Scoring pass page differs from its execution ownership.");return{items:i,nextCursor:r.nextCursor}}async cancelScoringPass(t,n){return this.pass(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}/cancel`,"POST",{},n),t)}async scoringResult(t,n){let o=e.object({executionId:v,passId:v,manifest:e.unknown(),result:e.unknown()}).strict().parse(await this.request(`/scoring-passes/${encodeURIComponent(v.parse(t))}/result`,"GET",void 0,n)),r=J(o);if(o.passId!==t||r.manifest.teamId!==this.options.teamId||r.manifest.id!==t||r.manifest.lineage?.execution.id!==o.executionId||r.manifest.lineage.scoringPassId!==t)throw new Error("Scoring result identity mismatch.");return{...r,executionId:o.executionId,passId:t}}async compare(t,n,o){let r=d(c=>c.startsWith("score_")?this.scoringResult(c,o):this.result(c,o),"read"),[i,s]=await Promise.all([r(t),r(n)]);return{baseline:i,candidate:s,comparison:Re(i,s)}}async details(t,n){let o=await on(t);if(o.summary.teamId!==this.options.teamId||n&&o.summary.id!==n)throw new Error("Experiment identity mismatch.");return o}pass(t,n){let o=en(t);if(o.teamId!==this.options.teamId||n&&o.id!==n)throw new Error("Scoring pass identity mismatch.");return o}async request(t,n,o,r){let i=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/experiments${t}`,{method:n,signal:r,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json",Accept:"application/json"},...o===void 0?{}:{body:JSON.stringify(o)}}),s=await i.json();if(!i.ok){let c=e.object({code:e.string(),message:e.string()}).safeParse(s);throw new nt(i.status,c.success?c.data.code:"experiment_request_failed",c.success?c.data.message:"Experiment request failed.")}return s}};var E=class extends Error{constructor(n,o,r){super(r);this.status=n;this.code=o;this.name="HumanReviewClientError"}status;code;static{d(this,"HumanReviewClientError")}},We=class{static{d(this,"OpenPondHumanReviewClient")}options;constructor(t){let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.hash||n.search||!t.apiKey.trim()||!t.scope.trim()||t.scope!==t.scope.trim()||/[\r\n]/.test(t.scope))throw new Error("Use a scoped key and a plain HTTP(S) API endpoint.");this.options={...t,baseUrl:n.toString().replace(/\/+$/,"")}}async command(t,n){let o=Ge.parse(await this.request({endpoint:"command",scope:this.options.scope,command:t},n)),r=t.action==="cancel"?o.status==="cancelled"&&o.revision>=t.expectedRevision+1:o.revision===t.expectedRevision+1;if(o.id!==t.id||o.scope!==this.options.scope||!r)throw new E(502,"human_response_identity_mismatch","Review response differs from the submitted operation.");return o}async get(t,n,o){let r=Ge.parse(await this.request({endpoint:"get",scope:this.options.scope,id:t,...n?{revision:n}:{}},o));if(r.id!==t||r.scope!==this.options.scope||n!==void 0&&r.revision!==n)throw new E(502,"human_response_identity_mismatch","Review response differs from the requested identity.");return r}async inbox(t,n){let o=yt.parse(await this.request({...t,endpoint:"inbox",scope:this.options.scope},n));if(o.items.some(r=>r.scope!==this.options.scope||t.projectId&&r.projectId!==t.projectId))throw new E(502,"human_inbox_scope_mismatch","Inbox response differs from the authorized scope.");return o}async snapshot(t,n){return e.object({evidence:te,form:ee}).strict().parse(await this.request({...t,endpoint:"snapshot",scope:this.options.scope},n))}async taskSnapshot(t,n){return e.object({evidence:te,form:ee}).strict().parse(await this.request({...t,endpoint:"snapshot_tasks",scope:this.options.scope},n))}async inspect(t,n,o){let r=It.parse(await this.request({endpoint:"inspect",scope:this.options.scope,id:t,...o},n));if(r.some(i=>i.reviewId!==t))throw new E(502,"human_inspection_identity_mismatch","Inspection differs from selected review.");return r}async results(t,n,o){return Xe.parse(await this.request({endpoint:"results",scope:this.options.scope,executionId:t,...n?{selection:n}:{}},o))}async members(t){return e.array(e.object({userId:e.string(),name:e.string().nullable(),email:e.string().nullable(),role:e.string()}).strict()).parse(await this.request({endpoint:"members",scope:this.options.scope},t))}async request(t,n){let o=vt.parse(t);if(o.scope!==this.options.scope)throw new E(403,"human_scope_denied","Request differs from the scoped client workspace.");let r=JSON.stringify(o);if(new TextEncoder().encode(r).byteLength>1048576)throw new E(422,"human_request_too_large","Review request exceeds its bounded transport.");let i=await(this.options.fetch??globalThis.fetch)(`${this.options.baseUrl}/v1/human-review`,{method:"POST",headers:{authorization:`Bearer ${this.options.apiKey}`,"content-type":"application/json","x-openpond-team-id":this.options.scope},body:r,signal:n,redirect:"error"}),s=i.body?.getReader(),c=[],l=0;if(s)try{for(;;){let u=await s.read();if(u.done)break;if(l+=u.value.byteLength,l>8388608)throw await s.cancel(),new E(502,"human_response_too_large","Review response exceeds its bounded transport.");c.push(u.value)}}finally{s.releaseLock()}let m=new Uint8Array(l),h=0;for(let u of c)m.set(u,h),h+=u.byteLength;let y;try{y=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(m))}catch{throw new E(502,"human_response_invalid","Review response is not valid JSON.")}if(!i.ok){let u=e.object({code:e.string().optional(),error:e.string().optional()}).passthrough().safeParse(y);throw new E(i.status,u.success?u.data.code??"human_request_failed":"human_request_failed",u.success?u.data.error??"Review request failed.":"Review request failed.")}if(o.endpoint==="results"){let u=Xe.parse(y),{contentHash:g,...S}=u;if(u.executionId!==o.executionId||p(S)!==g||o.selection!==void 0&&p(u.selection)!==p(o.selection))throw new E(502,"human_result_identity_mismatch","Human results differ from the exact retained execution or selected reviews.")}if(o.endpoint==="snapshot"||o.endpoint==="publish_evidence"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(u.evidence.graderBinding.id!==o.graderId||u.evidence.attempts.length!==o.selections.length||u.evidence.attempts.some((g,S)=>g.experimentId!==o.selections[S].executionId||g.attemptId!==o.selections[S].receiptId))throw new E(502,"human_snapshot_identity_mismatch","Review snapshot differs from selected retained evidence.")}if(o.endpoint==="publish_local"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(!u.evidence.publication||u.evidence.attempts.length!==o.evidence.attempts.length||u.evidence.attempts.some((g,S)=>g.localSource?.kind!=="owner_attested_local"||g.experimentId!==o.evidence.attempts[S].executionId||g.attemptId!==o.evidence.attempts[S].receiptId||g.localSource.retainedAttemptHash!==o.evidence.attempts[S].origin.retainedAttemptHash))throw new E(502,"human_publication_identity_mismatch","Published review differs from the exact local-origin export.")}if(o.endpoint==="snapshot_tasks"){let u=e.object({evidence:te,form:ee}).strict().parse(y);if(u.evidence.graderBinding.id!==o.graderId||p(u.evidence.dataset)!==p(o.dataset)||o.taskIds!==void 0&&p(u.evidence.taskIds)!==p(o.taskIds)||!u.evidence.taskIds?.length||new Set(u.evidence.taskIds).size!==u.evidence.taskIds.length)throw new E(502,"human_snapshot_identity_mismatch","Task snapshot differs from the selected exact tasks.")}return y}};var dn=e.object({sourcePass:f,graders:ae.shape.graders,mappings:ae.shape.mappings,maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),ze=e.object({externalDatasetBinding:ne,scoring:dn.optional(),modelId:e.string().min(1).max(300),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),ot=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}).strict(),x=e.string().min(1).max(240),A=e.string().regex(/^[a-f0-9]{64}$/),Q=e.object({schemaVersion:e.literal("openpond.experimentImprovement.v1"),id:x,operationId:x,requestHash:A,actorId:x,teamId:x,projectId:x.nullable(),ownerWorkspaceId:x,ownerRevision:e.number().int().nonnegative(),ownerSourceRevision:e.string().min(1).max(500),baseRelease:f,profileRef:ot,baseProfileSourceRevision:e.string().min(1).max(500),evidence:e.object({manifest:F,result:oe}).strict(),component:e.object({kind:e.enum(["skill","workflow","agent","instruction"]),path:e.string().min(1).max(2e3),workflowId:x.optional()}).strict(),mode:e.enum(["manual","llm_assisted"]),status:e.enum(["draft","authoring_queued","authoring","frozen","testing","ready_for_review","adopting","accepted","rolled_back","declined","failed","cancelled"]),revision:e.number().int().positive(),limits:e.object({maximumCostUsd:e.number().finite().positive(),maximumAuthoringSteps:e.number().int().min(1).max(500),maximumDurationMs:e.number().int().min(1e3).max(864e5)}).strict(),authoringSteps:e.number().int().nonnegative().max(500),work:e.object({sessionId:x,turnId:x,revision:e.number().int().positive(),startedAt:e.string().datetime()}).strict().nullable(),frozen:e.object({release:f,sourceRevision:e.string().min(1).max(500),profileSourceRevision:e.string().min(1).max(500),authoringHash:A,partitionHash:A,executableSourceHash:A,protectedClosureHash:A,candidateRevision:e.number().int().positive(),diff:e.array(e.object({path:e.string(),before:A.nullable(),after:A.nullable()}).strict()).max(1e4)}).strict().nullable(),test:e.object({recipe:ze,recipeHash:e.string().regex(/^[a-f0-9]{64}$/),baselineOperationId:e.string(),candidateOperationId:e.string(),cancelRequestedAt:e.string().datetime().nullable(),dispatching:e.object({kind:e.enum(["baseline","candidate"]),token:x,pid:e.number().int().positive(),processStart:e.string().nullable(),startedAt:e.string().datetime()}).strict().nullable()}).strict().nullable(),comparison:e.object({baseline:e.object({manifest:F,result:oe}).strict(),candidate:e.object({manifest:F,result:oe}).strict(),frozenHash:A,humanProjection:Qe.optional()}).strict().nullable(),adoptionIntent:e.object({operationId:x,expectedOwnerRevision:e.number().int().nonnegative(),frozenHash:A,humanProjection:Qe.optional()}).strict().nullable(),acceptance:f.nullable(),rollback:f.nullable(),error:e.string().max(2e3).nullable(),createdAt:e.string().datetime(),updatedAt:e.string().datetime(),contentHash:A}).strict();function pn(a){let t=Q.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Improvement state integrity failed.");if(J(t.evidence),t.evidence.manifest.teamId!==t.teamId||t.evidence.result.status!=="completed"||!t.evidence.result.cases.some(r=>r.status==="completed"))throw new Error("Improvement requires usable completed owner evidence.");if(t.test&&(p(t.test.recipe)!==t.test.recipeHash||me(t.test.recipe.externalDatasetBinding).profileId!==t.profileRef.profileId))throw new Error("The test recipe changed its exact selected Profile.");if(t.comparison?.humanProjection){let r=Wt(t.comparison.humanProjection);if(r.teamId!==t.teamId||r.projectId!==t.projectId||p(r.baseline)!==p(t.comparison.baseline)||p(r.candidate)!==p(t.comparison.candidate))throw new Error("Human comparison projection differs from its exact owner evidence.")}if(t.comparison&&(J(t.comparison.baseline),J(t.comparison.candidate),!t.frozen||t.comparison.frozenHash!==p(t.frozen)||!Re(t.comparison.baseline,t.comparison.candidate).comparable))throw new Error("Improvement comparison is not bound to a comparable frozen candidate.");if(t.status==="ready_for_review"&&(!t.frozen||!t.comparison))throw new Error("Improvement is missing qualification.");if(t.status==="adopting"&&(!t.adoptionIntent||!t.frozen||t.adoptionIntent.frozenHash!==p(t.frozen)))throw new Error("Improvement adoption intent is not bound to its tested revision.");if(t.status==="accepted"&&(!t.acceptance||!t.comparison||!t.frozen))throw new Error("Improvement acceptance is missing its exact qualification receipt.");if(t.status==="rolled_back"&&(!t.acceptance||!t.rollback))throw new Error("Profile rollback is missing its durable owner receipt.");return t}d(pn,"verifyExperimentImprovementState");var mn=e.object({states:e.array(Q).max(50),nextCursor:x.nullable()}).strict(),io=e.object({operationId:x,ownerWorkspaceId:x,expectedOwnerRevision:e.number().int().nonnegative(),baseRelease:f,profileRef:ot,profileSourceRevision:e.string().min(1).max(500),projectId:x.nullable(),evidence:f,component:Q.shape.component,mode:Q.shape.mode,limits:Q.shape.limits}).strict(),un=e.discriminatedUnion("operation",[e.object({operation:e.literal("list"),limit:e.number().int().min(1).max(50).default(30),cursor:x.optional()}).strict(),e.object({operation:e.literal("options"),evidence:f}).strict(),e.object({operation:e.literal("start"),request:io}).strict(),e.object({operation:e.enum(["read","humanComparisonOptions"]),id:x}).strict(),e.object({operation:e.literal("instructions"),id:x}).strict(),e.object({operation:e.literal("edit"),id:x,revision:e.number().int().positive(),expectedFileHash:A,text:e.string().max(25e4)}).strict(),e.object({operation:e.literal("mode"),id:x,revision:e.number().int().positive(),mode:e.enum(["manual","llm_assisted"])}).strict(),e.object({operation:e.literal("author"),id:x,revision:e.number().int().positive(),modelId:x,prompt:e.string().min(1).max(2e4)}).strict(),e.object({operation:e.enum(["freeze","finishAuthoring","useCandidate","discard","cancel","rollback"]),id:x,revision:e.number().int().positive()}).strict(),e.object({operation:e.literal("test"),id:x,revision:e.number().int().positive(),recipe:ze}).strict(),e.object({operation:e.literal("compare"),id:x,revision:e.number().int().positive(),baseline:f,candidate:f,humanSelections:_t.optional()}).strict()]),we=e.object({teamId:x,evidence:f,scoring:dn.optional(),profiles:e.array(e.object({id:A,name:e.string(),profileRef:ot,ownerWorkspaceId:x,ownerRevision:e.number().int().nonnegative(),baseRelease:f,profileSourceRevision:e.string(),components:e.array(e.object({kind:e.enum(["skill","instruction","agent","workflow"]),path:e.string(),agentId:e.string().optional(),workflowId:e.string().optional(),label:e.string(),binding:ne}).strict()).max(500)}).strict()).max(100)}).strict(),so=e.object({candidateId:x,actorId:x,teamId:x,projectId:x.nullable(),candidateRevision:e.number().int().positive(),recipeHash:A,baseline:e.object({manifest:F,result:oe}).strict(),candidate:e.object({manifest:F,result:oe}).strict(),contentHash:A}).strict();function ln(a){let t=so.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Accepted Human discovery integrity failed.");for(let r of[t.baseline,t.candidate])if(J(r),r.manifest.teamId!==t.teamId||r.manifest.lineage?.humanProjection)throw new Error("Discovery must retain original owner evidence.");return t}d(ln,"verifyExperimentImprovementHumanOptions");var C=e.string().min(1).max(240),z=e.string().regex(/^[a-f0-9]{64}$/),rt=e.string().regex(/^[a-f0-9]{40}$/),hn=e.object({schemaVersion:e.literal("openpond.hostedProfileCandidateExport.v1"),actorId:C,teamId:C,candidateId:C,candidateRevision:e.number().int().positive(),projectId:C.nullable(),profileRef:e.object({source:e.literal("openpond_git"),repositoryId:C,profileId:C}).strict(),expectedCommit:rt,component:Q.shape.component,baseRelease:f,frozenHash:z,executableSourceHash:z,protectedClosureHash:z,compiler:e.object({workspaceId:C,name:e.string().max(500),repositoryId:C}).strict(),sourceManifest:e.object({base64:e.string().max(28e5),contentHash:z,sizeBytes:e.number().int().positive().max(2e6)}).strict(),policySource:gt,qualification:e.object({kind:e.enum(["owner_attested_local","hosted_execution"]),ownerActorId:C,teamId:C,originalEvidence:f,baseline:f,candidate:f,comparisonHash:z,recipe:ze}).strict(),createdAt:e.string().datetime(),contentHash:z}).strict();var ao=e.object({schemaVersion:e.literal("openpond.hostedProfileCandidateAdoption.v1"),id:C,operationId:C,actorId:C,teamId:C,candidateId:C,exportHash:z,executionOrigin:e.enum(["owner_attested_local","hosted_execution"]),qualification:hn.shape.qualification,testedCandidateRelease:f,activeRelease:f,expectedCommit:rt,committedProfileGit:rt,executableSourceHash:z,protectedClosureHash:z,createdAt:e.string().datetime(),contentHash:z}).strict();function fn(a){let t=ao.parse(a),{contentHash:n,...o}=t;if(p(o)!==n||t.executionOrigin!==t.qualification.kind||t.qualification.ownerActorId!==t.actorId||t.qualification.teamId!==t.teamId)throw new Error("Hosted candidate receipt integrity differs.");return t}d(fn,"verifyHostedProfileCandidateReceipt");var gn=e.discriminatedUnion("operation",[e.object({operation:e.literal("adopt"),operationId:C,export:hn}).strict(),e.object({operation:e.enum(["read","rollback"]),operationId:C,adoptionOperationId:C,profileRepositoryId:C}).strict()]);var bn=class{constructor(t){this.options=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.hash||n.search||!t.apiKey.trim()||!t.teamId.trim()||!t.actorId.trim())throw new Error("Select the authenticated Improve owner and API origin.");this.origin=n.toString().replace(/\/+$/,"")}options;static{d(this,"ExperimentImprovementClient")}origin;async hostedCandidate(t,n){let o=gn.parse(t);if(o.operation==="adopt"&&(o.export.actorId!==this.options.actorId||o.export.teamId!==this.options.teamId))throw new Error("The hosted candidate export belongs to a different owner.");let{response:r,value:i}=await K(this.options.fetch??fetch,`${this.origin}/v1/profile-candidate-adoptions`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"Content-Type":"application/json","X-OpenPond-Team-Id":this.options.teamId},body:JSON.stringify({teamId:this.options.teamId,command:o}),signal:n},(c,l,m)=>Object.assign(new Error(m),{status:c,code:l}));if(!r.ok){let c=e.object({code:e.string(),message:e.string().optional(),error:e.string().optional()}).passthrough().safeParse(i);throw Object.assign(new Error(c.success?c.data.message??c.data.error??c.data.code:"Hosted candidate operation failed."),{status:r.status,code:c.success?c.data.code:void 0})}let s=fn(i);if(s.actorId!==this.options.actorId||s.teamId!==this.options.teamId||s.operationId!==o.operationId||o.operation==="adopt"&&(s.exportHash!==o.export.contentHash||s.candidateId!==o.export.candidateId||s.testedCandidateRelease.contentHash!==o.export.policySource.harnessRelease.contentHash))throw new Error("Hosted candidate readback differs from the exact owner request.");return s}async command(t,n){let o=un.parse(t),{response:r,value:i}=await K(this.options.fetch??fetch,`${this.origin}/v1/experiment-improvements`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"Content-Type":"application/json","X-OpenPond-Team-Id":this.options.teamId},body:JSON.stringify({teamId:this.options.teamId,request:o}),signal:n},(m,h,y)=>Object.assign(new Error(y),{status:m,code:h}));if(!r.ok){let m=e.object({error:e.string(),code:e.string().optional()}).passthrough().safeParse(i);throw Object.assign(new Error(m.success?m.data.error:"The Improve operation failed."),{status:r.status,code:m.success?m.data.code:void 0})}if(o.operation==="options"){let m=we.parse(i);if(m.teamId!==this.options.teamId||p(m.evidence)!==p(o.evidence))throw new Error("The Improve choices changed their exact originating evidence.");return m}if(o.operation==="humanComparisonOptions"){let m=ln(i);if(m.candidateId!==o.id||m.actorId!==this.options.actorId||m.teamId!==this.options.teamId)throw new Error("Human discovery belongs to another owner or candidate.");return m}if(o.operation==="instructions"){let m=e.object({candidateId:e.string(),candidateRevision:e.number().int().positive(),path:e.string(),text:e.string().max(25e4),textHash:e.string().regex(/^[a-f0-9]{64}$/),contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().parse(i);if(m.candidateId!==o.id||pt(m.text)!==m.textHash)throw new Error("The candidate instructions belong to a different revision.");return m}let s=o.operation==="list"?mn.parse(i):null;if(o.operation==="list"&&s&&(s.states.length>o.limit||s.states.some((m,h)=>o.cursor&&m.id<=o.cursor||h>0&&m.id<=s.states[h-1].id)||s.nextCursor&&(o.cursor&&s.nextCursor<=o.cursor||s.states.some(m=>m.id>s.nextCursor))))throw new Error("The retained candidate page changed its scan boundary.");let l=(s?s.states:[i]).map(m=>{let h=pn(m);if(h.actorId!==this.options.actorId||h.teamId!==this.options.teamId||"id"in o&&h.id!==o.id)throw new Error("The Improve response belongs to a different owner or candidate.");if(o.operation==="start"&&h.requestHash!==p(o.request))throw new Error("The Improve request identity changed.");return h});return s?{states:l,nextCursor:s.nextCursor}:l[0]}};var de=class{constructor(t){this.access=t;let n=new URL(t.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!t.apiKey.trim()||!t.actorId.trim()||!t.teamId.trim())throw new Error("Select the current evaluation owner and HTTP API origin.");this.origin=n.toString().replace(/\/+$/,"")}access;static{d(this,"EvaluationCoordinationTransport")}origin;async post(t,n,o){let r=JSON.stringify({teamId:this.access.teamId,projectId:this.access.projectId,request:n});if(new TextEncoder().encode(r).byteLength>1048576)throw new Error("The reviewed evaluation command exceeds 1 MiB.");let{response:i,value:s}=await K(this.access.fetch??fetch,`${this.origin}/v1/${t}`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${this.access.apiKey}`,"X-OpenPond-Team-Id":this.access.teamId,"Content-Type":"application/json"},body:r,signal:o},(c,l,m)=>Object.assign(new Error(m),{status:c,code:l}));if(!i.ok){let c=e.object({error:e.string().optional(),message:e.string().optional(),code:e.string().optional()}).passthrough().safeParse(s);throw Object.assign(new Error(c.success?c.data.error??c.data.message??"Evaluation operation failed.":"Evaluation operation failed."),{status:i.status,code:c.success?c.data.code:void 0})}return s}};var k=e.string().trim().min(1).max(200),ye=e.string().regex(/^[a-f0-9]{64}$/),ve=e.string().datetime(),wn=e.object({operationId:k,id:k.optional(),expectedRevision:e.number().int().nonnegative(),teamId:k,projectId:k.nullable(),enabled:e.boolean(),configuration:ue,cadence:e.discriminatedUnion("kind",[e.object({kind:e.literal("interval"),seconds:e.number().int().min(60).max(31536e3)}).strict(),e.object({kind:e.literal("nightly"),calendar:Rt}).strict()]),maximumTotalSpendUsd:e.number().finite().positive().max(1e4),maximumAttempts:e.number().int().min(1).max(20)}).strict().superRefine((a,t)=>{(a.configuration.request.teamId!==a.teamId||(a.configuration.request.project?.id??null)!==a.projectId)&&t.addIssue({code:"custom",message:"The scheduled Experiment must retain its actual workspace and Project."}),a.configuration.maximumCostUsd>a.maximumTotalSpendUsd&&t.addIssue({code:"custom",message:"The run ceiling exceeds the approved cumulative schedule ceiling."})}),co=e.object({id:k,scheduledAt:ve,coalescedThroughAt:ve,coalescedCount:e.number().int().nonnegative(),configurationHash:ye,operationId:k,state:e.enum(["reserved","dispatching","running","cleaning","completed","failed","cancelled","uncertain"]),executionId:k.nullable(),attempt:e.number().int().positive(),maximumCostUsd:e.number().finite().positive(),actualSpendUsd:e.number().finite().nonnegative().nullable(),cleanupComplete:e.boolean(),error:e.string().max(4e3).nullable()}).strict(),po=e.object({schemaVersion:e.literal("openpond.experimentEvaluationSchedule.v1"),id:k,revision:e.number().int().positive(),actorId:k,teamId:k,projectId:k.nullable(),operationId:k,requestHash:ye,configuration:ue,configurationHash:ye,cadence:wn.shape.cadence,state:e.enum(["scheduled","disabled","blocked"]),nextRunAt:ve.nullable(),maximumTotalSpendUsd:e.number().finite().positive(),maximumAttempts:e.number().int().positive(),lastEvaluatedConfigurationHash:ye.nullable(),newerUnevaluatedRelease:f.nullable(),fires:e.array(co).max(1e4),reason:e.string().max(4e3).nullable(),createdAt:ve,updatedAt:ve,contentHash:ye}).strict();function mo(a){let{operationId:t,request:n,...o}=a,{operationId:r,...i}=n;return p({...o,request:i})}d(mo,"scheduledExperimentHash");function uo(a){let t=po.parse(a);if(mt(t,"Scheduled Experiment"),t.configurationHash!==mo(t.configuration)||t.configuration.request.teamId!==t.teamId||(t.configuration.request.project?.id??null)!==t.projectId)throw new Error("Scheduled Experiment immutable authority differs from its recipe.");return t}d(uo,"verifyExperimentEvaluationSchedule");var lo=e.object({teamId:k,id:k,operationId:k,expectedRevision:e.number().int().positive(),action:e.enum(["cancel_active","retry_active","pause"])}).strict(),ho=e.discriminatedUnion("operation",[e.object({operation:e.literal("publish"),request:wn}).strict(),e.object({operation:e.literal("control"),request:lo}).strict(),e.object({operation:e.literal("read"),id:k}).strict(),e.object({operation:e.literal("list"),cursor:k.optional(),limit:e.number().int().min(1).max(100).default(50)}).strict()]),xn=class{static{d(this,"OpenPondExperimentEvaluationScheduleClient")}transport;constructor(t){this.transport=new de(t)}async command(t,n){let o=ho.parse(t),r=this.transport.access;if(o.operation==="publish"&&(o.request.teamId!==r.teamId||o.request.projectId!==r.projectId)||o.operation==="control"&&o.request.teamId!==r.teamId)throw new Error("The schedule command belongs to another workspace or Project.");let i=await this.transport.post("experiment-evaluation-schedules",o,n),s=o.operation==="list"?e.object({items:e.array(e.unknown()).max(o.limit),nextCursor:e.string().nullable()}).strict().parse(i):null,c=(s?.items??[i]).map(l=>{let m=uo(l);if(m.actorId!==r.actorId||m.teamId!==r.teamId||m.projectId!==r.projectId||o.operation==="read"&&m.id!==o.id||o.operation==="control"&&m.id!==o.request.id||o.operation==="publish"&&(m.requestHash!==p(o.request)||o.request.id&&m.id!==o.request.id))throw new Error("Schedule readback differs from its exact owner command.");return m});return s?{items:c,nextCursor:s.nextCursor}:c[0]}};var w=e.string().trim().min(1).max(240),$=e.string().regex(/^[a-f0-9]{64}$/),$e=e.object({schemaVersion:e.literal("openpond.advancedRefinerEvaluation.v1"),operationId:w,actorId:w,teamId:w,projectId:w.nullable(),mode:e.enum(["review_quality","downstream_adaptation"]),profileRef:e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:w,profileId:w}).strict(),sourceRevision:e.string().min(1).max(500),baselineRelease:f,refinerRelease:f,evidence:f,externalDatasetBinding:ne,adaptationDatasetBinding:ne,privateClosureHash:$,adaptationTaskIds:e.array(w).min(1).max(1e4),holdoutTaskIds:e.array(w).min(1).max(1e4),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),holdoutSplit:e.enum(["train","validation","test","frozen_eval"]),environmentPolicy:e.discriminatedUnion("kind",[e.object({kind:e.literal("resettable"),environmentHash:$}).strict(),e.object({kind:e.literal("frozen_observations"),environmentHash:$}).strict()]),maximumCostUsd:e.number().finite().positive().max(1e4),maximumDurationMs:e.number().int().min(1e3).max(864e5),maximumModelSteps:e.number().int().min(1).max(1e3),contentHash:$}).strict();function fo(a){let t=$e.parse(a),{contentHash:n,...o}=t;if(p(o)!==n)throw new Error("Advanced Refiner evaluation admission changed.");let r=me(t.externalDatasetBinding);if(r.profileId!==t.profileRef.profileId||r.protectedProfileClosureHash!==t.privateClosureHash)throw new Error("Advanced evaluation changed its Profile or protected evaluator closure.");if(t.adaptationSplit===t.holdoutSplit||new Set([...t.adaptationTaskIds,...t.holdoutTaskIds]).size!==t.adaptationTaskIds.length+t.holdoutTaskIds.length)throw new Error("Adaptation and private holdout must be disjoint ordered cases.");let i=me(t.adaptationDatasetBinding);if(i.profileId!==r.profileId||i.packageHash!==r.packageHash||p(i.dataset)!==p(r.dataset)||p(i.target)!==p(r.target)||i.protectedProfileClosureHash!==r.protectedProfileClosureHash)throw new Error("This native advanced adapter needs separate adaptation and holdout recipes from the same exact released package and target.");if(i.split!==t.adaptationSplit||r.split!==t.holdoutSplit)throw new Error("Advanced split policies differ from their exact admitted recipes.");let s=new Set(r.population.map(l=>l.taskId)),c=new Set(i.population.map(l=>l.taskId));if(t.holdoutTaskIds.some(l=>!s.has(l))||t.adaptationTaskIds.some(l=>!c.has(l)))throw new Error("Advanced evaluation selected cases outside its exact Dataset recipe.");return t}d(fo,"verifyAdvancedRefinerEvaluationPin");var go=e.object({pin:$e,modelId:w,profileId:w,model:ut,seed:e.number().int(),reasoningEffort:e.enum(["none","off","low","medium","high","xhigh","max"]).nullable()}).strict(),bo=e.discriminatedUnion("operation",[e.object({operation:e.literal("start"),request:go}).strict(),e.object({operation:e.enum(["read","cancel","resume"]),id:w}).strict(),e.object({operation:e.literal("list")}).strict()]),xo=e.object({taskId:w,sourceCaseHash:$,reviewSessionId:w,reviewTurnId:w,inputHarness:f,trigger:f,decision:e.enum(["no_action","route_deterministically","queue_refiner"]),outcome:f.nullable(),proposal:f.nullable(),validations:e.array(f).max(100),grade:e.object({id:w,contentHash:$,score:e.number().min(0).max(1).nullable(),passed:e.boolean(),failureClass:e.string().nullable()}).strict(),resetComplete:e.boolean()}).strict(),ps=e.object({schemaVersion:e.literal("openpond.advancedRefinerReviewReceipt.v1"),id:w,runId:w,pinHash:$,ownerActorId:w,teamId:w,privateClosureHash:$,refinerRelease:f,cases:e.array(xo).min(1).max(1e4),reviewScore:e.number().min(0).max(1).nullable(),completedCases:e.number().int().nonnegative(),noActionCases:e.number().int().nonnegative(),routedCases:e.number().int().nonnegative(),proposalCases:e.number().int().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),cleanupComplete:e.boolean(),createdAt:e.string().datetime(),contentHash:$}).strict();var yn=we.shape.profiles.element,wo=we.extend({profiles:e.array(yn.extend({components:e.array(yn.shape.components.element.extend({adaptationSplits:e.array(e.object({split:e.enum(["train","validation","test","frozen_eval"]),taskIds:e.array(w)})),environmentHash:$,resettable:e.boolean(),reviewQuality:e.boolean()}))})),refinerReleases:e.array(f),activeRefiner:f.nullable(),models:e.array(e.object({id:w,profileId:w,name:e.string(),location:e.enum(["local","hosted"])}))}),yo=e.object({operation:e.literal("prepare"),evidence:f,profileOptionId:w,componentLabel:w,mode:e.enum(["review_quality","downstream_adaptation"]),adaptationSplit:e.enum(["train","validation","test","frozen_eval"]),operationId:w,refinerRelease:f,maximumCostUsd:e.number().positive(),maximumDurationMs:e.number().int().positive(),maximumModelSteps:e.number().int().positive()}).strict(),vo=e.union([bo,yo,e.object({operation:e.literal("options"),evidence:f}).strict()]),ms=e.object({modelRequests:e.number().int().nonnegative(),knownSpendUsd:e.number().nonnegative(),totalSpendUsd:e.number().nonnegative().nullable(),heldUsd:e.number().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict(),vn=class{static{d(this,"OpenPondAdvancedRefinerEvaluationClient")}transport;constructor(t){this.transport=new de(t)}async command(t,n){let o=vo.parse(t),r=this.transport.access,i=d(m=>{let h=fo(m);if(h.actorId!==r.actorId||h.teamId!==r.teamId||h.projectId!==r.projectId)throw new Error("The advanced pin belongs to another evaluation owner.");return h},"assertPin");o.operation==="start"&&i(o.request.pin);let s=await this.transport.post("advanced-refiner-evaluations",o,n);if(o.operation==="options"){let m=wo.parse(s);if(m.teamId!==r.teamId||p(m.evidence)!==p(o.evidence))throw new Error("Advanced options changed their reviewed evidence.");return m}if(o.operation==="prepare"){let m=e.object({pin:$e}).strict().parse(s),h=i(m.pin);if(h.operationId!==o.operationId||p(h.profileRef)!==o.profileOptionId||p(h.evidence)!==p(o.evidence)||h.mode!==o.mode||p(h.refinerRelease)!==p(o.refinerRelease)||h.adaptationSplit!==o.adaptationSplit||h.maximumCostUsd!==o.maximumCostUsd||h.maximumDurationMs!==o.maximumDurationMs||h.maximumModelSteps!==o.maximumModelSteps)throw new Error("Advanced preparation changed its reviewed command.");return{pin:h}}if(o.operation==="list")return e.object({items:e.array(e.object({id:w,status:e.enum(["prepared","running","succeeded","failed","cancelled"]),mode:e.enum(["review_quality","downstream_adaptation"]),startedAt:e.string().datetime().nullable(),completedAt:e.string().datetime().nullable(),failure:e.string().nullable()}).strict()).max(1e4)}).strict().parse(s);if(o.operation==="cancel"){let m=e.object({id:w,status:e.enum(["prepared","running","succeeded","failed","cancelled"])}).strict().parse(s);if(m.id!==o.id)throw new Error("Advanced cancellation returned another Run.");return m}let c=e.object({schemaVersion:e.literal("openpond.modelRun.v1"),id:w,kind:e.literal("evaluation"),modelId:w,profileId:w,evaluation:e.object({benchmarkId:e.literal("harness-refiner"),advancedEvaluation:$e}).passthrough()}).passthrough().parse(s),l=i(c.evaluation.advancedEvaluation);if(o.operation==="start"?l.contentHash!==o.request.pin.contentHash||c.modelId!==o.request.modelId||c.profileId!==o.request.profileId:c.id!==o.id)throw new Error("The advanced Run differs from its exact retained request.");return c}};import{randomUUID as So}from"node:crypto";function In(a,t){return{supportsResume:!t,get:d((...n)=>a.get(...n),"get"),start:t?async()=>{throw new Error("This runtime does not support resuming a stopped guest; start fresh Work with saved outputs")}:(...n)=>a.start(...n),exec:d((n,o)=>a.exec(n,t?{...o,timeoutSeconds:Math.min(o.timeoutSeconds??30,60)}:o),"exec"),mkdir:d((...n)=>a.mkdir(...n),"mkdir"),uploadFile:d((...n)=>a.uploadFile(...n),"uploadFile"),uploadFileBase64:d((...n)=>a.uploadFileBase64(...n),"uploadFileBase64"),listFiles:d((...n)=>a.listFiles(...n),"listFiles"),downloadFileResponse:d((...n)=>a.downloadFileResponse(...n),"downloadFileResponse"),stop:d((...n)=>a.stop(...n),"stop"),delete:d((...n)=>a.delete(...n),"delete"),createWork:d(({requestId:n,repo:o,budgetUsd:r,metadata:i})=>{if(t){if(o?.trim())throw new Error("This runtime does not support repository provisioning; provide Work inputs instead");if(r!==void 0)throw new Error("Hosted spending budgets are not supported by this runtime");let c={resources:t.resources??{cpu:1,memoryGb:2,diskGb:10},...n?{requestId:n}:{}};return a.create(c)}let s=r?.trim()||"1.00";return a.create({...o?.trim()?{repo:o.trim()}:{},runtimeProfileId:"openpond-work-v1",resources:{cpu:2,memoryGb:4,diskGb:16},budget:{maxUsd:s},quotas:{maxSpendUsd:s,maxDurationSeconds:3600,idleTimeoutSeconds:900,maxCommands:200,maxOpenPorts:4},metadata:{source:"openpond-sdk-work",...i,...n?{workRequestId:n}:{}}},{async:!0})},"createWork")}}d(In,"workSandbox");function it(a,t){let n=new URL(a);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash)throw new Error(`${t} must be an HTTP(S) endpoint without embedded credentials, query or fragment`);return n.toString().replace(/\/$/,"")}d(it,"configuredEndpoint");function De(a,t){if(!a?.trim())throw new Error(`${t} is required`);return a.trim()}d(De,"configuredKey");var Io=e.object({choices:e.array(e.object({message:e.object({content:e.string().nullable().optional(),tool_calls:e.array(e.object({id:e.string().min(1),type:e.literal("function"),function:e.object({name:e.string().min(1),arguments:e.string()})})).optional()})})).min(1)});async function Sn(a,t){if(!t)return ht(a);let n=await fetch(`${a.apiBaseUrl}/chat/completions`,{method:"POST",headers:{authorization:`Bearer ${a.token}`,"content-type":"application/json"},body:JSON.stringify({model:a.model,messages:a.messages,tools:a.tools,tool_choice:"auto",stream:!1}),signal:a.signal,redirect:"error"});if(!n.ok)throw new Error(`Configured model request failed (${n.status})`);return Io.parse(await n.json())}d(Sn,"workModelTurn");var Co="openpond-chat",Ro=24,ko=4e4,st=2e4,Y="outputs",at="inputs/previous-outputs",En="inputs/.openpond-context.json",Po=100,Cn=100,Rn=100*1024*1024,Me=class{static{d(this,"OpenPondWorkClient")}#t;#n;#o;#e;#r;#i;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl,this.#o=t.chatApiBaseUrl,this.#e=In(t.sandboxes,t.sandboxConfig),this.#r=t.defaultModel??Co,this.#i=t.customModel??!1}async run(t){let n=t.prompt.trim();if(!n)throw new Error("Work prompt is required");t.signal?.throwIfAborted();let o=bt(t.requiredOutputs??[]),r=d(async u=>t.onEvent?.(u),"emit"),i=t.cleanup??"keep",s=jo(i),c=null,l=null,m=!1,h=Pn(t.maxSteps,1,100,Ro),y="";try{await r({type:"status",message:"Preparing sandbox"}),c=await this.#h(t),await r({type:"sandbox",sandboxId:c.id,state:c.state}),await this.#u(c.id,t.inputs??[]),l=await this.#l(c.id);let u=[{role:"system",content:Oo(c.id,(t.inputs?.length??0)>0)},...(t.history??[]).map(g=>({...g})),{role:"user",content:n+(t.requiredOutputs?.length?`
|
|
3
|
+
Required outputs under outputs/: `+JSON.stringify(t.requiredOutputs):"")}];for(let g=1;g<=h;g+=1){t.signal?.throwIfAborted(),await r({type:"status",message:`Thinking \xB7 step ${g}`});let T=(await Sn({apiBaseUrl:this.#o,token:this.#t,model:t.model?.trim()||this.#r,messages:u,tools:[...Eo,...o],toolChoice:"auto",signal:t.signal,metadata:{source:"openpond-sdk-work",sandboxId:c.id,apiBaseUrl:this.#n,...t.metadata}},this.#i)).choices?.[0],N=T?.message?.content?.trim()??"",D=T?.message?.tool_calls??[];if(u.push({role:"assistant",content:N||null,...D.length>0?{tool_calls:D}:{}}),N&&(y=N,await r({type:"assistant",text:N})),D.length===0){let B;try{B=await this.#d(c.id,l,t.requiredOutputs)}catch(pe){u.push({role:"user",content:"Output acceptance failed. Correct the required outputs and submit again: "+Z(pe)});continue}for(let pe of B)await r({type:"output",output:pe});m=!0,await this.#s(c.id,B,t,s,r);let O={sandboxId:c.id,text:y,steps:g,outputs:B,lifecycle:s};return await r({type:"done",...O}),O}for(let[B,O]of D.entries()){t.signal?.throwIfAborted();let pe=await this.#f(c.id,O,B,t.timeoutSeconds,r,t.requiredOutputs);u.push(pe)}}throw new Error(`Work did not finish within ${h} steps`)}catch(u){if(c&&l&&!m)try{let g=await this.#d(c.id,l,t.requiredOutputs);for(let S of g)await r({type:"output",output:S});await this.#s(c.id,g,t,s,r)}catch(g){kn(u,s,g)}throw kn(u,s),u}}async deleteSandbox(t){try{if((await this.#e.get(t)).state==="deleted")return;await this.#e.delete(t)}catch(n){if(n instanceof Je&&n.status===404)return;throw n}}async#u(t,n){if(n.length===0)return;if(n.length>Cn)throw new Error(`Work inputs exceed the ${Cn} file limit`);if(n.reduce((s,c)=>s+Buffer.byteLength(c.contentsBase64,"base64"),0)>Rn)throw new Error(`Work inputs exceed the ${Rn} byte limit`);await this.#e.mkdir(t,{path:at,recursive:!0});let r=new Set,i=[];for(let[s,c]of n.entries()){let l=qo(c,s,r),m=`${at}/${l}`;await this.#e.uploadFileBase64(t,m,c.contentsBase64),i.push({id:c.id,path:m,name:c.name,mimeType:c.mimeType??null,checksumSha256:c.checksumSha256??null,revision:c.revision??null,metadata:c.metadata??{}})}await this.#e.uploadFile(t,En,JSON.stringify({version:1,files:i},null,2))}async#s(t,n,o,r,i){if(r.persistence.outputCount=n.length,n.length===0)r.persistence.status="not_needed";else if(o.persistOutput){r.persistence.status="running";for(let s of n){await i({type:"persistence",output:s,status:"started"});try{let c=Ao(this.#e,t,s),l=d(async()=>{let m=await c(),h=o.requiredOutputs?.find(y=>Be(s.path)===`${Y}/${y.path}`);if(h){let y=Se(h,Buffer.from(m.file.contentsBase64,"base64"));if(s.validation&&y?.artifactHash!==s.validation.artifactHash)throw new Error("work_saved_output_changed")}return m},"download");await o.persistOutput({output:s,download:l}),r.persistence.persistedCount+=1,await i({type:"persistence",output:s,status:"succeeded"})}catch(c){let l=Z(c);throw r.persistence.status="failed",r.persistence.error=l,await i({type:"persistence",output:s,status:"failed",error:l}),(o.cleanup??"keep")!=="keep"&&await this.#a(t,r,i),c}}r.persistence.status="complete"}else{if((o.cleanup??"keep")==="delete"&&!o.discardOutputs)throw r.persistence.status="failed",r.persistence.error="Deleting a Work sandbox with outputs requires persistOutput or discardOutputs: true",await this.#a(t,r,i),new Error(r.persistence.error);r.persistence.status="not_requested"}await this.#c(t,o.cleanup??"keep",r,i)}async#a(t,n,o){if(this.#e.supportsResume){await this.#c(t,"stop",n,o);return}n.cleanup.status="pending",n.cleanup.finalSandboxState="running",n.cleanup.error="Output persistence must be retried before guest deletion",await o({type:"cleanup",policy:n.cleanupPolicy,status:"pending",sandboxState:"running",error:n.cleanup.error})}async#c(t,n,o,r){if(n!=="keep"){o.cleanup.status="running",await r({type:"cleanup",policy:n,status:"started"});try{let i=n==="delete"?await this.#e.delete(t):(await this.#e.stop(t)).sandbox;o.cleanup.finalSandboxState=i.state,o.cleanup.status=n==="delete"&&i.state==="deleted"||n==="stop"&&i.state==="stopped"?"complete":"pending",await r({type:"cleanup",policy:n,status:o.cleanup.status,sandboxState:i.state})}catch(i){let s=Z(i);throw o.cleanup.status="failed",o.cleanup.error=s,await r({type:"cleanup",policy:n,status:"failed",error:s}),i}}}downloadOutput(t,n){return this.#e.downloadFileResponse(t,typeof n=="string"?n:n.path)}async#l(t){return await this.#e.mkdir(t,{path:Y,recursive:!0}),Ho(await this.#p(t))}async#d(t,n,o){let i=(await this.#p(t)).filter(s=>n.get(s.path)!==On(s)).sort((s,c)=>s.path.localeCompare(c.path)).slice(0,Po).map(To);for(let s of o??[]){let c=i.find(m=>Be(m.path)===`${Y}/${s.path}`);if(!c)throw new Error("work_required_output_missing:"+s.path);let l=await this.#e.downloadFileResponse(t,c.path);if(l.file.truncated)throw new Error("work_output_download_truncated");c.validation=Se(s,Buffer.from(l.file.contentsBase64,"base64"))}return i}async#p(t){return(await this.#e.listFiles(t,{path:Y,recursive:!0,maxEntries:500})).files.filter(o=>o.type==="file"&&!Be(o.path).includes("/.openpond-"))}async#h(t){if(t.sandboxId){let o=await this.#e.get(t.sandboxId);if(o.state==="stopped")await this.#e.start(o.id,{async:!0});else if(o.state==="deleted"||o.state==="error")throw new Error(`Cannot resume sandbox ${o.id} in state ${o.state}`);return await this.#m(o.id,t.signal)}let n=await this.#e.createWork(t);return this.#m(n.id,t.signal)}async#m(t,n){let o=Date.now()+72e4,r=await this.#e.get(t);for(;Date.now()<o;){if(n?.throwIfAborted(),r.state==="running")return r;if(r.state==="error"||r.state==="deleted")throw new Error(`Sandbox ${r.id} entered ${r.state}${r.logs.length?`: ${r.logs.join(`
|
|
4
|
+
`)}`:""}`);await zo(2e3,n),r=await this.#e.get(t)}throw new Error(`Sandbox ${t} did not become ready before timeout`)}async#f(t,n,o,r,i,s){let c=n.id||`work_tool_${o}`,l=n.function?.name,m=xt(s??[],l??"");if(m)try{let u=wt(m,JSON.parse(n.function?.arguments||"{}")),g=`${Y}/${m.path}`,S=`${Y}/.openpond-${So()}`;await this.#e.uploadFileBase64(t,S,Buffer.from(u).toString("base64"));let T=d(D=>"'"+D.replaceAll("'","'\\''")+"'","quote");if((await this.#e.exec(t,{command:`mkdir -p -- ${T(g.slice(0,g.lastIndexOf("/")))} && mv -f -- ${T(S)} ${T(g)}`,timeoutSeconds:30})).command.exitCode!==0)throw new Error("work_output_registration_failed");return V(c,{ok:!0,path:g,validation:Se(m,u)})}catch(u){return V(c,{ok:!1,error:Z(u)})}if(l!=="run_command")return V(c,{error:`Unknown tool: ${l??"missing"}`});let h;try{h=JSON.parse(n.function?.arguments||"{}")}catch(u){return V(c,{error:`Invalid tool arguments: ${Z(u)}`})}let y=typeof h.command=="string"?h.command.trim():"";if(!y)return V(c,{error:"command is required"});if(y.length>st){let u=`command exceeds the ${st} character limit`;return await i({type:"tool",toolCallId:c,command:y,status:"failed",output:u}),V(c,{status:"failed",error:u})}await i({type:"tool",toolCallId:c,command:y,status:"started"});try{let u=await this.#e.exec(t,{command:y,timeoutSeconds:Pn(r,1,900,180)}),g=Wo(u.command.output,ko),S=u.command.status==="succeeded"?"succeeded":"failed";return await i({type:"tool",toolCallId:c,command:y,status:S,output:g,exitCode:u.command.exitCode}),V(c,{status:u.command.status,exitCode:u.command.exitCode,output:g})}catch(u){if(u instanceof Je)throw u;let g=Z(u);return await i({type:"tool",toolCallId:c,command:y,status:"failed",output:g}),V(c,{status:"failed",error:g})}}},Eo=[{type:"function",function:{name:"run_command",description:"Run a shell command inside the persistent OpenPond sandbox. Use standard shell tools to inspect, edit, build, and test files. Commands start in the repository workspace.",parameters:{type:"object",additionalProperties:!1,properties:{command:{type:"string",minLength:1,maxLength:st,description:"Shell command to execute."}},required:["command"]}}}];function Oo(a,t){return["You are OpenPond Work, a careful coding agent operating in an isolated Linux sandbox.",`The active sandbox is ${a}.`,...t?[`The authoritative saved files for this turn are staged under /workspace/${at}; their manifest is /workspace/${En}.`,"Before revising a previous output, read its staged file and manifest. Copy the staged input into the output directory before editing it; previous output paths may not exist in this sandbox.","Preserve the actual file bytes. Never reconstruct a saved file from the conversation or claim to have preserved it without reading the staged input."]:[],"Use run_command to inspect the workspace, edit files, and validate your work.",`Place completed user-facing files in ${Y}. The runtime collects new and revised files there automatically when the turn completes.`,"Do the requested work completely. Preserve existing user changes and avoid destructive commands.","Keep the user informed with concise prose, but call tools whenever verification or file changes are needed.","Before finishing, run relevant tests and summarize the concrete result."].join(`
|
|
5
|
+
`)}d(Oo,"systemPrompt");function jo(a){return{cleanupPolicy:a,persistence:{status:"not_requested",outputCount:0,persistedCount:0},cleanup:{status:"not_requested"}}}d(jo,"initialLifecycle");function Ao(a,t,n){let o=null;return()=>(o??=a.downloadFileResponse(t,{path:n.path,maxBytes:Math.max(1,n.sizeBytes)}).then(r=>{let i=Buffer.byteLength(r.file.contentsBase64,"base64");if(r.file.truncated||r.file.returnedBytes!==r.file.totalSizeBytes||i!==n.sizeBytes)throw new Error(`Output download was incomplete for ${n.name}`);return r}),o)}d(Ao,"lazyOutputDownload");function qo(a,t,n){let o=a.id.replace(/[^a-zA-Z0-9._-]+/g,"-").slice(0,80)||`input-${t+1}`,r=a.name.replace(/[^a-zA-Z0-9._-]+/g,"-").slice(-120)||"file",i=`${o}-${r}`,s=i,c=1;for(;n.has(s);)c+=1,s=`${i}-${c}`;return n.add(s),s}d(qo,"uniqueInputName");function kn(a,t,n){!a||typeof a!="object"||Object.assign(a,{workLifecycle:t,...n?{workFinalizationError:Z(n)}:{}})}d(kn,"attachWorkFailure");function Ho(a){return new Map(a.map(t=>[t.path,On(t)]))}d(Ho,"outputSignatures");function On(a){return`${a.sizeBytes}:${a.updatedAt}`}d(On,"outputSignature");function To(a){let t=Be(a.path).split("/").at(-1)||a.path,n=Uo(t);return{path:a.path,name:t,mimeType:n,sizeBytes:a.sizeBytes,updatedAt:a.updatedAt,isBinary:a.isBinary??null,previewable:a.previewable??(n.startsWith("image/")||n==="application/pdf"||n.startsWith("text/"))}}d(To,"workOutputFromFile");function Be(a){return a.replaceAll("\\","/")}d(Be,"normalizedOutputPath");function Uo(a){let t=a.toLowerCase().match(/\.[^.]+$/)?.[0]??"";return _o[t]??"application/octet-stream"}d(Uo,"workOutputMimeType");var _o=Object.freeze({".avif":"image/avif",".csv":"text/csv",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".gif":"image/gif",".html":"text/html",".jpeg":"image/jpeg",".jpg":"image/jpeg",".json":"application/json",".m4a":"audio/mp4",".md":"text/markdown",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".pdf":"application/pdf",".png":"image/png",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".svg":"image/svg+xml",".tsv":"text/tab-separated-values",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".webp":"image/webp",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});function V(a,t){return{role:"tool",tool_call_id:a,content:JSON.stringify(t)}}d(V,"toolMessage");function Pn(a,t,n,o){return Number.isFinite(a)?Math.min(n,Math.max(t,Math.floor(a))):o}d(Pn,"boundedInteger");function Wo(a,t){return a.length<=t?a:`${a.slice(0,t)}
|
|
6
|
+
\u2026 output truncated by openpond-sdk`}d(Wo,"truncate");function Z(a){return a instanceof Error?a.message:String(a)}d(Z,"errorMessage");function zo(a,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason);return}let r=setTimeout(n,a);r.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(r),o(t.reason)},{once:!0})})}d(zo,"sleep");import{promises as jn}from"node:fs";var Ke=class{static{d(this,"OpenPondProjectActionsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async list(t){let n=await U(this.#n,this.#t,Le(t.projectId,"releases",t.teamId));return(await _(n,"List Project Action releases")).releases}async catalog(t){let n=await U(this.#n,this.#t,Le(t.projectId,"catalog",t.teamId));return(await _(n,"Get Project Action catalog")).catalog}async publish(t){let[n,o]=await Promise.all([jn.readFile(t.build.bundlePath),jn.readFile(t.build.runnerPath)]),r=await U(this.#n,this.#t,Le(t.projectId,"releases",t.teamId),{method:"POST",body:JSON.stringify({sourceRef:t.sourceRef,sourceCommitSha:t.sourceCommitSha,bundleBase64:n.toString("base64"),runnerBase64:o.toString("base64"),registry:t.build.registry,manifest:t.build.manifest,metadata:t.metadata})});return(await _(r,"Publish Project Actions")).release}async run(t){let n=await U(this.#n,this.#t,Le(t.projectId,`actions/${encodeURIComponent(t.actionId)}`,t.teamId),{method:"POST",body:JSON.stringify({input:t.value??{},releaseId:t.releaseId,idempotencyKey:t.idempotencyKey,callerType:t.callerType??"sdk",callerId:t.callerId}),signal:t.signal,timeoutMs:9e5});return(await _(n,"Run Project Action")).invocation}};function Le(a,t,n){return`/v1/project-actions/${encodeURIComponent(a)}/${t}?teamId=${encodeURIComponent(n)}`}d(Le,"projectActionPath");var Ne=class{static{d(this,"OpenPondProfileActionsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async catalog(t){let n=Ie(t.teamId,"teamId"),o=new URLSearchParams({teamId:n});t.profileId?.trim()&&o.set("profileId",t.profileId.trim()),t.profileName?.trim()&&o.set("profileName",t.profileName.trim());let r=await U(this.#n,this.#t,`/v1/profile/actions?${o.toString()}`);return(await _(r,"Get Profile Action catalog")).catalog}async run(t){let n=Ie(t.teamId,"teamId"),o=Ie(t.actionKey,"actionKey"),r=Ie(t.idempotencyKey,"idempotencyKey"),i=Ie(t.catalogVersion,"catalogVersion"),s=await U(this.#n,this.#t,`/v1/profile/actions/run?${new URLSearchParams({teamId:n}).toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t.profileId?.trim()?{profileId:t.profileId.trim()}:{},...t.profileName?.trim()?{profileName:t.profileName.trim()}:{},actionKey:o,value:t.value??{},conversationId:t.conversationId??null,createConversation:t.createConversation,conversationTitle:t.conversationTitle??null,idempotencyKey:r,catalogVersion:i,externalCapabilityLeases:t.externalCapabilityLeases})});return _(s,"Run Profile Action")}};function Ie(a,t){let n=a.trim();if(!n)throw new Error(`${t} is required`);return n}d(Ie,"requiredValue");import{randomUUID as An}from"node:crypto";var Fe=class{static{d(this,"OpenPondWorkflowsClient")}#t;#n;constructor(t){this.#t=t.apiKey,this.#n=t.apiBaseUrl.replace(/\/+$/,"")}async list(t={}){return this.#o("","List Workflows",{signal:t.signal})}async create(t,n={}){return this.#o("","Create Workflow",{method:"POST",body:JSON.stringify({...t,clientRequestId:t.clientRequestId?.trim()||An()}),signal:n.signal})}async update(t,n,o={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}`,"Update Workflow",{method:"PATCH",body:JSON.stringify(n),signal:o.signal})}async delete(t,n={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}`,"Delete Workflow",{method:"DELETE",signal:n.signal})}async runNow(t,n={},o={}){return this.#o(`/schedules/${encodeURIComponent(ct(t,"scheduleId"))}/run`,"Run Workflow",{method:"POST",body:JSON.stringify({clientRequestId:n.clientRequestId?.trim()||An()}),signal:o.signal})}async#o(t,n,o={}){let r=await U(this.#n,this.#t,`/v1/saved-work${t}`,o);return _(r,n)}};function ct(a,t){let n=a.trim();if(!n)throw new Error(`${t} is required`);return n}d(ct,"requiredId");var dt=class{static{d(this,"OpenPondClient")}sandboxes;work;workflows;actions;profileActions;learning;experiments;connectedEvidence;humanReview;constructor(t){let n=t.apiKey?.trim()??"";if(!n&&(!t.sandbox||!t.model))throw new Error("OpenPond API key is required when using a default sandbox or model");let o=t.sandbox?{...t.sandbox,endpoint:it(t.sandbox.endpoint,"Sandbox endpoint"),apiKey:De(t.sandbox.apiKey,"Sandbox API key")}:void 0,r=t.model?{endpoint:it(t.model.endpoint,"Model endpoint"),apiKey:De(t.model.apiKey,"Model API key"),model:De(t.model.model,"Model ID")}:void 0,i=t.baseUrl?.trim()||"https://api.openpond.ai";this.learning=s=>new Ut({apiKey:n,baseUrl:i,scope:s}),this.experiments=s=>new _e({apiKey:n,baseUrl:i,teamId:s}),this.connectedEvidence=s=>new Ue({apiKey:n,baseUrl:i,teamId:s}),this.humanReview=s=>new We({apiKey:n,baseUrl:i,scope:s}),this.sandboxes=ft({apiKey:o?.apiKey??n,baseUrl:i,sandboxApiUrl:o?.endpoint??t.sandboxApiUrl,customEndpoint:!!o}),this.work=new Me({apiKey:r?.apiKey??n,apiBaseUrl:i,chatApiBaseUrl:r?.endpoint||t.chatApiUrl?.trim()||lt({apiBaseUrl:i,env:{}}),sandboxes:this.sandboxes,sandboxConfig:o,defaultModel:r?.model,customModel:!!r}),this.workflows=new Fe({apiKey:n,apiBaseUrl:i}),this.actions=new Ke({apiKey:n,apiBaseUrl:i}),this.profileActions=new Ne({apiKey:n,apiBaseUrl:i})}};function Vs(a){return new dt(a)}d(Vs,"createOpenPondClient");export{M as a,Vo as b,Xo as c,he as d,Qo as e,Yo as f,Zo as g,er as h,tr as i,Nt as j,Qt as k,Ue as l,Zt as m,ae as n,_e as o,We as p,un as q,bn as r,ho as s,xn as t,vo as u,vn as v,Vs as w};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{e as H,j as R}from"./chunk-
|
|
2
|
+
import{e as H,j as R}from"./chunk-DKOVZ6R2.js";import{v as I,z as C}from"./chunk-OFJPOTES.js";import{m as k,n as b}from"./chunk-RCT3O3HQ.js";import{a as h}from"./chunk-FTQLQJQV.js";import{promises as s}from"node:fs";import n from"node:path";import{execFile as O}from"node:child_process";import{promisify as A}from"node:util";var T=A(O);async function v(e,i,a={}){return(await T("git",["-C",e,...i],{encoding:"utf8",timeout:3e4,maxBuffer:8388608,env:{...process.env,...a}})).stdout.trim()}h(v,"candidateGit");async function j(e,i=I,a=!1){if(e.profileRef.source!=="local"&&!a)throw new Error("This Git adapter requires the actual installed local Profile owner; hosted adoption needs its published-source owner.");let r=await i(e.profileRef);if(r.error||r.mode!=="local"||r.activeProfile!==e.profileRef.profileId||!r.repoPath||!r.sourcePath)throw new Error("The original Profile owner is unavailable.");let l=await s.realpath(r.repoPath),p=await s.realpath(r.sourcePath),f=n.relative(l,p);if(f.startsWith("..")||n.isAbsolute(f))throw new Error("Profile source escapes its actual Git owner.");return{profile:r,repo:l,source:p,sourceRelative:f}}h(j,"originalCandidateProfile");async function ce(e,i,a=!0){if(!/^[a-f0-9]{40}$/.test(i)||await v(e,["rev-parse","HEAD"])!==i)throw new Error("The original Profile Git revision changed.");if(a&&await v(e,["status","--porcelain","--untracked-files=all"]))throw new Error("Commit or reconcile changes in the original Profile before this operation.")}h(ce,"assertCandidateGitHead");async function me(e,i){let a=await j(e.state,e.loadProfile,e.allowRemoteSnapshot),r=n.join(e.storeDir,"library","harnesses","profile-candidate-staging");await s.mkdir(r,{recursive:!0,mode:448});let l=await s.mkdtemp(n.join(r,"source-"));await s.rmdir(l),await v(a.repo,["worktree","add","--detach",l,e.commit]);try{let p=await C({repoPath:l,profileId:e.state.profileRef.profileId});if(p.error||!p.sourcePath)throw new Error("The staged original Profile cannot be loaded.");return await i({root:l,profile:p,repo:a.repo,source:p.sourcePath})}finally{await v(a.repo,["worktree","remove","--force",l]).catch(()=>{}),await s.rm(l,{recursive:!0,force:!0})}}h(me,"withCandidateProfileWorktree");function y(e){if(!e||n.isAbsolute(e)||e.includes("\\")||e.split("/").some(i=>!i||i==="."||i===".."))throw new Error("Original Profile patch path is not contained.");return e}h(y,"portable");async function pe(e){let i=e.base.manifest.metadata.profileSourceBindings;if(!Array.isArray(i))throw new Error("The original release needs compiler source bindings before candidate adoption.");let a=e.state.component.path,r=e.state.component,l=new Map(i.map(t=>{if(!t||typeof t!="object"||typeof t.releasedPath!="string"||typeof t.profileRelativePath!="string")throw new Error("Original Profile source binding is invalid.");return[y(t.releasedPath),y(t.profileRelativePath)]})),p=r.kind==="instruction"&&a==="instructions/system.md"&&e.base.manifest.metadata.profileInstructionSourcePath==="instructions/system.md"&&!l.has(a),f=l.get(a)??(p?"instructions/system.md":void 0),S=r.kind==="workflow"?`workflows/${r.workflowId}/`:r.kind==="agent"?a.split("/").slice(0,2).join("/")+"/":n.posix.dirname(a)+"/",w=f?n.posix.dirname(f)+"/":null;if(r.kind==="workflow"&&!f&&(w=S),r.kind==="agent"){let t=e.profile.agents.find(o=>a.startsWith(`agents/${o.id}/`));if(!t)throw new Error("The selected Agent original source is unavailable.");let c=y(t.path);w=((await s.lstat(n.join(e.source,c))).isDirectory()?c:n.posix.dirname(c))+"/"}let E=new Map(e.base.sourceFiles.map(t=>[t.path,t])),x=new Map(e.candidate.sourceFiles.map(t=>[t.path,t])),g=new Map;for(let t of new Set([...E.keys(),...x.keys()])){let c=E.get(t),m=x.get(t);if(c?.asset.contentHash===m?.asset.contentHash)continue;if(c&&c.asset.visibility!=="policy"||m&&m.asset.visibility!=="policy")throw new Error("A candidate cannot change protected Profile source.");let o=l.get(t)??(p&&t===a?f:void 0);if(!o&&t.startsWith(S)&&w&&(o=w+t.slice(S.length)),!o&&t==="workflows/catalog.json"&&[...l.keys()].some(P=>/^workflows\/[^/]+\/(PROMPT\.md|ACTION\.json)$/.test(P))||!o&&t==="dependency-lock/profile-import.json")continue;if(!o)throw new Error(`The selected component has no original Profile source mapping: ${t}`);if(o=y(o),o!==f&&!(r.kind!=="instruction"&&w&&o.startsWith(w)))throw new Error("Candidate patch changes a different original Profile component.");if(H(o))throw new Error("Candidate patch crosses the protected Profile evaluation closure.");let u=g.get(o),d=m?.bytes??null;if(u&&(u.before!==(c?.asset.contentHash??null)||b(u.bytes===null?null:Array.from(u.bytes))!==b(d===null?null:Array.from(d))))throw new Error("Public component aliases disagree on the original source edit.");g.set(o,{before:p&&t===a?null:c?.asset.contentHash??null,bytes:d})}for(let[t,c]of g){let m=n.join(e.source,...t.split("/")),o=n.dirname(m);for(;!await s.stat(o).catch(()=>null);)o=n.dirname(o);let u=n.relative(await s.realpath(e.source),await s.realpath(o));if(u.startsWith("..")||n.isAbsolute(u))throw new Error("Candidate patch escapes the staged Profile source.");let d=await s.lstat(m).catch(()=>null);if(d?.isSymbolicLink()||d&&!d.isFile())throw new Error("Original source patch needs a regular file.");let P=d?await s.readFile(m):null;if((P?k(P):null)!==c.before)throw new Error("Original source bytes differ from the exact candidate baseline.");c.bytes===null?await s.rm(m):(await s.mkdir(n.dirname(m),{recursive:!0}),await s.writeFile(m,c.bytes,{mode:d?.mode??384}))}return[...g.keys()]}h(pe,"applyCandidateProfileSource");function fe(e){let i=e.base.manifest.metadata.profileRepositoryId;return R({storeDir:e.storeDir,workspaceId:e.state.ownerWorkspaceId,name:e.base.manifest.name,profile:e.profile,sourceRevision:e.sourceRevision,...typeof i=="string"?{repositoryId:i}:{}})}h(fe,"compileOriginalCandidateProfile");export{v as a,j as b,ce as c,me as d,pe as e,fe as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{d as c}from"./chunk-
|
|
2
|
+
import{d as c}from"./chunk-EYTTZ5H4.js";import{za as f}from"./chunk-ZY32SZ2P.js";import{a as n}from"./chunk-FTQLQJQV.js";import{promises as v}from"node:fs";import u from"node:path";async function j(e){let s=await c(e.store,e.harnessRelease);if(!s)throw new Error("Profile evaluation Harness release is unavailable.");return w({...e,runtime:s})}n(j,"profileEvaluationsForRelease");async function w(e){let s=e.runtime,o=s.release.harnessRelease;if(o.id!==e.harnessRelease.id||o.contentHash!==e.harnessRelease.contentHash)throw new Error("Profile evaluation runtime differs from its requested release.");let r=o.metadata.profile;if(!r||typeof r!="object"||r.id!==e.ref.profileId||r.sourceRevision!==e.sourceRevision)throw new Error("Profile evaluation release differs from its accepted source.");let i={profileRef:e.ref,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease};if(!o.files.some(a=>a.path==="evals/catalog.json"))return{...i,catalogHash:null,definitions:[],suites:[]};let d=u.join(s.release.bundlePath,"source"),t=n(async a=>o.files.some(g=>g.path===a)?v.readFile(u.join(d,...a.split("/"))):void 0,"read"),[R,p,m]=await Promise.all([t("evals/catalog.json"),t("workflows/catalog.json"),t("workflows/actions.json")]),{catalog:l,catalogHash:h}=f({agentSnapshot:s.release.agentSnapshot,harnessRelease:o,catalogBytes:R,workflowBytes:p,actionBytes:m});return{...i,catalogHash:h,definitions:l.definitions,suites:l.suites}}n(w,"profileEvaluationsForRuntime");export{j as a,w as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{e as S}from"./chunk-
|
|
2
|
+
import{e as S}from"./chunk-EYTTZ5H4.js";import{Z as h}from"./chunk-6I5AUTVO.js";import{a as A}from"./chunk-G4747MOW.js";import{a as b,e as H,f as w,j as f}from"./chunk-LE75SVEL.js";import{f as O,g as k}from"./chunk-ZY32SZ2P.js";import{e as I,i as P}from"./chunk-OTDDXEQ6.js";import{n as g}from"./chunk-RCT3O3HQ.js";import{A as c}from"./chunk-X2J2P5ZT.js";import{a as u}from"./chunk-FTQLQJQV.js";import{randomUUID as T}from"node:crypto";import{readFile as v}from"node:fs/promises";import p from"node:path";import{randomUUID as $}from"node:crypto";var y=c.object({revision:c.number().int().nonnegative(),overlay:H}).strict(),z=y.extend({proposal:w}).strict(),m=class{constructor(e){this.client=e}client;static{u(this,"HostedHarnessOverlayStorage")}async getHarnessRunOverlay(e){let s=await this.client.request({contractVersion:h,requestId:$(),operation:"harness/overlay/get",params:{runId:e}});return s===null?null:y.parse(s).overlay}async putHarnessRunOverlay(e){let s=H.parse(e.overlay);if(!e.requestId.trim()||s.revision!==(e.expectedRevision===null?0:e.expectedRevision+1))throw new Error("Hosted Harness overlay mutation requires a stable request and next revision.");let r=y.parse(await this.client.request({contractVersion:h,requestId:e.requestId,operation:"harness/overlay/put",params:{runId:s.runId,expectedRevision:e.expectedRevision,overlay:s}}));if(r.revision!==s.revision||r.overlay.contentHash!==s.contentHash)throw new Error("Host Harness overlay response changed committed identity.");return r.overlay}async createHarnessRunOverlay(e){if(e.revision!==0||e.status!=="active")throw new Error("A new Harness run overlay must be active at revision 0.");return this.putHarnessRunOverlay({overlay:e,expectedRevision:null,requestId:`harness-overlay:${e.runId}:${e.contentHash}`})}async ensureHarnessRunOverlay(e){let s=await this.getHarnessRunOverlay(e.runId);if(s){if(s.workspace.workspaceId!==e.workspace.id||s.baseHarnessRelease.id!==e.harnessRelease.id||s.baseHarnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("The durable Agent run is already bound to another Harness release.");return s}let r=f({schemaVersion:"openpond.harnessRunOverlay.v1",id:`overlay-${g({runId:e.runId,harnessRelease:e.harnessRelease}).slice(0,24)}`,runId:e.runId,baseHarnessRelease:e.harnessRelease,workspace:{workspaceId:e.workspace.id,revision:e.workspace.revision,sourceRevision:e.workspace.sourceRevision,channelRevision:e.workspace.currentChannel.revision},revision:0,status:"active",edits:[],createdAt:e.admittedAt,updatedAt:e.admittedAt,metadata:{}});return this.createHarnessRunOverlay(r)}async appendHarnessRunOverlayEditsAtomically(e){return this.transition(e,"append")}async freezeHarnessRunOverlayAtomically(e){return this.transition({...e,edits:[]},"freeze")}async abandonHarnessRunOverlayAtomically(e){return this.transition({...e,edits:[]},"abandon")}async freezeHarnessRunOverlayWithProposalAtomically(e){let s=await this.getHarnessRunOverlay(e.runId);if(!s||s.revision!==e.expectedRevision||s.status!=="active")throw new Error("Hosted Harness overlay revision or status changed.");let r=new Set(s.edits.map(i=>i.id));for(let i of e.edits){if(r.has(i.id))throw new Error(`Harness overlay edit id already exists: ${i.id}.`);r.add(i.id)}let{contentHash:l,...n}=s,t=f({...n,revision:s.revision+1,status:"frozen",edits:[...s.edits,...e.edits],updatedAt:e.updatedAt}),d=w.parse(e.buildProposal(t)),a=z.parse(await this.client.request({contractVersion:h,requestId:`harness-proposal:${t.runId}:${d.contentHash}`,operation:"harness/overlay/freezeProposal",params:{runId:t.runId,expectedRevision:s.revision,overlay:t,proposal:d}}));if(a.overlay.contentHash!==t.contentHash||a.proposal.contentHash!==d.contentHash)throw new Error("Host Harness proposal response changed committed identity.");return{overlay:a.overlay,proposal:a.proposal}}async transition(e,s){let r=await this.getHarnessRunOverlay(e.runId);if(!r||r.revision!==e.expectedRevision||r.status==="abandoned"||s!=="abandon"&&r.status!=="active")throw new Error("Hosted Harness overlay revision or status changed.");if(s==="append"&&e.edits.length===0)throw new Error("Harness overlay append requires edits.");let l=new Set(r.edits.map(a=>a.id));for(let a of e.edits){if(l.has(a.id))throw new Error(`Harness overlay edit id already exists: ${a.id}.`);l.add(a.id)}let{contentHash:n,...t}=r,d=f({...t,revision:r.revision+1,status:s==="append"?"active":s==="freeze"?"frozen":"abandoned",edits:[...r.edits,...e.edits],updatedAt:e.updatedAt});return this.putHarnessRunOverlay({overlay:d,expectedRevision:r.revision,requestId:`harness-overlay:${d.runId}:${d.contentHash}`})}};var N=c.object({workspace:b,release:c.object({id:c.string().min(1),contentHash:c.string().regex(/^[a-f0-9]{64}$/),sourceRevision:c.string().min(1),assetsPath:c.string().min(1)}).strict()}).strict();async function C(o,e=null){let s=await o.request({contractVersion:h,requestId:T(),operation:"harness/get",params:{reference:e}});if(s===null)return null;let r=N.parse(s);if(!p.isAbsolute(r.release.assetsPath))throw new Error("Hosted Harness assets path must be absolute.");let[l,n]=await Promise.all([v(p.join(r.release.assetsPath,"agent-snapshot.json"),"utf8"),v(p.join(r.release.assetsPath,"harness-release.json"),"utf8")]),t=A.parse({schemaVersion:"openpond.localHarnessReleaseRecord.v1",workspaceId:r.workspace.id,sourceRevision:r.release.sourceRevision,agentSnapshot:I.parse(JSON.parse(l)),harnessRelease:P.parse(JSON.parse(n)),bundlePath:r.release.assetsPath,createdAt:new Date().toISOString()});if(t.harnessRelease.id!==r.release.id||t.harnessRelease.contentHash!==r.release.contentHash||(e!==null?e.id!==r.release.id||e.contentHash!==r.release.contentHash:r.workspace.currentChannel.release?.contentHash!==r.release.contentHash))throw new Error("Hosted Harness release differs from its bound workspace.");return S({workspace:r.workspace,release:t})}u(C,"loadHostedHarnessRuntime");async function se(o,e){let s=e.profileComponentBinding,r=e.profileWorkflowBinding;if(s){if(r||e.currentProfile?.profileId!==s.profileId)throw new Error("Profile component binding differs from the session Profile reference.");let n=await x(o,s.harnessRelease);if(E(n,s.profileId,s.sourceRevision,e.currentProfile?.repositoryId),s.target.kind==="profile")return n;if(s.target.kind==="skill"){let i=s.target.skillPath;if(!n.release.agentSnapshot.skills.some(j=>j.path===i))throw new Error("Bound Profile Skill is unavailable in its released source.");let R=await v(p.join(n.release.bundlePath,"source",i),"utf8");return{...n,instructionContext:[n.instructionContext,`Released Profile Skill (${i}):
|
|
3
3
|
${R}`].join(`
|
|
4
4
|
|
|
5
5
|
`)}}let t=await q(n),d=s.target.actionId,a=t.actions.find(i=>i.id===d);if(!a)throw new Error("Bound Profile Agent action is unavailable in its released source.");return{...n,workflowAction:a}}if(r){if(e.currentProfile?.profileId!==r.profileId)throw new Error("Profile workflow binding differs from the session Profile reference.");let n=await x(o,r.harnessRelease);E(n,r.profileId,r.sourceRevision,e.currentProfile?.repositoryId);let t=await q(n),d=k({binding:r,harnessRelease:n.release.harnessRelease,catalog:t.catalog,catalogHash:t.catalogHash}),a=d.invocation.kind==="agent_action"?d.invocation.actionId:null,i=a?t.actions.find(R=>R.id===a):void 0;if(a&&!i)throw new Error(`Bound Profile action ${a} is missing from its release.`);return{...n,workflow:d,...i?{workflowAction:i}:{}}}let l=await new m(o).getHarnessRunOverlay(e.id);return C(o,l?.baseHarnessRelease??null)}u(se,"loadHostedHarnessRuntimeForSession");async function x(o,e){let s=await C(o,e);if(!s)throw new Error("The bound Profile Harness release is unavailable.");return s}u(x,"requireRelease");function E(o,e,s,r){let l=o.release.harnessRelease.metadata.profile;if(!l||typeof l!="object"||l.id!==e||l.sourceRevision!==s||l.repositoryId!==void 0&&l.repositoryId!==r)throw new Error("Bound Profile source differs from its released Harness source.")}u(E,"assertProfileProvenance");async function q(o){let e=p.join(o.release.bundlePath,"source"),[s,r]=await Promise.all([v(p.join(e,"workflows","catalog.json")),v(p.join(e,"workflows","actions.json"))]);return O({agentSnapshot:o.release.agentSnapshot,harnessRelease:o.release.harnessRelease,catalogBytes:s,actionBytes:r})}u(q,"loadHostedProfileCatalog");export{m as a,C as b,se as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{i as a,j as b,k as c}from"./chunk-7RSQOC5M.js";import"./chunk-FNGZ4UDZ.js";import"./chunk-Q73RKX7I.js";import"./chunk-TPOAAJKA.js";import"./chunk-ZYLLPRPU.js";import"./chunk-PKJHN666.js";import"./chunk-PYNW5OFA.js";import"./chunk-EYTTZ5H4.js";import"./chunk-XY7HFXLH.js";import"./chunk-6I5AUTVO.js";import"./chunk-DKOVZ6R2.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import"./chunk-RY46UPBO.js";import"./chunk-OFJPOTES.js";import"./chunk-U7D6Q744.js";import"./chunk-HG2YFMVU.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-7OKZCJHS.js";import"./chunk-UTIELP6F.js";import"./chunk-7NCM6GBN.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-7J2NMUTK.js";import"./chunk-VEBW7NKD.js";import"./chunk-W45RKGM6.js";import"./chunk-AUO5DCEU.js";import"./chunk-Y4I6CFZJ.js";import"./chunk-SSHE6B7Z.js";import"./chunk-EDYCSW22.js";import"./chunk-JT5YQ52I.js";import"./chunk-XGY4OQLC.js";import"./chunk-PAYFJHPO.js";import"./chunk-WD4KAKEX.js";import"./chunk-2PXKSAG6.js";import"./chunk-ULTV6INR.js";import"./chunk-WGQ3FMRF.js";import"./chunk-JXLDEYRW.js";import"./chunk-JVMSN7LH.js";import"./chunk-YI6ME6PU.js";import"./chunk-DRLP7GIU.js";import"./chunk-BU6MW65V.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-DXJC3QW7.js";import"./chunk-P4QM63L3.js";import"./chunk-MTP3B2SU.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-4PUOWSDE.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-4N4EH3RJ.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{a as resolveWebLaunchMessages,c as runOpenPondAppServerCli,b as runOpenPondServerCli};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import"./chunk-W45RKGM6.js";import{a as ue,b as fe,c as me,d as K,e as q}from"./chunk-
|
|
2
|
+
import"./chunk-W45RKGM6.js";import{a as ue,b as fe,c as me,d as K,e as q}from"./chunk-APKXXAUF.js";import{b as he}from"./chunk-Q7FBVLLB.js";import"./chunk-4DYWVGVS.js";import"./chunk-4TO743HO.js";import"./chunk-A77DLBR4.js";import"./chunk-NSSZ2ZIU.js";import{A as O,B as R,C as A,D as M,g as Q,i as de,k as pe,s as I,v as Z,w as T,x as ge,y as x,z as B}from"./chunk-4BUM6JEC.js";import"./chunk-UGFSAG4U.js";import"./chunk-SSHE6B7Z.js";import"./chunk-WD4KAKEX.js";import"./chunk-2PXKSAG6.js";import"./chunk-ULTV6INR.js";import"./chunk-WGQ3FMRF.js";import"./chunk-BU6MW65V.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-DXJC3QW7.js";import"./chunk-P4QM63L3.js";import"./chunk-MTP3B2SU.js";import"./chunk-PNPV2LDE.js";import"./chunk-KU4TPDPH.js";import"./chunk-AFYYIJ6K.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-4PUOWSDE.js";import{v as $}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import{a as ce}from"./chunk-AYOMVI7J.js";import"./chunk-V24VHT76.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as E}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import{I as le,c as L,e as P,f as N}from"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as y}from"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-5HPZGLOL.js";import"./chunk-ZFJWA4JK.js";import{A as s}from"./chunk-X2J2P5ZT.js";import{a as g}from"./chunk-FTQLQJQV.js";import{readFile as Ae,realpath as at}from"node:fs/promises";import{resolve as it}from"node:path";var He=[{label:"OpenAI-style API key",pattern:/\bsk-[A-Za-z0-9_-]{16,}\b/g},{label:"OpenPond API key",pattern:/\bopk_[A-Za-z0-9_-]{12,}\b/g},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/g},{label:"credential assignment",pattern:/\b(?:api[_-]?key|password|secret|token)["']?\s*[:=]\s*["']?[^\s"']{8,}/gi}],V=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,J=/\b(?:\+?1[-.\s]?)?\(?\d{3}\)?[-.\s]\d{3}[-.\s]\d{4}\b/g;function F(n){let o=[],t=n;for(let c of He)c.pattern.lastIndex=0,c.pattern.test(t)&&o.push(c.label),c.pattern.lastIndex=0,t=t.replace(c.pattern,`[REDACTED ${c.label}]`);V.lastIndex=0;let e=V.test(t);V.lastIndex=0,e&&o.push("email address"),t=t.replace(V,"[REDACTED email]"),J.lastIndex=0;let l=J.test(t);return J.lastIndex=0,l&&o.push("phone number"),t=t.replace(J,"[REDACTED phone]"),{secretStatus:o.some(c=>!c.includes("email")&&!c.includes("phone"))?"blocked":"passed",piiStatus:e||l?"review":"passed",findings:o,redacted:t}}g(F,"scanAndRedactEvidence");import{execFile as je}from"node:child_process";import{promisify as Be}from"node:util";import{access as Me,realpath as Ne,mkdir as qe}from"node:fs/promises";import{join as H,dirname as $e,resolve as Ue}from"node:path";var De=Be(je),z=["SessionStart","PreToolUse","PostToolUse","PostToolUseFailure"],we=s.object({schemaVersion:s.literal("openpond.toolLearningClientInstall.v1"),installationId:s.string(),workspaceRoot:s.string(),clientVersion:s.string(),adapterRelease:s.object({id:s.string(),contentHash:s.string()}),launcher:s.array(s.string()).min(1),command:s.string(),settingsPath:s.string(),installedAt:s.iso.datetime(),configurationHash:s.string(),ownedCommands:s.array(s.string()).min(1).max(32),mcpName:s.string(),ownedMcpHashes:s.array(s.string()).min(1).max(32)}).strict(),Ve=g(n=>`'${n.replaceAll("'","'\\''")}'`,"quote"),X=g((n,o)=>H(n,"tool-learning",`client-${y(o)}.json`),"receiptPath");function j(n){if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Claude settings must be a JSON object.");return n}g(j,"object");function Y(n){return n.hooks===void 0?{}:j(n.hooks)}g(Y,"hookGroups");function ee(n){if(n===void 0)return[];if(!Array.isArray(n))throw new Error("Claude hooks must be arrays.");return n}g(ee,"groups");function Je(n,o){if(!n||typeof n!="object"||Array.isArray(n))return!1;let t=n.hooks;return Array.isArray(t)&&t.some(e=>!!e&&typeof e=="object"&&e.command===o)}g(Je,"owns");function ve(n,o){return n.flatMap(t=>{if(!t||typeof t!="object"||Array.isArray(t))return[t];let e=t;if(!Array.isArray(e.hooks))return[t];let l=e.hooks.filter(c=>!c||typeof c!="object"||!o.includes(String(c.command)));return l.length?[{...e,hooks:l}]:[]})}g(ve,"withoutOwned");async function te(n,o){let t=await L(X(n,o));return t?we.parse(JSON.parse(t)):null}g(te,"installedReceipt");async function ne(n,o){if(process.platform==="win32")throw new Error("Claude tool-learning shell hooks are not qualified on Windows yet.");let t=T(n),{value:e}=await x(t,o);if(e.prepared.registration.client!=="claude_code")throw new Error("Select a Claude Code installation.");if(!e.locallyEnabled||e.installation?.state!=="enabled")throw new Error("Enable this registered installation before installing its hooks.");let l=await O(e).installation(o);if(l.state!=="enabled"||l.collectionPolicyHash!==e.installation.collectionPolicyHash)throw new Error("The installation or collection policy changed. Reconfigure it before installing hooks.");if((await De("claude",["--version"],{timeout:1e4,maxBuffer:65536})).stdout.trim().split(" ")[0]!==e.prepared.registration.clientVersion)throw new Error("Claude version changed. Register and qualify the installed version before enabling hooks.");let r=await Ne(e.workspaceRoot),i=H(r,".claude","settings.local.json"),a=[...!!1&&/\.[cm]?ts$/u.test(process.argv[1]??"")?["/usr/bin/env",`TSX_TSCONFIG_PATH=${Ue($e(process.argv[1]),"../../tsconfig.json")}`]:[],process.execPath,...[...process.execArgv,process.argv[1]],"tool-learning","hook",o,"--home",t];if(a.some(v=>!v||v.includes(`
|
|
3
3
|
`)||v.includes("\r")))throw new Error("Invalid hook launcher.");let u=a.map(Ve).join(" "),d=await te(t,o),f=`openpond-tool-learning-${y(o).slice(0,12)}`,m={type:"stdio",command:a[0],args:a.slice(1).map((v,w)=>w===a.indexOf("hook")-1?"mcp":v)},h=we.parse({schemaVersion:"openpond.toolLearningClientInstall.v1",installationId:o,workspaceRoot:r,clientVersion:e.prepared.registration.clientVersion,adapterRelease:e.prepared.registration.adapterRelease,launcher:a,command:u,settingsPath:i,installedAt:new Date().toISOString(),configurationHash:y({command:u,events:z}),ownedCommands:[...new Set([...d?.ownedCommands??[],u])],mcpName:f,ownedMcpHashes:[...new Set([...d?.ownedMcpHashes??[],y(m)])]});await P(X(t,o),JSON.stringify(h,null,2)+`
|
|
4
4
|
`),await qe(H(r,".claude"),{recursive:!0,mode:448}),await N(H(t,"tool-learning",`settings-${y(i)}`),async()=>{let v=await L(i);if(v&&Buffer.byteLength(v)>1048576)throw new Error("Claude settings exceed 1 MiB.");let w=v?j(JSON.parse(v)):{},k=Y(w);for(let S of z){let C=ve(ee(k[S]),h.ownedCommands);k[S]=[...C,{...S==="SessionStart"?{matcher:"startup|resume|compact"}:{},hooks:[{type:"command",command:u,timeout:8}]}]}w.hooks=k,await P(i,JSON.stringify(w,null,2)+`
|
|
5
5
|
`,{privateParent:!1})});let b=H(r,".mcp.json");return await N(H(t,"tool-learning",`mcp-${y(b)}`),async()=>{let v=await L(b);if(v&&Buffer.byteLength(v)>1048576)throw new Error("MCP configuration exceeds 1 MiB.");let w=v?j(JSON.parse(v)):{},k=w.mcpServers===void 0?{}:j(w.mcpServers);if(k[f]!==void 0&&!h.ownedMcpHashes.includes(y(k[f])))throw new Error("The MCP name contains user changes. Preserve or rename that entry before reinstalling.");k[f]=m,w.mcpServers=k,await P(b,JSON.stringify(w,null,2)+`
|
|
@@ -54,5 +54,5 @@ Inspect tool-learning run --help for optional model and sandbox choices. Reuse C
|
|
|
54
54
|
`),await P(a,f,{privateParent:!1})}),{installationId:o,configuration:"installed",settingsPath:a,clientRestartRequired:!0,clientTrust:l==="codex"?"Use the installed openpond-fix-it skill to launch a captured Codex CLI task. Desktop chats are not observed.":"Restart OpenCode to load the project plugin.",learningEnrollment:!1,consultation:"not_installed"}}g(ae,"installExternalToolLearning");async function Le(n,o){let t=T(n),e=await re(t,o);if(!e)return{installationId:o,configuration:"already_absent"};let{value:l}=await x(t,o);if(e.workspaceRoot!==l.workspaceRoot||e.client!==l.prepared.registration.client)throw new Error("Capture receipt scope differs from the installation.");return await N(D(t,"tool-learning",`external-settings-${y(e.path)}`),async()=>{if((await xe(e.path).catch(()=>null))?.isSymbolicLink())throw new Error("Capture configuration became a symlink; the file was preserved.");let c=await L(e.path);if(c){if(Buffer.byteLength(c)>1048576)throw new Error("Capture configuration exceeds 1 MiB.");if(!e.owned.includes(y(c)))throw new Error("The installed capture file has user changes; it was preserved.");await Ke(e.path)}}),{installationId:o,configuration:"removed",retainedData:"Saved dataset records have separate retention."}}g(Le,"uninstallExternalToolLearning");async function Ie(n,o){let t=T(n),{value:e}=await x(t,o),l=await re(t,o),c=await O(e).installation(o),r=[],i=!1;if(l){await Qe(l.launcher[0]);let a=await L(l.path);a&&Buffer.byteLength(a)<=1048576&&(i=l.owned.includes(y(a)));try{await q(l.client)}catch{r.push("The installed client version differs from the qualified adapter.")}}i||r.push("Run tool-learning install for this registered installation.");let p=new I(t);try{let a=p.clientObservations(o),u=p.status(o);return a.some(d=>["start","resume","compact","pre_tool"].includes(String(d.event)))||r.push("Start a captured client session; Codex uses tool-learning run."),(!e.locallyEnabled||c.state!=="enabled")&&r.push("Collection is disabled or revoked."),u.pendingEvents&&r.push("Pending evidence remains queued; run tool-learning flush."),u.droppedEvents&&r.push("Some evidence was excluded by privacy or capacity limits."),{installationId:o,configured:i,remoteState:c.state,locallyEnabled:e.locallyEnabled,observed:a,local:u,issues:r,consultation:"not_installed",learningEnrollment:!1}}finally{p.close()}}g(Ie,"doctorExternalToolLearning");import{realpath as et}from"node:fs/promises";var tt=s.object({cwd:s.string().min(1).max(4e3),sessionId:s.string().min(1).max(200),event:s.enum(["start","resume","compact","idle","attempt","observation","failure"]),callId:s.string().max(200).optional(),tool:s.string().max(200).optional(),arguments:s.unknown().optional(),text:s.string().optional(),exitCode:s.number().int().nullable().optional()}),nt=s.union([tt,s.object({cwd:s.string().min(1).max(4e3),event:s.literal("flush")})]);async function Ce(n,o,t){let e=[],l=0;for await(let h of process.stdin){let b=Buffer.isBuffer(h)?h:Buffer.from(h);if(l+=b.length,l>1048576)throw new Error("capture_input_limit");e.push(b)}let c=JSON.parse(Buffer.concat(e).toString("utf8"));$(c,1048576);let r=nt.parse(c),i=T(n),p=await x(i,o),a=p.value;if(a.prepared.registration.client!==t||!a.locallyEnabled||await et(r.cwd)!==a.workspaceRoot)return;let u=new I(i);try{if(R(u,a,a.installation),await q(t)!==a.prepared.registration.clientVersion){let h={...a,locallyEnabled:!1};await B(i,h,p.revision),R(u,h,a.installation);return}if(r.event==="flush"){try{await A(i,u,a,AbortSignal.timeout(5e3))}catch{}return}if(["start","resume","compact","idle"].includes(r.event)){r.event!=="idle"&&u.recordClientObservation(o,r.event);try{await A(i,u,a,AbortSignal.timeout(5e3))}catch{}return}u.recordClientObservation(o,r.event==="attempt"?"pre_tool":r.event==="failure"?"failure":"post_tool")}finally{u.close()}if(!r.tool||!r.callId)return;let d={client:t,installationId:o,workspaceRoot:r.cwd,sessionId:r.sessionId,callId:r.callId,tool:r.tool,clientVersion:a.prepared.registration.clientVersion};if(r.event==="attempt"){await M(i,{...d,phase:"attempt",arguments:r.arguments});return}let f=r.exitCode??null,m=r.event==="failure"||f!==null&&f!==0;await M(i,{...d,phase:"observation",result:{outcome:m?"failed":f===0?"succeeded":"incomplete",execution:f===null?"unknown":"executed",sideEffects:"unknown",text:r.text??"",exitCode:f,classification:f!==null&&f!==0?"process_failure":"unknown_failure"}})}g(Ce,"runExternalToolLearningHook");import{spawn as ot}from"node:child_process";import{once as _e}from"node:events";var rt=s.object({id:s.string().min(1).max(200),type:s.literal("command_execution"),command:s.string().max(32768),aggregated_output:s.string(),exit_code:s.number().int().nullable(),status:s.enum(["in_progress","completed","failed"])});async function Pe(n,o){if(process.env.OPENPOND_CODEX_CAPTURE_ACTIVE)throw new Error("This Codex task already runs inside a captured session. Continue with its normal tools.");let t=T(n),{value:e}=await x(t,o);if(e.prepared.registration.client!=="codex"||!e.locallyEnabled||e.installation?.state!=="enabled")throw new Error("Select an enabled Codex capture installation.");if(await q("codex")!==e.prepared.registration.clientVersion)throw new Error("Codex version changed; run tool-learning doctor.");let l=E(n,"prompt");if(!l)throw new Error("Use tool-learning run <installation-id> --prompt <task> for a fresh Codex CLI session.");let c=["exec","--json","--cd",e.workspaceRoot],r=E(n,"model"),i=E(n,"sandbox");r&&c.push("--model",r),i&&c.push("--sandbox",s.enum(["read-only","workspace-write"]).parse(i)),c.push("--",l);let p=new I(t);try{R(p,e,e.installation);let a=ot("codex",c,{cwd:e.workspaceRoot,stdio:["inherit","pipe","inherit"],env:{...process.env,OPENPOND_CODEX_CAPTURE_ACTIVE:o}}),u=_e(a,"close").catch(w=>[null,w]),d=g(()=>a.kill("SIGINT"),"interrupt"),f=g(()=>a.kill("SIGTERM"),"terminate");process.once("SIGINT",d),process.once("SIGTERM",f);let m=null,h="",b=!1,v=g(async w=>{let k;try{k=JSON.parse(w)}catch{return}if(k.type==="thread.started"&&typeof k.thread_id=="string"&&(m=k.thread_id,p.recordClientObservation(o,"start")),!m||!["item.started","item.completed"].includes(k.type))return;let S=rt.safeParse(k.item);if(!S.success)return;let C=S.data,ie=k.type==="item.started";p.recordClientObservation(o,ie?"pre_tool":"post_tool");let se={client:"codex",installationId:o,workspaceRoot:e.workspaceRoot,sessionId:m,callId:C.id,tool:"Bash",clientVersion:e.prepared.registration.clientVersion};ie?await M(t,{...se,phase:"attempt",arguments:{command:C.command}}):await M(t,{...se,phase:"observation",result:{outcome:C.exit_code===null?"incomplete":C.exit_code===0?"succeeded":"failed",execution:C.exit_code===null?"unknown":"executed",sideEffects:"unknown",text:C.aggregated_output,exitCode:C.exit_code,classification:"process_failure"}})},"observe");try{a.stdout.setEncoding("utf8");for await(let S of a.stdout){process.stdout.write(S)||await _e(process.stdout,"drain");for(let C of String(S).split(/(?<=\n)/u))if(b||(h+=C,Buffer.byteLength(h)>1048576&&(h="",b=!0,p.recordDropped(o))),C.endsWith(`
|
|
55
55
|
`)){if(!b)try{await v(h)}catch{process.stderr.write(`Fix-it capture unavailable; run tool-learning doctor.
|
|
56
56
|
`)}h="",b=!1}}let[w,k]=await u;if(k instanceof Error)throw k;(w!==0||k)&&(process.exitCode=typeof w=="number"?w:1);try{await A(t,p,e,AbortSignal.timeout(5e3))}catch{process.stderr.write(`Fix-it evidence remains queued; run tool-learning flush.
|
|
57
|
-
`)}}finally{process.removeListener("SIGINT",d),process.removeListener("SIGTERM",f),a.exitCode===null&&a.kill("SIGTERM")}}finally{p.close()}}g(Pe,"runCodexWithCapture");var _=g(n=>console.log(JSON.stringify(n,null,2)),"print");async function W(n){let o=E(n,"inputFile");if(!o)throw new Error("This operation requires --input-file <absolute-json-path>.");let t=await Ae(o);if(t.byteLength>2097152)throw new Error("Tool learning input exceeds 2 MiB.");let e=JSON.parse(t.toString("utf8"));return $(e,2097152),e}g(W,"inputJson");async function Oe(n,o){let t=null,e=E(n,"environmentFile");if(e){let b=await Ae(e);if(b.byteLength>16384)throw new Error("Environment context exceeds 16 KiB.");let v=Q.partial({fingerprint:!0}).parse(JSON.parse(b.toString("utf8")));t=Q.parse({...v,fingerprint:v.fingerprint??y(v)});let w=F(JSON.stringify(t));if(w.secretStatus!=="passed"||w.piiStatus!=="passed")throw new Error("Remove private data from the environment context.")}let l=pe.parse(o??await W(n));if(!["claude_code","openpond","codex","opencode"].includes(l.client))throw new Error("This client is outside the current tool learning release.");if(E(n,"projectId")&&E(n,"projectId")!==l.projectId)throw new Error("The selected Model Project differs from the registration.");let c=T(n),r=await at(it(E(n,"workspace")||E(n,"cwd")||process.cwd()));if(!l.collectionPolicy.workspaceRootHashes.includes(y(r)))throw new Error("The collection policy must explicitly include this workspace root hash.");let{context:i,baseUrl:p,teamId:a}=await ce(n),u=l.installationId,d=await le(c,ge(u)),f=d?.revision??null,m;if(d){if(m=Z.parse(d.value),m.apiOrigin!==new URL(p).origin||m.teamId!==a||m.workspaceRoot!==r||y(m.prepared.registration)!==y(l)||e!==""&&y(m.environment)!==y(t))throw new Error("This installation is already bound to different registration bytes or workspace. Use a new installation ID.")}else m=Z.parse({schemaVersion:"openpond.toolLearningLocalCredential.v1",apiOrigin:new URL(p).origin,teamId:a,projectId:l.projectId,workspaceRoot:r,ownerAccount:i.account?.handle??null,locallyEnabled:!0,environment:t,prepared:fe(l,E(n,"expiresAt")||new Date(Date.now()+30*864e5).toISOString()),installation:null}),f=await B(c,m,null);let h=new I(c);try{R(h,m,null);let v=await new me({baseUrl:p,apiKey:i.token,teamId:a,projectId:l.projectId}).register(m.prepared);return m={...m,installation:v.installation},await B(c,m,f),R(h,m,v.installation),{installation:v.installation,local:h.status(u),credentials:"stored_privately",learningEnrollment:!1}}finally{h.close()}}g(Oe,"register");async function Nn(n,o){let[t,e,l]=o;if(!t||!["register","setup","run","routing","configure","install","doctor","uninstall","hook","opencode-hook","mcp","status","append","flush","episodes","episode","project","disable","enable","revoke","purge"].includes(t)||o.length>(t==="episode"?3:2))throw new Error("Use tool-learning <register|status|append|flush|episodes|episode|project|disable|enable|revoke|purge> [installation-id].");if(t==="setup"){if(e)throw new Error("Setup takes --project-id, not an installation argument.");let a=await(await import("./setup-
|
|
58
|
-
`)}return}if(t==="mcp"){await(await import("./tool-learning-
|
|
57
|
+
`)}}finally{process.removeListener("SIGINT",d),process.removeListener("SIGTERM",f),a.exitCode===null&&a.kill("SIGTERM")}}finally{p.close()}}g(Pe,"runCodexWithCapture");var _=g(n=>console.log(JSON.stringify(n,null,2)),"print");async function W(n){let o=E(n,"inputFile");if(!o)throw new Error("This operation requires --input-file <absolute-json-path>.");let t=await Ae(o);if(t.byteLength>2097152)throw new Error("Tool learning input exceeds 2 MiB.");let e=JSON.parse(t.toString("utf8"));return $(e,2097152),e}g(W,"inputJson");async function Oe(n,o){let t=null,e=E(n,"environmentFile");if(e){let b=await Ae(e);if(b.byteLength>16384)throw new Error("Environment context exceeds 16 KiB.");let v=Q.partial({fingerprint:!0}).parse(JSON.parse(b.toString("utf8")));t=Q.parse({...v,fingerprint:v.fingerprint??y(v)});let w=F(JSON.stringify(t));if(w.secretStatus!=="passed"||w.piiStatus!=="passed")throw new Error("Remove private data from the environment context.")}let l=pe.parse(o??await W(n));if(!["claude_code","openpond","codex","opencode"].includes(l.client))throw new Error("This client is outside the current tool learning release.");if(E(n,"projectId")&&E(n,"projectId")!==l.projectId)throw new Error("The selected Model Project differs from the registration.");let c=T(n),r=await at(it(E(n,"workspace")||E(n,"cwd")||process.cwd()));if(!l.collectionPolicy.workspaceRootHashes.includes(y(r)))throw new Error("The collection policy must explicitly include this workspace root hash.");let{context:i,baseUrl:p,teamId:a}=await ce(n),u=l.installationId,d=await le(c,ge(u)),f=d?.revision??null,m;if(d){if(m=Z.parse(d.value),m.apiOrigin!==new URL(p).origin||m.teamId!==a||m.workspaceRoot!==r||y(m.prepared.registration)!==y(l)||e!==""&&y(m.environment)!==y(t))throw new Error("This installation is already bound to different registration bytes or workspace. Use a new installation ID.")}else m=Z.parse({schemaVersion:"openpond.toolLearningLocalCredential.v1",apiOrigin:new URL(p).origin,teamId:a,projectId:l.projectId,workspaceRoot:r,ownerAccount:i.account?.handle??null,locallyEnabled:!0,environment:t,prepared:fe(l,E(n,"expiresAt")||new Date(Date.now()+30*864e5).toISOString()),installation:null}),f=await B(c,m,null);let h=new I(c);try{R(h,m,null);let v=await new me({baseUrl:p,apiKey:i.token,teamId:a,projectId:l.projectId}).register(m.prepared);return m={...m,installation:v.installation},await B(c,m,f),R(h,m,v.installation),{installation:v.installation,local:h.status(u),credentials:"stored_privately",learningEnrollment:!1}}finally{h.close()}}g(Oe,"register");async function Nn(n,o){let[t,e,l]=o;if(!t||!["register","setup","run","routing","configure","install","doctor","uninstall","hook","opencode-hook","mcp","status","append","flush","episodes","episode","project","disable","enable","revoke","purge"].includes(t)||o.length>(t==="episode"?3:2))throw new Error("Use tool-learning <register|status|append|flush|episodes|episode|project|disable|enable|revoke|purge> [installation-id].");if(t==="setup"){if(e)throw new Error("Setup takes --project-id, not an installation argument.");let a=await(await import("./setup-RMZ2BHLM.js")).prepareToolLearningSetup(n),u=await Oe(n,a),d=a.client==="claude_code"?await ne(n,a.installationId):a.client==="codex"||a.client==="opencode"?await ae(n,a.installationId):{bundled:!0,restartSession:!0};_({...u,integration:d,next:"Restart the client, then run tool-learning doctor. Review evidence separately before training."});return}if(t==="register"){if(e)throw new Error("Registration takes --input-file, not an installation argument.");_(await Oe(n));return}if(!e)throw new Error("Select a tool learning installation ID.");if(["hook","opencode-hook"].includes(t)){try{t==="hook"?await be(n,e):await Ce(n,e,"opencode")}catch{process.stderr.write(`OpenPond capture was unavailable; run tool-learning doctor.
|
|
58
|
+
`)}return}if(t==="mcp"){await(await import("./tool-learning-ZQ6NSJ5K.js")).runToolLearningMcp(T(n),e);return}if(t==="run"){await Pe(n,e);return}if(t==="install"){let{value:a}=await x(T(n),e);_(await(a.prepared.registration.client==="codex"||a.prepared.registration.client==="opencode"?ae:ne)(n,e));return}if(t==="doctor"){let{value:a}=await x(T(n),e);_(await(a.prepared.registration.client==="codex"||a.prepared.registration.client==="opencode"?Ie:ke)(n,e));return}let c=T(n),r=await x(c,e),i=r.value,p=new I(c);try{if(t==="routing"||t==="configure"){let d=await K(n,i);_(t==="routing"?await d.routing(e):await d.configureRouting(e,ue.parse(await W(n))));return}if(t==="status"){let d=!i.installation||i.installation.state==="revoked"?i.installation:await O(i).installation(e);d&&R(p,i,d),_({installation:d,registrationPending:d===null,locallyEnabled:i.locallyEnabled,local:p.status(e),learningEnrollment:!1});return}if(t==="append"){if(!i.locallyEnabled||!i.installation)throw new Error("This installation is disabled or has not completed registration.");let d=de.parse(await W(n));if(d.installationId!==e)throw new Error("Append belongs to another installation.");R(p,i,i.installation);for(let f of d.events){let m=F(JSON.stringify(f.payload));if(m.secretStatus!=="passed"||m.piiStatus!=="passed")throw new Error("Remove private data before adding this event to the local queue.");let h=p.append(f);if(!["retained","already_retained"].includes(h))throw new Error(`Tool learning capture could not retain this event: ${h}.`)}}if(t==="append"||t==="flush"){let d=Number(E(n,"timeoutSec")||"10");if(!Number.isInteger(d)||d<1||d>60)throw new Error("--timeout-sec must be between 1 and 60.");_(await A(c,p,i,AbortSignal.timeout(d*1e3)));return}let a=await K(n,i);if(t==="episodes"){_(await a.episodes(e,E(n,"after")||void 0));return}if(t==="episode"){if(!l)throw new Error("Select an episode ID.");_(await a.episode(e,l));return}if(t==="project"){_(await a.project(e,await W(n)));return}let u=t==="disable"?"disabled":t==="enable"?"enabled":t==="revoke"||t==="uninstall"?"revoked":null;if(u){u!=="enabled"&&(i={...i,locallyEnabled:!1},r={revision:await B(c,i,r.revision),value:i},R(p,i,null));let d=await a.installation(e),f=d.state===u?d:await a.setState(e,{operationId:crypto.randomUUID(),expectedRevision:d.revision,state:u});i={...i,installation:f,locallyEnabled:u==="enabled"},await B(c,i,r.revision),R(p,i,f),_({installation:f,locallyEnabled:i.locallyEnabled,local:p.status(e),...t==="uninstall"?{client:await(i.prepared.registration.client==="codex"||i.prepared.registration.client==="opencode"?Le:ye)(n,e)}:{}});return}if(t==="purge"){let d=await a.installation(e);_(await a.purge(e,{operationId:crypto.randomUUID(),expectedRevision:d.revision}));return}throw new Error("Unknown tool learning operation.")}finally{p.close()}}g(Nn,"runToolLearningCommand");export{Nn as runToolLearningCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-
|
|
2
|
+
import{a as f}from"./chunk-22RLEU3Q.js";import"./chunk-R6I623SZ.js";import"./chunk-XRKFTPHD.js";import"./chunk-3M53YXEI.js";import{H as J,W as N,X as q,_ as k,aa as A,b as d,ba as B,c as w,e as b,ea as H,fa as I,na as E,oa as M,p as C,pa as T,r as m,s as j,t as x,u as F,v,w as P}from"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import{d as O,f as S,h as g}from"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";import R from"node:path";import{readFile as p}from"node:fs/promises";var n=l((t,s)=>typeof t[s]=="string"?t[s]:void 0,"stringOption");function a(t){console.log(JSON.stringify(t,null,2))}l(a,"print");function U(t,s){let i=n(t,"keyPath");if(i){let r=JSON.parse(i);if(Array.isArray(r)&&r.length&&r.every(c=>typeof c=="string"&&c.length))return r;throw new f("--key-path must be a JSON array of key segments.")}if(!s)throw new f("Specify a setting key, or --key-path for keys containing dots.");return s.split(".")}l(U,"keyPath");async function G(t,s){let i=S({home:n(t,"home")}),r=s[0]??"get",c=g(i).config;if(r==="path"){console.log(c);return}if(r==="export"){let e=await T(i),o=n(t,"file");o?(await b(R.resolve(o),JSON.stringify(e,null,2),{privateParent:!1}),a({path:R.resolve(o),requiresRebinding:e.requiresRebinding})):a(e);return}if(r==="backup"||r==="restore"){let e=n(t,"file"),o=n(t,"keyFile");if(!e||!o)throw new f(`config ${r} requires --file <encrypted-backup> and --key-file <separate-32-byte-key-file>.`);let u=await p(o),y=u.length===32?u:Buffer.from(u.toString("utf8").trim(),"base64");try{a(r==="backup"?await E(i,e,y):await M(e,i,y))}finally{y.fill(0),u.fill(0)}return}if(r==="collect-orphans"){a(await N(i));return}if(r==="schema"){a(F());return}if(r==="migrate"){let e=n(t,"resolutionFile"),o=e?q.parse(JSON.parse(await p(e,"utf8"))):void 0;a(await k(i,{resolutions:o,sourceAppHome:n(t,"sourceAppHome"),sourceConfig:n(t,"sourceConfig"),sourceBrowserState:n(t,"sourceBrowserState"),dryRun:t.dryRun===!0||t.dryRun==="true"}));return}if(r==="recover"){let e=n(t,"revision");a(e?await x(i,e,n(t,"expectedRevision")??d(await w(c))):await A(i));return}if(r==="restart-migration"){a(await B(i));return}if(r==="effective"){a(await I(i,{projectRoot:n(t,"projectRoot"),accountId:n(t,"accountId")}));return}if(r==="trust"||r==="untrust"){let e=n(t,"projectRoot")??s[1];if(!e)throw new f("Specify the canonical project root with --project-root.");await H(i,e,n(t,"accountId")??"local",r==="trust"),a({root:e,trusted:r==="trust"});return}if(r==="revisions"){a(await m(i));return}if(r==="validate"){let e=n(t,"file")??c;C(await p(e,"utf8"),e,t.project===!0||t.project==="true"?"project":"user"),a({valid:!0,path:e});return}if(r==="replace"){let e=n(t,"file");if(!e)throw new f("config replace requires --file <validated-toml-file>.");a(await j(i,n(t,"expectedRevision")??d(await w(c)),await p(e,"utf8")));return}if(r==="doctor"){let e=await w(c),o=null;try{await v(i)}catch(u){o=O(u,c)}a({home:i,path:c,rawRevision:d(e),issue:o,recoverableRevisions:await m(i),migration:await w(R.join(g(i).runtime,"migration.json"))!==null}),o&&(process.exitCode=1);return}if(await k(i),r==="clear-cache"){await J(i),a({cleared:!0,path:g(i).cache});return}let h=await v(i);if(r==="get"){if(!s[1]&&!t.keyPath){a(h);return}let e=h.document;for(let o of U(t,s[1]))e=e&&typeof e=="object"?e[o]:void 0;a(e??null);return}if(r==="set"||r==="unset"){let e=U(t,s[1]),o;if(r==="set"){let u=n(t,"value")??s[2];if(u===void 0)throw new f("config set requires a value. Use JSON for arrays, tables, numbers and booleans.");try{o=JSON.parse(u)}catch{o=u}}a(await P(i,n(t,"expectedRevision")??h.rawRevision,[r==="set"?{op:"set",path:e,value:o}:{op:"unset",path:e}]));return}throw new f(`Unknown config command: ${r}`)}l(G,"runConfigurationCommand");export{G as runConfigurationCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a,b,c}from"./chunk-4KNPCJR4.js";import"./chunk-RY46UPBO.js";import"./chunk-HG2YFMVU.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-FYWQWKVS.js";import"./chunk-GD3RCUDH.js";import"./chunk-7OKZCJHS.js";import"./chunk-UTIELP6F.js";import"./chunk-7NCM6GBN.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-6ESBAHWK.js";import"./chunk-7J2NMUTK.js";import"./chunk-VEBW7NKD.js";import"./chunk-W45RKGM6.js";import"./chunk-AUO5DCEU.js";import"./chunk-Y4I6CFZJ.js";import"./chunk-EDYCSW22.js";import"./chunk-JT5YQ52I.js";import"./chunk-XGY4OQLC.js";import"./chunk-PAYFJHPO.js";import"./chunk-WD4KAKEX.js";import"./chunk-2PXKSAG6.js";import"./chunk-ULTV6INR.js";import"./chunk-WGQ3FMRF.js";import"./chunk-JXLDEYRW.js";import"./chunk-JVMSN7LH.js";import"./chunk-YI6ME6PU.js";import"./chunk-DRLP7GIU.js";import"./chunk-BU6MW65V.js";import"./chunk-LVXL7T5O.js";import"./chunk-HIQPGYVH.js";import"./chunk-DXJC3QW7.js";import"./chunk-P4QM63L3.js";import"./chunk-MTP3B2SU.js";import"./chunk-7EQLW2KM.js";import"./chunk-2LJCJOJ7.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-4PUOWSDE.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-4N4EH3RJ.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import"./chunk-FTQLQJQV.js";export{a as DEFAULT_CONNECTED_APP_TOOL_PATH,b as createCloudConnectedAppToolExecutor,c as resolveCloudConnectedAppToolTarget};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as p,b as u}from"./chunk-XT4CSKHM.js";import"./chunk-NZDLL6JN.js";import"./chunk-RFQD6B44.js";import"./chunk-R4EEGWXB.js";import"./chunk-22RLEU3Q.js";import"./chunk-R6I623SZ.js";import"./chunk-XRKFTPHD.js";import"./chunk-JEMECEQH.js";import{l as w}from"./chunk-Z5CQXPIS.js";import"./chunk-7EQLW2KM.js";import"./chunk-BT5YNE5U.js";import"./chunk-RPM4FDRX.js";import"./chunk-KTIBXRWQ.js";import"./chunk-KP2MYTP5.js";import"./chunk-PNPV2LDE.js";import"./chunk-4G3GTEVS.js";import"./chunk-KU4TPDPH.js";import"./chunk-55YD4UTW.js";import"./chunk-AFYYIJ6K.js";import"./chunk-J256AEEE.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import"./chunk-4PUOWSDE.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c}from"./chunk-3M53YXEI.js";import"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-TBODQT4W.js";import"./chunk-5HPZGLOL.js";import"./chunk-ZFJWA4JK.js";import{A as l}from"./chunk-X2J2P5ZT.js";import{a as n}from"./chunk-FTQLQJQV.js";async function g(r,d){let[o,s]=d;if(!o||d.length>2)throw new Error("usage: connected-evidence <list|collection|recorded-list|recorded|import-receipt|capture-assets|retain-assets|starting-assets|summary|case|unmapped|capture|selection|publish|prepare-recorded|upload-part|preview|commit|set-collection> [id] --team <id> [--input-file <path>]");if(c(r,"project")&&!["list","recorded-list"].includes(o))throw new Error("--project filters list commands; other operations retain their exact Project in --input-file.");if(r.local===!0||r.local==="true")throw new Error("Connected evidence is retained by its hosted source owner; select --api-base-url for that owner.");if(s&&!["recorded","import-receipt","starting-assets"].includes(o))throw new Error("This operation does not accept a resource id.");let a=new w(await u(r)),t=AbortSignal.timeout(6e4),m={...c(r,"project")?{projectId:c(r,"project")}:{},...c(r,"cursor")?{cursor:c(r,"cursor")}:{},limit:Number(c(r,"limit")||20)},i=n(async()=>p(r),"input"),e;switch(o){case"list":e=await a.list(m,t);break;case"recorded-list":e=await a.listRecordedExecutions(m,t);break;case"collection":e=await a.collection(t);break;case"recorded":if(!s)throw new Error("Select a recorded execution id.");e=await a.recordedExecution(s,t);break;case"import-receipt":if(!s)throw new Error("Select the original import operation id.");e=await a.readImport(s,t);break;case"retain-assets":e=await a.retainStartingAssets(await p(r,15*1024*1024),t);break;case"capture-assets":e=await(await import("./connected-starting-assets-5LAJ7CZY.js")).captureConnectedStartingAssets(r,a,t);break;case"starting-assets":if(!s)throw new Error("Select a retained starting assets id.");e=await a.startingAssets(s,t);break;case"summary":e=await a.homeSummary(await i(),t);break;case"case":e=await a.read(await i(),t);break;case"unmapped":e=await a.unmappedEvents(await i(),t);break;case"capture":e=await a.capture(await i(),t);break;case"selection":e=await a.createSelection(await i(),t);break;case"publish":e=await a.publishDataset(await i(),t);break;case"prepare-recorded":e=await a.prepareRecorded(await i(),t);break;case"upload-part":e=await a.uploadPart(await i(),t);break;case"preview":e=await a.preview(await i(),t);break;case"commit":e=await a.commit(await i(),t);break;case"set-collection":e=await a.setCollection(l.object({paused:l.boolean()}).strict().parse(await i()).paused,t);break;default:throw new Error("Unknown connected evidence operation.")}console.log(JSON.stringify(e,null,2))}n(g,"runConnectedEvidenceCommand");export{g as runConnectedEvidenceCommand};
|