@mcp-use/inspector 0.22.2 → 0.22.3-canary.0
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/cdn/inspector.js +2 -2
- package/dist/cli.js +13 -12
- package/dist/client/index.js +55 -55
- package/dist/server/{chunk-YF6BUSE7.js → chunk-42S46FP7.js} +1 -1
- package/dist/server/chunk-4CQ52PTY.js +10 -0
- package/dist/server/{chunk-YP2ENXIT.js → chunk-S2MXUMF5.js} +5 -7
- package/dist/server/cli.js +2 -1
- package/dist/server/index.js +3 -2
- package/dist/server/middleware.js +3 -2
- package/dist/server/server.js +2 -1
- package/dist/server/shared-static.d.ts.map +1 -1
- package/dist/server/shared-static.js +2 -1
- package/dist/server/version.d.ts +8 -0
- package/dist/server/version.d.ts.map +1 -0
- package/dist/server/version.js +9 -0
- package/dist/web/assets/{1c-DdyTu-k_.js → 1c-DZnw7s6X.js} +1 -1
- package/dist/web/assets/{abnf-C2DLuWsJ.js → abnf-CC7QdSr-.js} +1 -1
- package/dist/web/assets/{accesslog-BcPmBnek.js → accesslog-BJbPkxNz.js} +1 -1
- package/dist/web/assets/{actionscript-BX-T-H0r.js → actionscript-DEHQAsSG.js} +1 -1
- package/dist/web/assets/{ada-bFUa8rWB.js → ada-Dbik0gGy.js} +1 -1
- package/dist/web/assets/{angelscript--QyowWyi.js → angelscript-B5OJwnZC.js} +1 -1
- package/dist/web/assets/{apache-CSPxjWTM.js → apache-BLr4fQVc.js} +1 -1
- package/dist/web/assets/{applescript-Beh8nYPj.js → applescript-unlwTTPm.js} +1 -1
- package/dist/web/assets/{arcade-7vaiax_h.js → arcade-IjOK4uHk.js} +1 -1
- package/dist/web/assets/{arduino-D67F76RP.js → arduino-Bby8wNAQ.js} +1 -1
- package/dist/web/assets/{armasm-DWQZh6t7.js → armasm-M-FI9QVE.js} +1 -1
- package/dist/web/assets/{asciidoc-DCLwNk1M.js → asciidoc-Id32qH4B.js} +1 -1
- package/dist/web/assets/{aspectj-C7zkyhZG.js → aspectj-BwShjTMm.js} +1 -1
- package/dist/web/assets/{autohotkey-D67jHa54.js → autohotkey-DmzjSbJg.js} +1 -1
- package/dist/web/assets/{autoit-YshTFaZR.js → autoit-CQZ2RCRg.js} +1 -1
- package/dist/web/assets/{avrasm-QFQOAcRR.js → avrasm-CMrfRCX8.js} +1 -1
- package/dist/web/assets/{awk-h3G4tOxj.js → awk-EjBYnBNG.js} +1 -1
- package/dist/web/assets/{axapta-Ck2tuXpL.js → axapta-BZON7q40.js} +1 -1
- package/dist/web/assets/{bash-SNro2FI9.js → bash-Bn8U94IS.js} +1 -1
- package/dist/web/assets/{basic-CdFIzr_S.js → basic-CaT5ZWWN.js} +1 -1
- package/dist/web/assets/{bnf-CoDF7W_1.js → bnf-Bzq9zEi_.js} +1 -1
- package/dist/web/assets/{brainfuck-Bt-q8Sif.js → brainfuck-DNkCC50X.js} +1 -1
- package/dist/web/assets/{c-CSy1LJEc.js → c-Dpq8i4S1.js} +1 -1
- package/dist/web/assets/{c-like-CgJH8TzM.js → c-like-CuKbDm-z.js} +1 -1
- package/dist/web/assets/{cal-BN4ZaGC3.js → cal-CWw2mkCk.js} +1 -1
- package/dist/web/assets/{capnproto-DtQwy4ia.js → capnproto-C3ly2uvS.js} +1 -1
- package/dist/web/assets/{ceylon-rt4387UK.js → ceylon-BVLdqL7s.js} +1 -1
- package/dist/web/assets/{clean-Cyb94-bm.js → clean-DbcGmEIm.js} +1 -1
- package/dist/web/assets/{client-hyRgVCty.js → client-54wbSxe9.js} +3 -3
- package/dist/web/assets/{clojure-CLewI5lA.js → clojure-BEVDqjiT.js} +1 -1
- package/dist/web/assets/{clojure-repl-BtzgAt1p.js → clojure-repl-B_a7mvbb.js} +1 -1
- package/dist/web/assets/{cmake-DWrK9r_0.js → cmake-D_Uoc43D.js} +1 -1
- package/dist/web/assets/{coffeescript-dC8dxgju.js → coffeescript-C8oQpsYq.js} +1 -1
- package/dist/web/assets/{coq-Dx-VjjMG.js → coq-DhAtS7Sy.js} +1 -1
- package/dist/web/assets/{core-l5FbiT9y.js → core-CwA9F7nj.js} +1 -1
- package/dist/web/assets/{cos-8hM_upPC.js → cos-2t4pxvFX.js} +1 -1
- package/dist/web/assets/{cpp-C9q7oMVc.js → cpp-CZp796Up.js} +1 -1
- package/dist/web/assets/{crmsh-CM-iDW78.js → crmsh-BsHiXTqg.js} +1 -1
- package/dist/web/assets/{crystal-B89CGmJl.js → crystal-C0xP6SWW.js} +1 -1
- package/dist/web/assets/{csharp-BML5bF5U.js → csharp-DWKNRBwW.js} +1 -1
- package/dist/web/assets/{csp-BFgIYW7p.js → csp-aw78YzBw.js} +1 -1
- package/dist/web/assets/{css-Bmr2MmHJ.js → css-DFC_-FoG.js} +1 -1
- package/dist/web/assets/{d-Bl1waUG7.js → d-DaiIbPuE.js} +1 -1
- package/dist/web/assets/{dart-7WM1pTL7.js → dart-toiTceA3.js} +1 -1
- package/dist/web/assets/{delphi-BATb_6La.js → delphi-C90nTJaU.js} +1 -1
- package/dist/web/assets/{diff-DQixhTxV.js → diff-ud4JOKXR.js} +1 -1
- package/dist/web/assets/{display-A5IEINAP-CIPa27wl.js → display-A5IEINAP-DNCj3jM3.js} +2 -2
- package/dist/web/assets/{django-BaiMyL7a.js → django-BHEftxjG.js} +1 -1
- package/dist/web/assets/{dns-B9LMXwq0.js → dns-DEc7Xnep.js} +1 -1
- package/dist/web/assets/{dockerfile-CgRRyc7d.js → dockerfile-mGzLo84J.js} +1 -1
- package/dist/web/assets/{dos-CUi0wmYe.js → dos-Co7ouaC2.js} +1 -1
- package/dist/web/assets/{dsconfig-CtHPMV_z.js → dsconfig-DSGceMOB.js} +1 -1
- package/dist/web/assets/{dts-Da6KiRGb.js → dts-BKrem2GL.js} +1 -1
- package/dist/web/assets/{dust-CtSB5RuR.js → dust-BGVd9Poh.js} +1 -1
- package/dist/web/assets/{ebnf-Civ7z3Sl.js → ebnf-HnHGU665.js} +1 -1
- package/dist/web/assets/{elixir-BRz9w0Jz.js → elixir-BzrW0gPw.js} +1 -1
- package/dist/web/assets/{elm-BLvIF2ZJ.js → elm-DIMyHR9W.js} +1 -1
- package/dist/web/assets/{embeddings-DgQZkbYX.js → embeddings-H_oXPOEK.js} +1 -1
- package/dist/web/assets/{erb-yf3e-otT.js → erb-xxY69Qav.js} +1 -1
- package/dist/web/assets/{erlang-u1gFvkzN.js → erlang-CdYGhXjB.js} +1 -1
- package/dist/web/assets/{erlang-repl-ygAXsKis.js → erlang-repl-BC5_Q0SJ.js} +1 -1
- package/dist/web/assets/{excel-Dr1VKgu5.js → excel-BYjL-JOj.js} +1 -1
- package/dist/web/assets/{fix-CQ9USTvQ.js → fix-zIfGJNNE.js} +1 -1
- package/dist/web/assets/{flix-CK8VWwdt.js → flix-D1HSnWY0.js} +1 -1
- package/dist/web/assets/{fortran-ChxBIVaA.js → fortran-_VeFQeKq.js} +1 -1
- package/dist/web/assets/{fsharp-C2VB7uZ8.js → fsharp-V0hT02uc.js} +1 -1
- package/dist/web/assets/{gams-cNOVPE3r.js → gams-B41TW8f7.js} +1 -1
- package/dist/web/assets/{gauss-Bqbzwh3H.js → gauss-DWpwJuuz.js} +1 -1
- package/dist/web/assets/{gcode-CCf3GJpC.js → gcode-CgS-YWXe.js} +1 -1
- package/dist/web/assets/{gherkin-zMG7sQxB.js → gherkin-F4-zpWFQ.js} +1 -1
- package/dist/web/assets/{glsl-ChXPtZtn.js → glsl-DWl9BTCz.js} +1 -1
- package/dist/web/assets/{gml-Dkbq2p7u.js → gml-D3fOLi7i.js} +1 -1
- package/dist/web/assets/{go-C_rm61mN.js → go-CwdHk51s.js} +1 -1
- package/dist/web/assets/{golo-BHw2HzNW.js → golo-P-LNA0RC.js} +1 -1
- package/dist/web/assets/{gradle-dmNWlxt5.js → gradle-C9XgG3Di.js} +1 -1
- package/dist/web/assets/{groovy-BYRQ-Iq8.js → groovy-O6bTsoU7.js} +1 -1
- package/dist/web/assets/{haml-CUGq_1r0.js → haml-DGBm8Zvh.js} +1 -1
- package/dist/web/assets/{handlebars-ClqAsR9Y.js → handlebars-NKxSduFI.js} +1 -1
- package/dist/web/assets/{haskell-D1EUHyyy.js → haskell-Bwqeit3p.js} +1 -1
- package/dist/web/assets/{haxe-D5_584-N.js → haxe-COFOhJpG.js} +1 -1
- package/dist/web/assets/{hsp-CxOObZJt.js → hsp-CoibUPf7.js} +1 -1
- package/dist/web/assets/{htmlbars-BcxYs9JO.js → htmlbars-BfGrM6mo.js} +1 -1
- package/dist/web/assets/{http-IoGXsslz.js → http-oILU7GOM.js} +1 -1
- package/dist/web/assets/{hy-DOezFVYJ.js → hy-JiZOdu60.js} +1 -1
- package/dist/web/assets/{index-BWHJKdRK.js → index-BIIUUDkX.js} +1 -1
- package/dist/web/assets/{index-Brj1Oahm.js → index-BZ7vNueo.js} +1 -1
- package/dist/web/assets/{index-BQMLPync.js → index-BkKvh1rI.js} +1 -1
- package/dist/web/assets/{index-58vKJ_rW.js → index-DZf_QPlz.js} +1 -1
- package/dist/web/assets/{index-BzCXH-MY.js → index-VIKu1lMD.js} +1 -1
- package/dist/web/assets/{index-CeFusmJF.js → index-_RJPxEz8.js} +8 -8
- package/dist/web/assets/{index-Df6PS_lJ.js → index-iYDybM8x.js} +1 -1
- package/dist/web/assets/{inform7-4DkSrciU.js → inform7-D81k92JP.js} +1 -1
- package/dist/web/assets/{ini-BAOejxzX.js → ini-DNRte9XL.js} +1 -1
- package/dist/web/assets/{irpf90-CPhvVsrR.js → irpf90-vEzpkpjX.js} +1 -1
- package/dist/web/assets/{isbl-B9cEpNQ2.js → isbl-BOef8Btz.js} +1 -1
- package/dist/web/assets/{java-B4D9vUuB.js → java-c8GRA-er.js} +1 -1
- package/dist/web/assets/{javascript-BUcy5JSl.js → javascript-CHMOCO5T.js} +1 -1
- package/dist/web/assets/{jboss-cli-rk3boy7C.js → jboss-cli-Ce6OPglh.js} +1 -1
- package/dist/web/assets/{json-DMjBKfEa.js → json-DyQ5W1KT.js} +1 -1
- package/dist/web/assets/{julia-ByXC6uTj.js → julia-Bg03FCB4.js} +1 -1
- package/dist/web/assets/{julia-repl-BRG6tLsN.js → julia-repl-_j-oTZEV.js} +1 -1
- package/dist/web/assets/{kotlin-LVfLRQA6.js → kotlin-CWHtSs-c.js} +1 -1
- package/dist/web/assets/{langfuse-U2OEF7K7-BHNkft2N.js → langfuse-U2OEF7K7-C8oV_lsC.js} +3 -3
- package/dist/web/assets/{lasso-BcDeHYYs.js → lasso-Ckz4MeiE.js} +1 -1
- package/dist/web/assets/{latex-BQLu7e0M.js → latex-sooK6Sib.js} +1 -1
- package/dist/web/assets/{ldif-MoWOvygf.js → ldif-D7I0DA7C.js} +1 -1
- package/dist/web/assets/{leaf-Dc_ryT_U.js → leaf-mnYgCewe.js} +1 -1
- package/dist/web/assets/{less-xL-2sUOW.js → less-rUeAWLYu.js} +1 -1
- package/dist/web/assets/{lisp-CQgkxiVN.js → lisp-Bjm_yazg.js} +1 -1
- package/dist/web/assets/{livecodeserver-CnHs8DDk.js → livecodeserver-BgHTrCGl.js} +1 -1
- package/dist/web/assets/{livescript-Bq3GcA8X.js → livescript-B5PPSkJL.js} +1 -1
- package/dist/web/assets/{llms-DJAqua6W.js → llms-ClwyAiVe.js} +1 -1
- package/dist/web/assets/{llvm-g2SZAh5n.js → llvm-CpQpgawq.js} +1 -1
- package/dist/web/assets/{lsl-duYC8WGZ.js → lsl-CYYA0yOt.js} +1 -1
- package/dist/web/assets/{lua-BKi5mh_G.js → lua-BfvJ8M4c.js} +1 -1
- package/dist/web/assets/{makefile-BqeicODu.js → makefile-CPd-9UxR.js} +1 -1
- package/dist/web/assets/{markdown-BG4LCYiF.js → markdown--s2fTW6P.js} +1 -1
- package/dist/web/assets/{mathematica-abL0r-fQ.js → mathematica-CWnlvg9n.js} +1 -1
- package/dist/web/assets/{matlab-UvEnHOa4.js → matlab-BdcbVH3V.js} +1 -1
- package/dist/web/assets/{maxima-WaftEzY-.js → maxima-C7Wj0Res.js} +1 -1
- package/dist/web/assets/{mel-B2MSGRGp.js → mel-iBNrspN4.js} +1 -1
- package/dist/web/assets/{mercury-D-B5OKnw.js → mercury-m3ncLu5_.js} +1 -1
- package/dist/web/assets/{mipsasm-BN0bNdeJ.js → mipsasm-DI-8rmuH.js} +1 -1
- package/dist/web/assets/{mizar-B9qd-OhV.js → mizar-ptzPWTFA.js} +1 -1
- package/dist/web/assets/{mojolicious-DojZjej7.js → mojolicious-DxmbAWBm.js} +1 -1
- package/dist/web/assets/{monkey-DTUG_uUK.js → monkey-CZgyjN2U.js} +1 -1
- package/dist/web/assets/{moonscript-BxxoAw0w.js → moonscript-DywS5mth.js} +1 -1
- package/dist/web/assets/{n1ql-DoMSEnVI.js → n1ql-DwvXK2gO.js} +1 -1
- package/dist/web/assets/{nginx-Ce5-hgf7.js → nginx-bORSW2xD.js} +1 -1
- package/dist/web/assets/{nim--cUhot81.js → nim-CZKt6GB6.js} +1 -1
- package/dist/web/assets/{nix-CFzICQwT.js → nix-BW0IEDG2.js} +1 -1
- package/dist/web/assets/{node-repl-8uW0BP3C.js → node-repl-81pV5NBr.js} +1 -1
- package/dist/web/assets/{nsis-D85QEHck.js → nsis-D5JnRcnq.js} +1 -1
- package/dist/web/assets/{objectivec-CO4ZKM1N.js → objectivec-B5BWu-ye.js} +1 -1
- package/dist/web/assets/{ocaml-MdZmIFP9.js → ocaml-BHNFzsjl.js} +1 -1
- package/dist/web/assets/{openscad-Dd_k-u5o.js → openscad-CCtidWFa.js} +1 -1
- package/dist/web/assets/{oxygene-C9_JJ-Tz.js → oxygene-DCnMsOYf.js} +1 -1
- package/dist/web/assets/{parser3--hakx1TP.js → parser3-BNAIGBDM.js} +1 -1
- package/dist/web/assets/{perl-Bryi0MIt.js → perl-DJ9dP6fO.js} +1 -1
- package/dist/web/assets/{pf-ZaeD0XU8.js → pf-B8w7075G.js} +1 -1
- package/dist/web/assets/{pgsql-9scnk6gR.js → pgsql-CW4EREF2.js} +1 -1
- package/dist/web/assets/{php-Fdiy0MkS.js → php-DGRk4WNQ.js} +1 -1
- package/dist/web/assets/{php-template-BYeCSEy4.js → php-template-BJG-xHOo.js} +1 -1
- package/dist/web/assets/{plaintext-FbFisAWv.js → plaintext-DxYa9Ly0.js} +1 -1
- package/dist/web/assets/{pony-B0HARvcw.js → pony-C5g5qBLG.js} +1 -1
- package/dist/web/assets/{powershell-DUssROtG.js → powershell-d6URCkN_.js} +1 -1
- package/dist/web/assets/{processing-BQZO45D3.js → processing-tB5L13yJ.js} +1 -1
- package/dist/web/assets/{profile-CcGplmcc.js → profile-Czigjn-_.js} +1 -1
- package/dist/web/assets/{prolog-B0NhCbAQ.js → prolog-DT27T5OR.js} +1 -1
- package/dist/web/assets/{properties-CWjoVJ5W.js → properties-CVVDOj3G.js} +1 -1
- package/dist/web/assets/{protobuf-D58gQeRM.js → protobuf-DfUnyvjH.js} +1 -1
- package/dist/web/assets/{puppet-Ba9doIt2.js → puppet-Cb-5uTYy.js} +1 -1
- package/dist/web/assets/{purebasic-BrH-D46w.js → purebasic-BCvOWHfi.js} +1 -1
- package/dist/web/assets/{python-CjvAeSv8.js → python-JVILnm84.js} +1 -1
- package/dist/web/assets/{python-repl-Jgv_SkQ0.js → python-repl-CxK2GLK-.js} +1 -1
- package/dist/web/assets/{q-DgYB_ewM.js → q-B-AKexPG.js} +1 -1
- package/dist/web/assets/{qml-C7I-vh-W.js → qml-B0b6RKW7.js} +1 -1
- package/dist/web/assets/{r-DUpFDXxH.js → r-DQV0h4jO.js} +1 -1
- package/dist/web/assets/{reasonml-Dxs-bF-2.js → reasonml-7CS8xI6x.js} +1 -1
- package/dist/web/assets/{rib-CQL270qQ.js → rib-syHtTPYJ.js} +1 -1
- package/dist/web/assets/{roboconf-krxtbKe1.js → roboconf-CK8wrurY.js} +1 -1
- package/dist/web/assets/{routeros-BGBHdfxg.js → routeros-DdGZ8LOg.js} +1 -1
- package/dist/web/assets/{rsl-CxAtY_02.js → rsl-BGjqYvMc.js} +1 -1
- package/dist/web/assets/{ruby-DJm1xcVx.js → ruby-DxbPNeU8.js} +1 -1
- package/dist/web/assets/{ruleslanguage-BnhvTD6g.js → ruleslanguage-CZgajcri.js} +1 -1
- package/dist/web/assets/{rust-DQe5T9WQ.js → rust-DErprkl3.js} +1 -1
- package/dist/web/assets/{sas-6xbHPzOh.js → sas-YQ91uw7o.js} +1 -1
- package/dist/web/assets/{scala-DZlwYVr9.js → scala-KzvN9dhB.js} +1 -1
- package/dist/web/assets/{scheme-DXL_Buip.js → scheme-_L7M1NUa.js} +1 -1
- package/dist/web/assets/{scilab-CKRl_kfB.js → scilab-3e9pbpYA.js} +1 -1
- package/dist/web/assets/{scss-jr09pBlW.js → scss-1HJ8_svy.js} +1 -1
- package/dist/web/assets/{shell-CxU4VQpG.js → shell-D-_Urbz9.js} +1 -1
- package/dist/web/assets/{smali-BsXFpLll.js → smali-DlJaEacQ.js} +1 -1
- package/dist/web/assets/{smalltalk-D2nr_49h.js → smalltalk-DK2vF_Zk.js} +1 -1
- package/dist/web/assets/{sml-B16pEEUV.js → sml-JYMXYrX5.js} +1 -1
- package/dist/web/assets/{sqf-BRaN4nE_.js → sqf-DgdcPvZk.js} +1 -1
- package/dist/web/assets/{sql-CeIac2_e.js → sql-B7I2EYBF.js} +1 -1
- package/dist/web/assets/{sql_more-ZIMlJNGg.js → sql_more-DpO_x8oq.js} +1 -1
- package/dist/web/assets/{stan-DmpIhD_z.js → stan-D-gIYt5d.js} +1 -1
- package/dist/web/assets/{stata-0ytqR1Ib.js → stata-CleFHP0L.js} +1 -1
- package/dist/web/assets/{stdio-PVTCK7WZ-C_E3pv0k.js → stdio-FSQAEK4N-BH810Yfi.js} +1 -1
- package/dist/web/assets/{step21-C5gS7qwT.js → step21-B553X21l.js} +1 -1
- package/dist/web/assets/{stylus-DUzDJYfR.js → stylus-DIFetxcS.js} +1 -1
- package/dist/web/assets/{subunit-BgugsJpP.js → subunit-BnuQu5ZT.js} +1 -1
- package/dist/web/assets/{swift-Cq31xV9A.js → swift-D1bRgG93.js} +1 -1
- package/dist/web/assets/{taggerscript-D6rUQ5Ju.js → taggerscript-DR_1s48k.js} +1 -1
- package/dist/web/assets/{tap-DkraFPBQ.js → tap-DSUWqOXI.js} +1 -1
- package/dist/web/assets/{tcl-87kkAxdg.js → tcl-cfTPTgSv.js} +1 -1
- package/dist/web/assets/{thrift-CHkbhRQC.js → thrift-Di-16I9L.js} +1 -1
- package/dist/web/assets/{tp-D5drOrfs.js → tp-LEtYmsdx.js} +1 -1
- package/dist/web/assets/{twig-JUSSxmsN.js → twig-DZ8b4BWJ.js} +1 -1
- package/dist/web/assets/{typescript-DxY7tpO6.js → typescript-B8Hf3DjE.js} +1 -1
- package/dist/web/assets/{vala-BKhreswN.js → vala-BWBt6Q-x.js} +1 -1
- package/dist/web/assets/{vbnet-BHYN5PHo.js → vbnet-BCQAHMri.js} +1 -1
- package/dist/web/assets/{vbscript-eErGIKc5.js → vbscript-Bh-vArwX.js} +1 -1
- package/dist/web/assets/{vbscript-html-BVPWl6WP.js → vbscript-html-Bc_IuM6m.js} +1 -1
- package/dist/web/assets/{verilog-DbaUNZdo.js → verilog-D75m6ODV.js} +1 -1
- package/dist/web/assets/{vhdl-UR-HSHjG.js → vhdl-CsPrlcVf.js} +1 -1
- package/dist/web/assets/{vim-Dk1XUiA7.js → vim-D2ExALBt.js} +1 -1
- package/dist/web/assets/{x86asm-B9c_N4c6.js → x86asm-C1o7Zh_S.js} +1 -1
- package/dist/web/assets/{xl-swOLfPCO.js → xl-DFsEGZ92.js} +1 -1
- package/dist/web/assets/{xml-BpZLXHyv.js → xml-CWQU1n2u.js} +1 -1
- package/dist/web/assets/{xquery-RWTIln5p.js → xquery-CJdkvlQW.js} +1 -1
- package/dist/web/assets/{yaml-k20kwc4p.js → yaml-CnQSZf4V.js} +1 -1
- package/dist/web/assets/{zephir-7ED-2Mm2.js → zephir-COV6RHjL.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a7 as Ue,a8 as je,a9 as J,aa as ae,b as Ae,ab as H,Q as le,n as U,ac as kt,ad as xt,ae as Mt,af as Pt,ag as Rt,ah as Ft,ai as Lt,aj as Dt,ak as Bt,al as Ut,i as jt,am as Vt,an as zt,ao as Gt,d as Zt,ap as $t,aq as Ht,ar as Wt,as as Jt,at as Xt,x as Yt,au as Kt,c as He,av as qt,aw as We,ax as Qt,ay as ea,az as ta,aA as Se,aB as aa,aC as sa,aD as na,r as ra,w as Je,aE as re,e as oe,aF as Xe,aG as Ye,D as ce,C as _e,aH as Ve,B as ia,aI as ze,R as Ge,S as X,y as oa,aJ as Ie,W as ca,a2 as Ke,aK as ua,aL as la,aM as ha,a1 as pa,U as qe,aN as ie,p as G,aO as Qe,aP as ga,aQ as et,aR as ma,a as fa,m as da,aS as ba,aT as _a,aU as ya,aV as Ta,aW as va,aX as Ea,aY as wa,aZ as Ca,V as Ze,a_ as Aa,G as Sa,a$ as Ia,o as tt,s as at,b0 as Oa,b1 as ve,z as Na}from"./index-CeFusmJF.js";function st(e,a,n,r,i){if(a!==e){typeof a.toJSON=="function"&&(a=a.toJSON());for(var c=Ue(a),h=Ue(e),l=!1,b=h.length-1;b>=0;b--){var f=h[b],T=e[f];if(je(a,f)&&!(a[f]===void 0&&T!==void 0&&Array.isArray(a)===!1)){var y=a[f];typeof T=="object"&&T!=null&&typeof y=="object"&&y!=null&&Array.isArray(T)===Array.isArray(y)?st(T,y,n,r+"/"+J(f),i):T!==y&&(i&&n.push({op:"test",path:r+"/"+J(f),value:ae(T)}),n.push({op:"replace",path:r+"/"+J(f),value:ae(y)}))}else Array.isArray(e)===Array.isArray(a)?(i&&n.push({op:"test",path:r+"/"+J(f),value:ae(T)}),n.push({op:"remove",path:r+"/"+J(f)}),l=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:a}))}if(!(!l&&c.length==h.length))for(var b=0;b<c.length;b++){var f=c[b];!je(e,f)&&a[f]!==void 0&&n.push({op:"add",path:r+"/"+J(f),value:ae(a[f])})}}}function Oe(e,a,n=!1){var r=[];return st(e,a,r,"",n),r}function nt(e){return e!==void 0&&Array.isArray(e.lc_namespace)}function rt(e){return e!==void 0&&H.isRunnable(e)&&"lc_name"in e.constructor&&typeof e.constructor.lc_name=="function"&&e.constructor.lc_name()==="RunnableToolLike"}function it(e){return!!e&&typeof e=="object"&&"name"in e&&"schema"in e&&(Ae(e.schema)||e.schema!=null&&typeof e.schema=="object"&&"type"in e.schema&&typeof e.schema.type=="string"&&["null","boolean","object","array","number","string"].includes(e.schema.type))}function ot(e){return it(e)||rt(e)||nt(e)}var ka={};U(ka,{convertToOpenAIFunction:()=>ct,convertToOpenAITool:()=>xa,isLangChainTool:()=>ot,isRunnableToolLike:()=>rt,isStructuredTool:()=>nt,isStructuredToolParams:()=>it});function ct(e,a){const n=typeof a=="number"?void 0:a;return{name:e.name,description:e.description,parameters:le(e.schema),...n?.strict!==void 0?{strict:n.strict}:{}}}function xa(e,a){const n=typeof a=="number"?void 0:a;let r;return ot(e)?r={type:"function",function:ct(e)}:r=e,n?.strict!==void 0&&(r.function.strict=n.strict),r}var Ma={};U(Ma,{extendInteropZodObject:()=>ta,getInteropZodDefaultGetter:()=>ea,getInteropZodObjectShape:()=>Qt,getSchemaDescription:()=>We,interopParse:()=>qt,interopParseAsync:()=>He,interopSafeParse:()=>Kt,interopSafeParseAsync:()=>Yt,interopZodObjectMakeFieldsOptional:()=>Xt,interopZodObjectPartial:()=>Jt,interopZodObjectPassthrough:()=>Wt,interopZodObjectStrict:()=>Ht,interopZodTransformInputSchema:()=>$t,isInteropZodError:()=>Zt,isInteropZodLiteral:()=>Gt,isInteropZodObject:()=>zt,isInteropZodSchema:()=>Ae,isShapelessZodSchema:()=>Vt,isSimpleStringZodSchema:()=>jt,isZodArrayV4:()=>Ut,isZodLiteralV3:()=>Bt,isZodLiteralV4:()=>Dt,isZodNullableV4:()=>Lt,isZodObjectV3:()=>Ft,isZodObjectV4:()=>Rt,isZodOptionalV4:()=>Pt,isZodSchema:()=>Mt,isZodSchemaV3:()=>xt,isZodSchemaV4:()=>kt});var Pa={};U(Pa,{BasePromptValue:()=>he,ChatPromptValue:()=>lt,ImagePromptValue:()=>Ra,StringPromptValue:()=>ut});var he=class extends sa{},ut=class extends he{static lc_name(){return"StringPromptValue"}lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;value;constructor(e){super({value:e}),this.value=e}toString(){return this.value}toChatMessages(){return[new Se(this.value)]}},lt=class extends he{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ChatPromptValue"}messages;constructor(e){Array.isArray(e)&&(e={messages:e}),super(e),this.messages=e.messages}toString(){return aa(this.messages)}toChatMessages(){return this.messages}},Ra=class extends he{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ImagePromptValue"}imageUrl;value;constructor(e){"imageUrl"in e||(e={imageUrl:e}),super(e),this.imageUrl=e.imageUrl}toString(){return this.imageUrl.url}toChatMessages(){return[new Se({content:[{type:"image_url",image_url:{detail:this.imageUrl.detail,url:this.imageUrl.url}}]})]}},_="0123456789abcdef".split(""),Fa=[-2147483648,8388608,32768,128],D=[24,16,8,0],se=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],P=[];function B(e,a){a?(P[0]=P[16]=P[1]=P[2]=P[3]=P[4]=P[5]=P[6]=P[7]=P[8]=P[9]=P[10]=P[11]=P[12]=P[13]=P[14]=P[15]=0,this.blocks=P):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}B.prototype.update=function(e){if(!this.finalized){var a,n=typeof e;if(n!=="string"){if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);a=!0}for(var r,i=0,c,h=e.length,l=this.blocks;i<h;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,this.block=l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),a)for(c=this.start;i<h&&c<64;++i)l[c>>>2]|=e[i]<<D[c++&3];else for(c=this.start;i<h&&c<64;++i)r=e.charCodeAt(i),r<128?l[c>>>2]|=r<<D[c++&3]:r<2048?(l[c>>>2]|=(192|r>>>6)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]):r<55296||r>=57344?(l[c>>>2]|=(224|r>>>12)<<D[c++&3],l[c>>>2]|=(128|r>>>6&63)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),l[c>>>2]|=(240|r>>>18)<<D[c++&3],l[c>>>2]|=(128|r>>>12&63)<<D[c++&3],l[c>>>2]|=(128|r>>>6&63)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]);this.lastByteIndex=c,this.bytes+=c-this.start,c>=64?(this.block=l[16],this.start=c-64,this.hash(),this.hashed=!0):this.start=c}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,a=this.lastByteIndex;e[16]=this.block,e[a>>>2]|=Fa[a&3],this.block=e[16],a>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};B.prototype.hash=function(){var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=this.blocks,f,T,y,E,g,d,m,v,w,A,C;for(f=16;f<64;++f)g=b[f-15],T=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=b[f-2],y=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,b[f]=b[f-16]+T+b[f-7]+y<<0;for(C=a&n,f=0;f<64;f+=4)this.first?(this.is224?(v=300032,g=b[0]-1413257819,l=g-150054599<<0,r=g+24177077<<0):(v=704751109,g=b[0]-210244248,l=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(T=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),y=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&a,E=v^e&n^C,m=i&c^~i&h,g=l+y+m+se[f]+b[f],d=T+E,l=r+g<<0,r=g+d<<0),T=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),y=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),w=r&e,E=w^r&a^v,m=h&l^~h&i,g=c+y+m+se[f+1]+b[f+1],d=T+E,h=n+g<<0,n=g+d<<0,T=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),y=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),A=n&r,E=A^n&e^w,m=c&h^~c&l,g=i+y+m+se[f+2]+b[f+2],d=T+E,c=a+g<<0,a=g+d<<0,T=(a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10),y=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),C=a&n,E=C^a&r^A,m=c&h^~c&l,g=i+y+m+se[f+3]+b[f+3],d=T+E,i=e+g<<0,e=g+d<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+a<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+c<<0,this.h6=this.h6+h<<0,this.h7=this.h7+l<<0};B.prototype.hex=function(){this.finalize();var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=_[e>>>28&15]+_[e>>>24&15]+_[e>>>20&15]+_[e>>>16&15]+_[e>>>12&15]+_[e>>>8&15]+_[e>>>4&15]+_[e&15]+_[a>>>28&15]+_[a>>>24&15]+_[a>>>20&15]+_[a>>>16&15]+_[a>>>12&15]+_[a>>>8&15]+_[a>>>4&15]+_[a&15]+_[n>>>28&15]+_[n>>>24&15]+_[n>>>20&15]+_[n>>>16&15]+_[n>>>12&15]+_[n>>>8&15]+_[n>>>4&15]+_[n&15]+_[r>>>28&15]+_[r>>>24&15]+_[r>>>20&15]+_[r>>>16&15]+_[r>>>12&15]+_[r>>>8&15]+_[r>>>4&15]+_[r&15]+_[i>>>28&15]+_[i>>>24&15]+_[i>>>20&15]+_[i>>>16&15]+_[i>>>12&15]+_[i>>>8&15]+_[i>>>4&15]+_[i&15]+_[c>>>28&15]+_[c>>>24&15]+_[c>>>20&15]+_[c>>>16&15]+_[c>>>12&15]+_[c>>>8&15]+_[c>>>4&15]+_[c&15]+_[h>>>28&15]+_[h>>>24&15]+_[h>>>20&15]+_[h>>>16&15]+_[h>>>12&15]+_[h>>>8&15]+_[h>>>4&15]+_[h&15];return this.is224||(b+=_[l>>>28&15]+_[l>>>24&15]+_[l>>>20&15]+_[l>>>16&15]+_[l>>>12&15]+_[l>>>8&15]+_[l>>>4&15]+_[l&15]),b};B.prototype.toString=B.prototype.hex;B.prototype.digest=function(){this.finalize();var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255];return this.is224||b.push(l>>>24&255,l>>>16&255,l>>>8&255,l&255),b};B.prototype.array=B.prototype.digest;B.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),a=new DataView(e);return a.setUint32(0,this.h0),a.setUint32(4,this.h1),a.setUint32(8,this.h2),a.setUint32(12,this.h3),a.setUint32(16,this.h4),a.setUint32(20,this.h5),a.setUint32(24,this.h6),this.is224||a.setUint32(28,this.h7),e};const ht=(...e)=>new B(!1,!0).update(e.join("")).hex();var La={};U(La,{sha256:()=>ht});var Da={};U(Da,{BaseCache:()=>gt,InMemoryCache:()=>mt,defaultHashKeyEncoder:()=>pt,deserializeStoredGeneration:()=>Ba,serializeGeneration:()=>Ua});const pt=(...e)=>ht(e.join("_"));function Ba(e){return e.message!==void 0?{text:e.text,message:na(e.message)}:{text:e.text}}function Ua(e){const a={text:e.text};return e.message!==void 0&&(a.message=e.message.toDict()),a}var gt=class{keyEncoder=pt;makeDefaultKeyEncoder(e){this.keyEncoder=e}};const ja=new Map;var mt=class ft extends gt{cache;constructor(a){super(),this.cache=a??new Map}lookup(a,n){return Promise.resolve(this.cache.get(this.keyEncoder(a,n))??null)}async update(a,n,r){this.cache.set(this.keyEncoder(a,n),r)}static global(){return new ft(ja)}},q={},$e;function Va(){if($e)return q;$e=1,q.byteLength=l,q.toByteArray=f,q.fromByteArray=E;for(var e=[],a=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,c=r.length;i<c;++i)e[i]=r[i],a[r.charCodeAt(i)]=i;a[45]=62,a[95]=63;function h(g){var d=g.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=g.indexOf("=");m===-1&&(m=d);var v=m===d?0:4-m%4;return[m,v]}function l(g){var d=h(g),m=d[0],v=d[1];return(m+v)*3/4-v}function b(g,d,m){return(d+m)*3/4-m}function f(g){var d,m=h(g),v=m[0],w=m[1],A=new n(b(g,v,w)),C=0,M=w>0?v-4:v,O;for(O=0;O<M;O+=4)d=a[g.charCodeAt(O)]<<18|a[g.charCodeAt(O+1)]<<12|a[g.charCodeAt(O+2)]<<6|a[g.charCodeAt(O+3)],A[C++]=d>>16&255,A[C++]=d>>8&255,A[C++]=d&255;return w===2&&(d=a[g.charCodeAt(O)]<<2|a[g.charCodeAt(O+1)]>>4,A[C++]=d&255),w===1&&(d=a[g.charCodeAt(O)]<<10|a[g.charCodeAt(O+1)]<<4|a[g.charCodeAt(O+2)]>>2,A[C++]=d>>8&255,A[C++]=d&255),A}function T(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function y(g,d,m){for(var v,w=[],A=d;A<m;A+=3)v=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),w.push(T(v));return w.join("")}function E(g){for(var d,m=g.length,v=m%3,w=[],A=16383,C=0,M=m-v;C<M;C+=A)w.push(y(g,C,C+A>M?M:C+A));return v===1?(d=g[m-1],w.push(e[d>>2]+e[d<<4&63]+"==")):v===2&&(d=(g[m-2]<<8)+g[m-1],w.push(e[d>>10]+e[d>>4&63]+e[d<<2&63]+"=")),w.join("")}return q}var za=Va();const Ga=ra(za);var Za=Object.defineProperty,$a=(e,a,n)=>a in e?Za(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,Ha=(e,a,n)=>($a(e,a+"",n),n);function Wa(e,a){let n=Array.from({length:e.length},(r,i)=>({start:i,end:i+1}));for(;n.length>1;){let r=null;for(let i=0;i<n.length-1;i++){const c=e.slice(n[i].start,n[i+1].end),h=a.get(c.join(","));h!=null&&(r==null||h<r[0])&&(r=[h,i])}if(r!=null){const i=r[1];n[i]={start:n[i].start,end:n[i+1].end},n.splice(i+1,1)}else break}return n}function Ja(e,a){return e.length===1?[a.get(e.join(","))]:Wa(e,a).map(n=>a.get(e.slice(n.start,n.end).join(","))).filter(n=>n!=null)}function Xa(e){return e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}var Ee=class{specialTokens;inverseSpecialTokens;patStr;textEncoder=new TextEncoder;textDecoder=new TextDecoder("utf-8");rankMap=new Map;textMap=new Map;constructor(e,a){this.patStr=e.pat_str;const n=e.bpe_ranks.split(`
|
|
1
|
+
import{a7 as Ue,a8 as je,a9 as J,aa as ae,b as Ae,ab as H,Q as le,n as U,ac as kt,ad as xt,ae as Mt,af as Pt,ag as Rt,ah as Ft,ai as Lt,aj as Dt,ak as Bt,al as Ut,i as jt,am as Vt,an as zt,ao as Gt,d as Zt,ap as $t,aq as Ht,ar as Wt,as as Jt,at as Xt,x as Yt,au as Kt,c as He,av as qt,aw as We,ax as Qt,ay as ea,az as ta,aA as Se,aB as aa,aC as sa,aD as na,r as ra,w as Je,aE as re,e as oe,aF as Xe,aG as Ye,D as ce,C as _e,aH as Ve,B as ia,aI as ze,R as Ge,S as X,y as oa,aJ as Ie,W as ca,a2 as Ke,aK as ua,aL as la,aM as ha,a1 as pa,U as qe,aN as ie,p as G,aO as Qe,aP as ga,aQ as et,aR as ma,a as fa,m as da,aS as ba,aT as _a,aU as ya,aV as Ta,aW as va,aX as Ea,aY as wa,aZ as Ca,V as Ze,a_ as Aa,G as Sa,a$ as Ia,o as tt,s as at,b0 as Oa,b1 as ve,z as Na}from"./index-_RJPxEz8.js";function st(e,a,n,r,i){if(a!==e){typeof a.toJSON=="function"&&(a=a.toJSON());for(var c=Ue(a),h=Ue(e),l=!1,b=h.length-1;b>=0;b--){var f=h[b],T=e[f];if(je(a,f)&&!(a[f]===void 0&&T!==void 0&&Array.isArray(a)===!1)){var y=a[f];typeof T=="object"&&T!=null&&typeof y=="object"&&y!=null&&Array.isArray(T)===Array.isArray(y)?st(T,y,n,r+"/"+J(f),i):T!==y&&(i&&n.push({op:"test",path:r+"/"+J(f),value:ae(T)}),n.push({op:"replace",path:r+"/"+J(f),value:ae(y)}))}else Array.isArray(e)===Array.isArray(a)?(i&&n.push({op:"test",path:r+"/"+J(f),value:ae(T)}),n.push({op:"remove",path:r+"/"+J(f)}),l=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:a}))}if(!(!l&&c.length==h.length))for(var b=0;b<c.length;b++){var f=c[b];!je(e,f)&&a[f]!==void 0&&n.push({op:"add",path:r+"/"+J(f),value:ae(a[f])})}}}function Oe(e,a,n=!1){var r=[];return st(e,a,r,"",n),r}function nt(e){return e!==void 0&&Array.isArray(e.lc_namespace)}function rt(e){return e!==void 0&&H.isRunnable(e)&&"lc_name"in e.constructor&&typeof e.constructor.lc_name=="function"&&e.constructor.lc_name()==="RunnableToolLike"}function it(e){return!!e&&typeof e=="object"&&"name"in e&&"schema"in e&&(Ae(e.schema)||e.schema!=null&&typeof e.schema=="object"&&"type"in e.schema&&typeof e.schema.type=="string"&&["null","boolean","object","array","number","string"].includes(e.schema.type))}function ot(e){return it(e)||rt(e)||nt(e)}var ka={};U(ka,{convertToOpenAIFunction:()=>ct,convertToOpenAITool:()=>xa,isLangChainTool:()=>ot,isRunnableToolLike:()=>rt,isStructuredTool:()=>nt,isStructuredToolParams:()=>it});function ct(e,a){const n=typeof a=="number"?void 0:a;return{name:e.name,description:e.description,parameters:le(e.schema),...n?.strict!==void 0?{strict:n.strict}:{}}}function xa(e,a){const n=typeof a=="number"?void 0:a;let r;return ot(e)?r={type:"function",function:ct(e)}:r=e,n?.strict!==void 0&&(r.function.strict=n.strict),r}var Ma={};U(Ma,{extendInteropZodObject:()=>ta,getInteropZodDefaultGetter:()=>ea,getInteropZodObjectShape:()=>Qt,getSchemaDescription:()=>We,interopParse:()=>qt,interopParseAsync:()=>He,interopSafeParse:()=>Kt,interopSafeParseAsync:()=>Yt,interopZodObjectMakeFieldsOptional:()=>Xt,interopZodObjectPartial:()=>Jt,interopZodObjectPassthrough:()=>Wt,interopZodObjectStrict:()=>Ht,interopZodTransformInputSchema:()=>$t,isInteropZodError:()=>Zt,isInteropZodLiteral:()=>Gt,isInteropZodObject:()=>zt,isInteropZodSchema:()=>Ae,isShapelessZodSchema:()=>Vt,isSimpleStringZodSchema:()=>jt,isZodArrayV4:()=>Ut,isZodLiteralV3:()=>Bt,isZodLiteralV4:()=>Dt,isZodNullableV4:()=>Lt,isZodObjectV3:()=>Ft,isZodObjectV4:()=>Rt,isZodOptionalV4:()=>Pt,isZodSchema:()=>Mt,isZodSchemaV3:()=>xt,isZodSchemaV4:()=>kt});var Pa={};U(Pa,{BasePromptValue:()=>he,ChatPromptValue:()=>lt,ImagePromptValue:()=>Ra,StringPromptValue:()=>ut});var he=class extends sa{},ut=class extends he{static lc_name(){return"StringPromptValue"}lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;value;constructor(e){super({value:e}),this.value=e}toString(){return this.value}toChatMessages(){return[new Se(this.value)]}},lt=class extends he{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ChatPromptValue"}messages;constructor(e){Array.isArray(e)&&(e={messages:e}),super(e),this.messages=e.messages}toString(){return aa(this.messages)}toChatMessages(){return this.messages}},Ra=class extends he{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ImagePromptValue"}imageUrl;value;constructor(e){"imageUrl"in e||(e={imageUrl:e}),super(e),this.imageUrl=e.imageUrl}toString(){return this.imageUrl.url}toChatMessages(){return[new Se({content:[{type:"image_url",image_url:{detail:this.imageUrl.detail,url:this.imageUrl.url}}]})]}},_="0123456789abcdef".split(""),Fa=[-2147483648,8388608,32768,128],D=[24,16,8,0],se=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],P=[];function B(e,a){a?(P[0]=P[16]=P[1]=P[2]=P[3]=P[4]=P[5]=P[6]=P[7]=P[8]=P[9]=P[10]=P[11]=P[12]=P[13]=P[14]=P[15]=0,this.blocks=P):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}B.prototype.update=function(e){if(!this.finalized){var a,n=typeof e;if(n!=="string"){if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);a=!0}for(var r,i=0,c,h=e.length,l=this.blocks;i<h;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,this.block=l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),a)for(c=this.start;i<h&&c<64;++i)l[c>>>2]|=e[i]<<D[c++&3];else for(c=this.start;i<h&&c<64;++i)r=e.charCodeAt(i),r<128?l[c>>>2]|=r<<D[c++&3]:r<2048?(l[c>>>2]|=(192|r>>>6)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]):r<55296||r>=57344?(l[c>>>2]|=(224|r>>>12)<<D[c++&3],l[c>>>2]|=(128|r>>>6&63)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),l[c>>>2]|=(240|r>>>18)<<D[c++&3],l[c>>>2]|=(128|r>>>12&63)<<D[c++&3],l[c>>>2]|=(128|r>>>6&63)<<D[c++&3],l[c>>>2]|=(128|r&63)<<D[c++&3]);this.lastByteIndex=c,this.bytes+=c-this.start,c>=64?(this.block=l[16],this.start=c-64,this.hash(),this.hashed=!0):this.start=c}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,a=this.lastByteIndex;e[16]=this.block,e[a>>>2]|=Fa[a&3],this.block=e[16],a>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};B.prototype.hash=function(){var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=this.blocks,f,T,y,E,g,d,m,v,w,A,C;for(f=16;f<64;++f)g=b[f-15],T=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=b[f-2],y=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,b[f]=b[f-16]+T+b[f-7]+y<<0;for(C=a&n,f=0;f<64;f+=4)this.first?(this.is224?(v=300032,g=b[0]-1413257819,l=g-150054599<<0,r=g+24177077<<0):(v=704751109,g=b[0]-210244248,l=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(T=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),y=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&a,E=v^e&n^C,m=i&c^~i&h,g=l+y+m+se[f]+b[f],d=T+E,l=r+g<<0,r=g+d<<0),T=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),y=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),w=r&e,E=w^r&a^v,m=h&l^~h&i,g=c+y+m+se[f+1]+b[f+1],d=T+E,h=n+g<<0,n=g+d<<0,T=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),y=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),A=n&r,E=A^n&e^w,m=c&h^~c&l,g=i+y+m+se[f+2]+b[f+2],d=T+E,c=a+g<<0,a=g+d<<0,T=(a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10),y=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),C=a&n,E=C^a&r^A,m=c&h^~c&l,g=i+y+m+se[f+3]+b[f+3],d=T+E,i=e+g<<0,e=g+d<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+a<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+c<<0,this.h6=this.h6+h<<0,this.h7=this.h7+l<<0};B.prototype.hex=function(){this.finalize();var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=_[e>>>28&15]+_[e>>>24&15]+_[e>>>20&15]+_[e>>>16&15]+_[e>>>12&15]+_[e>>>8&15]+_[e>>>4&15]+_[e&15]+_[a>>>28&15]+_[a>>>24&15]+_[a>>>20&15]+_[a>>>16&15]+_[a>>>12&15]+_[a>>>8&15]+_[a>>>4&15]+_[a&15]+_[n>>>28&15]+_[n>>>24&15]+_[n>>>20&15]+_[n>>>16&15]+_[n>>>12&15]+_[n>>>8&15]+_[n>>>4&15]+_[n&15]+_[r>>>28&15]+_[r>>>24&15]+_[r>>>20&15]+_[r>>>16&15]+_[r>>>12&15]+_[r>>>8&15]+_[r>>>4&15]+_[r&15]+_[i>>>28&15]+_[i>>>24&15]+_[i>>>20&15]+_[i>>>16&15]+_[i>>>12&15]+_[i>>>8&15]+_[i>>>4&15]+_[i&15]+_[c>>>28&15]+_[c>>>24&15]+_[c>>>20&15]+_[c>>>16&15]+_[c>>>12&15]+_[c>>>8&15]+_[c>>>4&15]+_[c&15]+_[h>>>28&15]+_[h>>>24&15]+_[h>>>20&15]+_[h>>>16&15]+_[h>>>12&15]+_[h>>>8&15]+_[h>>>4&15]+_[h&15];return this.is224||(b+=_[l>>>28&15]+_[l>>>24&15]+_[l>>>20&15]+_[l>>>16&15]+_[l>>>12&15]+_[l>>>8&15]+_[l>>>4&15]+_[l&15]),b};B.prototype.toString=B.prototype.hex;B.prototype.digest=function(){this.finalize();var e=this.h0,a=this.h1,n=this.h2,r=this.h3,i=this.h4,c=this.h5,h=this.h6,l=this.h7,b=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255];return this.is224||b.push(l>>>24&255,l>>>16&255,l>>>8&255,l&255),b};B.prototype.array=B.prototype.digest;B.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),a=new DataView(e);return a.setUint32(0,this.h0),a.setUint32(4,this.h1),a.setUint32(8,this.h2),a.setUint32(12,this.h3),a.setUint32(16,this.h4),a.setUint32(20,this.h5),a.setUint32(24,this.h6),this.is224||a.setUint32(28,this.h7),e};const ht=(...e)=>new B(!1,!0).update(e.join("")).hex();var La={};U(La,{sha256:()=>ht});var Da={};U(Da,{BaseCache:()=>gt,InMemoryCache:()=>mt,defaultHashKeyEncoder:()=>pt,deserializeStoredGeneration:()=>Ba,serializeGeneration:()=>Ua});const pt=(...e)=>ht(e.join("_"));function Ba(e){return e.message!==void 0?{text:e.text,message:na(e.message)}:{text:e.text}}function Ua(e){const a={text:e.text};return e.message!==void 0&&(a.message=e.message.toDict()),a}var gt=class{keyEncoder=pt;makeDefaultKeyEncoder(e){this.keyEncoder=e}};const ja=new Map;var mt=class ft extends gt{cache;constructor(a){super(),this.cache=a??new Map}lookup(a,n){return Promise.resolve(this.cache.get(this.keyEncoder(a,n))??null)}async update(a,n,r){this.cache.set(this.keyEncoder(a,n),r)}static global(){return new ft(ja)}},q={},$e;function Va(){if($e)return q;$e=1,q.byteLength=l,q.toByteArray=f,q.fromByteArray=E;for(var e=[],a=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,c=r.length;i<c;++i)e[i]=r[i],a[r.charCodeAt(i)]=i;a[45]=62,a[95]=63;function h(g){var d=g.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=g.indexOf("=");m===-1&&(m=d);var v=m===d?0:4-m%4;return[m,v]}function l(g){var d=h(g),m=d[0],v=d[1];return(m+v)*3/4-v}function b(g,d,m){return(d+m)*3/4-m}function f(g){var d,m=h(g),v=m[0],w=m[1],A=new n(b(g,v,w)),C=0,M=w>0?v-4:v,O;for(O=0;O<M;O+=4)d=a[g.charCodeAt(O)]<<18|a[g.charCodeAt(O+1)]<<12|a[g.charCodeAt(O+2)]<<6|a[g.charCodeAt(O+3)],A[C++]=d>>16&255,A[C++]=d>>8&255,A[C++]=d&255;return w===2&&(d=a[g.charCodeAt(O)]<<2|a[g.charCodeAt(O+1)]>>4,A[C++]=d&255),w===1&&(d=a[g.charCodeAt(O)]<<10|a[g.charCodeAt(O+1)]<<4|a[g.charCodeAt(O+2)]>>2,A[C++]=d>>8&255,A[C++]=d&255),A}function T(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function y(g,d,m){for(var v,w=[],A=d;A<m;A+=3)v=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),w.push(T(v));return w.join("")}function E(g){for(var d,m=g.length,v=m%3,w=[],A=16383,C=0,M=m-v;C<M;C+=A)w.push(y(g,C,C+A>M?M:C+A));return v===1?(d=g[m-1],w.push(e[d>>2]+e[d<<4&63]+"==")):v===2&&(d=(g[m-2]<<8)+g[m-1],w.push(e[d>>10]+e[d>>4&63]+e[d<<2&63]+"=")),w.join("")}return q}var za=Va();const Ga=ra(za);var Za=Object.defineProperty,$a=(e,a,n)=>a in e?Za(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,Ha=(e,a,n)=>($a(e,a+"",n),n);function Wa(e,a){let n=Array.from({length:e.length},(r,i)=>({start:i,end:i+1}));for(;n.length>1;){let r=null;for(let i=0;i<n.length-1;i++){const c=e.slice(n[i].start,n[i+1].end),h=a.get(c.join(","));h!=null&&(r==null||h<r[0])&&(r=[h,i])}if(r!=null){const i=r[1];n[i]={start:n[i].start,end:n[i+1].end},n.splice(i+1,1)}else break}return n}function Ja(e,a){return e.length===1?[a.get(e.join(","))]:Wa(e,a).map(n=>a.get(e.slice(n.start,n.end).join(","))).filter(n=>n!=null)}function Xa(e){return e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}var Ee=class{specialTokens;inverseSpecialTokens;patStr;textEncoder=new TextEncoder;textDecoder=new TextDecoder("utf-8");rankMap=new Map;textMap=new Map;constructor(e,a){this.patStr=e.pat_str;const n=e.bpe_ranks.split(`
|
|
2
2
|
`).filter(Boolean).reduce((r,i)=>{const[c,h,...l]=i.split(" "),b=Number.parseInt(h,10);return l.forEach((f,T)=>r[f]=b+T),r},{});for(const[r,i]of Object.entries(n)){const c=Ga.toByteArray(r);this.rankMap.set(c.join(","),i),this.textMap.set(i,c)}this.specialTokens={...e.special_tokens,...a},this.inverseSpecialTokens=Object.entries(this.specialTokens).reduce((r,[i,c])=>(r[c]=this.textEncoder.encode(i),r),{})}encode(e,a=[],n="all"){const r=new RegExp(this.patStr,"ug"),i=Ee.specialTokenRegex(Object.keys(this.specialTokens)),c=[],h=new Set(a==="all"?Object.keys(this.specialTokens):a),l=new Set(n==="all"?Object.keys(this.specialTokens).filter(f=>!h.has(f)):n);if(l.size>0){const f=Ee.specialTokenRegex([...l]),T=e.match(f);if(T!=null)throw new Error(`The text contains a special token that is not allowed: ${T[0]}`)}let b=0;for(;;){let f=null,T=b;for(;i.lastIndex=T,f=i.exec(e),!(f==null||h.has(f[0]));)T=f.index+1;const y=f?.index??e.length;for(const g of e.substring(b,y).matchAll(r)){const d=this.textEncoder.encode(g[0]),m=this.rankMap.get(d.join(","));if(m!=null){c.push(m);continue}c.push(...Ja(d,this.rankMap))}if(f==null)break;let E=this.specialTokens[f[0]];c.push(E),b=f.index+f[0].length}return c}decode(e){const a=[];let n=0;for(let c=0;c<e.length;++c){const h=e[c],l=this.textMap.get(h)??this.inverseSpecialTokens[h];l!=null&&(a.push(l),n+=l.length)}const r=new Uint8Array(n);let i=0;for(const c of a)r.set(c,i),i+=c.length;return this.textDecoder.decode(r)}},dt=Ee;Ha(dt,"specialTokenRegex",e=>new RegExp(e.map(a=>Xa(a)).join("|"),"g"));function Ya(e){switch(e){case"gpt2":return"gpt2";case"code-cushman-001":case"code-cushman-002":case"code-davinci-001":case"code-davinci-002":case"cushman-codex":case"davinci-codex":case"davinci-002":case"text-davinci-002":case"text-davinci-003":return"p50k_base";case"code-davinci-edit-001":case"text-davinci-edit-001":return"p50k_edit";case"ada":case"babbage":case"babbage-002":case"code-search-ada-code-001":case"code-search-babbage-code-001":case"curie":case"davinci":case"text-ada-001":case"text-babbage-001":case"text-curie-001":case"text-davinci-001":case"text-search-ada-doc-001":case"text-search-babbage-doc-001":case"text-search-curie-doc-001":case"text-search-davinci-doc-001":case"text-similarity-ada-001":case"text-similarity-babbage-001":case"text-similarity-curie-001":case"text-similarity-davinci-001":return"r50k_base";case"gpt-3.5-turbo-instruct-0914":case"gpt-3.5-turbo-instruct":case"gpt-3.5-turbo-16k-0613":case"gpt-3.5-turbo-16k":case"gpt-3.5-turbo-0613":case"gpt-3.5-turbo-0301":case"gpt-3.5-turbo":case"gpt-4-32k-0613":case"gpt-4-32k-0314":case"gpt-4-32k":case"gpt-4-0613":case"gpt-4-0314":case"gpt-4":case"gpt-3.5-turbo-1106":case"gpt-35-turbo":case"gpt-4-1106-preview":case"gpt-4-vision-preview":case"gpt-3.5-turbo-0125":case"gpt-4-turbo":case"gpt-4-turbo-2024-04-09":case"gpt-4-turbo-preview":case"gpt-4-0125-preview":case"text-embedding-ada-002":case"text-embedding-3-small":case"text-embedding-3-large":return"cl100k_base";case"gpt-4o":case"gpt-4o-2024-05-13":case"gpt-4o-2024-08-06":case"gpt-4o-2024-11-20":case"gpt-4o-mini-2024-07-18":case"gpt-4o-mini":case"gpt-4o-search-preview":case"gpt-4o-search-preview-2025-03-11":case"gpt-4o-mini-search-preview":case"gpt-4o-mini-search-preview-2025-03-11":case"gpt-4o-audio-preview":case"gpt-4o-audio-preview-2024-12-17":case"gpt-4o-audio-preview-2024-10-01":case"gpt-4o-mini-audio-preview":case"gpt-4o-mini-audio-preview-2024-12-17":case"o1":case"o1-2024-12-17":case"o1-mini":case"o1-mini-2024-09-12":case"o1-preview":case"o1-preview-2024-09-12":case"o1-pro":case"o1-pro-2025-03-19":case"o3":case"o3-2025-04-16":case"o3-mini":case"o3-mini-2025-01-31":case"o4-mini":case"o4-mini-2025-04-16":case"chatgpt-4o-latest":case"gpt-4o-realtime":case"gpt-4o-realtime-preview-2024-10-01":case"gpt-4o-realtime-preview-2024-12-17":case"gpt-4o-mini-realtime-preview":case"gpt-4o-mini-realtime-preview-2024-12-17":case"gpt-4.1":case"gpt-4.1-2025-04-14":case"gpt-4.1-mini":case"gpt-4.1-mini-2025-04-14":case"gpt-4.1-nano":case"gpt-4.1-nano-2025-04-14":case"gpt-4.5-preview":case"gpt-4.5-preview-2025-02-27":case"gpt-5":case"gpt-5-2025-08-07":case"gpt-5-nano":case"gpt-5-nano-2025-08-07":case"gpt-5-mini":case"gpt-5-mini-2025-08-07":case"gpt-5-chat-latest":return"o200k_base";default:throw new Error("Unknown model")}}var Ka={};U(Ka,{encodingForModel:()=>Ne,getEncoding:()=>bt});const ne={},qa=new Je({});async function bt(e){return e in ne||(ne[e]=qa.fetch(`https://tiktoken.pages.dev/js/${e}.json`).then(a=>a.json()).then(a=>new dt(a)).catch(a=>{throw delete ne[e],a})),await ne[e]}async function Ne(e){return bt(Ya(e))}var Qa={};U(Qa,{BaseLangChain:()=>yt,BaseLanguageModel:()=>Tt,calculateMaxTokens:()=>as,getEmbeddingContextSize:()=>es,getModelContextSize:()=>_t,getModelNameForTiktoken:()=>pe,isOpenAITool:()=>ts});const pe=e=>e.startsWith("gpt-5")?"gpt-5":e.startsWith("gpt-3.5-turbo-16k")?"gpt-3.5-turbo-16k":e.startsWith("gpt-3.5-turbo-")?"gpt-3.5-turbo":e.startsWith("gpt-4-32k")?"gpt-4-32k":e.startsWith("gpt-4-")?"gpt-4":e.startsWith("gpt-4o")?"gpt-4o":e,es=e=>{switch(e){case"text-embedding-ada-002":return 8191;default:return 2046}},_t=e=>{switch(pe(e)){case"gpt-5":case"gpt-5-turbo":case"gpt-5-turbo-preview":return 4e5;case"gpt-4o":case"gpt-4o-mini":case"gpt-4o-2024-05-13":case"gpt-4o-2024-08-06":return 128e3;case"gpt-4-turbo":case"gpt-4-turbo-preview":case"gpt-4-turbo-2024-04-09":case"gpt-4-0125-preview":case"gpt-4-1106-preview":return 128e3;case"gpt-4-32k":case"gpt-4-32k-0314":case"gpt-4-32k-0613":return 32768;case"gpt-4":case"gpt-4-0314":case"gpt-4-0613":return 8192;case"gpt-3.5-turbo-16k":case"gpt-3.5-turbo-16k-0613":return 16384;case"gpt-3.5-turbo":case"gpt-3.5-turbo-0301":case"gpt-3.5-turbo-0613":case"gpt-3.5-turbo-1106":case"gpt-3.5-turbo-0125":return 4096;case"text-davinci-003":case"text-davinci-002":return 4097;case"text-davinci-001":return 2049;case"text-curie-001":case"text-babbage-001":case"text-ada-001":return 2048;case"code-davinci-002":case"code-davinci-001":return 8e3;case"code-cushman-001":return 2048;case"claude-3-5-sonnet-20241022":case"claude-3-5-sonnet-20240620":case"claude-3-opus-20240229":case"claude-3-sonnet-20240229":case"claude-3-haiku-20240307":case"claude-2.1":return 2e5;case"claude-2.0":case"claude-instant-1.2":return 1e5;case"gemini-1.5-pro":case"gemini-1.5-pro-latest":case"gemini-1.5-flash":case"gemini-1.5-flash-latest":return 1e6;case"gemini-pro":case"gemini-pro-vision":return 32768;default:return 4097}};function ts(e){return typeof e!="object"||!e?!1:!!("type"in e&&e.type==="function"&&"function"in e&&typeof e.function=="object"&&e.function&&"name"in e.function&&"parameters"in e.function)}const as=async({prompt:e,modelName:a})=>{let n;try{n=(await Ne(pe(a))).encode(e).length}catch{console.warn("Failed to calculate number of tokens, falling back to approximate count"),n=Math.ceil(e.length/4)}return _t(a)-n},ss=()=>!1;var yt=class extends H{verbose;callbacks;tags;metadata;get lc_attributes(){return{callbacks:void 0,verbose:void 0}}constructor(e){super(e),this.verbose=e.verbose??ss(),this.callbacks=e.callbacks,this.tags=e.tags??[],this.metadata=e.metadata??{}}},Tt=class extends yt{get callKeys(){return["stop","timeout","signal","tags","metadata","callbacks"]}caller;cache;constructor({callbacks:e,callbackManager:a,...n}){const{cache:r,...i}=n;super({callbacks:e??a,...i}),typeof r=="object"?this.cache=r:r?this.cache=mt.global():this.cache=void 0,this.caller=new Je(n??{})}_encoding;async getNumTokens(e){let a;typeof e=="string"?a=e:a=e.map(r=>typeof r=="string"?r:r.type==="text"&&"text"in r?r.text:"").join("");let n=Math.ceil(a.length/4);if(!this._encoding)try{this._encoding=await Ne("modelName"in this?pe(this.modelName):"gpt2")}catch(r){console.warn("Failed to calculate number of tokens, falling back to approximate count",r)}if(this._encoding)try{n=this._encoding.encode(a).length}catch(r){console.warn("Failed to calculate number of tokens, falling back to approximate count",r)}return n}static _convertInputToPromptValue(e){return typeof e=="string"?new ut(e):Array.isArray(e)?new lt(e.map(re)):e}_identifyingParams(){return{}}_getSerializedCacheKeyParametersForCall({config:e,...a}){const n={...this._identifyingParams(),...a,_type:this._llmType(),_model:this._modelType()};return Object.entries(n).filter(([c,h])=>h!==void 0).map(([c,h])=>`${c}:${JSON.stringify(h)}`).sort().join(",")}serialize(){return{...this._identifyingParams(),_type:this._llmType(),_model:this._modelType()}}static async deserialize(e){throw new Error("Use .toJSON() instead")}get profile(){return{}}},ue=class extends H{static lc_name(){return"RunnablePassthrough"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;func;constructor(e){super(e),e&&(this.func=e.func)}async invoke(e,a){const n=oe(a);return this.func&&await this.func(e,n),this._callWithConfig(r=>Promise.resolve(r),e,n)}async*transform(e,a){const n=oe(a);let r,i=!0;for await(const c of this._transformStreamWithConfig(e,h=>h,n))if(yield c,i)if(r===void 0)r=c;else try{r=ce(r,c)}catch{r=void 0,i=!1}this.func&&r!==void 0&&await this.func(r,n)}static assign(e){return new Xe(new Ye({steps:e}))}};const ns=e=>e();function ye(e){const a=e.constructor;return new a({...e,content:e.contentBlocks,response_metadata:{...e.response_metadata,output_version:"v1"}})}var rs={};U(rs,{BaseChatModel:()=>vt,SimpleChatModel:()=>is});function Te(e){const a=[];for(const n of e){let r=n;if(Array.isArray(n.content))for(let i=0;i<n.content.length;i++){const c=n.content[i];(ua(c)||la(c))&&r===n&&(r=new n.constructor({...r,content:[...n.content.slice(0,i),ha(c),...n.content.slice(i+1)]}))}a.push(r)}return a}var vt=class Z extends Tt{lc_namespace=["langchain","chat_models",this._llmType()];disableStreaming=!1;outputVersion;get callKeys(){return[...super.callKeys,"outputVersion"]}constructor(a){super(a),this.outputVersion=ns(()=>{const n=a.outputVersion??pa("LC_OUTPUT_VERSION");return n&&["v0","v1"].includes(n)?n:"v0"})}_separateRunnableConfigFromCallOptionsCompat(a){const[n,r]=super._separateRunnableConfigFromCallOptions(a);return r.signal=n.signal,[n,r]}async invoke(a,n){const r=Z._convertInputToPromptValue(a);return(await this.generatePrompt([r],n,n?.callbacks)).generations[0][0].message}async*_streamResponseChunks(a,n,r){throw new Error("Not implemented.")}async*_streamIterator(a,n){if(this._streamResponseChunks===Z.prototype._streamResponseChunks||this.disableStreaming)yield this.invoke(a,n);else{const i=Z._convertInputToPromptValue(a).toChatMessages(),[c,h]=this._separateRunnableConfigFromCallOptionsCompat(n),l={...c.metadata,...this.getLsParams(h)},b=await _e.configure(c.callbacks,this.callbacks,c.tags,this.tags,l,this.metadata,{verbose:this.verbose}),f={options:h,invocation_params:this?.invocationParams(h),batch_size:1},T=h.outputVersion??this.outputVersion,y=await b?.handleChatModelStart(this.toJSON(),[Te(i)],c.runId,void 0,f,void 0,void 0,c.runName);let E,g;try{for await(const d of this._streamResponseChunks(i,h,y?.[0])){if(h.signal?.throwIfAborted(),d.message.id==null){const m=y?.at(0)?.runId;m!=null&&d.message._updateId(`run-${m}`)}d.message.response_metadata={...d.generationInfo,...d.message.response_metadata},T==="v1"?yield ye(d.message):yield d.message,E?E=E.concat(d):E=d,Ve(d.message)&&d.message.usage_metadata!==void 0&&(g={tokenUsage:{promptTokens:d.message.usage_metadata.input_tokens,completionTokens:d.message.usage_metadata.output_tokens,totalTokens:d.message.usage_metadata.total_tokens}})}h.signal?.throwIfAborted()}catch(d){throw await Promise.all((y??[]).map(m=>m?.handleLLMError(d))),d}await Promise.all((y??[]).map(d=>d?.handleLLMEnd({generations:[[E]],llmOutput:g})))}}getLsParams(a){const n=this.getName().startsWith("Chat")?this.getName().replace("Chat",""):this.getName();return{ls_model_type:"chat",ls_stop:a.stop,ls_provider:n}}async _generateUncached(a,n,r,i){const c=a.map(E=>E.map(re));let h;if(i!==void 0&&i.length===c.length)h=i;else{const E={...r.metadata,...this.getLsParams(n)},g=await _e.configure(r.callbacks,this.callbacks,r.tags,this.tags,E,this.metadata,{verbose:this.verbose}),d={options:n,invocation_params:this?.invocationParams(n),batch_size:1};h=await g?.handleChatModelStart(this.toJSON(),c.map(Te),r.runId,void 0,d,void 0,void 0,r.runName)}const l=n.outputVersion??this.outputVersion,b=[],f=[];if(!!h?.[0].handlers.find(ia)&&!this.disableStreaming&&c.length===1&&this._streamResponseChunks!==Z.prototype._streamResponseChunks)try{const E=await this._streamResponseChunks(c[0],n,h?.[0]);let g,d;for await(const m of E){if(n.signal?.aborted){const v=g?.message;throw new ze("Model invocation was aborted.",v)}if(m.message.id==null){const v=h?.at(0)?.runId;v!=null&&m.message._updateId(`run-${v}`)}g===void 0?g=m:g=ce(g,m),Ve(m.message)&&m.message.usage_metadata!==void 0&&(d={tokenUsage:{promptTokens:m.message.usage_metadata.input_tokens,completionTokens:m.message.usage_metadata.output_tokens,totalTokens:m.message.usage_metadata.total_tokens}})}if(n.signal?.aborted){const m=g?.message;throw new ze("Model invocation was aborted.",m)}if(g===void 0)throw new Error("Received empty response from chat model call.");b.push([g]),await h?.[0].handleLLMEnd({generations:b,llmOutput:d})}catch(E){throw await h?.[0].handleLLMError(E),E}else{const E=await Promise.allSettled(c.map(async(g,d)=>{const m=await this._generate(g,{...n,promptIndex:d},h?.[d]);if(l==="v1")for(const v of m.generations)v.message=ye(v.message);return m}));await Promise.all(E.map(async(g,d)=>{if(g.status==="fulfilled"){const m=g.value;for(const v of m.generations){if(v.message.id==null){const w=h?.at(0)?.runId;w!=null&&v.message._updateId(`run-${w}`)}v.message.response_metadata={...v.generationInfo,...v.message.response_metadata}}return m.generations.length===1&&(m.generations[0].message.response_metadata={...m.llmOutput,...m.generations[0].message.response_metadata}),b[d]=m.generations,f[d]=m.llmOutput,h?.[d]?.handleLLMEnd({generations:[m.generations],llmOutput:m.llmOutput})}else return await h?.[d]?.handleLLMError(g.reason),Promise.reject(g.reason)}))}const y={generations:b,llmOutput:f.length?this._combineLLMOutput?.(...f):void 0};return Object.defineProperty(y,Ge,{value:h?{runIds:h?.map(E=>E.runId)}:void 0,configurable:!0}),y}async _generateCached({messages:a,cache:n,llmStringKey:r,parsedOptions:i,handledOptions:c}){const h=a.map(w=>w.map(re)),l={...c.metadata,...this.getLsParams(i)},b=await _e.configure(c.callbacks,this.callbacks,c.tags,this.tags,l,this.metadata,{verbose:this.verbose}),f={options:i,invocation_params:this?.invocationParams(i),batch_size:1},T=await b?.handleChatModelStart(this.toJSON(),h.map(Te),c.runId,void 0,f,void 0,void 0,c.runName),y=[],g=(await Promise.allSettled(h.map(async(w,A)=>{const C=Z._convertInputToPromptValue(w).toString(),M=await n.lookup(C,r);return M==null&&y.push(A),M}))).map((w,A)=>({result:w,runManager:T?.[A]})).filter(({result:w})=>w.status==="fulfilled"&&w.value!=null||w.status==="rejected"),d=i.outputVersion??this.outputVersion,m=[];await Promise.all(g.map(async({result:w,runManager:A},C)=>{if(w.status==="fulfilled"){const M=w.value;return m[C]=M.map(O=>("message"in O&&X(O.message)&&oa(O.message)&&(O.message.usage_metadata={input_tokens:0,output_tokens:0,total_tokens:0},d==="v1"&&(O.message=ye(O.message))),O.generationInfo={...O.generationInfo,tokenUsage:{}},O)),M.length&&await A?.handleLLMNewToken(M[0].text),A?.handleLLMEnd({generations:[M]},void 0,void 0,void 0,{cached:!0})}else return await A?.handleLLMError(w.reason,void 0,void 0,void 0,{cached:!0}),Promise.reject(w.reason)}));const v={generations:m,missingPromptIndices:y,startedRunManagers:T};return Object.defineProperty(v,Ge,{value:T?{runIds:T?.map(w=>w.runId)}:void 0,configurable:!0}),v}async generate(a,n,r){let i;Array.isArray(n)?i={stop:n}:i=n;const c=a.map(d=>d.map(re)),[h,l]=this._separateRunnableConfigFromCallOptionsCompat(i);if(h.callbacks=h.callbacks??r,!this.cache)return this._generateUncached(c,l,h);const{cache:b}=this,f=this._getSerializedCacheKeyParametersForCall(l),{generations:T,missingPromptIndices:y,startedRunManagers:E}=await this._generateCached({messages:c,cache:b,llmStringKey:f,parsedOptions:l,handledOptions:h});let g={};if(y.length>0){const d=await this._generateUncached(y.map(m=>c[m]),l,h,E!==void 0?y.map(m=>E?.[m]):void 0);await Promise.all(d.generations.map(async(m,v)=>{const w=y[v];T[w]=m;const A=Z._convertInputToPromptValue(c[w]).toString();return b.update(A,f,m)})),g=d.llmOutput??{}}return{generations:T,llmOutput:g}}invocationParams(a){return{}}_modelType(){return"base_chat_model"}async generatePrompt(a,n,r){const i=a.map(c=>c.toChatMessages());return this.generate(i,n,r)}withStructuredOutput(a,n){if(typeof this.bindTools!="function")throw new Error('Chat model must implement ".bindTools()" to use withStructuredOutput.');if(n?.strict)throw new Error('"strict" mode is not supported for this model by default.');const r=a,i=n?.name,c=We(r)??"A function available to call.",h=n?.method,l=n?.includeRaw;if(h==="jsonMode")throw new Error('Base withStructuredOutput implementation only supports "functionCalling" as a method.');let b=i??"extract",f;Ae(r)?f=[{type:"function",function:{name:b,description:c,parameters:le(r)}}]:("name"in r&&(b=r.name),f=[{type:"function",function:{name:b,description:c,parameters:r}}]);const T=this.bindTools(f),y=Ie.from(m=>{if(!ca.isInstance(m))throw new Error("Input is not an AIMessageChunk.");if(!m.tool_calls||m.tool_calls.length===0)throw new Error("No tool calls found in the response.");const v=m.tool_calls.find(w=>w.name===b);if(!v)throw new Error(`No tool call found with name ${b}.`);return v.args});if(!l)return T.pipe(y).withConfig({runName:"StructuredOutput"});const E=ue.assign({parsed:(m,v)=>y.invoke(m.raw,v)}),g=ue.assign({parsed:()=>null}),d=E.withFallbacks({fallbacks:[g]});return Ke.from([{raw:T},d]).withConfig({runName:"StructuredOutputRunnable"})}},is=class extends vt{async _generate(e,a,n){const r=await this._call(e,a,n),i=new qe(r);if(typeof i.content!="string")throw new Error("Cannot generate with a simple chat model when output is not a string.");return{generations:[{text:i.content,message:i}]}}},os=class extends H{static lc_name(){return"RouterRunnable"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;runnables;constructor(e){super(e),this.runnables=e.runnables}async invoke(e,a){const{key:n,input:r}=e,i=this.runnables[n];if(i===void 0)throw new Error(`No runnable associated with key "${n}".`);return i.invoke(r,oe(a))}async batch(e,a,n){const r=e.map(y=>y.key),i=e.map(y=>y.input);if(r.find(y=>this.runnables[y]===void 0)!==void 0)throw new Error("One or more keys do not have a corresponding runnable.");const h=r.map(y=>this.runnables[y]),l=this._getOptionsList(a??{},e.length),b=l[0]?.maxConcurrency??n?.maxConcurrency,f=b&&b>0?b:e.length,T=[];for(let y=0;y<i.length;y+=f){const E=i.slice(y,y+f).map((d,m)=>h[m].invoke(d,l[m])),g=await Promise.all(E);T.push(g)}return T.flat()}async stream(e,a){const{key:n,input:r}=e,i=this.runnables[n];if(i===void 0)throw new Error(`No runnable associated with key "${n}".`);return i.stream(r,a)}},cs=class extends H{static lc_name(){return"RunnableBranch"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;default;branches;constructor(e){super(e),this.branches=e.branches,this.default=e.default}static from(e){if(e.length<1)throw new Error("RunnableBranch requires at least one branch");const n=e.slice(0,-1).map(([i,c])=>[ie(i),ie(c)]),r=ie(e[e.length-1]);return new this({branches:n,default:r})}async _invoke(e,a,n){let r;for(let i=0;i<this.branches.length;i+=1){const[c,h]=this.branches[i];if(await c.invoke(e,G(a,{callbacks:n?.getChild(`condition:${i+1}`)}))){r=await h.invoke(e,G(a,{callbacks:n?.getChild(`branch:${i+1}`)}));break}}return r||(r=await this.default.invoke(e,G(a,{callbacks:n?.getChild("branch:default")}))),r}async invoke(e,a={}){return this._callWithConfig(this._invoke,e,a)}async*_streamIterator(e,a){const r=await(await Qe(a))?.handleChainStart(this.toJSON(),ga(e,"input"),a?.runId,void 0,void 0,void 0,a?.runName);let i,c=!0,h;try{for(let l=0;l<this.branches.length;l+=1){const[b,f]=this.branches[l];if(await b.invoke(e,G(a,{callbacks:r?.getChild(`condition:${l+1}`)}))){h=await f.stream(e,G(a,{callbacks:r?.getChild(`branch:${l+1}`)}));for await(const y of h)if(yield y,c)if(i===void 0)i=y;else try{i=ce(i,y)}catch{i=void 0,c=!1}break}}if(h===void 0){h=await this.default.stream(e,G(a,{callbacks:r?.getChild("branch:default")}));for await(const l of h)if(yield l,c)if(i===void 0)i=l;else try{i=ce(i,l)}catch{i=void 0,c=!1}}}catch(l){throw await r?.handleChainError(l),l}await r?.handleChainEnd(i??{})}},us=class extends et{runnable;inputMessagesKey;outputMessagesKey;historyMessagesKey;getMessageHistory;constructor(e){let a=Ie.from((c,h)=>this._enterHistory(c,h??{})).withConfig({runName:"loadHistory"});const n=e.historyMessagesKey??e.inputMessagesKey;n&&(a=ue.assign({[n]:a}).withConfig({runName:"insertHistory"}));const r=a.pipe(e.runnable.withListeners({onEnd:(c,h)=>this._exitHistory(c,h??{})})).withConfig({runName:"RunnableWithMessageHistory"}),i=e.config??{};super({...e,config:i,bound:r}),this.runnable=e.runnable,this.getMessageHistory=e.getMessageHistory,this.inputMessagesKey=e.inputMessagesKey,this.outputMessagesKey=e.outputMessagesKey,this.historyMessagesKey=e.historyMessagesKey}_getInputMessages(e){let a;if(typeof e=="object"&&!Array.isArray(e)&&!X(e)){let n;this.inputMessagesKey?n=this.inputMessagesKey:Object.keys(e).length===1?n=Object.keys(e)[0]:n="input",Array.isArray(e[n])&&Array.isArray(e[n][0])?a=e[n][0]:a=e[n]}else a=e;if(typeof a=="string")return[new Se(a)];if(Array.isArray(a))return a;if(X(a))return[a];throw new Error(`Expected a string, BaseMessage, or array of BaseMessages.
|
|
3
3
|
Got ${JSON.stringify(a,null,2)}`)}_getOutputMessages(e){let a;if(!Array.isArray(e)&&!X(e)&&typeof e!="string"){let n;this.outputMessagesKey!==void 0?n=this.outputMessagesKey:Object.keys(e).length===1?n=Object.keys(e)[0]:n="output",e.generations!==void 0?a=e.generations[0][0].message:a=e[n]}else a=e;if(typeof a=="string")return[new qe(a)];if(Array.isArray(a))return a;if(X(a))return[a];throw new Error(`Expected a string, BaseMessage, or array of BaseMessages. Received: ${JSON.stringify(a,null,2)}`)}async _enterHistory(e,a){const r=await(a?.configurable?.messageHistory).getMessages();return this.historyMessagesKey===void 0?r.concat(this._getInputMessages(e)):r}async _exitHistory(e,a){const n=a.configurable?.messageHistory;let r;Array.isArray(e.inputs)&&Array.isArray(e.inputs[0])?r=e.inputs[0]:r=e.inputs;let i=this._getInputMessages(r);if(this.historyMessagesKey===void 0){const l=await n.getMessages();i=i.slice(l.length)}const c=e.outputs;if(!c)throw new Error(`Output values from 'Run' undefined. Run: ${JSON.stringify(e,null,2)}`);const h=this._getOutputMessages(c);await n.addMessages([...i,...h])}async _mergeConfig(...e){const a=await super._mergeConfig(...e);if(!a.configurable||!a.configurable.sessionId){const r={[this.inputMessagesKey??"input"]:"foo"},i={configurable:{sessionId:"123"}};throw new Error(`sessionId is required. Pass it in as part of the config argument to .invoke() or .stream()
|
|
4
4
|
eg. chain.invoke(${JSON.stringify(r)}, ${JSON.stringify(i)})`)}const{sessionId:n}=a.configurable;return a.configurable.messageHistory=await this.getMessageHistory(n),a}},ls={};U(ls,{RouterRunnable:()=>os,Runnable:()=>H,RunnableAssign:()=>Xe,RunnableBinding:()=>et,RunnableBranch:()=>cs,RunnableEach:()=>Ea,RunnableLambda:()=>Ie,RunnableMap:()=>Ye,RunnableParallel:()=>va,RunnablePassthrough:()=>ue,RunnablePick:()=>Ta,RunnableRetry:()=>ya,RunnableSequence:()=>Ke,RunnableToolLike:()=>_a,RunnableWithFallbacks:()=>ba,RunnableWithMessageHistory:()=>us,_coerceToRunnable:()=>ie,ensureConfig:()=>oe,getCallbackManagerForConfig:()=>Qe,mergeConfigs:()=>da,patchConfig:()=>G,pickRunnableConfigKeys:()=>fa,raceWithSignal:()=>ma});var Et=class extends H{parseResultWithPrompt(e,a,n){return this.parseResult(e,n)}_baseMessageToString(e){return typeof e.content=="string"?e.content:this._baseMessageContentToString(e.content)}_baseMessageContentToString(e){return JSON.stringify(e)}async invoke(e,a){return typeof e=="string"?this._callWithConfig(async(n,r)=>this.parseResult([{text:n}],r?.callbacks),e,{...a,runType:"parser"}):this._callWithConfig(async(n,r)=>this.parseResult([{message:n,text:this._baseMessageToString(n)}],r?.callbacks),e,{...a,runType:"parser"})}},ge=class extends Et{parseResult(e,a){return this.parse(e[0].text,a)}async parseWithPrompt(e,a,n){return this.parse(e,n)}_type(){throw new Error("_type not implemented")}},$=class extends Error{llmOutput;observation;sendToLLM;constructor(e,a,n,r=!1){if(super(e),this.llmOutput=a,this.observation=n,this.sendToLLM=r,r&&(n===void 0||a===void 0))throw new Error("Arguments 'observation' & 'llmOutput' are required if 'sendToLlm' is true");wa(this,"OUTPUT_PARSING_FAILURE")}},Q=class extends ge{async*_transform(e){for await(const a of e)typeof a=="string"?yield this.parseResult([{text:a}]):yield this.parseResult([{message:a,text:this._baseMessageToString(a)}])}async*transform(e,a){yield*this._transformStreamWithConfig(e,this._transform.bind(this),{...a,runType:"parser"})}},ke=class extends Q{diff=!1;constructor(e){super(e),this.diff=e?.diff??this.diff}async*_transform(e){let a,n;for await(const r of e){if(typeof r!="string"&&typeof r.content!="string")throw new Error("Cannot handle non-string output.");let i;if(Ca(r)){if(typeof r.content!="string")throw new Error("Cannot handle non-string message output.");i=new Ze({message:r,text:r.content})}else if(X(r)){if(typeof r.content!="string")throw new Error("Cannot handle non-string message output.");i=new Ze({message:Aa(r),text:r.content})}else i=new Sa({text:r});n===void 0?n=i:n=n.concat(i);const c=await this.parsePartialResult([n]);c!=null&&!Ia(c,a)&&(this.diff?yield this._diff(a,c):yield c,a=c)}}getFormatInstructions(){return""}},hs=class extends Q{static lc_name(){return"BytesOutputParser"}lc_namespace=["langchain_core","output_parsers","bytes"];lc_serializable=!0;textEncoder=new TextEncoder;parse(e){return Promise.resolve(this.textEncoder.encode(e))}getFormatInstructions(){return""}},ee=class extends Q{re;async*_transform(e){let a="";for await(const n of e)if(typeof n=="string"?a+=n:a+=n.content,this.re){const r=[...a.matchAll(this.re)];if(r.length>1){let i=0;for(const c of r.slice(0,-1))yield[c[1]],i+=(c.index??0)+c[0].length;a=a.slice(i)}}else{const r=await this.parse(a);if(r.length>1){for(const i of r.slice(0,-1))yield[i];a=r[r.length-1]}}for(const n of await this.parse(a))yield[n]}},ps=class extends ee{static lc_name(){return"CommaSeparatedListOutputParser"}lc_namespace=["langchain_core","output_parsers","list"];lc_serializable=!0;async parse(e){try{return e.trim().split(",").map(a=>a.trim())}catch{throw new $(`Could not parse output: ${e}`,e)}}getFormatInstructions(){return"Your response should be a list of comma separated values, eg: `foo, bar, baz`"}},gs=class extends ee{lc_namespace=["langchain_core","output_parsers","list"];length;separator;constructor({length:e,separator:a}){super(...arguments),this.length=e,this.separator=a||","}async parse(e){try{const a=e.trim().split(this.separator).map(n=>n.trim());if(this.length!==void 0&&a.length!==this.length)throw new $(`Incorrect number of items. Expected ${this.length}, got ${a.length}.`);return a}catch(a){throw Object.getPrototypeOf(a)===$.prototype?a:new $(`Could not parse output: ${e}`)}}getFormatInstructions(){return`Your response should be a list of ${this.length===void 0?"":`${this.length} `}items separated by "${this.separator}" (eg: \`foo${this.separator} bar${this.separator} baz\`)`}},ms=class extends ee{static lc_name(){return"NumberedListOutputParser"}lc_namespace=["langchain_core","output_parsers","list"];lc_serializable=!0;getFormatInstructions(){return`Your response should be a numbered list with each item on a new line. For example:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-_RJPxEz8.js";import{r as s}from"./inform7-CKh91FfW.js";function c(t,f){for(var o=0;o<f.length;o++){const r=f[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const n=Object.getOwnPropertyDescriptor(r,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=s();const m=a(i),l=c({__proto__:null,default:m},[i]);export{l as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./ini-CUN5Fz6a.js";function c(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(e,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=s();const p=f(a),g=c({__proto__:null,default:p},[a]);export{g as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./index-
|
|
1
|
+
import{r as p}from"./index-_RJPxEz8.js";import{r as a}from"./irpf90-BGwK5upn.js";function s(t,i){for(var o=0;o<i.length;o++){const r=i[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const f=Object.getOwnPropertyDescriptor(r,e);f&&Object.defineProperty(t,e,f.get?f:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=a();const c=p(n),g=s({__proto__:null,default:c},[n]);export{g as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-_RJPxEz8.js";import{r as f}from"./isbl-BW2-1xqY.js";function l(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=f();const c=a(n),b=l({__proto__:null,default:c},[n]);export{b as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as i}from"./java-BopHZ59q.js";function c(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=i();const p=s(f),g=c({__proto__:null,default:p},[f]);export{g as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./index-
|
|
1
|
+
import{r as c}from"./index-_RJPxEz8.js";import{r as n}from"./javascript-Bcajz3YC.js";function p(t,s){for(var o=0;o<s.length;o++){const r=s[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const a=Object.getOwnPropertyDescriptor(r,e);a&&Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=n();const f=c(i),g=p({__proto__:null,default:f},[i]);export{g as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-_RJPxEz8.js";import{r as f}from"./jboss-cli-7Bb2wtKY.js";function l(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=f();const c=a(n),b=l({__proto__:null,default:c},[n]);export{b as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as i}from"./json-_cGKMkqV.js";function c(t,s){for(var o=0;o<s.length;o++){const e=s[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=i();const p=f(a),g=c({__proto__:null,default:p},[a]);export{g as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./julia-CflsGA1_.js";function u(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=s();const l=f(n),g=u({__proto__:null,default:l},[n]);export{g as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as p}from"./julia-repl-DTkCRO_Z.js";function f(t,l){for(var o=0;o<l.length;o++){const e=l[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=p();const s=n(i),g=f({__proto__:null,default:s},[i]);export{g as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./kotlin-DSmpQSGN.js";function l(r,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const n=Object.getOwnPropertyDescriptor(e,t);n&&Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var a=s();const c=f(a),g=l({__proto__:null,default:c},[a]);export{g as k};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/client-
|
|
2
|
-
import{bq as $c,br as eo,bs as jc,t as R,bt as Wr,b7 as Gr,bu as ve,b4 as Lc,bp as Dc,b9 as kn,b2 as re,bb as Fc,b3 as Uc,bv as Vc,K as y,aQ as Re,e as mn,bw as Bc,bx as En,A as He,by as Ss,n as X,aC as hn,aA as se,U as P,ab as ae,j as zc,C as Hc,bz as Wc,z as Do,aY as Ii,bA as oe,aE as xn,bB as _n,X as Pi,S as Ue,bC as to,Q as Me,V as Cs,W as Qt,aJ as yr,bD as Gc,bE as Kc,bF as Jc,bG as qc,bH as Yc,bI as Xc,bJ as Zc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as ru,bP as su,bQ as ou,bR as iu,bS as au,bT as lu,bU as cu,bV as uu,bW as hu,a1 as du,bX as fu,bY as pu,bZ as mu,p as vn,m as $e,a2 as it,aN as en,b_ as gu,Y as yu,aZ as Fo,aO as wu,b$ as Uo,c0 as Vo,c1 as wr,c2 as bt,b5 as no,ax as Ts,aw as ks,az as bu,ad as _u,as as ro,ay as so,an as te,av as nt,o as K,c3 as Le,c4 as Oi,b as oo,l as j,c5 as vu,c6 as Su,c7 as Cu,ac as Ni,at as Tu,x as ku,aR as Eu,T as xu,c8 as Dn,c9 as De,s as ie,ca as Ri,cb as tn,cc as Mn,cd as Mu,ce as Ke,cf as _t,cg as z,au as Au,f as io,aB as Iu,a as Pu,ch as $i,ci as Fn,cj as gt,ck as Ou,bl as Nu,bj as Ru,bi as $u,cl as ju,H as ji,cm as Xn,cn as Bo,u as nn,bg as Zn,E as Lu,co as Du,J as zo,cp as Fu,cq as Uu,cr as Vu,O as Bu,cs as zu,ct as Hu,cu as Ho}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/client-54wbSxe9.js","assets/index-_RJPxEz8.js","assets/index-Br5Lp-nB.css","assets/display-A5IEINAP-DNCj3jM3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bq as $c,br as eo,bs as jc,t as R,bt as Wr,b7 as Gr,bu as ve,b4 as Lc,bp as Dc,b9 as kn,b2 as re,bb as Fc,b3 as Uc,bv as Vc,K as y,aQ as Re,e as mn,bw as Bc,bx as En,A as He,by as Ss,n as X,aC as hn,aA as se,U as P,ab as ae,j as zc,C as Hc,bz as Wc,z as Do,aY as Ii,bA as oe,aE as xn,bB as _n,X as Pi,S as Ue,bC as to,Q as Me,V as Cs,W as Qt,aJ as yr,bD as Gc,bE as Kc,bF as Jc,bG as qc,bH as Yc,bI as Xc,bJ as Zc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as ru,bP as su,bQ as ou,bR as iu,bS as au,bT as lu,bU as cu,bV as uu,bW as hu,a1 as du,bX as fu,bY as pu,bZ as mu,p as vn,m as $e,a2 as it,aN as en,b_ as gu,Y as yu,aZ as Fo,aO as wu,b$ as Uo,c0 as Vo,c1 as wr,c2 as bt,b5 as no,ax as Ts,aw as ks,az as bu,ad as _u,as as ro,ay as so,an as te,av as nt,o as K,c3 as Le,c4 as Oi,b as oo,l as j,c5 as vu,c6 as Su,c7 as Cu,ac as Ni,at as Tu,x as ku,aR as Eu,T as xu,c8 as Dn,c9 as De,s as ie,ca as Ri,cb as tn,cc as Mn,cd as Mu,ce as Ke,cf as _t,cg as z,au as Au,f as io,aB as Iu,a as Pu,ch as $i,ci as Fn,cj as gt,ck as Ou,bl as Nu,bj as Ru,bi as $u,cl as ju,H as ji,cm as Xn,cn as Bo,u as nn,bg as Zn,E as Lu,co as Du,J as zo,cp as Fu,cq as Uu,cr as Vu,O as Bu,cs as zu,ct as Hu,cu as Ho}from"./index-_RJPxEz8.js";import{a as Qn,S as jr,b as Wu,t as Li,T as Gu,D as Ku}from"./index-VIKu1lMD.js";import{h as Un,s as Di,g as Fi,d as Ju,l as qu,m as Yu,I as Xu,C as Zu,n as Qu,t as eh,o as th,p as nh,q as rh,r as sh,u as oh,v as ih,w as ah,x as lh,y as ch,z as uh,R as hh,A as Wo,e as dh}from"./index-iYDybM8x.js";import{E as Ui,a as fh,e as ph}from"./embeddings-H_oXPOEK.js";import{L as Vi,o as mh,l as gh}from"./llms-ClwyAiVe.js";var Kr,Hn,Jr=0,qr=0;function yh(t,e,n){var r=0,s=e||new Array(16);t=t||{};var o=t.node,i=t.clockseq;if(t._v6||(o||(o=Kr),i==null&&(i=Hn)),o==null||i==null){var a=t.random||(t.rng||$c)();o==null&&(o=[a[0],a[1],a[2],a[3],a[4],a[5]],!Kr&&!t._v6&&(o[0]|=1,Kr=o)),i==null&&(i=(a[6]<<8|a[7])&16383,Hn===void 0&&!t._v6&&(Hn=i))}var l=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:qr+1,u=l-Jr+(c-qr)/1e4;if(u<0&&t.clockseq===void 0&&(i=i+1&16383),(u<0||l>Jr)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Jr=l,qr=c,Hn=i,l+=122192928e5;var d=((l&268435455)*1e4+c)%4294967296;s[r++]=d>>>24&255,s[r++]=d>>>16&255,s[r++]=d>>>8&255,s[r++]=d&255;var h=l/4294967296*1e4&268435455;s[r++]=h>>>8&255,s[r++]=h&255,s[r++]=h>>>24&15|16,s[r++]=h>>>16&255,s[r++]=i>>>8|128,s[r++]=i&255;for(var f=0;f<6;++f)s[r+f]=o[f];return e||eo(s)}function wh(t){var e=typeof t=="string"?jc(t):t,n=bh(e);return typeof t=="string"?eo(n):n}function bh(t,e=!1){return Uint8Array.of((t[6]&15)<<4|t[7]>>4&15,(t[7]&15)<<4|(t[4]&240)>>4,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,(t[1]&15)<<4|(t[2]&240)>>4,96|t[2]&15,t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function Go(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ko(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Go(Object(n),!0).forEach(function(r){_h(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _h(t,e,n){return(e=vh(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vh(t){var e=Sh(t,"string");return typeof e=="symbol"?e:e+""}function Sh(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ch(t={},e,n=0){var r=yh(Ko(Ko({},t),{},{_v6:!0}),new Uint8Array(16));return r=wh(r),eo(r)}async function*Bi(t){for await(const e of t)if(e.event==="on_chat_model_stream"&&e.data?.chunk?.text){const n=e.data.chunk.text;typeof n=="string"&&n.length>0&&(yield n)}}R(Bi,"streamEventsToAISDK");function zi(t){return new ReadableStream({async start(e){try{for await(const n of t)e.enqueue(n);e.close()}catch(n){e.error(n)}}})}R(zi,"createReadableStreamFromGenerator");async function*Hi(t){for await(const e of t)switch(e.event){case"on_chat_model_stream":if(e.data?.chunk?.text){const n=e.data.chunk.text;typeof n=="string"&&n.length>0&&(yield n)}break;case"on_tool_start":yield`
|
|
3
3
|
🔧 Using tool: ${e.name}
|
|
4
4
|
`;break;case"on_tool_end":yield`
|
|
5
5
|
✅ Tool completed: ${e.name}
|
|
@@ -387,7 +387,7 @@ You can then use these server-specific tools in subsequent steps.
|
|
|
387
387
|
Here are the tools *currently* available to you (this list includes server management tools and will
|
|
388
388
|
change when you connect to a server):
|
|
389
389
|
{tool_descriptions}
|
|
390
|
-
`;function gr(t,e,n,r,s,o){if(typeof t=="object"&&t!==null){const i=t;return{query:i.prompt,maxSteps:i.maxSteps,manageConnector:i.manageConnector,externalHistory:i.externalHistory,outputSchema:i.schema,signal:i.signal}}return{query:t,maxSteps:e,manageConnector:n,externalHistory:r,outputSchema:s,signal:o}}R(gr,"normalizeRunOptions");var Zt,Ty=(Zt=class{static getPackageVersion(){return ji()}llm;client;connectors;maxSteps;autoInitialize;memoryEnabled;disallowedTools;additionalTools;toolsUsedNames=[];exposeResourcesAsTools=!0;exposePromptsAsTools=!0;useServerManager;verbose;observe;systemPrompt;systemPromptTemplateOverride;additionalInstructions;_initialized=!1;conversationHistory=[];_agentExecutor=null;sessions={};systemMessage=null;_tools=[];adapter;serverManager=null;telemetry;modelProvider;modelName;observabilityManager;callbacks=[];metadata={};tags=[];isRemote=!1;remoteAgent=null;isSimplifiedMode=!1;llmString;llmConfig;mcpServersConfig;clientOwnedByAgent=!1;constructor(e){if(e.agentId){this.isRemote=!0,this.remoteAgent=new Mc({agentId:e.agentId,apiKey:e.apiKey,baseUrl:e.baseUrl}),this.maxSteps=e.maxSteps??5,this.memoryEnabled=e.memoryEnabled??!0,this.autoInitialize=e.autoInitialize??!1,this.verbose=e.verbose??!1,this.observe=e.observe??!0,this.connectors=[],this.disallowedTools=[],this.additionalTools=[],this.useServerManager=!1,this.adapter=new xt,this.telemetry=Xn.getInstance(),this.modelProvider="remote",this.modelName="remote-agent",this.observabilityManager=new Qs({customCallbacks:e.callbacks,agentId:e.agentId}),this.callbacks=[];return}if(!e.llm)throw new Error("llm is required for local execution. For remote execution, provide agentId instead.");if(typeof e.llm=="string"){if(this.isSimplifiedMode=!0,this.llmString=e.llm,this.llmConfig=e.llmConfig,this.mcpServersConfig=e.mcpServers,!this.mcpServersConfig||Object.keys(this.mcpServersConfig).length===0)throw new Error("Simplified mode requires 'mcpServers' configuration. Provide an object with server configurations, e.g., { filesystem: { command: 'npx', args: [...] } }");this.llm=void 0,this.client=void 0,this.clientOwnedByAgent=!0,this.connectors=[],y.info(`🎯 Simplified mode enabled: LLM will be created from '${this.llmString}'`)}else if(this.isSimplifiedMode=!1,this.llm=e.llm,this.client=e.client,this.connectors=e.connectors??[],this.clientOwnedByAgent=!1,!this.client&&this.connectors.length===0)throw new Error("Explicit mode requires either 'client' or at least one 'connector'. Alternatively, use simplified mode with 'llm' as a string and 'mcpServers' config.");if(this.maxSteps=e.maxSteps??5,this.autoInitialize=e.autoInitialize??!1,this.memoryEnabled=e.memoryEnabled??!0,this.systemPrompt=e.systemPrompt??null,this.systemPromptTemplateOverride=e.systemPromptTemplate??null,this.additionalInstructions=e.additionalInstructions??null,this.disallowedTools=e.disallowedTools??[],this.additionalTools=e.additionalTools??[],this.toolsUsedNames=e.toolsUsedNames??[],this.exposeResourcesAsTools=e.exposeResourcesAsTools??!0,this.exposePromptsAsTools=e.exposePromptsAsTools??!0,this.useServerManager=e.useServerManager??!1,this.verbose=e.verbose??!1,this.observe=e.observe??!0,this.isSimplifiedMode)this.adapter=e.adapter??new xt(this.disallowedTools),this.telemetry=Xn.getInstance(),this.modelProvider="unknown",this.modelName="unknown";else{if(this.useServerManager){if(!this.client)throw new Error("'client' must be provided when 'useServerManager' is true.");this.adapter=e.adapter??new xt(this.disallowedTools),this.serverManager=e.serverManagerFactory?.(this.client)??new xi(this.client,this.adapter)}else this.adapter=e.adapter??new xt(this.disallowedTools);if(this.telemetry=Xn.getInstance(),this.llm){const[r,s]=Bo(this.llm);this.modelProvider=r,this.modelName=s}else this.modelProvider="unknown",this.modelName="unknown"}this.observabilityManager=new Qs({customCallbacks:e.callbacks,verbose:this.verbose,observe:this.observe,agentId:e.agentId,metadataProvider:R(()=>this.getMetadata(),"metadataProvider"),tagsProvider:R(()=>this.getTags(),"tagsProvider")}),Object.defineProperty(this,"agentExecutor",{get:R(()=>this._agentExecutor,"get"),configurable:!0}),Object.defineProperty(this,"tools",{get:R(()=>this._tools,"get"),configurable:!0}),Object.defineProperty(this,"initialized",{get:R(()=>this._initialized,"get"),configurable:!0})}async initialize(){if(this.isRemote){this._initialized=!0;return}if(y.info("🚀 Initializing MCP agent and connecting to services..."),this.isSimplifiedMode){if(y.info("🎯 Simplified mode: Creating client and LLM from configuration..."),this.mcpServersConfig){y.info(`Creating MCPClient with ${Object.keys(this.mcpServersConfig).length} server(s)...`);const{MCPClient:r}=await nn(async()=>{const{MCPClient:s}=await import("./client-hyRgVCty.js").then(o=>o.c);return{MCPClient:s}},__vite__mapDeps([0,1,2]));this.client=new r({mcpServers:this.mcpServersConfig}),y.info("✅ MCPClient created successfully")}if(this.llmString){y.info(`Creating LLM from string: ${this.llmString}...`);try{this.llm=await $o(this.llmString,this.llmConfig),y.info("✅ LLM created successfully");const[r,s]=Bo(this.llm);this.modelProvider=r,this.modelName=s}catch(r){throw new Error(`Failed to create LLM from string '${this.llmString}': ${r?.message||r}`)}}if(this.useServerManager){if(!this.client)throw new Error("'client' must be available when 'useServerManager' is true.");this.serverManager=new xi(this.client,this.adapter)}}this.callbacks=await this.observabilityManager.getCallbacks();const e=await this.observabilityManager.getHandlerNames();if(e.length>0&&y.info(`📊 Observability enabled with: ${e.join(", ")}`),this.useServerManager&&this.serverManager){await this.serverManager.initialize();const r=this.serverManager.tools;this._tools=r,this._tools.push(...this.additionalTools),y.info(`🔧 Server manager mode active with ${r.length} management tools`),await this.createSystemMessageFromTools(this._tools)}else{if(this.client){if(this.sessions=this.client.getAllActiveSessions(),y.info(`🔌 Found ${Object.keys(this.sessions).length} existing sessions`),Object.keys(this.sessions).filter(s=>s!=="code_mode").length===0&&(y.info("🔄 No active sessions found, creating new ones..."),this.sessions=await this.client.createAllSessions(),y.info(`✅ Created ${Object.keys(this.sessions).length} new sessions`)),this.client.codeMode){const s=this.sessions.code_mode;if(s)this._tools=await this.adapter.createToolsFromConnectors([s.connector]),y.info(`🛠️ Created ${this._tools.length} code mode tools`);else throw new Error("Code mode enabled but code_mode session not found")}else{const s=Object.values(this.sessions).map(l=>l.connector),o=await this.adapter.createToolsFromConnectors(s),i=this.exposeResourcesAsTools?await this.adapter.createResourcesFromConnectors(s):[],a=this.exposePromptsAsTools?await this.adapter.createPromptsFromConnectors(s):[];this._tools=[...o,...i,...a],y.info(`🛠️ Created ${this._tools.length} LangChain items from client: ${o.length} tools, ${i.length} resources, ${a.length} prompts`)}this._tools.push(...this.additionalTools)}else{y.info(`🔗 Connecting to ${this.connectors.length} direct connectors...`);for(const i of this.connectors)i.isClientConnected||await i.connect();const r=await this.adapter.createToolsFromConnectors(this.connectors),s=await this.adapter.createResourcesFromConnectors(this.connectors),o=await this.adapter.createPromptsFromConnectors(this.connectors);this._tools=[...r,...s,...o],this._tools.push(...this.additionalTools),y.info(`🛠️ Created ${this._tools.length} LangChain items from connectors: ${r.length} tools, ${s.length} resources, ${o.length} prompts`)}y.info(`🧰 Found ${this._tools.length} tools across all connectors`),await this.createSystemMessageFromTools(this._tools)}this._agentExecutor=this.createAgent(),this._initialized=!0;const n=this.getMCPServerInfo();Object.keys(n).length>0&&(this.setMetadata(n),y.debug(`MCP server info added to metadata: ${JSON.stringify(n)}`)),y.info("✨ Agent initialization complete")}async createSystemMessageFromTools(e){const n=this.systemPromptTemplateOverride??Sy;this.systemMessage=Rc(e,n,Cy,this.useServerManager,this.disallowedTools,this.systemPrompt??void 0,this.additionalInstructions??void 0),this.memoryEnabled&&(this.conversationHistory=[this.systemMessage,...this.conversationHistory.filter(r=>!(r instanceof oe))])}createAgent(){if(!this.llm)throw new Error("LLM is required to create agent");const e=this.systemMessage?.content??"You are a helpful assistant.",n=this._tools.map(o=>o.name);y.info(`🧠 Agent ready with tools: ${n.join(", ")}`);const r=[Tc({runLimit:this.maxSteps})],s=sc({model:this.llm,tools:this._tools,systemPrompt:e,middleware:r});return y.debug(`Created agent with max_steps=${this.maxSteps} (via ModelCallLimitMiddleware) and ${this.callbacks.length} callbacks`),s}getConversationHistory(){return[...this.conversationHistory]}clearConversationHistory(){this.conversationHistory=this.memoryEnabled&&this.systemMessage?[this.systemMessage]:[]}addToHistory(e){this.memoryEnabled&&this.conversationHistory.push(e)}getSystemMessage(){return this.systemMessage}setSystemMessage(e){this.systemMessage=new oe(e),this.memoryEnabled&&(this.conversationHistory=this.conversationHistory.filter(n=>!(n instanceof oe)),this.conversationHistory.unshift(this.systemMessage)),this._initialized&&this._tools.length&&(this._agentExecutor=this.createAgent(),y.debug("Agent recreated with new system message"))}setDisallowedTools(e){this.disallowedTools=e,this.adapter=new xt(this.disallowedTools),this._initialized&&y.debug("Agent already initialized. Changes will take effect on next initialization.")}getDisallowedTools(){return this.disallowedTools}setMetadata(e){const n=this.sanitizeMetadata(e);this.metadata={...this.metadata,...n},y.debug(`Metadata set: ${JSON.stringify(this.metadata)}`)}getMetadata(){return{...this.metadata}}setTags(e){const n=this.sanitizeTags(e);this.tags=[...new Set([...this.tags,...n])],y.debug(`Tags set: ${JSON.stringify(this.tags)}`)}getTags(){return[...this.tags]}sanitizeMetadata(e){const n={};for(const[r,s]of Object.entries(e)){if(typeof r!="string"||r.length===0){y.warn(`Invalid metadata key: ${r}. Skipping.`);continue}const o=r.replace(/[^\w-]/g,"_");if(s==null)n[o]=s;else if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")n[o]=s;else if(Array.isArray(s)){const i=s.filter(a=>typeof a=="string"||typeof a=="number"||typeof a=="boolean");i.length>0&&(n[o]=i)}else if(typeof s=="object")try{const i=JSON.stringify(s);i.length>1e3?(y.warn(`Metadata value for key '${o}' is too large. Truncating.`),n[o]=`${i.substring(0,1e3)}...`):n[o]=s}catch(i){y.warn(`Failed to serialize metadata value for key '${o}': ${i}. Skipping.`)}else y.warn(`Unsupported metadata value type for key '${o}': ${typeof s}. Skipping.`)}return n}sanitizeTags(e){return e.filter(n=>typeof n=="string"&&n.length>0).map(n=>n.replace(/[^\w:-]/g,"_")).filter(n=>n.length<=50)}getMCPServerInfo(){const e={};try{if(this.client){const n=this.client.getServerNames();e.mcp_servers_count=n.length,e.mcp_server_names=n;const r={};for(const s of n)try{const o=this.client.getServerConfig(s);if(o){let i="unknown";o.command?i="command":o.url?i="http":o.ws_url&&(i="websocket"),r[s]={type:i,has_args:!!o.args,has_env:!!o.env,has_headers:!!o.headers,url:o.url||null,command:o.command||null}}}catch(o){y.warn(`Failed to get config for server '${s}': ${o}`),r[s]={type:"error",error:"config_unavailable"}}e.mcp_server_configs=r}else this.connectors&&this.connectors.length>0&&(e.mcp_servers_count=this.connectors.length,e.mcp_server_names=this.connectors.map(n=>n.publicIdentifier),e.mcp_server_types=this.connectors.map(n=>n.constructor.name))}catch(n){y.warn(`Failed to collect MCP server info: ${n}`),e.error="collection_failed"}return e}_normalizeOutput(e){try{if(typeof e=="string")return e;if(e&&typeof e=="object"&&"content"in e)return this._normalizeOutput(e.content);if(Array.isArray(e)){const n=[];for(const r of e)if(typeof r=="object"&&r!==null)"text"in r&&typeof r.text=="string"?n.push(r.text):"content"in r?n.push(this._normalizeOutput(r.content)):n.push(String(r));else{const s=r&&typeof r=="object"&&"text"in r?r.text:null;if(typeof s=="string")n.push(s);else{const o=r&&typeof r=="object"&&"content"in r?r.content:r;n.push(this._normalizeOutput(o))}}return n.join("")}return String(e)}catch{return String(e)}}_isAIMessageLike(e){if(e instanceof P)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{const r=n.getType();if(r==="ai"||r==="assistant")return!0}catch{}if(typeof n._getType=="function")try{const r=n._getType();if(r==="ai"||r==="assistant")return!0}catch{}return"type"in n?n.type==="ai"||n.type==="assistant":"role"in n?n.role==="ai"||n.role==="assistant":!1}_messageHasToolCalls(e){return typeof e=="object"&&e!==null&&"tool_calls"in e&&Array.isArray(e.tool_calls)?e.tool_calls.length>0:!1}_isHumanMessageLike(e){if(e instanceof se)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{const r=n.getType();if(r==="human"||r==="user")return!0}catch{}return"type"in n&&(n.type==="human"||n.type==="user")||"role"in n&&(n.role==="human"||n.role==="user")}_isToolMessageLike(e){if(e instanceof j)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{if(n.getType()==="tool")return!0}catch{}return"type"in n&&n.type==="tool"}_getMessageContent(e){if(e instanceof P||e&&typeof e=="object"&&"content"in e)return e.content}async _consumeAndReturn(e){for(;;){const{done:n,value:r}=await e.next();if(n)return r}}async run(e,n,r,s,o,i){const{query:a,maxSteps:l,manageConnector:c,externalHistory:u,outputSchema:d,signal:h}=gr(e,n,r,s,o,i);if(this.isRemote&&this.remoteAgent)return this.remoteAgent.run(a,l,c,u,d);const f=this.stream(a,l,c,u,d,h);return this._consumeAndReturn(f)}async*stream(e,n,r=!0,s,o,i){const{query:a,maxSteps:l,manageConnector:c,externalHistory:u,outputSchema:d,signal:h}=gr(e,n,r,s,o,i);if(this.isRemote&&this.remoteAgent)return await this.remoteAgent.run(a,l,c,u,d);let f=!1;const m=Date.now();let p=!1,C=null,T=0;try{if(c&&!this._initialized?(await this.initialize(),f=!0):!this._initialized&&this.autoInitialize&&(await this.initialize(),f=!0),!this._agentExecutor)throw new Error("MCP agent failed to initialize");if(this.useServerManager&&this.serverManager){const b=this.serverManager.tools,E=new Set(b.map(x=>x.name)),S=new Set(this._tools.map(x=>x.name));(E.size!==S.size||[...E].some(x=>!S.has(x)))&&(y.info(`🔄 Tools changed before execution, updating agent. New tools: ${[...E].join(", ")}`),this._tools=b,this._tools.push(...this.additionalTools),await this.createSystemMessageFromTools(this._tools),this._agentExecutor=this.createAgent())}const k=u??this.conversationHistory,_=[];for(const b of k)(this._isHumanMessageLike(b)||this._isAIMessageLike(b)||this._isToolMessageLike(b))&&_.push(b);const g=a.length>50?`${a.slice(0,50).replace(/\n/g," ")}...`:a.replace(/\n/g," ");y.info(`💬 Received query: '${g}'`),y.info("🏁 Starting agent execution");const v=3;let M=0;const w=[..._,new se(a)];for(;M<=v;){const b={messages:w};let E=!1;const S=await this._agentExecutor.stream(b,{streamMode:"updates",callbacks:this.callbacks,metadata:this.getMetadata(),tags:this.getTags(),runName:this.metadata.trace_name||"mcp-use-agent",recursionLimit:this.maxSteps*3,...this.metadata.session_id&&{sessionId:this.metadata.session_id},...h&&{signal:h}});for await(const x of S){if(h?.aborted)break;for(const[I,O]of Object.entries(x))if(y.debug(`📦 Node '${I}' output: ${JSON.stringify(O)}`),O&&typeof O=="object"&&"messages"in O){let F=O.messages;Array.isArray(F)||(F=[F]);for(const ce of F)w.includes(ce)||w.push(ce);for(const ce of F){if("tool_calls"in ce&&Array.isArray(ce.tool_calls)&&ce.tool_calls.length>0)for(const Ie of ce.tool_calls){const we=Ie.name||"unknown",ht=Ie.args||{};this.toolsUsedNames.push(we),T++;let Je=JSON.stringify(ht);Je.length>100&&(Je=`${Je.slice(0,97)}...`),y.info(`🔧 Tool call: ${we} with input: ${Je}`),yield{action:{tool:we,toolInput:ht,log:`Calling tool ${we}`},observation:""}}if(this._isToolMessageLike(ce)){const Ie=ce.content;let we=String(Ie);if(we.length>100&&(we=`${we.slice(0,97)}...`),we=we.replace(/\n/g," "),y.info(`📄 Tool result: ${we}`),this.useServerManager&&this.serverManager){const ht=this.serverManager.tools,Je=new Set(ht.map(fn=>fn.name)),Lo=new Set(this._tools.map(fn=>fn.name));if(Je.size!==Lo.size||[...Je].some(fn=>!Lo.has(fn))){y.info(`🔄 Tools changed during execution. New tools: ${[...Je].join(", ")}`),this._tools=ht,this._tools.push(...this.additionalTools),await this.createSystemMessageFromTools(this._tools),this._agentExecutor=this.createAgent(),E=!0,M++,y.info(`🔃 Restarting execution with updated tools (restart ${M}/${v})`);break}}}this._isAIMessageLike(ce)&&!this._messageHasToolCalls(ce)&&(C=this._normalizeOutput(this._getMessageContent(ce)),y.info("✅ Agent finished with output"))}if(E)break}if(E)break}if(!E)break;if(M>v){y.warn(`⚠️ Max restarts (${v}) reached. Continuing with current tools.`);break}}if(this.memoryEnabled){const b=w.slice(_.length);for(const E of b)this.addToHistory(E)}if(d&&C)try{y.info("🔧 Attempting structured output...");const b=await this._attemptStructuredOutput(C,this.llm,d);return this.memoryEnabled&&this.addToHistory(new P(`Structured result: ${JSON.stringify(b)}`)),y.info("✅ Structured output successful"),p=!0,b}catch(b){throw y.error(`❌ Structured output failed: ${b}`),new Error(`Failed to generate structured output: ${b instanceof Error?b.message:String(b)}`)}return y.info(`🎉 Agent execution complete in ${((Date.now()-m)/1e3).toFixed(2)} seconds`),p=!0,C||"No output generated"}catch(k){throw y.error(`❌ Error running query: ${k}`),f&&c&&(y.info("🧹 Cleaning up resources after error"),await this.close()),k}finally{const k=Date.now()-m;let _=0;this.client?_=Object.keys(this.client.getAllActiveSessions()).length:this.connectors&&(_=this.connectors.length);const g=this.memoryEnabled?this.conversationHistory.length:0,v=this._tools||[];await this.telemetry.trackAgentExecution({executionMethod:"stream",query:a,success:p,modelProvider:this.modelProvider,modelName:this.modelName,serverCount:_,serverIdentifiers:this.connectors.map(M=>M.publicIdentifier),totalToolsAvailable:v.length,toolsAvailableNames:v.map(M=>M.name),maxStepsConfigured:this.maxSteps,memoryEnabled:this.memoryEnabled,useServerManager:this.useServerManager,maxStepsUsed:l??null,manageConnector:c??!0,externalHistoryUsed:u!==void 0,stepsTaken:T,toolsUsedCount:this.toolsUsedNames.length,toolsUsedNames:this.toolsUsedNames,response:C||"",executionTimeMs:k,errorType:p?null:"execution_error",conversationHistoryLength:g}),c&&!this.client&&f&&(y.info("🧹 Closing agent after stream completion"),await this.close())}}async flush(){this.isRemote&&this.remoteAgent||(y.debug("Flushing observability traces..."),await this.observabilityManager.flush())}async close(){if(this.isRemote&&this.remoteAgent){await this.remoteAgent.close();return}y.info("🔌 Closing MCPAgent resources…"),await this.observabilityManager.shutdown();try{if(this._agentExecutor=null,this._tools=[],this.client)this.clientOwnedByAgent?(y.info("🔄 Closing internally-created client (simplified mode) and cleaning up resources"),await this.client.close(),this.sessions={},this.client=void 0):(y.info("🔄 Closing client and cleaning up resources"),await this.client.close(),this.sessions={});else for(const e of this.connectors)y.info("🔄 Disconnecting connector"),await e.disconnect();this.isSimplifiedMode&&this.llm&&(y.debug("🔄 Clearing LLM reference (simplified mode)"),this.llm=void 0),"connectorToolMap"in this.adapter&&(this.adapter=new xt)}finally{this._initialized=!1,y.info("👋 Agent closed successfully")}}async*prettyStreamEvents(e,n,r=!0,s,o){const{prettyStreamEvents:i}=await nn(async()=>{const{prettyStreamEvents:l}=await import("./display-A5IEINAP-CIPa27wl.js");return{prettyStreamEvents:l}},__vite__mapDeps([3,1,2])),a="";for await(const l of i(this.streamEvents(e,n,r,s,o)))yield;return a}async*streamEvents(e,n,r=!0,s,o,i){const a=gr(e,n,r,s,o,i);let{query:l}=a;const{maxSteps:c,manageConnector:u,externalHistory:d,outputSchema:h,signal:f}=a;let m=!1;const p=Date.now();let C=!1,T=0,k=0,_="";h&&(l=this._enhanceQueryWithSchema(l,h));try{u&&!this._initialized?(await this.initialize(),m=!0):!this._initialized&&this.autoInitialize&&(await this.initialize(),m=!0);const g=this._agentExecutor;if(!g)throw new Error("MCP agent failed to initialize");this.maxSteps=c??this.maxSteps;const v=typeof l=="string"&&l.length>50?`${l.slice(0,50).replace(/\n/g," ")}...`:typeof l=="string"?l.replace(/\n/g," "):String(l);y.info(`💬 Received query for streamEvents: '${v}'`),this.memoryEnabled&&(y.info(`🔄 Adding user message to history: ${v}`),this.addToHistory(new se({content:l})));const M=d??this.conversationHistory,w=[];for(const S of M)this._isHumanMessageLike(S)||this._isAIMessageLike(S)||this._isToolMessageLike(S)?w.push(S):y.info(`⚠️ Skipped message of type: ${S.constructor?.name||typeof S}`);const b=[...w,new se(l)];y.info("callbacks",this.callbacks);const E=g.streamEvents({messages:b},{streamMode:"messages",version:"v2",callbacks:this.callbacks,metadata:this.getMetadata(),tags:this.getTags(),runName:this.metadata.trace_name||"mcp-use-agent",recursionLimit:this.maxSteps*3,...this.metadata.session_id&&{sessionId:this.metadata.session_id},...f&&{signal:f}});for await(const S of E){if(f?.aborted)break;if(T++,!(!S||typeof S!="object")){if(S.event==="on_chat_model_stream"&&S.data?.chunk?.content&&(k+=S.data.chunk.content.length),S.event==="on_chat_model_stream"&&S.data?.chunk){const x=S.data.chunk;if(x.content){_||(_="");const I=this._normalizeOutput(x.content);_+=I,y.debug(`📝 Accumulated response length: ${_.length}`)}}if(yield S,S.event==="on_chain_end"&&S.data?.output&&!_){const x=S.data.output;Array.isArray(x)&&x.length>0&&x[0]?.text?_=x[0].text:typeof x=="string"?_=x:x&&typeof x=="object"&&"output"in x&&(_=x.output)}}}if(h&&_){y.info("🔧 Attempting structured output conversion...");try{let S=!1,x=null,I=null;this._attemptStructuredOutput(_,this.llm,h).then(F=>(S=!0,x=F,F)).catch(F=>{throw S=!0,I=F,F});let O=0;for(;!S;)await new Promise(F=>setTimeout(F,2e3)),S||(O++,yield{event:"on_structured_output_progress",data:{message:`Converting to structured output... (${O*2}s)`,elapsed:O*2}});if(I)throw I;x&&(yield{event:"on_structured_output",data:{output:x}},this.memoryEnabled&&this.addToHistory(new P(`Structured result: ${JSON.stringify(x)}`)),y.info("✅ Structured output successful"))}catch(S){y.warn(`⚠️ Structured output failed: ${S}`),yield{event:"on_structured_output_error",data:{error:S instanceof Error?S.message:String(S)}}}}else this.memoryEnabled&&_&&this.addToHistory(new P(_));console.log(`
|
|
390
|
+
`;function gr(t,e,n,r,s,o){if(typeof t=="object"&&t!==null){const i=t;return{query:i.prompt,maxSteps:i.maxSteps,manageConnector:i.manageConnector,externalHistory:i.externalHistory,outputSchema:i.schema,signal:i.signal}}return{query:t,maxSteps:e,manageConnector:n,externalHistory:r,outputSchema:s,signal:o}}R(gr,"normalizeRunOptions");var Zt,Ty=(Zt=class{static getPackageVersion(){return ji()}llm;client;connectors;maxSteps;autoInitialize;memoryEnabled;disallowedTools;additionalTools;toolsUsedNames=[];exposeResourcesAsTools=!0;exposePromptsAsTools=!0;useServerManager;verbose;observe;systemPrompt;systemPromptTemplateOverride;additionalInstructions;_initialized=!1;conversationHistory=[];_agentExecutor=null;sessions={};systemMessage=null;_tools=[];adapter;serverManager=null;telemetry;modelProvider;modelName;observabilityManager;callbacks=[];metadata={};tags=[];isRemote=!1;remoteAgent=null;isSimplifiedMode=!1;llmString;llmConfig;mcpServersConfig;clientOwnedByAgent=!1;constructor(e){if(e.agentId){this.isRemote=!0,this.remoteAgent=new Mc({agentId:e.agentId,apiKey:e.apiKey,baseUrl:e.baseUrl}),this.maxSteps=e.maxSteps??5,this.memoryEnabled=e.memoryEnabled??!0,this.autoInitialize=e.autoInitialize??!1,this.verbose=e.verbose??!1,this.observe=e.observe??!0,this.connectors=[],this.disallowedTools=[],this.additionalTools=[],this.useServerManager=!1,this.adapter=new xt,this.telemetry=Xn.getInstance(),this.modelProvider="remote",this.modelName="remote-agent",this.observabilityManager=new Qs({customCallbacks:e.callbacks,agentId:e.agentId}),this.callbacks=[];return}if(!e.llm)throw new Error("llm is required for local execution. For remote execution, provide agentId instead.");if(typeof e.llm=="string"){if(this.isSimplifiedMode=!0,this.llmString=e.llm,this.llmConfig=e.llmConfig,this.mcpServersConfig=e.mcpServers,!this.mcpServersConfig||Object.keys(this.mcpServersConfig).length===0)throw new Error("Simplified mode requires 'mcpServers' configuration. Provide an object with server configurations, e.g., { filesystem: { command: 'npx', args: [...] } }");this.llm=void 0,this.client=void 0,this.clientOwnedByAgent=!0,this.connectors=[],y.info(`🎯 Simplified mode enabled: LLM will be created from '${this.llmString}'`)}else if(this.isSimplifiedMode=!1,this.llm=e.llm,this.client=e.client,this.connectors=e.connectors??[],this.clientOwnedByAgent=!1,!this.client&&this.connectors.length===0)throw new Error("Explicit mode requires either 'client' or at least one 'connector'. Alternatively, use simplified mode with 'llm' as a string and 'mcpServers' config.");if(this.maxSteps=e.maxSteps??5,this.autoInitialize=e.autoInitialize??!1,this.memoryEnabled=e.memoryEnabled??!0,this.systemPrompt=e.systemPrompt??null,this.systemPromptTemplateOverride=e.systemPromptTemplate??null,this.additionalInstructions=e.additionalInstructions??null,this.disallowedTools=e.disallowedTools??[],this.additionalTools=e.additionalTools??[],this.toolsUsedNames=e.toolsUsedNames??[],this.exposeResourcesAsTools=e.exposeResourcesAsTools??!0,this.exposePromptsAsTools=e.exposePromptsAsTools??!0,this.useServerManager=e.useServerManager??!1,this.verbose=e.verbose??!1,this.observe=e.observe??!0,this.isSimplifiedMode)this.adapter=e.adapter??new xt(this.disallowedTools),this.telemetry=Xn.getInstance(),this.modelProvider="unknown",this.modelName="unknown";else{if(this.useServerManager){if(!this.client)throw new Error("'client' must be provided when 'useServerManager' is true.");this.adapter=e.adapter??new xt(this.disallowedTools),this.serverManager=e.serverManagerFactory?.(this.client)??new xi(this.client,this.adapter)}else this.adapter=e.adapter??new xt(this.disallowedTools);if(this.telemetry=Xn.getInstance(),this.llm){const[r,s]=Bo(this.llm);this.modelProvider=r,this.modelName=s}else this.modelProvider="unknown",this.modelName="unknown"}this.observabilityManager=new Qs({customCallbacks:e.callbacks,verbose:this.verbose,observe:this.observe,agentId:e.agentId,metadataProvider:R(()=>this.getMetadata(),"metadataProvider"),tagsProvider:R(()=>this.getTags(),"tagsProvider")}),Object.defineProperty(this,"agentExecutor",{get:R(()=>this._agentExecutor,"get"),configurable:!0}),Object.defineProperty(this,"tools",{get:R(()=>this._tools,"get"),configurable:!0}),Object.defineProperty(this,"initialized",{get:R(()=>this._initialized,"get"),configurable:!0})}async initialize(){if(this.isRemote){this._initialized=!0;return}if(y.info("🚀 Initializing MCP agent and connecting to services..."),this.isSimplifiedMode){if(y.info("🎯 Simplified mode: Creating client and LLM from configuration..."),this.mcpServersConfig){y.info(`Creating MCPClient with ${Object.keys(this.mcpServersConfig).length} server(s)...`);const{MCPClient:r}=await nn(async()=>{const{MCPClient:s}=await import("./client-54wbSxe9.js").then(o=>o.c);return{MCPClient:s}},__vite__mapDeps([0,1,2]));this.client=new r({mcpServers:this.mcpServersConfig}),y.info("✅ MCPClient created successfully")}if(this.llmString){y.info(`Creating LLM from string: ${this.llmString}...`);try{this.llm=await $o(this.llmString,this.llmConfig),y.info("✅ LLM created successfully");const[r,s]=Bo(this.llm);this.modelProvider=r,this.modelName=s}catch(r){throw new Error(`Failed to create LLM from string '${this.llmString}': ${r?.message||r}`)}}if(this.useServerManager){if(!this.client)throw new Error("'client' must be available when 'useServerManager' is true.");this.serverManager=new xi(this.client,this.adapter)}}this.callbacks=await this.observabilityManager.getCallbacks();const e=await this.observabilityManager.getHandlerNames();if(e.length>0&&y.info(`📊 Observability enabled with: ${e.join(", ")}`),this.useServerManager&&this.serverManager){await this.serverManager.initialize();const r=this.serverManager.tools;this._tools=r,this._tools.push(...this.additionalTools),y.info(`🔧 Server manager mode active with ${r.length} management tools`),await this.createSystemMessageFromTools(this._tools)}else{if(this.client){if(this.sessions=this.client.getAllActiveSessions(),y.info(`🔌 Found ${Object.keys(this.sessions).length} existing sessions`),Object.keys(this.sessions).filter(s=>s!=="code_mode").length===0&&(y.info("🔄 No active sessions found, creating new ones..."),this.sessions=await this.client.createAllSessions(),y.info(`✅ Created ${Object.keys(this.sessions).length} new sessions`)),this.client.codeMode){const s=this.sessions.code_mode;if(s)this._tools=await this.adapter.createToolsFromConnectors([s.connector]),y.info(`🛠️ Created ${this._tools.length} code mode tools`);else throw new Error("Code mode enabled but code_mode session not found")}else{const s=Object.values(this.sessions).map(l=>l.connector),o=await this.adapter.createToolsFromConnectors(s),i=this.exposeResourcesAsTools?await this.adapter.createResourcesFromConnectors(s):[],a=this.exposePromptsAsTools?await this.adapter.createPromptsFromConnectors(s):[];this._tools=[...o,...i,...a],y.info(`🛠️ Created ${this._tools.length} LangChain items from client: ${o.length} tools, ${i.length} resources, ${a.length} prompts`)}this._tools.push(...this.additionalTools)}else{y.info(`🔗 Connecting to ${this.connectors.length} direct connectors...`);for(const i of this.connectors)i.isClientConnected||await i.connect();const r=await this.adapter.createToolsFromConnectors(this.connectors),s=await this.adapter.createResourcesFromConnectors(this.connectors),o=await this.adapter.createPromptsFromConnectors(this.connectors);this._tools=[...r,...s,...o],this._tools.push(...this.additionalTools),y.info(`🛠️ Created ${this._tools.length} LangChain items from connectors: ${r.length} tools, ${s.length} resources, ${o.length} prompts`)}y.info(`🧰 Found ${this._tools.length} tools across all connectors`),await this.createSystemMessageFromTools(this._tools)}this._agentExecutor=this.createAgent(),this._initialized=!0;const n=this.getMCPServerInfo();Object.keys(n).length>0&&(this.setMetadata(n),y.debug(`MCP server info added to metadata: ${JSON.stringify(n)}`)),y.info("✨ Agent initialization complete")}async createSystemMessageFromTools(e){const n=this.systemPromptTemplateOverride??Sy;this.systemMessage=Rc(e,n,Cy,this.useServerManager,this.disallowedTools,this.systemPrompt??void 0,this.additionalInstructions??void 0),this.memoryEnabled&&(this.conversationHistory=[this.systemMessage,...this.conversationHistory.filter(r=>!(r instanceof oe))])}createAgent(){if(!this.llm)throw new Error("LLM is required to create agent");const e=this.systemMessage?.content??"You are a helpful assistant.",n=this._tools.map(o=>o.name);y.info(`🧠 Agent ready with tools: ${n.join(", ")}`);const r=[Tc({runLimit:this.maxSteps})],s=sc({model:this.llm,tools:this._tools,systemPrompt:e,middleware:r});return y.debug(`Created agent with max_steps=${this.maxSteps} (via ModelCallLimitMiddleware) and ${this.callbacks.length} callbacks`),s}getConversationHistory(){return[...this.conversationHistory]}clearConversationHistory(){this.conversationHistory=this.memoryEnabled&&this.systemMessage?[this.systemMessage]:[]}addToHistory(e){this.memoryEnabled&&this.conversationHistory.push(e)}getSystemMessage(){return this.systemMessage}setSystemMessage(e){this.systemMessage=new oe(e),this.memoryEnabled&&(this.conversationHistory=this.conversationHistory.filter(n=>!(n instanceof oe)),this.conversationHistory.unshift(this.systemMessage)),this._initialized&&this._tools.length&&(this._agentExecutor=this.createAgent(),y.debug("Agent recreated with new system message"))}setDisallowedTools(e){this.disallowedTools=e,this.adapter=new xt(this.disallowedTools),this._initialized&&y.debug("Agent already initialized. Changes will take effect on next initialization.")}getDisallowedTools(){return this.disallowedTools}setMetadata(e){const n=this.sanitizeMetadata(e);this.metadata={...this.metadata,...n},y.debug(`Metadata set: ${JSON.stringify(this.metadata)}`)}getMetadata(){return{...this.metadata}}setTags(e){const n=this.sanitizeTags(e);this.tags=[...new Set([...this.tags,...n])],y.debug(`Tags set: ${JSON.stringify(this.tags)}`)}getTags(){return[...this.tags]}sanitizeMetadata(e){const n={};for(const[r,s]of Object.entries(e)){if(typeof r!="string"||r.length===0){y.warn(`Invalid metadata key: ${r}. Skipping.`);continue}const o=r.replace(/[^\w-]/g,"_");if(s==null)n[o]=s;else if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")n[o]=s;else if(Array.isArray(s)){const i=s.filter(a=>typeof a=="string"||typeof a=="number"||typeof a=="boolean");i.length>0&&(n[o]=i)}else if(typeof s=="object")try{const i=JSON.stringify(s);i.length>1e3?(y.warn(`Metadata value for key '${o}' is too large. Truncating.`),n[o]=`${i.substring(0,1e3)}...`):n[o]=s}catch(i){y.warn(`Failed to serialize metadata value for key '${o}': ${i}. Skipping.`)}else y.warn(`Unsupported metadata value type for key '${o}': ${typeof s}. Skipping.`)}return n}sanitizeTags(e){return e.filter(n=>typeof n=="string"&&n.length>0).map(n=>n.replace(/[^\w:-]/g,"_")).filter(n=>n.length<=50)}getMCPServerInfo(){const e={};try{if(this.client){const n=this.client.getServerNames();e.mcp_servers_count=n.length,e.mcp_server_names=n;const r={};for(const s of n)try{const o=this.client.getServerConfig(s);if(o){let i="unknown";o.command?i="command":o.url?i="http":o.ws_url&&(i="websocket"),r[s]={type:i,has_args:!!o.args,has_env:!!o.env,has_headers:!!o.headers,url:o.url||null,command:o.command||null}}}catch(o){y.warn(`Failed to get config for server '${s}': ${o}`),r[s]={type:"error",error:"config_unavailable"}}e.mcp_server_configs=r}else this.connectors&&this.connectors.length>0&&(e.mcp_servers_count=this.connectors.length,e.mcp_server_names=this.connectors.map(n=>n.publicIdentifier),e.mcp_server_types=this.connectors.map(n=>n.constructor.name))}catch(n){y.warn(`Failed to collect MCP server info: ${n}`),e.error="collection_failed"}return e}_normalizeOutput(e){try{if(typeof e=="string")return e;if(e&&typeof e=="object"&&"content"in e)return this._normalizeOutput(e.content);if(Array.isArray(e)){const n=[];for(const r of e)if(typeof r=="object"&&r!==null)"text"in r&&typeof r.text=="string"?n.push(r.text):"content"in r?n.push(this._normalizeOutput(r.content)):n.push(String(r));else{const s=r&&typeof r=="object"&&"text"in r?r.text:null;if(typeof s=="string")n.push(s);else{const o=r&&typeof r=="object"&&"content"in r?r.content:r;n.push(this._normalizeOutput(o))}}return n.join("")}return String(e)}catch{return String(e)}}_isAIMessageLike(e){if(e instanceof P)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{const r=n.getType();if(r==="ai"||r==="assistant")return!0}catch{}if(typeof n._getType=="function")try{const r=n._getType();if(r==="ai"||r==="assistant")return!0}catch{}return"type"in n?n.type==="ai"||n.type==="assistant":"role"in n?n.role==="ai"||n.role==="assistant":!1}_messageHasToolCalls(e){return typeof e=="object"&&e!==null&&"tool_calls"in e&&Array.isArray(e.tool_calls)?e.tool_calls.length>0:!1}_isHumanMessageLike(e){if(e instanceof se)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{const r=n.getType();if(r==="human"||r==="user")return!0}catch{}return"type"in n&&(n.type==="human"||n.type==="user")||"role"in n&&(n.role==="human"||n.role==="user")}_isToolMessageLike(e){if(e instanceof j)return!0;if(typeof e!="object"||e===null)return!1;const n=e;if(typeof n.getType=="function")try{if(n.getType()==="tool")return!0}catch{}return"type"in n&&n.type==="tool"}_getMessageContent(e){if(e instanceof P||e&&typeof e=="object"&&"content"in e)return e.content}async _consumeAndReturn(e){for(;;){const{done:n,value:r}=await e.next();if(n)return r}}async run(e,n,r,s,o,i){const{query:a,maxSteps:l,manageConnector:c,externalHistory:u,outputSchema:d,signal:h}=gr(e,n,r,s,o,i);if(this.isRemote&&this.remoteAgent)return this.remoteAgent.run(a,l,c,u,d);const f=this.stream(a,l,c,u,d,h);return this._consumeAndReturn(f)}async*stream(e,n,r=!0,s,o,i){const{query:a,maxSteps:l,manageConnector:c,externalHistory:u,outputSchema:d,signal:h}=gr(e,n,r,s,o,i);if(this.isRemote&&this.remoteAgent)return await this.remoteAgent.run(a,l,c,u,d);let f=!1;const m=Date.now();let p=!1,C=null,T=0;try{if(c&&!this._initialized?(await this.initialize(),f=!0):!this._initialized&&this.autoInitialize&&(await this.initialize(),f=!0),!this._agentExecutor)throw new Error("MCP agent failed to initialize");if(this.useServerManager&&this.serverManager){const b=this.serverManager.tools,E=new Set(b.map(x=>x.name)),S=new Set(this._tools.map(x=>x.name));(E.size!==S.size||[...E].some(x=>!S.has(x)))&&(y.info(`🔄 Tools changed before execution, updating agent. New tools: ${[...E].join(", ")}`),this._tools=b,this._tools.push(...this.additionalTools),await this.createSystemMessageFromTools(this._tools),this._agentExecutor=this.createAgent())}const k=u??this.conversationHistory,_=[];for(const b of k)(this._isHumanMessageLike(b)||this._isAIMessageLike(b)||this._isToolMessageLike(b))&&_.push(b);const g=a.length>50?`${a.slice(0,50).replace(/\n/g," ")}...`:a.replace(/\n/g," ");y.info(`💬 Received query: '${g}'`),y.info("🏁 Starting agent execution");const v=3;let M=0;const w=[..._,new se(a)];for(;M<=v;){const b={messages:w};let E=!1;const S=await this._agentExecutor.stream(b,{streamMode:"updates",callbacks:this.callbacks,metadata:this.getMetadata(),tags:this.getTags(),runName:this.metadata.trace_name||"mcp-use-agent",recursionLimit:this.maxSteps*3,...this.metadata.session_id&&{sessionId:this.metadata.session_id},...h&&{signal:h}});for await(const x of S){if(h?.aborted)break;for(const[I,O]of Object.entries(x))if(y.debug(`📦 Node '${I}' output: ${JSON.stringify(O)}`),O&&typeof O=="object"&&"messages"in O){let F=O.messages;Array.isArray(F)||(F=[F]);for(const ce of F)w.includes(ce)||w.push(ce);for(const ce of F){if("tool_calls"in ce&&Array.isArray(ce.tool_calls)&&ce.tool_calls.length>0)for(const Ie of ce.tool_calls){const we=Ie.name||"unknown",ht=Ie.args||{};this.toolsUsedNames.push(we),T++;let Je=JSON.stringify(ht);Je.length>100&&(Je=`${Je.slice(0,97)}...`),y.info(`🔧 Tool call: ${we} with input: ${Je}`),yield{action:{tool:we,toolInput:ht,log:`Calling tool ${we}`},observation:""}}if(this._isToolMessageLike(ce)){const Ie=ce.content;let we=String(Ie);if(we.length>100&&(we=`${we.slice(0,97)}...`),we=we.replace(/\n/g," "),y.info(`📄 Tool result: ${we}`),this.useServerManager&&this.serverManager){const ht=this.serverManager.tools,Je=new Set(ht.map(fn=>fn.name)),Lo=new Set(this._tools.map(fn=>fn.name));if(Je.size!==Lo.size||[...Je].some(fn=>!Lo.has(fn))){y.info(`🔄 Tools changed during execution. New tools: ${[...Je].join(", ")}`),this._tools=ht,this._tools.push(...this.additionalTools),await this.createSystemMessageFromTools(this._tools),this._agentExecutor=this.createAgent(),E=!0,M++,y.info(`🔃 Restarting execution with updated tools (restart ${M}/${v})`);break}}}this._isAIMessageLike(ce)&&!this._messageHasToolCalls(ce)&&(C=this._normalizeOutput(this._getMessageContent(ce)),y.info("✅ Agent finished with output"))}if(E)break}if(E)break}if(!E)break;if(M>v){y.warn(`⚠️ Max restarts (${v}) reached. Continuing with current tools.`);break}}if(this.memoryEnabled){const b=w.slice(_.length);for(const E of b)this.addToHistory(E)}if(d&&C)try{y.info("🔧 Attempting structured output...");const b=await this._attemptStructuredOutput(C,this.llm,d);return this.memoryEnabled&&this.addToHistory(new P(`Structured result: ${JSON.stringify(b)}`)),y.info("✅ Structured output successful"),p=!0,b}catch(b){throw y.error(`❌ Structured output failed: ${b}`),new Error(`Failed to generate structured output: ${b instanceof Error?b.message:String(b)}`)}return y.info(`🎉 Agent execution complete in ${((Date.now()-m)/1e3).toFixed(2)} seconds`),p=!0,C||"No output generated"}catch(k){throw y.error(`❌ Error running query: ${k}`),f&&c&&(y.info("🧹 Cleaning up resources after error"),await this.close()),k}finally{const k=Date.now()-m;let _=0;this.client?_=Object.keys(this.client.getAllActiveSessions()).length:this.connectors&&(_=this.connectors.length);const g=this.memoryEnabled?this.conversationHistory.length:0,v=this._tools||[];await this.telemetry.trackAgentExecution({executionMethod:"stream",query:a,success:p,modelProvider:this.modelProvider,modelName:this.modelName,serverCount:_,serverIdentifiers:this.connectors.map(M=>M.publicIdentifier),totalToolsAvailable:v.length,toolsAvailableNames:v.map(M=>M.name),maxStepsConfigured:this.maxSteps,memoryEnabled:this.memoryEnabled,useServerManager:this.useServerManager,maxStepsUsed:l??null,manageConnector:c??!0,externalHistoryUsed:u!==void 0,stepsTaken:T,toolsUsedCount:this.toolsUsedNames.length,toolsUsedNames:this.toolsUsedNames,response:C||"",executionTimeMs:k,errorType:p?null:"execution_error",conversationHistoryLength:g}),c&&!this.client&&f&&(y.info("🧹 Closing agent after stream completion"),await this.close())}}async flush(){this.isRemote&&this.remoteAgent||(y.debug("Flushing observability traces..."),await this.observabilityManager.flush())}async close(){if(this.isRemote&&this.remoteAgent){await this.remoteAgent.close();return}y.info("🔌 Closing MCPAgent resources…"),await this.observabilityManager.shutdown();try{if(this._agentExecutor=null,this._tools=[],this.client)this.clientOwnedByAgent?(y.info("🔄 Closing internally-created client (simplified mode) and cleaning up resources"),await this.client.close(),this.sessions={},this.client=void 0):(y.info("🔄 Closing client and cleaning up resources"),await this.client.close(),this.sessions={});else for(const e of this.connectors)y.info("🔄 Disconnecting connector"),await e.disconnect();this.isSimplifiedMode&&this.llm&&(y.debug("🔄 Clearing LLM reference (simplified mode)"),this.llm=void 0),"connectorToolMap"in this.adapter&&(this.adapter=new xt)}finally{this._initialized=!1,y.info("👋 Agent closed successfully")}}async*prettyStreamEvents(e,n,r=!0,s,o){const{prettyStreamEvents:i}=await nn(async()=>{const{prettyStreamEvents:l}=await import("./display-A5IEINAP-DNCj3jM3.js");return{prettyStreamEvents:l}},__vite__mapDeps([3,1,2])),a="";for await(const l of i(this.streamEvents(e,n,r,s,o)))yield;return a}async*streamEvents(e,n,r=!0,s,o,i){const a=gr(e,n,r,s,o,i);let{query:l}=a;const{maxSteps:c,manageConnector:u,externalHistory:d,outputSchema:h,signal:f}=a;let m=!1;const p=Date.now();let C=!1,T=0,k=0,_="";h&&(l=this._enhanceQueryWithSchema(l,h));try{u&&!this._initialized?(await this.initialize(),m=!0):!this._initialized&&this.autoInitialize&&(await this.initialize(),m=!0);const g=this._agentExecutor;if(!g)throw new Error("MCP agent failed to initialize");this.maxSteps=c??this.maxSteps;const v=typeof l=="string"&&l.length>50?`${l.slice(0,50).replace(/\n/g," ")}...`:typeof l=="string"?l.replace(/\n/g," "):String(l);y.info(`💬 Received query for streamEvents: '${v}'`),this.memoryEnabled&&(y.info(`🔄 Adding user message to history: ${v}`),this.addToHistory(new se({content:l})));const M=d??this.conversationHistory,w=[];for(const S of M)this._isHumanMessageLike(S)||this._isAIMessageLike(S)||this._isToolMessageLike(S)?w.push(S):y.info(`⚠️ Skipped message of type: ${S.constructor?.name||typeof S}`);const b=[...w,new se(l)];y.info("callbacks",this.callbacks);const E=g.streamEvents({messages:b},{streamMode:"messages",version:"v2",callbacks:this.callbacks,metadata:this.getMetadata(),tags:this.getTags(),runName:this.metadata.trace_name||"mcp-use-agent",recursionLimit:this.maxSteps*3,...this.metadata.session_id&&{sessionId:this.metadata.session_id},...f&&{signal:f}});for await(const S of E){if(f?.aborted)break;if(T++,!(!S||typeof S!="object")){if(S.event==="on_chat_model_stream"&&S.data?.chunk?.content&&(k+=S.data.chunk.content.length),S.event==="on_chat_model_stream"&&S.data?.chunk){const x=S.data.chunk;if(x.content){_||(_="");const I=this._normalizeOutput(x.content);_+=I,y.debug(`📝 Accumulated response length: ${_.length}`)}}if(yield S,S.event==="on_chain_end"&&S.data?.output&&!_){const x=S.data.output;Array.isArray(x)&&x.length>0&&x[0]?.text?_=x[0].text:typeof x=="string"?_=x:x&&typeof x=="object"&&"output"in x&&(_=x.output)}}}if(h&&_){y.info("🔧 Attempting structured output conversion...");try{let S=!1,x=null,I=null;this._attemptStructuredOutput(_,this.llm,h).then(F=>(S=!0,x=F,F)).catch(F=>{throw S=!0,I=F,F});let O=0;for(;!S;)await new Promise(F=>setTimeout(F,2e3)),S||(O++,yield{event:"on_structured_output_progress",data:{message:`Converting to structured output... (${O*2}s)`,elapsed:O*2}});if(I)throw I;x&&(yield{event:"on_structured_output",data:{output:x}},this.memoryEnabled&&this.addToHistory(new P(`Structured result: ${JSON.stringify(x)}`)),y.info("✅ Structured output successful"))}catch(S){y.warn(`⚠️ Structured output failed: ${S}`),yield{event:"on_structured_output_error",data:{error:S instanceof Error?S.message:String(S)}}}}else this.memoryEnabled&&_&&this.addToHistory(new P(_));console.log(`
|
|
391
391
|
|
|
392
392
|
`),y.info(`🎉 StreamEvents complete - ${T} events emitted`),C=!0}catch(g){throw y.error(`❌ Error during streamEvents: ${g}`),m&&u&&(y.info("🧹 Cleaning up resources after initialization error in streamEvents"),await this.close()),g}finally{const g=Date.now()-p;let v=0;this.client?v=Object.keys(this.client.getAllActiveSessions()).length:this.connectors&&(v=this.connectors.length);const M=this.memoryEnabled?this.conversationHistory.length:0;await this.telemetry.trackAgentExecution({executionMethod:"streamEvents",query:l,success:C,modelProvider:this.modelProvider,modelName:this.modelName,serverCount:v,serverIdentifiers:this.connectors.map(w=>w.publicIdentifier),totalToolsAvailable:this._tools.length,toolsAvailableNames:this._tools.map(w=>w.name),maxStepsConfigured:this.maxSteps,memoryEnabled:this.memoryEnabled,useServerManager:this.useServerManager,maxStepsUsed:c??null,manageConnector:u??!0,externalHistoryUsed:d!==void 0,response:`[STREAMED RESPONSE - ${k} chars]`,executionTimeMs:g,errorType:C?null:"streaming_error",conversationHistoryLength:M}),u&&!this.client&&m&&(y.info("🧹 Closing agent after streamEvents completion"),await this.close())}}async _attemptStructuredOutput(e,n,r){y.info(`🔄 Attempting structured output with schema: ${JSON.stringify(r,null,2)}`),y.info(`🔄 Raw result: ${JSON.stringify(e,null,2)}`);let s=null,o="";if(y.debug(`🔄 Structured output requested, schema: ${JSON.stringify(Zn(r),null,2)}`),n&&"withStructuredOutput"in n&&typeof n.withStructuredOutput=="function")s=n.withStructuredOutput(r);else if(n)s=n;else throw new Error("LLM is required for structured output");const i=Zn(r),{$schema:a,additionalProperties:l,...c}=i;o=JSON.stringify(c,null,2),y.info(`🔄 Schema description: ${o}`);let u="";typeof e=="string"?u=e:e&&typeof e=="object"&&(u=JSON.stringify(e)),y.info("rawResult",e),u||(u=JSON.stringify(e));const d=3;let h="";for(let f=1;f<=d;f++){y.info(`🔄 Structured output attempt ${f}/${d}`);let m=`
|
|
393
393
|
Please format the following information according to the EXACT schema specified below.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as l}from"./lasso-BciudTQ1.js";function i(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=l();const c=f(n),g=i({__proto__:null,default:c},[n]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as l}from"./latex-CHdb8PhR.js";function i(r,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const a=Object.getOwnPropertyDescriptor(e,t);a&&Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var f=l();const c=s(f),g=i({__proto__:null,default:c},[f]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-_RJPxEz8.js";import{r as s}from"./ldif-jBEfafs_.js";function l(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const f=Object.getOwnPropertyDescriptor(e,r);f&&Object.defineProperty(t,r,f.get?f:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=s();const c=a(n),d=l({__proto__:null,default:c},[n]);export{d as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as l}from"./leaf-CQphRTnn.js";function i(t,f){for(var o=0;o<f.length;o++){const e=f[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=l();const c=s(n),g=i({__proto__:null,default:c},[n]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as l}from"./less-D0Ccux41.js";function i(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=l();const c=f(a),g=i({__proto__:null,default:c},[a]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./index-
|
|
1
|
+
import{r as p}from"./index-_RJPxEz8.js";import{r as a}from"./lisp-DfrNO5te.js";function f(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=a();const l=p(n),g=f({__proto__:null,default:l},[n]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as a}from"./livecodeserver-WU_wnUq8.js";function f(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=a();const l=n(c),v=f({__proto__:null,default:l},[c]);export{v as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as p}from"./livescript-oQhn4lAX.js";function a(t,s){for(var o=0;o<s.length;o++){const e=s[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(e,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=p();const f=n(c),g=a({__proto__:null,default:f},[c]);export{g as l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{x as O,y as M,z as R,n as b,C as L,G as N,B as x,D as J,R as P}from"./index-
|
|
1
|
+
import{x as O,y as M,z as R,n as b,C as L,G as N,B as x,D as J,R as P}from"./index-_RJPxEz8.js";import{O as k,d as E,e as T}from"./index-iYDybM8x.js";function C(n,e){if(n.function===void 0)return;let t;if(e?.partial)try{t=R(n.function.arguments??"{}")}catch{return}else try{t=JSON.parse(n.function.arguments)}catch(r){throw new k([`Function "${n.function.name}" arguments:`,"",n.function.arguments,"","are not valid JSON.",`Error: ${r.message}`].join(`
|
|
2
2
|
`))}const s={name:n.function.name,args:t,type:"tool_call"};return e?.returnId&&(s.id=n.id),s}function z(n){if(n.id===void 0)throw new Error('All OpenAI tool calls must have an "id" field.');return{id:n.id,type:"function",function:{name:n.name,arguments:JSON.stringify(n.args)}}}function A(n,e){return{name:n.function?.name,args:n.function?.arguments,id:n.id,error:e,type:"invalid_tool_call"}}var S=class extends E{static lc_name(){return"JsonOutputToolsParser"}returnId=!1;lc_namespace=["langchain","output_parsers","openai_tools"];lc_serializable=!0;constructor(n){super(n),this.returnId=n?.returnId??this.returnId}_diff(){throw new Error("Not supported.")}async parse(){throw new Error("Not implemented.")}async parseResult(n){return await this.parsePartialResult(n,!1)}async parsePartialResult(n,e=!0){const t=n[0].message;let s;if(M(t)&&t.tool_calls?.length?s=t.tool_calls.map(a=>{const{id:l,...u}=a;return this.returnId?{id:l,...u}:u}):t.additional_kwargs.tool_calls!==void 0&&(s=JSON.parse(JSON.stringify(t.additional_kwargs.tool_calls)).map(l=>C(l,{returnId:this.returnId,partial:e}))),!s)return[];const r=[];for(const a of s)if(a!==void 0){const l={type:a.name,args:a.args,id:a.id};r.push(l)}return r}},B=class extends S{static lc_name(){return"JsonOutputKeyToolsParser"}lc_namespace=["langchain","output_parsers","openai_tools"];lc_serializable=!0;returnId=!1;keyName;returnSingle=!1;zodSchema;constructor(n){super(n),this.keyName=n.keyName,this.returnSingle=n.returnSingle??this.returnSingle,this.zodSchema=n.zodSchema}async _validateResult(n){if(this.zodSchema===void 0)return n;const e=await O(this.zodSchema,n);if(e.success)return e.data;throw new k(`Failed to parse. Text: "${JSON.stringify(n,null,2)}". Error: ${JSON.stringify(e.error?.issues)}`,JSON.stringify(n,null,2))}async parsePartialResult(n){const t=(await super.parsePartialResult(n)).filter(r=>r.type===this.keyName);let s=t;if(t.length)return this.returnId||(s=t.map(r=>r.args)),this.returnSingle?s[0]:s}async parseResult(n){const t=(await super.parsePartialResult(n,!1)).filter(a=>a.type===this.keyName);let s=t;return t.length?(this.returnId||(s=t.map(a=>a.args)),this.returnSingle?this._validateResult(s[0]):await Promise.all(s.map(a=>this._validateResult(a)))):void 0}},F={};b(F,{JsonOutputKeyToolsParser:()=>B,JsonOutputToolsParser:()=>S,convertLangChainToolCallToOpenAI:()=>z,makeInvalidToolCall:()=>A,parseToolCall:()=>C});var K={};b(K,{BaseLLM:()=>I,LLM:()=>U});var I=class f extends T{lc_namespace=["langchain","llms",this._llmType()];async invoke(e,t){const s=f._convertInputToPromptValue(e);return(await this.generatePrompt([s],t,t?.callbacks)).generations[0][0].text}async*_streamResponseChunks(e,t,s){throw new Error("Not implemented.")}_separateRunnableConfigFromCallOptionsCompat(e){const[t,s]=super._separateRunnableConfigFromCallOptions(e);return s.signal=t.signal,[t,s]}async*_streamIterator(e,t){if(this._streamResponseChunks===f.prototype._streamResponseChunks)yield this.invoke(e,t);else{const s=f._convertInputToPromptValue(e),[r,a]=this._separateRunnableConfigFromCallOptionsCompat(t),l=await L.configure(r.callbacks,this.callbacks,r.tags,this.tags,r.metadata,this.metadata,{verbose:this.verbose}),u={options:a,invocation_params:this?.invocationParams(a),batch_size:1},h=await l?.handleLLMStart(this.toJSON(),[s.toString()],r.runId,void 0,u,void 0,void 0,r.runName);let o=new N({text:""});try{for await(const i of this._streamResponseChunks(s.toString(),a,h?.[0]))o?o=o.concat(i):o=i,typeof i.text=="string"&&(yield i.text)}catch(i){throw await Promise.all((h??[]).map(d=>d?.handleLLMError(i))),i}await Promise.all((h??[]).map(i=>i?.handleLLMEnd({generations:[[o]]})))}}async generatePrompt(e,t,s){const r=e.map(a=>a.toString());return this.generate(r,t,s)}invocationParams(e){return{}}_flattenLLMResult(e){const t=[];for(let s=0;s<e.generations.length;s+=1){const r=e.generations[s];if(s===0)t.push({generations:[r],llmOutput:e.llmOutput});else{const a=e.llmOutput?{...e.llmOutput,tokenUsage:{}}:void 0;t.push({generations:[r],llmOutput:a})}}return t}async _generateUncached(e,t,s,r){let a;if(r!==void 0&&r.length===e.length)a=r;else{const o=await L.configure(s.callbacks,this.callbacks,s.tags,this.tags,s.metadata,this.metadata,{verbose:this.verbose}),i={options:t,invocation_params:this?.invocationParams(t),batch_size:e.length};a=await o?.handleLLMStart(this.toJSON(),e,s.runId,void 0,i,void 0,void 0,s?.runName)}const l=!!a?.[0].handlers.find(x);let u;if(l&&e.length===1&&this._streamResponseChunks!==f.prototype._streamResponseChunks)try{const o=await this._streamResponseChunks(e[0],t,a?.[0]);let i;for await(const d of o)i===void 0?i=d:i=J(i,d);if(i===void 0)throw new Error("Received empty response from chat model call.");u={generations:[[i]],llmOutput:{}},await a?.[0].handleLLMEnd(u)}catch(o){throw await a?.[0].handleLLMError(o),o}else{try{u=await this._generate(e,t,a?.[0])}catch(i){throw await Promise.all((a??[]).map(d=>d?.handleLLMError(i))),i}const o=this._flattenLLMResult(u);await Promise.all((a??[]).map((i,d)=>i?.handleLLMEnd(o[d])))}const h=a?.map(o=>o.runId)||void 0;return Object.defineProperty(u,P,{value:h?{runIds:h}:void 0,configurable:!0}),u}async _generateCached({prompts:e,cache:t,llmStringKey:s,parsedOptions:r,handledOptions:a,runId:l}){const u=await L.configure(a.callbacks,this.callbacks,a.tags,this.tags,a.metadata,this.metadata,{verbose:this.verbose}),h={options:r,invocation_params:this?.invocationParams(r),batch_size:e.length},o=await u?.handleLLMStart(this.toJSON(),e,l,void 0,h,void 0,void 0,a?.runName),i=[],v=(await Promise.allSettled(e.map(async(c,m)=>{const _=await t.lookup(c,s);return _==null&&i.push(m),_}))).map((c,m)=>({result:c,runManager:o?.[m]})).filter(({result:c})=>c.status==="fulfilled"&&c.value!=null||c.status==="rejected"),p=[];await Promise.all(v.map(async({result:c,runManager:m},_)=>{if(c.status==="fulfilled"){const y=c.value;return p[_]=y.map(w=>(w.generationInfo={...w.generationInfo,tokenUsage:{}},w)),y.length&&await m?.handleLLMNewToken(y[0].text),m?.handleLLMEnd({generations:[y]},void 0,void 0,void 0,{cached:!0})}else return await m?.handleLLMError(c.reason,void 0,void 0,void 0,{cached:!0}),Promise.reject(c.reason)}));const g={generations:p,missingPromptIndices:i,startedRunManagers:o};return Object.defineProperty(g,P,{value:o?{runIds:o?.map(c=>c.runId)}:void 0,configurable:!0}),g}async generate(e,t,s){if(!Array.isArray(e))throw new Error("Argument 'prompts' is expected to be a string[]");let r;Array.isArray(t)?r={stop:t}:r=t;const[a,l]=this._separateRunnableConfigFromCallOptionsCompat(r);if(a.callbacks=a.callbacks??s,!this.cache)return this._generateUncached(e,l,a);const{cache:u}=this,h=this._getSerializedCacheKeyParametersForCall(l),{generations:o,missingPromptIndices:i,startedRunManagers:d}=await this._generateCached({prompts:e,cache:u,llmStringKey:h,parsedOptions:l,handledOptions:a,runId:a.runId});let v={};if(i.length>0){const p=await this._generateUncached(i.map(g=>e[g]),l,a,d!==void 0?i.map(g=>d?.[g]):void 0);await Promise.all(p.generations.map(async(g,c)=>{const m=i[c];return o[m]=g,u.update(e[m],h,g)})),v=p.llmOutput??{}}return{generations:o,llmOutput:v}}_identifyingParams(){return{}}_modelType(){return"base_llm"}},U=class extends I{async _generate(n,e,t){return{generations:await Promise.all(n.map((r,a)=>this._call(r,{...e,promptIndex:a},t).then(l=>[{text:l}])))}}};export{I as B,B as J,U as L,z as c,K as l,A as m,F as o,C as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./llvm-Ctq8Ea1M.js";function i(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const l=Object.getOwnPropertyDescriptor(e,r);l&&Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=s();const c=f(a),u=i({__proto__:null,default:c},[a]);export{u as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-_RJPxEz8.js";import{r as f}from"./lsl-CZ-92Osz.js";function i(t,l){for(var o=0;o<l.length;o++){const e=l[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=f();const c=a(n),g=i({__proto__:null,default:c},[n]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as u}from"./lua-CtuzIFQ2.js";function l(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=u();const i=s(f),g=l({__proto__:null,default:i},[f]);export{g as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as s}from"./makefile-CUBjRDBz.js";function l(t,f){for(var o=0;o<f.length;o++){const e=f[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=s();const c=n(i),u=l({__proto__:null,default:c},[i]);export{u as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as i}from"./markdown-Bnpjmjdr.js";function c(t,a){for(var o=0;o<a.length;o++){const r=a[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const n=Object.getOwnPropertyDescriptor(r,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=i();const m=s(f),d=c({__proto__:null,default:m},[f]);export{d as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m}from"./index-
|
|
1
|
+
import{r as m}from"./index-_RJPxEz8.js";import{r as n}from"./mathematica-DMjmGOFL.js";function f(r,i){for(var a=0;a<i.length;a++){const e=i[a];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const o=Object.getOwnPropertyDescriptor(e,t);o&&Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var c=n();const s=m(c),l=f({__proto__:null,default:s},[c]);export{l as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as l}from"./matlab-bMP2hmJA.js";function i(r,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const a=Object.getOwnPropertyDescriptor(e,t);a&&Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var f=l();const c=s(f),u=i({__proto__:null,default:c},[f]);export{u as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as f}from"./maxima-CiGgQtRy.js";function s(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var m=f();const c=n(m),l=s({__proto__:null,default:c},[m]);export{l as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as l}from"./mel-BKEdQ-Ac.js";function i(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=l();const c=s(f),u=i({__proto__:null,default:c},[f]);export{u as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./mercury-Cg7tRNfI.js";function u(t,n){for(var o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const c=Object.getOwnPropertyDescriptor(r,e);c&&Object.defineProperty(t,e,c.get?c:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=s();const i=f(a),y=u({__proto__:null,default:i},[a]);export{y as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m}from"./index-
|
|
1
|
+
import{r as m}from"./index-_RJPxEz8.js";import{r as n}from"./mipsasm-CNyeTk3S.js";function p(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=n();const f=m(i),l=p({__proto__:null,default:f},[i]);export{l as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./index-
|
|
1
|
+
import{r as f}from"./index-_RJPxEz8.js";import{r as s}from"./mizar-BICf15Zj.js";function c(t,i){for(var o=0;o<i.length;o++){const r=i[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const a=Object.getOwnPropertyDescriptor(r,e);a&&Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n=s();const m=f(n),l=c({__proto__:null,default:m},[n]);export{l as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./index-
|
|
1
|
+
import{r as n}from"./index-_RJPxEz8.js";import{r as a}from"./mojolicious-DiD_1YV0.js";function f(r,s){for(var t=0;t<s.length;t++){const e=s[t];if(typeof e!="string"&&!Array.isArray(e)){for(const o in e)if(o!=="default"&&!(o in r)){const i=Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var c=a();const u=n(c),p=f({__proto__:null,default:u},[c]);export{p as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as i}from"./monkey-D6kono4g.js";function c(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=i();const m=s(f),y=c({__proto__:null,default:m},[f]);export{y as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./index-
|
|
1
|
+
import{r as c}from"./index-_RJPxEz8.js";import{r as p}from"./moonscript-Ba-Tqbk8.js";function a(t,s){for(var o=0;o<s.length;o++){const r=s[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const n=Object.getOwnPropertyDescriptor(r,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=p();const f=c(i),l=a({__proto__:null,default:f},[i]);export{l as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-_RJPxEz8.js";import{r as l}from"./n1ql-AxtiJSd2.js";function i(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=l();const c=s(f),g=i({__proto__:null,default:c},[f]);export{g as n};
|