From 062d3171b6e8884e45034aa64ad10f403484e0e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 08:00:08 +0000 Subject: [PATCH 1/5] Initial plan From 4ec6b65103fcc4cc9517adbfc41a7aa7f4bd50c1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 08:16:40 +0000 Subject: [PATCH 2/5] feat: add @copilotkit/web-chat package with web component wrappers for CopilotChat, CopilotPopup, and CopilotSidebar Agent-Logs-Url: https://github.com/ASISaga/CopilotKit/sessions/89d8131b-260f-44bf-8bee-749ada362e7b Co-authored-by: ASISaga <10753247+ASISaga@users.noreply.github.com> --- packages/web-chat/package.json | 49 ++ packages/web-chat/src/CopilotChatElement.ts | 77 +++ packages/web-chat/src/CopilotPopupElement.ts | 99 ++++ .../web-chat/src/CopilotSidebarElement.ts | 99 ++++ .../src/__mocks__/@copilotkit/react-core.ts | 1 + .../src/__mocks__/@copilotkit/react-ui.ts | 3 + .../web-chat/src/__tests__/web-chat.spec.ts | 134 +++++ packages/web-chat/src/index.ts | 3 + packages/web-chat/tsconfig.json | 16 + packages/web-chat/tsdown.config.ts | 50 ++ packages/web-chat/vitest.config.ts | 22 + pnpm-lock.yaml | 518 ++++++++++-------- 12 files changed, 850 insertions(+), 221 deletions(-) create mode 100644 packages/web-chat/package.json create mode 100644 packages/web-chat/src/CopilotChatElement.ts create mode 100644 packages/web-chat/src/CopilotPopupElement.ts create mode 100644 packages/web-chat/src/CopilotSidebarElement.ts create mode 100644 packages/web-chat/src/__mocks__/@copilotkit/react-core.ts create mode 100644 packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts create mode 100644 packages/web-chat/src/__tests__/web-chat.spec.ts create mode 100644 packages/web-chat/src/index.ts create mode 100644 packages/web-chat/tsconfig.json create mode 100644 packages/web-chat/tsdown.config.ts create mode 100644 packages/web-chat/vitest.config.ts diff --git a/packages/web-chat/package.json b/packages/web-chat/package.json new file mode 100644 index 00000000000..44e09689278 --- /dev/null +++ b/packages/web-chat/package.json @@ -0,0 +1,49 @@ +{ + "name": "@copilotkit/web-chat", + "version": "1.55.0-next.8", + "description": "Web components for CopilotKit chat (cpk-chat, cpk-popup, cpk-sidebar)", + "type": "module", + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "unpkg": "./dist/index.umd.js", + "jsdelivr": "./dist/index.umd.js", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + }, + "./package.json": "./package.json" + }, + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "tsdown && node ../../scripts/copy-dts.mjs", + "dev": "tsdown --watch", + "check-types": "tsc --noEmit", + "test": "vitest run", + "publint": "publint .", + "attw": "attw --pack . --profile node16" + }, + "peerDependencies": { + "react": "^18 || ^19 || ^19.0.0-rc", + "react-dom": "^18 || ^19 || ^19.0.0-rc" + }, + "dependencies": { + "@copilotkit/react-core": "workspace:*", + "@copilotkit/react-ui": "workspace:*" + }, + "devDependencies": { + "@copilotkit/typescript-config": "workspace:*", + "@types/node": "^22.15.3", + "@types/react": "^19.1.0", + "@types/react-dom": "^19.0.2", + "tsdown": "^0.20.3", + "typescript": "5.8.2", + "vitest": "^3.0.5" + }, + "engines": { + "node": ">=18" + } +} diff --git a/packages/web-chat/src/CopilotChatElement.ts b/packages/web-chat/src/CopilotChatElement.ts new file mode 100644 index 00000000000..3f38d64d34e --- /dev/null +++ b/packages/web-chat/src/CopilotChatElement.ts @@ -0,0 +1,77 @@ +import React from "react"; +import { createRoot, Root } from "react-dom/client"; +import { CopilotKit } from "@copilotkit/react-core"; +import { CopilotChat } from "@copilotkit/react-ui"; + +export const COPILOT_CHAT_TAG = "cpk-chat"; + +/** + * `` — a web component that renders the CopilotKit chat panel. + * + * Attributes: + * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) + * - `public-api-key` — Copilot Cloud public API key + * - `agent` — agent name to connect to + * - `instructions` — system-level instructions for the assistant + * + * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) + * in your application to apply the default CopilotKit styles. + * + * @example + * ```html + * + * ``` + */ +export class CopilotChatElement extends HTMLElement { + private _root: Root | null = null; + private _container: HTMLDivElement | null = null; + + static get observedAttributes(): string[] { + return ["runtime-url", "public-api-key", "agent", "instructions"]; + } + + connectedCallback(): void { + if (!this._container) { + this._container = document.createElement("div"); + this._container.style.cssText = "display:contents"; + } + this.appendChild(this._container); + this._render(); + } + + disconnectedCallback(): void { + this._root?.unmount(); + this._root = null; + } + + attributeChangedCallback(): void { + if (this._root) { + this._render(); + } + } + + private _render(): void { + if (!this._container) return; + + if (!this._root) { + this._root = createRoot(this._container); + } + + const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; + const publicApiKey = this.getAttribute("public-api-key") ?? undefined; + const agent = this.getAttribute("agent") ?? undefined; + const instructions = this.getAttribute("instructions") ?? undefined; + + this._root.render( + React.createElement( + CopilotKit, + { runtimeUrl, publicApiKey, agent }, + React.createElement(CopilotChat, { instructions }), + ), + ); + } +} + +if (typeof customElements !== "undefined" && !customElements.get(COPILOT_CHAT_TAG)) { + customElements.define(COPILOT_CHAT_TAG, CopilotChatElement); +} diff --git a/packages/web-chat/src/CopilotPopupElement.ts b/packages/web-chat/src/CopilotPopupElement.ts new file mode 100644 index 00000000000..4458627835e --- /dev/null +++ b/packages/web-chat/src/CopilotPopupElement.ts @@ -0,0 +1,99 @@ +import React from "react"; +import { createRoot, Root } from "react-dom/client"; +import { CopilotKit } from "@copilotkit/react-core"; +import { CopilotPopup } from "@copilotkit/react-ui"; + +export const COPILOT_POPUP_TAG = "cpk-popup"; + +/** + * `` — a web component that renders the CopilotKit chat popup button. + * + * Clicking the button opens a floating chat window. This is the web component + * equivalent of `` from `@copilotkit/react-ui`. + * + * Attributes: + * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) + * - `public-api-key` — Copilot Cloud public API key + * - `agent` — agent name to connect to + * - `instructions` — system-level instructions for the assistant + * - `title` — chat window title label + * - `initial-message`— initial greeting message + * - `default-open` — open the chat window on load (presence of the attribute is truthy) + * + * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) + * in your application to apply the default CopilotKit styles. + * + * @example + * ```html + * + * ``` + */ +export class CopilotPopupElement extends HTMLElement { + private _root: Root | null = null; + private _container: HTMLDivElement | null = null; + + static get observedAttributes(): string[] { + return [ + "runtime-url", + "public-api-key", + "agent", + "instructions", + "title", + "initial-message", + "default-open", + ]; + } + + connectedCallback(): void { + if (!this._container) { + this._container = document.createElement("div"); + this._container.style.cssText = "display:contents"; + } + this.appendChild(this._container); + this._render(); + } + + disconnectedCallback(): void { + this._root?.unmount(); + this._root = null; + } + + attributeChangedCallback(): void { + if (this._root) { + this._render(); + } + } + + private _render(): void { + if (!this._container) return; + + if (!this._root) { + this._root = createRoot(this._container); + } + + const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; + const publicApiKey = this.getAttribute("public-api-key") ?? undefined; + const agent = this.getAttribute("agent") ?? undefined; + const instructions = this.getAttribute("instructions") ?? undefined; + const title = this.getAttribute("title") ?? undefined; + const initialMessage = this.getAttribute("initial-message") ?? undefined; + const defaultOpen = this.hasAttribute("default-open"); + + const labels = + title !== undefined || initialMessage !== undefined + ? { title, initial: initialMessage } + : undefined; + + this._root.render( + React.createElement( + CopilotKit, + { runtimeUrl, publicApiKey, agent }, + React.createElement(CopilotPopup, { instructions, labels, defaultOpen }), + ), + ); + } +} + +if (typeof customElements !== "undefined" && !customElements.get(COPILOT_POPUP_TAG)) { + customElements.define(COPILOT_POPUP_TAG, CopilotPopupElement); +} diff --git a/packages/web-chat/src/CopilotSidebarElement.ts b/packages/web-chat/src/CopilotSidebarElement.ts new file mode 100644 index 00000000000..e494771e6fc --- /dev/null +++ b/packages/web-chat/src/CopilotSidebarElement.ts @@ -0,0 +1,99 @@ +import React from "react"; +import { createRoot, Root } from "react-dom/client"; +import { CopilotKit } from "@copilotkit/react-core"; +import { CopilotSidebar } from "@copilotkit/react-ui"; + +export const COPILOT_SIDEBAR_TAG = "cpk-sidebar"; + +/** + * `` — a web component that renders the CopilotKit chat sidebar. + * + * The sidebar pushes page content to the side when open. This is the web component + * equivalent of `` from `@copilotkit/react-ui`. + * + * Attributes: + * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) + * - `public-api-key` — Copilot Cloud public API key + * - `agent` — agent name to connect to + * - `instructions` — system-level instructions for the assistant + * - `title` — chat window title label + * - `initial-message`— initial greeting message + * - `default-open` — open the sidebar on load (presence of the attribute is truthy) + * + * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) + * in your application to apply the default CopilotKit styles. + * + * @example + * ```html + * + * ``` + */ +export class CopilotSidebarElement extends HTMLElement { + private _root: Root | null = null; + private _container: HTMLDivElement | null = null; + + static get observedAttributes(): string[] { + return [ + "runtime-url", + "public-api-key", + "agent", + "instructions", + "title", + "initial-message", + "default-open", + ]; + } + + connectedCallback(): void { + if (!this._container) { + this._container = document.createElement("div"); + this._container.style.cssText = "display:contents"; + } + this.appendChild(this._container); + this._render(); + } + + disconnectedCallback(): void { + this._root?.unmount(); + this._root = null; + } + + attributeChangedCallback(): void { + if (this._root) { + this._render(); + } + } + + private _render(): void { + if (!this._container) return; + + if (!this._root) { + this._root = createRoot(this._container); + } + + const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; + const publicApiKey = this.getAttribute("public-api-key") ?? undefined; + const agent = this.getAttribute("agent") ?? undefined; + const instructions = this.getAttribute("instructions") ?? undefined; + const title = this.getAttribute("title") ?? undefined; + const initialMessage = this.getAttribute("initial-message") ?? undefined; + const defaultOpen = this.hasAttribute("default-open"); + + const labels = + title !== undefined || initialMessage !== undefined + ? { title, initial: initialMessage } + : undefined; + + this._root.render( + React.createElement( + CopilotKit, + { runtimeUrl, publicApiKey, agent }, + React.createElement(CopilotSidebar, { instructions, labels, defaultOpen }), + ), + ); + } +} + +if (typeof customElements !== "undefined" && !customElements.get(COPILOT_SIDEBAR_TAG)) { + customElements.define(COPILOT_SIDEBAR_TAG, CopilotSidebarElement); +} diff --git a/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts b/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts new file mode 100644 index 00000000000..d8912493610 --- /dev/null +++ b/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts @@ -0,0 +1 @@ +export const CopilotKit = "CopilotKit"; diff --git a/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts b/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts new file mode 100644 index 00000000000..30de06a860c --- /dev/null +++ b/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts @@ -0,0 +1,3 @@ +export const CopilotChat = "CopilotChat"; +export const CopilotPopup = "CopilotPopup"; +export const CopilotSidebar = "CopilotSidebar"; diff --git a/packages/web-chat/src/__tests__/web-chat.spec.ts b/packages/web-chat/src/__tests__/web-chat.spec.ts new file mode 100644 index 00000000000..223e20b0f13 --- /dev/null +++ b/packages/web-chat/src/__tests__/web-chat.spec.ts @@ -0,0 +1,134 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { + CopilotChatElement, + CopilotPopupElement, + CopilotSidebarElement, + COPILOT_CHAT_TAG, + COPILOT_POPUP_TAG, + COPILOT_SIDEBAR_TAG, +} from "../index"; + +// Mock react-dom/client so we don't need an actual React environment +vi.mock("react-dom/client", () => ({ + createRoot: vi.fn(() => ({ + render: vi.fn(), + unmount: vi.fn(), + })), +})); + +vi.mock("react", () => ({ + default: { + createElement: vi.fn(() => ({})), + }, + createElement: vi.fn(() => ({})), +})); + +describe("Web component tag names", () => { + it("exports the correct tag name for cpk-chat", () => { + expect(COPILOT_CHAT_TAG).toBe("cpk-chat"); + }); + + it("exports the correct tag name for cpk-popup", () => { + expect(COPILOT_POPUP_TAG).toBe("cpk-popup"); + }); + + it("exports the correct tag name for cpk-sidebar", () => { + expect(COPILOT_SIDEBAR_TAG).toBe("cpk-sidebar"); + }); +}); + +describe("CopilotChatElement", () => { + let element: CopilotChatElement; + + beforeEach(() => { + element = new CopilotChatElement(); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it("is registered as a custom element", () => { + expect(customElements.get(COPILOT_CHAT_TAG)).toBe(CopilotChatElement); + }); + + it("observes the expected attributes", () => { + expect(CopilotChatElement.observedAttributes).toEqual([ + "runtime-url", + "public-api-key", + "agent", + "instructions", + ]); + }); + + it("mounts and unmounts without errors", () => { + document.body.appendChild(element); + expect(() => document.body.removeChild(element)).not.toThrow(); + }); +}); + +describe("CopilotPopupElement", () => { + let element: CopilotPopupElement; + + beforeEach(() => { + element = new CopilotPopupElement(); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it("is registered as a custom element", () => { + expect(customElements.get(COPILOT_POPUP_TAG)).toBe(CopilotPopupElement); + }); + + it("observes the expected attributes", () => { + expect(CopilotPopupElement.observedAttributes).toEqual([ + "runtime-url", + "public-api-key", + "agent", + "instructions", + "title", + "initial-message", + "default-open", + ]); + }); + + it("mounts and unmounts without errors", () => { + document.body.appendChild(element); + expect(() => document.body.removeChild(element)).not.toThrow(); + }); +}); + +describe("CopilotSidebarElement", () => { + let element: CopilotSidebarElement; + + beforeEach(() => { + element = new CopilotSidebarElement(); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it("is registered as a custom element", () => { + expect(customElements.get(COPILOT_SIDEBAR_TAG)).toBe(CopilotSidebarElement); + }); + + it("observes the expected attributes", () => { + expect(CopilotSidebarElement.observedAttributes).toEqual([ + "runtime-url", + "public-api-key", + "agent", + "instructions", + "title", + "initial-message", + "default-open", + ]); + }); + + it("mounts and unmounts without errors", () => { + document.body.appendChild(element); + expect(() => document.body.removeChild(element)).not.toThrow(); + }); +}); diff --git a/packages/web-chat/src/index.ts b/packages/web-chat/src/index.ts new file mode 100644 index 00000000000..5827965ed47 --- /dev/null +++ b/packages/web-chat/src/index.ts @@ -0,0 +1,3 @@ +export { CopilotChatElement, COPILOT_CHAT_TAG } from "./CopilotChatElement"; +export { CopilotPopupElement, COPILOT_POPUP_TAG } from "./CopilotPopupElement"; +export { CopilotSidebarElement, COPILOT_SIDEBAR_TAG } from "./CopilotSidebarElement"; diff --git a/packages/web-chat/tsconfig.json b/packages/web-chat/tsconfig.json new file mode 100644 index 00000000000..8ffaa8e010a --- /dev/null +++ b/packages/web-chat/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@copilotkit/typescript-config/base.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "jsx": "react-jsx", + "lib": ["dom", "ES2022"], + "module": "ESNext", + "moduleResolution": "bundler" + }, + "include": ["src/**/*"], + "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/web-chat/tsdown.config.ts b/packages/web-chat/tsdown.config.ts new file mode 100644 index 00000000000..b5dbee19bc2 --- /dev/null +++ b/packages/web-chat/tsdown.config.ts @@ -0,0 +1,50 @@ +import { defineConfig } from "tsdown"; + +export default defineConfig([ + { + entry: ["src/index.ts"], + format: ["esm", "cjs"], + dts: true, + sourcemap: true, + target: "es2022", + outDir: "dist", + external: [ + "react", + "react-dom", + "react-dom/client", + "react/jsx-runtime", + "@copilotkit/react-core", + "@copilotkit/react-ui", + ], + exports: true, + }, + { + entry: ["src/index.ts"], + format: ["umd"], + globalName: "CopilotKitWebChat", + sourcemap: true, + target: "es2018", + outDir: "dist", + external: [ + "react", + "react-dom", + "react-dom/client", + "react/jsx-runtime", + "@copilotkit/react-core", + "@copilotkit/react-ui", + ], + codeSplitting: false, + outputOptions(options) { + options.entryFileNames = "[name].umd.js"; + options.globals = { + react: "React", + "react-dom": "ReactDOM", + "react-dom/client": "ReactDOMClient", + "react/jsx-runtime": "ReactJsxRuntime", + "@copilotkit/react-core": "CopilotKitReactCore", + "@copilotkit/react-ui": "CopilotKitReactUI", + }; + return options; + }, + }, +]); diff --git a/packages/web-chat/vitest.config.ts b/packages/web-chat/vitest.config.ts new file mode 100644 index 00000000000..bc00647505e --- /dev/null +++ b/packages/web-chat/vitest.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + environment: "jsdom", + globals: true, + reporters: [["default", { summary: false }]], + silent: true, + }, + resolve: { + alias: { + "@copilotkit/react-core": new URL( + "./src/__mocks__/@copilotkit/react-core.ts", + import.meta.url, + ).pathname, + "@copilotkit/react-ui": new URL( + "./src/__mocks__/@copilotkit/react-ui.ts", + import.meta.url, + ).pathname, + }, + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b49b4f2d688..4561dbfd443 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1193,10 +1193,10 @@ importers: version: 7.13.2(react-router@7.13.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.7.3) '@tanstack/ai': specifier: latest - version: 0.9.2 + version: 0.10.0 '@tanstack/ai-openai': specifier: latest - version: 0.7.2(@tanstack/ai-client@0.7.5)(@tanstack/ai@0.9.2)(ws@8.19.0)(zod@3.25.76) + version: 0.7.3(@tanstack/ai-client@0.7.5)(@tanstack/ai@0.10.0)(ws@8.19.0)(zod@3.25.76) hono: specifier: ^4.11.4 version: 4.11.4 @@ -1336,7 +1336,7 @@ importers: dependencies: '@storybook/nextjs': specifier: ^10.1.10 - version: 10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(next@15.4.10(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(@playwright/test@1.57.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(type-fest@4.41.0)(typescript@5.8.2)(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + version: 10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(next@15.4.10(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(@playwright/test@1.57.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(type-fest@4.41.0)(typescript@5.8.2)(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) '@storybook/react': specifier: ^10.1.10 version: 10.1.11(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.2) @@ -1594,7 +1594,7 @@ importers: version: 3.17.0 axios: specifier: ^1.7.8 - version: 1.13.2 + version: 1.13.2(debug@4.4.3) chalk: specifier: ^5.3.0 version: 5.6.2 @@ -2587,6 +2587,43 @@ importers: specifier: ^3.0.5 version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.11)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) + packages/web-chat: + dependencies: + '@copilotkit/react-core': + specifier: workspace:* + version: link:../react-core + '@copilotkit/react-ui': + specifier: workspace:* + version: link:../react-ui + react: + specifier: 19.1.0 + version: 19.1.0 + react-dom: + specifier: 19.1.0 + version: 19.1.0(react@19.1.0) + devDependencies: + '@copilotkit/typescript-config': + specifier: workspace:* + version: link:../typescript-config + '@types/node': + specifier: ^22.15.3 + version: 22.19.11 + '@types/react': + specifier: ^19.1.0 + version: 19.2.7 + '@types/react-dom': + specifier: ^19.0.2 + version: 19.2.3(@types/react@19.2.7) + tsdown: + specifier: ^0.20.3 + version: 0.20.3(@arethetypeswrong/core@0.18.2)(publint@0.3.17)(synckit@0.11.12)(typescript@5.8.2) + typescript: + specifier: 5.8.2 + version: 5.8.2 + vitest: + specifier: ^3.0.5 + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.11)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) + packages/web-inspector: dependencies: '@ag-ui/client': @@ -10271,13 +10308,22 @@ packages: peerDependencies: '@tanstack/ai': 0.9.2 - '@tanstack/ai-openai@0.7.2': - resolution: {integrity: sha512-vFNhta3sDs0HSmOgPytCslw3PBS6WpdLZdItENNKTTE7GD/lNE8a9hiJEHdQHoV8ek3jgv5XgEzRgzwjaALSjg==} + '@tanstack/ai-event-client@0.2.0': + resolution: {integrity: sha512-1O7PbBlSo0gCrv4/bmOvnemZ6Cvf+kZmHqug19JEz8Bj4/anup3GkwvKBk8XzEvPIB+vQb4GL9TLN4Tfo6ZCkA==} + peerDependencies: + '@tanstack/ai': 0.10.0 + + '@tanstack/ai-openai@0.7.3': + resolution: {integrity: sha512-xdxTR7E/BzeQcFte/chDA//2WpZQqDQF4op1TgKNoaTqffW9+JMlSubaZbMkawtJoImVCGjZoPVkUfb8aRldNA==} peerDependencies: - '@tanstack/ai': ^0.9.1 - '@tanstack/ai-client': ^0.7.4 + '@tanstack/ai': ^0.10.0 + '@tanstack/ai-client': ^0.7.7 zod: ^4.0.0 + '@tanstack/ai@0.10.0': + resolution: {integrity: sha512-b1GDenJs2udQfjFMnAWZ6WX9RLg04O9wC85V4cSD8phuVMJscs+Qp0UkNj7FTc+V1ggqf4Pz1jLFfqjLO2z3mg==} + engines: {node: '>=18'} + '@tanstack/ai@0.9.2': resolution: {integrity: sha512-4Uz310m7vZPyPzJpxjWZXGo2hCtO1X1WbaexYGrxkRxyj2iXZuVFL02rDE7r5y3/v0NRjM+AimLne4cHTkWDHg==} engines: {node: '>=18'} @@ -21723,7 +21769,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.20(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@angular-devkit/core': 19.2.20(chokidar@4.0.3) '@angular/build': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(@angular/compiler@19.2.18)(@types/node@22.19.11)(chokidar@4.0.3)(jiti@2.6.1)(less@4.2.2)(lightningcss@1.32.0)(ng-packagr@19.2.2(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(tailwindcss@4.1.18)(tslib@2.8.1)(typescript@5.8.2))(postcss@8.5.2)(tailwindcss@4.1.18)(terser@5.39.0)(tsx@4.21.0)(typescript@5.8.2)(yaml@2.8.2) '@angular/compiler-cli': 19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2) @@ -21737,14 +21783,14 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.10) '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.3.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) browserslist: 4.28.1 - copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) esbuild-wasm: 0.25.4 fast-glob: 3.3.3 http-proxy-middleware: 3.0.5 @@ -21752,30 +21798,30 @@ snapshots: jsonc-parser: 3.3.1 karma-source-map-support: 1.4.0 less: 4.2.2 - less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) loader-utils: 3.3.1 - mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) open: 10.1.0 ora: 5.4.1 picomatch: 4.0.2 piscina: 4.8.0 postcss: 8.5.2 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) resolve-url-loader: 5.0.0 rxjs: 7.8.1 sass: 1.85.0 - sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) semver: 7.7.1 - source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) source-map-support: 0.5.21 terser: 5.39.0 tree-kill: 1.2.2 tslib: 2.8.1 typescript: 5.8.2 - webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4) + webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.5(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) optionalDependencies: @@ -21811,7 +21857,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.20(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@angular-devkit/core': 19.2.20(chokidar@4.0.3) '@angular/build': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(@angular/compiler@19.2.18)(@types/node@22.19.11)(chokidar@4.0.3)(jiti@2.6.1)(less@4.2.2)(lightningcss@1.32.0)(ng-packagr@19.2.2(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(tailwindcss@4.2.2)(tslib@2.8.1)(typescript@5.8.2))(postcss@8.5.2)(tailwindcss@4.2.2)(terser@5.39.0)(tsx@4.21.0)(typescript@5.8.2)(yaml@2.8.2) '@angular/compiler-cli': 19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2) @@ -21825,14 +21871,14 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.10) '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.4.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.2.2)(lightningcss@1.32.0)(sass@1.85.0)(terser@5.39.0)(tsx@4.21.0)(yaml@2.8.2)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) browserslist: 4.28.1 - copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) esbuild-wasm: 0.25.4 fast-glob: 3.3.3 http-proxy-middleware: 3.0.5 @@ -21840,30 +21886,30 @@ snapshots: jsonc-parser: 3.3.1 karma-source-map-support: 1.4.0 less: 4.2.2 - less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) loader-utils: 3.3.1 - mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) open: 10.1.0 ora: 5.4.1 picomatch: 4.0.2 piscina: 4.8.0 postcss: 8.5.2 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) resolve-url-loader: 5.0.0 rxjs: 7.8.1 sass: 1.85.0 - sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) semver: 7.7.1 - source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) source-map-support: 0.5.21 terser: 5.39.0 tree-kill: 1.2.2 tslib: 2.8.1 typescript: 5.8.2 webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.5(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) optionalDependencies: @@ -21898,7 +21944,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.20(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@angular-devkit/build-webpack': 0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@angular-devkit/core': 19.2.20(chokidar@4.0.3) '@angular/build': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(@angular/compiler@19.2.18)(@types/node@22.19.3)(chokidar@4.0.3)(jiti@2.6.1)(less@4.2.2)(lightningcss@1.32.0)(ng-packagr@19.2.2(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(tailwindcss@4.1.18)(tslib@2.8.1)(typescript@5.8.2))(postcss@8.5.2)(tailwindcss@4.1.18)(terser@5.39.0)(tsx@4.21.0)(typescript@5.8.2)(yaml@2.8.2) '@angular/compiler-cli': 19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2) @@ -21912,14 +21958,14 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.10) '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@ngtools/webpack': 19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) browserslist: 4.28.1 - copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + copy-webpack-plugin: 12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + css-loader: 7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) esbuild-wasm: 0.25.4 fast-glob: 3.3.3 http-proxy-middleware: 3.0.5 @@ -21927,30 +21973,30 @@ snapshots: jsonc-parser: 3.3.1 karma-source-map-support: 1.4.0 less: 4.2.2 - less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + less-loader: 12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + license-webpack-plugin: 4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) loader-utils: 3.3.1 - mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + mini-css-extract-plugin: 2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) open: 10.1.0 ora: 5.4.1 picomatch: 4.0.2 piscina: 4.8.0 postcss: 8.5.2 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) resolve-url-loader: 5.0.0 rxjs: 7.8.1 sass: 1.85.0 - sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + sass-loader: 16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) semver: 7.7.1 - source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + source-map-loader: 5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) source-map-support: 0.5.21 terser: 5.39.0 tree-kill: 1.2.2 tslib: 2.8.1 typescript: 5.8.2 - webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) - webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4) + webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.5(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) optionalDependencies: @@ -21981,12 +22027,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': + '@angular-devkit/build-webpack@0.1902.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4))': dependencies: '@angular-devkit/architect': 0.1902.20(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) transitivePeerDependencies: - chokidar @@ -23444,7 +23490,7 @@ snapshots: '@babel/traverse': 7.28.5 '@babel/types': 7.28.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -23464,7 +23510,7 @@ snapshots: '@babel/traverse': 7.28.5 '@babel/types': 7.28.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -23484,7 +23530,7 @@ snapshots: '@babel/types': 7.28.5 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -23577,7 +23623,7 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.11 transitivePeerDependencies: @@ -23588,7 +23634,7 @@ snapshots: '@babel/core': 7.28.5 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.11 transitivePeerDependencies: @@ -24897,7 +24943,7 @@ snapshots: '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/types': 7.28.5 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -24983,7 +25029,7 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.7.3 + semver: 7.7.4 '@changesets/assemble-release-plan@6.0.9(patch_hash=1bc53c741da20baad9cdeb674c599225dcf9fe6aa7b0de16ff87e63f12a97b24)': dependencies: @@ -24992,7 +25038,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 - semver: 7.7.3 + semver: 7.7.4 '@changesets/changelog-git@0.2.1': dependencies: @@ -25050,7 +25096,7 @@ snapshots: '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 picocolors: 1.1.1 - semver: 7.7.3 + semver: 7.7.4 '@changesets/get-release-plan@4.0.14': dependencies: @@ -25192,7 +25238,7 @@ snapshots: '@commitlint/is-ignored@20.3.1': dependencies: '@commitlint/types': 20.3.1 - semver: 7.7.3 + semver: 7.7.4 '@commitlint/lint@20.3.1': dependencies: @@ -25806,7 +25852,7 @@ snapshots: '@eslint/config-array@0.21.1': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -25822,7 +25868,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -25836,7 +25882,7 @@ snapshots: '@eslint/eslintrc@3.3.3': dependencies: ajv: 6.12.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -26363,7 +26409,7 @@ snapshots: '@types/js-yaml': 4.0.9 '@whatwg-node/fetch': 0.10.13 chalk: 4.1.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) dotenv: 16.6.1 graphql: 16.12.0 graphql-request: 6.1.0(encoding@0.1.13)(graphql@16.12.0) @@ -26569,7 +26615,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -27893,7 +27939,7 @@ snapshots: hono: 4.11.4 langsmith: 0.4.12(@opentelemetry/api@1.9.0)(openai@6.24.0(ws@8.19.0)(zod@3.25.76)) open: 10.2.0 - semver: 7.7.3 + semver: 7.7.4 stacktrace-parser: 0.1.11 superjson: 2.2.6 tsx: 4.21.0 @@ -28905,7 +28951,7 @@ snapshots: '@next/swc-win32-x64-msvc@16.0.8': optional: true - '@ngtools/webpack@19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': + '@ngtools/webpack@19.2.20(@angular/compiler-cli@19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2))(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4))': dependencies: '@angular/compiler-cli': 19.2.18(@angular/compiler@19.2.18)(typescript@5.8.2) typescript: 5.8.2 @@ -28939,7 +28985,7 @@ snapshots: '@npmcli/fs@4.0.0': dependencies: - semver: 7.7.3 + semver: 7.7.4 '@npmcli/git@6.0.3': dependencies: @@ -28949,7 +28995,7 @@ snapshots: npm-pick-manifest: 10.0.0 proc-log: 5.0.0 promise-retry: 2.0.1 - semver: 7.7.3 + semver: 7.7.4 which: 5.0.0 '@npmcli/installed-package-contents@3.0.0': @@ -28966,7 +29012,7 @@ snapshots: hosted-git-info: 8.1.0 json-parse-even-better-errors: 4.0.0 proc-log: 5.0.0 - semver: 7.7.3 + semver: 7.7.4 validate-npm-package-license: 3.0.4 '@npmcli/promise-spawn@8.0.3': @@ -29075,7 +29121,7 @@ snapshots: dependencies: '@oclif/core': 4.10.3 ansis: 3.17.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) http-call: 5.3.0 lodash: 4.17.23 registry-auth-token: 5.1.1 @@ -29088,7 +29134,7 @@ snapshots: dependencies: '@oclif/core': 4.10.3 ansis: 3.17.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -29366,7 +29412,7 @@ snapshots: dependencies: playwright: 1.57.0 - '@pmmmwh/react-refresh-webpack-plugin@0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': + '@pmmmwh/react-refresh-webpack-plugin@0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': dependencies: ansi-html: 0.0.9 core-js-pure: 3.47.0 @@ -29379,7 +29425,7 @@ snapshots: webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) optionalDependencies: type-fest: 4.41.0 - webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack-dev-server: 5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) webpack-hot-middleware: 2.26.1 '@pnpm/config.env-replace@1.1.0': {} @@ -29427,11 +29473,11 @@ snapshots: '@puppeteer/browsers@2.3.0': dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) extract-zip: 2.0.1 progress: 2.0.3 proxy-agent: 6.5.0 - semver: 7.7.3 + semver: 7.7.4 tar-fs: 3.1.1 unbzip2-stream: 1.4.3 yargs: 17.7.2 @@ -31841,7 +31887,7 @@ snapshots: magic-string: 0.30.21 path-browserify: 1.0.1 process: 0.11.10 - semver: 7.7.3 + semver: 7.7.4 storybook: 8.6.15(prettier@3.7.4) style-loader: 3.3.4(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)) terser-webpack-plugin: 5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)) @@ -31886,7 +31932,7 @@ snapshots: jsdoc-type-pratt-parser: 4.8.0 process: 0.11.10 recast: 0.23.11 - semver: 7.7.3 + semver: 7.7.4 util: 0.12.5 ws: 8.19.0 optionalDependencies: @@ -31950,7 +31996,7 @@ snapshots: dependencies: storybook: 8.6.15(prettier@3.7.4) - '@storybook/nextjs@10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(next@15.4.10(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(@playwright/test@1.57.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(type-fest@4.41.0)(typescript@5.8.2)(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': + '@storybook/nextjs@10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(next@15.4.10(@babel/core@7.28.5)(@opentelemetry/api@1.9.0)(@playwright/test@1.57.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.97.2)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(type-fest@4.41.0)(typescript@5.8.2)(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.5) @@ -31965,7 +32011,7 @@ snapshots: '@babel/preset-react': 7.28.5(@babel/core@7.28.5) '@babel/preset-typescript': 7.28.5(@babel/core@7.28.5) '@babel/runtime': 7.28.4 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)))(webpack-hot-middleware@2.26.1)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) '@storybook/builder-webpack5': 10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.2)(vite@7.3.1(@types/node@22.19.3)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) '@storybook/preset-react-webpack': 10.1.11(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.2) '@storybook/react': 10.1.11(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(storybook@10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.2) @@ -32022,7 +32068,7 @@ snapshots: react-docgen: 7.1.1 react-dom: 19.1.0(react@19.1.0) resolve: 1.22.11 - semver: 7.7.3 + semver: 7.7.4 storybook: 10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) tsconfig-paths: 4.2.0 webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -32045,7 +32091,7 @@ snapshots: react-docgen: 7.1.1 react-dom: 19.1.0(react@19.1.0) resolve: 1.22.11 - semver: 7.7.3 + semver: 7.7.4 storybook: 10.1.11(@testing-library/dom@10.4.0)(prettier@3.7.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) tsconfig-paths: 4.2.0 webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -32064,7 +32110,7 @@ snapshots: '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.8.2)(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 @@ -32078,7 +32124,7 @@ snapshots: '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.9.2)(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2))': dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 @@ -32453,15 +32499,25 @@ snapshots: '@tanstack/ai': 0.9.2 '@tanstack/devtools-event-client': 0.4.3 - '@tanstack/ai-openai@0.7.2(@tanstack/ai-client@0.7.5)(@tanstack/ai@0.9.2)(ws@8.19.0)(zod@3.25.76)': + '@tanstack/ai-event-client@0.2.0(@tanstack/ai@0.10.0)': dependencies: - '@tanstack/ai': 0.9.2 + '@tanstack/ai': 0.10.0 + '@tanstack/devtools-event-client': 0.4.3 + + '@tanstack/ai-openai@0.7.3(@tanstack/ai-client@0.7.5)(@tanstack/ai@0.10.0)(ws@8.19.0)(zod@3.25.76)': + dependencies: + '@tanstack/ai': 0.10.0 '@tanstack/ai-client': 0.7.5 openai: 6.24.0(ws@8.19.0)(zod@3.25.76) zod: 3.25.76 transitivePeerDependencies: - ws + '@tanstack/ai@0.10.0': + dependencies: + '@tanstack/ai-event-client': 0.2.0(@tanstack/ai@0.10.0) + partial-json: 0.1.7 + '@tanstack/ai@0.9.2': dependencies: '@tanstack/ai-event-client': 0.1.4(@tanstack/ai@0.9.2) @@ -32485,7 +32541,7 @@ snapshots: '@tavily/core@0.3.7': dependencies: - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) https-proxy-agent: 7.0.6 js-tiktoken: 1.0.21 transitivePeerDependencies: @@ -32552,7 +32608,7 @@ snapshots: '@theguild/federation-composition@0.21.1(graphql@16.12.0)': dependencies: constant-case: 3.0.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) graphql: 16.12.0 json5: 2.2.3 lodash.sortby: 4.7.0 @@ -33124,12 +33180,12 @@ snapshots: '@typescript-eslint/type-utils': 7.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) '@typescript-eslint/utils': 7.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) '@typescript-eslint/visitor-keys': 7.2.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - semver: 7.7.3 + semver: 7.7.4 ts-api-utils: 1.4.3(typescript@5.9.2) optionalDependencies: typescript: 5.9.2 @@ -33142,7 +33198,7 @@ snapshots: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.9.2) '@typescript-eslint/visitor-keys': 7.2.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) optionalDependencies: typescript: 5.9.2 @@ -33158,7 +33214,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.9.2) '@typescript-eslint/utils': 7.2.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) ts-api-utils: 1.4.3(typescript@5.9.2) optionalDependencies: @@ -33172,11 +33228,11 @@ snapshots: dependencies: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/visitor-keys': 7.2.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.7.3 + semver: 7.7.4 ts-api-utils: 1.4.3(typescript@5.9.2) optionalDependencies: typescript: 5.9.2 @@ -33192,7 +33248,7 @@ snapshots: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.9.2) eslint: 9.39.2(jiti@2.6.1) - semver: 7.7.3 + semver: 7.7.4 transitivePeerDependencies: - supports-color - typescript @@ -33204,7 +33260,7 @@ snapshots: '@typescript/vfs@1.6.2(typescript@5.9.3)': dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -33318,7 +33374,7 @@ snapshots: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 ast-v8-to-istanbul: 0.3.10 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -33370,14 +33426,6 @@ snapshots: optionalDependencies: vite: 7.3.1(@types/node@18.19.130)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/mocker@3.2.4(vite@7.3.1(@types/node@20.19.27)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))': - dependencies: - '@vitest/spy': 3.2.4 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - vite: 7.3.1(@types/node@20.19.27)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) - '@vitest/mocker@3.2.4(vite@7.3.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 3.2.4 @@ -33462,7 +33510,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@18.19.130)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.11)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/utils@2.0.5': dependencies: @@ -33670,7 +33718,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -34001,15 +34049,7 @@ snapshots: axios@1.10.0: dependencies: - follow-redirects: 1.15.11(debug@4.3.2) - form-data: 4.0.5 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - - axios@1.13.2: - dependencies: - follow-redirects: 1.15.11(debug@4.3.2) + follow-redirects: 1.15.11(debug@4.4.3) form-data: 4.0.5 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -34343,7 +34383,7 @@ snapshots: dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) http-errors: 2.0.1 iconv-lite: 0.7.2 on-finished: 2.4.1 @@ -35052,7 +35092,7 @@ snapshots: dependencies: is-what: 5.5.0 - copy-webpack-plugin@12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + copy-webpack-plugin@12.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: fast-glob: 3.3.3 glob-parent: 6.0.2 @@ -35281,7 +35321,7 @@ snapshots: postcss-modules-scope: 3.2.1(postcss@8.5.6) postcss-modules-values: 4.0.0(postcss@8.5.6) postcss-value-parser: 4.2.0 - semver: 7.7.3 + semver: 7.7.4 optionalDependencies: webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1) @@ -35294,7 +35334,7 @@ snapshots: postcss-modules-scope: 3.2.1(postcss@8.5.6) postcss-modules-values: 4.0.0(postcss@8.5.6) postcss-value-parser: 4.2.0 - semver: 7.7.3 + semver: 7.7.4 optionalDependencies: webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -35324,7 +35364,7 @@ snapshots: optionalDependencies: webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - css-loader@7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + css-loader@7.1.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: icss-utils: 5.1.0(postcss@8.5.6) postcss: 8.5.6 @@ -35574,7 +35614,7 @@ snapshots: chalk: 2.4.2 commander: 2.20.3 core-js: 3.47.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) fast-json-patch: 3.1.1 get-stdin: 6.0.0 http-proxy-agent: 5.0.0 @@ -35817,7 +35857,7 @@ snapshots: detect-port@1.5.1: dependencies: address: 1.2.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -36222,7 +36262,7 @@ snapshots: esbuild-register@3.6.0(esbuild@0.23.1): dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) esbuild: 0.23.1 transitivePeerDependencies: - supports-color @@ -36419,9 +36459,9 @@ snapshots: eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - get-tsconfig: 4.13.0 + get-tsconfig: 4.13.6 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.15 @@ -36548,7 +36588,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -36595,7 +36635,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -36867,7 +36907,7 @@ snapshots: content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 @@ -36904,7 +36944,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -37098,7 +37138,7 @@ snapshots: finalhandler@2.1.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -37186,7 +37226,7 @@ snapshots: follow-redirects@1.15.11(debug@4.4.3): optionalDependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) for-each@0.3.5: dependencies: @@ -37209,7 +37249,7 @@ snapshots: minimatch: 3.1.2 node-abort-controller: 3.1.1 schema-utils: 3.3.0 - semver: 7.7.3 + semver: 7.7.4 tapable: 2.3.0 typescript: 5.8.2 webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1) @@ -37226,7 +37266,7 @@ snapshots: minimatch: 3.1.2 node-abort-controller: 3.1.1 schema-utils: 3.3.0 - semver: 7.7.3 + semver: 7.7.4 tapable: 2.3.0 typescript: 5.8.2 webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -37243,7 +37283,7 @@ snapshots: minimatch: 3.1.2 node-abort-controller: 3.1.1 schema-utils: 3.3.0 - semver: 7.7.3 + semver: 7.7.4 tapable: 2.3.0 typescript: 5.9.2 webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -37481,7 +37521,7 @@ snapshots: dependencies: basic-ftp: 5.1.0 data-uri-to-buffer: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -38148,7 +38188,7 @@ snapshots: http-call@5.3.0: dependencies: content-type: 1.0.5 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) is-retry-allowed: 1.2.0 is-stream: 2.0.1 parse-json: 4.0.0 @@ -38187,21 +38227,21 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color http-proxy-middleware@2.0.9(@types/express@4.17.25): dependencies: '@types/http-proxy': 1.17.17 - http-proxy: 1.18.1 + http-proxy: 1.18.1(debug@4.4.3) is-glob: 4.0.3 is-plain-obj: 3.0.0 micromatch: 4.0.8 @@ -38213,7 +38253,7 @@ snapshots: http-proxy-middleware@3.0.5: dependencies: '@types/http-proxy': 1.17.17 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) http-proxy: 1.18.1(debug@4.4.3) is-glob: 4.0.3 is-plain-object: 5.0.0 @@ -38221,14 +38261,6 @@ snapshots: transitivePeerDependencies: - supports-color - http-proxy@1.18.1: - dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.11(debug@4.3.2) - requires-port: 1.0.0 - transitivePeerDependencies: - - debug - http-proxy@1.18.1(debug@4.4.3): dependencies: eventemitter3: 4.0.7 @@ -38247,14 +38279,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -38281,7 +38313,7 @@ snapshots: '@types/tough-cookie': 4.0.5 axios: 1.13.2(debug@4.4.3) camelcase: 6.3.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) dotenv: 16.6.1 extend: 3.0.2 file-type: 16.5.4 @@ -38289,7 +38321,7 @@ snapshots: isstream: 0.1.2 jsonwebtoken: 9.0.3 mime-types: 2.1.35 - retry-axios: 2.6.0(axios@1.13.2) + retry-axios: 2.6.0(axios@1.13.2(debug@4.4.3)) tough-cookie: 4.1.4 transitivePeerDependencies: - supports-color @@ -38549,7 +38581,7 @@ snapshots: is-bun-module@2.0.0: dependencies: - semver: 7.7.3 + semver: 7.7.4 is-callable@1.2.7: {} @@ -38798,7 +38830,7 @@ snapshots: '@babel/parser': 7.28.5 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.7.3 + semver: 7.7.4 transitivePeerDependencies: - supports-color @@ -38810,7 +38842,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -38819,7 +38851,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.31 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -39298,7 +39330,7 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.7.3 + semver: 7.7.4 transitivePeerDependencies: - supports-color @@ -39323,7 +39355,7 @@ snapshots: jest-message-util: 30.0.0-beta.3 jest-util: 30.0.0-beta.3 pretty-format: 30.0.0-beta.3 - semver: 7.7.3 + semver: 7.7.4 synckit: 0.11.12 transitivePeerDependencies: - supports-color @@ -39595,7 +39627,7 @@ snapshots: lodash.isstring: 4.0.1 lodash.once: 4.1.1 ms: 2.1.3 - semver: 7.7.3 + semver: 7.7.4 jsx-ast-utils@3.3.5: dependencies: @@ -39660,7 +39692,7 @@ snapshots: optionalDependencies: '@langchain/anthropic': 0.3.34(@langchain/core@1.1.27(@opentelemetry/api@1.9.0)(openai@4.104.0(encoding@0.1.13)(ws@8.19.0)(zod@3.25.76)))(zod@3.25.76) '@langchain/aws': 1.1.1(@langchain/core@1.1.27(@opentelemetry/api@1.9.0)(openai@4.104.0(encoding@0.1.13)(ws@8.19.0)(zod@3.25.76))) - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) handlebars: 4.7.8 transitivePeerDependencies: - '@opentelemetry/api' @@ -39687,7 +39719,7 @@ snapshots: optionalDependencies: '@langchain/anthropic': 0.3.34(@langchain/core@1.1.27(@opentelemetry/api@1.9.0)(openai@6.24.0(ws@8.19.0)(zod@3.25.76)))(zod@3.25.76) '@langchain/aws': 1.1.1(@langchain/core@1.1.27(@opentelemetry/api@1.9.0)(openai@6.24.0(ws@8.19.0)(zod@3.25.76))) - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) handlebars: 4.7.8 transitivePeerDependencies: - '@opentelemetry/api' @@ -39779,7 +39811,7 @@ snapshots: chalk: 4.1.2 console-table-printer: 2.15.0 p-queue: 6.6.2 - semver: 7.7.3 + semver: 7.7.4 uuid: 10.0.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -39791,7 +39823,7 @@ snapshots: chalk: 4.1.2 console-table-printer: 2.15.0 p-queue: 6.6.2 - semver: 7.7.3 + semver: 7.7.4 uuid: 10.0.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -39803,7 +39835,7 @@ snapshots: chalk: 4.1.2 console-table-printer: 2.15.0 p-queue: 6.6.2 - semver: 7.7.3 + semver: 7.7.4 uuid: 10.0.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -39815,7 +39847,7 @@ snapshots: chalk: 5.6.2 console-table-printer: 2.15.0 p-queue: 6.6.2 - semver: 7.7.3 + semver: 7.7.4 uuid: 10.0.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -39827,7 +39859,7 @@ snapshots: chalk: 5.6.2 console-table-printer: 2.15.0 p-queue: 6.6.2 - semver: 7.7.3 + semver: 7.7.4 uuid: 10.0.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -39897,7 +39929,7 @@ snapshots: lefthook-windows-arm64: 2.1.1 lefthook-windows-x64: 2.1.1 - less-loader@12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + less-loader@12.2.0(less@4.2.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: less: 4.2.2 optionalDependencies: @@ -39942,7 +39974,7 @@ snapshots: libphonenumber-js@1.12.33: {} - license-webpack-plugin@4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + license-webpack-plugin@4.0.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: webpack-sources: 3.3.3 optionalDependencies: @@ -40346,7 +40378,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.7.3 + semver: 7.7.4 make-error@1.3.6: {} @@ -41149,7 +41181,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) decode-named-character-reference: 1.2.0 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -41171,7 +41203,7 @@ snapshots: micromark@4.0.2: dependencies: '@types/debug': 4.1.12 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) decode-named-character-reference: 1.2.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 @@ -41228,7 +41260,7 @@ snapshots: min-indent@1.0.1: {} - mini-css-extract-plugin@2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + mini-css-extract-plugin@2.9.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: schema-utils: 4.3.3 tapable: 2.3.0 @@ -41654,7 +41686,7 @@ snapshots: node-abi@3.85.0: dependencies: - semver: 7.7.3 + semver: 7.7.4 node-abort-controller@3.1.1: {} @@ -41707,7 +41739,7 @@ snapshots: make-fetch-happen: 14.0.3 nopt: 8.1.0 proc-log: 5.0.0 - semver: 7.7.3 + semver: 7.7.4 tar: 7.5.7 tinyglobby: 0.2.15 which: 5.0.0 @@ -41788,7 +41820,7 @@ snapshots: npm-install-checks@7.1.2: dependencies: - semver: 7.7.3 + semver: 7.7.4 npm-normalize-package-bin@4.0.0: {} @@ -41796,7 +41828,7 @@ snapshots: dependencies: hosted-git-info: 8.1.0 proc-log: 5.0.0 - semver: 7.7.3 + semver: 7.7.4 validate-npm-package-name: 6.0.2 npm-packlist@9.0.0: @@ -41808,7 +41840,7 @@ snapshots: npm-install-checks: 7.1.2 npm-normalize-package-bin: 4.0.0 npm-package-arg: 12.0.2 - semver: 7.7.3 + semver: 7.7.4 npm-registry-fetch@18.0.2: dependencies: @@ -41852,7 +41884,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.2 '@zkochan/js-yaml': 0.0.7 - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) cli-cursor: 3.1.0 cli-spinners: 2.6.1 cliui: 8.0.1 @@ -41968,7 +42000,7 @@ snapshots: ansis: 3.17.0 async-retry: 1.3.3 change-case: 4.1.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) ejs: 3.1.10 find-yarn-workspace-root: 2.0.0 fs-extra: 8.1.0 @@ -42264,7 +42296,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) get-uri: 6.0.5 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -42644,12 +42676,12 @@ snapshots: tsx: 4.21.0 yaml: 2.8.2 - postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: cosmiconfig: 9.0.0(typescript@5.8.2) jiti: 1.21.7 postcss: 8.5.2 - semver: 7.7.3 + semver: 7.7.4 optionalDependencies: webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) transitivePeerDependencies: @@ -42758,7 +42790,7 @@ snapshots: posthog-node@4.18.0: dependencies: - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) transitivePeerDependencies: - debug @@ -42888,7 +42920,7 @@ snapshots: proxy-agent@6.5.0: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -42946,7 +42978,7 @@ snapshots: dependencies: '@puppeteer/browsers': 2.3.0 chromium-bidi: 0.6.2(devtools-protocol@0.0.1312386) - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) devtools-protocol: 0.0.1312386 ws: 8.19.0 transitivePeerDependencies: @@ -43789,9 +43821,9 @@ snapshots: retext-stringify: 4.0.0 unified: 11.0.5 - retry-axios@2.6.0(axios@1.13.2): + retry-axios@2.6.0(axios@1.13.2(debug@4.4.3)): dependencies: - axios: 1.13.2 + axios: 1.13.2(debug@4.4.3) retry@0.12.0: {} @@ -43952,7 +43984,7 @@ snapshots: router@2.2.0: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -44017,7 +44049,7 @@ snapshots: safer-buffer@2.1.2: {} - sass-loader@16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + sass-loader@16.0.5(sass@1.85.0)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: neo-async: 2.6.2 optionalDependencies: @@ -44136,7 +44168,7 @@ snapshots: send@1.2.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -44255,7 +44287,7 @@ snapshots: dependencies: color: 4.2.3 detect-libc: 2.1.2 - semver: 7.7.3 + semver: 7.7.4 optionalDependencies: '@img/sharp-darwin-arm64': 0.33.5 '@img/sharp-darwin-x64': 0.33.5 @@ -44420,7 +44452,7 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.7.3 + semver: 7.7.4 simple-wcswidth@1.1.2: {} @@ -44511,7 +44543,7 @@ snapshots: socket.io-adapter@2.5.6: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) ws: 8.18.3 transitivePeerDependencies: - bufferutil @@ -44521,7 +44553,7 @@ snapshots: socket.io-parser@4.2.5: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -44548,7 +44580,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) socks: 2.8.7 transitivePeerDependencies: - supports-color @@ -44577,7 +44609,7 @@ snapshots: source-map-js@1.2.1: {} - source-map-loader@5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + source-map-loader@5.0.0(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: iconv-lite: 0.6.3 source-map-js: 1.2.1 @@ -44628,7 +44660,7 @@ snapshots: spdy-transport@3.0.0: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -44639,7 +44671,7 @@ snapshots: spdy@4.0.2: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -44976,7 +45008,7 @@ snapshots: dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) fast-safe-stringify: 2.1.1 form-data: 4.0.5 formidable: 3.5.4 @@ -45224,6 +45256,18 @@ snapshots: '@swc/core': 1.15.8(@swc/helpers@0.5.18) esbuild: 0.23.1 + terser-webpack-plugin@5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + serialize-javascript: 6.0.2 + terser: 5.44.1 + webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) + optionalDependencies: + '@swc/core': 1.15.8(@swc/helpers@0.5.18) + esbuild: 0.25.4 + terser-webpack-plugin@5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -45236,7 +45280,7 @@ snapshots: '@swc/core': 1.15.8(@swc/helpers@0.5.18) esbuild: 0.27.2 - terser-webpack-plugin@5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): + terser-webpack-plugin@5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 @@ -45591,7 +45635,7 @@ snapshots: picomatch: 4.0.3 rolldown: 1.0.0-rc.3 rolldown-plugin-dts: 0.22.1(rolldown@1.0.0-rc.3)(typescript@5.8.2) - semver: 7.7.3 + semver: 7.7.4 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 @@ -45620,7 +45664,7 @@ snapshots: picomatch: 4.0.3 rolldown: 1.0.0-rc.3 rolldown-plugin-dts: 0.22.1(rolldown@1.0.0-rc.3)(typescript@5.9.2) - semver: 7.7.3 + semver: 7.7.4 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 @@ -45649,7 +45693,7 @@ snapshots: picomatch: 4.0.3 rolldown: 1.0.0-rc.3 rolldown-plugin-dts: 0.22.1(rolldown@1.0.0-rc.3)(typescript@5.9.3) - semver: 7.7.3 + semver: 7.7.4 tinyexec: 1.0.2 tinyglobby: 0.2.15 tree-kill: 1.2.2 @@ -45680,7 +45724,7 @@ snapshots: cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) esbuild: 0.27.2 fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 @@ -45715,7 +45759,7 @@ snapshots: tuf-js@3.1.0: dependencies: '@tufjs/models': 3.0.1 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) make-fetch-happen: 14.0.3 transitivePeerDependencies: - supports-color @@ -46269,7 +46313,7 @@ snapshots: vite-node@2.1.9(@types/node@22.19.11)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1): dependencies: cac: 6.7.14 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 1.1.2 vite: 5.4.21(@types/node@22.19.11)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1) @@ -46287,7 +46331,7 @@ snapshots: vite-node@3.2.4(@types/node@18.19.130)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: cac: 6.7.14 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 vite: 7.3.1(@types/node@18.19.130)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) @@ -46308,7 +46352,7 @@ snapshots: vite-node@3.2.4(@types/node@20.19.27)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: cac: 6.7.14 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 vite: 7.3.1(@types/node@20.19.27)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) @@ -46329,7 +46373,7 @@ snapshots: vite-node@3.2.4(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: cac: 6.7.14 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 vite: 7.3.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) @@ -46349,7 +46393,7 @@ snapshots: vite-tsconfig-paths@4.3.2(typescript@5.7.3)(vite@6.4.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)): dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.7.3) optionalDependencies: @@ -46534,7 +46578,7 @@ snapshots: '@vitest/spy': 2.1.9 '@vitest/utils': 2.1.9 chai: 5.3.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) expect-type: 1.3.0 magic-string: 0.30.21 pathe: 1.1.2 @@ -46572,7 +46616,7 @@ snapshots: '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 @@ -46609,14 +46653,14 @@ snapshots: dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@20.19.27)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@18.19.130)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 @@ -46660,7 +46704,7 @@ snapshots: '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 @@ -46697,14 +46741,14 @@ snapshots: dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@18.19.130)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@22.19.11)(jiti@2.6.1)(less@4.5.1)(lightningcss@1.32.0)(sass@1.97.2)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 chai: 5.3.3 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3(supports-color@5.5.0) expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 @@ -46835,7 +46879,7 @@ snapshots: optionalDependencies: webpack: 5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-middleware@7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + webpack-dev-middleware@7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: colorette: 2.0.20 memfs: 4.51.1 @@ -46846,7 +46890,7 @@ snapshots: optionalDependencies: webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) - webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)): + webpack-dev-server@5.2.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -46874,7 +46918,7 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + webpack-dev-middleware: 7.4.2(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) ws: 8.19.0 optionalDependencies: webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) @@ -46901,7 +46945,7 @@ snapshots: webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.5(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)))(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)): dependencies: typed-assert: 1.0.9 - webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2) + webpack: 5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4) optionalDependencies: html-webpack-plugin: 5.6.5(webpack@5.104.1(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.23.1)) @@ -46978,6 +47022,38 @@ snapshots: - esbuild - uglify-js + webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.15.0 + acorn-import-phases: 1.0.4(acorn@8.15.0) + browserslist: 4.28.1 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.19.0 + es-module-lexer: 2.0.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.1 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 4.3.3 + tapable: 2.3.0 + terser-webpack-plugin: 5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) + watchpack: 2.5.1 + webpack-sources: 3.3.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2): dependencies: '@types/eslint-scope': 3.7.7 @@ -47002,7 +47078,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.25.4)) + terser-webpack-plugin: 5.3.16(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)(webpack@5.105.0(@swc/core@1.15.8(@swc/helpers@0.5.18))(esbuild@0.27.2)) watchpack: 2.5.1 webpack-sources: 3.3.3 transitivePeerDependencies: From 9362f5f0dcdcb0949159e2e13b29fdc02c05325f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 08:17:44 +0000 Subject: [PATCH 3/5] chore: final check - all tests pass, build clean, lint clean Agent-Logs-Url: https://github.com/ASISaga/CopilotKit/sessions/89d8131b-260f-44bf-8bee-749ada362e7b Co-authored-by: ASISaga <10753247+ASISaga@users.noreply.github.com> --- packages/web-chat/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-chat/package.json b/packages/web-chat/package.json index 44e09689278..89e39ceb1fd 100644 --- a/packages/web-chat/package.json +++ b/packages/web-chat/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "types": "./dist/index.d.cts", "unpkg": "./dist/index.umd.js", "jsdelivr": "./dist/index.umd.js", "exports": { From a3114b7ada4c57755b7da584838033560edea74d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 08:48:42 +0000 Subject: [PATCH 4/5] feat: rewrite web-chat as pure Lit web components, removing React dependency Agent-Logs-Url: https://github.com/ASISaga/CopilotKit/sessions/92856f34-14e2-4f53-b392-a25ea6d6442f Co-authored-by: ASISaga <10753247+ASISaga@users.noreply.github.com> --- packages/web-chat/package.json | 15 +- packages/web-chat/src/CopilotChatElement.ts | 542 ++++++++++++++++-- packages/web-chat/src/CopilotPopupElement.ts | 171 +++--- .../web-chat/src/CopilotSidebarElement.ts | 177 +++--- .../src/__mocks__/@copilotkit/core.ts | 18 + .../src/__mocks__/@copilotkit/react-core.ts | 1 - .../src/__mocks__/@copilotkit/react-ui.ts | 3 - .../src/__mocks__/@copilotkit/shared.ts | 2 + .../web-chat/src/__tests__/web-chat.spec.ts | 185 +++--- packages/web-chat/tsconfig.json | 5 +- packages/web-chat/tsdown.config.ts | 31 +- packages/web-chat/vitest.config.ts | 17 +- pnpm-lock.yaml | 33 +- 13 files changed, 867 insertions(+), 333 deletions(-) create mode 100644 packages/web-chat/src/__mocks__/@copilotkit/core.ts delete mode 100644 packages/web-chat/src/__mocks__/@copilotkit/react-core.ts delete mode 100644 packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts create mode 100644 packages/web-chat/src/__mocks__/@copilotkit/shared.ts diff --git a/packages/web-chat/package.json b/packages/web-chat/package.json index 89e39ceb1fd..af59c7b82f7 100644 --- a/packages/web-chat/package.json +++ b/packages/web-chat/package.json @@ -1,7 +1,7 @@ { "name": "@copilotkit/web-chat", "version": "1.55.0-next.8", - "description": "Web components for CopilotKit chat (cpk-chat, cpk-popup, cpk-sidebar)", + "description": "Lit-based web components for CopilotKit chat (cpk-chat, cpk-popup, cpk-sidebar)", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", @@ -26,19 +26,16 @@ "publint": "publint .", "attw": "attw --pack . --profile node16" }, - "peerDependencies": { - "react": "^18 || ^19 || ^19.0.0-rc", - "react-dom": "^18 || ^19 || ^19.0.0-rc" - }, "dependencies": { - "@copilotkit/react-core": "workspace:*", - "@copilotkit/react-ui": "workspace:*" + "@ag-ui/client": "0.0.48", + "@copilotkit/core": "workspace:*", + "@copilotkit/shared": "workspace:*", + "lit": "^3.2.0", + "marked": "^12.0.2" }, "devDependencies": { "@copilotkit/typescript-config": "workspace:*", "@types/node": "^22.15.3", - "@types/react": "^19.1.0", - "@types/react-dom": "^19.0.2", "tsdown": "^0.20.3", "typescript": "5.8.2", "vitest": "^3.0.5" diff --git a/packages/web-chat/src/CopilotChatElement.ts b/packages/web-chat/src/CopilotChatElement.ts index 3f38d64d34e..01a65af739f 100644 --- a/packages/web-chat/src/CopilotChatElement.ts +++ b/packages/web-chat/src/CopilotChatElement.ts @@ -1,74 +1,534 @@ -import React from "react"; -import { createRoot, Root } from "react-dom/client"; -import { CopilotKit } from "@copilotkit/react-core"; -import { CopilotChat } from "@copilotkit/react-ui"; +import { LitElement, html, css, nothing } from "lit"; +import { unsafeHTML } from "lit/directives/unsafe-html.js"; +import { + CopilotKitCore, + ProxiedCopilotRuntimeAgent, +} from "@copilotkit/core"; +import type { AbstractAgent } from "@ag-ui/client"; +import { randomUUID, DEFAULT_AGENT_ID } from "@copilotkit/shared"; +import { marked } from "marked"; export const COPILOT_CHAT_TAG = "cpk-chat"; /** - * `` — a web component that renders the CopilotKit chat panel. + * Internal message representation after normalising `agent.messages`. + */ +type ChatMessage = { + id: string; + role: "user" | "assistant" | "tool" | string; + content: string; +}; + +/** + * `` — a Lit-based web component that renders an inline CopilotKit + * chat panel. It connects directly to a CopilotKit runtime endpoint using + * `@copilotkit/core` without any React dependency. * * Attributes: * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) * - `public-api-key` — Copilot Cloud public API key * - `agent` — agent name to connect to - * - `instructions` — system-level instructions for the assistant - * - * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) - * in your application to apply the default CopilotKit styles. + * - `instructions` — system-level instructions (forwarded as a user context message) * * @example * ```html * * ``` */ -export class CopilotChatElement extends HTMLElement { - private _root: Root | null = null; - private _container: HTMLDivElement | null = null; +export class CopilotChatElement extends LitElement { + static properties = { + runtimeUrl: { type: String, attribute: "runtime-url" }, + publicApiKey: { type: String, attribute: "public-api-key" }, + agentId: { type: String, attribute: "agent" }, + instructions: { type: String, attribute: "instructions" }, + title: { type: String, attribute: "title" }, + initialMessage: { type: String, attribute: "initial-message" }, + } as const; - static get observedAttributes(): string[] { - return ["runtime-url", "public-api-key", "agent", "instructions"]; - } + // Observed attribute values + runtimeUrl?: string; + publicApiKey?: string; + agentId?: string; + instructions?: string; + title?: string; + initialMessage?: string; - connectedCallback(): void { - if (!this._container) { - this._container = document.createElement("div"); - this._container.style.cssText = "display:contents"; + // Internal state (plain properties — updates triggered via requestUpdate) + protected _core: CopilotKitCore | null = null; + protected _agent: AbstractAgent | null = null; + private _messages: ChatMessage[] = []; + private _isRunning = false; + private _inputValue = ""; + private _unsubscribeAgent: (() => void) | null = null; + private _unsubscribeCore: (() => void) | null = null; + private _connectAbortController: AbortController | null = null; + private _initialMessageShown = false; + + static styles = css` + :host { + display: flex; + flex-direction: column; + height: 100%; + min-height: 300px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + font-size: 14px; + line-height: 1.5; + color: #111827; + --cpk-bg: #ffffff; + --cpk-border: #e5e7eb; + --cpk-header-bg: #f9fafb; + --cpk-user-bg: #3b82f6; + --cpk-user-fg: #ffffff; + --cpk-assistant-bg: #f3f4f6; + --cpk-assistant-fg: #111827; + --cpk-input-bg: #ffffff; + --cpk-btn-primary: #3b82f6; + --cpk-btn-primary-fg: #ffffff; + --cpk-btn-stop: #ef4444; + } + + .chat-container { + display: flex; + flex-direction: column; + height: 100%; + background: var(--cpk-bg); + border: 1px solid var(--cpk-border); + border-radius: 12px; + overflow: hidden; + } + + .chat-header { + display: flex; + align-items: center; + padding: 12px 16px; + background: var(--cpk-header-bg); + border-bottom: 1px solid var(--cpk-border); + font-weight: 600; + font-size: 15px; + min-height: 48px; + } + + .chat-header-title { + flex: 1; + } + + .chat-messages { + flex: 1; + overflow-y: auto; + padding: 16px; + display: flex; + flex-direction: column; + gap: 12px; + } + + .chat-message { + display: flex; + flex-direction: column; + max-width: 80%; + } + + .chat-message.user { + align-self: flex-end; + align-items: flex-end; + } + + .chat-message.assistant { + align-self: flex-start; + align-items: flex-start; + } + + .message-bubble { + padding: 10px 14px; + border-radius: 16px; + word-break: break-word; + } + + .chat-message.user .message-bubble { + background: var(--cpk-user-bg); + color: var(--cpk-user-fg); + border-bottom-right-radius: 4px; + } + + .chat-message.assistant .message-bubble { + background: var(--cpk-assistant-bg); + color: var(--cpk-assistant-fg); + border-bottom-left-radius: 4px; + } + + .message-bubble p:first-child { margin-top: 0; } + .message-bubble p:last-child { margin-bottom: 0; } + .message-bubble pre { + background: rgba(0,0,0,0.1); + border-radius: 6px; + padding: 8px 12px; + overflow-x: auto; + font-size: 13px; + } + .message-bubble code { + font-family: "Menlo", "Monaco", "Consolas", monospace; + font-size: 13px; + } + + .typing-indicator { + display: flex; + gap: 4px; + padding: 12px 14px; + } + + .typing-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: #9ca3af; + animation: bounce 1.4s infinite ease-in-out; + } + .typing-dot:nth-child(1) { animation-delay: -0.32s; } + .typing-dot:nth-child(2) { animation-delay: -0.16s; } + + @keyframes bounce { + 0%, 80%, 100% { transform: scale(0); } + 40% { transform: scale(1); } + } + + .chat-input-area { + padding: 12px 16px; + border-top: 1px solid var(--cpk-border); + background: var(--cpk-input-bg); + display: flex; + gap: 8px; + align-items: flex-end; + } + + .chat-input { + flex: 1; + padding: 10px 14px; + border: 1px solid var(--cpk-border); + border-radius: 20px; + outline: none; + font-size: 14px; + font-family: inherit; + resize: none; + min-height: 40px; + max-height: 120px; + overflow-y: auto; + background: var(--cpk-input-bg); + line-height: 1.4; + } + + .chat-input:focus { + border-color: var(--cpk-btn-primary); + } + + .chat-send-btn, .chat-stop-btn { + padding: 8px 16px; + border: none; + border-radius: 20px; + cursor: pointer; + font-size: 14px; + font-weight: 500; + transition: opacity 0.15s; + white-space: nowrap; + min-width: 60px; + } + + .chat-send-btn { + background: var(--cpk-btn-primary); + color: var(--cpk-btn-primary-fg); + } + + .chat-send-btn:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .chat-stop-btn { + background: var(--cpk-btn-stop); + color: #ffffff; + } + + .status-bar { + font-size: 11px; + color: #9ca3af; + padding: 4px 16px 0; + min-height: 18px; + } + + .error-message { + color: #ef4444; + font-size: 12px; + padding: 8px 16px; } - this.appendChild(this._container); - this._render(); + `; + + connectedCallback(): void { + super.connectedCallback(); + this._initCore(); } disconnectedCallback(): void { - this._root?.unmount(); - this._root = null; + super.disconnectedCallback(); + this._teardown(); + } + + protected override updated(changedProperties: Map): void { + const reconnect = + changedProperties.has("runtimeUrl") || + changedProperties.has("publicApiKey") || + changedProperties.has("agentId"); + if (reconnect && this.isConnected) { + this._teardown(); + this._initCore(); + } + // Scroll to bottom after every render + const el = this.shadowRoot?.getElementById("cpk-messages"); + if (el) { + el.scrollTop = el.scrollHeight; + } } - attributeChangedCallback(): void { - if (this._root) { - this._render(); + private _initCore(): void { + const headers: Record = {}; + if (this.publicApiKey) { + headers["x-copilotcloud-public-api-key"] = this.publicApiKey; } + + this._core = new CopilotKitCore({ + runtimeUrl: this.runtimeUrl, + headers, + }); + + // Create a provisional agent (same pattern as react-core's useAgent hook) + const agent = new ProxiedCopilotRuntimeAgent({ + runtimeUrl: this.runtimeUrl, + agentId: this.agentId ?? DEFAULT_AGENT_ID, + transport: "rest", + runtimeMode: "pending", + }); + if (headers) { + agent.headers = headers; + } + this._agent = agent; + + // Subscribe to agent for message/run updates + const subscription = this._agent.subscribe({ + onMessagesChanged: () => { + this._syncMessages(); + this.requestUpdate(); + }, + onRunInitialized: () => { + this._isRunning = true; + this.requestUpdate(); + }, + onRunFinalized: () => { + this._isRunning = false; + this.requestUpdate(); + }, + onRunFailed: () => { + this._isRunning = false; + this.requestUpdate(); + }, + }); + this._unsubscribeAgent = subscription.unsubscribe; + + // Connect the agent to the runtime + void this._connect(); } - private _render(): void { - if (!this._container) return; + private async _connect(): Promise { + if (!this._core || !this._agent) return; + + this._connectAbortController = new AbortController(); - if (!this._root) { - this._root = createRoot(this._container); + // Add a system-level instruction if provided + if (this.instructions && !this._initialMessageShown) { + this._initialMessageShown = true; } - const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; - const publicApiKey = this.getAttribute("public-api-key") ?? undefined; - const agent = this.getAttribute("agent") ?? undefined; - const instructions = this.getAttribute("instructions") ?? undefined; + try { + await this._core.connectAgent({ agent: this._agent }); + } catch { + // Errors are handled via the subscriber system + } + } + + private _teardown(): void { + this._connectAbortController?.abort(); + this._connectAbortController = null; + this._unsubscribeAgent?.(); + this._unsubscribeAgent = null; + this._unsubscribeCore?.(); + this._unsubscribeCore = null; + this._core = null; + this._agent = null; + this._messages = []; + this._isRunning = false; + this._initialMessageShown = false; + } + + private _syncMessages(): void { + const raw = (this._agent as unknown as { messages?: unknown })?.messages; + if (!Array.isArray(raw)) { + this._messages = []; + return; + } + + this._messages = raw + .map((m: unknown): ChatMessage | null => { + if (!m || typeof m !== "object") return null; + const msg = m as Record; + const role = typeof msg["role"] === "string" ? msg["role"] : "assistant"; + const content = this._extractContent(msg["content"]); + const id = + typeof msg["id"] === "string" ? msg["id"] : randomUUID(); + return { id, role, content }; + }) + .filter((m): m is ChatMessage => m !== null && m.content.trim().length > 0) + // Only show user and assistant messages in the chat + .filter((m) => m.role === "user" || m.role === "assistant"); + } + + private _extractContent(content: unknown): string { + if (typeof content === "string") return content; + if (Array.isArray(content)) { + return content + .map((part) => { + if (!part || typeof part !== "object") return ""; + const p = part as Record; + if (p["type"] === "text" && typeof p["text"] === "string") { + return p["text"]; + } + return ""; + }) + .filter(Boolean) + .join("\n"); + } + return ""; + } + + private async _sendMessage(): Promise { + const text = this._inputValue.trim(); + if (!text || !this._core || !this._agent || this._isRunning) return; + + // Add instructions as a system context on first message + const messageContent = + this.instructions && this._messages.length === 0 + ? `${text}\n\n[System: ${this.instructions}]` + : text; + + this._agent.addMessage({ + id: randomUUID(), + role: "user", + content: messageContent, + }); + this._inputValue = ""; + this.requestUpdate(); + + try { + await this._core.runAgent({ agent: this._agent }); + } catch { + // Errors handled via subscriber system + } + } + + private _stopRun(): void { + if (!this._core || !this._agent) return; + try { + this._core.stopAgent({ agent: this._agent }); + } catch { + // Ignore + } + } + + private _onKeyDown(e: KeyboardEvent): void { + if (e.key === "Enter" && !e.shiftKey) { + e.preventDefault(); + void this._sendMessage(); + } + } + + private _onInput(e: Event): void { + this._inputValue = (e.target as HTMLTextAreaElement).value; + } + + protected renderHeader() { + const titleText = this.title ?? "Assistant"; + return html`
+ ${titleText} +
`; + } + + protected renderMessages() { + return html`
+ ${this._messages.length === 0 && !this._isRunning + ? this._renderInitialMessage() + : nothing} + ${this._messages.map((msg) => this._renderMessage(msg))} + ${this._isRunning ? this._renderTypingIndicator() : nothing} +
`; + } + + private _renderInitialMessage() { + const text = this.initialMessage; + if (!text) return nothing; + return html`
+
${text}
+
`; + } + + private _renderMessage(msg: ChatMessage) { + const isUser = msg.role === "user"; + const roleClass = isUser ? "user" : "assistant"; + + let bubbleContent; + if (isUser) { + bubbleContent = html`${msg.content}`; + } else { + const parsed = marked.parse(msg.content) as string; + bubbleContent = html`${unsafeHTML(parsed)}`; + } + + return html`
+
${bubbleContent}
+
`; + } + + private _renderTypingIndicator() { + return html`
+
+ + + +
+
`; + } + + protected renderInput() { + return html`
+ + ${this._isRunning + ? html`` + : html``} +
`; + } - this._root.render( - React.createElement( - CopilotKit, - { runtimeUrl, publicApiKey, agent }, - React.createElement(CopilotChat, { instructions }), - ), - ); + protected override render() { + return html`
+ ${this.renderHeader()} ${this.renderMessages()} ${this.renderInput()} +
`; } } diff --git a/packages/web-chat/src/CopilotPopupElement.ts b/packages/web-chat/src/CopilotPopupElement.ts index 4458627835e..56d99e08cd7 100644 --- a/packages/web-chat/src/CopilotPopupElement.ts +++ b/packages/web-chat/src/CopilotPopupElement.ts @@ -1,96 +1,121 @@ -import React from "react"; -import { createRoot, Root } from "react-dom/client"; -import { CopilotKit } from "@copilotkit/react-core"; -import { CopilotPopup } from "@copilotkit/react-ui"; +import { html, css } from "lit"; +import { CopilotChatElement } from "./CopilotChatElement"; export const COPILOT_POPUP_TAG = "cpk-popup"; /** - * `` — a web component that renders the CopilotKit chat popup button. - * - * Clicking the button opens a floating chat window. This is the web component - * equivalent of `` from `@copilotkit/react-ui`. + * `` — a Lit-based web component that renders a floating popup + * button. Clicking the button toggles a chat window. * * Attributes: - * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) - * - `public-api-key` — Copilot Cloud public API key - * - `agent` — agent name to connect to - * - `instructions` — system-level instructions for the assistant - * - `title` — chat window title label - * - `initial-message`— initial greeting message - * - `default-open` — open the chat window on load (presence of the attribute is truthy) - * - * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) - * in your application to apply the default CopilotKit styles. + * - `runtime-url` — URL for the CopilotKit backend + * - `public-api-key` — Copilot Cloud public API key + * - `agent` — agent name to connect to + * - `instructions` — system-level instructions for the assistant + * - `title` — chat window title + * - `initial-message` — initial greeting message + * - `default-open` — open the chat window on load (presence = truthy) * * @example * ```html - * + * * ``` */ -export class CopilotPopupElement extends HTMLElement { - private _root: Root | null = null; - private _container: HTMLDivElement | null = null; +export class CopilotPopupElement extends CopilotChatElement { + static override properties = { + ...CopilotChatElement.properties, + defaultOpen: { type: Boolean, attribute: "default-open" }, + } as const; - static get observedAttributes(): string[] { - return [ - "runtime-url", - "public-api-key", - "agent", - "instructions", - "title", - "initial-message", - "default-open", - ]; - } + defaultOpen = false; - connectedCallback(): void { - if (!this._container) { - this._container = document.createElement("div"); - this._container.style.cssText = "display:contents"; - } - this.appendChild(this._container); - this._render(); - } + private _isOpen = false; - disconnectedCallback(): void { - this._root?.unmount(); - this._root = null; - } + static override styles = [ + CopilotChatElement.styles, + css` + :host { + display: block; + position: fixed; + bottom: 24px; + right: 24px; + z-index: 9999; + } - attributeChangedCallback(): void { - if (this._root) { - this._render(); - } - } + .popup-toggle { + width: 56px; + height: 56px; + border-radius: 50%; + background: var(--cpk-btn-primary, #3b82f6); + color: #ffffff; + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 24px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); + transition: transform 0.2s, box-shadow 0.2s; + } - private _render(): void { - if (!this._container) return; + .popup-toggle:hover { + transform: scale(1.05); + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); + } - if (!this._root) { - this._root = createRoot(this._container); - } + .popup-window { + position: absolute; + bottom: 68px; + right: 0; + width: 360px; + height: 520px; + border-radius: 12px; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18); + overflow: hidden; + display: none; + flex-direction: column; + } - const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; - const publicApiKey = this.getAttribute("public-api-key") ?? undefined; - const agent = this.getAttribute("agent") ?? undefined; - const instructions = this.getAttribute("instructions") ?? undefined; - const title = this.getAttribute("title") ?? undefined; - const initialMessage = this.getAttribute("initial-message") ?? undefined; - const defaultOpen = this.hasAttribute("default-open"); + .popup-window.open { + display: flex; + } - const labels = - title !== undefined || initialMessage !== undefined - ? { title, initial: initialMessage } - : undefined; + .popup-window .chat-container { + border-radius: 0; + border: none; + height: 100%; + } + `, + ]; + + override connectedCallback(): void { + super.connectedCallback(); + if (this.defaultOpen) { + this._isOpen = true; + this.requestUpdate(); + } + } + + private _toggleOpen(): void { + this._isOpen = !this._isOpen; + this.requestUpdate(); + } - this._root.render( - React.createElement( - CopilotKit, - { runtimeUrl, publicApiKey, agent }, - React.createElement(CopilotPopup, { instructions, labels, defaultOpen }), - ), - ); + protected override render() { + return html` + + + `; } } diff --git a/packages/web-chat/src/CopilotSidebarElement.ts b/packages/web-chat/src/CopilotSidebarElement.ts index e494771e6fc..7c01a19b5e9 100644 --- a/packages/web-chat/src/CopilotSidebarElement.ts +++ b/packages/web-chat/src/CopilotSidebarElement.ts @@ -1,96 +1,129 @@ -import React from "react"; -import { createRoot, Root } from "react-dom/client"; -import { CopilotKit } from "@copilotkit/react-core"; -import { CopilotSidebar } from "@copilotkit/react-ui"; +import { html, css } from "lit"; +import { CopilotChatElement } from "./CopilotChatElement"; export const COPILOT_SIDEBAR_TAG = "cpk-sidebar"; /** - * `` — a web component that renders the CopilotKit chat sidebar. - * - * The sidebar pushes page content to the side when open. This is the web component - * equivalent of `` from `@copilotkit/react-ui`. + * `` — a Lit-based web component that renders a slide-in sidebar + * chat panel. When open, it overlays the right side of the viewport. * * Attributes: - * - `runtime-url` — URL for the CopilotKit backend (default: `/api/copilotkit`) - * - `public-api-key` — Copilot Cloud public API key - * - `agent` — agent name to connect to - * - `instructions` — system-level instructions for the assistant - * - `title` — chat window title label - * - `initial-message`— initial greeting message - * - `default-open` — open the sidebar on load (presence of the attribute is truthy) - * - * CSS: import `@copilotkit/react-ui/styles.css` (or `@copilotkit/web-chat/styles.css`) - * in your application to apply the default CopilotKit styles. + * - `runtime-url` — URL for the CopilotKit backend + * - `public-api-key` — Copilot Cloud public API key + * - `agent` — agent name to connect to + * - `instructions` — system-level instructions for the assistant + * - `title` — sidebar title + * - `initial-message` — initial greeting message + * - `default-open` — open the sidebar on load (presence = truthy) * * @example * ```html * * ``` */ -export class CopilotSidebarElement extends HTMLElement { - private _root: Root | null = null; - private _container: HTMLDivElement | null = null; +export class CopilotSidebarElement extends CopilotChatElement { + static override properties = { + ...CopilotChatElement.properties, + defaultOpen: { type: Boolean, attribute: "default-open" }, + } as const; - static get observedAttributes(): string[] { - return [ - "runtime-url", - "public-api-key", - "agent", - "instructions", - "title", - "initial-message", - "default-open", - ]; - } + defaultOpen = false; - connectedCallback(): void { - if (!this._container) { - this._container = document.createElement("div"); - this._container.style.cssText = "display:contents"; - } - this.appendChild(this._container); - this._render(); - } + private _isOpen = false; - disconnectedCallback(): void { - this._root?.unmount(); - this._root = null; - } + static override styles = [ + CopilotChatElement.styles, + css` + :host { + display: block; + position: fixed; + top: 0; + right: 0; + bottom: 0; + z-index: 9999; + pointer-events: none; + } - attributeChangedCallback(): void { - if (this._root) { - this._render(); - } - } + .sidebar-toggle { + position: fixed; + bottom: 24px; + right: 24px; + width: 56px; + height: 56px; + border-radius: 50%; + background: var(--cpk-btn-primary, #3b82f6); + color: #ffffff; + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 24px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); + pointer-events: all; + transition: transform 0.2s, box-shadow 0.2s; + } - private _render(): void { - if (!this._container) return; + .sidebar-toggle:hover { + transform: scale(1.05); + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); + } - if (!this._root) { - this._root = createRoot(this._container); - } + .sidebar-panel { + position: fixed; + top: 0; + right: 0; + bottom: 0; + width: 380px; + max-width: 100vw; + transform: translateX(100%); + transition: transform 0.3s ease; + pointer-events: all; + box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12); + display: flex; + flex-direction: column; + } - const runtimeUrl = this.getAttribute("runtime-url") ?? undefined; - const publicApiKey = this.getAttribute("public-api-key") ?? undefined; - const agent = this.getAttribute("agent") ?? undefined; - const instructions = this.getAttribute("instructions") ?? undefined; - const title = this.getAttribute("title") ?? undefined; - const initialMessage = this.getAttribute("initial-message") ?? undefined; - const defaultOpen = this.hasAttribute("default-open"); + .sidebar-panel.open { + transform: translateX(0); + } - const labels = - title !== undefined || initialMessage !== undefined - ? { title, initial: initialMessage } - : undefined; + .sidebar-panel .chat-container { + border-radius: 0; + border: none; + height: 100%; + } + `, + ]; + + override connectedCallback(): void { + super.connectedCallback(); + if (this.defaultOpen) { + this._isOpen = true; + this.requestUpdate(); + } + } + + private _toggleOpen(): void { + this._isOpen = !this._isOpen; + this.requestUpdate(); + } - this._root.render( - React.createElement( - CopilotKit, - { runtimeUrl, publicApiKey, agent }, - React.createElement(CopilotSidebar, { instructions, labels, defaultOpen }), - ), - ); + protected override render() { + return html` + + + `; } } diff --git a/packages/web-chat/src/__mocks__/@copilotkit/core.ts b/packages/web-chat/src/__mocks__/@copilotkit/core.ts new file mode 100644 index 00000000000..e52d7c8327c --- /dev/null +++ b/packages/web-chat/src/__mocks__/@copilotkit/core.ts @@ -0,0 +1,18 @@ +export const CopilotKitCore = class { + connectAgent = () => Promise.resolve(); + runAgent = () => Promise.resolve(); + stopAgent = () => {}; +}; +export const ProxiedCopilotRuntimeAgent = class { + headers: Record = {}; + messages: unknown[] = []; + subscribe = () => ({ unsubscribe: () => {} }); + addMessage = () => {}; + abortRun = () => {}; +}; +export const CopilotKitCoreRuntimeConnectionStatus = { + Disconnected: "disconnected", + Connected: "connected", + Connecting: "connecting", + Error: "error", +}; diff --git a/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts b/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts deleted file mode 100644 index d8912493610..00000000000 --- a/packages/web-chat/src/__mocks__/@copilotkit/react-core.ts +++ /dev/null @@ -1 +0,0 @@ -export const CopilotKit = "CopilotKit"; diff --git a/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts b/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts deleted file mode 100644 index 30de06a860c..00000000000 --- a/packages/web-chat/src/__mocks__/@copilotkit/react-ui.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const CopilotChat = "CopilotChat"; -export const CopilotPopup = "CopilotPopup"; -export const CopilotSidebar = "CopilotSidebar"; diff --git a/packages/web-chat/src/__mocks__/@copilotkit/shared.ts b/packages/web-chat/src/__mocks__/@copilotkit/shared.ts new file mode 100644 index 00000000000..71942c57ddb --- /dev/null +++ b/packages/web-chat/src/__mocks__/@copilotkit/shared.ts @@ -0,0 +1,2 @@ +export const randomUUID = () => "test-uuid"; +export const DEFAULT_AGENT_ID = "default"; diff --git a/packages/web-chat/src/__tests__/web-chat.spec.ts b/packages/web-chat/src/__tests__/web-chat.spec.ts index 223e20b0f13..8882581c95f 100644 --- a/packages/web-chat/src/__tests__/web-chat.spec.ts +++ b/packages/web-chat/src/__tests__/web-chat.spec.ts @@ -1,4 +1,66 @@ -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { describe, it, expect, vi } from "vitest"; + +// Mock @copilotkit/core before importing anything that uses it +vi.mock("@copilotkit/core", () => { + const mockCore = { + connectAgent: vi.fn().mockResolvedValue(undefined), + runAgent: vi.fn().mockResolvedValue(undefined), + stopAgent: vi.fn(), + }; + const mockAgent = { + subscribe: vi.fn().mockReturnValue({ unsubscribe: vi.fn() }), + addMessage: vi.fn(), + abortRun: vi.fn(), + messages: [], + headers: {}, + }; + return { + CopilotKitCore: vi.fn().mockImplementation(() => mockCore), + ProxiedCopilotRuntimeAgent: vi.fn().mockImplementation(() => mockAgent), + CopilotKitCoreRuntimeConnectionStatus: { + Disconnected: "disconnected", + Connected: "connected", + Connecting: "connecting", + Error: "error", + }, + }; +}); + +vi.mock("@copilotkit/shared", () => ({ + randomUUID: vi.fn(() => "test-uuid"), + DEFAULT_AGENT_ID: "default", +})); + +vi.mock("marked", () => ({ + marked: { parse: vi.fn((text: string) => `

${text}

`) }, +})); + +vi.mock("lit", () => ({ + LitElement: class { + connectedCallback() {} + disconnectedCallback() {} + requestUpdate() {} + isConnected = false; + shadowRoot = null; + static styles = []; + static properties = {}; + }, + html: vi.fn((strings: TemplateStringsArray, ...values: unknown[]) => ({ + strings, + values, + })), + css: vi.fn((strings: TemplateStringsArray, ...values: unknown[]) => ({ + strings, + values, + })), + nothing: null, +})); + +vi.mock("lit/directives/unsafe-html.js", () => ({ + unsafeHTML: vi.fn((s: string) => s), +})); + +// Import after mocks are set up import { CopilotChatElement, CopilotPopupElement, @@ -8,21 +70,6 @@ import { COPILOT_SIDEBAR_TAG, } from "../index"; -// Mock react-dom/client so we don't need an actual React environment -vi.mock("react-dom/client", () => ({ - createRoot: vi.fn(() => ({ - render: vi.fn(), - unmount: vi.fn(), - })), -})); - -vi.mock("react", () => ({ - default: { - createElement: vi.fn(() => ({})), - }, - createElement: vi.fn(() => ({})), -})); - describe("Web component tag names", () => { it("exports the correct tag name for cpk-chat", () => { expect(COPILOT_CHAT_TAG).toBe("cpk-chat"); @@ -38,97 +85,67 @@ describe("Web component tag names", () => { }); describe("CopilotChatElement", () => { - let element: CopilotChatElement; - - beforeEach(() => { - element = new CopilotChatElement(); - }); - - afterEach(() => { - vi.clearAllMocks(); - }); - - it("is registered as a custom element", () => { - expect(customElements.get(COPILOT_CHAT_TAG)).toBe(CopilotChatElement); + it("is a class that can be instantiated", () => { + expect(CopilotChatElement).toBeTypeOf("function"); }); it("observes the expected attributes", () => { - expect(CopilotChatElement.observedAttributes).toEqual([ - "runtime-url", - "public-api-key", - "agent", - "instructions", - ]); - }); - - it("mounts and unmounts without errors", () => { - document.body.appendChild(element); - expect(() => document.body.removeChild(element)).not.toThrow(); + expect(CopilotChatElement.properties).toMatchObject({ + runtimeUrl: { attribute: "runtime-url" }, + publicApiKey: { attribute: "public-api-key" }, + agentId: { attribute: "agent" }, + instructions: { attribute: "instructions" }, + title: { attribute: "title" }, + initialMessage: { attribute: "initial-message" }, + }); }); }); describe("CopilotPopupElement", () => { - let element: CopilotPopupElement; - - beforeEach(() => { - element = new CopilotPopupElement(); + it("is a class that can be instantiated", () => { + expect(CopilotPopupElement).toBeTypeOf("function"); }); - afterEach(() => { - vi.clearAllMocks(); + it("extends CopilotChatElement", () => { + expect(Object.getPrototypeOf(CopilotPopupElement)).toBe(CopilotChatElement); }); - it("is registered as a custom element", () => { - expect(customElements.get(COPILOT_POPUP_TAG)).toBe(CopilotPopupElement); - }); - - it("observes the expected attributes", () => { - expect(CopilotPopupElement.observedAttributes).toEqual([ - "runtime-url", - "public-api-key", - "agent", - "instructions", - "title", - "initial-message", - "default-open", - ]); - }); - - it("mounts and unmounts without errors", () => { - document.body.appendChild(element); - expect(() => document.body.removeChild(element)).not.toThrow(); + it("has defaultOpen property", () => { + expect(CopilotPopupElement.properties).toMatchObject({ + defaultOpen: { attribute: "default-open" }, + }); }); }); describe("CopilotSidebarElement", () => { - let element: CopilotSidebarElement; + it("is a class that can be instantiated", () => { + expect(CopilotSidebarElement).toBeTypeOf("function"); + }); - beforeEach(() => { - element = new CopilotSidebarElement(); + it("extends CopilotChatElement", () => { + expect(Object.getPrototypeOf(CopilotSidebarElement)).toBe(CopilotChatElement); }); - afterEach(() => { - vi.clearAllMocks(); + it("has defaultOpen property", () => { + expect(CopilotSidebarElement.properties).toMatchObject({ + defaultOpen: { attribute: "default-open" }, + }); }); +}); - it("is registered as a custom element", () => { - expect(customElements.get(COPILOT_SIDEBAR_TAG)).toBe(CopilotSidebarElement); +describe("Custom element registration", () => { + it("registers cpk-chat if customElements is available", () => { + const defined = customElements.get(COPILOT_CHAT_TAG); + expect(defined).toBeDefined(); }); - it("observes the expected attributes", () => { - expect(CopilotSidebarElement.observedAttributes).toEqual([ - "runtime-url", - "public-api-key", - "agent", - "instructions", - "title", - "initial-message", - "default-open", - ]); + it("registers cpk-popup if customElements is available", () => { + const defined = customElements.get(COPILOT_POPUP_TAG); + expect(defined).toBeDefined(); }); - it("mounts and unmounts without errors", () => { - document.body.appendChild(element); - expect(() => document.body.removeChild(element)).not.toThrow(); + it("registers cpk-sidebar if customElements is available", () => { + const defined = customElements.get(COPILOT_SIDEBAR_TAG); + expect(defined).toBeDefined(); }); }); diff --git a/packages/web-chat/tsconfig.json b/packages/web-chat/tsconfig.json index 8ffaa8e010a..bd2875e3fe8 100644 --- a/packages/web-chat/tsconfig.json +++ b/packages/web-chat/tsconfig.json @@ -6,11 +6,12 @@ "declaration": true, "declarationMap": true, "sourceMap": true, - "jsx": "react-jsx", + "experimentalDecorators": true, + "useDefineForClassFields": false, "lib": ["dom", "ES2022"], "module": "ESNext", "moduleResolution": "bundler" }, "include": ["src/**/*"], - "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.test.tsx"] + "exclude": ["dist", "node_modules", "**/*.test.ts"] } diff --git a/packages/web-chat/tsdown.config.ts b/packages/web-chat/tsdown.config.ts index b5dbee19bc2..debaaf7425e 100644 --- a/packages/web-chat/tsdown.config.ts +++ b/packages/web-chat/tsdown.config.ts @@ -8,14 +8,7 @@ export default defineConfig([ sourcemap: true, target: "es2022", outDir: "dist", - external: [ - "react", - "react-dom", - "react-dom/client", - "react/jsx-runtime", - "@copilotkit/react-core", - "@copilotkit/react-ui", - ], + unbundle: true, exports: true, }, { @@ -25,24 +18,18 @@ export default defineConfig([ sourcemap: true, target: "es2018", outDir: "dist", - external: [ - "react", - "react-dom", - "react-dom/client", - "react/jsx-runtime", - "@copilotkit/react-core", - "@copilotkit/react-ui", - ], + external: ["lit", "lit/decorators.js"], codeSplitting: false, outputOptions(options) { options.entryFileNames = "[name].umd.js"; options.globals = { - react: "React", - "react-dom": "ReactDOM", - "react-dom/client": "ReactDOMClient", - "react/jsx-runtime": "ReactJsxRuntime", - "@copilotkit/react-core": "CopilotKitReactCore", - "@copilotkit/react-ui": "CopilotKitReactUI", + lit: "Lit", + "lit/decorators.js": "LitDecorators", + "lit/directives/unsafe-html.js": "LitDirectivesUnsafeHtml", + marked: "marked", + "@copilotkit/core": "CopilotKitCore", + "@copilotkit/shared": "CopilotKitShared", + "@ag-ui/client": "AgUiClient", }; return options; }, diff --git a/packages/web-chat/vitest.config.ts b/packages/web-chat/vitest.config.ts index bc00647505e..03faf2b3f98 100644 --- a/packages/web-chat/vitest.config.ts +++ b/packages/web-chat/vitest.config.ts @@ -1,4 +1,5 @@ import { defineConfig } from "vitest/config"; +import path from "node:path"; export default defineConfig({ test: { @@ -9,14 +10,14 @@ export default defineConfig({ }, resolve: { alias: { - "@copilotkit/react-core": new URL( - "./src/__mocks__/@copilotkit/react-core.ts", - import.meta.url, - ).pathname, - "@copilotkit/react-ui": new URL( - "./src/__mocks__/@copilotkit/react-ui.ts", - import.meta.url, - ).pathname, + "@copilotkit/core": path.resolve( + import.meta.dirname, + "./src/__mocks__/@copilotkit/core.ts", + ), + "@copilotkit/shared": path.resolve( + import.meta.dirname, + "./src/__mocks__/@copilotkit/shared.ts", + ), }, }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4561dbfd443..cd84dd4b262 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2589,18 +2589,21 @@ importers: packages/web-chat: dependencies: - '@copilotkit/react-core': + '@ag-ui/client': + specifier: 0.0.48 + version: 0.0.48 + '@copilotkit/core': specifier: workspace:* - version: link:../react-core - '@copilotkit/react-ui': + version: link:../core + '@copilotkit/shared': specifier: workspace:* - version: link:../react-ui - react: - specifier: 19.1.0 - version: 19.1.0 - react-dom: - specifier: 19.1.0 - version: 19.1.0(react@19.1.0) + version: link:../shared + lit: + specifier: ^3.2.0 + version: 3.3.2 + marked: + specifier: ^12.0.2 + version: 12.0.2 devDependencies: '@copilotkit/typescript-config': specifier: workspace:* @@ -2608,12 +2611,6 @@ importers: '@types/node': specifier: ^22.15.3 version: 22.19.11 - '@types/react': - specifier: ^19.1.0 - version: 19.2.7 - '@types/react-dom': - specifier: ^19.0.2 - version: 19.2.3(@types/react@19.2.7) tsdown: specifier: ^0.20.3 version: 0.20.3(@arethetypeswrong/core@0.18.2)(publint@0.3.17)(synckit@0.11.12)(typescript@5.8.2) @@ -38321,7 +38318,7 @@ snapshots: isstream: 0.1.2 jsonwebtoken: 9.0.3 mime-types: 2.1.35 - retry-axios: 2.6.0(axios@1.13.2(debug@4.4.3)) + retry-axios: 2.6.0(axios@1.13.2) tough-cookie: 4.1.4 transitivePeerDependencies: - supports-color @@ -43821,7 +43818,7 @@ snapshots: retext-stringify: 4.0.0 unified: 11.0.5 - retry-axios@2.6.0(axios@1.13.2(debug@4.4.3)): + retry-axios@2.6.0(axios@1.13.2): dependencies: axios: 1.13.2(debug@4.4.3) From 3fa6597ad1519661320552b1fab7e152a9ddfc6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 08:50:36 +0000 Subject: [PATCH 5/5] fix: address code review - clean instructions logic, fix UMD externals, improve tests Agent-Logs-Url: https://github.com/ASISaga/CopilotKit/sessions/92856f34-14e2-4f53-b392-a25ea6d6442f Co-authored-by: ASISaga <10753247+ASISaga@users.noreply.github.com> --- packages/web-chat/src/CopilotChatElement.ts | 22 +++++++++---------- .../web-chat/src/__tests__/web-chat.spec.ts | 6 +++++ packages/web-chat/tsdown.config.ts | 10 ++++++++- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/packages/web-chat/src/CopilotChatElement.ts b/packages/web-chat/src/CopilotChatElement.ts index 01a65af739f..dba775a4f32 100644 --- a/packages/web-chat/src/CopilotChatElement.ts +++ b/packages/web-chat/src/CopilotChatElement.ts @@ -339,11 +339,6 @@ export class CopilotChatElement extends LitElement { this._connectAbortController = new AbortController(); - // Add a system-level instruction if provided - if (this.instructions && !this._initialMessageShown) { - this._initialMessageShown = true; - } - try { await this._core.connectAgent({ agent: this._agent }); } catch { @@ -409,16 +404,21 @@ export class CopilotChatElement extends LitElement { const text = this._inputValue.trim(); if (!text || !this._core || !this._agent || this._isRunning) return; - // Add instructions as a system context on first message - const messageContent = - this.instructions && this._messages.length === 0 - ? `${text}\n\n[System: ${this.instructions}]` - : text; + // On the first user message, prepend any system instructions as a preceding + // system message so the backend receives them before the user turn. + if (this.instructions && !this._initialMessageShown) { + this._initialMessageShown = true; + this._agent.addMessage({ + id: randomUUID(), + role: "system", + content: this.instructions, + }); + } this._agent.addMessage({ id: randomUUID(), role: "user", - content: messageContent, + content: text, }); this._inputValue = ""; this.requestUpdate(); diff --git a/packages/web-chat/src/__tests__/web-chat.spec.ts b/packages/web-chat/src/__tests__/web-chat.spec.ts index 8882581c95f..39c8e8acf91 100644 --- a/packages/web-chat/src/__tests__/web-chat.spec.ts +++ b/packages/web-chat/src/__tests__/web-chat.spec.ts @@ -87,6 +87,8 @@ describe("Web component tag names", () => { describe("CopilotChatElement", () => { it("is a class that can be instantiated", () => { expect(CopilotChatElement).toBeTypeOf("function"); + const el = new CopilotChatElement(); + expect(el).toBeInstanceOf(CopilotChatElement); }); it("observes the expected attributes", () => { @@ -104,6 +106,8 @@ describe("CopilotChatElement", () => { describe("CopilotPopupElement", () => { it("is a class that can be instantiated", () => { expect(CopilotPopupElement).toBeTypeOf("function"); + const el = new CopilotPopupElement(); + expect(el).toBeInstanceOf(CopilotPopupElement); }); it("extends CopilotChatElement", () => { @@ -120,6 +124,8 @@ describe("CopilotPopupElement", () => { describe("CopilotSidebarElement", () => { it("is a class that can be instantiated", () => { expect(CopilotSidebarElement).toBeTypeOf("function"); + const el = new CopilotSidebarElement(); + expect(el).toBeInstanceOf(CopilotSidebarElement); }); it("extends CopilotChatElement", () => { diff --git a/packages/web-chat/tsdown.config.ts b/packages/web-chat/tsdown.config.ts index debaaf7425e..fa397137e2d 100644 --- a/packages/web-chat/tsdown.config.ts +++ b/packages/web-chat/tsdown.config.ts @@ -18,7 +18,15 @@ export default defineConfig([ sourcemap: true, target: "es2018", outDir: "dist", - external: ["lit", "lit/decorators.js"], + external: [ + "lit", + "lit/decorators.js", + "lit/directives/unsafe-html.js", + "marked", + "@copilotkit/core", + "@copilotkit/shared", + "@ag-ui/client", + ], codeSplitting: false, outputOptions(options) { options.entryFileNames = "[name].umd.js";