openpond 0.2.66 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +691 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
- package/dist/chunks/{acp-YYZ3ZO3Q.js → acp-2OIXATRY.js} +1 -1
- package/dist/chunks/{acp-agent-T26S7TU2.js → acp-agent-PAGX2B47.js} +1 -1
- package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
- package/dist/chunks/{app-layer-5XUMNHDO.js → app-layer-YNEUEOEP.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
- package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
- package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
- package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
- package/dist/chunks/apps-RSFEJOQN.js +2 -0
- package/dist/chunks/chunk-2PXKSAG6.js +2 -0
- package/dist/chunks/{chunk-GRLQHYAU.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/chunk-4BUM6JEC.js +33 -0
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-FUFI4THX.js → chunk-4KNPCJR4.js} +1 -1
- package/dist/chunks/chunk-4KTGYHCE.js +2 -0
- package/dist/chunks/chunk-4PUOWSDE.js +13 -0
- package/dist/chunks/chunk-55YD4UTW.js +2 -0
- package/dist/chunks/chunk-5G7BQAUA.js +2 -0
- package/dist/chunks/chunk-65FJWWXG.js +2 -0
- package/dist/chunks/{chunk-2GJD23CM.js → chunk-65WRWLUD.js} +1 -1
- package/dist/chunks/chunk-6D3FI2XT.js +2 -0
- package/dist/chunks/chunk-73TW6BKK.js +6 -0
- package/dist/chunks/{chunk-6S2MWJVD.js → chunk-7NCM6GBN.js} +1 -1
- package/dist/chunks/chunk-7OFD6TFD.js +2 -0
- package/dist/chunks/chunk-7OKZCJHS.js +3 -0
- package/dist/chunks/{chunk-NTM3KQ25.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-6TRVEA3T.js → chunk-AFH462DO.js} +1 -1
- package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
- package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
- package/dist/chunks/chunk-APKXXAUF.js +2 -0
- package/dist/chunks/chunk-AQUZCWM3.js +2 -0
- package/dist/chunks/chunk-AUO5DCEU.js +2 -0
- package/dist/chunks/chunk-AYOMVI7J.js +2 -0
- package/dist/chunks/{chunk-EVQISX7M.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-BHKXPWFB.js} +1 -1
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.js → chunk-CO23RRN7.js} +1 -1
- package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
- package/dist/chunks/chunk-DDOIPTOM.js +2 -0
- package/dist/chunks/{chunk-ZU3YBRXS.js → chunk-DKOVZ6R2.js} +3 -3
- package/dist/chunks/chunk-DRLP7GIU.js +2 -0
- package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
- package/dist/chunks/{chunk-W22KWKF6.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/{chunk-NABPZ7AK.js → chunk-DWM5G7BU.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.js → chunk-E2JB5OCO.js} +1 -1
- package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
- package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
- package/dist/chunks/{chunk-WKHGXLJD.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/chunk-FKUWCJ73.js +161 -0
- package/dist/chunks/{chunk-U2BD545L.js → chunk-FNGZ4UDZ.js} +1 -1
- package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
- package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
- package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
- package/dist/chunks/{chunk-JLW5BQVO.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-Q4AXZY2P.js → chunk-IO5DZUKL.js} +1 -1
- package/dist/chunks/chunk-J256AEEE.js +2 -0
- package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
- package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
- package/dist/chunks/{chunk-5AU5Y6KS.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.js → chunk-JT5YQ52I.js} +1 -1
- package/dist/chunks/chunk-JVMSN7LH.js +2 -0
- package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
- package/dist/chunks/{chunk-OTUS7NTQ.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-KOC3YJEU.js} +2 -2
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.js → chunk-KU4TPDPH.js} +2 -2
- package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
- package/dist/chunks/chunk-LVXL7T5O.js +2 -0
- package/dist/chunks/{chunk-5KWKSR4P.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-MEJLWNRS.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.js → chunk-NMMHXYDJ.js} +1 -1
- package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
- package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
- package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
- package/dist/chunks/chunk-OIH2LPIT.js +2 -0
- package/dist/chunks/chunk-OUJ63LMU.js +2 -0
- package/dist/chunks/{chunk-DXA2UHBE.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-AF3AVDPP.js → chunk-PAYFJHPO.js} +1 -1
- package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
- package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
- package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
- package/dist/chunks/{chunk-W7NXFRHN.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-PLVWARB7.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-KOKBDIGR.js → chunk-R4EEGWXB.js} +1 -1
- package/dist/chunks/chunk-RBTDSI4L.js +11 -0
- package/dist/chunks/chunk-RCQYEHHD.js +2 -0
- package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
- package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
- package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
- package/dist/chunks/{chunk-67HXM6AL.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-DIDQHTAX.js → chunk-SO4GMSNP.js} +1 -1
- package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
- package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
- package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
- package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
- package/dist/chunks/{chunk-LARJARMS.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-FHLSLOKH.js → chunk-UMAVVMXL.js} +7 -7
- package/dist/chunks/chunk-V24VHT76.js +2 -0
- package/dist/chunks/chunk-VEBW7NKD.js +2 -0
- package/dist/chunks/chunk-VJR2GNRY.js +2 -0
- package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
- package/dist/chunks/{chunk-5Z3AU5CL.js → chunk-VWWKWYSQ.js} +1 -1
- package/dist/chunks/chunk-WCNPGKST.js +2 -0
- package/dist/chunks/chunk-WD4KAKEX.js +2 -0
- package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
- package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
- package/dist/chunks/{chunk-GFAI2MCJ.js → chunk-WZ35ICTE.js} +3 -3
- package/dist/chunks/chunk-XHACK2KR.js +2 -0
- package/dist/chunks/chunk-XOPHFUUY.js +2 -0
- package/dist/chunks/{chunk-UXPO3ZV7.js → chunk-XQAUHXL4.js} +4 -4
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.js → chunk-Y2WNZWT2.js} +1 -1
- package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
- package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
- package/dist/chunks/chunk-YI6ME6PU.js +22 -0
- package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
- package/dist/chunks/{chunk-D7R2AAX2.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/command-LNOVZQSK.js +58 -0
- package/dist/chunks/{configuration-command-4WTS2MZS.js → configuration-command-CNITTZRP.js} +1 -1
- package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
- package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
- package/dist/chunks/{connected-starting-assets-4LDXQVLN.js → connected-starting-assets-KWOFEIE4.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.js → continual-FVOLGGOE.js} +1 -1
- package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
- package/dist/chunks/datasets-E5TXSVIY.js +2 -0
- package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
- package/dist/chunks/dist-2MKJC6HN.js +2 -0
- package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
- package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
- package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
- package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
- package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
- package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
- package/dist/chunks/{help-JQA3YMCX.js → help-K6YLZ3KL.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
- package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
- package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
- package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
- package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
- package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
- package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
- package/dist/chunks/{import-CLWTKDG6.js → import-YHYKZ6JN.js} +2 -2
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.js → learning-LAXMGWSQ.js} +1 -1
- package/dist/chunks/learning-Y3UKNUGE.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
- package/dist/chunks/{model-projects-GHWCKDON.js → model-projects-6YWVD2TS.js} +1 -1
- package/dist/chunks/opchat-XXI2ZM53.js +3 -0
- package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
- package/dist/chunks/organizations-W7HI2JA4.js +2 -0
- package/dist/chunks/{profile-RIDNU2I5.js → profile-P2SJPBOJ.js} +1 -1
- package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
- package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
- package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
- package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
- package/dist/chunks/{runtime-VSOOPNYN.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
- package/dist/chunks/{sandbox-template-NN3XQI7M.js → sandbox-template-U536EEWY.js} +1 -1
- package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
- package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
- package/dist/chunks/setup-RMZ2BHLM.js +2 -0
- package/dist/chunks/{src-662QOKNP.js → src-C3ZUESMK.js} +1 -1
- package/dist/chunks/src-SGQYVBNQ.js +424 -0
- package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
- package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-7PDLGRWF.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
- package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
- package/dist/chunks/{store-create-improve-G46KIUVT.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
- package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
- package/dist/chunks/{store-learning-6P6IS7GH.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.js → store-learning-credentials-BUHR7SN6.js} +1 -1
- package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
- package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
- package/dist/chunks/{store-model-configuration-T6XJJDAB.js → store-model-configuration-6L3OYXF4.js} +1 -1
- package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
- package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
- package/dist/chunks/{store-preference-comparison-XQFTLMGH.js → store-preference-comparison-5YVIQNVB.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
- package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
- package/dist/chunks/{store-task-inbox-VVXZUJIO.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.js → taskset-UDDLFYKV.js} +1 -1
- package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
- package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
- package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
- package/dist/chunks/{teams-bot-FXMCOCPP.js → teams-bot-MPWL2PP4.js} +1 -1
- package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
- package/dist/chunks/training-5NT2YB2L.js +2 -0
- package/dist/chunks/training-5UMT45UL.js +2 -0
- package/dist/chunks/training-UY6KRG4M.js +2 -0
- package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
- package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
- package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
- package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-2X7RSOLC.js +2 -0
- package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
- package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
- package/dist/chunks/{training-hosted-learning-YN5VD3PW.js → training-hosted-learning-E2N32YU5.js} +1 -1
- package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
- package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
- package/dist/chunks/training-hosted-report-T633TNJG.js +2 -0
- package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
- package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
- package/dist/chunks/training-hosted-workers-Y2PO5IOA.js +2 -0
- package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
- package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
- package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/types/billing.d.ts +87 -6
- package/dist/sandbox/types/io.d.ts +3 -0
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
- package/dist/web/assets/App-CCuh99JW.js +54 -0
- package/dist/web/assets/{AppDialog-DuSd0wk6.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-Dklk6CaG.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DipNT6Tj.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-UU1sdoUO.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-BWYRQ1PE.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-B08F9x5g.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-srWBKvCv.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DqTpU5cO.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-2KC-KQvu.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
- package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
- package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
- package/dist/web/assets/{FilePagePreview-B-iUVPhh.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-5v0vBWXy.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-Bn4072K-.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
- package/dist/web/assets/{HtmlVisual-C2WsMj90.js → HtmlVisual-D5y2WG9L.js} +10 -10
- package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
- package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
- package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-C50P74LI.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
- package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
- package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
- package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
- package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
- package/dist/web/assets/{MainPane-Dje-hfUM.css → MainPane-BZlNLfTM.css} +1 -1
- package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
- package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
- package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-Clv0IWyn.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cw_F5Eaa.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-Btyiie4B.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-BLLw_cEA.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BpSHWQgj.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-WytWGQgw.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-BJq5zNkv.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BxFEWI9W.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-C7OM2F0-.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-KH5GFacT.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DzOw13Md.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-nZHno_4P.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-1U8DDj1J.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BO1EUA3G.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Rqq_sKW_.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-zmmMp09R.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DNbhGjkE.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
- package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
- package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
- package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
- package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
- package/dist/web/assets/chunk-3BYFS4RO-ztZjcMmt.js +1 -0
- package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
- package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
- package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
- package/dist/web/assets/chunk-H3JZ3P5T-DolwEJXo.js +2 -0
- package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
- package/dist/web/assets/client-DwZ92xtu.js +1 -0
- package/dist/web/assets/{client-choice-storage-CXlWJW5g.js → client-choice-storage-DitqKiIT.js} +1 -1
- package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
- package/dist/web/assets/common-BWVSBnpX.js +1 -0
- package/dist/web/assets/copy-DTQhoBNg.js +1 -0
- package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
- package/dist/web/assets/{cssMode-Cps-05f3.js → cssMode-BRTtfXxU.js} +1 -1
- package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
- package/dist/web/assets/external-link-H1629UU6.js +1 -0
- package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
- package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
- package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
- package/dist/web/assets/{htmlMode-Do72TyNy.js → htmlMode-BVaCcL76.js} +1 -1
- package/dist/web/assets/icons-Bk2b68aC.js +1 -0
- package/dist/web/assets/image-0DPVY6Ev.js +1 -0
- package/dist/web/assets/{index-D7igQSAg.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/intake-contracts-B8JZKYwb.js +1 -0
- package/dist/web/assets/{jsonMode-B2N7W15Y.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DPmyOFVA.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
- package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
- package/dist/web/assets/message-square-C889vRqm.js +1 -0
- package/dist/web/assets/{monaco.contribution-DqqJBDzF.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BfOxF9PJ.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DNONXznc.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CRdTg0FH.js → monaco.contribution-DxAV1oS5.js} +2 -2
- package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
- package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
- package/dist/web/assets/{pdf-BCq2Oosd.js → pdf-perlzwEB.js} +1 -1
- package/dist/web/assets/play-CHXXdkuO.js +1 -0
- package/dist/web/assets/plus-DFFWjhPw.js +1 -0
- package/dist/web/assets/{ponder-desktop-Dm7tOkKo.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-DuGMr666.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-BCbaFiqV.js → requests-DmeUYik4.js} +1 -1
- package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
- package/dist/web/assets/save-iEMNZoPe.js +1 -0
- package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
- package/dist/web/assets/settings-BC-bzgk6.js +21 -0
- package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
- package/dist/web/assets/square-BE_4JMR3.js +1 -0
- package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
- package/dist/web/assets/{submit-issue-command-wfngGS6Y.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-cl0cw2QK.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CWnu1bz9.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-DLEc0PYL.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-ByxjI9BG.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-Df64T07n.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-DNh_x9gQ.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
- package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
- package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
- package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
- package/dist/web/assets/{workers-CnqrOtic.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-C9vtYV4w.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +100 -4
- package/package.json +1 -1
- package/dist/chunks/actions-command-VLKMHCMI.js +0 -2
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +0 -2
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +0 -2
- package/dist/chunks/app-server-runtime-TH56EG2Z.js +0 -2
- package/dist/chunks/apps-MNT3KXIY.js +0 -2
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-2ZNW6GUU.js +0 -2
- package/dist/chunks/chunk-3BJ7LPE3.js +0 -2
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-4MQHIFZL.js +0 -2
- package/dist/chunks/chunk-55Q64WWF.js +0 -2
- package/dist/chunks/chunk-5KJMFK65.js +0 -2
- package/dist/chunks/chunk-5WPMI6QX.js +0 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +0 -2
- package/dist/chunks/chunk-ANG2YMMD.js +0 -2
- package/dist/chunks/chunk-BQVB2SPF.js +0 -10
- package/dist/chunks/chunk-DMO3UIS7.js +0 -6
- package/dist/chunks/chunk-FEQ7HNJR.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-H5ML7735.js +0 -2
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-JKI53ED7.js +0 -161
- package/dist/chunks/chunk-JRGECNP3.js +0 -2
- package/dist/chunks/chunk-L4EJ5R3B.js +0 -23
- package/dist/chunks/chunk-LXZLLTYQ.js +0 -2
- package/dist/chunks/chunk-MHPCVQOE.js +0 -2
- package/dist/chunks/chunk-MVPKU72J.js +0 -4
- package/dist/chunks/chunk-OKEC2EIE.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-QCJY6FTC.js +0 -3
- package/dist/chunks/chunk-SBQ6KLXB.js +0 -33
- package/dist/chunks/chunk-TVDZXDQW.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-VD2TQCMH.js +0 -2
- package/dist/chunks/chunk-WLZJOCLA.js +0 -10
- package/dist/chunks/chunk-Y3B6ZUE6.js +0 -22
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/chunk-ZWW227M3.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NW6BGKOM.js +0 -13
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +0 -2
- package/dist/chunks/connected-evidence-D7C45HYD.js +0 -2
- package/dist/chunks/core-commands-RXPXOYOP.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +0 -4
- package/dist/chunks/datasets-LBLEKLCS.js +0 -2
- package/dist/chunks/desktop-test-INJPZ5VP.js +0 -3
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/evaluation-coordination-3ARLJAFH.js +0 -2
- package/dist/chunks/experiment-improvements-UB4C5CSP.js +0 -2
- package/dist/chunks/experiments-AHHKFJD6.js +0 -2
- package/dist/chunks/experiments-signal-MTR475QV.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +0 -2
- package/dist/chunks/hosted-app-server-composition-GPXH3BOG.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +0 -3
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +0 -3
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +0 -3
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +0 -2
- package/dist/chunks/human-review-DVHVJXBA.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +0 -2
- package/dist/chunks/opchat-LMKH3OWR.js +0 -3
- package/dist/chunks/opchat-bounded-chat-PPOWO7H4.js +0 -2
- package/dist/chunks/organizations-T6ZUSHNJ.js +0 -2
- package/dist/chunks/project-action-payload-2G57RL74.js +0 -2
- package/dist/chunks/project-agent-GBMVDJY3.js +0 -2
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +0 -2
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +0 -2
- package/dist/chunks/sandbox-command-L5VQ2T6C.js +0 -2
- package/dist/chunks/saved-work-LAVTNKPT.js +0 -2
- package/dist/chunks/setup-TXEM2QSG.js +0 -2
- package/dist/chunks/src-HJHIBDFX.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +0 -2
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +0 -2
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +0 -2
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +0 -7
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +0 -2
- package/dist/chunks/store-local-experiments-CBJA56X2.js +0 -97
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +0 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +0 -2
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +0 -9
- package/dist/chunks/taskset-packages-NRRPON7B.js +0 -2
- package/dist/chunks/taskset-packages-RW4SFGDU.js +0 -2
- package/dist/chunks/tool-learning-O7QTTEDB.js +0 -2
- package/dist/chunks/training-XFM3OOPN.js +0 -2
- package/dist/chunks/training-XILDD5RG.js +0 -2
- package/dist/chunks/training-hosted-6BX2IASC.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/chunks/training-model-start-E5MP3URL.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-CNQi3RlI.js +0 -53
- package/dist/web/assets/AppTerminalPanel-DLz34eSs.js +0 -2
- package/dist/web/assets/AppsView-DkCMr67-.js +0 -1
- package/dist/web/assets/BrowserSidebar-BBaaanMS.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Ct59FKw1.js +0 -8
- package/dist/web/assets/CommunityView-BLTlSxyb.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-DWF6WPao.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BYl-2j7B.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CQz29DwD.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-DJRgF1kQ.js +0 -101
- package/dist/web/assets/MainChatThread-gwmhe1Nw.js +0 -2
- package/dist/web/assets/MainPane-CqtgV9rU.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-DrQldDsG.js +0 -2
- package/dist/web/assets/RightChatPanelStack-xW5rKbp0.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-BDmIxvIm.js +0 -1
- package/dist/web/assets/TeamChatView-BisSMAXy.js +0 -1
- package/dist/web/assets/TrainingRunLineage-B2WBOchk.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-D3Ub_jVj.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-CyTa8Cjs.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-CtZzxQ1e.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-D-eTQib6.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-down-75im8nFF.js +0 -1
- package/dist/web/assets/chevron-right-CpbCIUFo.js +0 -1
- package/dist/web/assets/chevron-up-BD8jg0bQ.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/cloud-upload-4lP-5zmp.js +0 -1
- package/dist/web/assets/common-BMjyKlX-.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/copy-DRnATDDY.js +0 -1
- package/dist/web/assets/create-pipeline-CyUZrbbO.js +0 -1
- package/dist/web/assets/createLucideIcon-CmkSm39S.js +0 -1
- package/dist/web/assets/external-link-D_nBEDFO.js +0 -1
- package/dist/web/assets/folder-open-tD5Lle1M.js +0 -1
- package/dist/web/assets/folder-plus-DlZ4hM48.js +0 -1
- package/dist/web/assets/git-commit-horizontal-g8KBhvfr.js +0 -1
- package/dist/web/assets/icons-B8_Rkg-l.js +0 -1
- package/dist/web/assets/image-CUZMnZYi.js +0 -1
- package/dist/web/assets/info-SmuBZiE5.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-D_KVxLLz.js +0 -1
- package/dist/web/assets/maximize-2-B8HN3jsA.js +0 -1
- package/dist/web/assets/message-square-CrDvzn66.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-CW-M_aaj.js +0 -1
- package/dist/web/assets/paperclip-DL449Io5.js +0 -1
- package/dist/web/assets/play-DYLqBrwg.js +0 -1
- package/dist/web/assets/plus-DXZIpQuY.js +0 -1
- package/dist/web/assets/presentation-CupIXaYv.js +0 -1
- package/dist/web/assets/refresh-cw-CzVf5_oo.js +0 -1
- package/dist/web/assets/reward-checks-Bcq9ETCA.js +0 -7
- package/dist/web/assets/save-DatjrYPV.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-D7C-Auyi.js +0 -21
- package/dist/web/assets/settings-lists-D2ol3uNK.js +0 -5
- package/dist/web/assets/square-BWB1nbZF.js +0 -1
- package/dist/web/assets/square-terminal-Buj-s-fz.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/upload-DaFVH6R1.js +0 -1
- package/dist/web/assets/useQuery-yUz7Ui8g.js +0 -1
- package/dist/web/assets/wifi-off-CtNwnIJc.js +0 -1
- package/dist/web/assets/work-outputs-CK0nHe4g.js +0 -1
- package/dist/web/assets/x-Bhl-4Zlt.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
package/dist/app-server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{m as r}from"./chunks/chunk-
|
|
2
|
+
import{m as r}from"./chunks/chunk-XQAUHXL4.js";import"./chunks/chunk-PSY6IRJE.js";import"./chunks/chunk-PKJHN666.js";import"./chunks/chunk-Z33RVGP6.js";import"./chunks/chunk-7PKDJHT6.js";import"./chunks/chunk-65WRWLUD.js";import"./chunks/chunk-FKUWCJ73.js";import"./chunks/chunk-B66QCXH2.js";import{b as p}from"./chunks/chunk-PYNW5OFA.js";import"./chunks/chunk-MOXIGLN2.js";import"./chunks/chunk-RHMULF56.js";import"./chunks/chunk-VFH5C6D2.js";import"./chunks/chunk-UOFDKMRU.js";import"./chunks/chunk-AN525SPP.js";import"./chunks/chunk-IZ6DLEVY.js";import"./chunks/chunk-KOC3YJEU.js";import"./chunks/chunk-65FJWWXG.js";import"./chunks/chunk-SYUKES6H.js";import"./chunks/chunk-EYTTZ5H4.js";import"./chunks/chunk-XY7HFXLH.js";import{e}from"./chunks/chunk-6I5AUTVO.js";import"./chunks/chunk-DKOVZ6R2.js";import"./chunks/chunk-N5EAVX4G.js";import"./chunks/chunk-U7X5ZLAL.js";import"./chunks/chunk-7PXZ4X4P.js";import"./chunks/chunk-N73MU2C3.js";import"./chunks/chunk-SO4GMSNP.js";import"./chunks/chunk-NMMHXYDJ.js";import"./chunks/chunk-QLGP2OAQ.js";import"./chunks/chunk-WZ35ICTE.js";import"./chunks/chunk-VS2LOUCT.js";import"./chunks/chunk-DMFUEUAZ.js";import"./chunks/chunk-AFKFN25T.js";import"./chunks/chunk-G4747MOW.js";import"./chunks/chunk-GF55VEMR.js";import"./chunks/chunk-FAKDGLZQ.js";import"./chunks/chunk-KCJVFLBB.js";import"./chunks/chunk-GW766ZSO.js";import"./chunks/chunk-VJYOKU3C.js";import"./chunks/chunk-SSJV3VX7.js";import"./chunks/chunk-7KWD2I6W.js";import"./chunks/chunk-RY46UPBO.js";import"./chunks/chunk-OFJPOTES.js";import"./chunks/chunk-PLROXHG2.js";import"./chunks/chunk-YU3C6U5V.js";import"./chunks/chunk-PHZZBXDO.js";import"./chunks/chunk-KVTBX2UP.js";import"./chunks/chunk-U7D6Q744.js";import"./chunks/chunk-HG2YFMVU.js";import"./chunks/chunk-OQPJ7FJF.js";import"./chunks/chunk-BL3CZWWD.js";import"./chunks/chunk-FYWQWKVS.js";import"./chunks/chunk-GD3RCUDH.js";import"./chunks/chunk-7OKZCJHS.js";import"./chunks/chunk-UTIELP6F.js";import"./chunks/chunk-7NCM6GBN.js";import"./chunks/chunk-4V73I4OL.js";import"./chunks/chunk-LE75SVEL.js";import"./chunks/chunk-6ESBAHWK.js";import"./chunks/chunk-LZPCA6DH.js";import"./chunks/chunk-L3KS6MOV.js";import"./chunks/chunk-7J2NMUTK.js";import"./chunks/chunk-VEBW7NKD.js";import"./chunks/chunk-W45RKGM6.js";import"./chunks/chunk-AUO5DCEU.js";import"./chunks/chunk-Y4I6CFZJ.js";import"./chunks/chunk-4BUM6JEC.js";import"./chunks/chunk-UGFSAG4U.js";import"./chunks/chunk-SSHE6B7Z.js";import"./chunks/chunk-JFXINDOQ.js";import"./chunks/chunk-EDYCSW22.js";import"./chunks/chunk-JT5YQ52I.js";import"./chunks/chunk-XGY4OQLC.js";import"./chunks/chunk-PAYFJHPO.js";import"./chunks/chunk-WD4KAKEX.js";import"./chunks/chunk-2PXKSAG6.js";import"./chunks/chunk-ULTV6INR.js";import"./chunks/chunk-WGQ3FMRF.js";import"./chunks/chunk-JXLDEYRW.js";import"./chunks/chunk-JVMSN7LH.js";import"./chunks/chunk-YI6ME6PU.js";import"./chunks/chunk-DRLP7GIU.js";import"./chunks/chunk-BU6MW65V.js";import"./chunks/chunk-LVXL7T5O.js";import"./chunks/chunk-HIQPGYVH.js";import"./chunks/chunk-DXJC3QW7.js";import"./chunks/chunk-P4QM63L3.js";import"./chunks/chunk-MTP3B2SU.js";import"./chunks/chunk-UN2LKLGV.js";import"./chunks/chunk-2LJCJOJ7.js";import"./chunks/chunk-AMC4Z7G4.js";import"./chunks/chunk-LK77GI6M.js";import"./chunks/chunk-HVM2GUM3.js";import"./chunks/chunk-I6VMRQF4.js";import"./chunks/chunk-D6L6UNUQ.js";import"./chunks/chunk-AJXWJLZA.js";import"./chunks/chunk-OKKNDQJF.js";import"./chunks/chunk-4PUOWSDE.js";import"./chunks/chunk-ZY32SZ2P.js";import"./chunks/chunk-OTDDXEQ6.js";import"./chunks/chunk-ECOH24MC.js";import"./chunks/chunk-4N4EH3RJ.js";import"./chunks/chunk-GY7YSD6J.js";import"./chunks/chunk-KUE46HTH.js";import"./chunks/chunk-JCLTFDVW.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-SV7ZBEK2.js";import"./chunks/chunk-2MEOUS24.js";import"./chunks/chunk-HNQPEOJD.js";import"./chunks/chunk-RCT3O3HQ.js";import"./chunks/chunk-UGOK7VTC.js";import"./chunks/chunk-ZFJWA4JK.js";import"./chunks/chunk-X2J2P5ZT.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as v}from"./chunk-
|
|
2
|
+
import{a as h,b as y}from"./chunk-KTIBXRWQ.js";import{a as v}from"./chunk-V24VHT76.js";import{b as T,c as L}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as q}from"./chunk-3M53YXEI.js";import"./chunk-4N4EH3RJ.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import{a as j,b as l}from"./chunk-GLUWATL5.js";import"./chunk-JCLTFDVW.js";import"./chunk-6FA3GG5B.js";import{v as A}from"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import{f as $}from"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import{a as r}from"./chunk-FTQLQJQV.js";function k(o){return{list:r((e={})=>o.listSandboxRuntimes(e),"list"),create:r(e=>o.createSandboxRuntime(e),"create"),handle:r((e,t=null)=>o.sandboxRuntime(e,t),"handle"),get:r(e=>o.getSandboxRuntime(e),"get"),createSandbox:r((e,t={},n={})=>o.createSandboxRuntimeSandbox(e,t,n),"createSandbox"),updateStatus:r((e,t)=>o.updateSandboxRuntimeStatus(e,t),"updateStatus"),events:r(e=>o.listSandboxRuntimeEvents(e),"events"),event:r((e,t)=>o.emitSandboxRuntimeEvent(e,t),"event"),checkpoint:r((e,t={})=>o.checkpointSandboxRuntime(e,t),"checkpoint"),promote:r((e,t,n={})=>o.promoteSandboxRuntime(e,t,n),"promote"),preserveSource:r((e,t={},n={})=>o.preserveSandboxRuntimeSource(e,t,n),"preserveSource")}}r(k,"createSandboxRuntimeNamespace");function E(o){return{list:r((e={})=>o.list(e),"list"),create:r(e=>o.create(e),"create"),get:r(e=>o.get(e),"get"),pricing:r(()=>o.pricing(),"pricing"),costs:r((e={})=>o.costs(e),"costs")}}r(E,"createSandboxNamespace");function F(o){return{list:r(e=>o.listProjects(e),"list"),upsert:r(e=>o.upsertProject(e),"upsert"),upsertGitRemote:r(e=>o.upsertProjectGitRemote(e),"upsertGitRemote"),get:r((e,t)=>o.getProject(e,t),"get"),update:r((e,t)=>o.updateProject(e,t),"update"),sync:r((e,t)=>o.syncProject(e,t),"sync"),ensureGitRemote:r((e,t)=>o.ensureProjectGitRemote(e,t),"ensureGitRemote"),getGitRemote:r((e,t)=>o.ensureProjectGitRemote(e,t),"getGitRemote"),git:r((e,t)=>o.ensureProjectGitRemote(e,t),"git"),uploadSource:r((e,t)=>o.uploadProjectSource(e,t),"uploadSource"),archive:r((e,t)=>o.archiveProject(e,t),"archive")}}r(F,"createSandboxProjectNamespace");function B(o){return{get:r(e=>o.getHostedProfile(e),"get"),status:r(e=>o.getHostedProfile(e),"status"),ensureHosted:r(e=>o.ensureHostedProfile(e),"ensureHosted"),push:r(e=>o.pushHostedProfile(e),"push")}}r(B,"createSandboxProfileNamespace");function M(o){return{list:r(e=>o.listAgents(e),"list"),upsert:r(e=>o.upsertAgent(e),"upsert"),get:r((e,t)=>o.getAgent(e,t),"get"),update:r((e,t)=>o.updateAgent(e,t),"update"),archive:r((e,t)=>o.archiveAgent(e,t),"archive"),run:r((e,t)=>o.runAgent(e,t),"run"),sourceDeployPlan:r((e,t)=>o.getAgentSourceDeployPlan(e,t),"sourceDeployPlan"),manifestSnapshots:r((e,t)=>o.listAgentManifestSnapshots(e,t),"manifestSnapshots"),requestSourceChecks:r((e,t)=>o.requestAgentSourceChecks(e,t),"requestSourceChecks"),configureSourceSetup:r((e,t)=>o.configureAgentSourceSetup(e,t),"configureSourceSetup"),publishSource:r((e,t)=>o.publishAgentSource(e,t),"publishSource")}}r(M,"createSandboxAgentNamespace");function z(o,e,t=null){let n=r(async(a={},d={})=>{let b=await o.getSandboxRuntime(e);return b.sandboxId?o.get(b.sandboxId):o.createSandboxRuntimeSandbox(e,a,d).then(p=>p.sandbox)},"currentSandbox"),s=r(async(a={},d={})=>{let b=await o.getSandboxRuntime(e);if(!b.sandboxId)return o.createSandboxRuntimeSandbox(e,a,d).then(S=>S.sandbox);let p=await o.get(b.sandboxId);return p.state==="stopped"?o.start(p.id,d).then(S=>S.sandbox):p.state==="archived"?o.restore(p.id).then(S=>S.sandbox):p.state==="deleted"||p.state==="error"?o.createSandboxRuntimeSandbox(e,a,d).then(S=>S.sandbox):p},"resume");return{id:e,initial:t,get:r(()=>o.getSandboxRuntime(e),"get"),sandbox:n,resume:s,createSandbox:r((a={},d={})=>o.createSandboxRuntimeSandbox(e,a,d),"createSandbox"),status:r(async a=>{if(typeof a!="string")return o.updateSandboxRuntimeStatus(e,a);let d=await o.getSandboxRuntime(e);return o.updateSandboxRuntimeStatus(e,{status:a,expectedVersion:d.version})},"status"),events:r(()=>o.listSandboxRuntimeEvents(e),"events"),event:r(a=>o.emitSandboxRuntimeEvent(e,a),"event"),recordCommit:r((a,d={})=>o.emitSandboxRuntimeEvent(e,{...d,type:d.type??"git.commit",commitSha:a}),"recordCommit"),checkpointHint:r((a={})=>o.emitSandboxRuntimeEvent(e,{type:"workflow.checkpoint_hint",summary:a.summary??a.reason??"Workflow checkpoint hint",payload:{...a.payload,reason:a.reason??null},artifactRefs:a.artifactRefs,lifecycleHint:{kind:"checkpoint",reason:a.reason??null}}),"checkpointHint"),waitForUser:r(async(a={})=>{await o.emitSandboxRuntimeEvent(e,{type:"workflow.waiting_for_user",summary:a.summary??a.reason??"Waiting for user",payload:{...a.payload,reason:a.reason??null},lifecycleHint:{kind:"waiting_for_user",reason:a.reason??null}});let d=await o.getSandboxRuntime(e);return d.status==="waiting_for_user"?d:o.updateSandboxRuntimeStatus(e,{status:"waiting_for_user",expectedVersion:d.version,summary:a.summary??a.reason,metadata:{workflowWaitForUserReason:a.reason??null}})},"waitForUser"),keepAlive:r((a={})=>{let d=X(a);return o.emitSandboxRuntimeEvent(e,{type:"workflow.keepalive",summary:a.summary??a.reason??"Workflow keepalive",payload:{...a.payload,reason:a.reason??null,keepaliveUntil:d},lifecycleHint:{kind:"keepalive",reason:a.reason??null,keepaliveUntil:d}})},"keepAlive"),checkpoint:r(a=>o.checkpointSandboxRuntime(e,a),"checkpoint"),files:{write:r(async(a,d)=>o.uploadFile((await s()).id,a,d),"write"),read:r(async a=>o.downloadFile((await s()).id,a),"read"),readResponse:r(async a=>o.downloadFileResponse((await s()).id,a),"readResponse"),list:r(async(a={})=>o.listFiles((await s()).id,a),"list"),delete:r(async(a,d={})=>o.deleteFile((await s()).id,a,d),"delete"),search:r(async a=>o.searchFiles((await s()).id,a),"search"),stat:r(async a=>o.statFile((await s()).id,a),"stat"),mkdir:r(async a=>o.mkdir((await s()).id,a),"mkdir"),move:r(async a=>o.moveFile((await s()).id,a),"move")},commands:{run:r(async a=>o.exec((await s()).id,typeof a=="string"?{command:a}:a),"run")},ports:{expose:r(async a=>o.openPort((await s()).id,typeof a=="number"?{port:a}:a),"expose")},promote:r((a,d={})=>o.promoteSandboxRuntime(e,a,d),"promote"),preserveSource:r((a={},d={})=>o.preserveSandboxRuntimeSource(e,a,d),"preserveSource"),archive:r(async a=>{let d=a??(await o.getSandboxRuntime(e)).version;return o.updateSandboxRuntimeStatus(e,{status:"archived",expectedVersion:d})},"archive")}}r(z,"createSandboxRuntimeHandle");function X(o){if(o?.until instanceof Date)return o.until.toISOString();if(typeof o?.until=="string"&&o.until.trim())return new Date(o.until).toISOString();let e=typeof o?.seconds=="number"&&Number.isFinite(o.seconds)?Math.max(1,Math.trunc(o.seconds)):60;return new Date(Date.now()+e*1e3).toISOString()}r(X,"runtimeKeepaliveUntilIso");async function J(o,e={}){let t=`openpond-code-smoke-${Date.now()}`,n=`openpond-code-exec-ok:${t}`,s=`openpond-code-preview-ok:${t}`,i=`openpond-code-file-ok:${t}`,u=4173,m=null,a=null,d=!1,b=!1;try{let p=await D(o,await o.create({repo:e.repo??"https://github.com/octocat/Hello-World",resources:{cpu:e.cpu??1,memoryGb:e.memoryGb??1,diskGb:e.diskGb??8},budget:{maxUsd:e.budgetUsd??"0.05"},quotas:{maxSpendUsd:e.budgetUsd??"0.05",maxDurationSeconds:600,idleTimeoutSeconds:600,maxOpenPorts:2},metadata:{runId:t,source:"openpond-code-sandbox-smoke"}},{async:!0}));m=p.id;let S=e.expectedMppMode;if(S&&p.reservation.mpp?.mode!==S)throw new Error(`expected ${S} reservation, got ${p.reservation.mpp?.mode??"none"}`);if(!S&&!p.reservation.mpp?.mode)throw new Error("expected sandbox reservation MPP metadata");let P=await o.exec(p.id,{command:[`printf '${n}\\n'`,"test -f README && printf 'repo-clone-ok\\n'","cat > server.cjs <<'EOF'","const { createServer } = require('node:http');",`createServer((_request, response) => response.end('${s}')).listen(${u}, '0.0.0.0');`,"EOF","nohup node server.cjs > server.log 2>&1 & sleep 1"].join(`
|
|
3
3
|
`),timeoutSeconds:120});if(P.command.status!=="succeeded")throw new Error(`expected command success, got ${P.command.status}`);if(!P.command.output.includes(n))throw new Error("expected exec marker");if(await o.uploadFile(p.id,"openpond-code-smoke.txt",i),await o.downloadFile(p.id,"openpond-code-smoke.txt")!==i)throw new Error("expected file roundtrip marker");let x=null;if(e.snapshot||e.fork){let g=await o.createSnapshot(p.id,{async:!0,name:`openpond-code-smoke-${t}`,replay:{entrypoints:[{command:"cat openpond-code-smoke.txt",name:"default"}],retention:{class:"pinned"},safety:{cleanup:"delete",idleTimeoutSeconds:600,internetEgress:"block",maxDurationSeconds:600,maxSpendUsd:e.budgetUsd??"0.05",publicPreview:!1},validation:{commands:[{command:"test -f openpond-code-smoke.txt"}]}}}),c=g.snapshot??(await te(o,p.id,g.snapshotJob?.snapshotId)).snapshot;if(x=c.id,c.state!=="ready")throw new Error(`expected ready snapshot, got ${c.state}`)}if(e.fork){if(!x)throw new Error("expected snapshot id before fork");let g=await D(o,(await o.forkSnapshot(x,{budget:{maxUsd:e.budgetUsd??"0.05"},metadata:{source:"openpond-code-sandbox-smoke-fork",templateSnapshotId:x}},{async:!0})).sandbox);a=g.id;let c=await o.exec(g.id,{command:"cat openpond-code-smoke.txt",timeoutSeconds:120});if(c.command.status!=="succeeded")throw new Error(`expected fork command success, got ${c.command.status}`);if(!c.command.output.includes(i))throw new Error("expected fork snapshot marker");e.keep||(await O(o,g.id),b=!0)}let C=null;if(e.preview!==!1){let g=await o.openPort(p.id,{label:"openpond-code-smoke",port:u}),c=await fetch(g.preview.url);C=c.status;let Q=await c.text();if(c.status!==200)throw new Error(`expected preview HTTP 200, got ${c.status}`);if(!Q.includes(s))throw new Error("expected preview marker")}let{sandbox:V,receipts:Y}=await Z(o,p.id);return e.keep||(await O(o,p.id),d=!0),{deleted:d,execOutput:P.command.output.trim(),fileRoundtrip:!0,forkSandboxId:a,previewStatus:C,receiptRefs:Y.map(g=>g.mpp.receiptRef??null),reservationRef:p.reservation.mpp?.reservationRef??null,runId:t,sandboxId:p.id,snapshotId:x,state:V.state}}finally{a&&!e.keep&&!b&&await N(o,a),m&&!e.keep&&!d&&await N(o,m)}}r(J,"runSandboxSmoke");async function Z(o,e){try{await o.stop(e)}catch{await o.stop(e,{async:!0})}let t=await _(o,e,new Set(["stopped","deleted"]),"stop"),n=await ee(o,e);if(n.length===0)throw new Error("expected receipt readback");return{sandbox:t,receipts:n}}r(Z,"stopSandboxForSmoke");async function O(o,e){try{let t=await o.delete(e);if(t.state==="deleted")return t;await o.delete(e,{async:!0})}catch{await o.delete(e,{async:!0})}return _(o,e,new Set(["deleted"]),"delete")}r(O,"deleteSandboxForSmoke");async function N(o,e){try{await O(o,e)}catch{await o.delete(e,{async:!0}).catch(()=>{})}}r(N,"cleanupSandboxBestEffort");async function _(o,e,t,n){let u=Date.now()+3e5,m=await o.get(e);for(;Date.now()<u;){if(t.has(m.state))return m;if(m.state==="error")throw new Error(`sandbox ${n} failed: ${e}`);await I(3e3),m=await o.get(e)}throw new Error(`sandbox ${n} did not reach ${[...t].join("/")} before timeout: ${e} (${m.state})`)}r(_,"waitForSandboxState");async function ee(o,e){let s=Date.now()+12e4,i=await o.receipts(e);for(;Date.now()<s;){if(i.length>0)return i;await I(3e3),i=await o.receipts(e)}return i}r(ee,"waitForReceipts");async function D(o,e){if(e.state==="running"||e.state==="stopped")return e;if(e.state==="error")throw new Error(`sandbox create failed: ${e.id}
|
|
4
4
|
${e.logs.join(`
|
|
5
5
|
`)}`);let t=12*6e4,n=3e3,s=Date.now()+t,i=e;for(;Date.now()<s;){if(await I(n),i=await o.get(e.id),i.state==="running"||i.state==="stopped")return i;if(i.state==="error")throw new Error(`sandbox create failed: ${i.id}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as t}from"./chunk-XRKFTPHD.js";import"./chunk-
|
|
2
|
+
import{a as t}from"./chunk-XRKFTPHD.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import{f as n}from"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import"./chunk-X2J2P5ZT.js";import{a as r}from"./chunk-FTQLQJQV.js";import m from"node:path";async function c(o,i){if(i.length||o.json)throw new Error("openpond acp uses ACP JSON-RPC on stdout; --json and positional arguments are not supported.");let e=typeof o.home=="string"?n({home:o.home}):m.join(n(),"acp-agent");if(process.env.OPENPOND_HOME=e,o.login){await(await import("./core-commands-BPYXVT7O.js")).runLogin(o);let{AcpAccount:a}=await import("./acp-agent-PAGX2B47.js");await new a(e).models();return}await(await import("./acp-agent-PAGX2B47.js")).runOpenPondAcpAgent({home:e,version:t(),model:typeof o.model=="string"?o.model:void 0})}r(c,"runAcpCommand");export{c as runAcpCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{b as xs}from"./chunk-WMBOXX7G.js";import{b as Es,c as Ts}from"./chunk-ZSZXA7WB.js";import"./chunk-4DYWVGVS.js";import"./chunk-4TO743HO.js";import{a as vt,e as bs,g as ys,j as tt,p as Ss}from"./chunk-A77DLBR4.js";import{m as ks}from"./chunk-UXPO3ZV7.js";import"./chunk-DSJZS77R.js";import"./chunk-HPTEJBP4.js";import"./chunk-D7R2AAX2.js";import"./chunk-NTM3KQ25.js";import"./chunk-2GJD23CM.js";import"./chunk-JKI53ED7.js";import"./chunk-EVQISX7M.js";import"./chunk-PYNW5OFA.js";import"./chunk-66HFW4OU.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import"./chunk-AN525SPP.js";import"./chunk-WBO6FQHR.js";import"./chunk-H5ML7735.js";import"./chunk-SYUKES6H.js";import"./chunk-UOFDKMRU.js";import"./chunk-XHBMK6LC.js";import"./chunk-6I5AUTVO.js";import"./chunk-IZ6DLEVY.js";import"./chunk-QJJNHKLT.js";import"./chunk-ZU3YBRXS.js";import"./chunk-7XOUM6RK.js";import"./chunk-VD2TQCMH.js";import"./chunk-N73MU2C3.js";import"./chunk-DIDQHTAX.js";import"./chunk-Z2TOBS3P.js";import"./chunk-7PXZ4X4P.js";import"./chunk-FAKDGLZQ.js";import"./chunk-GW766ZSO.js";import{a as As,j as At}from"./chunk-MCBRB5D6.js";import"./chunk-JD76ANPN.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import"./chunk-4TTXNVCE.js";import"./chunk-HNDAGZCF.js";import"./chunk-YU3C6U5V.js";import"./chunk-OPTJYDZN.js";import"./chunk-KVTBX2UP.js";import"./chunk-BJXPQIVD.js";import"./chunk-QYQZQVVN.js";import{h as Is}from"./chunk-GFAI2MCJ.js";import"./chunk-VS2LOUCT.js";import"./chunk-DMFUEUAZ.js";import"./chunk-GF55VEMR.js";import"./chunk-LZPCA6DH.js";import"./chunk-L3KS6MOV.js";import"./chunk-GUG2SWRZ.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{I as nt,K as Cs,P as st,a as Rs,c as Ct,g as vs,w as Ce,x as oe}from"./chunk-MVPKU72J.js";import"./chunk-OQPJ7FJF.js";import"./chunk-BL3CZWWD.js";import"./chunk-GD3RCUDH.js";import"./chunk-QCJY6FTC.js";import"./chunk-UTIELP6F.js";import"./chunk-6S2MWJVD.js";import"./chunk-FYWQWKVS.js";import"./chunk-6ESBAHWK.js";import"./chunk-4V73I4OL.js";import"./chunk-LE75SVEL.js";import"./chunk-7J2NMUTK.js";import"./chunk-W45RKGM6.js";import"./chunk-W45RKGM6.js";import"./chunk-7PKTCMZ6.js";import"./chunk-LXZLLTYQ.js";import"./chunk-GI7LTJV3.js";import"./chunk-VS3AMJEK.js";import"./chunk-XGY4OQLC.js";import"./chunk-AF3AVDPP.js";import"./chunk-JFXINDOQ.js";import"./chunk-SFR32TMJ.js";import"./chunk-5KJMFK65.js";import"./chunk-Y3B6ZUE6.js";import"./chunk-4N4EH3RJ.js";import"./chunk-ULJZ7NUF.js";import"./chunk-WJSJXK2N.js";import"./chunk-SBQ6KLXB.js";import"./chunk-CYQLXS2U.js";import"./chunk-O6ZYDHEJ.js";import"./chunk-OKEC2EIE.js";import"./chunk-WLZJOCLA.js";import"./chunk-HIQPGYVH.js";import"./chunk-ZWW227M3.js";import"./chunk-DXA2UHBE.js";import"./chunk-MTP3B2SU.js";import"./chunk-UN2LKLGV.js";import"./chunk-2LJCJOJ7.js";import"./chunk-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import"./chunk-JCLTFDVW.js";import"./chunk-I6VMRQF4.js";import"./chunk-QAFXQHHG.js";import"./chunk-OKKNDQJF.js";import"./chunk-AJXWJLZA.js";import"./chunk-6FA3GG5B.js";import"./chunk-G4E3WGLM.js";import"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-SH7POUVX.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import"./chunk-RCT3O3HQ.js";import"./chunk-ZFJWA4JK.js";import{A as G,a as fs,e as s,f as et,g as O,h as F,i as q,k as zs,l as d,m as w,n as a,o as me,p as T,r as ee,s as l,u as f,y as ms,z as gs}from"./chunk-X2J2P5ZT.js";import{a as _s,c as ws}from"./chunk-UGOK7VTC.js";import{a as c,c as ho,e as fo}from"./chunk-FTQLQJQV.js";var Mi=ho(Qn=>{"use strict";var Ai=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Qc=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Ii=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Kc=/\\([\u000b\u0020-\u00ff])/g,Zc=/([\\"])/g,ki=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Qn.format=Xc;Qn.parse=Yc;function Xc(n){if(!n||typeof n!="object")throw new TypeError("argument obj is required");var e=n.parameters,t=n.type;if(!t||!ki.test(t))throw new TypeError("invalid type");var i=t;if(e&&typeof e=="object")for(var r,u=Object.keys(e).sort(),h=0;h<u.length;h++){if(r=u[h],!Ii.test(r))throw new TypeError("invalid parameter name");i+="; "+r+"="+td(e[r])}return i}c(Xc,"format");function Yc(n){if(!n)throw new TypeError("argument string is required");var e=typeof n=="object"?ed(n):n;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var t=e.indexOf(";"),i=t!==-1?e.slice(0,t).trim():e.trim();if(!ki.test(i))throw new TypeError("invalid media type");var r=new nd(i.toLowerCase());if(t!==-1){var u,h,p;for(Ai.lastIndex=t;h=Ai.exec(e);){if(h.index!==t)throw new TypeError("invalid parameter format");t+=h[0].length,u=h[1].toLowerCase(),p=h[2],p.charCodeAt(0)===34&&(p=p.slice(1,-1),p.indexOf("\\")!==-1&&(p=p.replace(Kc,"$1"))),r.parameters[u]=p}if(t!==e.length)throw new TypeError("invalid parameter format")}return r}c(Yc,"parse");function ed(n){var e;if(typeof n.getHeader=="function"?e=n.getHeader("content-type"):typeof n.headers=="object"&&(e=n.headers&&n.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}c(ed,"getcontenttype");function td(n){var e=String(n);if(Ii.test(e))return e;if(e.length>0&&!Qc.test(e))throw new TypeError("invalid parameter value");return'"'+e.replace(Zc,"\\$1")+'"'}c(td,"qstring");function nd(n){this.parameters=Object.create(null),this.type=n}c(nd,"ContentType")});import{Readable as Ld,Writable as Gd}from"node:stream";var _={initialize:"initialize",authenticate:"authenticate",providers_list:"providers/list",providers_set:"providers/set",providers_disable:"providers/disable",session_new:"session/new",session_load:"session/load",session_set_mode:"session/set_mode",session_set_config_option:"session/set_config_option",session_prompt:"session/prompt",session_cancel:"session/cancel",mcp_message:"mcp/message",session_list:"session/list",session_delete:"session/delete",session_fork:"session/fork",session_resume:"session/resume",session_close:"session/close",logout:"logout",nes_start:"nes/start",nes_suggest:"nes/suggest",nes_accept:"nes/accept",nes_reject:"nes/reject",nes_close:"nes/close",document_did_open:"document/didOpen",document_did_change:"document/didChange",document_did_close:"document/didClose",document_did_save:"document/didSave",document_did_focus:"document/didFocus"},I={session_request_permission:"session/request_permission",session_update:"session/update",fs_write_text_file:"fs/write_text_file",fs_read_text_file:"fs/read_text_file",terminal_create:"terminal/create",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit",terminal_kill:"terminal/kill",mcp_message:"mcp/message",elicitation_create:"elicitation/create",elicitation_complete:"elicitation/complete"},It={cancel_request:"$/cancel_request"};var Ms=Symbol("skippedItem");function o(n,e){return n.catch(e)}c(o,"defaultOnError");function V(n,e){let t=n.catch(e);return G.unknown().transform((i,r)=>i!==void 0?t.parse(i):(r.addIssue({code:"custom",message:"Required value is missing"}),G.NEVER))}c(V,"requiredDefaultOnError");function Os(n,e){if(n===null||typeof n!="object"||Array.isArray(n))return;let t=n[e];return typeof t=="string"?t:void 0}c(Os,"stringTag");function ge(n,e,t){return n.superRefine((i,r)=>{let u=Os(i,e);u!==void 0&&t.includes(u)&&r.addIssue({code:"custom",path:[e],message:`${e} ${JSON.stringify(u)} is reserved by a known variant, but the value does not match that variant's schema`})})}c(ge,"excludeKnownTags");function _e(n,e,t){return G.unknown().transform((i,r)=>{let u=n.safeParse(i);if(!u.success){for(let z of u.error.issues)r.addIssue({...z,input:i});return G.NEVER}let h=u.data,p=Os(i,e);if(p!==void 0&&!t.includes(p)){let z=i;for(let[m,g]of Object.entries(z))m!=="__proto__"&&(Object.hasOwn(h,m)||(h[m]=g))}return h})}c(_e,"preserveCustomPayload");function C(n){return G.array(n.catch(Ms)).transform(e=>e.filter(t=>t!==Ms))}c(C,"vecSkipError");var te=T([O(),s()]).nullable(),A=s(),Mt=a({sessionId:A,path:s(),content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Ot=a({sessionId:A,path:s(),line:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),limit:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Nt=s(),js=T([f("read"),f("edit"),f("delete"),f("move"),f("search"),f("execute"),f("think"),f("fetch"),f("switch_mode"),f("other")]),qs=T([f("pending"),f("in_progress"),f("completed"),f("failed")]),mo=T([f("assistant"),f("user")]),Ae=a({audience:o(C(mo).nullish(),()=>{}),lastModified:o(s().nullish(),()=>{}),priority:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),go=a({annotations:o(Ae.nullish(),()=>{}),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),_o=a({annotations:o(Ae.nullish(),()=>{}),data:s(),mimeType:s(),uri:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),wo=a({annotations:o(Ae.nullish(),()=>{}),data:s(),mimeType:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),bo=a({annotations:o(Ae.nullish(),()=>{}),description:o(s().nullish(),()=>{}),mimeType:o(s().nullish(),()=>{}),name:s(),size:o(O().nullish(),()=>{}),title:o(s().nullish(),()=>{}),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),yo=a({mimeType:o(s().nullish(),()=>{}),text:s(),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),So=a({blob:s(),mimeType:o(s().nullish(),()=>{}),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),xo=T([yo,So]),Eo=a({annotations:o(Ae.nullish(),()=>{}),resource:xo,_meta:o(l(s(),d()).nullish(),()=>{})}),re=T([go.and(a({type:f("text")})),_o.and(a({type:f("image")})),wo.and(a({type:f("audio")})),bo.and(a({type:f("resource_link")})),Eo.and(a({type:f("resource")}))]),To=a({content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),Ro=a({path:s(),oldText:o(s().nullish(),()=>{}),newText:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),we=s(),vo=a({terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ps=T([To.and(a({type:f("content")})),Ro.and(a({type:f("diff")})),vo.and(a({type:f("terminal")}))]),Ds=a({path:s(),line:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Hs=a({toolCallId:Nt,kind:o(js.nullish(),()=>{}),status:o(qs.nullish(),()=>{}),title:o(s().nullish(),()=>{}),name:o(s().nullish(),()=>{}),content:o(C(Ps).nullish(),()=>{}),locations:o(C(Ds).nullish(),()=>{}),rawInput:o(d().optional(),()=>{}),rawOutput:o(d().optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Us=s(),Co=T([f("allow_once"),f("allow_always"),f("reject_once"),f("reject_always")]),Ao=a({optionId:Us,name:s(),kind:Co,_meta:o(l(s(),d()).nullish(),()=>{})}),jt=a({sessionId:A,toolCall:Hs,options:w(Ao),_meta:o(l(s(),d()).nullish(),()=>{})}),Ls=a({name:s(),value:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),qt=a({sessionId:A,command:s(),args:o(C(s()).optional(),()=>[]),env:o(C(Ls).optional(),()=>[]),cwd:o(s().nullish(),()=>{}),outputByteLimit:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Pt=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Dt=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ht=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ut=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ie=a({sessionId:A,toolCallId:o(Nt.nullish(),()=>{})}),ke=a({requestId:te}),Io=f("object"),ko=T([f("email"),f("uri"),f("date"),f("date-time")]),Gs=a({const:s(),title:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Lt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minLength:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),maxLength:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),pattern:s().nullish(),format:ko.nullish(),default:o(s().nullish(),()=>{}),enum:w(s()).nullish(),oneOf:w(Gs).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Gt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minimum:O().nullish(),maximum:O().nullish(),default:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$t=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minimum:O().nullish(),maximum:O().nullish(),default:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ft=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),default:o(q().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Wt=a({enum:w(s()),_meta:o(l(s(),d()).nullish(),()=>{})}),$s=a({anyOf:w(Gs),_meta:o(l(s(),d()).nullish(),()=>{})}),Mo=_e(T([Wt.and(a({type:f("string")})),ge(a({type:s()}),"type",["string"]),$s]),"type",["string"]),Bt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minItems:O().nullish(),maxItems:O().nullish(),items:Mo,default:o(C(s()).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Oo=_e(T([Lt.and(a({type:f("string")})),Gt.and(a({type:f("number")})),$t.and(a({type:f("integer")})),Ft.and(a({type:f("boolean")})),Bt.and(a({type:f("array")})),ge(a({type:s()}),"type",["array","boolean","integer","number","string"])]),"type",["array","boolean","integer","number","string"]),No=a({type:o(Io.optional().default("object"),()=>"object"),title:o(s().nullish(),()=>{}),properties:l(s(),Oo).optional().default({}),required:w(s()).nullish(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Vt=ee(T([Ie,ke]),a({requestedSchema:No})),Fs=s(),Jt=ee(T([Ie,ke]),a({elicitationId:Fs,url:et()})),Qt=_e(ee(T([Vt.and(a({mode:f("form")})),Jt.and(a({mode:f("url")})),ge(ee(T([Ie,ke]),a({mode:s()})),"mode",["form","url"])]),a({message:s(),_meta:o(l(s(),d()).nullish(),()=>{})})),"mode",["form","url"]),Kt=s(),Ws=s(),jo=a({serverId:Kt,requestId:Ws,method:s(),params:l(s(),d()).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Bs=d(),Qd=a({id:te,method:s(),params:T([Mt,Ot,jt,qt,Pt,Dt,Ht,Ut,Qt,jo,Bs]).nullish()}),Vs=F().gte(0).lte(65535),qo=a({image:o(q().optional().default(!1),()=>!1),audio:o(q().optional().default(!1),()=>!1),embeddedContext:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Po=a({http:o(q().optional().default(!1),()=>!1),sse:o(q().optional().default(!1),()=>!1),acp:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Do=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ho=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Uo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Lo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Go=a({_meta:o(l(s(),d()).nullish(),()=>{})}),$o=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Fo=a({list:o(Do.nullish(),()=>{}),delete:o(Ho.nullish(),()=>{}),additionalDirectories:o(Uo.nullish(),()=>{}),fork:o(Lo.nullish(),()=>{}),resume:o(Go.nullish(),()=>{}),close:o($o.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Wo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Bo=a({logout:o(Wo.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Vo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Jo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Qo=T([f("full"),f("incremental")]),Ko=a({syncKind:Qo,_meta:o(l(s(),d()).nullish(),()=>{})}),Zo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Xo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Yo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),er=a({didOpen:o(Jo.nullish(),()=>{}),didChange:o(Ko.nullish(),()=>{}),didClose:o(Zo.nullish(),()=>{}),didSave:o(Xo.nullish(),()=>{}),didFocus:o(Yo.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),tr=a({document:o(er.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),nr=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),sr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ir=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),or=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),rr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ar=a({_meta:o(l(s(),d()).nullish(),()=>{})}),cr=a({recentFiles:o(nr.nullish(),()=>{}),relatedSnippets:o(sr.nullish(),()=>{}),editHistory:o(ir.nullish(),()=>{}),userActions:o(or.nullish(),()=>{}),openFiles:o(rr.nullish(),()=>{}),diagnostics:o(ar.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),dr=a({events:o(tr.nullish(),()=>{}),context:o(cr.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Js=T([f("utf-16"),f("utf-32"),f("utf-8")]),lr=a({loadSession:o(q().optional().default(!1),()=>!1),promptCapabilities:o(qo.optional().default({image:!1,audio:!1,embeddedContext:!1}),()=>({image:!1,audio:!1,embeddedContext:!1})),mcpCapabilities:o(Po.optional().default({http:!1,sse:!1,acp:!1}),()=>({http:!1,sse:!1,acp:!1})),sessionCapabilities:o(Fo.optional().default({}),()=>({})),auth:o(Bo.optional().default({}),()=>({})),providers:o(Vo.nullish(),()=>{}),nes:o(dr.nullish(),()=>{}),positionEncoding:o(Js.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Zt=s(),ur=a({id:Zt,name:s(),description:o(s().nullish(),()=>{}),args:o(C(s()).optional(),()=>[]),env:o(l(s(),s()).optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),pr=a({id:Zt,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),hr=T([ur.and(a({type:f("terminal")})),pr]),Qs=a({name:s(),title:o(s().nullish(),()=>{}),version:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),fr=a({protocolVersion:Vs,agentCapabilities:o(lr.optional().default({loadSession:!1,promptCapabilities:{image:!1,audio:!1,embeddedContext:!1},mcpCapabilities:{http:!1,sse:!1,acp:!1},sessionCapabilities:{},auth:{}}),()=>({loadSession:!1,promptCapabilities:{image:!1,audio:!1,embeddedContext:!1},mcpCapabilities:{http:!1,sse:!1,acp:!1},sessionCapabilities:{},auth:{}})),authMethods:o(C(hr).optional().default([]),()=>[]),agentInfo:o(Qs.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),zr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Xt=s(),Yt=T([f("anthropic"),f("openai"),f("azure"),f("vertex"),f("bedrock"),s()]),mr=a({apiType:Yt,baseUrl:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),gr=a({providerId:Xt,supported:V(C(Yt),()=>[]),required:q(),current:mr.nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),_r=a({providers:w(gr),_meta:o(l(s(),d()).nullish(),()=>{})}),wr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),br=a({_meta:o(l(s(),d()).nullish(),()=>{})}),yr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),it=s(),Sr=a({id:it,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ot=a({currentModeId:it,availableModes:V(C(Sr),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Ks=s(),xr=T([f("mode"),f("model"),f("model_config"),f("thought_level"),s()]),en=s(),Zs=a({value:en,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Er=s(),Tr=a({group:Er,name:s(),options:V(C(Zs),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Rr=T([w(Zs),w(Tr)]),vr=a({currentValue:en,options:Rr}),Cr=a({currentValue:q()}),be=ee(T([vr.and(a({type:f("select")})),Cr.and(a({type:f("boolean")}))]),a({id:Ks,name:s(),description:o(s().nullish(),()=>{}),category:o(xr.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})})),Ar=a({sessionId:A,modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ir=a({modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),kr=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),title:o(s().nullish(),()=>{}),updatedAt:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Mr=a({sessions:V(C(kr),()=>[]),nextCursor:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Or=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Nr=a({sessionId:A,modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),jr=a({modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),qr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Pr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Dr=a({configOptions:V(C(be),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Xs=T([f("end_turn"),f("max_tokens"),f("max_turn_requests"),f("refusal"),f("cancelled")]),Ys=a({totalTokens:O(),inputTokens:O(),outputTokens:O(),thoughtTokens:o(O().nullish(),()=>{}),cachedReadTokens:o(O().nullish(),()=>{}),cachedWriteTokens:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Hr=a({stopReason:Xs,usage:o(Ys.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ur=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),ye=s(),ne=a({line:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),character:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),_meta:o(l(s(),d()).nullish(),()=>{})}),Se=a({start:ne,end:ne,_meta:o(l(s(),d()).nullish(),()=>{})}),Lr=a({range:Se,newText:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Gr=a({id:ye,uri:s(),edits:w(Lr),cursorPosition:o(ne.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$r=a({id:ye,uri:s(),position:ne,_meta:o(l(s(),d()).nullish(),()=>{})}),Fr=a({id:ye,uri:s(),position:ne,newName:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Wr=a({id:ye,uri:s(),search:s(),replace:s(),isRegex:q().nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Br=T([Gr.and(a({kind:f("edit")})),$r.and(a({kind:f("jump")})),Fr.and(a({kind:f("rename")})),Wr.and(a({kind:f("searchAndReplace")}))]),Vr=a({suggestions:w(Br),_meta:o(l(s(),d()).nullish(),()=>{})}),Jr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ei=d(),Qr=T([f(-32700),f(-32600),f(-32601),f(-32602),f(-32603),f(-32800),f(-32e3),f(-32002),F().min(-2147483648,{error:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{error:"Invalid value: Expected int32 to be <= 2147483647"})]),ti=a({code:Qr,message:s(),data:o(d().optional(),()=>{})}),Kd=T([a({id:te,result:T([fr,zr,_r,wr,br,yr,Ar,Ir,Mr,Or,Nr,jr,qr,Pr,Dr,Hr,Ur,Vr,Jr,ei])}),a({id:te,error:ti})]),tn=s(),kt=a({content:re,messageId:o(tn.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Kr=a({toolCallId:Nt,title:s(),name:o(s().nullish(),()=>{}),kind:o(js.optional(),()=>{}),status:o(qs.optional(),()=>{}),content:o(C(Ps).optional(),()=>[]),locations:o(C(Ds).optional(),()=>[]),rawInput:o(d().optional(),()=>{}),rawOutput:o(d().optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Zr=T([f("high"),f("medium"),f("low")]),Xr=T([f("pending"),f("in_progress"),f("completed")]),ni=a({content:s(),priority:Zr,status:Xr,_meta:o(l(s(),d()).nullish(),()=>{})}),Yr=a({entries:V(C(ni),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),rt=s(),ea=a({planId:rt,entries:V(C(ni),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),ta=a({planId:rt,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),na=a({planId:rt,content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),sa=T([ea.and(a({type:f("items")})),ta.and(a({type:f("file")})),na.and(a({type:f("markdown")}))]),ia=a({plan:sa,_meta:o(l(s(),d()).nullish(),()=>{})}),oa=a({planId:rt,_meta:o(l(s(),d()).nullish(),()=>{})}),ra=a({hint:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),aa=ra,ca=a({name:s(),description:s(),input:o(aa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),da=a({availableCommands:V(C(ca),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),la=a({currentModeId:it,_meta:o(l(s(),d()).nullish(),()=>{})}),ua=a({configOptions:V(C(be),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),pa=a({title:o(s().nullish(),()=>{}),updatedAt:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ha=a({amount:O(),currency:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),fa=a({used:O(),size:O(),cost:o(ha.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),za=T([f("info"),f("warning"),f("error"),s()]),ma=a({severity:za,title:s().min(1),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),si=s(),ga=T([f("in_progress"),f("completed"),f("failed"),f("cancelled"),s()]),_a=a({compactionId:si,status:ga,summary:o(C(re).nullish(),()=>{}),error:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),wa=a({compactionId:si,content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),ba=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ya=a({cancel:o(ba.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),nn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),sn=a({stopReason:o(Xs.nullish(),()=>{}),usage:o(Ys.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),on=a({_meta:o(l(s(),d()).nullish(),()=>{})}),rn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Sa=_e(T([nn.and(a({state:f("running")})),sn.and(a({state:f("idle")})),on.and(a({state:f("requires_action")})),rn.and(a({state:f("unknown")})),ge(a({state:s()}),"state",["idle","requires_action","running","unknown"])]),"state",["idle","requires_action","running","unknown"]),xa=a({sessionId:A,title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),capabilities:o(ya.nullish(),()=>{}),state:o(Sa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ea=a({messageId:tn,senderSessionId:o(A.nullish(),()=>{}),recipientSessionId:o(A.nullish(),()=>{}),content:o(C(re).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ta=a({messageId:tn,senderSessionId:o(A.nullish(),()=>{}),recipientSessionId:o(A.nullish(),()=>{}),content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),Ra=T([kt.and(a({sessionUpdate:f("user_message_chunk")})),kt.and(a({sessionUpdate:f("agent_message_chunk")})),kt.and(a({sessionUpdate:f("agent_thought_chunk")})),Kr.and(a({sessionUpdate:f("tool_call")})),Hs.and(a({sessionUpdate:f("tool_call_update")})),Yr.and(a({sessionUpdate:f("plan")})),ia.and(a({sessionUpdate:f("plan_update")})),oa.and(a({sessionUpdate:f("plan_removed")})),da.and(a({sessionUpdate:f("available_commands_update")})),la.and(a({sessionUpdate:f("current_mode_update")})),ua.and(a({sessionUpdate:f("config_option_update")})),pa.and(a({sessionUpdate:f("session_info_update")})),fa.and(a({sessionUpdate:f("usage_update")})),ma.and(a({sessionUpdate:f("notice")})),_a.and(a({sessionUpdate:f("compaction_update")})),wa.and(a({sessionUpdate:f("compaction_summary_chunk")})),xa.and(a({sessionUpdate:f("subagent_update")})),Ea.and(a({sessionUpdate:f("session_message")})),Ta.and(a({sessionUpdate:f("session_message_chunk")}))]),at=a({sessionId:A,update:Ra,_meta:o(l(s(),d()).nullish(),()=>{})}),an=a({elicitationId:Fs,_meta:o(l(s(),d()).nullish(),()=>{})}),ii=d(),Zd=a({method:s(),params:T([at,an,ii]).nullish()}),va=a({readTextFile:o(q().optional().default(!1),()=>!1),writeTextFile:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Ca=l(s(),d()),Aa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ia=a({boolean:o(Aa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ka=l(s(),d()),Ma=a({compaction:o(Ca.nullish(),()=>{}),configOptions:o(Ia.nullish(),()=>{}),notices:o(ka.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Oa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Na=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ja=a({terminal:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),qa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Pa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Da=a({form:o(qa.nullish(),()=>{}),url:o(Pa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ha=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ua=a({_meta:o(l(s(),d()).nullish(),()=>{})}),La=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ga=a({jump:o(Ha.nullish(),()=>{}),rename:o(Ua.nullish(),()=>{}),searchAndReplace:o(La.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$a=a({fs:o(va.optional().default({readTextFile:!1,writeTextFile:!1}),()=>({readTextFile:!1,writeTextFile:!1})),terminal:o(q().optional().default(!1),()=>!1),session:o(Ma.nullish(),()=>{}),subagents:o(Oa.nullish(),()=>{}),plan:o(Na.nullish(),()=>{}),auth:o(ja.optional().default({terminal:!1}),()=>({terminal:!1})),elicitation:o(Da.nullish(),()=>{}),nes:o(Ga.nullish(),()=>{}),positionEncodings:o(C(Js).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),cn=a({protocolVersion:Vs,clientCapabilities:o($a.optional().default({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,auth:{terminal:!1}}),()=>({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,auth:{terminal:!1}})),clientInfo:o(Qs.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),dn=a({methodId:Zt,_meta:o(l(s(),d()).nullish(),()=>{})}),ln=a({_meta:o(l(s(),d()).nullish(),()=>{})}),un=a({providerId:Xt,apiType:Yt,baseUrl:s(),headers:l(s(),s()).optional(),_meta:o(l(s(),d()).nullish(),()=>{})}),pn=a({providerId:Xt,_meta:o(l(s(),d()).nullish(),()=>{})}),hn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),oi=a({name:s(),value:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Fa=a({name:s(),url:s(),headers:w(oi),_meta:o(l(s(),d()).nullish(),()=>{})}),Wa=a({name:s(),url:s(),headers:w(oi),_meta:o(l(s(),d()).nullish(),()=>{})}),Ba=a({name:s(),serverId:Kt,_meta:o(l(s(),d()).nullish(),()=>{})}),Va=a({name:s(),command:s(),args:w(s()),env:w(Ls),_meta:o(l(s(),d()).nullish(),()=>{})}),ct=T([Fa.and(a({type:f("http")})),Wa.and(a({type:f("sse")})),Ba.and(a({type:f("acp")})),Va]),fn=a({cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:V(C(ct),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),zn=a({mcpServers:V(C(ct),()=>[]),cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),mn=a({cwd:s().nullish(),cursor:s().nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),gn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),_n=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:o(C(ct).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),wn=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:o(C(ct).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),bn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),yn=a({sessionId:A,modeId:it,_meta:o(l(s(),d()).nullish(),()=>{})}),Sn=ee(T([a({value:q(),type:f("boolean")}),a({value:en})]),a({sessionId:A,configId:Ks,_meta:o(l(s(),d()).nullish(),()=>{})})),xn=a({sessionId:A,prompt:w(re),_meta:o(l(s(),d()).nullish(),()=>{})}),Ja=a({uri:s(),name:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Qa=a({name:s(),owner:s(),remoteUrl:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),En=a({workspaceUri:o(s().nullish(),()=>{}),workspaceFolders:w(Ja).nullish(),repository:o(Qa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ka=T([f("automatic"),f("diagnostic"),f("manual")]),Za=a({uri:s(),languageId:s(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Xa=a({startLine:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),endLine:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Ya=a({uri:s(),excerpts:w(Xa),_meta:o(l(s(),d()).nullish(),()=>{})}),ec=a({uri:s(),diff:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),tc=a({action:s(),uri:s(),position:ne,timestampMs:O(),_meta:o(l(s(),d()).nullish(),()=>{})}),nc=a({uri:s(),languageId:s(),visibleRange:o(Se.nullish(),()=>{}),lastFocusedMs:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),sc=T([f("error"),f("warning"),f("information"),f("hint")]),ic=a({uri:s(),range:Se,severity:sc,message:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),oc=a({recentFiles:w(Za).nullish(),relatedSnippets:w(Ya).nullish(),editHistory:w(ec).nullish(),userActions:w(tc).nullish(),openFiles:w(nc).nullish(),diagnostics:w(ic).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Tn=a({sessionId:A,uri:s(),version:O(),position:ne,selection:Se.nullish(),triggerKind:Ka,context:oc.nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Rn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),Xd=a({id:te,method:s(),params:T([cn,dn,ln,un,pn,hn,fn,zn,mn,gn,_n,wn,bn,yn,Sn,xn,En,Tn,Rn,Bs]).nullish()}),rc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ac=a({content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),cc=a({optionId:Us,_meta:o(l(s(),d()).nullish(),()=>{})}),dc=T([a({outcome:f("cancelled")}),cc.and(a({outcome:f("selected")}))]),lc=a({outcome:dc,_meta:o(l(s(),d()).nullish(),()=>{})}),uc=a({terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),pc=a({exitCode:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),signal:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),hc=a({output:s(),truncated:q(),exitStatus:o(pc.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),fc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),zc=a({exitCode:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),signal:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),mc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),gc=T([s(),O(),O(),q(),w(s())]),vn=a({content:l(s(),gc).nullish()}),_c=_e(ee(T([vn.and(a({action:f("accept")})),a({action:f("decline")}),a({action:f("cancel")}),ge(a({action:s()}),"action",["accept","cancel","decline"])]),a({_meta:o(l(s(),d()).nullish(),()=>{})})),"action",["accept","cancel","decline"]),wc=me({code:F().min(-2147483648,{error:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{error:"Invalid value: Expected int32 to be <= 2147483647"}),message:s(),data:d().optional()}),bc=T([a({result:d(),_meta:o(l(s(),d()).nullish(),()=>{})}),a({error:wc,_meta:o(l(s(),d()).nullish(),()=>{})})]),Yd=T([a({id:te,result:T([rc,ac,lc,uc,hc,fc,zc,mc,_c,bc,ei])}),a({id:te,error:ti})]),Cn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),An=a({sessionId:A,uri:s(),languageId:s(),version:O(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),yc=a({range:Se.nullish(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),In=a({sessionId:A,uri:s(),version:O(),contentChanges:V(C(yc),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),kn=a({sessionId:A,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Mn=a({sessionId:A,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),On=a({sessionId:A,uri:s(),version:O(),position:ne,visibleRange:Se,_meta:o(l(s(),d()).nullish(),()=>{})}),Nn=a({sessionId:A,id:ye,_meta:o(l(s(),d()).nullish(),()=>{})}),Sc=T([f("rejected"),f("ignored"),f("replaced"),f("cancelled")]),jn=a({sessionId:A,id:ye,reason:o(Sc.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),xc=a({serverId:Kt,requestId:Ws,method:s(),params:l(s(),d()).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),el=a({method:s(),params:T([Cn,An,In,kn,Mn,On,Nn,jn,xc,ii]).nullish()}),tl=a({requestId:te,_meta:o(l(s(),d()).nullish(),()=>{})});var ai="$/cancel_request";function dt(n){return Hn(n)&&"id"in n&&typeof n.method=="string"&&Un(n.id)}c(dt,"isRequestMessage");function di(n){if(!Hn(n)||"method"in n||!("id"in n)||!Un(n.id))return!1;let e=Object.hasOwn(n,"result"),t=Object.hasOwn(n,"error");return e===t?!1:!t||Rc(n.error)}c(di,"isResponseMessage");function xe(n){return Hn(n)&&!("id"in n)&&typeof n.method=="string"}c(xe,"isNotificationMessage");function se(n){return typeof n=="object"&&n!==null}c(se,"isRecord");function Hn(n){return se(n)&&n.jsonrpc==="2.0"}c(Hn,"isJsonRpcEnvelope");function Un(n){return n===null||typeof n=="string"||typeof n=="number"&&Number.isFinite(n)}c(Un,"isJsonRpcId");function ci(n){return se(n)&&!("method"in n)&&("id"in n||"result"in n||"error"in n)}c(ci,"isResponseShapedMessage");function Ec(n){let e=!1,t=!1,i=!1,r=!1;for(let u of n)e||=dt(u)||xe(u),t||=di(u),se(u)&&(i||="method"in u,r||="result"in u||"error"in u);return e?!1:t?!0:r&&!i}c(Ec,"isResponseBatch");function Tc(n){if(!(!se(n)||!Un(n.requestId)))return n.requestId}c(Tc,"cancelRequestId");function Rc(n){return se(n)&&typeof n.code=="number"&&Number.isInteger(n.code)&&typeof n.message=="string"}c(Rc,"isErrorResponse");var Z={yes(){return{handled:!0}},no(n,e=!1){return{handled:!1,message:n,retry:e}}};function ae(n){let e=Promise.reject(n);return e.catch(()=>{}),e}c(ae,"rejectedPromise");function vc(n){if(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")return n.message}c(vc,"errorDetails");function Cc(n){return typeof n=="object"&&n!==null&&"name"in n&&n.name==="ZodError"&&"issues"in n&&Array.isArray(n.issues)&&"format"in n&&typeof n.format=="function"}c(Cc,"isZodError");function li(n){if(n instanceof S)return n.toResult();if(Cc(n))return S.invalidParams(n.format()).toResult();let e=vc(n);try{return S.internalError(e?JSON.parse(e):{}).toResult()}catch{return S.internalError({details:e}).toResult()}}c(li,"errorToResult");function Ac(n){return n instanceof S&&n.code===-32800?n:S.requestCancelled(n)}c(Ac,"requestCancelledError");function Ic(n,e){let t=kc(n,e);return t?t.toResult():li(n)}c(Ic,"errorToRequestResult");function kc(n,e){if(!(!e.aborted||!Mc(n)))return Ac(e.reason)}c(kc,"abortErrorToRequestCancelled");function Mc(n){if(typeof n!="object"||n===null)return!1;let e=n;return e.name==="AbortError"||e.code==="ABORT_ERR"}c(Mc,"isAbortError");var qn=class{static{c(this,"RequestResponder")}id;sendResult;signal;finishRequest;didRespond=!1;constructor(e,t,i=new AbortController().signal,r){this.id=e,this.sendResult=t,this.signal=i,this.finishRequest=r}get responded(){return this.didRespond}respond(e){return this.respondWithResult({result:e??null})}respondWithError(e){let t=e instanceof S?e.toErrorResponse():e;return this.respondWithResult({error:t})}respondWithResult(e){return this.didRespond?ae(new Error("JSON-RPC request already responded")):(this.didRespond=!0,this.sendResult(e).finally(()=>{this.finishRequest?.()}))}},Oc=new WeakMap;var Te=class{static{c(this,"HandlerRegistration")}disposeHandler;active=!0;constructor(e){this.disposeHandler=e}dispose(){this.active&&(this.active=!1,this.disposeHandler())}[Symbol.dispose](){this.dispose()}runIndefinitely(){return this}},Pn=class{static{c(this,"ConnectionContext")}connection;constructor(e){this.connection=e}sendRequest(e,t,i,r){return this.connection.sendRequest(e,t,i,r)}sendNotification(e,t){return this.connection.sendNotification(e,t)}sendBatch(e){return this.connection.sendBatch(e)}sendCancelRequest(e){return this.connection.sendCancelRequest(e)}addDynamicHandler(e){return this.connection.addDynamicHandler(e)}get signal(){return this.connection.signal}get closed(){return this.connection.closed}},Re=class{static{c(this,"Connection")}pendingResponses=new Map;incomingRequests=new Map;nextRequestId=0;staticHandlers=[];dynamicHandlers=new Set;stream;writeQueue=Promise.resolve();abortController=new AbortController;closedPromise;retryQueue=[];context=new Pn(this);receiveReader;allowBatches=!0;constructor(e,t,i,r){if(typeof e=="function"){let z=e,m=t,g=i;this.initialize(g,[...r?.handlers??[],this.legacyHandler(z,m)],r);return}let u=e,h=t,p=i;this.initialize(u,[...p?.handlers??[],...h],p)}static builder(){return new Dn}runUntil(e){let t=!1,i=Promise.resolve().then(()=>e(this.context)).finally(()=>{t=!0}),r=this.closed.then(()=>{if(t)return new Promise(()=>{});throw this.closedReason()});return Promise.race([i,r]).finally(()=>{t=!0,this.close()})}addDynamicHandler(e){if(this.dynamicHandlers.add(e),this.retryQueue.length>0)for(let t of this.retryQueue.splice(0))this.processIncomingMessage(t).catch(i=>this.close(i));return new Te(()=>{this.dynamicHandlers.delete(e)})}get signal(){return this.abortController.signal}get closed(){return this.closedPromise}getContext(){return this.context}sendRequest(e,t,i,r={}){if(this.abortController.signal.aborted)return ae(this.closedReason());let u=this.prepareRequest(e,t,i,r);return this.sendWireMessage(u.message).catch(()=>{}),r.cancellationSignal?.aborted&&u.cancel(),u.response}sendBatch(e){if(this.abortController.signal.aborted)return ae(this.closedReason());if(!this.allowBatches)return ae(new TypeError("JSON-RPC batches are not supported on this connection"));if(e.length===0)return ae(new TypeError("JSON-RPC batch must contain at least one entry"));let t=[],i=[],r=[];for(let z of e){if(z.kind==="notification"){t.push({jsonrpc:"2.0",method:z.method,params:z.params}),r.push(Promise.resolve(void 0));continue}let m=this.prepareRequest(z.method,z.params,z.mapResponse,z.options);t.push(m.message),r.push(m.response),i.push({signal:z.options?.cancellationSignal,cancel:m.cancel})}let u=t,h=this.sendWireMessage(u);for(let z of i)z.signal?.aborted&&z.cancel();let p=Promise.all([h,...r]).then(([,...z])=>z);return p.catch(()=>{}),p}sendCancelRequest(e){return this.sendNotification(ai,{requestId:e})}sendNotification(e,t){return this.abortController.signal.aborted?ae(this.closedReason()):this.sendWireMessage({jsonrpc:"2.0",method:e,params:t})}prepareRequest(e,t,i,r={}){let u=this.nextRequestId++,h=c(()=>{},"cancel"),p=new Promise((z,m)=>{let g={resolve:c(x=>{try{z(i?i(x):x)}catch(v){m(v)}},"resolve"),reject:m};h=c(()=>{g.cancellationSent||(g.cancellationSent=!0,g.cleanup?.(),this.sendCancelRequest(u).catch(()=>{}))},"cancel"),r.cancellationSignal?.addEventListener("abort",h,{once:!0}),g.cleanup=()=>{r.cancellationSignal?.removeEventListener("abort",h)},this.pendingResponses.set(u,g)});return p.catch(()=>{}),{message:{jsonrpc:"2.0",id:u,method:e,params:t},response:p,cancel:c(()=>h(),"cancel")}}close(e){if(this.abortController.signal.aborted)return;let t=e??new Error("ACP connection closed");this.abortController.abort(t);for(let i of this.pendingResponses.values())i.cleanup?.(),i.reject(t);this.pendingResponses.clear();for(let i of this.incomingRequests.values())i.abort(t);this.incomingRequests.clear(),this.receiveReader?.cancel(t).catch(()=>{})}initialize(e,t,i){this.stream=e,this.staticHandlers=t,this.allowBatches=i?.allowBatches??!0,this.closedPromise=new Promise(r=>{this.abortController.signal.addEventListener("abort",()=>r())}),this.receive()}legacyHandler(e,t){return{handleMessage:c(async(i,r)=>{if(i.kind==="request"){let u=await e(i.method,i.params,r);await i.responder.respond(u)}else await t(i.method,i.params,r);return Z.yes()},"handleMessage")}}async receive(){let e;try{let t=this.stream.readable.getReader();this.receiveReader=t;try{for(;!this.abortController.signal.aborted;){let{value:i,done:r}=await t.read();if(this.abortController.signal.aborted||r)break;this.receiveWireMessage(i)}}finally{this.receiveReader===t&&(this.receiveReader=void 0),t.releaseLock()}}catch(t){e=t}finally{this.close(e)}}receiveWireMessage(e){if(Array.isArray(e)){if(!this.allowBatches){this.close(new TypeError("JSON-RPC batches are not supported on this connection"));return}this.receiveBatch(e);return}if(!dt(e)&&!xe(e)&&!ci(e)){this.sendWireMessage(Ee(S.invalidRequest(e))).catch(()=>{});return}this.receiveMessage(e)}receiveBatch(e){if(e.length===0){this.sendWireMessage(Ee(S.invalidRequest(e))).catch(()=>{});return}let t=Ec(e),r=t?0:e.reduce((g,x)=>g+(xe(x)?0:1),0),u=e.reduce((g,x)=>g+(xe(x)?1:0),0),h=!1,p=[],z=c(async()=>{h||r!==0||u!==0||p.length===0||(h=!0,await this.sendWireMessage(p))},"sendResponsesIfReady"),m=c(async g=>{p.push(g),r-=1,await z()},"collectResponse");for(let g of e){if(t){ci(g)&&this.receiveMessage(g);continue}if(!dt(g)&&!xe(g)){m(Ee(S.invalidRequest(g))).catch(()=>{});continue}let x=this.receiveMessage(g,dt(g)?m:void 0,e.length);xe(g)&&x.finally(()=>{u-=1,z().catch(v=>this.close(v))})}}receiveMessage(e,t,i){return this.abortController.signal.aborted?Promise.resolve():se(e)?"method"in e?("id"in e||this.handleProtocolNotification(e),this.processIncomingMessage(this.toIncomingMessage(e,t,i)).catch(r=>this.close(r))):("id"in e?this.handleResponse(e):console.error("Invalid message",{message:e}),Promise.resolve()):(console.error("Invalid message",{message:e}),Promise.resolve())}async processIncomingMessage(e){if(this.abortController.signal.aborted)return;let t=e,i=!1;try{for(let r of[...this.staticHandlers,...this.dynamicHandlers.values()]){if(this.abortController.signal.aborted)return;let u=await r.handleMessage(t,this.context)??{handled:!0};if(u.handled)return;t=u.message??t,i=i||!!u.retry}i?this.retryQueue.push(t):t.kind==="request"&&await t.responder.respondWithError(S.methodNotFound(t.method))}catch(r){if(this.abortController.signal.aborted)return;if(t.kind==="request"&&!t.responder.responded)await t.responder.respondWithResult(Ic(r,t.responder.signal));else{let u=li(r);"error"in u&&console.error("Error handling notification",e.raw,u.error)}}}toIncomingMessage(e,t,i){if("id"in e){let r=new AbortController;this.incomingRequests.set(e.id,r);let u=c(()=>{this.incomingRequests.get(e.id)===r&&this.incomingRequests.delete(e.id)},"finishRequest"),h=new qn(e.id,p=>{let z={jsonrpc:"2.0",id:e.id,...p};return t?t(z):this.sendWireMessage(z)},r.signal,u);return i!==void 0&&Oc.set(h,i),{kind:"request",method:e.method,params:e.params,raw:e,signal:r.signal,responder:h}}return{kind:"notification",method:e.method,params:e.params,raw:e}}handleResponse(e){let t=this.pendingResponses.get(e.id);if(t)if(this.pendingResponses.delete(e.id),t.cleanup?.(),!di(e))t.reject(S.invalidRequest(e));else if("result"in e)t.resolve(e.result);else{let{code:i,message:r,data:u}=e.error;t.reject(new S(i,r,u))}else console.error("Got response to unknown request",e.id)}handleProtocolNotification(e){if(e.method!==ai)return;let t=Tc(e.params);if(t===void 0)return;let i=this.incomingRequests.get(t);!i||i.signal.aborted||i.abort(S.requestCancelled({requestId:t}))}closedReason(){return this.abortController.signal.reason??new Error("ACP connection closed")}async sendWireMessage(e){return this.abortController.signal.aborted?ae(this.closedReason()):(this.writeQueue=this.writeQueue.then(async()=>{if(this.abortController.signal.aborted)throw this.closedReason();let t=this.stream.writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(t=>{throw this.close(t),t}),this.writeQueue)}},Dn=class{static{c(this,"ConnectionBuilder")}handlers=[];connectionName;name(e){return this.connectionName=e,this}withHandler(e){return this.handlers.push(e),this}onReceiveMessage(e){return this.withHandler({handleMessage:c(async(t,i)=>await e(t,i)??Z.no(t),"handleMessage"),describe:c(()=>this.connectionName??"onReceiveMessage","describe")})}onReceiveRequest(e,t,i){return this.withHandler({handleMessage:c(async(r,u)=>{if(r.kind!=="request"||r.method!==e)return Z.no(r);let h=t(r.params);return await i(h,r.responder,u)??Z.yes()},"handleMessage"),describe:c(()=>`${this.connectionName??"request"}:${e}`,"describe")})}onReceiveNotification(e,t,i){return this.withHandler({handleMessage:c(async(r,u)=>{if(r.kind!=="notification"||r.method!==e)return Z.no(r);let h=t(r.params);return await i(h,u)??Z.yes()},"handleMessage"),describe:c(()=>`${this.connectionName??"notification"}:${e}`,"describe")})}connect(e,t){return new Re(e,this.handlers,t)}connectWith(e,t,i){return this.connect(e,i).runUntil(t)}},S=class n extends Error{static{c(this,"RequestError")}code;data;constructor(e,t,i){super(t),this.code=e,this.name="RequestError",this.data=i}static parseError(e,t){return new n(-32700,`Parse error${t?`: ${t}`:""}`,e)}static invalidRequest(e,t){return new n(-32600,`Invalid request${t?`: ${t}`:""}`,e)}static methodNotFound(e){return new n(-32601,`"Method not found": ${e}`,{method:e})}static invalidParams(e,t){return new n(-32602,`Invalid params${t?`: ${t}`:""}`,e)}static internalError(e,t){return new n(-32603,`Internal error${t?`: ${t}`:""}`,e)}static requestCancelled(e,t){return new n(-32800,`Request cancelled${t?`: ${t}`:""}`,e)}static authRequired(e,t){return new n(-32e3,`Authentication required${t?`: ${t}`:""}`,e)}static resourceNotFound(e){return new n(-32002,`Resource not found${e?`: ${e}`:""}`,e&&{uri:e})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};function Ee(n){return{jsonrpc:"2.0",id:null,error:n.toErrorResponse()}}c(Ee,"protocolErrorResponse");var ve=class extends Error{static{c(this,"MessageTooLargeError")}maxMessageBytes;constructor(e){super(`Incoming ACP data exceeds the configured ${e} byte limit`),this.maxMessageBytes=e,this.name="MessageTooLargeError"}};function Me(n){let e=n??33554432;if(!Number.isSafeInteger(e)||e<=0)throw new RangeError("maxMessageBytes must be a positive safe integer");return e}c(Me,"resolveMaxMessageBytes");var lt=class{static{c(this,"MessageBuffer")}#e=new Uint8Array(0);#t=0;#n;constructor(e){this.#n=Me(e)}get byteLength(){return this.#t}get lastByte(){return this.#e[this.#t-1]}#s(e){if(e>this.#n-this.#t)throw this.clear(),new ve(this.#n)}append(e){this.#s(e.byteLength);let t=this.#t+e.byteLength;if(t>this.#e.byteLength){let i=Math.min(this.#n,Math.max(t,this.#e.byteLength*2,1024)),r=new Uint8Array(i);r.set(this.#e.subarray(0,this.#t)),this.#e=r}this.#e.set(e,this.#t),this.#t=t}take(){let e=this.#e.subarray(0,this.#t);return this.clear(),e}clear(){this.#e=new Uint8Array(0),this.#t=0}};var ui=10,ut=class{static{c(this,"LineBuffer")}#e;#t;constructor(e){this.#t=Me(e),this.#e=new lt(Math.min(Number.MAX_SAFE_INTEGER,this.#t+1))}*push(e){let t=0,i=e.indexOf(ui,t);for(;i!==-1;)yield this.#n(e.subarray(t,i)),t=i+1,i=e.indexOf(ui,t);if(t<e.byteLength){let r=e.subarray(t);this.#s(r),this.#e.append(r)}}flush(){if(this.#e.byteLength!==0)return Ln(this.#e.take())}clear(){this.#e.clear()}#n(e){return this.#s(e),this.#e.byteLength===0?Ln(e):(this.#e.append(e),Ln(this.#e.take()))}#s(e){let t=e.byteLength>0?e[e.byteLength-1]:this.#e.lastByte;if(this.#e.byteLength+e.byteLength-(t===13?1:0)>this.#t)throw this.clear(),new ve(this.#t)}};function Ln(n){return n[n.byteLength-1]===13?n.subarray(0,-1):n}c(Ln,"stripCarriageReturn");function pi(n,e,t={}){let i=Me(t.maxMessageBytes),r=new TextEncoder,u=new TextDecoder,h=!1,p,z=Promise.resolve(),m=c(v=>{let E=JSON.stringify(v)+`
|
|
2
|
+
import{b as xs}from"./chunk-WMBOXX7G.js";import{b as Es,c as Ts}from"./chunk-ZSZXA7WB.js";import"./chunk-4DYWVGVS.js";import"./chunk-4TO743HO.js";import{a as vt,e as bs,g as ys,j as tt,p as Ss}from"./chunk-A77DLBR4.js";import{m as ks}from"./chunk-XQAUHXL4.js";import"./chunk-PSY6IRJE.js";import"./chunk-PKJHN666.js";import"./chunk-Z33RVGP6.js";import"./chunk-7PKDJHT6.js";import"./chunk-65WRWLUD.js";import"./chunk-FKUWCJ73.js";import"./chunk-B66QCXH2.js";import"./chunk-PYNW5OFA.js";import"./chunk-MOXIGLN2.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import"./chunk-UOFDKMRU.js";import"./chunk-AN525SPP.js";import"./chunk-IZ6DLEVY.js";import"./chunk-KOC3YJEU.js";import"./chunk-65FJWWXG.js";import"./chunk-SYUKES6H.js";import"./chunk-EYTTZ5H4.js";import"./chunk-XY7HFXLH.js";import"./chunk-6I5AUTVO.js";import"./chunk-DKOVZ6R2.js";import"./chunk-N5EAVX4G.js";import"./chunk-U7X5ZLAL.js";import"./chunk-7PXZ4X4P.js";import"./chunk-N73MU2C3.js";import"./chunk-SO4GMSNP.js";import"./chunk-NMMHXYDJ.js";import"./chunk-QLGP2OAQ.js";import{h as Is}from"./chunk-WZ35ICTE.js";import"./chunk-VS2LOUCT.js";import"./chunk-DMFUEUAZ.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-GF55VEMR.js";import"./chunk-FAKDGLZQ.js";import"./chunk-KCJVFLBB.js";import"./chunk-GW766ZSO.js";import"./chunk-VJYOKU3C.js";import"./chunk-SSJV3VX7.js";import"./chunk-7KWD2I6W.js";import{a as As,j as At}from"./chunk-RY46UPBO.js";import"./chunk-OFJPOTES.js";import"./chunk-PLROXHG2.js";import"./chunk-YU3C6U5V.js";import"./chunk-PHZZBXDO.js";import"./chunk-KVTBX2UP.js";import"./chunk-U7D6Q744.js";import{I as nt,K as Cs,P as st,a as Rs,c as Ct,g as vs,w as Ce,x as oe}from"./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-4BUM6JEC.js";import"./chunk-UGFSAG4U.js";import"./chunk-SSHE6B7Z.js";import"./chunk-JFXINDOQ.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-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-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{a as _s,c as ws}from"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import{A as G,a as fs,e as s,f as et,g as O,h as F,i as q,k as zs,l as d,m as w,n as a,o as me,p as T,r as ee,s as l,u as f,y as ms,z as gs}from"./chunk-X2J2P5ZT.js";import{a as c,c as ho,e as fo}from"./chunk-FTQLQJQV.js";var Mi=ho(Qn=>{"use strict";var Ai=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Qc=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Ii=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Kc=/\\([\u000b\u0020-\u00ff])/g,Zc=/([\\"])/g,ki=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Qn.format=Xc;Qn.parse=Yc;function Xc(n){if(!n||typeof n!="object")throw new TypeError("argument obj is required");var e=n.parameters,t=n.type;if(!t||!ki.test(t))throw new TypeError("invalid type");var i=t;if(e&&typeof e=="object")for(var r,u=Object.keys(e).sort(),h=0;h<u.length;h++){if(r=u[h],!Ii.test(r))throw new TypeError("invalid parameter name");i+="; "+r+"="+td(e[r])}return i}c(Xc,"format");function Yc(n){if(!n)throw new TypeError("argument string is required");var e=typeof n=="object"?ed(n):n;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var t=e.indexOf(";"),i=t!==-1?e.slice(0,t).trim():e.trim();if(!ki.test(i))throw new TypeError("invalid media type");var r=new nd(i.toLowerCase());if(t!==-1){var u,h,p;for(Ai.lastIndex=t;h=Ai.exec(e);){if(h.index!==t)throw new TypeError("invalid parameter format");t+=h[0].length,u=h[1].toLowerCase(),p=h[2],p.charCodeAt(0)===34&&(p=p.slice(1,-1),p.indexOf("\\")!==-1&&(p=p.replace(Kc,"$1"))),r.parameters[u]=p}if(t!==e.length)throw new TypeError("invalid parameter format")}return r}c(Yc,"parse");function ed(n){var e;if(typeof n.getHeader=="function"?e=n.getHeader("content-type"):typeof n.headers=="object"&&(e=n.headers&&n.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}c(ed,"getcontenttype");function td(n){var e=String(n);if(Ii.test(e))return e;if(e.length>0&&!Qc.test(e))throw new TypeError("invalid parameter value");return'"'+e.replace(Zc,"\\$1")+'"'}c(td,"qstring");function nd(n){this.parameters=Object.create(null),this.type=n}c(nd,"ContentType")});import{Readable as Ld,Writable as Gd}from"node:stream";var _={initialize:"initialize",authenticate:"authenticate",providers_list:"providers/list",providers_set:"providers/set",providers_disable:"providers/disable",session_new:"session/new",session_load:"session/load",session_set_mode:"session/set_mode",session_set_config_option:"session/set_config_option",session_prompt:"session/prompt",session_cancel:"session/cancel",mcp_message:"mcp/message",session_list:"session/list",session_delete:"session/delete",session_fork:"session/fork",session_resume:"session/resume",session_close:"session/close",logout:"logout",nes_start:"nes/start",nes_suggest:"nes/suggest",nes_accept:"nes/accept",nes_reject:"nes/reject",nes_close:"nes/close",document_did_open:"document/didOpen",document_did_change:"document/didChange",document_did_close:"document/didClose",document_did_save:"document/didSave",document_did_focus:"document/didFocus"},I={session_request_permission:"session/request_permission",session_update:"session/update",fs_write_text_file:"fs/write_text_file",fs_read_text_file:"fs/read_text_file",terminal_create:"terminal/create",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit",terminal_kill:"terminal/kill",mcp_message:"mcp/message",elicitation_create:"elicitation/create",elicitation_complete:"elicitation/complete"},It={cancel_request:"$/cancel_request"};var Ms=Symbol("skippedItem");function o(n,e){return n.catch(e)}c(o,"defaultOnError");function V(n,e){let t=n.catch(e);return G.unknown().transform((i,r)=>i!==void 0?t.parse(i):(r.addIssue({code:"custom",message:"Required value is missing"}),G.NEVER))}c(V,"requiredDefaultOnError");function Os(n,e){if(n===null||typeof n!="object"||Array.isArray(n))return;let t=n[e];return typeof t=="string"?t:void 0}c(Os,"stringTag");function ge(n,e,t){return n.superRefine((i,r)=>{let u=Os(i,e);u!==void 0&&t.includes(u)&&r.addIssue({code:"custom",path:[e],message:`${e} ${JSON.stringify(u)} is reserved by a known variant, but the value does not match that variant's schema`})})}c(ge,"excludeKnownTags");function _e(n,e,t){return G.unknown().transform((i,r)=>{let u=n.safeParse(i);if(!u.success){for(let z of u.error.issues)r.addIssue({...z,input:i});return G.NEVER}let h=u.data,p=Os(i,e);if(p!==void 0&&!t.includes(p)){let z=i;for(let[m,g]of Object.entries(z))m!=="__proto__"&&(Object.hasOwn(h,m)||(h[m]=g))}return h})}c(_e,"preserveCustomPayload");function C(n){return G.array(n.catch(Ms)).transform(e=>e.filter(t=>t!==Ms))}c(C,"vecSkipError");var te=T([O(),s()]).nullable(),A=s(),Mt=a({sessionId:A,path:s(),content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Ot=a({sessionId:A,path:s(),line:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),limit:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Nt=s(),js=T([f("read"),f("edit"),f("delete"),f("move"),f("search"),f("execute"),f("think"),f("fetch"),f("switch_mode"),f("other")]),qs=T([f("pending"),f("in_progress"),f("completed"),f("failed")]),mo=T([f("assistant"),f("user")]),Ae=a({audience:o(C(mo).nullish(),()=>{}),lastModified:o(s().nullish(),()=>{}),priority:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),go=a({annotations:o(Ae.nullish(),()=>{}),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),_o=a({annotations:o(Ae.nullish(),()=>{}),data:s(),mimeType:s(),uri:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),wo=a({annotations:o(Ae.nullish(),()=>{}),data:s(),mimeType:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),bo=a({annotations:o(Ae.nullish(),()=>{}),description:o(s().nullish(),()=>{}),mimeType:o(s().nullish(),()=>{}),name:s(),size:o(O().nullish(),()=>{}),title:o(s().nullish(),()=>{}),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),yo=a({mimeType:o(s().nullish(),()=>{}),text:s(),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),So=a({blob:s(),mimeType:o(s().nullish(),()=>{}),uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),xo=T([yo,So]),Eo=a({annotations:o(Ae.nullish(),()=>{}),resource:xo,_meta:o(l(s(),d()).nullish(),()=>{})}),re=T([go.and(a({type:f("text")})),_o.and(a({type:f("image")})),wo.and(a({type:f("audio")})),bo.and(a({type:f("resource_link")})),Eo.and(a({type:f("resource")}))]),To=a({content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),Ro=a({path:s(),oldText:o(s().nullish(),()=>{}),newText:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),we=s(),vo=a({terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ps=T([To.and(a({type:f("content")})),Ro.and(a({type:f("diff")})),vo.and(a({type:f("terminal")}))]),Ds=a({path:s(),line:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Hs=a({toolCallId:Nt,kind:o(js.nullish(),()=>{}),status:o(qs.nullish(),()=>{}),title:o(s().nullish(),()=>{}),name:o(s().nullish(),()=>{}),content:o(C(Ps).nullish(),()=>{}),locations:o(C(Ds).nullish(),()=>{}),rawInput:o(d().optional(),()=>{}),rawOutput:o(d().optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Us=s(),Co=T([f("allow_once"),f("allow_always"),f("reject_once"),f("reject_always")]),Ao=a({optionId:Us,name:s(),kind:Co,_meta:o(l(s(),d()).nullish(),()=>{})}),jt=a({sessionId:A,toolCall:Hs,options:w(Ao),_meta:o(l(s(),d()).nullish(),()=>{})}),Ls=a({name:s(),value:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),qt=a({sessionId:A,command:s(),args:o(C(s()).optional(),()=>[]),env:o(C(Ls).optional(),()=>[]),cwd:o(s().nullish(),()=>{}),outputByteLimit:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Pt=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Dt=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ht=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ut=a({sessionId:A,terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),Ie=a({sessionId:A,toolCallId:o(Nt.nullish(),()=>{})}),ke=a({requestId:te}),Io=f("object"),ko=T([f("email"),f("uri"),f("date"),f("date-time")]),Gs=a({const:s(),title:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Lt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minLength:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),maxLength:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),pattern:s().nullish(),format:ko.nullish(),default:o(s().nullish(),()=>{}),enum:w(s()).nullish(),oneOf:w(Gs).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Gt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minimum:O().nullish(),maximum:O().nullish(),default:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$t=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minimum:O().nullish(),maximum:O().nullish(),default:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ft=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),default:o(q().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Wt=a({enum:w(s()),_meta:o(l(s(),d()).nullish(),()=>{})}),$s=a({anyOf:w(Gs),_meta:o(l(s(),d()).nullish(),()=>{})}),Mo=_e(T([Wt.and(a({type:f("string")})),ge(a({type:s()}),"type",["string"]),$s]),"type",["string"]),Bt=a({title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),minItems:O().nullish(),maxItems:O().nullish(),items:Mo,default:o(C(s()).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Oo=_e(T([Lt.and(a({type:f("string")})),Gt.and(a({type:f("number")})),$t.and(a({type:f("integer")})),Ft.and(a({type:f("boolean")})),Bt.and(a({type:f("array")})),ge(a({type:s()}),"type",["array","boolean","integer","number","string"])]),"type",["array","boolean","integer","number","string"]),No=a({type:o(Io.optional().default("object"),()=>"object"),title:o(s().nullish(),()=>{}),properties:l(s(),Oo).optional().default({}),required:w(s()).nullish(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Vt=ee(T([Ie,ke]),a({requestedSchema:No})),Fs=s(),Jt=ee(T([Ie,ke]),a({elicitationId:Fs,url:et()})),Qt=_e(ee(T([Vt.and(a({mode:f("form")})),Jt.and(a({mode:f("url")})),ge(ee(T([Ie,ke]),a({mode:s()})),"mode",["form","url"])]),a({message:s(),_meta:o(l(s(),d()).nullish(),()=>{})})),"mode",["form","url"]),Kt=s(),Ws=s(),jo=a({serverId:Kt,requestId:Ws,method:s(),params:l(s(),d()).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Bs=d(),Qd=a({id:te,method:s(),params:T([Mt,Ot,jt,qt,Pt,Dt,Ht,Ut,Qt,jo,Bs]).nullish()}),Vs=F().gte(0).lte(65535),qo=a({image:o(q().optional().default(!1),()=>!1),audio:o(q().optional().default(!1),()=>!1),embeddedContext:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Po=a({http:o(q().optional().default(!1),()=>!1),sse:o(q().optional().default(!1),()=>!1),acp:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Do=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ho=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Uo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Lo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Go=a({_meta:o(l(s(),d()).nullish(),()=>{})}),$o=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Fo=a({list:o(Do.nullish(),()=>{}),delete:o(Ho.nullish(),()=>{}),additionalDirectories:o(Uo.nullish(),()=>{}),fork:o(Lo.nullish(),()=>{}),resume:o(Go.nullish(),()=>{}),close:o($o.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Wo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Bo=a({logout:o(Wo.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Vo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Jo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Qo=T([f("full"),f("incremental")]),Ko=a({syncKind:Qo,_meta:o(l(s(),d()).nullish(),()=>{})}),Zo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Xo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Yo=a({_meta:o(l(s(),d()).nullish(),()=>{})}),er=a({didOpen:o(Jo.nullish(),()=>{}),didChange:o(Ko.nullish(),()=>{}),didClose:o(Zo.nullish(),()=>{}),didSave:o(Xo.nullish(),()=>{}),didFocus:o(Yo.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),tr=a({document:o(er.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),nr=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),sr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ir=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),or=a({maxCount:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),rr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ar=a({_meta:o(l(s(),d()).nullish(),()=>{})}),cr=a({recentFiles:o(nr.nullish(),()=>{}),relatedSnippets:o(sr.nullish(),()=>{}),editHistory:o(ir.nullish(),()=>{}),userActions:o(or.nullish(),()=>{}),openFiles:o(rr.nullish(),()=>{}),diagnostics:o(ar.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),dr=a({events:o(tr.nullish(),()=>{}),context:o(cr.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Js=T([f("utf-16"),f("utf-32"),f("utf-8")]),lr=a({loadSession:o(q().optional().default(!1),()=>!1),promptCapabilities:o(qo.optional().default({image:!1,audio:!1,embeddedContext:!1}),()=>({image:!1,audio:!1,embeddedContext:!1})),mcpCapabilities:o(Po.optional().default({http:!1,sse:!1,acp:!1}),()=>({http:!1,sse:!1,acp:!1})),sessionCapabilities:o(Fo.optional().default({}),()=>({})),auth:o(Bo.optional().default({}),()=>({})),providers:o(Vo.nullish(),()=>{}),nes:o(dr.nullish(),()=>{}),positionEncoding:o(Js.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Zt=s(),ur=a({id:Zt,name:s(),description:o(s().nullish(),()=>{}),args:o(C(s()).optional(),()=>[]),env:o(l(s(),s()).optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),pr=a({id:Zt,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),hr=T([ur.and(a({type:f("terminal")})),pr]),Qs=a({name:s(),title:o(s().nullish(),()=>{}),version:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),fr=a({protocolVersion:Vs,agentCapabilities:o(lr.optional().default({loadSession:!1,promptCapabilities:{image:!1,audio:!1,embeddedContext:!1},mcpCapabilities:{http:!1,sse:!1,acp:!1},sessionCapabilities:{},auth:{}}),()=>({loadSession:!1,promptCapabilities:{image:!1,audio:!1,embeddedContext:!1},mcpCapabilities:{http:!1,sse:!1,acp:!1},sessionCapabilities:{},auth:{}})),authMethods:o(C(hr).optional().default([]),()=>[]),agentInfo:o(Qs.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),zr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Xt=s(),Yt=T([f("anthropic"),f("openai"),f("azure"),f("vertex"),f("bedrock"),s()]),mr=a({apiType:Yt,baseUrl:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),gr=a({providerId:Xt,supported:V(C(Yt),()=>[]),required:q(),current:mr.nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),_r=a({providers:w(gr),_meta:o(l(s(),d()).nullish(),()=>{})}),wr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),br=a({_meta:o(l(s(),d()).nullish(),()=>{})}),yr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),it=s(),Sr=a({id:it,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ot=a({currentModeId:it,availableModes:V(C(Sr),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Ks=s(),xr=T([f("mode"),f("model"),f("model_config"),f("thought_level"),s()]),en=s(),Zs=a({value:en,name:s(),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Er=s(),Tr=a({group:Er,name:s(),options:V(C(Zs),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Rr=T([w(Zs),w(Tr)]),vr=a({currentValue:en,options:Rr}),Cr=a({currentValue:q()}),be=ee(T([vr.and(a({type:f("select")})),Cr.and(a({type:f("boolean")}))]),a({id:Ks,name:s(),description:o(s().nullish(),()=>{}),category:o(xr.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})})),Ar=a({sessionId:A,modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ir=a({modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),kr=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),title:o(s().nullish(),()=>{}),updatedAt:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Mr=a({sessions:V(C(kr),()=>[]),nextCursor:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Or=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Nr=a({sessionId:A,modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),jr=a({modes:o(ot.nullish(),()=>{}),configOptions:o(C(be).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),qr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Pr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Dr=a({configOptions:V(C(be),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),Xs=T([f("end_turn"),f("max_tokens"),f("max_turn_requests"),f("refusal"),f("cancelled")]),Ys=a({totalTokens:O(),inputTokens:O(),outputTokens:O(),thoughtTokens:o(O().nullish(),()=>{}),cachedReadTokens:o(O().nullish(),()=>{}),cachedWriteTokens:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Hr=a({stopReason:Xs,usage:o(Ys.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ur=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),ye=s(),ne=a({line:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),character:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),_meta:o(l(s(),d()).nullish(),()=>{})}),Se=a({start:ne,end:ne,_meta:o(l(s(),d()).nullish(),()=>{})}),Lr=a({range:Se,newText:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Gr=a({id:ye,uri:s(),edits:w(Lr),cursorPosition:o(ne.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$r=a({id:ye,uri:s(),position:ne,_meta:o(l(s(),d()).nullish(),()=>{})}),Fr=a({id:ye,uri:s(),position:ne,newName:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Wr=a({id:ye,uri:s(),search:s(),replace:s(),isRegex:q().nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Br=T([Gr.and(a({kind:f("edit")})),$r.and(a({kind:f("jump")})),Fr.and(a({kind:f("rename")})),Wr.and(a({kind:f("searchAndReplace")}))]),Vr=a({suggestions:w(Br),_meta:o(l(s(),d()).nullish(),()=>{})}),Jr=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ei=d(),Qr=T([f(-32700),f(-32600),f(-32601),f(-32602),f(-32603),f(-32800),f(-32e3),f(-32002),F().min(-2147483648,{error:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{error:"Invalid value: Expected int32 to be <= 2147483647"})]),ti=a({code:Qr,message:s(),data:o(d().optional(),()=>{})}),Kd=T([a({id:te,result:T([fr,zr,_r,wr,br,yr,Ar,Ir,Mr,Or,Nr,jr,qr,Pr,Dr,Hr,Ur,Vr,Jr,ei])}),a({id:te,error:ti})]),tn=s(),kt=a({content:re,messageId:o(tn.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Kr=a({toolCallId:Nt,title:s(),name:o(s().nullish(),()=>{}),kind:o(js.optional(),()=>{}),status:o(qs.optional(),()=>{}),content:o(C(Ps).optional(),()=>[]),locations:o(C(Ds).optional(),()=>[]),rawInput:o(d().optional(),()=>{}),rawOutput:o(d().optional(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Zr=T([f("high"),f("medium"),f("low")]),Xr=T([f("pending"),f("in_progress"),f("completed")]),ni=a({content:s(),priority:Zr,status:Xr,_meta:o(l(s(),d()).nullish(),()=>{})}),Yr=a({entries:V(C(ni),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),rt=s(),ea=a({planId:rt,entries:V(C(ni),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),ta=a({planId:rt,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),na=a({planId:rt,content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),sa=T([ea.and(a({type:f("items")})),ta.and(a({type:f("file")})),na.and(a({type:f("markdown")}))]),ia=a({plan:sa,_meta:o(l(s(),d()).nullish(),()=>{})}),oa=a({planId:rt,_meta:o(l(s(),d()).nullish(),()=>{})}),ra=a({hint:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),aa=ra,ca=a({name:s(),description:s(),input:o(aa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),da=a({availableCommands:V(C(ca),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),la=a({currentModeId:it,_meta:o(l(s(),d()).nullish(),()=>{})}),ua=a({configOptions:V(C(be),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),pa=a({title:o(s().nullish(),()=>{}),updatedAt:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ha=a({amount:O(),currency:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),fa=a({used:O(),size:O(),cost:o(ha.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),za=T([f("info"),f("warning"),f("error"),s()]),ma=a({severity:za,title:s().min(1),description:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),si=s(),ga=T([f("in_progress"),f("completed"),f("failed"),f("cancelled"),s()]),_a=a({compactionId:si,status:ga,summary:o(C(re).nullish(),()=>{}),error:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),wa=a({compactionId:si,content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),ba=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ya=a({cancel:o(ba.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),nn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),sn=a({stopReason:o(Xs.nullish(),()=>{}),usage:o(Ys.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),on=a({_meta:o(l(s(),d()).nullish(),()=>{})}),rn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Sa=_e(T([nn.and(a({state:f("running")})),sn.and(a({state:f("idle")})),on.and(a({state:f("requires_action")})),rn.and(a({state:f("unknown")})),ge(a({state:s()}),"state",["idle","requires_action","running","unknown"])]),"state",["idle","requires_action","running","unknown"]),xa=a({sessionId:A,title:o(s().nullish(),()=>{}),description:o(s().nullish(),()=>{}),capabilities:o(ya.nullish(),()=>{}),state:o(Sa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ea=a({messageId:tn,senderSessionId:o(A.nullish(),()=>{}),recipientSessionId:o(A.nullish(),()=>{}),content:o(C(re).nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ta=a({messageId:tn,senderSessionId:o(A.nullish(),()=>{}),recipientSessionId:o(A.nullish(),()=>{}),content:re,_meta:o(l(s(),d()).nullish(),()=>{})}),Ra=T([kt.and(a({sessionUpdate:f("user_message_chunk")})),kt.and(a({sessionUpdate:f("agent_message_chunk")})),kt.and(a({sessionUpdate:f("agent_thought_chunk")})),Kr.and(a({sessionUpdate:f("tool_call")})),Hs.and(a({sessionUpdate:f("tool_call_update")})),Yr.and(a({sessionUpdate:f("plan")})),ia.and(a({sessionUpdate:f("plan_update")})),oa.and(a({sessionUpdate:f("plan_removed")})),da.and(a({sessionUpdate:f("available_commands_update")})),la.and(a({sessionUpdate:f("current_mode_update")})),ua.and(a({sessionUpdate:f("config_option_update")})),pa.and(a({sessionUpdate:f("session_info_update")})),fa.and(a({sessionUpdate:f("usage_update")})),ma.and(a({sessionUpdate:f("notice")})),_a.and(a({sessionUpdate:f("compaction_update")})),wa.and(a({sessionUpdate:f("compaction_summary_chunk")})),xa.and(a({sessionUpdate:f("subagent_update")})),Ea.and(a({sessionUpdate:f("session_message")})),Ta.and(a({sessionUpdate:f("session_message_chunk")}))]),at=a({sessionId:A,update:Ra,_meta:o(l(s(),d()).nullish(),()=>{})}),an=a({elicitationId:Fs,_meta:o(l(s(),d()).nullish(),()=>{})}),ii=d(),Zd=a({method:s(),params:T([at,an,ii]).nullish()}),va=a({readTextFile:o(q().optional().default(!1),()=>!1),writeTextFile:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),Ca=l(s(),d()),Aa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ia=a({boolean:o(Aa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),ka=l(s(),d()),Ma=a({compaction:o(Ca.nullish(),()=>{}),configOptions:o(Ia.nullish(),()=>{}),notices:o(ka.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Oa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Na=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ja=a({terminal:o(q().optional().default(!1),()=>!1),_meta:o(l(s(),d()).nullish(),()=>{})}),qa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Pa=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Da=a({form:o(qa.nullish(),()=>{}),url:o(Pa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ha=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ua=a({_meta:o(l(s(),d()).nullish(),()=>{})}),La=a({_meta:o(l(s(),d()).nullish(),()=>{})}),Ga=a({jump:o(Ha.nullish(),()=>{}),rename:o(Ua.nullish(),()=>{}),searchAndReplace:o(La.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),$a=a({fs:o(va.optional().default({readTextFile:!1,writeTextFile:!1}),()=>({readTextFile:!1,writeTextFile:!1})),terminal:o(q().optional().default(!1),()=>!1),session:o(Ma.nullish(),()=>{}),subagents:o(Oa.nullish(),()=>{}),plan:o(Na.nullish(),()=>{}),auth:o(ja.optional().default({terminal:!1}),()=>({terminal:!1})),elicitation:o(Da.nullish(),()=>{}),nes:o(Ga.nullish(),()=>{}),positionEncodings:o(C(Js).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),cn=a({protocolVersion:Vs,clientCapabilities:o($a.optional().default({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,auth:{terminal:!1}}),()=>({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,auth:{terminal:!1}})),clientInfo:o(Qs.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),dn=a({methodId:Zt,_meta:o(l(s(),d()).nullish(),()=>{})}),ln=a({_meta:o(l(s(),d()).nullish(),()=>{})}),un=a({providerId:Xt,apiType:Yt,baseUrl:s(),headers:l(s(),s()).optional(),_meta:o(l(s(),d()).nullish(),()=>{})}),pn=a({providerId:Xt,_meta:o(l(s(),d()).nullish(),()=>{})}),hn=a({_meta:o(l(s(),d()).nullish(),()=>{})}),oi=a({name:s(),value:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Fa=a({name:s(),url:s(),headers:w(oi),_meta:o(l(s(),d()).nullish(),()=>{})}),Wa=a({name:s(),url:s(),headers:w(oi),_meta:o(l(s(),d()).nullish(),()=>{})}),Ba=a({name:s(),serverId:Kt,_meta:o(l(s(),d()).nullish(),()=>{})}),Va=a({name:s(),command:s(),args:w(s()),env:w(Ls),_meta:o(l(s(),d()).nullish(),()=>{})}),ct=T([Fa.and(a({type:f("http")})),Wa.and(a({type:f("sse")})),Ba.and(a({type:f("acp")})),Va]),fn=a({cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:V(C(ct),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),zn=a({mcpServers:V(C(ct),()=>[]),cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),mn=a({cwd:s().nullish(),cursor:s().nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),gn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),_n=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:o(C(ct).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),wn=a({sessionId:A,cwd:s(),additionalDirectories:o(C(s()).optional(),()=>[]),mcpServers:o(C(ct).optional(),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),bn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),yn=a({sessionId:A,modeId:it,_meta:o(l(s(),d()).nullish(),()=>{})}),Sn=ee(T([a({value:q(),type:f("boolean")}),a({value:en})]),a({sessionId:A,configId:Ks,_meta:o(l(s(),d()).nullish(),()=>{})})),xn=a({sessionId:A,prompt:w(re),_meta:o(l(s(),d()).nullish(),()=>{})}),Ja=a({uri:s(),name:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Qa=a({name:s(),owner:s(),remoteUrl:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),En=a({workspaceUri:o(s().nullish(),()=>{}),workspaceFolders:w(Ja).nullish(),repository:o(Qa.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),Ka=T([f("automatic"),f("diagnostic"),f("manual")]),Za=a({uri:s(),languageId:s(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Xa=a({startLine:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),endLine:F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Ya=a({uri:s(),excerpts:w(Xa),_meta:o(l(s(),d()).nullish(),()=>{})}),ec=a({uri:s(),diff:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),tc=a({action:s(),uri:s(),position:ne,timestampMs:O(),_meta:o(l(s(),d()).nullish(),()=>{})}),nc=a({uri:s(),languageId:s(),visibleRange:o(Se.nullish(),()=>{}),lastFocusedMs:o(O().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),sc=T([f("error"),f("warning"),f("information"),f("hint")]),ic=a({uri:s(),range:Se,severity:sc,message:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),oc=a({recentFiles:w(Za).nullish(),relatedSnippets:w(Ya).nullish(),editHistory:w(ec).nullish(),userActions:w(tc).nullish(),openFiles:w(nc).nullish(),diagnostics:w(ic).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Tn=a({sessionId:A,uri:s(),version:O(),position:ne,selection:Se.nullish(),triggerKind:Ka,context:oc.nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),Rn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),Xd=a({id:te,method:s(),params:T([cn,dn,ln,un,pn,hn,fn,zn,mn,gn,_n,wn,bn,yn,Sn,xn,En,Tn,Rn,Bs]).nullish()}),rc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),ac=a({content:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),cc=a({optionId:Us,_meta:o(l(s(),d()).nullish(),()=>{})}),dc=T([a({outcome:f("cancelled")}),cc.and(a({outcome:f("selected")}))]),lc=a({outcome:dc,_meta:o(l(s(),d()).nullish(),()=>{})}),uc=a({terminalId:we,_meta:o(l(s(),d()).nullish(),()=>{})}),pc=a({exitCode:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),signal:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),hc=a({output:s(),truncated:q(),exitStatus:o(pc.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),fc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),zc=a({exitCode:o(F().gte(0).max(4294967295,{error:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),()=>{}),signal:o(s().nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),mc=a({_meta:o(l(s(),d()).nullish(),()=>{})}),gc=T([s(),O(),O(),q(),w(s())]),vn=a({content:l(s(),gc).nullish()}),_c=_e(ee(T([vn.and(a({action:f("accept")})),a({action:f("decline")}),a({action:f("cancel")}),ge(a({action:s()}),"action",["accept","cancel","decline"])]),a({_meta:o(l(s(),d()).nullish(),()=>{})})),"action",["accept","cancel","decline"]),wc=me({code:F().min(-2147483648,{error:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{error:"Invalid value: Expected int32 to be <= 2147483647"}),message:s(),data:d().optional()}),bc=T([a({result:d(),_meta:o(l(s(),d()).nullish(),()=>{})}),a({error:wc,_meta:o(l(s(),d()).nullish(),()=>{})})]),Yd=T([a({id:te,result:T([rc,ac,lc,uc,hc,fc,zc,mc,_c,bc,ei])}),a({id:te,error:ti})]),Cn=a({sessionId:A,_meta:o(l(s(),d()).nullish(),()=>{})}),An=a({sessionId:A,uri:s(),languageId:s(),version:O(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),yc=a({range:Se.nullish(),text:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),In=a({sessionId:A,uri:s(),version:O(),contentChanges:V(C(yc),()=>[]),_meta:o(l(s(),d()).nullish(),()=>{})}),kn=a({sessionId:A,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),Mn=a({sessionId:A,uri:s(),_meta:o(l(s(),d()).nullish(),()=>{})}),On=a({sessionId:A,uri:s(),version:O(),position:ne,visibleRange:Se,_meta:o(l(s(),d()).nullish(),()=>{})}),Nn=a({sessionId:A,id:ye,_meta:o(l(s(),d()).nullish(),()=>{})}),Sc=T([f("rejected"),f("ignored"),f("replaced"),f("cancelled")]),jn=a({sessionId:A,id:ye,reason:o(Sc.nullish(),()=>{}),_meta:o(l(s(),d()).nullish(),()=>{})}),xc=a({serverId:Kt,requestId:Ws,method:s(),params:l(s(),d()).nullish(),_meta:o(l(s(),d()).nullish(),()=>{})}),el=a({method:s(),params:T([Cn,An,In,kn,Mn,On,Nn,jn,xc,ii]).nullish()}),tl=a({requestId:te,_meta:o(l(s(),d()).nullish(),()=>{})});var ai="$/cancel_request";function dt(n){return Hn(n)&&"id"in n&&typeof n.method=="string"&&Un(n.id)}c(dt,"isRequestMessage");function di(n){if(!Hn(n)||"method"in n||!("id"in n)||!Un(n.id))return!1;let e=Object.hasOwn(n,"result"),t=Object.hasOwn(n,"error");return e===t?!1:!t||Rc(n.error)}c(di,"isResponseMessage");function xe(n){return Hn(n)&&!("id"in n)&&typeof n.method=="string"}c(xe,"isNotificationMessage");function se(n){return typeof n=="object"&&n!==null}c(se,"isRecord");function Hn(n){return se(n)&&n.jsonrpc==="2.0"}c(Hn,"isJsonRpcEnvelope");function Un(n){return n===null||typeof n=="string"||typeof n=="number"&&Number.isFinite(n)}c(Un,"isJsonRpcId");function ci(n){return se(n)&&!("method"in n)&&("id"in n||"result"in n||"error"in n)}c(ci,"isResponseShapedMessage");function Ec(n){let e=!1,t=!1,i=!1,r=!1;for(let u of n)e||=dt(u)||xe(u),t||=di(u),se(u)&&(i||="method"in u,r||="result"in u||"error"in u);return e?!1:t?!0:r&&!i}c(Ec,"isResponseBatch");function Tc(n){if(!(!se(n)||!Un(n.requestId)))return n.requestId}c(Tc,"cancelRequestId");function Rc(n){return se(n)&&typeof n.code=="number"&&Number.isInteger(n.code)&&typeof n.message=="string"}c(Rc,"isErrorResponse");var Z={yes(){return{handled:!0}},no(n,e=!1){return{handled:!1,message:n,retry:e}}};function ae(n){let e=Promise.reject(n);return e.catch(()=>{}),e}c(ae,"rejectedPromise");function vc(n){if(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")return n.message}c(vc,"errorDetails");function Cc(n){return typeof n=="object"&&n!==null&&"name"in n&&n.name==="ZodError"&&"issues"in n&&Array.isArray(n.issues)&&"format"in n&&typeof n.format=="function"}c(Cc,"isZodError");function li(n){if(n instanceof S)return n.toResult();if(Cc(n))return S.invalidParams(n.format()).toResult();let e=vc(n);try{return S.internalError(e?JSON.parse(e):{}).toResult()}catch{return S.internalError({details:e}).toResult()}}c(li,"errorToResult");function Ac(n){return n instanceof S&&n.code===-32800?n:S.requestCancelled(n)}c(Ac,"requestCancelledError");function Ic(n,e){let t=kc(n,e);return t?t.toResult():li(n)}c(Ic,"errorToRequestResult");function kc(n,e){if(!(!e.aborted||!Mc(n)))return Ac(e.reason)}c(kc,"abortErrorToRequestCancelled");function Mc(n){if(typeof n!="object"||n===null)return!1;let e=n;return e.name==="AbortError"||e.code==="ABORT_ERR"}c(Mc,"isAbortError");var qn=class{static{c(this,"RequestResponder")}id;sendResult;signal;finishRequest;didRespond=!1;constructor(e,t,i=new AbortController().signal,r){this.id=e,this.sendResult=t,this.signal=i,this.finishRequest=r}get responded(){return this.didRespond}respond(e){return this.respondWithResult({result:e??null})}respondWithError(e){let t=e instanceof S?e.toErrorResponse():e;return this.respondWithResult({error:t})}respondWithResult(e){return this.didRespond?ae(new Error("JSON-RPC request already responded")):(this.didRespond=!0,this.sendResult(e).finally(()=>{this.finishRequest?.()}))}},Oc=new WeakMap;var Te=class{static{c(this,"HandlerRegistration")}disposeHandler;active=!0;constructor(e){this.disposeHandler=e}dispose(){this.active&&(this.active=!1,this.disposeHandler())}[Symbol.dispose](){this.dispose()}runIndefinitely(){return this}},Pn=class{static{c(this,"ConnectionContext")}connection;constructor(e){this.connection=e}sendRequest(e,t,i,r){return this.connection.sendRequest(e,t,i,r)}sendNotification(e,t){return this.connection.sendNotification(e,t)}sendBatch(e){return this.connection.sendBatch(e)}sendCancelRequest(e){return this.connection.sendCancelRequest(e)}addDynamicHandler(e){return this.connection.addDynamicHandler(e)}get signal(){return this.connection.signal}get closed(){return this.connection.closed}},Re=class{static{c(this,"Connection")}pendingResponses=new Map;incomingRequests=new Map;nextRequestId=0;staticHandlers=[];dynamicHandlers=new Set;stream;writeQueue=Promise.resolve();abortController=new AbortController;closedPromise;retryQueue=[];context=new Pn(this);receiveReader;allowBatches=!0;constructor(e,t,i,r){if(typeof e=="function"){let z=e,m=t,g=i;this.initialize(g,[...r?.handlers??[],this.legacyHandler(z,m)],r);return}let u=e,h=t,p=i;this.initialize(u,[...p?.handlers??[],...h],p)}static builder(){return new Dn}runUntil(e){let t=!1,i=Promise.resolve().then(()=>e(this.context)).finally(()=>{t=!0}),r=this.closed.then(()=>{if(t)return new Promise(()=>{});throw this.closedReason()});return Promise.race([i,r]).finally(()=>{t=!0,this.close()})}addDynamicHandler(e){if(this.dynamicHandlers.add(e),this.retryQueue.length>0)for(let t of this.retryQueue.splice(0))this.processIncomingMessage(t).catch(i=>this.close(i));return new Te(()=>{this.dynamicHandlers.delete(e)})}get signal(){return this.abortController.signal}get closed(){return this.closedPromise}getContext(){return this.context}sendRequest(e,t,i,r={}){if(this.abortController.signal.aborted)return ae(this.closedReason());let u=this.prepareRequest(e,t,i,r);return this.sendWireMessage(u.message).catch(()=>{}),r.cancellationSignal?.aborted&&u.cancel(),u.response}sendBatch(e){if(this.abortController.signal.aborted)return ae(this.closedReason());if(!this.allowBatches)return ae(new TypeError("JSON-RPC batches are not supported on this connection"));if(e.length===0)return ae(new TypeError("JSON-RPC batch must contain at least one entry"));let t=[],i=[],r=[];for(let z of e){if(z.kind==="notification"){t.push({jsonrpc:"2.0",method:z.method,params:z.params}),r.push(Promise.resolve(void 0));continue}let m=this.prepareRequest(z.method,z.params,z.mapResponse,z.options);t.push(m.message),r.push(m.response),i.push({signal:z.options?.cancellationSignal,cancel:m.cancel})}let u=t,h=this.sendWireMessage(u);for(let z of i)z.signal?.aborted&&z.cancel();let p=Promise.all([h,...r]).then(([,...z])=>z);return p.catch(()=>{}),p}sendCancelRequest(e){return this.sendNotification(ai,{requestId:e})}sendNotification(e,t){return this.abortController.signal.aborted?ae(this.closedReason()):this.sendWireMessage({jsonrpc:"2.0",method:e,params:t})}prepareRequest(e,t,i,r={}){let u=this.nextRequestId++,h=c(()=>{},"cancel"),p=new Promise((z,m)=>{let g={resolve:c(x=>{try{z(i?i(x):x)}catch(v){m(v)}},"resolve"),reject:m};h=c(()=>{g.cancellationSent||(g.cancellationSent=!0,g.cleanup?.(),this.sendCancelRequest(u).catch(()=>{}))},"cancel"),r.cancellationSignal?.addEventListener("abort",h,{once:!0}),g.cleanup=()=>{r.cancellationSignal?.removeEventListener("abort",h)},this.pendingResponses.set(u,g)});return p.catch(()=>{}),{message:{jsonrpc:"2.0",id:u,method:e,params:t},response:p,cancel:c(()=>h(),"cancel")}}close(e){if(this.abortController.signal.aborted)return;let t=e??new Error("ACP connection closed");this.abortController.abort(t);for(let i of this.pendingResponses.values())i.cleanup?.(),i.reject(t);this.pendingResponses.clear();for(let i of this.incomingRequests.values())i.abort(t);this.incomingRequests.clear(),this.receiveReader?.cancel(t).catch(()=>{})}initialize(e,t,i){this.stream=e,this.staticHandlers=t,this.allowBatches=i?.allowBatches??!0,this.closedPromise=new Promise(r=>{this.abortController.signal.addEventListener("abort",()=>r())}),this.receive()}legacyHandler(e,t){return{handleMessage:c(async(i,r)=>{if(i.kind==="request"){let u=await e(i.method,i.params,r);await i.responder.respond(u)}else await t(i.method,i.params,r);return Z.yes()},"handleMessage")}}async receive(){let e;try{let t=this.stream.readable.getReader();this.receiveReader=t;try{for(;!this.abortController.signal.aborted;){let{value:i,done:r}=await t.read();if(this.abortController.signal.aborted||r)break;this.receiveWireMessage(i)}}finally{this.receiveReader===t&&(this.receiveReader=void 0),t.releaseLock()}}catch(t){e=t}finally{this.close(e)}}receiveWireMessage(e){if(Array.isArray(e)){if(!this.allowBatches){this.close(new TypeError("JSON-RPC batches are not supported on this connection"));return}this.receiveBatch(e);return}if(!dt(e)&&!xe(e)&&!ci(e)){this.sendWireMessage(Ee(S.invalidRequest(e))).catch(()=>{});return}this.receiveMessage(e)}receiveBatch(e){if(e.length===0){this.sendWireMessage(Ee(S.invalidRequest(e))).catch(()=>{});return}let t=Ec(e),r=t?0:e.reduce((g,x)=>g+(xe(x)?0:1),0),u=e.reduce((g,x)=>g+(xe(x)?1:0),0),h=!1,p=[],z=c(async()=>{h||r!==0||u!==0||p.length===0||(h=!0,await this.sendWireMessage(p))},"sendResponsesIfReady"),m=c(async g=>{p.push(g),r-=1,await z()},"collectResponse");for(let g of e){if(t){ci(g)&&this.receiveMessage(g);continue}if(!dt(g)&&!xe(g)){m(Ee(S.invalidRequest(g))).catch(()=>{});continue}let x=this.receiveMessage(g,dt(g)?m:void 0,e.length);xe(g)&&x.finally(()=>{u-=1,z().catch(v=>this.close(v))})}}receiveMessage(e,t,i){return this.abortController.signal.aborted?Promise.resolve():se(e)?"method"in e?("id"in e||this.handleProtocolNotification(e),this.processIncomingMessage(this.toIncomingMessage(e,t,i)).catch(r=>this.close(r))):("id"in e?this.handleResponse(e):console.error("Invalid message",{message:e}),Promise.resolve()):(console.error("Invalid message",{message:e}),Promise.resolve())}async processIncomingMessage(e){if(this.abortController.signal.aborted)return;let t=e,i=!1;try{for(let r of[...this.staticHandlers,...this.dynamicHandlers.values()]){if(this.abortController.signal.aborted)return;let u=await r.handleMessage(t,this.context)??{handled:!0};if(u.handled)return;t=u.message??t,i=i||!!u.retry}i?this.retryQueue.push(t):t.kind==="request"&&await t.responder.respondWithError(S.methodNotFound(t.method))}catch(r){if(this.abortController.signal.aborted)return;if(t.kind==="request"&&!t.responder.responded)await t.responder.respondWithResult(Ic(r,t.responder.signal));else{let u=li(r);"error"in u&&console.error("Error handling notification",e.raw,u.error)}}}toIncomingMessage(e,t,i){if("id"in e){let r=new AbortController;this.incomingRequests.set(e.id,r);let u=c(()=>{this.incomingRequests.get(e.id)===r&&this.incomingRequests.delete(e.id)},"finishRequest"),h=new qn(e.id,p=>{let z={jsonrpc:"2.0",id:e.id,...p};return t?t(z):this.sendWireMessage(z)},r.signal,u);return i!==void 0&&Oc.set(h,i),{kind:"request",method:e.method,params:e.params,raw:e,signal:r.signal,responder:h}}return{kind:"notification",method:e.method,params:e.params,raw:e}}handleResponse(e){let t=this.pendingResponses.get(e.id);if(t)if(this.pendingResponses.delete(e.id),t.cleanup?.(),!di(e))t.reject(S.invalidRequest(e));else if("result"in e)t.resolve(e.result);else{let{code:i,message:r,data:u}=e.error;t.reject(new S(i,r,u))}else console.error("Got response to unknown request",e.id)}handleProtocolNotification(e){if(e.method!==ai)return;let t=Tc(e.params);if(t===void 0)return;let i=this.incomingRequests.get(t);!i||i.signal.aborted||i.abort(S.requestCancelled({requestId:t}))}closedReason(){return this.abortController.signal.reason??new Error("ACP connection closed")}async sendWireMessage(e){return this.abortController.signal.aborted?ae(this.closedReason()):(this.writeQueue=this.writeQueue.then(async()=>{if(this.abortController.signal.aborted)throw this.closedReason();let t=this.stream.writable.getWriter();try{await t.write(e)}finally{t.releaseLock()}}).catch(t=>{throw this.close(t),t}),this.writeQueue)}},Dn=class{static{c(this,"ConnectionBuilder")}handlers=[];connectionName;name(e){return this.connectionName=e,this}withHandler(e){return this.handlers.push(e),this}onReceiveMessage(e){return this.withHandler({handleMessage:c(async(t,i)=>await e(t,i)??Z.no(t),"handleMessage"),describe:c(()=>this.connectionName??"onReceiveMessage","describe")})}onReceiveRequest(e,t,i){return this.withHandler({handleMessage:c(async(r,u)=>{if(r.kind!=="request"||r.method!==e)return Z.no(r);let h=t(r.params);return await i(h,r.responder,u)??Z.yes()},"handleMessage"),describe:c(()=>`${this.connectionName??"request"}:${e}`,"describe")})}onReceiveNotification(e,t,i){return this.withHandler({handleMessage:c(async(r,u)=>{if(r.kind!=="notification"||r.method!==e)return Z.no(r);let h=t(r.params);return await i(h,u)??Z.yes()},"handleMessage"),describe:c(()=>`${this.connectionName??"notification"}:${e}`,"describe")})}connect(e,t){return new Re(e,this.handlers,t)}connectWith(e,t,i){return this.connect(e,i).runUntil(t)}},S=class n extends Error{static{c(this,"RequestError")}code;data;constructor(e,t,i){super(t),this.code=e,this.name="RequestError",this.data=i}static parseError(e,t){return new n(-32700,`Parse error${t?`: ${t}`:""}`,e)}static invalidRequest(e,t){return new n(-32600,`Invalid request${t?`: ${t}`:""}`,e)}static methodNotFound(e){return new n(-32601,`"Method not found": ${e}`,{method:e})}static invalidParams(e,t){return new n(-32602,`Invalid params${t?`: ${t}`:""}`,e)}static internalError(e,t){return new n(-32603,`Internal error${t?`: ${t}`:""}`,e)}static requestCancelled(e,t){return new n(-32800,`Request cancelled${t?`: ${t}`:""}`,e)}static authRequired(e,t){return new n(-32e3,`Authentication required${t?`: ${t}`:""}`,e)}static resourceNotFound(e){return new n(-32002,`Resource not found${e?`: ${e}`:""}`,e&&{uri:e})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};function Ee(n){return{jsonrpc:"2.0",id:null,error:n.toErrorResponse()}}c(Ee,"protocolErrorResponse");var ve=class extends Error{static{c(this,"MessageTooLargeError")}maxMessageBytes;constructor(e){super(`Incoming ACP data exceeds the configured ${e} byte limit`),this.maxMessageBytes=e,this.name="MessageTooLargeError"}};function Me(n){let e=n??33554432;if(!Number.isSafeInteger(e)||e<=0)throw new RangeError("maxMessageBytes must be a positive safe integer");return e}c(Me,"resolveMaxMessageBytes");var lt=class{static{c(this,"MessageBuffer")}#e=new Uint8Array(0);#t=0;#n;constructor(e){this.#n=Me(e)}get byteLength(){return this.#t}get lastByte(){return this.#e[this.#t-1]}#s(e){if(e>this.#n-this.#t)throw this.clear(),new ve(this.#n)}append(e){this.#s(e.byteLength);let t=this.#t+e.byteLength;if(t>this.#e.byteLength){let i=Math.min(this.#n,Math.max(t,this.#e.byteLength*2,1024)),r=new Uint8Array(i);r.set(this.#e.subarray(0,this.#t)),this.#e=r}this.#e.set(e,this.#t),this.#t=t}take(){let e=this.#e.subarray(0,this.#t);return this.clear(),e}clear(){this.#e=new Uint8Array(0),this.#t=0}};var ui=10,ut=class{static{c(this,"LineBuffer")}#e;#t;constructor(e){this.#t=Me(e),this.#e=new lt(Math.min(Number.MAX_SAFE_INTEGER,this.#t+1))}*push(e){let t=0,i=e.indexOf(ui,t);for(;i!==-1;)yield this.#n(e.subarray(t,i)),t=i+1,i=e.indexOf(ui,t);if(t<e.byteLength){let r=e.subarray(t);this.#s(r),this.#e.append(r)}}flush(){if(this.#e.byteLength!==0)return Ln(this.#e.take())}clear(){this.#e.clear()}#n(e){return this.#s(e),this.#e.byteLength===0?Ln(e):(this.#e.append(e),Ln(this.#e.take()))}#s(e){let t=e.byteLength>0?e[e.byteLength-1]:this.#e.lastByte;if(this.#e.byteLength+e.byteLength-(t===13?1:0)>this.#t)throw this.clear(),new ve(this.#t)}};function Ln(n){return n[n.byteLength-1]===13?n.subarray(0,-1):n}c(Ln,"stripCarriageReturn");function pi(n,e,t={}){let i=Me(t.maxMessageBytes),r=new TextEncoder,u=new TextDecoder,h=!1,p,z=Promise.resolve(),m=c(v=>{let E=JSON.stringify(v)+`
|
|
3
3
|
`,j=z.then(async()=>{let R=n.getWriter();try{await R.write(r.encode(E))}finally{R.releaseLock()}});return z=j.catch(()=>{}),j},"writeJson"),g=new ReadableStream({async start(v){let E=new ut(i),j=c(async k=>{let H=u.decode(k).trim();if(!H)return;let $;try{$=JSON.parse(H)}catch{await m(Ee(S.parseError()));return}se($)||Array.isArray($)?v.enqueue($):await m(Ee(S.invalidRequest($)))},"enqueueLine"),R=e.getReader();p=R;try{for(;;){let{value:H,done:$}=await R.read();if(h)return;if($)break;if(H){for(let fe of E.push(H))if(await j(fe),h)return}}if(h)return;let k=E.flush();k&&await j(k)}catch(k){if(h)return;v.error(k),R.cancel(k).catch(()=>{});return}finally{E.clear(),p===R&&(p=void 0),R.releaseLock()}h||v.close()},cancel(v){return h=!0,p?.cancel(v)}}),x=new WritableStream({write(v){return m(v)}});return{readable:g,writable:x}}c(pi,"ndJsonStream");var fl=Vt.and(a({mode:f("form")})).and(a({message:s()})),zl=Jt.and(a({mode:f("url")})).and(a({message:s()})),ml=T([Ie,ke]).and(a({message:s()})),gl=Lt.and(a({type:f("string")})),_l=Gt.and(a({type:f("number")})),wl=$t.and(a({type:f("integer")})),bl=Ft.and(a({type:f("boolean")})),yl=Bt.and(a({type:f("array")})),Sl=Wt.and(a({type:f("string")}));var xl=nn.and(a({state:f("running")})),El=sn.and(a({state:f("idle")})),Tl=on.and(a({state:f("requires_action")})),Rl=rn.and(a({state:f("unknown")})),vl=vn.and(a({action:f("accept")})),Cl=a({action:f("decline")}),Al=a({action:f("cancel")});function mi(n,e,t){return pi(n,e,t)}c(mi,"ndJsonStream");function Q(n){return n??{}}c(Q,"emptyObjectResponse");function gi(n){return typeof n=="object"&&n!==null&&"readable"in n&&"writable"in n}c(gi,"isStream");function _i(){let n=new TransformStream,e=new TransformStream;return[{readable:e.readable,writable:n.writable},{readable:n.readable,writable:e.writable}]}c(_i,"memoryStreamPair");var je={agent:{initialize:_.initialize,authenticate:_.authenticate,logout:_.logout,providers:{list:_.providers_list,set:_.providers_set,disable:_.providers_disable},session:{new:_.session_new,load:_.session_load,list:_.session_list,delete:_.session_delete,fork:_.session_fork,resume:_.session_resume,close:_.session_close,setMode:_.session_set_mode,setConfigOption:_.session_set_config_option,prompt:_.session_prompt,cancel:_.session_cancel},nes:{start:_.nes_start,suggest:_.nes_suggest,accept:_.nes_accept,reject:_.nes_reject,close:_.nes_close},document:{didOpen:_.document_did_open,didChange:_.document_did_change,didClose:_.document_did_close,didSave:_.document_did_save,didFocus:_.document_did_focus}},client:{session:{requestPermission:I.session_request_permission,update:I.session_update},fs:{writeTextFile:I.fs_write_text_file,readTextFile:I.fs_read_text_file},terminal:{create:I.terminal_create,output:I.terminal_output,release:I.terminal_release,waitForExit:I.terminal_wait_for_exit,kill:I.terminal_kill},elicitation:{create:I.elicitation_create,complete:I.elicitation_complete}},protocol:{cancelRequest:It.cancel_request}},wi=Symbol("startActiveSession"),ft=class{static{c(this,"AcpContext")}cx;currentRequestId;constructor(e,t){this.cx=e,this.currentRequestId=t}get requestId(){return this.currentRequestId}get connectionContext(){return this.cx}sendRequest(e,t,i,r){return this.cx.sendRequest(e,t,i,r)}sendNotification(e,t){return this.cx.sendNotification(e,t)}addDynamicHandler(e){return this.cx.addDynamicHandler(e)}},Oe=class n extends ft{static{c(this,"AgentContext")}constructor(e,t){super(e,t)}static create(e,t){return new n(e,t)}request(e,t,i){let r=Ri[e];return this.sendRequest(e,t,r?.mapResponse,i)}notify(e,t){return this.sendNotification(e,t)}},Ne=class n extends ft{static{c(this,"ClientContext")}constructor(e,t){super(e,t)}static create(e,t){return new n(e,t)}[wi](e,t){return this.sendRequest(_.session_new,e,i=>this.attachSession(i),t)}buildSession(e){return typeof e=="string"?mt.create(this,{cwd:e,mcpServers:[]}):mt.create(this,e)}attachSession(e){let t=new Fn,i=this.connectionContext.signal,r=c(()=>{t.fail(i.reason??new Error("ACP connection closed"))},"failUpdatesOnClose");i.aborted?r():i.addEventListener("abort",r);let u=vi(this.connectionContext).attach(e,t),h=new Te(()=>{i.removeEventListener("abort",r)});return Wn.create(this,e,t,[u,h])}request(e,t,i){let r=Ti[e];return this.sendRequest(e,t,r?.mapResponse,i)}notify(e,t){return this.sendNotification(e,t)}},zt=class{static{c(this,"AcpConnectionHandle")}connection;constructor(e){this.connection=e}get signal(){return this.connection.signal}get closed(){return this.connection.closed}close(e){this.connection.close(e)}},Gn=class extends zt{static{c(this,"AgentConnectionHandle")}connectHandlers;client;didStartConnectHandlers=!1;constructor(e,t=[]){super(e),this.connectHandlers=t,this.client=Oe.create(e.getContext())}startConnectHandlers(){this.didStartConnectHandlers||(this.didStartConnectHandlers=!0,bt(this,this.connectHandlers))}},$n=class extends zt{static{c(this,"ClientConnectionHandle")}connectHandlers;agent;didStartConnectHandlers=!1;constructor(e,t=[]){super(e),this.connectHandlers=t,this.agent=Ne.create(e.getContext())}startConnectHandlers(){this.didStartConnectHandlers||(this.didStartConnectHandlers=!0,bt(this,this.connectHandlers))}};function bi(n,e=[]){return new Gn(n,e)}c(bi,"agentConnection");function yi(n,e=[]){return new $n(n,e)}c(yi,"clientConnection");var Fn=class{static{c(this,"AsyncQueue")}values=[];waiters=[];failed=!1;failure;enqueue(e){if(this.failed)return;let t=this.waiters.shift();t?t.resolve(e):this.values.push({kind:"value",value:e})}reject(e){if(!this.failed){if(this.waiters.length>0){for(let t of this.waiters.splice(0))t.reject(e);return}this.values.push({kind:"error",error:e})}}clearErrors(){this.values=this.values.filter(e=>e.kind==="value")}fail(e){if(!this.failed){this.failed=!0,this.failure=e;for(let t of this.waiters.splice(0))t.reject(e)}}next(){if(this.values.length>0){let e=this.values.shift();return e.kind==="error"?Promise.reject(e.error):Promise.resolve(e.value)}return this.failed?Promise.reject(this.failure):new Promise((e,t)=>{this.waiters.push({resolve:e,reject:t})})}};function hi(n){return{...n,additionalDirectories:n.additionalDirectories?[...n.additionalDirectories]:void 0,mcpServers:[...n.mcpServers]}}c(hi,"cloneNewSessionRequest");var mt=class n{static{c(this,"SessionBuilder")}cx;request;constructor(e,t){this.cx=e,this.request=hi(t)}static create(e,t){return new n(e,t)}toRequest(){return hi(this.request)}withAdditionalDirectories(e){return this.request={...this.request,additionalDirectories:[...e]},this}withMcpServer(e){return this.request={...this.request,mcpServers:[...this.request.mcpServers,e]},this}async start(e){return this.cx[wi](this.toRequest(),e)}async withSession(e){let t=await this.start();try{return await e(t)}finally{t.dispose()}}},Wn=class n{static{c(this,"ActiveSession")}cx;sessionResponse;updates;registrations;constructor(e,t,i,r){this.cx=e,this.sessionResponse=t,this.updates=i,this.registrations=r}static create(e,t,i,r){return new n(e,t,i,r)}get sessionId(){return this.sessionResponse.sessionId}get modes(){return this.sessionResponse.modes}get meta(){return this.sessionResponse._meta}get newSessionResponse(){return this.sessionResponse}prompt(e,t){this.updates.clearErrors();let i=this.cx.request(_.session_prompt,{sessionId:this.sessionId,prompt:this.promptBlocks(e)},t);return i.then(r=>{this.updates.enqueue({kind:"stop",response:r,stopReason:r.stopReason})},r=>{this.updates.reject(r)}),i}nextUpdate(){return this.updates.next()}async readText(){let e="";for(;;){let t=await this.nextUpdate();if(t.kind==="stop")return e;let{update:i}=t;i.sessionUpdate==="agent_message_chunk"&&i.content.type==="text"&&(e+=i.content.text)}}dispose(){for(let e of this.registrations.splice(0))e.dispose();this.updates.fail(new Error("Active session disposed"))}[Symbol.dispose](){this.dispose()}promptBlocks(e){return typeof e=="string"?[{type:"text",text:e}]:Array.isArray(e)?e:[e]}};function Si(n,e){return n?typeof n=="function"?n(e):n.parse(e):e}c(Si,"parseParams");function P(n,e,t){return{method:n,params:e,mapResponse:t}}c(P,"requestSpec");function K(n,e){return{method:n,params:e}}c(K,"notificationSpec");function xi(n,e,t,i){n.onReceiveRequest(e.method,r=>Si(e.params,r),async(r,u,h)=>{let p=await i(t(r,h,u.signal,u.id));await u.respond(e.mapResponse?e.mapResponse(p):p)})}c(xi,"registerAppRequest");function Ei(n,e,t,i){n.onReceiveNotification(e.method,r=>Si(e.params,r),(r,u)=>i(t(r,u,u.signal)))}c(Ei,"registerAppNotification");function wt(n){let e={};for(let t of Object.values(n))e[t.method]=t;return e}c(wt,"specsByMethod");var Nc={initialize:P(_.initialize,cn),newSession:P(_.session_new,fn),loadSession:P(_.session_load,zn,Q),unstable_forkSession:P(_.session_fork,_n),listSessions:P(_.session_list,mn),deleteSession:P(_.session_delete,gn,Q),resumeSession:P(_.session_resume,wn),closeSession:P(_.session_close,bn,Q),setSessionMode:P(_.session_set_mode,yn,Q),setSessionConfigOption:P(_.session_set_config_option,Sn),authenticate:P(_.authenticate,dn,Q),unstable_listProviders:P(_.providers_list,ln),unstable_setProvider:P(_.providers_set,un,Q),unstable_disableProvider:P(_.providers_disable,pn,Q),logout:P(_.logout,hn,Q),prompt:P(_.session_prompt,xn),unstable_startNes:P(_.nes_start,En),unstable_suggestNes:P(_.nes_suggest,Tn),unstable_closeNes:P(_.nes_close,Rn,Q)},jc={cancel:K(_.session_cancel,Cn),unstable_didOpenDocument:K(_.document_did_open,An),unstable_didChangeDocument:K(_.document_did_change,In),unstable_didCloseDocument:K(_.document_did_close,kn),unstable_didSaveDocument:K(_.document_did_save,Mn),unstable_didFocusDocument:K(_.document_did_focus,On),unstable_acceptNes:K(_.nes_accept,Nn),unstable_rejectNes:K(_.nes_reject,jn)},qc={requestPermission:P(I.session_request_permission,jt),writeTextFile:P(I.fs_write_text_file,Mt,Q),readTextFile:P(I.fs_read_text_file,Ot),createTerminal:P(I.terminal_create,qt),terminalOutput:P(I.terminal_output,Pt),releaseTerminal:P(I.terminal_release,Dt,Q),waitForTerminalExit:P(I.terminal_wait_for_exit,Ht),killTerminal:P(I.terminal_kill,Ut,Q),createElicitation:P(I.elicitation_create,Qt)},Pc={sessionUpdate:K(I.session_update,at),completeElicitation:K(I.elicitation_complete,an)},Ti=wt(Nc),Dc=wt(jc),Ri=wt(qc),Hc=wt(Pc);function Uc(n,e,t,i){return{params:n,requestId:i,signal:t,client:e}}c(Uc,"agentRequestContext");function Lc(n,e,t){return{params:n,signal:t,client:e}}c(Lc,"agentNotificationContext");function Gc(n,e,t,i){return{params:n,requestId:i,signal:t,agent:e}}c(Gc,"clientRequestContext");function $c(n,e,t){return{params:n,signal:t,agent:e}}c($c,"clientNotificationContext");var Bn=class{static{c(this,"SessionUpdateRouter")}activeSessions=new Map;handleMessage(e){if(e.kind!=="notification"||e.method!==I.session_update)return Z.no(e);let t=at.parse(e.params),i={kind:"session_update",notification:t,update:t.update},r=this.activeSessions.get(t.sessionId);if(r&&r.size>0)for(let u of r)u.enqueue(i);return Z.no(e)}attach(e,t){let i=this.activeSessions.get(e.sessionId)??new Set;return i.add(t),this.activeSessions.set(e.sessionId,i),new Te(()=>{i.delete(t),i.size===0&&this.activeSessions.delete(e.sessionId)})}},fi=new WeakMap;function vi(n){let e=fi.get(n);return e||(e=new Bn,fi.set(n,e)),e}c(vi,"sessionUpdateRouter");function bt(n,e){for(let t of e){let i;try{i=t(n)}catch(r){throw n.close(r),r}Promise.resolve(i).catch(r=>{n.close(r)})}}c(bt,"runConnectHandlers");var gt=Symbol("appBuilder"),pt=Symbol("runAgentConnectHandlers"),ht=Symbol("runClientConnectHandlers"),_t={allowBatches:!1};function Ci(n){return new Vn(n)}c(Ci,"agent");var Vn=class{static{c(this,"AgentApp")}builder=Re.builder();connectHandlers=[];constructor(e={}){e.name&&this.builder.name(e.name)}[gt](){return this.builder}[pt](e){bt(e,this.connectHandlers)}connect(e,t={}){return this.connectConnection(e,t).connection}connectWith(e,t){let{rawConnection:i,connection:r}=this.connectConnection(e);return i.runUntil(()=>t(r.client))}onConnect(e){return this.connectHandlers.push(e),this}onRequest(e,t,i){if(i)return this.request({method:e,params:t},i);let r=Ti[e];if(!r)throw new Error(`Unknown ACP request method '${e}'. Pass a params parser for custom methods.`);return this.request(r,t)}onNotification(e,t,i){if(i)return this.notification({method:e,params:t},i);let r=Dc[e];if(!r)throw new Error(`Unknown ACP notification method '${e}'. Pass a params parser for custom methods.`);return this.notification(r,t)}request(e,t){return xi(this.builder,e,(i,r,u,h)=>Uc(i,Oe.create(r,h),u,h),t),this}notification(e,t){return Ei(this.builder,e,(i,r,u)=>Lc(i,Oe.create(r),u),t),this}connectConnection(e,t={}){if(gi(e)){let z=this.openStreamConnection(e);return t.deferConnectHandlers||this[pt](z.connection),z}let[i,r]=_i(),u=e[gt]().connect(r,_t),h=yi(u),p=this.openStreamConnection(i);p.rawConnection.closed.then(()=>h.close()),u.closed.then(()=>p.connection.close());try{e[ht](h),this[pt](p.connection)}catch(z){throw h.close(z),p.connection.close(z),z}return p}openStreamConnection(e){let t=this.builder.connect(e,_t);return{rawConnection:t,connection:bi(t,this.connectHandlers)}}};var zi=class{static{c(this,"ClientApp")}builder=Re.builder();connectHandlers=[];constructor(e={}){e.name&&this.builder.name(e.name),this.builder.withHandler({handleMessage:c((t,i)=>vi(i).handleMessage(t),"handleMessage"),describe:c(()=>"client-session-update-router","describe")})}[gt](){return this.builder}[ht](e){bt(e,this.connectHandlers)}connect(e){return this.connectConnection(e).connection}connectWith(e,t){let{rawConnection:i,connection:r}=this.connectConnection(e);return i.runUntil(()=>t(r.agent))}onConnect(e){return this.connectHandlers.push(e),this}onRequest(e,t,i){if(i)return this.request({method:e,params:t},i);let r=Ri[e];if(!r)throw new Error(`Unknown ACP request method '${e}'. Pass a params parser for custom methods.`);return this.request(r,t)}onNotification(e,t,i){if(i)return this.notification({method:e,params:t},i);let r=Hc[e];if(!r)throw new Error(`Unknown ACP notification method '${e}'. Pass a params parser for custom methods.`);return this.notification(r,t)}request(e,t){return xi(this.builder,e,(i,r,u,h)=>Gc(i,Ne.create(r,h),u,h),t),this}notification(e,t){return Ei(this.builder,e,(i,r,u)=>$c(i,Ne.create(r),u),t),this}connectConnection(e){if(gi(e)){let p=this.openStreamConnection(e);return this[ht](p.connection),p}let[t,i]=_i(),r=e[gt]().connect(i,_t),u=bi(r),h=this.openStreamConnection(t);h.rawConnection.closed.then(()=>u.close()),r.closed.then(()=>h.connection.close());try{e[pt](u),this[ht](h.connection)}catch(p){throw u.close(p),h.connection.close(p),p}return h}openStreamConnection(e){let t=this.builder.connect(e,_t);return{rawConnection:t,connection:yi(t,this.connectHandlers)}}},Ll=new Set([_.initialize,_.authenticate,_.providers_list,_.providers_set,_.providers_disable,_.session_new,_.session_load,_.session_set_mode,_.session_set_config_option,_.session_prompt,_.session_list,_.session_delete,_.session_fork,_.session_resume,_.session_close,_.logout,_.nes_start,_.nes_suggest,_.nes_close]),Gl=new Set([_.session_cancel,_.nes_accept,_.nes_reject,_.document_did_open,_.document_did_change,_.document_did_close,_.document_did_save,_.document_did_focus]),$l=new Set([I.session_request_permission,I.fs_write_text_file,I.fs_read_text_file,I.terminal_create,I.terminal_output,I.terminal_release,I.terminal_wait_for_exit,I.terminal_kill,I.elicitation_create]),Fl=new Set([I.session_update,I.elicitation_complete]);import{createHash as Wc}from"node:crypto";import{realpath as Bc,stat as Vc}from"node:fs/promises";import Jc from"node:path";function J(n){return Wc("sha256").update(JSON.stringify(n)).digest("hex")}c(J,"fingerprint");async function Jn(n,e){if(!Jc.isAbsolute(n)||e?.length)throw S.invalidParams(void 0,"Supply one absolute workspace directory; additional roots are not supported.");try{let t=await Bc(n);if(!(await Vc(t)).isDirectory())throw new Error;return t}catch{throw S.invalidParams(void 0,"Workspace directory does not exist.")}}c(Jn,"workspaceRoot");var qe=class{constructor(e){this.home=e}home;static{c(this,"AcpAccount")}async context(){let e=await _s(this.home,()=>As(process.env.OPENPOND_ACCOUNT,process.env.OPENPOND_BASE_URL));if(!e.token||!e.account)throw S.authRequired(void 0,"Run openpond acp --login with the same --home/account options, then reconnect.");return e}async scope(){let e=await this.context();return J({home:this.home,account:e.account.handle,api:e.apiBaseUrl,chat:e.chatApiBaseUrl})}stream=async function*(e){let t=await this.context();yield*At({...e,apiBaseUrl:t.chatApiBaseUrl,token:t.token,model:e.model||"openpond-chat"})}.bind(this);async streamForScope(e){let t=await this.context();if(J({home:this.home,account:t.account.handle,api:t.apiBaseUrl,chat:t.chatApiBaseUrl})!==e)throw S.invalidRequest(void 0,"The session account or model route changed. Reconnect with the original account or start a new session.");return async function*(r){yield*At({...r,apiBaseUrl:t.chatApiBaseUrl,token:t.token,model:r.model||"openpond-chat"})}}async models(){let e=await this.context(),t=`${e.chatApiBaseUrl.replace(/\/+$/,"")}/models`,i=await fetch(t,{headers:{Authorization:`Bearer ${e.token}`},signal:AbortSignal.timeout(15e3)});if(!i.ok)throw S.authRequired(void 0,`OpenPond model route is unavailable (HTTP ${i.status}). Check login and account access.`);let r=await i.json(),u=[...new Set((r.data??[]).flatMap(h=>typeof h.id=="string"&&h.id.trim()?[h.id]:[]))];if(!u.length)throw S.invalidRequest(void 0,"OpenPond model route returned no usable models.");return u.map(h=>({id:h,name:h==="openpond-chat"?"OpenPond Chat":h}))}};var Oi=fo(Mi(),1);function Ni(n){if(n)try{return Oi.default.parse(n).type}catch{let e=(n.split(";",1)[0]??"").trim().toLowerCase();return e===""||n.slice(e.length).includes(",")?void 0:e}}c(Ni,"mediaTypeEssence");function yt(n){return n?n instanceof Headers?Object.fromEntries(n.entries()):Array.isArray(n)?Object.fromEntries(n):{...n}:{}}c(yt,"normalizeHeaders");function ji(n=fetch,e){return e?async(t,i)=>{let r={...e,...i,headers:i?.headers?{...yt(e.headers),...yt(i.headers)}:e.headers};return n(t,r)}:n}c(ji,"createFetchWithInit");var sd=5,id=[301,302,303,307,308];function od(n,e){return n.protocol===e.protocol&&n.hostname===e.hostname&&n.port===e.port?!0:n.hostname===e.hostname&&n.protocol==="http:"&&n.port===""&&e.protocol==="https:"&&e.port===""}c(od,"isWithinOrigin");function qi(n,e){let t=id.includes(n.status)?n.headers.get("location"):null;try{return t?new URL(t,e):void 0}catch{return}}c(qi,"redirectTarget");function St(n,e,t,i,r=0){let u=qi(i,e),h=i.status===307||i.status===308||(t?.method??"GET").toUpperCase()==="GET";if(!u||r===sd||!h)return;let p=new URL(e);if(!((u.username||u.password)&&(u.username!==p.username||u.password!==p.password)||!od(p,u)))return Promise.resolve(i.body?.cancel()).then(()=>n(u,{...t,redirect:"manual"})).then(m=>St(n,u,t,m,r+1)??m)}c(St,"followWithinOrigin");var Pi=new WeakSet;function Kn(n){let e=c((t,i)=>(n??fetch)(t,i),"following");return Pi.add(e),e}c(Kn,"fetchLeavingRedirects");function ce(n=fetch){return Pi.has(n)?n:(e,t)=>t?.redirect==="error"||t?.redirect==="manual"?n(e,t):Promise.resolve(n(e,{...t,redirect:"manual"})).then(i=>St(n,e,t,i)??i)}c(ce,"fetchWithinOrigin");function xt(n,e){if(n.type==="opaqueredirect")return"Redirect not followed: this runtime does not expose the redirect target";let t=n.url||e,i=qi(n,t);if(i)return i.username=i.password=i.search=i.hash="",i.protocol==="http:"&&new URL(t).protocol==="https:"?(i.protocol="https:",`Redirect to plain http not followed; try ${i.href} instead`):`Redirect to ${i.href} not followed`}c(xt,"unfollowedRedirect");var Zn;Zn=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(n=>n.webcrypto);async function rd(n){return(await Zn).getRandomValues(new Uint8Array(n))}c(rd,"getRandomValues");async function ad(n){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",t=Math.pow(2,8)-Math.pow(2,8)%e.length,i="";for(;i.length<n;){let r=await rd(n-i.length);for(let u of r)u<t&&(i+=e[u%e.length])}return i}c(ad,"random");async function cd(n){return await ad(n)}c(cd,"generateVerifier");async function dd(n){let e=await(await Zn).subtle.digest("SHA-256",new TextEncoder().encode(n));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}c(dd,"generateChallenge");async function Xn(n){if(n||(n=43),n<43||n>128)throw`Expected a length between 43 and 128. Received ${n}.`;let e=await cd(n),t=await dd(e);return{code_verifier:e,code_challenge:t}}c(Xn,"pkceChallenge");var W=et().superRefine((n,e)=>{if(!URL.canParse(n))return e.addIssue({code:ms.custom,message:"URL must be parseable",fatal:!0}),fs}).refine(n=>{let e=new URL(n);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Hi=me({resource:s().url(),authorization_servers:w(W).optional(),jwks_uri:s().url().optional(),scopes_supported:w(s()).optional(),bearer_methods_supported:w(s()).optional(),resource_signing_alg_values_supported:w(s()).optional(),resource_name:s().optional(),resource_documentation:s().optional(),resource_policy_uri:s().url().optional(),resource_tos_uri:s().url().optional(),tls_client_certificate_bound_access_tokens:q().optional(),authorization_details_types_supported:w(s()).optional(),dpop_signing_alg_values_supported:w(s()).optional(),dpop_bound_access_tokens_required:q().optional()}),Yn=me({issuer:s(),authorization_endpoint:W,token_endpoint:W,registration_endpoint:W.optional(),scopes_supported:w(s()).optional(),response_types_supported:w(s()),response_modes_supported:w(s()).optional(),grant_types_supported:w(s()).optional(),token_endpoint_auth_methods_supported:w(s()).optional(),token_endpoint_auth_signing_alg_values_supported:w(s()).optional(),service_documentation:W.optional(),revocation_endpoint:W.optional(),revocation_endpoint_auth_methods_supported:w(s()).optional(),revocation_endpoint_auth_signing_alg_values_supported:w(s()).optional(),introspection_endpoint:s().optional(),introspection_endpoint_auth_methods_supported:w(s()).optional(),introspection_endpoint_auth_signing_alg_values_supported:w(s()).optional(),code_challenge_methods_supported:w(s()).optional(),client_id_metadata_document_supported:q().optional()}),ld=me({issuer:s(),authorization_endpoint:W,token_endpoint:W,userinfo_endpoint:W.optional(),jwks_uri:W,registration_endpoint:W.optional(),scopes_supported:w(s()).optional(),response_types_supported:w(s()),response_modes_supported:w(s()).optional(),grant_types_supported:w(s()).optional(),acr_values_supported:w(s()).optional(),subject_types_supported:w(s()),id_token_signing_alg_values_supported:w(s()),id_token_encryption_alg_values_supported:w(s()).optional(),id_token_encryption_enc_values_supported:w(s()).optional(),userinfo_signing_alg_values_supported:w(s()).optional(),userinfo_encryption_alg_values_supported:w(s()).optional(),userinfo_encryption_enc_values_supported:w(s()).optional(),request_object_signing_alg_values_supported:w(s()).optional(),request_object_encryption_alg_values_supported:w(s()).optional(),request_object_encryption_enc_values_supported:w(s()).optional(),token_endpoint_auth_methods_supported:w(s()).optional(),token_endpoint_auth_signing_alg_values_supported:w(s()).optional(),display_values_supported:w(s()).optional(),claim_types_supported:w(s()).optional(),claims_supported:w(s()).optional(),service_documentation:s().optional(),claims_locales_supported:w(s()).optional(),ui_locales_supported:w(s()).optional(),claims_parameter_supported:q().optional(),request_parameter_supported:q().optional(),request_uri_parameter_supported:q().optional(),require_request_uri_registration:q().optional(),op_policy_uri:W.optional(),op_tos_uri:W.optional(),client_id_metadata_document_supported:q().optional()}),Ui=a({...ld.shape,...Yn.pick({code_challenge_methods_supported:!0}).shape}),Li=a({access_token:s(),id_token:s().optional(),token_type:s(),expires_in:gs.number().optional(),scope:s().optional(),refresh_token:s().optional(),issuer:s().optional().catch(void 0)}).strip(),Gi=a({error:s(),error_description:s().optional(),error_uri:s().optional()}),Di=W.optional().or(f("").transform(()=>{})),ud=a({redirect_uris:w(W),token_endpoint_auth_method:s().optional(),grant_types:w(s()).optional(),response_types:w(s()).optional(),client_name:s().optional(),client_uri:W.optional(),logo_uri:Di,scope:s().optional(),contacts:w(s()).optional(),tos_uri:Di,policy_uri:s().optional(),jwks_uri:W.optional(),jwks:zs().optional(),software_id:s().optional(),software_version:s().optional(),software_statement:s().optional()}).strip(),pd=a({client_id:s(),client_secret:s().optional(),client_id_issued_at:O().optional(),client_secret_expires_at:O().optional(),issuer:s().optional().catch(void 0)}).strip(),$i=ud.merge(pd),pu=a({error:s(),error_description:s().optional()}).strip(),hu=a({token:s(),token_type_hint:s().optional()}).strip();function Fi(n){let e=typeof n=="string"?new URL(n):new URL(n.href);return e.hash="",e}c(Fi,"resourceUrlFromServerUrl");function Wi({requestedResource:n,configuredResource:e}){let t=typeof n=="string"?new URL(n):new URL(n.href),i=typeof e=="string"?new URL(e):new URL(e.href);if(t.origin!==i.origin||t.pathname.length<i.pathname.length)return!1;let r=t.pathname.endsWith("/")?t.pathname:t.pathname+"/",u=i.pathname.endsWith("/")?i.pathname:i.pathname+"/";return r.startsWith(u)}c(Wi,"checkResourceAllowed");var U=class extends Error{static{c(this,"OAuthError")}constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},Pe=class extends U{static{c(this,"InvalidRequestError")}};Pe.errorCode="invalid_request";var de=class extends U{static{c(this,"InvalidClientError")}};de.errorCode="invalid_client";var le=class extends U{static{c(this,"InvalidGrantError")}};le.errorCode="invalid_grant";var ue=class extends U{static{c(this,"UnauthorizedClientError")}};ue.errorCode="unauthorized_client";var De=class extends U{static{c(this,"UnsupportedGrantTypeError")}};De.errorCode="unsupported_grant_type";var He=class extends U{static{c(this,"InvalidScopeError")}};He.errorCode="invalid_scope";var Ue=class extends U{static{c(this,"AccessDeniedError")}};Ue.errorCode="access_denied";var X=class extends U{static{c(this,"ServerError")}};X.errorCode="server_error";var Le=class extends U{static{c(this,"TemporarilyUnavailableError")}};Le.errorCode="temporarily_unavailable";var Ge=class extends U{static{c(this,"UnsupportedResponseTypeError")}};Ge.errorCode="unsupported_response_type";var $e=class extends U{static{c(this,"UnsupportedTokenTypeError")}};$e.errorCode="unsupported_token_type";var Fe=class extends U{static{c(this,"InvalidTokenError")}};Fe.errorCode="invalid_token";var We=class extends U{static{c(this,"MethodNotAllowedError")}};We.errorCode="method_not_allowed";var Be=class extends U{static{c(this,"TooManyRequestsError")}};Be.errorCode="too_many_requests";var pe=class extends U{static{c(this,"InvalidClientMetadataError")}};pe.errorCode="invalid_client_metadata";var Ve=class extends U{static{c(this,"InsufficientScopeError")}};Ve.errorCode="insufficient_scope";var Je=class extends U{static{c(this,"InvalidTargetError")}};Je.errorCode="invalid_target";var Bi={[Pe.errorCode]:Pe,[de.errorCode]:de,[le.errorCode]:le,[ue.errorCode]:ue,[De.errorCode]:De,[He.errorCode]:He,[Ue.errorCode]:Ue,[X.errorCode]:X,[Le.errorCode]:Le,[Ge.errorCode]:Ge,[$e.errorCode]:$e,[Fe.errorCode]:Fe,[We.errorCode]:We,[Be.errorCode]:Be,[pe.errorCode]:pe,[Ve.errorCode]:Ve,[Je.errorCode]:Je};var Y=class extends Error{static{c(this,"UnauthorizedError")}constructor(e){super(e??"Unauthorized")}};function hd(n){return["client_secret_basic","client_secret_post","none"].includes(n)}c(hd,"isClientAuthMethod");var es="code",ts="S256";function fd(n,e){let t=n.client_secret!==void 0;return"token_endpoint_auth_method"in n&&n.token_endpoint_auth_method&&hd(n.token_endpoint_auth_method)&&(e.length===0||e.includes(n.token_endpoint_auth_method))?n.token_endpoint_auth_method:e.length===0?t?"client_secret_basic":"none":t&&e.includes("client_secret_basic")?"client_secret_basic":t&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":t?"client_secret_post":"none"}c(fd,"selectClientAuthMethod");function zd(n,e,t,i){let{client_id:r,client_secret:u}=e;switch(n){case"client_secret_basic":md(r,u,t);return;case"client_secret_post":gd(r,u,i);return;case"none":_d(r,i);return;default:throw new Error(`Unsupported client authentication method: ${n}`)}}c(zd,"applyClientAuthentication");function md(n,e,t){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");let i=btoa(`${n}:${e}`);t.set("Authorization",`Basic ${i}`)}c(md,"applyBasicAuth");function gd(n,e,t){t.set("client_id",n),e&&t.set("client_secret",e)}c(gd,"applyPostAuth");function _d(n,e){e.set("client_id",n)}c(_d,"applyPublicAuth");async function Ji(n){let e=n instanceof Response?n.status:void 0,t=n instanceof Response?await n.text():n;try{let i=Gi.parse(JSON.parse(t)),{error:r,error_description:u,error_uri:h}=i,p=Bi[r]||X;return new p(u||"",h)}catch(i){let r=n instanceof Response?xt(n,n.url):void 0,u=`${e?`HTTP ${e}: `:""}${r??`Invalid OAuth error response: ${i}. Raw body: ${t}`}`;return new X(u)}}c(Ji,"parseErrorResponse");function wd(n,e){let[t,i]=[n,e];try{[t,i]=[new URL(n).href,new URL(e).href]}catch{}return t===i||t.endsWith("/")&&t.slice(0,-1)===i||i.endsWith("/")&&i.slice(0,-1)===t}c(wd,"issuersMatch");function is(n,e){if(n)return typeof n.issuer!="string"?n.issuer==null?n:{...n,issuer:void 0}:wd(n.issuer,e)?n:void 0}c(is,"discardIfIssuerMismatch");var bd=Li.omit({issuer:!0}),yd=$i.omit({issuer:!0});function Qi(n,e){return new Error(`OAuth client information is bound to authorization server ${n.issuer} and is not presented to ${e}. Clear the stored client information, or correct \`expectedIssuer\`, if the authorization server has moved.`)}c(Qi,"boundElsewhereError");async function Qe(n,e){try{return await ns(n,e)}catch(t){if(t instanceof de||t instanceof ue)return await n.invalidateCredentials?.("all"),await ns(n,e);if(t instanceof le)return await n.invalidateCredentials?.("tokens"),await ns(n,e);throw t}}c(Qe,"auth");async function ns(n,{serverUrl:e,authorizationCode:t,scope:i,resourceMetadataUrl:r,fetchFn:u}){let h=await n.discoveryState?.(),p,z,m,g=r;if(!g&&h?.resourceMetadataUrl&&(g=new URL(h.resourceMetadataUrl)),h?.authorizationServerUrl){if(z=h.authorizationServerUrl,p=h.resourceMetadata,m=h.authorizationServerMetadata??await Zi(z,{fetchFn:u}),!p)try{p=await Ki(e,{resourceMetadataUrl:g},u)}catch{}(m!==h.authorizationServerMetadata||p!==h.resourceMetadata)&&await n.saveDiscoveryState?.({authorizationServerUrl:String(z),resourceMetadataUrl:g?.toString(),resourceMetadata:p,authorizationServerMetadata:m})}else{let N=await Cd(e,{resourceMetadataUrl:g,fetchFn:u});z=N.authorizationServerUrl,m=N.authorizationServerMetadata,p=N.resourceMetadata,await n.saveDiscoveryState?.({authorizationServerUrl:String(z),resourceMetadataUrl:g?.toString(),resourceMetadata:p,authorizationServerMetadata:m})}let x=String(z),v=await xd(e,n,p),E=v&&p&&!n.validateResourceURL?p.resource:v,j=i||p?.scopes_supported?.join(" ")||n.clientMetadata.scope,R=await Promise.resolve(n.clientInformation()),k=is(R,x),H=n.saveClientInformation!==void 0&&!!n.redirectUrl;if(R&&!k&&!H)throw Qi(R,x);let $=k?.issuer==null?k:void 0,fe=c(async()=>{try{$&&await n.saveClientInformation?.({...$,issuer:x})}catch{}},"bindClientInformation");if(!k){if(t!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");let N=m?.client_id_metadata_document_supported===!0,B=n.clientMetadataUrl;if(B&&!Sd(B))throw new pe(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${B}`);if(N&&B)k={client_id:B,issuer:x},await n.saveClientInformation?.(k);else{if(!n.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");k={...await Od(z,{metadata:m,clientMetadata:n.clientMetadata,scope:j,fetchFn:u}),issuer:x},await n.saveClientInformation(k)}}let Rt=!n.redirectUrl;if(t!==void 0||Rt){let N=await Md(n,z,{metadata:m,resource:E,authorizationCode:t,fetchFn:u});return await fe(),await n.saveTokens({...N,issuer:x}),"AUTHORIZED"}let y=is(await n.tokens(),x);if(y?.refresh_token&&y.issuer==null&&console.warn("[mcp-sdk] stored OAuth tokens have no 'issuer' property (saved by an earlier version, or by a provider that does not keep it) and are used as-is; make sure your OAuthClientProvider stores what saveTokens() and saveClientInformation() receive unchanged."),y?.refresh_token)try{let N=await kd(z,{metadata:m,clientInformation:k,refreshToken:y.refresh_token,resource:E,addClientAuthentication:n.addClientAuthentication,fetchFn:u});return await fe(),await n.saveTokens({...N,issuer:x}),"AUTHORIZED"}catch(N){if(!(!(N instanceof U)||N instanceof X))throw N}let b=n.state?await n.state():void 0,{authorizationUrl:M,codeVerifier:L}=await Ad(z,{metadata:m,clientInformation:k,state:b,redirectUrl:n.redirectUrl,scope:j,resource:E});return await n.saveCodeVerifier(L),await n.redirectToAuthorization(M),"REDIRECT"}c(ns,"authInternal");function Sd(n){if(!n)return!1;try{let e=new URL(n);return e.protocol==="https:"&&e.pathname!=="/"}catch{return!1}}c(Sd,"isHttpsUrl");async function xd(n,e,t){let i=Fi(n);if(e.validateResourceURL)return await e.validateResourceURL(i,t?.resource);if(t){if(!Wi({requestedResource:i,configuredResource:t.resource}))throw new Error(`Protected resource ${t.resource} does not match expected ${i} (or origin)`);return new URL(t.resource)}}c(xd,"selectResourceURL");function os(n){let e=n.headers.get("WWW-Authenticate");if(!e)return{};let[t,i]=e.split(" ");if(t.toLowerCase()!=="bearer"||!i)return{};let r=ss(n,"resource_metadata")||void 0,u;if(r)try{u=new URL(r)}catch{}let h=ss(n,"scope")||void 0,p=ss(n,"error")||void 0;return{resourceMetadataUrl:u,scope:h,error:p}}c(os,"extractWWWAuthenticateParams");function ss(n,e){let t=n.headers.get("WWW-Authenticate");if(!t)return null;let i=new RegExp(`${e}=(?:"([^"]+)"|([^\\s,]+))`),r=t.match(i);return r?r[1]||r[2]:null}c(ss,"extractFieldFromWwwAuth");async function Ki(n,e,t=fetch){let i=await Rd(n,"oauth-protected-resource",t,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!i||i.status===404)throw await i?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!i.ok)throw await i.body?.cancel(),new Error(`HTTP ${i.status} trying to load well-known OAuth protected resource metadata.`);return Hi.parse(await i.json())}c(Ki,"discoverOAuthProtectedResourceMetadata");async function rs(n,e,t=fetch){try{return await ce(t)(n,{headers:e})}catch(i){if(i instanceof TypeError)return e?rs(n,void 0,t):void 0;throw i}}c(rs,"fetchWithCorsRetry");function Ed(n,e="",t={}){return e.endsWith("/")&&(e=e.slice(0,-1)),t.prependPathname?`${e}/.well-known/${n}`:`/.well-known/${n}${e}`}c(Ed,"buildWellKnownPath");async function Vi(n,e,t=fetch){return await rs(n,{"MCP-Protocol-Version":e},t)}c(Vi,"tryMetadataDiscovery");function Td(n,e){return!n||!n.ok&&n.status<500&&e!=="/"}c(Td,"shouldAttemptFallback");async function Rd(n,e,t,i){let r=new URL(n),u=i?.protocolVersion??vt,h;if(i?.metadataUrl)h=new URL(i.metadataUrl);else{let z=Ed(e,r.pathname);h=new URL(z,i?.metadataServerUrl??r),h.search=r.search}let p=await Vi(h,u,t);if(!i?.metadataUrl&&Td(p,r.pathname)){let z=new URL(`/.well-known/${e}`,r);p=await Vi(z,u,t)}return p}c(Rd,"discoverMetadataWithFallback");function vd(n){let e=typeof n=="string"?new URL(n):n,t=e.pathname!=="/",i=[];if(!t)return i.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),i.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),i;let r=e.pathname;return r.endsWith("/")&&(r=r.slice(0,-1)),i.push({url:new URL(`/.well-known/oauth-authorization-server${r}`,e.origin),type:"oauth"}),i.push({url:new URL(`/.well-known/openid-configuration${r}`,e.origin),type:"oidc"}),i.push({url:new URL(`${r}/.well-known/openid-configuration`,e.origin),type:"oidc"}),i}c(vd,"buildDiscoveryUrls");async function Zi(n,{fetchFn:e=fetch,protocolVersion:t=vt}={}){let i={"MCP-Protocol-Version":t,Accept:"application/json"},r=vd(n);for(let{url:u,type:h}of r){let p=await rs(u,i,e);if(p){if(!p.ok){if(await p.body?.cancel(),p.status<500)continue;throw new Error(`HTTP ${p.status} trying to load ${h==="oauth"?"OAuth":"OpenID provider"} metadata from ${u}`)}return h==="oauth"?Yn.parse(await p.json()):Ui.parse(await p.json())}}}c(Zi,"discoverAuthorizationServerMetadata");async function Cd(n,e){let t,i;try{t=await Ki(n,{resourceMetadataUrl:e?.resourceMetadataUrl},e?.fetchFn),t.authorization_servers&&t.authorization_servers.length>0&&(i=t.authorization_servers[0])}catch{}i||(i=String(new URL("/",n)));let r=await Zi(i,{fetchFn:e?.fetchFn});return{authorizationServerUrl:i,authorizationServerMetadata:r,resourceMetadata:t}}c(Cd,"discoverOAuthServerInfo");function Xi(n){return typeof n=="string"?n:n.href}c(Xi,"resourceIndicatorToString");async function Ad(n,{metadata:e,clientInformation:t,redirectUrl:i,scope:r,state:u,resource:h}){let p;if(e){if(p=new URL(e.authorization_endpoint),!e.response_types_supported.includes(es))throw new Error(`Incompatible auth server: does not support response type ${es}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(ts))throw new Error(`Incompatible auth server: does not support code challenge method ${ts}`)}else p=new URL("/authorize",n);let z=await Xn(),m=z.code_verifier,g=z.code_challenge;return p.searchParams.set("response_type",es),p.searchParams.set("client_id",t.client_id),p.searchParams.set("code_challenge",g),p.searchParams.set("code_challenge_method",ts),p.searchParams.set("redirect_uri",String(i)),u&&p.searchParams.set("state",u),r&&p.searchParams.set("scope",r),r?.includes("offline_access")&&p.searchParams.append("prompt","consent"),h&&p.searchParams.set("resource",Xi(h)),{authorizationUrl:p,codeVerifier:m}}c(Ad,"startAuthorization");function Id(n,e,t){return new URLSearchParams({grant_type:"authorization_code",code:n,code_verifier:e,redirect_uri:String(t)})}c(Id,"prepareAuthorizationCodeRequest");async function Yi(n,{metadata:e,tokenRequestParams:t,clientInformation:i,addClientAuthentication:r,resource:u,fetchFn:h}){let p=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",n),z=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(u&&t.set("resource",Xi(u)),r)await r(z,t,p,e);else if(i){let g=e?.token_endpoint_auth_methods_supported??[],x=fd(i,g);zd(x,i,z,t)}let m=await ce(h??fetch)(p,{method:"POST",headers:z,body:t});if(!m.ok)throw await Ji(m);return bd.parse(await m.json())}c(Yi,"executeTokenRequest");async function kd(n,{metadata:e,clientInformation:t,refreshToken:i,resource:r,addClientAuthentication:u,fetchFn:h}){let p=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),z=await Yi(n,{metadata:e,tokenRequestParams:p,clientInformation:t,addClientAuthentication:u,resource:r,fetchFn:h});return{refresh_token:i,...z}}c(kd,"refreshAuthorization");async function Md(n,e,{metadata:t,resource:i,authorizationCode:r,fetchFn:u}={}){let h=c(async()=>{let g=await n.clientInformation(),x=is(g,String(e));if(g&&!x)throw Qi(g,String(e));return x},"readClientInformation"),p=await h(),z=n.clientMetadata.scope,m;if(n.prepareTokenRequest&&(m=await n.prepareTokenRequest(z)),!m){if(!r)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!n.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let g=await n.codeVerifier();m=Id(r,g,n.redirectUrl)}return p??(p=await h()),Yi(e,{metadata:t,tokenRequestParams:m,clientInformation:p,addClientAuthentication:n.addClientAuthentication,resource:i,fetchFn:u})}c(Md,"fetchToken");async function Od(n,{metadata:e,clientMetadata:t,scope:i,fetchFn:r}){let u;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");u=new URL(e.registration_endpoint)}else u=new URL("/register",n);let h=await ce(r??fetch)(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t,...i!==void 0?{scope:i}:{}})});if(!h.ok)throw await Ji(h);return yd.parse(await h.json())}c(Od,"registerClient");var Ke=class extends Error{static{c(this,"ParseError")}constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},eo=10,Nd=13,he=32;function as(n){}c(as,"noop");function so(n){if(typeof n=="function")throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:e=as,onError:t=as,onRetry:i=as,onComment:r,maxBufferSize:u}=n,h=[],p=0,z=!0,m,g="",x=0,v,E=!1;function j(y){if(E)throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(z&&(z=!1,y.charCodeAt(0)===239&&y.charCodeAt(1)===187&&y.charCodeAt(2)===191&&(y=y.slice(3))),h.length===0){let L=k(y);L!==""&&(h.push(L),p=L.length),R();return}if(y.indexOf(`
|
|
4
4
|
`)===-1&&y.indexOf("\r")===-1){h.push(y),p+=y.length,R();return}h.push(y);let b=h.join("");h.length=0,p=0;let M=k(b);M!==""&&(h.push(M),p=M.length),R()}c(j,"feed");function R(){u!==void 0&&(p+g.length<=u||(E=!0,h.length=0,p=0,m=void 0,g="",x=0,v=void 0,t(new Ke(`Buffered data exceeded max buffer size of ${u} characters`,{type:"max-buffer-size-exceeded"}))))}c(R,"checkBufferSize");function k(y){let b=0;if(y.indexOf("\r")===-1){let M=y.indexOf(`
|
|
5
5
|
`,b);for(;M!==-1;){if(b===M){x>0&&e({id:m,event:v,data:g}),m=void 0,g="",x=0,v=void 0,b=M+1,M=y.indexOf(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as R,c as p,d as m}from"./chunk-DRMOHADV.js";import{a as v}from"./chunk-RFQD6B44.js";import"./chunk-MTP3B2SU.js";import{w as O}from"./chunk-73TW6BKK.js";import"./chunk-27JGS3KB.js";import{d as P}from"./chunk-RPM4FDRX.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-XWPC3AN4.js";import{f as b}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"./chunk-X2J2P5ZT.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import
|
|
2
|
+
import"./chunk-W45RKGM6.js";import{u as O}from"./chunk-JPUSTFZC.js";import"./chunk-RFQD6B44.js";import{a as l}from"./chunk-DWM5G7BU.js";import"./chunk-RBTDSI4L.js";import"./chunk-XRKFTPHD.js";import"./chunk-JEMECEQH.js";import"./chunk-73TW6BKK.js";import"./chunk-27JGS3KB.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"./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"./chunk-X2J2P5ZT.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as E}from"node:module";import s from"node:path";import{fileURLToPath as _}from"node:url";var p="24.18.0";function g(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
|
|
3
3
|
`)}i(g,"openPondTuiNodeRuntimeMessage");var u=s.dirname(_(import.meta.url)),m=class extends Error{constructor(n,o){super(n);this.exitCode=o;this.name="OpenPondChildProcessExitError"}exitCode;static{i(this,"OpenPondChildProcessExitError")}};async function F(e,r,n){let o=f(e==="app-server"?"app-server":"server"),t=[...o.args,e,...v(r),...n];e==="web"&&t.push(r.noOpen===!0||r.noOpen==="true"?"--print-access-url":"--open-browser");let a=e==="web"&&typeof r.webRoot!="string"?R():null;a&&t.push("--web-root",a),await P(o.runner,t,e==="app-server"?process.cwd():o.cwd)}i(F,"runOpenPondServerCommand");async function q(e,r){C(e);let n=g();if(n)throw new l(n);let o=f("terminal"),t=f("server"),a=[...o.args,"chat",...v(y(e)),...r];await P(o.runner,a,process.cwd(),{OPENPOND_SERVER_RUNNER:t.runner,OPENPOND_SERVER_ARGS:JSON.stringify(t.args),OPENPOND_SERVER_CWD:t.cwd})}i(q,"runOpenPondTerminalCommand");function h(){if(process.env.OPENPOND_FORCE_EMBEDDED_COMPANIONS==="1")return null;let e=[s.resolve(u,"../../../.."),s.resolve(u,"../../.."),process.cwd()];for(let r of e)if(c(s.join(r,"apps","server"))&&c(s.join(r,"apps","terminal")))return r;return null}i(h,"findWorkspaceRoot");function f(e){let r=h();if(r){let t=e==="app-server"?s.join(r,"apps","server","src","app-server-entry.ts"):s.join(r,"apps",e,"src","index.ts");if(c(t)){let d=E(s.join(r,"package.json"));return{runner:process.execPath,args:[d.resolve("tsx/cli"),t],cwd:r}}let a=e==="app-server"?s.join(r,"apps","server","dist","app-server-entry.js"):s.join(r,"apps",e,"dist","index.js");if(c(a))return{runner:process.execPath,args:[a],cwd:r}}let n=w(),o=e==="app-server"?"__app-server":e==="server"?"__server":"__terminal";if(n)return{runner:process.execPath,args:[n,o],cwd:s.dirname(s.dirname(n))};if(b())return{runner:process.execPath,args:[o],cwd:process.cwd()};throw new Error(`Could not find the installed OpenPond ${e} companion.`)}i(f,"resolveAppEntrypoint");function w(){for(let e of[s.resolve(u,"../cli.js"),s.resolve(u,"../../dist/cli.js")])if(c(e))return e;return null}i(w,"installedCliEntrypoint");function R(){if(!1){let n=s.join(s.dirname(process.execPath),"web");return c(s.join(n,"index.html"))?n:null}let e=w();if(!e)return null;let r=s.join(s.dirname(e),"web");return c(s.join(r,"index.html"))?r:null}i(R,"packagedWebRoot");function b(){if(!1)return!0;let e=process.argv[1];return!!(e&&s.resolve(e)===s.resolve(process.execPath))}i(b,"isCompiledExecutable");function v(e){let r=new Set(["account","handle","baseUrl","noOpen","tui","home"]),n=[];for(let[o,t]of Object.entries(e)){if(r.has(o))continue;let a=`--${o.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}`;if(t===!0||t==="true")n.push(a);else{if(t===!1||t==="false")continue;n.push(a,t)}}return n}i(v,"forwardedOptions");function y(e){let r=process.cwd(),n={...e};return typeof e.cwd=="string"&&e.cwd.trim().length>0&&(n.cwd=s.resolve(r,e.cwd)),typeof e.messageFile=="string"&&e.messageFile.trim().length>0&&(n.messageFile=s.resolve(r,e.messageFile)),n}i(y,"normalizeTerminalPaths");function C(e){if(typeof e.approvalPolicy=="string"&&!["on-request","never","on-failure","untrusted"].includes(e.approvalPolicy))throw new l("approval-policy must be on-request, never, on-failure, or untrusted");if(typeof e.sandbox=="string"&&!["read-only","workspace-write","danger-full-access"].includes(e.sandbox))throw new l("sandbox must be read-only, workspace-write, or danger-full-access")}i(C,"validateTerminalForwardingOptions");async function P(e,r,n,o){let t=await O(e,r,{cwd:n,detached:!1,env:o,inherit:!0,timeoutMs:0});if(t.code!==0||t.signal){let a=t.signal?`signal ${t.signal}`:`code ${t.code??"unknown"}`;throw new m(`${s.basename(e)} exited with ${a}`,t.code??1)}}i(P,"runChild");export{m as OpenPondChildProcessExitError,F as runOpenPondServerCommand,q as runOpenPondTerminalCommand};
|
package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as u}from"./chunk-
|
|
2
|
+
import{a as u}from"./chunk-RY46UPBO.js";import{b as m}from"./chunk-27JGS3KB.js";import{a as d}from"./chunk-2LJCJOJ7.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{a as i}from"./chunk-FTQLQJQV.js";async function x(o){let n=await u(),e=process.env.OPENPOND_SANDBOX_API_KEY?.trim()||process.env.OPENPOND_API_KEY?.trim()||n.token?.trim();if(!e)throw new Error("OpenPond account API key is required to resolve connected apps.");let t=process.env.OPENPOND_SANDBOX_API_URL?.trim(),s=m({apiKey:e,...t?{sandboxApiUrl:d(t,{apiBaseUrl:t})}:{baseUrl:n.apiBaseUrl}}),l=o.status??"active";if(o.teamId?.trim())return s.integrationConnections({teamId:o.teamId.trim(),status:l});let p=await s.listOrganizations(),a=I(p);if(a.length===0)return{teamId:null,connections:[]};let c=(await Promise.all(a.map(r=>s.integrationConnections({teamId:r,status:l}).catch(()=>null)))).filter(r=>!!r);return{teamId:c.find(r=>r.connections.length>0)?.teamId??c[0]?.teamId??a[0]??null,connections:f(c)}}i(x,"listAppServerIntegrationConnections");function I(o){return Array.from(new Set(o.flatMap(n=>{if(typeof n.status=="string"&&n.status!=="active")return[];let e=n.id,t=typeof n.teamId=="string"?n.teamId:typeof e=="string"?e:"";return t.trim()?[t.trim()]:[]})))}i(I,"activeTeamIds");function f(o){let n=new Map;for(let e of o)for(let t of e.connections)n.set(t.id,t);return[...n.values()]}i(f,"mergeConnections");export{x as listAppServerIntegrationConnections};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{a as Y,b as Z}from"./chunk-ESYPMD7Q.js";import"./chunk-CO23RRN7.js";import{c as G,d as B,e as V}from"./chunk-VWWKWYSQ.js";import{a as C,p as z,q as Q,r as X}from"./chunk-OUJ63LMU.js";import{a as $,b as U}from"./chunk-EFP75UEX.js";import{b as F,c as K}from"./chunk-PACLKDTN.js";import{a as P}from"./chunk-ZIQJDTQB.js";import"./chunk-S7A2OGL2.js";import"./chunk-3Z4VM2LF.js";import"./chunk-EICS777E.js";import"./chunk-JQOVC35K.js";import"./chunk-FEAKTSRS.js";import"./chunk-TPOAAJKA.js";import"./chunk-RCQYEHHD.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-SDHG6CKU.js";import"./chunk-XHACK2KR.js";import"./chunk-W45RKGM6.js";import"./chunk-WCNPGKST.js";import"./chunk-AFH462DO.js";import"./chunk-UANH7U3Y.js";import"./chunk-CIZI6Z7D.js";import{b as L}from"./chunk-7PKDJHT6.js";import"./chunk-65WRWLUD.js";import"./chunk-RHMULF56.js";import"./chunk-VFH5C6D2.js";import{a as W}from"./chunk-UOFDKMRU.js";import"./chunk-EYTTZ5H4.js";import"./chunk-XY7HFXLH.js";import{Z as R}from"./chunk-6I5AUTVO.js";import"./chunk-DKOVZ6R2.js";import"./chunk-U7X5ZLAL.js";import"./chunk-AFKFN25T.js";import"./chunk-G4747MOW.js";import"./chunk-KCJVFLBB.js";import{s as k,u as M}from"./chunk-OFJPOTES.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-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-AMC4Z7G4.js";import"./chunk-LK77GI6M.js";import"./chunk-HVM2GUM3.js";import{f as J}from"./chunk-I6VMRQF4.js";import"./chunk-D6L6UNUQ.js";import"./chunk-AJXWJLZA.js";import"./chunk-OKKNDQJF.js";import{S as N}from"./chunk-4PUOWSDE.js";import{v as j}from"./chunk-ZY32SZ2P.js";import"./chunk-OTDDXEQ6.js";import"./chunk-ECOH24MC.js";import"./chunk-GY7YSD6J.js";import"./chunk-KUE46HTH.js";import"./chunk-6FA3GG5B.js";import"./chunk-SV7ZBEK2.js";import"./chunk-2MEOUS24.js";import"./chunk-HNQPEOJD.js";import{n as S}from"./chunk-RCT3O3HQ.js";import"./chunk-UGOK7VTC.js";import"./chunk-ZFJWA4JK.js";import{A as s}from"./chunk-X2J2P5ZT.js";import{a as r}from"./chunk-FTQLQJQV.js";import{createHash as le}from"node:crypto";function q(v,o){if(o.environment.kind!=="javascript")throw new Error("experiment_environment_required");let{definition:t,asset:d}=o.environment,l=N(d,t.module),p=le("sha256").update(o.id).digest("hex"),x=0;return async a=>{if(a.signal?.throwIfAborted(),a.source!==l)throw new Error("experiment_environment_source_mismatch");let c=a.value.action,n=t.executionServices?.filter(y=>y.operation===a.operation&&(a.operation!=="step"||y.toolName===c?.name))??[];if(S(a.executionServices??[])!==S(n))throw new Error("experiment_environment_services_mismatch");let u=x++,h=await v.request({contractVersion:R,requestId:`environment-${p}-${u}`,operation:"experiment/environment",params:{caseId:o.id,admissionHash:o.admissionHash,definitionHash:t.contentHash,ordinal:u,operation:a.operation,value:a.value,timeoutMs:a.timeoutMs}},3e5);return a.signal?.throwIfAborted(),j(h,1572864),J.parse(h)}}r(q,"createHostExperimentEnvironment");import{createHash as pe}from"node:crypto";var ce=s.object({text:s.string().max(262144),toolCalls:s.array(s.object({id:s.string().min(1).max(200),name:s.string().min(1).max(64),arguments:s.record(s.string(),s.unknown())}).strict()).max(200)}).strict();function H(v,o){let t=0;return async({messages:d,tools:l,signal:p})=>{p.throwIfAborted();let x=t++,a=await v.request({contractVersion:R,requestId:`experiment-${pe("sha256").update(o.id).digest("hex")}-${x}`,operation:"experiment/policy",params:{caseId:o.id,admissionHash:o.admissionHash,ordinal:x,messages:d.map(c=>({...c})),tools:l.map(c=>({...c}))}},Math.min(o.timeoutMs,3e5));return p.throwIfAborted(),ce.parse(a)}}r(H,"createHostExperimentPolicy");function ee(v,o,t){let d=H(v,o);return async function*(l){let p=o.model;if(!l.signal||l.model!==p.modelId||l.maxTokens!==p.maxOutputTokens||l.temperature!==p.temperature||l.topP!==p.topP)throw new Error("Native Experiment policy request differs from its admitted model configuration.");let x=l.messages.map(n=>{if(n.images?.length||n.continuation)throw new Error("The owner policy capability does not admit multimodal or caller-supplied continuation inputs.");if(n.role==="tool")return{role:"tool",callId:s.string().min(1).max(200).parse(n.tool_call_id),name:s.string().min(1).max(64).parse(n.name),observation:ue(n.content??"")};if(n.role==="assistant")return{role:"assistant",text:n.content??"",toolCalls:(n.tool_calls??[]).map(u=>({id:s.string().min(1).max(200).parse(u.id),name:s.string().min(1).max(64).parse(u.function?.name),arguments:s.record(s.string(),s.unknown()).parse(JSON.parse(s.string().parse(u.function?.arguments)))}))};if(n.role!=="user"&&n.role!=="system")throw new Error("Native Experiment message role is not admitted.");return{role:n.role,text:n.content??""}}),a=(l.tools??[]).map(n=>{if(n.type!=="function"||!n.function)throw new Error("Native Experiment requires declared function tools.");let u=t.find(h=>h.name===n.function.name);if(!u||S(n.function.parameters)!==u.inputSchemaHash)throw new Error("Native Experiment requested an undeclared or changed tool.");return u});if(a.length!==t.length||new Set(a.map(n=>n.name)).size!==a.length)throw new Error("Native Experiment changed its admitted tool inventory.");let c=await d({messages:x,tools:a,signal:l.signal});l.signal.throwIfAborted(),c.text&&(yield{type:"text_delta",text:c.text,raw:null}),c.toolCalls.length&&(yield{type:"tool_call_delta",toolCalls:c.toolCalls.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:JSON.stringify(n.arguments)}})),raw:null}),yield{type:"finish",finishReason:c.toolCalls.length?"tool_calls":"stop",raw:null}}}r(ee,"createHostExperimentNativeStream");function ue(v){try{let o=JSON.parse(v);return o&&typeof o=="object"&&!Array.isArray(o)?o:{output:o}}catch{return{output:v}}}r(ue,"observation");function Qe(v){let{options:o,store:t,storeDir:d,explicitProfileRelease:l,externalDataset:p,isolatedProfileTools:x,selectedEvaluationProfile:a,listProfileWorkflows:c,createSessionWithAutoTitle:n,turnRunner:u,streamOpenPondHostedChatTurn:h,publishedExperimentSource:y,standaloneExperimentOwner:D}=v,w=new AbortController,oe=G({resolveExternalDataset:p?.resolveExternalDataset,admitSession:x?.admitSession,settleSession:x?.settleSession,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),store:t,storeDir:d,selectedProfile:a,createSession:n,sendTurn:r((e,i,m)=>u.sendTurn(e,i,void 0,void 0,m),"sendTurn"),interruptSessionTurn:u.interruptSessionTurn}),T=r((e,i)=>oe(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationCase"),I=z({privateGradingPreflight:r(e=>Q(e,!1),"privateGradingPreflight"),resolveExternalDataset:p?.resolveExternalDataset,sourceCandidate:p?.sourceCandidate,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),selectedWorkflows:c,loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),modelConfigurationHash:r(async(e,i)=>{if(!o.profileSource||e.providerId!=="openpond"||!i.hostModelConfigurationHash)throw new Error("Hosted Profile evaluation requires an explicit source and trusted OpenPond model configuration receipt.");return i.hostModelConfigurationHash},"modelConfigurationHash"),placement:"remote"}),te=B({loadTasksetPackage:r((e,i,m)=>C({store:t,storeDir:d,definition:e,profileId:i,harnessRelease:m}),"loadTasksetPackage"),privateGrading:r(async(e,i,m)=>X({manifest:e,packageValue:i,signal:m,authorize:r(async()=>{let f=await a(),E=e.profileEvaluation;if(!f||!E||f.ref.profileId!==E.profileId||f.sourceRevision!==E.sourceRevision)throw new Error("The current private Profile source changed.");p&&await p.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:e.contentHash});let O=await P({ref:f.ref,sourceRevision:f.sourceRevision,harnessRelease:E.harnessRelease,store:t});if(!E.externalDatasetBinding&&O.catalogHash!==E.catalogHash)throw new Error("The current private evaluation catalog changed.")},"authorize")}),"privateGrading"),resolveExternalDataset:p?.resolveExternalDataset,loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedProfile:a,executeCase:T}),A=r((e,i)=>te(e,i?AbortSignal.any([i,w.signal]):w.signal),"executeProfileEvaluationRun"),re=V({loadCatalog:r(e=>P({...e,store:t}),"loadCatalog"),store:t,selectedWorkflows:c,prepareRun:I,executeRun:A}),b=Y({...y&&o.experimentPolicyClient?{executeHarness:r(async(e,i)=>{if(!e.harness||!D)throw new Error("Standalone Experiment source owner is unavailable.");return(await D.execute({executionId:e.id,request:e,source:e.harness,stream:ee(o.experimentPolicyClient,e,W(y.release)),signal:i,maxOutputBytes:262144})).attempt},"executeHarness")}:{},...o.experimentPolicyClient?{resolveEnvironment:r(async e=>q(o.experimentPolicyClient,e),"resolveEnvironment")}:{},resolvePolicy:r(async e=>o.experimentPolicyClient?H(o.experimentPolicyClient,e):Z({request:e,stream:h}),"resolvePolicy"),executeProfile:r(e=>{if(o.experimentPolicyClient)throw new Error("A model-case owner cannot execute a Profile.");return T(e)},"executeProfile")});return{listProfileEvaluations:r(async e=>{if(e&&typeof e=="object"&&!Array.isArray(e)&&"runId"in e){let _=F.parse(e),g=await a();if(!g)throw new Error("Select a Profile before inspecting an evaluation run.");return K({store:t,profileRef:g.ref,..._})}if(o.profileSource&&l){let _=await P({store:t,ref:{source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId},sourceRevision:o.profileSource.sourceRevision,harnessRelease:{id:l.harnessRelease.id,contentHash:l.harnessRelease.contentHash}}),[g,ae,se]=await Promise.all([t.listProfileEvaluationRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationComparisons({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId}),t.listProfileEvaluationSuiteRuns({source:"openpond_git",repositoryId:o.profileSource.repositoryId,profileId:o.profileSource.profileId})]);return{..._,runs:g,comparisons:ae,suiteRuns:se}}let[i,m]=await Promise.all([M(),k()]);if(!i.lastUsed)throw new Error("Select a Profile before loading its evaluations.");let f=await L({store:t,storeDir:d,ref:i.lastUsed,profile:m,reloadProfile:k}),E=await P({store:t,ref:f.profileRef,sourceRevision:f.sourceRevision,harnessRelease:f.harnessRelease}),[O,ne,ie]=await Promise.all([t.listProfileEvaluationRuns(f.profileRef),t.listProfileEvaluationComparisons(f.profileRef),t.listProfileEvaluationSuiteRuns(f.profileRef)]);return{...E,runs:O,comparisons:ne,suiteRuns:ie}},"listProfileEvaluations"),executeProfileEvaluationCase:T,executeExperimentCase:b.execute,cancelExperimentCase:r(e=>Promise.resolve(b.cancel(s.object({id:s.string().min(1)}).strict().parse(e).id)),"cancelExperimentCase"),executeProfileEvaluationRun:A,prepareProfileEvaluationRun:I,runPreparedProfileEvaluation:r(async e=>A(await I(e,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:re,compareProfileEvaluationRuns:$({store:t,selectedProfile:a}),buildProfileEvaluationReport:r(async e=>{let i=await a();if(!i)throw new Error("Select a Profile before building an evaluation report.");return U({store:t,profileRef:i.ref,request:e})},"buildProfileEvaluationReport"),async close(){w.abort(new Error("Evaluation runtime closed")),await b.close()}}}r(Qe,"createAppServerEvaluations");export{Qe as createAppServerEvaluations};
|