From 9470a550c387ca66acff4adaba4c40e630231b93 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Tue, 30 Jul 2024 15:08:39 +0700 Subject: [PATCH] feat: update copitlotkit --- .../src/api/routes/copilot.controller.ts | 4 +- package-lock.json | 542 ++++++------------ package.json | 8 +- 3 files changed, 168 insertions(+), 386 deletions(-) diff --git a/apps/backend/src/api/routes/copilot.controller.ts b/apps/backend/src/api/routes/copilot.controller.ts index 65b20754..38284a60 100644 --- a/apps/backend/src/api/routes/copilot.controller.ts +++ b/apps/backend/src/api/routes/copilot.controller.ts @@ -12,9 +12,11 @@ export class CopilotController { const copilotRuntimeHandler = copilotRuntimeNestEndpoint({ endpoint: '/copilot/chat', runtime: new CopilotRuntime(), - serviceAdapter: new OpenAIAdapter({ model: 'gpt-4o' }), + // @ts-ignore + serviceAdapter: new OpenAIAdapter({ model: req?.body?.variables?.data?.metadata?.requestType === 'TextareaCompletion' ? 'gpt-4o-mini' : 'gpt-4o' }), }); + // @ts-ignore return copilotRuntimeHandler(req, res); } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0fdda5cd..90a06300 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,10 +15,10 @@ "@aws-sdk/client-s3": "^3.410.0", "@aws-sdk/s3-request-presigner": "^3.410.0", "@casl/ability": "^6.5.0", - "@copilotkit/react-core": "^1.0.9", - "@copilotkit/react-textarea": "^1.0.9", - "@copilotkit/react-ui": "^1.0.9", - "@copilotkit/runtime": "^1.0.9", + "@copilotkit/react-core": "1.1.0", + "@copilotkit/react-textarea": "1.1.0", + "@copilotkit/react-ui": "1.1.0", + "@copilotkit/runtime": "1.1.0", "@hookform/resolvers": "^3.3.4", "@mantine/core": "^5.10.5", "@mantine/dates": "^5.10.5", @@ -3382,12 +3382,12 @@ } }, "node_modules/@copilotkit/react-core": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/react-core/-/react-core-1.0.9.tgz", - "integrity": "sha512-7nXCS5MMTtUAjEJhoW5aTh7074/Bq53kDo62p0vuUo6kwPqZq0PANXiiAiUjc9v3kViIYyfQMJwOiCEWhczbVA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/react-core/-/react-core-1.1.0.tgz", + "integrity": "sha512-59hfCI9HpczyfHNgW+sw/NxjIzyrfpWAGt+9DHBxqzTJoeFVStleL14THmi7MQaBVB7s3+Qkmb1ciEc2Hp28Jw==", "dependencies": { - "@copilotkit/runtime-client-gql": "1.0.9", - "@copilotkit/shared": "1.0.9", + "@copilotkit/runtime-client-gql": "1.1.0", + "@copilotkit/shared": "1.1.0", "@scarf/scarf": "^1.3.0", "untruncate-json": "^0.0.1" }, @@ -3396,71 +3396,14 @@ "react-dom": "^18.2.0" } }, - "node_modules/@copilotkit/react-core/node_modules/@copilotkit/shared": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.0.9.tgz", - "integrity": "sha512-W3qCinJFB/ZBDr58MkRHES4Ev9gl98AryTMOFlsiMW68TquMOZ7V17tcYdU9lXTHnWWTU50Qr8UOCiIV629Wyw==", - "dependencies": { - "@segment/analytics-node": "^2.1.2", - "chalk": "4.1.2" - } - }, - "node_modules/@copilotkit/react-core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@copilotkit/react-core/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@copilotkit/react-core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@copilotkit/react-core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/react-textarea": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/react-textarea/-/react-textarea-1.0.9.tgz", - "integrity": "sha512-uiTk+ME7CzTtnEoPo93BBSzOhYQi8D4+7EXbTZRdESL0dORcDHZk5LeBP4v0LZraOHMJOJRD2jxwjFb/i1y5Yg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/react-textarea/-/react-textarea-1.1.0.tgz", + "integrity": "sha512-vdrCWu18NxR08BD0/XvjUy8/mdeV5XLykfqNxiAittine+mLwzx1dk2jOU0T343w9iZeh1uxTNjrCNi/eigIoQ==", "dependencies": { - "@copilotkit/react-core": "1.0.9", - "@copilotkit/runtime-client-gql": "1.0.9", - "@copilotkit/shared": "1.0.9", + "@copilotkit/react-core": "1.1.0", + "@copilotkit/runtime-client-gql": "1.1.0", + "@copilotkit/shared": "1.1.0", "@emotion/css": "^11.11.2", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -3485,15 +3428,6 @@ "react": "^18.2.0" } }, - "node_modules/@copilotkit/react-textarea/node_modules/@copilotkit/shared": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.0.9.tgz", - "integrity": "sha512-W3qCinJFB/ZBDr58MkRHES4Ev9gl98AryTMOFlsiMW68TquMOZ7V17tcYdU9lXTHnWWTU50Qr8UOCiIV629Wyw==", - "dependencies": { - "@segment/analytics-node": "^2.1.2", - "chalk": "4.1.2" - } - }, "node_modules/@copilotkit/react-textarea/node_modules/@mui/material": { "version": "5.15.21", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.21.tgz", @@ -3906,35 +3840,6 @@ } } }, - "node_modules/@copilotkit/react-textarea/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@copilotkit/react-textarea/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/@copilotkit/react-textarea/node_modules/clsx": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", @@ -4186,14 +4091,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@copilotkit/react-textarea/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/react-textarea/node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -4220,30 +4117,19 @@ "slate": ">=0.65.3" } }, - "node_modules/@copilotkit/react-textarea/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/react-textarea/node_modules/tiny-invariant": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.0.6.tgz", "integrity": "sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA==" }, "node_modules/@copilotkit/react-ui": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/react-ui/-/react-ui-1.0.9.tgz", - "integrity": "sha512-LV0DfLQHV0JZtQcxM8Hni+2Ng7yJ1MrplQY6SxjUln1zdUmbX/hl6WIUdZF+4KfR3DEIYUQZ7g+SL9CsxICKug==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/react-ui/-/react-ui-1.1.0.tgz", + "integrity": "sha512-8DaypCbF8xHoe3qzPrVj9qKy1zepOWspYNQuC5YvnEJwDfQyz+b/nMg239bwdU6jOVYVw2b6ghYyc5bhtLhbQQ==", "dependencies": { - "@copilotkit/react-core": "1.0.9", - "@copilotkit/runtime-client-gql": "1.0.9", - "@copilotkit/shared": "1.0.9", + "@copilotkit/react-core": "1.1.0", + "@copilotkit/runtime-client-gql": "1.1.0", + "@copilotkit/shared": "1.1.0", "@headlessui/react": "^2.1.2", "react-markdown": "^8.0.7", "react-syntax-highlighter": "^15.5.0", @@ -4254,15 +4140,6 @@ "react": "^18.2.0" } }, - "node_modules/@copilotkit/react-ui/node_modules/@copilotkit/shared": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.0.9.tgz", - "integrity": "sha512-W3qCinJFB/ZBDr58MkRHES4Ev9gl98AryTMOFlsiMW68TquMOZ7V17tcYdU9lXTHnWWTU50Qr8UOCiIV629Wyw==", - "dependencies": { - "@segment/analytics-node": "^2.1.2", - "chalk": "4.1.2" - } - }, "node_modules/@copilotkit/react-ui/node_modules/@headlessui/react": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.1.2.tgz", @@ -4307,60 +4184,12 @@ "react-dom": ">=16.8.0" } }, - "node_modules/@copilotkit/react-ui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@copilotkit/react-ui/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@copilotkit/react-ui/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@copilotkit/react-ui/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/runtime": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/runtime/-/runtime-1.0.9.tgz", - "integrity": "sha512-+e9wRFNCK/l42P3LyVF/YjjSJmy91d8rsJ1fvOfVPKAew+tjyTBY9qWuj8CUhC9ne2g2mvYoNB+X1IRk7cARAw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/runtime/-/runtime-1.1.0.tgz", + "integrity": "sha512-FLbsQJUctW2/fw5tyzh7KhvdPscixNOTLJvmCF6bZ5PWVeCHi4xyAdTqUBfd/+Y2P9xl+/QYRL6wr1YOfHtN5Q==", "dependencies": { - "@copilotkit/shared": "1.0.9", + "@copilotkit/shared": "1.1.0", "@google/generative-ai": "^0.11.2", "@graphql-yoga/plugin-defer-stream": "^3.3.1", "@langchain/community": "^0.0.53", @@ -4383,12 +4212,12 @@ } }, "node_modules/@copilotkit/runtime-client-gql": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/runtime-client-gql/-/runtime-client-gql-1.0.9.tgz", - "integrity": "sha512-BeX3iNOWGcaH3wb/CEj6Lq6uz5r3C6JL7kcgxdTuvlquDKvlyGftF8odL5+SUjkTjvfEb9I3OkNG9FmBrcq3WA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/runtime-client-gql/-/runtime-client-gql-1.1.0.tgz", + "integrity": "sha512-eZeZk+qN9MpR0Ys/3qIXu2EubGjYu3BPCVRwPhSlci4urueIe+7S5J4x8KYBIY37m9MFrPMcxXjcQXoXnb3bCw==", "dependencies": { - "@copilotkit/runtime": "1.0.9", - "@copilotkit/shared": "1.0.9", + "@copilotkit/runtime": "1.1.0", + "@copilotkit/shared": "1.1.0", "@urql/core": "^5.0.3", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", @@ -4401,63 +4230,6 @@ "react": "^18.2.0" } }, - "node_modules/@copilotkit/runtime-client-gql/node_modules/@copilotkit/shared": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.0.9.tgz", - "integrity": "sha512-W3qCinJFB/ZBDr58MkRHES4Ev9gl98AryTMOFlsiMW68TquMOZ7V17tcYdU9lXTHnWWTU50Qr8UOCiIV629Wyw==", - "dependencies": { - "@segment/analytics-node": "^2.1.2", - "chalk": "4.1.2" - } - }, - "node_modules/@copilotkit/runtime-client-gql/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@copilotkit/runtime-client-gql/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@copilotkit/runtime-client-gql/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@copilotkit/runtime-client-gql/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/runtime/node_modules/@aws-crypto/crc32": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", @@ -4496,15 +4268,6 @@ "optional": true, "peer": true }, - "node_modules/@copilotkit/runtime/node_modules/@copilotkit/shared": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.0.9.tgz", - "integrity": "sha512-W3qCinJFB/ZBDr58MkRHES4Ev9gl98AryTMOFlsiMW68TquMOZ7V17tcYdU9lXTHnWWTU50Qr8UOCiIV629Wyw==", - "dependencies": { - "@segment/analytics-node": "^2.1.2", - "chalk": "4.1.2" - } - }, "node_modules/@copilotkit/runtime/node_modules/@langchain/community": { "version": "0.0.53", "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.0.53.tgz", @@ -5076,35 +4839,6 @@ "node": ">= 14" } }, - "node_modules/@copilotkit/runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@copilotkit/runtime/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/@copilotkit/runtime/node_modules/cheerio": { "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", @@ -5232,9 +4966,9 @@ } }, "node_modules/@copilotkit/runtime/node_modules/googleapis/node_modules/google-auth-library": { - "version": "9.11.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.11.0.tgz", - "integrity": "sha512-epX3ww/mNnhl6tL45EQ/oixsY8JLEgUFoT4A5E/5iAR4esld9Kqv6IJGk7EmGuOgDvaarwF95hU2+v7Irql9lw==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.12.0.tgz", + "integrity": "sha512-5pWjpxJMNJ5UTuhK7QPD5KFPsbosWkX4ajMDeZwXllTtwwqeiIzPWbHIddkLBkkn0mUPboTmukT5rd30Ec9igQ==", "optional": true, "peer": true, "dependencies": { @@ -5306,14 +5040,6 @@ "node": ">=12.0.0" } }, - "node_modules/@copilotkit/runtime/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/@copilotkit/runtime/node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -5629,7 +5355,60 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "node_modules/@copilotkit/runtime/node_modules/supports-color": { + "node_modules/@copilotkit/runtime/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true, + "peer": true + }, + "node_modules/@copilotkit/shared": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-1.1.0.tgz", + "integrity": "sha512-pBE7cvX4Gnx7yPkcp5sAbODfyVVRR0kmu6Cwue72F64DMS91m/tEOoOSYatAKCBfB4SOpOmwvObh2MbrxeKUsg==", + "dependencies": { + "@segment/analytics-node": "^2.1.2", + "chalk": "4.1.2" + } + }, + "node_modules/@copilotkit/shared/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@copilotkit/shared/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@copilotkit/shared/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@copilotkit/shared/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", @@ -5640,13 +5419,6 @@ "node": ">=8" } }, - "node_modules/@copilotkit/runtime/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "optional": true, - "peer": true - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -6403,9 +6175,9 @@ } }, "node_modules/@graphql-tools/executor": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.2.8.tgz", - "integrity": "sha512-0qZs/iuRiYRir7bBkA7oN+21wwmSMPQuFK8WcAcxUYJZRhvnlrJ8Nid++PN4OCzTgHPV70GNFyXOajseVCCffA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.3.0.tgz", + "integrity": "sha512-e+rmEf/2EO4hDnbkO8mTS2FI+jGUNmYkSDKw5TgPVlO8VOKS+TXmJBK6E9v4Gc/39yVkZsffYfW/R8obJrA0mg==", "dependencies": { "@graphql-tools/utils": "^10.2.3", "@graphql-typed-document-node/core": "3.2.0", @@ -6489,9 +6261,9 @@ } }, "node_modules/@graphql-yoga/plugin-defer-stream": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@graphql-yoga/plugin-defer-stream/-/plugin-defer-stream-3.6.1.tgz", - "integrity": "sha512-GMGISP5IAImiolryAOWirVWcEOfGgTM2F1DfaviNR7Jdj9/IWY4cFRB4Iu/Ml9POk5ipRnJepHPi0AFLDiYkiA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@graphql-yoga/plugin-defer-stream/-/plugin-defer-stream-3.6.2.tgz", + "integrity": "sha512-dhMF4niJYWjSVsrnN+LlaDTWcv16xah3HUozkGPgev69eW8/sPQiiU+lEyih70uzWgGC+QjPTBQ0Sy1/PG5cZg==", "dependencies": { "@graphql-tools/utils": "^10.0.0" }, @@ -6500,7 +6272,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.6.1" + "graphql-yoga": "^5.6.2" } }, "node_modules/@graphql-yoga/subscription": { @@ -7833,13 +7605,12 @@ } }, "node_modules/@langchain/core/node_modules/langsmith": { - "version": "0.1.35", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.35.tgz", - "integrity": "sha512-7GGltg7nWEv2aG8s62M80A8GBTQHl06mKuBy19lmvVaqhfg8Gn+/WD2rGFZsIpL90WuDZjFO/FNnlQ1j3g41yQ==", + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.39.tgz", + "integrity": "sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA==", "dependencies": { "@types/uuid": "^9.0.1", "commander": "^10.0.1", - "lodash.set": "^4.3.2", "p-queue": "^6.6.2", "p-retry": "4", "uuid": "^9.0.0" @@ -7889,20 +7660,20 @@ } }, "node_modules/@langchain/textsplitters/node_modules/@langchain/core": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.12.tgz", - "integrity": "sha512-zaKvUcWU1Cxcpd/fxklygY6iUrxls10KTRzyHZGBAIKJq1JD/B10vX59YlFgBs7nqqVTEvaChfIE0O0e2qBttA==", + "version": "0.2.18", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.2.18.tgz", + "integrity": "sha512-ru542BwNcsnDfjTeDbIkFIchwa54ctHZR+kVrC8U9NPS9/36iM8p8ruprOV7Zccj/oxtLE5UpEhV+9MZhVcFlA==", "dependencies": { "ansi-styles": "^5.0.0", "camelcase": "6", "decamelize": "1.2.0", "js-tiktoken": "^1.0.12", - "langsmith": "~0.1.30", + "langsmith": "~0.1.39", "ml-distance": "^4.0.0", "mustache": "^4.2.0", "p-queue": "^6.6.2", "p-retry": "4", - "uuid": "^9.0.0", + "uuid": "^10.0.0", "zod": "^3.22.4", "zod-to-json-schema": "^3.22.3" }, @@ -7910,6 +7681,18 @@ "node": ">=18" } }, + "node_modules/@langchain/textsplitters/node_modules/@langchain/core/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@langchain/textsplitters/node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -7919,13 +7702,12 @@ } }, "node_modules/@langchain/textsplitters/node_modules/langsmith": { - "version": "0.1.35", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.35.tgz", - "integrity": "sha512-7GGltg7nWEv2aG8s62M80A8GBTQHl06mKuBy19lmvVaqhfg8Gn+/WD2rGFZsIpL90WuDZjFO/FNnlQ1j3g41yQ==", + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.1.39.tgz", + "integrity": "sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA==", "dependencies": { "@types/uuid": "^9.0.1", "commander": "^10.0.1", - "lodash.set": "^4.3.2", "p-queue": "^6.6.2", "p-retry": "4", "uuid": "^9.0.0" @@ -15323,9 +15105,9 @@ } }, "node_modules/@urql/core": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@urql/core/-/core-5.0.4.tgz", - "integrity": "sha512-gl86J6B6gWXvvkx5omZ+CaGiPQ0chCUGM0jBsm0zTtkDQPRqufv0NSUN6sp2JhGGtTOB0NR6Pd+w7XAVGGyUOA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@urql/core/-/core-5.0.5.tgz", + "integrity": "sha512-KmWRlN8dJz+XU21wmhcHcTV11n1K7zxaMtVwOhkH7b8H5Z5nuFKY5EkUsWqPlZl53YPiKwTtOMpptz5hamVVNQ==", "dependencies": { "@0no-co/graphql.web": "^1.0.5", "wonka": "^6.3.2" @@ -15770,19 +15552,22 @@ } }, "node_modules/@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.2.tgz", + "integrity": "sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==", + "dependencies": { + "tslib": "^2.6.3" + }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/fetch": { - "version": "0.9.18", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.18.tgz", - "integrity": "sha512-hqoz6StCW+AjV/3N+vg0s1ah82ptdVUb9nH2ttj3UbySOXUvytWw2yqy8c1cKzyRk6mDD00G47qS3fZI9/gMjg==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.19.tgz", + "integrity": "sha512-J+zopRcUVOhkiQYlHpxOEZuOgZtqW9xMaNQFDjESm9vRcyATms+E2/p2mZiVQGllPqWflkA3SzoJC1MxV4Pf9g==", "dependencies": { - "@whatwg-node/node-fetch": "^0.5.7", + "@whatwg-node/node-fetch": "^0.5.16", "urlpattern-polyfill": "^10.0.0" }, "engines": { @@ -15790,27 +15575,26 @@ } }, "node_modules/@whatwg-node/node-fetch": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.11.tgz", - "integrity": "sha512-LS8tSomZa3YHnntpWt3PP43iFEEl6YeIsvDakczHBKlay5LdkXFr8w7v8H6akpG5nRrzydyB0k1iE2eoL6aKIQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.19.tgz", + "integrity": "sha512-HSR/d2jGFuI2pcoQr7M92AjB9V7C8k8bFQ4NjJK9fwHyl1DyDnQYe+t1ygD84rCGNV8CIl1+OO5OamnvFzbqDw==", "dependencies": { "@kamilkisiela/fast-url-parser": "^1.1.4", - "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "tslib": "^2.3.1" + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@whatwg-node/server": { - "version": "0.9.36", - "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.36.tgz", - "integrity": "sha512-KT9qKLmbuWSuFv0Vg4JyK2vN2+vSuQPeEa25xpndYFROAIZntYe7e2BlWAk9l7IrgnV+M4bCVhjrAwwRsaCeiA==", + "version": "0.9.45", + "resolved": "https://registry.npmjs.org/@whatwg-node/server/-/server-0.9.45.tgz", + "integrity": "sha512-FBDf8aeKZSwFyASKTFIAcNfZPV7jczVItfwimcGFai9pXUMLJC3efjkNMh1HqKzM4sUUkocX8p0kaFzlkqrt1Q==", "dependencies": { - "@whatwg-node/fetch": "^0.9.17", - "tslib": "^2.3.1" + "@whatwg-node/fetch": "^0.9.19", + "tslib": "^2.6.3" }, "engines": { "node": ">=16.0.0" @@ -22644,6 +22428,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==", + "deprecated": "Package is no longer maintained", "optional": true, "peer": true, "dependencies": { @@ -22765,18 +22550,18 @@ } }, "node_modules/graphql-yoga": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.1.tgz", - "integrity": "sha512-eYWxCLP/qykU/zrmuMtGTZW9J2FTRZzGfaJuYieV3ATbZCfUr2se7OtsK6cm1k3QJQwx9ty87q1GjpxjBOdR3Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/graphql-yoga/-/graphql-yoga-5.6.2.tgz", + "integrity": "sha512-HvbLrijZ/dolo8PFjM3Qjs9jUdRUjnQWtoJT3vGRW5IXo2tpqfXBSJrOpyMgApPJmw0hpIpF3uS5RplmNB0YdQ==", "dependencies": { - "@envelop/core": "^5.0.0", - "@graphql-tools/executor": "^1.2.5", - "@graphql-tools/schema": "^10.0.0", - "@graphql-tools/utils": "^10.1.0", + "@envelop/core": "^5.0.1", + "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/schema": "^10.0.4", + "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "^2.0.0", "@graphql-yoga/subscription": "^5.0.1", - "@whatwg-node/fetch": "^0.9.17", - "@whatwg-node/server": "^0.9.36", + "@whatwg-node/fetch": "^0.9.18", + "@whatwg-node/server": "^0.9.41", "dset": "^3.1.1", "lru-cache": "^10.0.0", "tslib": "^2.5.2" @@ -28395,11 +28180,6 @@ "integrity": "sha512-qkTuvgEzYdyhiJBx42YPzPo71R1aEr0z79kAv7Ixg8wPFEjgRgJdUsGMG3Hf3OYSF/kHI79XhNlt+5Ar6OzwxQ==", "dev": true }, - "node_modules/lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==" - }, "node_modules/lodash.some": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", @@ -31846,16 +31626,16 @@ } }, "node_modules/pino": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/pino/-/pino-9.3.1.tgz", - "integrity": "sha512-afSfrq/hUiW/MFmQcLEwV9Zh8Ry6MrMTOyBU53o/fc0gEl+1OZ/Fks/xQCM2nOC0C/OfDtQMnT2d8c3kpcfSzA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-9.3.2.tgz", + "integrity": "sha512-WtARBjgZ7LNEkrGWxMBN/jvlFiE17LTbBoH0konmBU684Kd0uIiDwBXlcTCW7iJnA6HfIKwUssS/2AC6cDEanw==", "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^1.2.0", "pino-std-serializers": "^7.0.0", - "process-warning": "^3.0.0", + "process-warning": "^4.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", @@ -31891,9 +31671,9 @@ } }, "node_modules/pino-pretty": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.1.tgz", - "integrity": "sha512-O05NuD9tkRasFRWVaF/uHLOvoRDFD7tb5VMertr78rbsYFjYp48Vg3477EshVAF5eZaEw+OpDl/tu+B0R5o+7g==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz", + "integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==", "dependencies": { "colorette": "^2.0.7", "dateformat": "^4.6.3", @@ -32881,9 +32661,9 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/process-warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", - "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.0.tgz", + "integrity": "sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw==" }, "node_modules/progress": { "version": "2.0.3", diff --git a/package.json b/package.json index 77e819e0..ce902e95 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,10 @@ "@aws-sdk/client-s3": "^3.410.0", "@aws-sdk/s3-request-presigner": "^3.410.0", "@casl/ability": "^6.5.0", - "@copilotkit/react-core": "^1.0.9", - "@copilotkit/react-textarea": "^1.0.9", - "@copilotkit/react-ui": "^1.0.9", - "@copilotkit/runtime": "^1.0.9", + "@copilotkit/react-core": "1.1.0", + "@copilotkit/react-textarea": "1.1.0", + "@copilotkit/react-ui": "1.1.0", + "@copilotkit/runtime": "1.1.0", "@hookform/resolvers": "^3.3.4", "@mantine/core": "^5.10.5", "@mantine/dates": "^5.10.5",