Skip to content

feat!: remove graphql and the v1-only helpers from shared, and drop the deps v1 freed - #8103

Merged
AlemTuzlak merged 6 commits into
2.0.0from
alem/pe-1072-1101-v1-leftovers
Oct 30, 2026
Merged

AlemTuzlak merged 6 commits into
2.0.0from
alem/pe-1072-1101-v1-leftovers

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Apps on 2.0 no longer install graphql or uuid through @copilotkit/shared. Browser bundles no longer include graphql either. #8084 removed v1. This PR removes what v1 left behind in shared, runtime, and react-core.

What does this PR do?

  • CopilotKitError extends Error, not GraphQLError. error.extensions keeps the same fields. This was the only reason shared depended on graphql.
  • The runtime-client-gql version check is removed. CopilotKitVersionMismatchError and getPossibleVersionMismatch compared versions with @copilotkit/runtime-client-gql, which 2.0 removed.
  • The v1-only helpers in shared are removed. These are the condition evaluator, the console styling helpers, dataToUUID, and isValidUUID. No package, example, or doc uses them.
  • randomUUID and randomId no longer use the uuid package. They use crypto.randomUUID(). If randomUUID does not exist (React Native's Hermes), they build the UUID from crypto.getRandomValues().
  • The dependencies that v1 removal freed are gone. The table below lists them.
Package Change
shared Remove graphql and uuid. Move zod-to-json-schema (tests only) to devDependencies.
runtime Remove openai (dependency and peer). Nothing imports it. Move ws (tests only) to devDependencies.
react-core Move rxjs (tests only) to devDependencies.

Kept on purpose:

  • @segment/analytics-node and shared/telemetry. PE-1114 must decide what happens to the Segment data first.
  • @scarf/scarf. It counts installs and is never imported, by design.
  • @copilotkit/channels-core in runtime. The runtime imports it.
  • @copilotkit/channels-intelligence in runtime. The runtime loads it with a dynamic import() to start managed Channels. The packed runtime check (pnpm run verify:runtime-package) fails without it.

A new migration page, migrate/shared-2.0.mdx, tells users what to do for each change: the instanceof CopilotKitError check, each removed helper, and the packages they must now install themselves. It also gives the namespace that reproduces dataToUUID IDs with uuid.

BREAKING CHANGE: CopilotKitError extends Error, not GraphQLError. error.extensions keeps the same fields.
CopilotKitVersionMismatchError and getPossibleVersionMismatch are removed. They have no replacement.
@copilotkit/shared no longer exports executeConditions and the condition types, ConsoleColors,
ConsoleStyles, logStyled, styledConsole, logCopilotKitPlatformMessage, publicApiKeyRequired,
dataToUUID, or isValidUUID. For v5 UUIDs or UUID validation, use the uuid package directly.
@copilotkit/runtime no longer depends on openai. If your app imports openai, add it to your dependencies.
Guide: https://docs.copilotkit.ai/migrate/shared-2.0

Related PRs and Issues

Checklist

  • I have read the Contribution Guide
  • If the PR changes or adds functionality, I have updated the relevant documentation
  • If the PR contains a breaking change, the title has ! (for example feat(react-core)!: ...) and the description has a BREAKING CHANGE: line with migration steps. See VERSIONING.md
  • "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

The documentation box covers the new migration page. No other docs or examples use the removed exports. PE-1088 owns the final structure of the 2.0 migration guide. The branch is in this repo, so the maintainer-edits box does not apply.

Testing

Commands run

  • pnpm run verify:runtime-package: passed. The packed runtime installs @copilotkit/channels-intelligence and loads it through ESM and CJS.
  • npx vitest run scripts/release: 276 tests passed, including the public API manifest check.
  • nx run-many -t build check-types on all projects. Every package passed. Two example apps fail for reasons outside this PR: agent-langgraph-interrupt has two @langchain/core versions, and angular-demo-server uses toReversed with an old lib target.
  • nx run-many -t test on shared, runtime, react-core, react-native, core, sdk-js, vue, angular, web-inspector, and a2ui-renderer. All passed. Two react-core chart tests timed out under parallel load. They pass when they run alone (28/28).
  • The shell-docs vitest suites were not run. They need a separate install and generated search data. The new page has no links.
  • The pre-commit test-packages hook was skipped (LEFTHOOK_EXCLUDE=test-packages) because of a flaky channels-teams test. ingress-auth.test.ts fails a different case on each run, and channels-teams uses none of the changed exports. Lint, the lockfile sync, and commitlint ran.

Manual test

  1. Run pnpm install, then pnpm nx run @copilotkit/shared:build.
  2. Run pnpm why graphql --filter @copilotkit/shared. Make sure that it prints nothing.
  3. Run pnpm nx run @copilotkit/shared:test. Make sure that errors.test.ts and random-id.test.ts pass.

How this PR makes testing easy

  • shared/src/utils/__tests__/errors.test.ts checks that CopilotKitError is a plain Error with the same extensions, and that subclasses keep instanceof.
  • showcase/shell-docs/src/content/docs/migrate/shared-2.0.mdx has before and after code for each change.
  • shared/src/utils/__tests__/random-id.test.ts checks the crypto.randomUUID() path, the getRandomValues fallback, and the error when no crypto exists.

Risk / rollback

  • Code that checked error instanceof GraphQLError no longer matches a CopilotKitError. No code in this repo does that, and the migration page covers it.
  • This PR and feat!: remove the 1.x deprecations that 2.0 drops, and migrate them in the codemod #8106 both add a page to migrate/meta.json on the same line. Whichever merges second needs a one-line conflict fix.
  • A React Native app with no crypto.getRandomValues polyfill now gets a clear error from randomUUID. Before, the error came from uuid.
  • To roll back, revert this PR.

Public API change

Before

import { GraphQLError } from "graphql";
import { CopilotKitError, dataToUUID } from "@copilotkit/shared";

error instanceof GraphQLError; // true for a CopilotKitError
dataToUUID({ id: 1 });

After

import { CopilotKitError } from "@copilotkit/shared";
import { v5 as uuidv5 } from "uuid";

error instanceof Error; // true. error.extensions is unchanged.
uuidv5(JSON.stringify({ id: 1 }), MY_NAMESPACE);

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

PE-1072

PE-1101

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/a2ui-renderer@8103

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/agentcore-runner@8103

@copilotkit/angular

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/angular@8103

@copilotkit/channels

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels@8103

@copilotkit/channels-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-core@8103

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-discord@8103

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-intelligence@8103

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-slack@8103

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-teams@8103

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-ui@8103

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-whatsapp@8103

@copilotkit/core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/core@8103

@copilotkit/intelligence-langgraph

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/intelligence-langgraph@8103

@copilotkit/intelligence-mastra

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/intelligence-mastra@8103

@copilotkit/learning

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/learning@8103

@copilotkit/markdown-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/markdown-renderer@8103

@copilotkit/mcp-apps-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/mcp-apps-renderer@8103

@copilotkit/react-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-core@8103

@copilotkit/react-native

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-native@8103

@copilotkit/runtime

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime@8103

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sdk-js@8103

@copilotkit/shared

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/shared@8103

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sqlite-runner@8103

@copilotkit/voice

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/voice@8103

@copilotkit/vue

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/vue@8103

@copilotkit/web-components

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-components@8103

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-inspector@8103

commit: e8e5ed2

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: -6.64 kB (-0.33%)

Total Size: 2.01 MB

📦 View Changed
Filename Size Change
packages/shared/dist/index.cjs 3.72 kB -160 B (-4.13%)
packages/shared/dist/index.mjs 3.13 kB -131 B (-4.01%)
packages/shared/dist/index.umd.js 52.2 kB -1.85 kB (-3.42%)
packages/shared/dist/telemetry/telemetry-client.cjs 1.89 kB +7 B (+0.37%)
packages/shared/dist/telemetry/telemetry-client.mjs 1.85 kB +11 B (+0.6%)
packages/shared/dist/utils/conditions.cjs 0 B -540 B (removed) 🏆
packages/shared/dist/utils/conditions.mjs 0 B -536 B (removed) 🏆
packages/shared/dist/utils/console-styling.cjs 0 B -1.23 kB (removed) 🏆
packages/shared/dist/utils/console-styling.mjs 0 B -1.21 kB (removed) 🏆
packages/shared/dist/utils/errors.cjs 4.1 kB -412 B (-9.14%) ✅
packages/shared/dist/utils/errors.mjs 4.04 kB -375 B (-8.5%) ✅
packages/shared/dist/utils/index.cjs 1.49 kB -27 B (-1.78%)
packages/shared/dist/utils/index.mjs 1.73 kB -106 B (-5.78%) ✅
packages/shared/dist/utils/random-id.cjs 555 B -63 B (-10.19%) 👏
packages/shared/dist/utils/random-id.mjs 546 B -13 B (-2.33%)
ℹ️ View Unchanged
Filename Size
packages/a2ui-renderer/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/a2ui-renderer/dist/a2ui-types.cjs 472 B
packages/a2ui-renderer/dist/a2ui-types.mjs 469 B
packages/a2ui-renderer/dist/index.cjs 959 B
packages/a2ui-renderer/dist/index.mjs 637 B
packages/a2ui-renderer/dist/index.umd.js 13.5 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.cjs 1.52 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.mjs 1.46 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.cjs 1.57 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.mjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs 920 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs 508 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs 1.03 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs 622 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs 845 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs 435 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs 1.11 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs 1.04 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs 799 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs 737 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs 1.65 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs 1.58 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs 856 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs 1.12 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs 1.05 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs 856 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs 446 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs 877 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs 469 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs 995 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs 587 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs 920 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs 508 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs 801 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs 1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs 1.11 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs 1.06 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs 919 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs 504 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs 1.22 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs 788 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs 378 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.cjs 928 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.mjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.cjs 594 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.mjs 571 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.cjs 989 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.mjs 584 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.cjs 800 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.mjs 735 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.cjs 1.08 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.mjs 1.02 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.mjs 1.01 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.cjs 894 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.mjs 839 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.cjs 849 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.mjs 804 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.cjs 310 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.mjs 325 B
packages/a2ui-renderer/dist/react-renderer/catalog-utils.cjs 1.66 kB
packages/a2ui-renderer/dist/react-renderer/catalog-utils.mjs 1.59 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.cjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.mjs 1.42 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.cjs 728 B
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.mjs 671 B
packages/a2ui-renderer/dist/react-renderer/create-catalog.cjs 1.35 kB
packages/a2ui-renderer/dist/react-renderer/create-catalog.mjs 1.28 kB
packages/a2ui-renderer/dist/react-renderer/filter-catalog.cjs 622 B
packages/a2ui-renderer/dist/react-renderer/filter-catalog.mjs 569 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.cjs 316 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.mjs 309 B
packages/a2ui-renderer/dist/react-renderer/index.cjs 409 B
packages/a2ui-renderer/dist/react-renderer/index.mjs 568 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.cjs 236 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.mjs 188 B
packages/a2ui-renderer/dist/react-renderer/styles/index.cjs 239 B
packages/a2ui-renderer/dist/react-renderer/styles/index.mjs 231 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.cjs 436 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.mjs 381 B
packages/core/dist/index.cjs 107 kB
packages/core/dist/index.mjs 106 kB
packages/core/dist/index.umd.js 113 kB
packages/core/dist/styles.cjs 13.5 kB
packages/core/dist/styles.mjs 13.4 kB
packages/mcp-apps-renderer/dist/activity.cjs 259 B
packages/mcp-apps-renderer/dist/activity.mjs 170 B
packages/mcp-apps-renderer/dist/activity.umd.js 2.24 kB
packages/mcp-apps-renderer/dist/constants.cjs 714 B
packages/mcp-apps-renderer/dist/constants.mjs 712 B
packages/mcp-apps-renderer/dist/content-schema.cjs 768 B
packages/mcp-apps-renderer/dist/content-schema.mjs 765 B
packages/mcp-apps-renderer/dist/follow-up.cjs 796 B
packages/mcp-apps-renderer/dist/follow-up.mjs 794 B
packages/mcp-apps-renderer/dist/index.mjs 369 B
packages/mcp-apps-renderer/dist/request-queue.mjs 2.39 kB
packages/mcp-apps-renderer/dist/sandbox.mjs 2 kB
packages/mcp-apps-renderer/dist/session.mjs 6.91 kB
packages/react-core/dist/context.cjs 1.58 kB
packages/react-core/dist/context.mjs 1.5 kB
packages/react-core/dist/generative-ui.cjs 71.1 kB
packages/react-core/dist/generative-ui.mjs 70.5 kB
packages/react-core/dist/headless.cjs 17.7 kB
packages/react-core/dist/headless.mjs 17.2 kB
packages/react-core/dist/index.cjs 134 kB
packages/react-core/dist/index.mjs 133 kB
packages/react-core/dist/index.umd.js 168 kB
packages/react-core/dist/MarkdownSurfaces-Bd--93O1.mjs 38.9 kB
packages/react-core/dist/MarkdownSurfaces-S4wfUl3J.cjs 39.5 kB
packages/react-native/dist/components/index.cjs 8.15 kB
packages/react-native/dist/components/index.mjs 8.01 kB
packages/react-native/dist/CopilotKitProvider-Byw3cqe2.cjs 1.58 kB
packages/react-native/dist/CopilotKitProvider-CE4bc6CP.mjs 1.48 kB
packages/react-native/dist/headless.cjs 632 B
packages/react-native/dist/headless.mjs 370 B
packages/react-native/dist/index.cjs 6.59 kB
packages/react-native/dist/index.mjs 6.22 kB
packages/react-native/dist/Markdown-C_9Re36O.cjs 803 B
packages/react-native/dist/Markdown-C6AsLHmd.mjs 677 B
packages/react-native/dist/MarkdownRendererContext-BRNe808d.cjs 915 B
packages/react-native/dist/MarkdownRendererContext-CAnuohIS.mjs 431 B
packages/react-native/dist/polyfills.cjs 193 B
packages/react-native/dist/polyfills.mjs 195 B
packages/react-native/dist/polyfills/crypto.cjs 373 B
packages/react-native/dist/polyfills/crypto.mjs 381 B
packages/react-native/dist/polyfills/dom.cjs 540 B
packages/react-native/dist/polyfills/dom.mjs 550 B
packages/react-native/dist/polyfills/encoding.cjs 345 B
packages/react-native/dist/polyfills/encoding.mjs 307 B
packages/react-native/dist/polyfills/location.cjs 236 B
packages/react-native/dist/polyfills/location.mjs 244 B
packages/react-native/dist/polyfills/streams.cjs 383 B
packages/react-native/dist/polyfills/streams.mjs 339 B
packages/react-native/dist/streaming-fetch-Bm91EsRc.cjs 2.36 kB
packages/react-native/dist/streaming-fetch-Dm1oN4f2.mjs 2.31 kB
packages/shared/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/shared/dist/a2ui-envelope.cjs 2.45 kB
packages/shared/dist/a2ui-envelope.mjs 2.43 kB
packages/shared/dist/a2ui-prompts.cjs 7.65 kB
packages/shared/dist/a2ui-prompts.mjs 7.59 kB
packages/shared/dist/attachments/content.cjs 255 B
packages/shared/dist/attachments/content.mjs 253 B
packages/shared/dist/attachments/utils.cjs 1.83 kB
packages/shared/dist/attachments/utils.mjs 1.79 kB
packages/shared/dist/constants/index.cjs 501 B
packages/shared/dist/constants/index.mjs 480 B
packages/shared/dist/debug.cjs 454 B
packages/shared/dist/debug.mjs 452 B
packages/shared/dist/event-transforms/index.cjs 335 B
packages/shared/dist/event-transforms/index.mjs 165 B
packages/shared/dist/event-transforms/open-generative-ui-middleware.cjs 2.42 kB
packages/shared/dist/event-transforms/open-generative-ui-middleware.mjs 2.35 kB
packages/shared/dist/event-transforms/recorded-events.cjs 988 B
packages/shared/dist/event-transforms/recorded-events.mjs 925 B
packages/shared/dist/finalize-events.cjs 1.94 kB
packages/shared/dist/finalize-events.mjs 1.88 kB
packages/shared/dist/generative-ui/basic-functions.cjs 2.46 kB
packages/shared/dist/generative-ui/basic-functions.mjs 2.41 kB
packages/shared/dist/generative-ui/child-refs.cjs 2.34 kB
packages/shared/dist/generative-ui/child-refs.mjs 2.27 kB
packages/shared/dist/generative-ui/is-record.cjs 226 B
packages/shared/dist/generative-ui/is-record.mjs 223 B
packages/shared/dist/generative-ui/prompt.cjs 3.65 kB
packages/shared/dist/generative-ui/prompt.mjs 3.63 kB
packages/shared/dist/generative-ui/render-ui-args.cjs 1.48 kB
packages/shared/dist/generative-ui/render-ui-args.mjs 1.46 kB
packages/shared/dist/generative-ui/types.cjs 1.57 kB
packages/shared/dist/generative-ui/types.mjs 1.52 kB
packages/shared/dist/generative-ui/validate-operation.cjs 5.61 kB
packages/shared/dist/generative-ui/validate-operation.mjs 5.55 kB
packages/shared/dist/intelligence-routing-fields.cjs 778 B
packages/shared/dist/intelligence-routing-fields.mjs 775 B
packages/shared/dist/logger.cjs 112 B
packages/shared/dist/logger.mjs 112 B
packages/shared/dist/open-generative-ui-prompts.cjs 1.59 kB
packages/shared/dist/open-generative-ui-prompts.mjs 1.59 kB
packages/shared/dist/package.cjs 181 B
packages/shared/dist/package.mjs 116 B
packages/shared/dist/standard-schema.cjs 740 B
packages/shared/dist/standard-schema.mjs 737 B
packages/shared/dist/telemetry/index.cjs 358 B
packages/shared/dist/telemetry/index.mjs 250 B
packages/shared/dist/telemetry/lambda-client.cjs 1.59 kB
packages/shared/dist/telemetry/lambda-client.mjs 1.58 kB
packages/shared/dist/telemetry/model-host.cjs 1.63 kB
packages/shared/dist/telemetry/model-host.mjs 1.63 kB
packages/shared/dist/telemetry/sampling.cjs 956 B
packages/shared/dist/telemetry/sampling.mjs 935 B
packages/shared/dist/telemetry/telemetry-disabled.cjs 502 B
packages/shared/dist/telemetry/telemetry-disabled.mjs 490 B
packages/shared/dist/telemetry/utils.cjs 271 B
packages/shared/dist/telemetry/utils.mjs 268 B
packages/shared/dist/transcription-errors.cjs 951 B
packages/shared/dist/transcription-errors.mjs 944 B
packages/shared/dist/utils/clipboard.cjs 407 B
packages/shared/dist/utils/clipboard.mjs 405 B
packages/shared/dist/utils/dashboard-url.cjs 415 B
packages/shared/dist/utils/dashboard-url.mjs 413 B
packages/shared/dist/utils/inspector-learning.cjs 2.74 kB
packages/shared/dist/utils/inspector-learning.mjs 2.73 kB
packages/shared/dist/utils/inspector-metadata.cjs 1.44 kB
packages/shared/dist/utils/inspector-metadata.mjs 1.43 kB
packages/shared/dist/utils/inspector-visibility.cjs 285 B
packages/shared/dist/utils/inspector-visibility.mjs 282 B
packages/shared/dist/utils/json-schema.cjs 1.97 kB
packages/shared/dist/utils/json-schema.mjs 1.91 kB
packages/shared/dist/utils/process-env.cjs 293 B
packages/shared/dist/utils/process-env.mjs 290 B
packages/shared/dist/utils/requests.cjs 706 B
packages/shared/dist/utils/requests.mjs 704 B
packages/shared/dist/utils/row-render-keys.cjs 3.38 kB
packages/shared/dist/utils/row-render-keys.mjs 3.36 kB
packages/shared/dist/utils/types.cjs 161 B
packages/shared/dist/utils/types.mjs 160 B
packages/voice/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/voice/dist/index.cjs 175 B
packages/voice/dist/index.mjs 95 B
packages/voice/dist/index.umd.js 1.49 kB
packages/voice/dist/transcription/transcription-service-openai.cjs 486 B
packages/voice/dist/transcription/transcription-service-openai.mjs 430 B
packages/web-inspector/dist/assets/inspector-logo-kite.cjs 2.36 kB
packages/web-inspector/dist/assets/inspector-logo-kite.mjs 2.3 kB
packages/web-inspector/dist/assets/inspector-logo.cjs 4.32 kB
packages/web-inspector/dist/assets/inspector-logo.mjs 4.23 kB
packages/web-inspector/dist/components/generative-ui-view.cjs 7.95 kB
packages/web-inspector/dist/components/generative-ui-view.mjs 7.93 kB
packages/web-inspector/dist/components/learning-view.cjs 11.2 kB
packages/web-inspector/dist/components/learning-view.mjs 11.2 kB
packages/web-inspector/dist/index.cjs 132 kB
packages/web-inspector/dist/index.mjs 132 kB
packages/web-inspector/dist/index.umd.js 209 kB
packages/web-inspector/dist/lib/context-helpers.cjs 866 B
packages/web-inspector/dist/lib/context-helpers.mjs 835 B
packages/web-inspector/dist/lib/home-briefing.cjs 2.8 kB
packages/web-inspector/dist/lib/home-briefing.mjs 2.79 kB
packages/web-inspector/dist/lib/hud-config.cjs 1.34 kB
packages/web-inspector/dist/lib/hud-config.mjs 1.33 kB
packages/web-inspector/dist/lib/hud-defaults.cjs 287 B
packages/web-inspector/dist/lib/hud-defaults.mjs 285 B
packages/web-inspector/dist/lib/hud-loader.cjs 557 B
packages/web-inspector/dist/lib/hud-loader.mjs 546 B
packages/web-inspector/dist/lib/inspector-learning.cjs 754 B
packages/web-inspector/dist/lib/inspector-learning.mjs 732 B
packages/web-inspector/dist/lib/inspector-metadata.cjs 760 B
packages/web-inspector/dist/lib/inspector-metadata.mjs 750 B
packages/web-inspector/dist/lib/inspector-nav.cjs 685 B
packages/web-inspector/dist/lib/inspector-nav.mjs 661 B
packages/web-inspector/dist/lib/json-block.cjs 1.95 kB
packages/web-inspector/dist/lib/json-block.mjs 1.91 kB
packages/web-inspector/dist/lib/learning-setup.cjs 1.12 kB
packages/web-inspector/dist/lib/learning-setup.mjs 1.09 kB
packages/web-inspector/dist/lib/notification-loader.cjs 792 B
packages/web-inspector/dist/lib/notification-loader.mjs 786 B
packages/web-inspector/dist/lib/notifications.cjs 2.39 kB
packages/web-inspector/dist/lib/notifications.mjs 2.37 kB
packages/web-inspector/dist/lib/onboarding-prompt.cjs 2.38 kB
packages/web-inspector/dist/lib/onboarding-prompt.mjs 2.37 kB
packages/web-inspector/dist/lib/persistence.cjs 3.61 kB
packages/web-inspector/dist/lib/persistence.mjs 3.52 kB
packages/web-inspector/dist/lib/pop-out.cjs 1.07 kB
packages/web-inspector/dist/lib/pop-out.mjs 1.05 kB
packages/web-inspector/dist/lib/telemetry.cjs 5.59 kB
packages/web-inspector/dist/lib/telemetry.mjs 5.38 kB
packages/web-inspector/dist/lib/thread-selection.cjs 566 B
packages/web-inspector/dist/lib/thread-selection.mjs 563 B
packages/web-inspector/dist/package.cjs 181 B
packages/web-inspector/dist/package.mjs 116 B
packages/web-inspector/dist/styles/generated.cjs 20.1 kB
packages/web-inspector/dist/styles/generated.mjs 20 kB
packages/web-inspector/dist/styles/notification-article.cjs 1.44 kB
packages/web-inspector/dist/styles/notification-article.mjs 1.44 kB

compressed-size-action

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 43 services digest-pinned.

Run 2026-10-30 06:59:21 PDT — 0 finding(s).

@AlemTuzlak
AlemTuzlak force-pushed the alem/pe-1072-1101-v1-leftovers branch from 11498e7 to dba3ecd Compare October 30, 2026 13:33
AlemTuzlak and others added 6 commits October 30, 2026 14:55
…lient-gql version check

CopilotKitError extended GraphQLError, so every app that installed
@copilotkit/shared, browser bundles included, pulled in graphql. It now
extends Error and keeps the same `extensions` object.

CopilotKitVersionMismatchError and getPossibleVersionMismatch compared
versions with @copilotkit/runtime-client-gql, which 2.0 removed.

Refs: PE-1072, PE-1101

BREAKING CHANGE: CopilotKitError extends Error, not GraphQLError.
`error.extensions` keeps the same fields. CopilotKitVersionMismatchError
and getPossibleVersionMismatch are removed. They have no replacement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t the uuid package

Only v1 used the condition evaluator, the console styling helpers,
dataToUUID, and isValidUUID. randomUUID and randomId now use
crypto.randomUUID(), and build the UUID from crypto.getRandomValues()
where randomUUID does not exist (React Native's Hermes).

Refs: PE-1101

BREAKING CHANGE: @copilotkit/shared no longer exports executeConditions,
the condition types, ConsoleColors, ConsoleStyles, logStyled,
styledConsole, logCopilotKitPlatformMessage, publicApiKeyRequired,
dataToUUID, or isValidUUID. For v5 UUIDs or validation, use the uuid package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- shared: remove graphql and uuid. zod-to-json-schema is used only in
  tests, so it moves to devDependencies.
- runtime: remove openai (dependency and peer), which nothing imports.
  ws and @copilotkit/channels-intelligence are used only in tests, so
  they move to devDependencies.
- react-core: rxjs is used only in tests, so it moves to devDependencies.

Refs: PE-1101

BREAKING CHANGE: @copilotkit/runtime no longer lists openai as a dependency
or peer. If your app imports openai, add it to your own dependencies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The runtime loads it with a dynamic import when it starts managed Channels.
The packed runtime check failed without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AlemTuzlak
AlemTuzlak force-pushed the alem/pe-1072-1101-v1-leftovers branch from dba3ecd to e8e5ed2 Compare October 30, 2026 13:58
@AlemTuzlak
AlemTuzlak merged commit 19f93b2 into 2.0.0 Oct 30, 2026
80 of 97 checks passed
@AlemTuzlak
AlemTuzlak deleted the alem/pe-1072-1101-v1-leftovers branch October 30, 2026 14:44
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…or breaks (#8202)

Most react-core slot tests passed with slot overrides switched off. This
PR rewrites them so that they fail when a slot breaks. It also deletes
tests that guard nothing. No production code changes.

Part of PE-1086. v1 and the GraphQL runtime are already gone from
`2.0.0` (#8084, #8103), so nothing in react-core was skipped for pending
removal.

## What does this PR do?

The rot came from four patterns:

1. `expect(container.querySelector(...)).toBeDefined()`. `querySelector`
and `queryBy*` return `null`, and `null` is defined, so the check always
passes.
2. `if (el) { expect(...) }`. When the element is missing, the test
asserts nothing.
3. Tests with no assertion, or that assert on the test's own mock.
4. The same slot matrix repeated in the popup, sidebar, chat view and
message view files.

### How I measured it

I applied each mutation locally, ran the tests, and reverted it. Nothing
from the mutations is committed.

- **M-slots-off:** `renderSlotElement` in `lib/slots.tsx` always renders
the default component, so every slot override is ignored.
- **M-resolve:** `resolveSlotComponent` in `CopilotChatMessageView.tsx`
always returns the default. The message view resolves the assistant and
user message slots with this function, not with `renderSlot`.

Before this PR, **341 of 427** tests in the slot files and
`lib/__tests__` passed under M-slots-off.

### Per file

"Survive" = the test still passes under M-slots-off + M-resolve. After
this PR, every survivor tests something that is not a slot override:
positioning, children render props, labels, root `className`, or width.

| File | Before (tests / survive) | After (tests / survive) | Notes |
|---|---|---|---|
| `CopilotChatInput.slots.e2e` | 48 / 42 | 36 / 10 | Buttons now render
(transcribe mode, `toolsMenu`). Duplicates of
`CopilotChatInput.test.tsx` removed. |
| `CopilotChatView.slots.e2e` | 44 / 32 | 34 / 2 | New helper scrolls
the view so the scroll-to-bottom button renders. Before, its tests never
saw the button. |
| `CopilotChatMessageView.slots.e2e` | 42 / 42 | 15 / 1 | All 42
survived. The sub-button matrix moved to the assistant and user message
files. Thumbs are covered by `CopilotChat.raw-event-feedback.test.tsx`.
|
| `CopilotChatAssistantMessage.slots.e2e` | 26 / 18 | 18 / 2 |
`markdownRenderer` never forwards `data-testid`, so that test now checks
an object `className`. The `toolCallsView` string-slot test is deleted:
`CopilotChatToolCallsView` ignores `className`, so nothing is
observable. |
| `CopilotChatUserMessage.slots.e2e` | 28 / 17 | 26 / 6 | The only home
for user message slots. It now covers all 5 slots in each form with
`it.each`. |
| `CopilotChatSuggestionView.slots.e2e` | 24 / 14 | 23 / 10 | The
loading test only counted buttons. It now checks that only the loading
pill is busy and disabled. |
| `CopilotModalHeader.slots.e2e` | 24 / 16 | 19 / 8 | The custom
close-button test asserted the test's own handler. It now checks that
the bound `onClick` closes the modal. |
| `CopilotPopupView.slots.e2e` | 33 / 28 | 16 / 7 | The width and height
tests checked only that the style named the CSS variable, which the
default also sets. They now check the value. |
| `CopilotSidebarView.slots.e2e` | 25 / 20 | 12 / 3 | Same width fix.
The inherited chat view matrix is now one forwarding test. |
| `CopilotChat.slots.e2e` | 23 / 18 | 8 / 1 | Deleted the
`container.firstChild` smoke tests (they pass when `CopilotChat` renders
nothing), a test that asserted its own mock was not called, and a test
with no assertion. |
| `CopilotChatView.onClick.e2e` | 29 / 19 | 17 / 3 | The submit test
looked for a `<form>` that does not exist, so it never asserted. The
add-menu click never fired because the button is disabled without menu
items. |
| `CopilotChatAssistantMessage.test` | `toBeDefined` on DOM queries |
`not.toBeNull()` | Class-slot tests: 0 of 4 failed under M-slots-off
before, 3 of 4 after. The 4th tests the root `className` prop. |
| `CopilotChatInput.test`, `CopilotChatToolRendering.e2e` |
`toBeDefined` on DOM queries | `not.toBeNull()` / `getByTestId` |
`waitFor(() => expect(queryByTestId(..)).toBeDefined())` resolved at
once. It now waits for the element. |
| `use-frontend-tool.e2e` | 2 hollow tests | fixed | The wildcard result
check never ran: `testId("tc1")` was called twice, so the result never
matched the call. The forwarded-tools test accepted an empty array.
Mutation `addTool` → no-op: the old test passes, the new one fails. |
| `lib/__tests__/renderSlot.test` | 3 conditional tests + 1 tautology |
fixed | The memo test counted two separate renders. It now rerenders
with equal props and expects 1 render. Mutation "memo comparator returns
false": the old test passes, the new one fails. |

Typed props replace most `as any` casts in the rewritten tests.

## Related PRs and Issues

- PE-1086 (Linear)
- Related: PE-1076 (mutation-testing baseline). This PR does not add
Stryker config.

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation (not applicable: tests only)
- [ ] If the PR contains a breaking change, the title has `!` (not
applicable)
- [ ] "Allow edits by maintainers" is checked

## Testing

**Commands run**

- `nx run @copilotkit/react-core:test`: 197 files and 2369 tests pass,
35 skipped (unchanged `skipIf` gates).
- `nx run @copilotkit/react-core:check-types
--exclude-task-dependencies`: passes.
- `oxfmt` and the oxlint gate on every changed file: pass.
- Each mutation above, applied and reverted locally.

**Manual test**

1. In `packages/react-core/src/lib/slots.tsx`, add `return
React.createElement(DefaultComponent, props);` as the first line of
`renderSlotElement`.
2. Run `pnpm vitest run
src/components/chat/__tests__/CopilotChatInput.slots.e2e.test.tsx` in
`packages/react-core`.
3. On `2.0.0`, 42 of 48 tests pass. On this branch, 26 of 36 fail.
4. Revert the line.

**How this PR makes testing easy**

The changes are tests only. The mutation steps above reproduce the
numbers in the table.

## Risk / rollback

Low. Only test files change. If a rewritten test turns out to be flaky,
revert this PR or that one commit. Each commit covers one group of
files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…o that check nothing (#8204)

Three runtime tests passed only because any `Response` passed. None of
them reached the code it names. This PR makes them reach it and assert
the status. It also deletes two tests that check nothing. No production
code changes.

Part of PE-1086. v1 and the GraphQL runtime are already gone from
`2.0.0` (#8084, #8103), so nothing in runtime was skipped for pending
removal.

## What does this PR do?

### Rewritten

| Test | What was wrong | Evidence |
|---|---|---|
| `fetch-handler.test.ts` › "returns 500 JSON error for unhandled
errors" | The body had no `messages`, so the request got a **400** from
validation. The agent never ran. The test only checked
`toBeInstanceOf(Response)`. | The probe showed a 400 `Invalid request
body`. Mutation **M-A** (the "Failed to run agent" response in
`handle-run.ts` returns 200 instead of 500): the old test passes, the
new one fails. |
| `fetch-handler-validation.test.ts` › "CORS headers present on 500
error responses" | Same body problem: it got a 400, not a 500. |
Mutation **M-A**: the old test passes, the new one fails. |
| `code-review-fixes.test.ts` › "single-route agent/run works after
onBeforeHandler replaces request" | The test's own hook built `new
Request(..., { body: stream })` without `duplex`, and that throws in
Node. The handler returned a **500** `internal_error` and `agent/run`
never ran. | `onError` showed `TypeError: RequestInit: duplex option is
required`. Mutation **M-B** (single-route dispatch sends `{}` instead of
`methodCall.body` for `agent/run`): the old test passes, the new one
fails. |

Each rewritten test now sends a valid run body and asserts the status it
names: 500 with `{"error":"Failed to run agent","message":"boom"}`, 500
with CORS headers, or 200 with `text/event-stream`.

### Deleted

| Test | Why |
|---|---|
| `mcp-clients.test.ts` › "type compatibility: @ai-sdk/mcp MCPClient
satisfies MCPClientProvider" | It cast `tools()` with `as unknown as`
and ended with `expect(true).toBe(true)`, so it checked nothing at
runtime or compile time. Without the cast, `tsc` rejects the claim (see
below). |
| `mcp-apps-middleware-integration.test.ts` › "can be created with
mcpServers config pointing at MCPMock URL" | It asserted that `new
MCPAppsMiddleware(...)` is an instance of `MCPAppsMiddleware`. That is
always true. The other tests in the file use the middleware. |

### Finding for a follow-up (not fixed here)

An `@ai-sdk/mcp` `MCPClient` is **not** assignable to
`MCPClientProvider`. Its `tools()` returns MCP tools whose `inputSchema`
is `FlexibleSchema<unknown>`, and that does not fit the `ai` `ToolSet`.
A user who passes a real `MCPClient` to `mcpClients` gets a type error.
The deleted test hid this with a cast. This PR changes tests only, so
the type stays as it is.

## Related PRs and Issues

- PE-1086 (Linear)
- react-core part: #8202

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation (not applicable: tests only)
- [ ] If the PR contains a breaking change, the title has `!` (not
applicable)
- [ ] "Allow edits by maintainers" is checked

## Testing

**Commands run**

- `nx run @copilotkit/runtime:test`: 184 files and 3013 tests pass, 4
skipped.
- `nx run @copilotkit/runtime:check-types --exclude-task-dependencies`:
passes.
- `oxfmt` and the oxlint gate on every changed file: pass.
- Mutations M-A and M-B, applied and reverted locally. Nothing from them
is committed.

**Manual test**

1. In `packages/runtime/src/runtime/handlers/handle-run.ts`, change
`status: 500` in the "Failed to run agent" response to `status: 200`.
2. Run `pnpm vitest run src/runtime/__tests__/fetch-handler.test.ts` in
`packages/runtime`.
3. On `2.0.0`, all tests pass. On this branch, "returns 500 JSON error
for unhandled errors" fails.
4. Revert the change.

**How this PR makes testing easy**

The changes are tests only. The mutation steps above reproduce the
evidence.

## Risk / rollback

Low. Only test files change. To undo, revert the PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant