From 76b32fe747192591e70f0a8ed543fe96f44fe9fc Mon Sep 17 00:00:00 2001 From: Alex Nahas Date: Thu, 2 Jul 2026 14:19:25 -0700 Subject: [PATCH] chore(deps): upgrade WebMCP packages to 4.0.0 --- apps/chat-ui/package.json | 6 +- .../components/assistant-ui/tool-fallback.tsx | 3 +- apps/mcp-server/package.json | 4 +- pnpm-lock.yaml | 318 +++++++++++++++--- tests/e2e/tests/chat-ui.spec.ts | 15 +- tests/e2e/tests/integration.spec.ts | 6 +- tests/e2e/tests/remote-mcp-starter.spec.ts | 14 +- 7 files changed, 304 insertions(+), 62 deletions(-) diff --git a/apps/chat-ui/package.json b/apps/chat-ui/package.json index 158ca91..f74cb97 100644 --- a/apps/chat-ui/package.json +++ b/apps/chat-ui/package.json @@ -31,9 +31,9 @@ "@assistant-ui/react-ai-sdk": "^1.1.9", "@assistant-ui/react-markdown": "^0.11.4", "@hookform/resolvers": "^5.2.2", - "@mcp-b/react-webmcp": "3.0.0", - "@mcp-b/transports": "3.0.0", - "@mcp-b/webmcp-ts-sdk": "3.0.0", + "@mcp-b/react-webmcp": "4.0.0", + "@mcp-b/transports": "4.0.0", + "@mcp-b/webmcp-ts-sdk": "4.0.0", "@mcp-ui/client": "^5.14.1", "@modelcontextprotocol/sdk": "^1.21.1", "@radix-ui/react-avatar": "^1.1.10", diff --git a/apps/chat-ui/src/components/assistant-ui/tool-fallback.tsx b/apps/chat-ui/src/components/assistant-ui/tool-fallback.tsx index 236b899..546df74 100644 --- a/apps/chat-ui/src/components/assistant-ui/tool-fallback.tsx +++ b/apps/chat-ui/src/components/assistant-ui/tool-fallback.tsx @@ -1,4 +1,5 @@ import type { ToolCallMessagePartComponent } from '@assistant-ui/react'; +import type { ClientResult } from '@modelcontextprotocol/sdk/types.js'; import { ChevronDown, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'; import { useEffect, useMemo, useState } from 'react'; import { Button } from '@/components/ui/button'; @@ -201,7 +202,7 @@ export const ToolFallback: ToolCallMessagePartComponent = ({ onSubmit={(res: { action: 'accept' | 'decline' | 'cancel'; data?: unknown }) => { submitElicitation(toolElicitation.requestId, { action: res.action, - data: res.data as any, + data: res.data as ClientResult, }); }} onCancel={() => { diff --git a/apps/mcp-server/package.json b/apps/mcp-server/package.json index 25bb306..a432aea 100644 --- a/apps/mcp-server/package.json +++ b/apps/mcp-server/package.json @@ -27,8 +27,8 @@ "test:coverage": "vitest run --coverage" }, "dependencies": { - "@mcp-b/global": "3.0.0", - "@mcp-b/react-webmcp": "3.0.0", + "@mcp-b/global": "4.0.0", + "@mcp-b/react-webmcp": "4.0.0", "@mcp-ui/server": "^5.13.1", "@modelcontextprotocol/sdk": "^1.22.0", "@tailwindcss/vite": "^4.1.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f597bde..77e092b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,14 +51,14 @@ importers: specifier: ^5.2.2 version: 5.2.2(react-hook-form@7.66.0(react@19.2.0)) '@mcp-b/react-webmcp': - specifier: 3.0.0 - version: 3.0.0(react@19.2.0)(zod@3.25.76) + specifier: 4.0.0 + version: 4.0.0(@cfworker/json-schema@4.1.1)(react@19.2.0)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) '@mcp-b/transports': - specifier: 3.0.0 - version: 3.0.0 + specifier: 4.0.0 + version: 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76)) '@mcp-b/webmcp-ts-sdk': - specifier: 3.0.0 - version: 3.0.0(zod@3.25.76) + specifier: 4.0.0 + version: 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) '@mcp-ui/client': specifier: ^5.14.1 version: 5.14.1(@cfworker/json-schema@4.1.1)(@preact/signals-core@1.12.1)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) @@ -269,11 +269,11 @@ importers: apps/mcp-server: dependencies: '@mcp-b/global': - specifier: 3.0.0 - version: 3.0.0(zod@3.25.76) + specifier: 4.0.0 + version: 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) '@mcp-b/react-webmcp': - specifier: 3.0.0 - version: 3.0.0(react@19.2.0)(zod@3.25.76) + specifier: 4.0.0 + version: 4.0.0(@cfworker/json-schema@4.1.1)(react@19.2.0)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) '@mcp-ui/server': specifier: ^5.13.1 version: 5.13.1(@cfworker/json-schema@4.1.1) @@ -1214,6 +1214,12 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} + '@hono/node-server@1.19.14': + resolution: {integrity: sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==} + engines: {node: '>=18.14.1'} + peerDependencies: + hono: ^4 + '@hookform/resolvers@5.2.2': resolution: {integrity: sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA==} peerDependencies: @@ -1362,31 +1368,28 @@ packages: '@jsdevtools/ono@7.1.3': resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} - '@mcp-b/global@3.0.0': - resolution: {integrity: sha512-HZWlR2Gb5v/ROtg0noiiHfrnHVPYxxhOPPaeYlXvCd6UB/u82Q3lwtCdWQLw66N25Zp9VSMGRR1Eq72yDFqcNQ==} + '@mcp-b/global@4.0.0': + resolution: {integrity: sha512-jDBrAwN/A3jJ+tUxtS5IcM7en8VS38n0TUkibcZspq+Pu4Romh1s99jlkOkk1r1CvIbLJ5zJqgIMzWKFR4067A==} engines: {node: '>=18'} - '@mcp-b/react-webmcp@3.0.0': - resolution: {integrity: sha512-lYsAM6ljlZ1lNqM2Dhp616z43c+DJUaFQgcNBWhDuHvYLTyGNhyD0PUGIdchFOLNdP4y+gjG0v8xqo03/y6dpw==} + '@mcp-b/react-webmcp@4.0.0': + resolution: {integrity: sha512-FEbUXmziTxcdIpNzqbsabE/6ukgP1W7t81ZeWgNJOHHEWk8S1x/ZJ2bcEEDI22XtB45SAlBySD/uXyk9R5iWWw==} peerDependencies: react: ^17.0.0 || ^18.0.0 || ^19.0.0 zod: ^3.25 || ^4.0 - zod-to-json-schema: ^3.25.0 peerDependenciesMeta: zod: optional: true - zod-to-json-schema: - optional: true - '@mcp-b/transports@3.0.0': - resolution: {integrity: sha512-WMgeb0P9Bhu+0mN07qkvCo+W9Fucdk9+iyp7wPZYAtQ4ZTcbNuu8Zl1qdNM8oWxXgMbA749w4nUcPsbPaMvSvA==} + '@mcp-b/transports@4.0.0': + resolution: {integrity: sha512-uf8a1zYnpfT0ugBobElhH37Z4jNlBV76WvaHZPKO8DYSvAI4Qs7B+bUQwNpCoSC/tCqdMbHkLxW2G/6Xz9/4Mw==} - '@mcp-b/webmcp-polyfill@3.0.0': - resolution: {integrity: sha512-TCrCOZCTfRWrTp8MpWU8EO4U7r7IvDDaIYW9Ej0aBD2KVR2hvwr4t3T7kPkSYssGhpIZJrq19owSzN1vZabW+A==} + '@mcp-b/webmcp-polyfill@4.0.0': + resolution: {integrity: sha512-7M6WS3IcxaIEhidbS9N7wrrGjtJf474Vi4Fn1hGkFkmYFT5EoFw/kS/4CSdUR/KmlInO1kyluHRY6t3avMQfFw==} engines: {node: '>=18'} - '@mcp-b/webmcp-ts-sdk@3.0.0': - resolution: {integrity: sha512-Lbn7ODKWMYd6xqpcl+OmXseKbjwB+Q3F9CUm9vDFpZgviWc3/5CuG3IDylHg/toVMeZz6v5+E8AmBnv8zj5G5w==} + '@mcp-b/webmcp-ts-sdk@4.0.0': + resolution: {integrity: sha512-zXdbBdefgcBz077NkvZ3WZhkHOvBU2rpsVK8ytQt/SbiS2tCIFshuB027QceuTyuprOjW0b7XKDnSzDB2DQVMA==} engines: {node: '>=18'} peerDependencies: zod: ^3.25 || ^4.0 @@ -1397,8 +1400,8 @@ packages: zod-to-json-schema: optional: true - '@mcp-b/webmcp-types@3.0.0': - resolution: {integrity: sha512-MmKHNAtlyZoK5khz5GnmgEj/ehk5esoUbgOaFndrlZvpjq3ppmIY3BDrwCv6xaihuuIMOoLLDlf0E65wUd4q7A==} + '@mcp-b/webmcp-types@4.0.0': + resolution: {integrity: sha512-CUBBmiut1UBsiD3FAF6xrLKeKAuJkzd6/BlL1C/uo8sVpwY42NW4mls9rLcTxmLF/8Cj5/ZOwJiLzXl/T3GIQg==} '@mcp-ui/client@5.14.1': resolution: {integrity: sha512-DHJ4H01L2oIiMdDzUrBErxYoli9Q3cQq5sXk3hhBQNqASbc55PtEhz6k0pOp7ykkj63MfxDKDmYXLw5jseY7/g==} @@ -1427,6 +1430,16 @@ packages: '@cfworker/json-schema': optional: true + '@modelcontextprotocol/sdk@1.29.0': + resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==} + engines: {node: '>=18'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2784,6 +2797,10 @@ packages: resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} engines: {node: '>=18'} + body-parser@2.3.0: + resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} + engines: {node: '>=18'} + brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -2907,6 +2924,10 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} + content-type@2.0.0: + resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==} + engines: {node: '>=18'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -3168,10 +3189,20 @@ packages: peerDependencies: express: '>= 4.11' + express-rate-limit@8.5.2: + resolution: {integrity: sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==} + engines: {node: '>= 16'} + peerDependencies: + express: '>= 4.11' + express@5.1.0: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} + express@5.2.1: + resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} + engines: {node: '>= 18'} + extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -3364,6 +3395,10 @@ packages: resolution: {integrity: sha512-BIdolzGpDO9MQ4nu3AUuDwHZZ+KViNm+EZ75Ae55eMXMqLVhDFqEMXxtUe9Qh8hjL+pIna/frs2j6Y2yD5Ua/g==} engines: {node: '>=16.9.0'} + hono@4.12.27: + resolution: {integrity: sha512-1yrb/+w6HWQJrUCLkJ2IF5jNIPvvFkblV5RNOYl6bV+OA6p9GLcMpHFFGTosSvHvcAUibuUukRqhlYI4z32C7Q==} + engines: {node: '>=16.9.0'} + htm@3.1.1: resolution: {integrity: sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==} @@ -3378,6 +3413,10 @@ packages: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -3398,6 +3437,10 @@ packages: resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} engines: {node: '>=0.10.0'} + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + engines: {node: '>=0.10.0'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -3424,6 +3467,10 @@ packages: inline-style-parser@0.2.6: resolution: {integrity: sha512-gtGXVaBdl5mAes3rPcMedEBm12ibjt1kDMFfheul1wUAOVEJW60voNdMVzVkfLN06O7ZaD/rxhfKgtlgtTbMjg==} + ip-address@10.2.0: + resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==} + engines: {node: '>= 12'} + ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3476,6 +3523,9 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + jose@6.2.3: + resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} + js-base64@3.7.8: resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==} @@ -3521,6 +3571,9 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-schema-typed@8.0.2: + resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} @@ -4090,6 +4143,10 @@ packages: resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} engines: {node: '>=0.6'} + qs@6.15.3: + resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} + engines: {node: '>=0.6'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -4101,6 +4158,10 @@ packages: resolution: {integrity: sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==} engines: {node: '>= 0.10'} + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + react-day-picker@9.11.1: resolution: {integrity: sha512-l3ub6o8NlchqIjPKrRFUCkTUEq6KwemQlfv3XZzzwpUeGwmDJ+0u0Upmt38hJyd7D/vn2dQoOoLV/qAp0o3uUw==} engines: {node: '>=18'} @@ -4276,6 +4337,10 @@ packages: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + side-channel-map@1.0.1: resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} engines: {node: '>= 0.4'} @@ -4288,6 +4353,10 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -4501,6 +4570,10 @@ packages: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + typescript-eslint@8.46.3: resolution: {integrity: sha512-bAfgMavTuGo+8n6/QQDVQz4tZ4f7Soqg53RbrlZQEoAltYop/XR4RAts/I0BrO3TTClTSTFJ0wYbla+P8cEWJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4863,6 +4936,11 @@ packages: peerDependencies: zod: ^3.24.1 + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} + peerDependencies: + zod: ^3.25.28 || ^4 + zod-to-ts@2.0.0: resolution: {integrity: sha512-aHsUgIl+CQutKAxtRNeZslLCLXoeuSq+j5HU7q3kvi/c2KIAo6q4YjT7/lwFfACxLB923ELHYMkHmlxiqFy4lw==} peerDependencies: @@ -5583,6 +5661,10 @@ snapshots: '@floating-ui/utils@0.2.10': {} + '@hono/node-server@1.19.14(hono@4.12.27)': + dependencies: + hono: 4.12.27 + '@hookform/resolvers@5.2.2(react-hook-form@7.66.0(react@19.2.0))': dependencies: '@standard-schema/utils': 0.3.0 @@ -5700,48 +5782,63 @@ snapshots: '@jsdevtools/ono@7.1.3': {} - '@mcp-b/global@3.0.0(zod@3.25.76)': + '@mcp-b/global@4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76)': dependencies: - '@mcp-b/transports': 3.0.0 - '@mcp-b/webmcp-polyfill': 3.0.0 - '@mcp-b/webmcp-ts-sdk': 3.0.0(zod@3.25.76) - '@mcp-b/webmcp-types': 3.0.0 + '@mcp-b/transports': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76)) + '@mcp-b/webmcp-polyfill': 4.0.0 + '@mcp-b/webmcp-ts-sdk': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) + '@mcp-b/webmcp-types': 4.0.0 transitivePeerDependencies: + - '@cfworker/json-schema' + - supports-color - zod - zod-to-json-schema - '@mcp-b/react-webmcp@3.0.0(react@19.2.0)(zod@3.25.76)': + '@mcp-b/react-webmcp@4.0.0(@cfworker/json-schema@4.1.1)(react@19.2.0)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76)': dependencies: - '@mcp-b/global': 3.0.0(zod@3.25.76) - '@mcp-b/transports': 3.0.0 - '@mcp-b/webmcp-polyfill': 3.0.0 - '@mcp-b/webmcp-ts-sdk': 3.0.0(zod@3.25.76) - '@mcp-b/webmcp-types': 3.0.0 + '@mcp-b/global': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) + '@mcp-b/transports': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76)) + '@mcp-b/webmcp-polyfill': 4.0.0 + '@mcp-b/webmcp-ts-sdk': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) + '@mcp-b/webmcp-types': 4.0.0 + '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@3.25.76) react: 19.2.0 optionalDependencies: zod: 3.25.76 + transitivePeerDependencies: + - '@cfworker/json-schema' + - supports-color + - zod-to-json-schema - '@mcp-b/transports@3.0.0': + '@mcp-b/transports@4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))': dependencies: - '@mcp-b/webmcp-ts-sdk': 3.0.0(zod@3.25.76) + '@mcp-b/webmcp-ts-sdk': 4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76) + '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@3.25.76) zod: 3.25.76 transitivePeerDependencies: + - '@cfworker/json-schema' + - supports-color - zod-to-json-schema - '@mcp-b/webmcp-polyfill@3.0.0': + '@mcp-b/webmcp-polyfill@4.0.0': dependencies: '@cfworker/json-schema': 4.1.1 - '@mcp-b/webmcp-types': 3.0.0 + '@mcp-b/webmcp-types': 4.0.0 '@standard-schema/spec': 1.1.0 - '@mcp-b/webmcp-ts-sdk@3.0.0(zod@3.25.76)': + '@mcp-b/webmcp-ts-sdk@4.0.0(@cfworker/json-schema@4.1.1)(zod-to-json-schema@3.25.2(zod@3.25.76))(zod@3.25.76)': dependencies: - '@mcp-b/webmcp-polyfill': 3.0.0 - '@mcp-b/webmcp-types': 3.0.0 + '@mcp-b/webmcp-polyfill': 4.0.0 + '@mcp-b/webmcp-types': 4.0.0 + '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@3.25.76) optionalDependencies: zod: 3.25.76 + zod-to-json-schema: 3.25.2(zod@3.25.76) + transitivePeerDependencies: + - '@cfworker/json-schema' + - supports-color - '@mcp-b/webmcp-types@3.0.0': {} + '@mcp-b/webmcp-types@4.0.0': {} '@mcp-ui/client@5.14.1(@cfworker/json-schema@4.1.1)(@preact/signals-core@1.12.1)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: @@ -5805,6 +5902,30 @@ snapshots: transitivePeerDependencies: - supports-color + '@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@3.25.76)': + dependencies: + '@hono/node-server': 1.19.14(hono@4.12.27) + ajv: 8.17.1 + ajv-formats: 3.0.1(ajv@8.17.1) + content-type: 1.0.5 + cors: 2.8.5 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.0.6 + express: 5.2.1 + express-rate-limit: 8.5.2(express@5.2.1) + hono: 4.12.27 + jose: 6.2.3 + json-schema-typed: 8.0.2 + pkce-challenge: 5.0.0 + raw-body: 3.0.2 + zod: 3.25.76 + zod-to-json-schema: 3.25.2(zod@3.25.76) + optionalDependencies: + '@cfworker/json-schema': 4.1.1 + transitivePeerDependencies: + - supports-color + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7158,6 +7279,20 @@ snapshots: transitivePeerDependencies: - supports-color + body-parser@2.3.0: + dependencies: + bytes: 3.1.2 + content-type: 2.0.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.2 + on-finished: 2.4.1 + qs: 6.15.3 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -7299,6 +7434,8 @@ snapshots: content-type@1.0.5: {} + content-type@2.0.0: {} + convert-source-map@2.0.0: {} cookie-signature@1.2.2: {} @@ -7596,6 +7733,11 @@ snapshots: dependencies: express: 5.1.0 + express-rate-limit@8.5.2(express@5.2.1): + dependencies: + express: 5.2.1 + ip-address: 10.2.0 + express@5.1.0: dependencies: accepts: 2.0.0 @@ -7628,6 +7770,39 @@ snapshots: transitivePeerDependencies: - supports-color + express@5.2.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.3.0 + content-disposition: 1.0.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.0 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.1 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.7 + qs: 6.15.3 + range-parser: 1.2.1 + router: 2.2.0 + send: 1.2.0 + serve-static: 2.2.0 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + extend@3.0.2: {} fast-deep-equal@3.1.3: {} @@ -7810,6 +7985,8 @@ snapshots: hono@4.10.6: {} + hono@4.12.27: {} + htm@3.1.1: {} html-encoding-sniffer@4.0.0: @@ -7826,6 +8003,14 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 @@ -7855,6 +8040,10 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.7.2: + dependencies: + safer-buffer: 2.1.2 + ignore@5.3.2: {} ignore@7.0.5: {} @@ -7872,6 +8061,8 @@ snapshots: inline-style-parser@0.2.6: {} + ip-address@10.2.0: {} + ipaddr.js@1.9.1: {} is-alphabetical@2.0.1: {} @@ -7909,6 +8100,8 @@ snapshots: jiti@2.6.1: {} + jose@6.2.3: {} + js-base64@3.7.8: {} js-tokens@4.0.0: {} @@ -7974,6 +8167,8 @@ snapshots: json-schema-traverse@1.0.0: {} + json-schema-typed@8.0.2: {} + json-schema@0.4.0: {} json-stable-stringify-without-jsonify@1.0.1: {} @@ -8688,6 +8883,11 @@ snapshots: dependencies: side-channel: 1.1.0 + qs@6.15.3: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + queue-microtask@1.2.3: {} range-parser@1.2.1: {} @@ -8699,6 +8899,13 @@ snapshots: iconv-lite: 0.7.0 unpipe: 1.0.0 + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.2 + unpipe: 1.0.0 + react-day-picker@9.11.1(react@19.2.0): dependencies: '@date-fns/tz': 1.4.1 @@ -8952,6 +9159,11 @@ snapshots: es-errors: 1.3.0 object-inspect: 1.13.4 + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-map@1.0.1: dependencies: call-bound: 1.0.4 @@ -8975,6 +9187,14 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + siginfo@2.0.0: {} simple-swizzle@0.2.4: @@ -9148,6 +9368,12 @@ snapshots: media-typer: 1.1.0 mime-types: 3.0.1 + type-is@2.1.0: + dependencies: + content-type: 2.0.0 + media-typer: 1.1.0 + mime-types: 3.0.1 + typescript-eslint@8.46.3(eslint@9.39.1(jiti@2.6.1))(typescript@5.8.3): dependencies: '@typescript-eslint/eslint-plugin': 8.46.3(@typescript-eslint/parser@8.46.3(eslint@9.39.1(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.8.3) @@ -9487,6 +9713,10 @@ snapshots: dependencies: zod: 3.25.76 + zod-to-json-schema@3.25.2(zod@3.25.76): + dependencies: + zod: 3.25.76 + zod-to-ts@2.0.0(typescript@5.8.3)(zod@3.25.76): dependencies: typescript: 5.8.3 diff --git a/tests/e2e/tests/chat-ui.spec.ts b/tests/e2e/tests/chat-ui.spec.ts index 08b65a7..a0eb9e1 100644 --- a/tests/e2e/tests/chat-ui.spec.ts +++ b/tests/e2e/tests/chat-ui.spec.ts @@ -37,10 +37,11 @@ test.describe('Chat UI App E2E Tests', () => { }); await page.goto('/'); - await page.waitForLoadState('networkidle'); + await page.waitForLoadState('domcontentloaded'); + await expect(page.locator('#root')).toBeVisible(); const criticalErrors = errors.filter((error) => { - return !error.includes('favicon.ico'); + return !error.includes('favicon.ico') && !error.includes('[useMCPConnection] MCP connection failed'); }); expect(criticalErrors).toEqual([]); @@ -51,13 +52,19 @@ test.describe('Chat UI App E2E Tests', () => { page.on('requestfailed', (request) => { const url = request.url(); - if (!url.includes('favicon.ico') && !url.includes('sentry.io') && !url.includes('analytics')) { + if ( + !url.includes('favicon.ico') && + !url.includes('sentry.io') && + !url.includes('analytics') && + !url.includes('localhost:8888/mcp') + ) { failedRequests.push(url); } }); await page.goto('/'); - await page.waitForLoadState('networkidle'); + await page.waitForLoadState('domcontentloaded'); + await expect(page.locator('#root')).toBeVisible(); expect(failedRequests).toEqual([]); }); diff --git a/tests/e2e/tests/integration.spec.ts b/tests/e2e/tests/integration.spec.ts index c7be62b..931d5d5 100644 --- a/tests/e2e/tests/integration.spec.ts +++ b/tests/e2e/tests/integration.spec.ts @@ -39,7 +39,8 @@ test.describe('MCP Server + Chat UI Integration Tests', () => { }); await page.goto('http://localhost:5173'); - await page.waitForLoadState('networkidle'); + await page.waitForLoadState('domcontentloaded'); + await expect(page.locator('#root')).toBeVisible(); const mcpPage = await context.newPage(); @@ -54,7 +55,8 @@ test.describe('MCP Server + Chat UI Integration Tests', () => { }); await mcpPage.goto('http://localhost:8888'); - await mcpPage.waitForLoadState('networkidle'); + await mcpPage.waitForLoadState('domcontentloaded'); + await expect(mcpPage.locator('#root')).toBeVisible(); const criticalErrors = errors.filter((error) => { return !error.error.includes('favicon.ico'); diff --git a/tests/e2e/tests/remote-mcp-starter.spec.ts b/tests/e2e/tests/remote-mcp-starter.spec.ts index 3ba0127..246db3f 100644 --- a/tests/e2e/tests/remote-mcp-starter.spec.ts +++ b/tests/e2e/tests/remote-mcp-starter.spec.ts @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test'; test.describe('Remote MCP with UI Starter App E2E Tests', () => { test.beforeEach(async ({ page }) => { - await page.goto('/'); + await page.goto('http://localhost:8888/'); }); test('should load the remote MCP starter application', async ({ page }) => { @@ -36,8 +36,9 @@ test.describe('Remote MCP with UI Starter App E2E Tests', () => { errors.push(error.message); }); - await page.goto('/'); - await page.waitForLoadState('networkidle'); + await page.goto('http://localhost:8888/'); + await page.waitForLoadState('domcontentloaded'); + await expect(page.locator('#root')).toBeVisible(); const criticalErrors = errors.filter((error) => { return !error.includes('favicon.ico'); @@ -56,8 +57,9 @@ test.describe('Remote MCP with UI Starter App E2E Tests', () => { } }); - await page.goto('/'); - await page.waitForLoadState('networkidle'); + await page.goto('http://localhost:8888/'); + await page.waitForLoadState('domcontentloaded'); + await expect(page.locator('#root')).toBeVisible(); expect(failedRequests).toEqual([]); }); @@ -68,7 +70,7 @@ test.describe('Remote MCP with UI Starter App E2E Tests', () => { }); test('should have proper viewport and be responsive', async ({ page }) => { - await page.goto('/'); + await page.goto('http://localhost:8888/'); const viewports = [ { width: 1920, height: 1080, name: 'Desktop' },