From a114e42887229fecccd404ae1766fc7cd54f7c2b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 02:11:03 +0000 Subject: [PATCH 1/3] chore(deps): update dependency @rsbuild/core to v2.3.4 --- mockups/ui-concept-v2/app/package-lock.json | 134 ++++++++-------- pnpm-lock.yaml | 162 ++++++++++---------- 2 files changed, 148 insertions(+), 148 deletions(-) diff --git a/mockups/ui-concept-v2/app/package-lock.json b/mockups/ui-concept-v2/app/package-lock.json index 98baf98767..390770e9d8 100644 --- a/mockups/ui-concept-v2/app/package-lock.json +++ b/mockups/ui-concept-v2/app/package-lock.json @@ -94,13 +94,13 @@ } }, "node_modules/@rsbuild/core": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.3.tgz", - "integrity": "sha512-IdbBXZrIY16RxnQduXRrsRBQtJ/X7JkYESrk6D46WA918wrckYTBxE09vHvDxR+3JoCLE02vOm2NPBNxqaUw5A==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.3.4.tgz", + "integrity": "sha512-1P3nLh/uXOcNTJZxvymRzAmuz8SBiCqY2InliNxQTlS0mWtoXbrRBC/W7zfv3MATk/vPmzODAYoZ5oIULk3Ilg==", "dev": true, "license": "MIT", "dependencies": { - "@rspack/core": "~2.3.3", + "@rspack/core": "~2.3.4", "@swc/helpers": "^0.5.24" }, "bin": { @@ -138,32 +138,32 @@ } }, "node_modules/@rspack/binding": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.3.tgz", - "integrity": "sha512-wwF++36a3rqYi0G9zj+rUavn/GIMzbzXehelGS1jkYeKPHyPXrVYwRHqwEKNKMD9z+FdW4YJKQcfFkPlHEiwUg==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.3.4.tgz", + "integrity": "sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==", "dev": true, "license": "MIT", "optionalDependencies": { - "@rspack/binding-darwin-arm64": "2.3.3", - "@rspack/binding-darwin-x64": "2.3.3", - "@rspack/binding-linux-arm64-gnu": "2.3.3", - "@rspack/binding-linux-arm64-musl": "2.3.3", - "@rspack/binding-linux-ppc64-gnu": "2.3.3", - "@rspack/binding-linux-riscv64-gnu": "2.3.3", - "@rspack/binding-linux-riscv64-musl": "2.3.3", - "@rspack/binding-linux-s390x-gnu": "2.3.3", - "@rspack/binding-linux-x64-gnu": "2.3.3", - "@rspack/binding-linux-x64-musl": "2.3.3", - "@rspack/binding-wasm32-wasi": "2.3.3", - "@rspack/binding-win32-arm64-msvc": "2.3.3", - "@rspack/binding-win32-ia32-msvc": "2.3.3", - "@rspack/binding-win32-x64-msvc": "2.3.3" + "@rspack/binding-darwin-arm64": "2.3.4", + "@rspack/binding-darwin-x64": "2.3.4", + "@rspack/binding-linux-arm64-gnu": "2.3.4", + "@rspack/binding-linux-arm64-musl": "2.3.4", + "@rspack/binding-linux-ppc64-gnu": "2.3.4", + "@rspack/binding-linux-riscv64-gnu": "2.3.4", + "@rspack/binding-linux-riscv64-musl": "2.3.4", + "@rspack/binding-linux-s390x-gnu": "2.3.4", + "@rspack/binding-linux-x64-gnu": "2.3.4", + "@rspack/binding-linux-x64-musl": "2.3.4", + "@rspack/binding-wasm32-wasi": "2.3.4", + "@rspack/binding-win32-arm64-msvc": "2.3.4", + "@rspack/binding-win32-ia32-msvc": "2.3.4", + "@rspack/binding-win32-x64-msvc": "2.3.4" } }, "node_modules/@rspack/binding-darwin-arm64": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.3.tgz", - "integrity": "sha512-G9WcBOP/6ZWeqTM/G0/rkJRY4DWmYQvk2untzcpj92uO12tqjZ9BSMgtBFvwElwagfQBkX8PPutkAZgtnlAoWA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.3.4.tgz", + "integrity": "sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==", "cpu": [ "arm64" ], @@ -175,9 +175,9 @@ ] }, "node_modules/@rspack/binding-darwin-x64": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.3.tgz", - "integrity": "sha512-6agI5XDoihay+84vzZgIwwpQQ3xBWbe2HTWBRc0n42LzynIj9h7Qv8CJzf1gSDV1Ts0jzDgAJCYUFJ6Ya5F6MA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.3.4.tgz", + "integrity": "sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==", "cpu": [ "x64" ], @@ -189,9 +189,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.3.tgz", - "integrity": "sha512-VdjK1mDq+GBexd041lmWBFmAvcWIZy7kepTJbJgxLeHYYOnI3KmBG15kemhlK0pBySa+bePX7p2w8uYtl1HsCA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.3.4.tgz", + "integrity": "sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==", "cpu": [ "arm64" ], @@ -206,9 +206,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-musl": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.3.tgz", - "integrity": "sha512-xF4Wy4XwGjC3m13tFm1q9p9Qpm31qrk6f5zEMPZC31UVabb+2jrgTI1pfZ8IRuo9x/Qw9s+Zq3hyDbtJvvD8Pg==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.3.4.tgz", + "integrity": "sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==", "cpu": [ "arm64" ], @@ -223,9 +223,9 @@ ] }, "node_modules/@rspack/binding-linux-ppc64-gnu": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.3.tgz", - "integrity": "sha512-jVmn+LpF44D4FdZyT91rlT/tPMdHIfPfQTgVzwPB5nDICp4b57SFjVBApuAPIxnLT1pKLkv/LIcdvGSdAeX12w==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.3.4.tgz", + "integrity": "sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==", "cpu": [ "ppc64" ], @@ -240,9 +240,9 @@ ] }, "node_modules/@rspack/binding-linux-riscv64-gnu": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.3.tgz", - "integrity": "sha512-JcQJm8M634jkbG6zJ3TfziKYsCINEAh3FwKuxLljvBgGDEupBxPuB0n2bXBIUeI8P9C33B45IYX6BwWYXll/zw==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.3.4.tgz", + "integrity": "sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==", "cpu": [ "riscv64" ], @@ -257,9 +257,9 @@ ] }, "node_modules/@rspack/binding-linux-riscv64-musl": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.3.tgz", - "integrity": "sha512-YMIOS7rFvCDnpeyxoVEVbM7U/TwcC2VDtN3Oiq9BenRsNTEvk0imINhuVRFanh15+wkiQHk9h0b+pzcggYLAsA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.3.4.tgz", + "integrity": "sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==", "cpu": [ "riscv64" ], @@ -274,9 +274,9 @@ ] }, "node_modules/@rspack/binding-linux-s390x-gnu": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.3.tgz", - "integrity": "sha512-tHGtIG6GGHsk2KvSleQp/BrVqiGdjDsLJuMKR7hE7W1uJW6WDJ+a+Z23Rk5kHXh5BjeFLjXxcufGuokvmLmTag==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.3.4.tgz", + "integrity": "sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==", "cpu": [ "s390x" ], @@ -291,9 +291,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-gnu": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.3.tgz", - "integrity": "sha512-spe8SjywfO+dD7Sk+vIpPaOXf56wstrgeuztfJdiI9zTeQmf/lhdaNUUSUAXlGIaLjrN/PhV8i5kbQ7VaAkenw==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.3.4.tgz", + "integrity": "sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==", "cpu": [ "x64" ], @@ -308,9 +308,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-musl": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.3.tgz", - "integrity": "sha512-4E4OJodrmsS52zkSAWShG/F07etr0OG4oSrIN+/2BBgc0qR2wwu2T+rAs308IL3lbywlS+J+cynrRcsSFMD+Kg==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.3.4.tgz", + "integrity": "sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==", "cpu": [ "x64" ], @@ -325,9 +325,9 @@ ] }, "node_modules/@rspack/binding-wasm32-wasi": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.3.tgz", - "integrity": "sha512-AhlsPjW31TGP8N+J7OmbCPaamARUl+OQNiT3xo0PL5Dz5oMm+bEfYLostpehKyy8MNDrmJcY97M9pDb5MDMA0w==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.3.4.tgz", + "integrity": "sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==", "cpu": [ "wasm32" ], @@ -341,9 +341,9 @@ } }, "node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.3.tgz", - "integrity": "sha512-Zqbj7GBPtkJ8GlUKAjFgvmOxKkQwjfS3XfjwGBcmoIAUb4IxUsmMqvi+gfKrvI45SjYVFZaJnTpOJw6GL79K+Q==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.3.4.tgz", + "integrity": "sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==", "cpu": [ "arm64" ], @@ -355,9 +355,9 @@ ] }, "node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.3.tgz", - "integrity": "sha512-sJJmbrdzH6kI48mCsUu5a2+BzEktLmHrHUmWGkAPAi0zhi4anA7sOdS1+uERbkkd/XAzs0bdn3JXyT2djY+3IA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.3.4.tgz", + "integrity": "sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==", "cpu": [ "ia32" ], @@ -369,9 +369,9 @@ ] }, "node_modules/@rspack/binding-win32-x64-msvc": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.3.tgz", - "integrity": "sha512-1r3wxV1pBNykqpbEbZWqcrZd13PKLq0e7Ku6qv8IGKKeftuf3RUxTkeM5AzppGMGEIA9sw8mRdN7NvEXxqLLxw==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.3.4.tgz", + "integrity": "sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==", "cpu": [ "x64" ], @@ -383,13 +383,13 @@ ] }, "node_modules/@rspack/core": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.3.tgz", - "integrity": "sha512-stAYr0SXf+ZFXFsWTv+Ljxoj/nQs2p7gX9V1kBwlO2IXlRAAhabLONYibT3ZeEGybx3kowrs7uJkcOQsuHgghw==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.3.4.tgz", + "integrity": "sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==", "dev": true, "license": "MIT", "dependencies": { - "@rspack/binding": "2.3.3" + "@rspack/binding": "2.3.4" }, "engines": { "node": "^20.19.0 || >=22.12.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f6fd3398b..8c9da791a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -248,10 +248,10 @@ importers: version: 1.65.1 '@rsbuild/core': specifier: ^2.2.13 - version: 2.3.3 + version: 2.3.4 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.1.1(@rsbuild/core@2.3.3)(@rspack/core@2.3.3(@swc/helpers@0.5.24)) + version: 2.1.1(@rsbuild/core@2.3.4)(@rspack/core@2.3.4(@swc/helpers@0.5.24)) '@tailwindcss/postcss': specifier: ^4.0.0 version: 4.3.5 @@ -327,7 +327,7 @@ importers: version: 1.65.1 '@rsbuild/core': specifier: ^2.2.13 - version: 2.3.3 + version: 2.3.4 '@rslib/core': specifier: ^1.0.0 version: 1.0.7(typescript@7.0.2) @@ -1149,8 +1149,8 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@rsbuild/core@2.3.3': - resolution: {integrity: sha512-IdbBXZrIY16RxnQduXRrsRBQtJ/X7JkYESrk6D46WA918wrckYTBxE09vHvDxR+3JoCLE02vOm2NPBNxqaUw5A==} + '@rsbuild/core@2.3.4': + resolution: {integrity: sha512-1P3nLh/uXOcNTJZxvymRzAmuz8SBiCqY2InliNxQTlS0mWtoXbrRBC/W7zfv3MATk/vPmzODAYoZ5oIULk3Ilg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -1180,88 +1180,88 @@ packages: typescript: optional: true - '@rspack/binding-darwin-arm64@2.3.3': - resolution: {integrity: sha512-G9WcBOP/6ZWeqTM/G0/rkJRY4DWmYQvk2untzcpj92uO12tqjZ9BSMgtBFvwElwagfQBkX8PPutkAZgtnlAoWA==} + '@rspack/binding-darwin-arm64@2.3.4': + resolution: {integrity: sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@2.3.3': - resolution: {integrity: sha512-6agI5XDoihay+84vzZgIwwpQQ3xBWbe2HTWBRc0n42LzynIj9h7Qv8CJzf1gSDV1Ts0jzDgAJCYUFJ6Ya5F6MA==} + '@rspack/binding-darwin-x64@2.3.4': + resolution: {integrity: sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@2.3.3': - resolution: {integrity: sha512-VdjK1mDq+GBexd041lmWBFmAvcWIZy7kepTJbJgxLeHYYOnI3KmBG15kemhlK0pBySa+bePX7p2w8uYtl1HsCA==} + '@rspack/binding-linux-arm64-gnu@2.3.4': + resolution: {integrity: sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==} cpu: [arm64] os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-musl@2.3.3': - resolution: {integrity: sha512-xF4Wy4XwGjC3m13tFm1q9p9Qpm31qrk6f5zEMPZC31UVabb+2jrgTI1pfZ8IRuo9x/Qw9s+Zq3hyDbtJvvD8Pg==} + '@rspack/binding-linux-arm64-musl@2.3.4': + resolution: {integrity: sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==} cpu: [arm64] os: [linux] libc: [musl] - '@rspack/binding-linux-ppc64-gnu@2.3.3': - resolution: {integrity: sha512-jVmn+LpF44D4FdZyT91rlT/tPMdHIfPfQTgVzwPB5nDICp4b57SFjVBApuAPIxnLT1pKLkv/LIcdvGSdAeX12w==} + '@rspack/binding-linux-ppc64-gnu@2.3.4': + resolution: {integrity: sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rspack/binding-linux-riscv64-gnu@2.3.3': - resolution: {integrity: sha512-JcQJm8M634jkbG6zJ3TfziKYsCINEAh3FwKuxLljvBgGDEupBxPuB0n2bXBIUeI8P9C33B45IYX6BwWYXll/zw==} + '@rspack/binding-linux-riscv64-gnu@2.3.4': + resolution: {integrity: sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rspack/binding-linux-riscv64-musl@2.3.3': - resolution: {integrity: sha512-YMIOS7rFvCDnpeyxoVEVbM7U/TwcC2VDtN3Oiq9BenRsNTEvk0imINhuVRFanh15+wkiQHk9h0b+pzcggYLAsA==} + '@rspack/binding-linux-riscv64-musl@2.3.4': + resolution: {integrity: sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==} cpu: [riscv64] os: [linux] libc: [musl] - '@rspack/binding-linux-s390x-gnu@2.3.3': - resolution: {integrity: sha512-tHGtIG6GGHsk2KvSleQp/BrVqiGdjDsLJuMKR7hE7W1uJW6WDJ+a+Z23Rk5kHXh5BjeFLjXxcufGuokvmLmTag==} + '@rspack/binding-linux-s390x-gnu@2.3.4': + resolution: {integrity: sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==} cpu: [s390x] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-gnu@2.3.3': - resolution: {integrity: sha512-spe8SjywfO+dD7Sk+vIpPaOXf56wstrgeuztfJdiI9zTeQmf/lhdaNUUSUAXlGIaLjrN/PhV8i5kbQ7VaAkenw==} + '@rspack/binding-linux-x64-gnu@2.3.4': + resolution: {integrity: sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==} cpu: [x64] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-musl@2.3.3': - resolution: {integrity: sha512-4E4OJodrmsS52zkSAWShG/F07etr0OG4oSrIN+/2BBgc0qR2wwu2T+rAs308IL3lbywlS+J+cynrRcsSFMD+Kg==} + '@rspack/binding-linux-x64-musl@2.3.4': + resolution: {integrity: sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==} cpu: [x64] os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@2.3.3': - resolution: {integrity: sha512-AhlsPjW31TGP8N+J7OmbCPaamARUl+OQNiT3xo0PL5Dz5oMm+bEfYLostpehKyy8MNDrmJcY97M9pDb5MDMA0w==} + '@rspack/binding-wasm32-wasi@2.3.4': + resolution: {integrity: sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@2.3.3': - resolution: {integrity: sha512-Zqbj7GBPtkJ8GlUKAjFgvmOxKkQwjfS3XfjwGBcmoIAUb4IxUsmMqvi+gfKrvI45SjYVFZaJnTpOJw6GL79K+Q==} + '@rspack/binding-win32-arm64-msvc@2.3.4': + resolution: {integrity: sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@2.3.3': - resolution: {integrity: sha512-sJJmbrdzH6kI48mCsUu5a2+BzEktLmHrHUmWGkAPAi0zhi4anA7sOdS1+uERbkkd/XAzs0bdn3JXyT2djY+3IA==} + '@rspack/binding-win32-ia32-msvc@2.3.4': + resolution: {integrity: sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@2.3.3': - resolution: {integrity: sha512-1r3wxV1pBNykqpbEbZWqcrZd13PKLq0e7Ku6qv8IGKKeftuf3RUxTkeM5AzppGMGEIA9sw8mRdN7NvEXxqLLxw==} + '@rspack/binding-win32-x64-msvc@2.3.4': + resolution: {integrity: sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==} cpu: [x64] os: [win32] - '@rspack/binding@2.3.3': - resolution: {integrity: sha512-wwF++36a3rqYi0G9zj+rUavn/GIMzbzXehelGS1jkYeKPHyPXrVYwRHqwEKNKMD9z+FdW4YJKQcfFkPlHEiwUg==} + '@rspack/binding@2.3.4': + resolution: {integrity: sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==} - '@rspack/core@2.3.3': - resolution: {integrity: sha512-stAYr0SXf+ZFXFsWTv+Ljxoj/nQs2p7gX9V1kBwlO2IXlRAAhabLONYibT3ZeEGybx3kowrs7uJkcOQsuHgghw==} + '@rspack/core@2.3.4': + resolution: {integrity: sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -3442,106 +3442,106 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@rsbuild/core@2.3.3': + '@rsbuild/core@2.3.4': dependencies: - '@rspack/core': 2.3.3(@swc/helpers@0.5.24) + '@rspack/core': 2.3.4(@swc/helpers@0.5.24) '@swc/helpers': 0.5.24 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/plugin-react@2.1.1(@rsbuild/core@2.3.3)(@rspack/core@2.3.3(@swc/helpers@0.5.24))': + '@rsbuild/plugin-react@2.1.1(@rsbuild/core@2.3.4)(@rspack/core@2.3.4(@swc/helpers@0.5.24))': dependencies: - '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.3.3(@swc/helpers@0.5.24))(react-refresh@0.19.0) + '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.3.4(@swc/helpers@0.5.24))(react-refresh@0.19.0) react-refresh: 0.19.0 optionalDependencies: - '@rsbuild/core': 2.3.3 + '@rsbuild/core': 2.3.4 transitivePeerDependencies: - '@rspack/core' '@rslib/core@1.0.7(typescript@7.0.2)': dependencies: - '@rsbuild/core': 2.3.3 - rsbuild-plugin-dts: 1.0.7(@rsbuild/core@2.3.3)(typescript@7.0.2) + '@rsbuild/core': 2.3.4 + rsbuild-plugin-dts: 1.0.7(@rsbuild/core@2.3.4)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 transitivePeerDependencies: - '@module-federation/runtime-tools' - core-js - '@rspack/binding-darwin-arm64@2.3.3': + '@rspack/binding-darwin-arm64@2.3.4': optional: true - '@rspack/binding-darwin-x64@2.3.3': + '@rspack/binding-darwin-x64@2.3.4': optional: true - '@rspack/binding-linux-arm64-gnu@2.3.3': + '@rspack/binding-linux-arm64-gnu@2.3.4': optional: true - '@rspack/binding-linux-arm64-musl@2.3.3': + '@rspack/binding-linux-arm64-musl@2.3.4': optional: true - '@rspack/binding-linux-ppc64-gnu@2.3.3': + '@rspack/binding-linux-ppc64-gnu@2.3.4': optional: true - '@rspack/binding-linux-riscv64-gnu@2.3.3': + '@rspack/binding-linux-riscv64-gnu@2.3.4': optional: true - '@rspack/binding-linux-riscv64-musl@2.3.3': + '@rspack/binding-linux-riscv64-musl@2.3.4': optional: true - '@rspack/binding-linux-s390x-gnu@2.3.3': + '@rspack/binding-linux-s390x-gnu@2.3.4': optional: true - '@rspack/binding-linux-x64-gnu@2.3.3': + '@rspack/binding-linux-x64-gnu@2.3.4': optional: true - '@rspack/binding-linux-x64-musl@2.3.3': + '@rspack/binding-linux-x64-musl@2.3.4': optional: true - '@rspack/binding-wasm32-wasi@2.3.3': + '@rspack/binding-wasm32-wasi@2.3.4': dependencies: '@emnapi/core': 2.0.0-beta.3 '@emnapi/runtime': 2.0.0-beta.3 '@napi-rs/wasm-runtime': 1.2.7(@emnapi/core@2.0.0-beta.3)(@emnapi/runtime@2.0.0-beta.3) optional: true - '@rspack/binding-win32-arm64-msvc@2.3.3': + '@rspack/binding-win32-arm64-msvc@2.3.4': optional: true - '@rspack/binding-win32-ia32-msvc@2.3.3': + '@rspack/binding-win32-ia32-msvc@2.3.4': optional: true - '@rspack/binding-win32-x64-msvc@2.3.3': + '@rspack/binding-win32-x64-msvc@2.3.4': optional: true - '@rspack/binding@2.3.3': + '@rspack/binding@2.3.4': optionalDependencies: - '@rspack/binding-darwin-arm64': 2.3.3 - '@rspack/binding-darwin-x64': 2.3.3 - '@rspack/binding-linux-arm64-gnu': 2.3.3 - '@rspack/binding-linux-arm64-musl': 2.3.3 - '@rspack/binding-linux-ppc64-gnu': 2.3.3 - '@rspack/binding-linux-riscv64-gnu': 2.3.3 - '@rspack/binding-linux-riscv64-musl': 2.3.3 - '@rspack/binding-linux-s390x-gnu': 2.3.3 - '@rspack/binding-linux-x64-gnu': 2.3.3 - '@rspack/binding-linux-x64-musl': 2.3.3 - '@rspack/binding-wasm32-wasi': 2.3.3 - '@rspack/binding-win32-arm64-msvc': 2.3.3 - '@rspack/binding-win32-ia32-msvc': 2.3.3 - '@rspack/binding-win32-x64-msvc': 2.3.3 - - '@rspack/core@2.3.3(@swc/helpers@0.5.24)': - dependencies: - '@rspack/binding': 2.3.3 + '@rspack/binding-darwin-arm64': 2.3.4 + '@rspack/binding-darwin-x64': 2.3.4 + '@rspack/binding-linux-arm64-gnu': 2.3.4 + '@rspack/binding-linux-arm64-musl': 2.3.4 + '@rspack/binding-linux-ppc64-gnu': 2.3.4 + '@rspack/binding-linux-riscv64-gnu': 2.3.4 + '@rspack/binding-linux-riscv64-musl': 2.3.4 + '@rspack/binding-linux-s390x-gnu': 2.3.4 + '@rspack/binding-linux-x64-gnu': 2.3.4 + '@rspack/binding-linux-x64-musl': 2.3.4 + '@rspack/binding-wasm32-wasi': 2.3.4 + '@rspack/binding-win32-arm64-msvc': 2.3.4 + '@rspack/binding-win32-ia32-msvc': 2.3.4 + '@rspack/binding-win32-x64-msvc': 2.3.4 + + '@rspack/core@2.3.4(@swc/helpers@0.5.24)': + dependencies: + '@rspack/binding': 2.3.4 optionalDependencies: '@swc/helpers': 0.5.24 - '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.3.3(@swc/helpers@0.5.24))(react-refresh@0.19.0)': + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.3.4(@swc/helpers@0.5.24))(react-refresh@0.19.0)': dependencies: react-refresh: 0.19.0 optionalDependencies: - '@rspack/core': 2.3.3(@swc/helpers@0.5.24) + '@rspack/core': 2.3.4(@swc/helpers@0.5.24) '@simple-libs/child-process-utils@2.0.0': dependencies: @@ -4613,10 +4613,10 @@ snapshots: - supports-color optional: true - rsbuild-plugin-dts@1.0.7(@rsbuild/core@2.3.3)(typescript@7.0.2): + rsbuild-plugin-dts@1.0.7(@rsbuild/core@2.3.4)(typescript@7.0.2): dependencies: '@ast-grep/napi': 0.51.1 - '@rsbuild/core': 2.3.3 + '@rsbuild/core': 2.3.4 optionalDependencies: typescript: 7.0.2 From 4e2bd03591e09764f7bfa0b83db9eba9ab44e7f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 02:13:38 +0000 Subject: [PATCH 2/3] build(plugin): regenerate embedded host bundles --- plugin/chatgpt-extension/embedded/server.mjs | 2 +- plugin/cursor-native-extension/embedded/extension.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin/chatgpt-extension/embedded/server.mjs b/plugin/chatgpt-extension/embedded/server.mjs index 75784e367d..62b126c316 100644 --- a/plugin/chatgpt-extension/embedded/server.mjs +++ b/plugin/chatgpt-extension/embedded/server.mjs @@ -63,7 +63,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs. `)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.reject(new cs(ca.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:t=>{e=t},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=uR(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>void this.close())}writeMessageFrame(e){this.writeFrame(`event: message data: ${JSON.stringify(e)} -`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uI(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function ux(e,t,r,i){let o=`Bearer error="${uI(e)}", error_description="${uI(t)}"`;return r.length>0&&(o+=`, scope="${uI(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uI(i)}"`),o}function uj(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cz(cN.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cz(cN.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uC(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cz(cN.InternalError,t)}var uT=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uC(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uj(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cz(cN.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cc(a,t))return uC(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uC(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cs?e.reason:new cs(ca.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cs?e.reason:new cs(ca.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lO(m,t))}let f=await t(r,m);if(!lo(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uO=new Set(["tools/call","prompts/get","resources/read"]);var uE=class extends lE{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uT({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uw,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cW(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cu(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cs(ca.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uq?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&cp.includes(t)&&cu(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oD(sK,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ac]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(sK.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lo(a)){if(!i)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cE(a,r)}:async(r,i)=>{let o=await t(r,i);if(lo(o))throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=c9(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cz("not-in-era"===o.reason?cN.InternalError:cN.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lo(n))return n;let a=ch(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cz("not-in-era"===s.reason?cN.InternalError:cN.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cl}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cz(cN.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lO(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cz&&e.code===cN.UrlElicitationRequired){if(!n)throw e;throw new cz(cN.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lo(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??ar}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uj(e,r,i),a=cc(n,t);if(void 0!==a)throw new cU({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cz(cN.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[as]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cs(ca.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cs(ca.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cs(ca.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cs(ca.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cs(ca.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cs(ca.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cs(ca.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cs(ca.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cs(ca.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cs(ca.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cl)),i=r.includes(t)?t:r[0]??ar;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cu(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cs(ca.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cz(cN.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cz(cN.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cz(cN.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cs(ca.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cs(ca.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cz(cN.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cz)throw e;throw new cz(cN.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uA=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uN;try{let r=ly(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uE(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=ly(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(ln in e){if(!a||0===t.length)return`${ll(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[ln];if("string"!=typeof n||0===n.length)return`${ll(t)}: x-mcp-header MUST be a non-empty string`;if(!la.test(n))return`${ll(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!ls.has(s)){let e=`${ll(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of ld){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&lc.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uN,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=ly(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cz(cN.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lo(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cz&&e.code===cN.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cz(cN.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lg(e.inputSchema,t??{});if(!i.success)throw new cz(cN.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lo(t)||t.isError)return;if(void 0===t.structuredContent)throw new cz(cN.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lg(e.outputSchema,t.structuredContent);if(!i.success)throw new cz(cN.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cz(cN.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cz(cN.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uL;let i=uG(uU(r.argsSchema)?.[e.params.argument.name]);if(!uP(i))return uL;let o=i[uV]?.complete;return o?uF(await o(e.params.argument.value,e.params.context)):uL}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uL;throw new cz(cN.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uF(await i(e.params.argument.value,e.params.context)):uL}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cz(cN.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cz(cN.InvalidParams,`Resource ${r} disabled`);return cE(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cz(cN.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cE(await e.readCallback(r,i,t),e.cacheHint)}}throw new cD(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=ly(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cz(cN.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cW(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uD(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uD(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uU(i);e&&Object.values(e).some(e=>uP(uG(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lD(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uz(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uW(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lD(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uW(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uz(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lL(n),lL(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lL(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uM=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lF(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uW(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uN={type:"object",properties:{}};function uz(e){if(void 0!==e)try{return ly(e,"output")}catch{return}}function uD(e,t,r){return t?async(i,o)=>{let n=await lg(t,i??{});if(!n.success)throw new cz(cN.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uF(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uL={completion:{values:[],hasMore:!1}};function uU(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uG(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uH=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ai,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uR(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let o of e){let e=await r({request:o,...void 0!==t&&{authInfo:t}});if(void 0!==e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[t,r]of e.scopes.entries()){var i=`scope challenge scopes[${t}]`;if("string"!=typeof r||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(r))throw TypeError(`${i} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}}}(e.filter(e=>li(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cn)){let e=new cn(co.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case co.InvalidToken:{let t=ux(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case co.InsufficientScope:{let t=ux(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case co.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cn(co.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} +`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uI(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function ux(e,t,r,i){let o=`Bearer error="${uI(e)}", error_description="${uI(t)}"`;return r.length>0&&(o+=`, scope="${uI(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uI(i)}"`),o}function uj(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cz(cN.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cz(cN.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uC(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cz(cN.InternalError,t)}var uT=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uC(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uj(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cz(cN.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cc(a,t))return uC(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uC(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cs?e.reason:new cs(ca.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cs?e.reason:new cs(ca.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lO(m,t))}let f=await t(r,m);if(!lo(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uO=new Set(["tools/call","prompts/get","resources/read"]);var uE=class extends lE{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uT({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uw,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cW(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cu(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cs(ca.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uq?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&cp.includes(t)&&cu(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oD(sK,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ac]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(sK.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lo(a)){if(!i)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cE(a,r)}:async(r,i)=>{let o=await t(r,i);if(lo(o))throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=c9(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cz("not-in-era"===o.reason?cN.InternalError:cN.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lo(n))return n;let a=ch(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cz("not-in-era"===s.reason?cN.InternalError:cN.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cl}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cz(cN.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lO(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cz&&e.code===cN.UrlElicitationRequired){if(!n)throw e;throw new cz(cN.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lo(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??ar}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cz(cN.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uj(e,r,i),a=cc(n,t);if(void 0!==a)throw new cU({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cz(cN.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[as]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cs(ca.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cs(ca.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cs(ca.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cs(ca.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cs(ca.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cs(ca.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cs(ca.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cs(ca.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cs(ca.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cs(ca.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cs(ca.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cl)),i=r.includes(t)?t:r[0]??ar;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cu(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cs(ca.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cz(cN.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cz(cN.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cz(cN.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cs(ca.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cs(ca.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cz(cN.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cz)throw e;throw new cz(cN.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cs(ca.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uA=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uN;try{let r=ly(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uE(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=ly(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(ln in e){if(!a||0===t.length)return`${ll(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[ln];if("string"!=typeof n||0===n.length)return`${ll(t)}: x-mcp-header MUST be a non-empty string`;if(!la.test(n))return`${ll(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!ls.has(s)){let e=`${ll(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of ld){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&lc.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uN,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=ly(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cz(cN.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lo(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cz&&e.code===cN.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cz(cN.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lg(e.inputSchema,t??{});if(!i.success)throw new cz(cN.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lo(t)||t.isError)return;if(void 0===t.structuredContent)throw new cz(cN.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lg(e.outputSchema,t.structuredContent);if(!i.success)throw new cz(cN.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cz(cN.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cz(cN.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uL;let i=uG(uU(r.argsSchema)?.[e.params.argument.name]);if(!uP(i))return uL;let o=i[uV]?.complete;return o?uF(await o(e.params.argument.value,e.params.context)):uL}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uL;throw new cz(cN.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uF(await i(e.params.argument.value,e.params.context)):uL}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cz(cN.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cz(cN.InvalidParams,`Resource ${r} disabled`);return cE(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cz(cN.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cE(await e.readCallback(r,i,t),e.cacheHint)}}throw new cD(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=ly(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cz(cN.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cz(cN.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cW(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uD(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uD(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uU(i);e&&Object.values(e).some(e=>uP(uG(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lD(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uz(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uW(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lD(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uW(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uz(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lL(n),lL(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lL(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uM=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lF(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uW(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uN={type:"object",properties:{}};function uz(e){if(void 0!==e)try{return ly(e,"output")}catch{return}}function uD(e,t,r){return t?async(i,o)=>{let n=await lg(t,i??{});if(!n.success)throw new cz(cN.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uF(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uL={completion:{values:[],hasMore:!1}};function uU(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uG(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uH=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ai,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uR(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let i of e){let e=await r({request:i,...void 0!==t&&{authInfo:t}});if(void 0!==e)return function(e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[r,i]of e.scopes.entries()){var t=`scope challenge scopes[${r}]`;if("string"!=typeof i||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(i))throw TypeError(`${t} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}(e)}}(e.filter(e=>li(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cn)){let e=new cn(co.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case co.InvalidToken:{let t=ux(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case co.InsufficientScope:{let t=ux(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case co.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cn(co.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} data: `;void 0!==this._retryInterval&&(n=`id: ${o} diff --git a/plugin/cursor-native-extension/embedded/extension.js b/plugin/cursor-native-extension/embedded/extension.js index 5f1c6fd65d..aece93887a 100644 --- a/plugin/cursor-native-extension/embedded/extension.js +++ b/plugin/cursor-native-extension/embedded/extension.js @@ -26089,10 +26089,7 @@ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj (() => { // define __esModule on exports __webpack_require__.r = (exports) => { - if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); - } - Object.defineProperty(exports, '__esModule', { value: true }); + Object.defineProperties(exports, { [Symbol.toStringTag]: { value: 'Module' }, __esModule: { value: true } }); }; })(); var __webpack_exports__ = {}; From 0669f500512c27d9cf196e53825ca02fa619c0d5 Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Tue, 24 Nov 2026 18:15:51 -0800 Subject: [PATCH 3/3] chore(deps): preserve regenerated Rsbuild bundles Retain the verified host bundle regeneration for the exact updated lockfile inputs. Renovate repeatedly replaced its ignored bot-authored bundle commit with an identical lock-only tree, cancelling the required CI before it could finish. Record this reviewed tree as the branch's maintained state.