Adds two CI signals for keeping the published packages small and broadly compatible:
- Bundle size: size-limit file-mode config across packages plus a
CopilotChat import-size regression signal (gzip) so growth in the
headline consumer entrypoint is visible on every PR. A bundle-size
workflow comments results on the PR (Phase 1: no hard-fail).
- ES compatibility: a compat-check (es-check) script across 9 packages
with a root .browserslistrc, validating built .mjs/.cjs against the
es2022 build target.
The measure script is importable (measureBundle) and unit-tested. Dev
docs live under dev-docs/ (bundle-size.md, browser-compat.md). All
action refs are pinned to full commit SHAs for supply-chain safety.
The prepack script ran `pnpm run build` during `pnpm publish`, duplicating
the build that prerelease.ts/publish-release.ts already do across the
workspace. With tsdown's `exports: true` regenerating package.json's
exports field on every build, the second rewrite happened mid-publish
and pnpm's pack step failed with ENOENT on the staging tarball.
No other monorepo package has prepack — bringing a2ui-renderer in line.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrap the loading-skeleton provider example in children (was self-closing
while every other example wraps CopilotChat).
- Declare `const theme` in the custom catalog snippet so the `a2ui={{ theme,
catalog }}` spread isn't referencing an undefined identifier.
- Mirror the real built-in bridge's `if (copilotkit.properties)` guard in
the try/finally cleanup example so the pattern doesn't throw
`TypeError: Cannot destructure null` and mask the original runAgent error.
- Drop the "Explicit renderer" subsection: construction-only example
contradicted the adjacent "do NOT pass to renderActivityMessages"
anti-pattern and had no legitimate usage snippet.
- Clarify frontmatter: `createA2UIMessageRenderer` ships from
`@copilotkit/react-core/v2`; low-level primitives ship from
`@copilotkit/a2ui-renderer`. Removed stale `@ag-ui/a2ui-middleware`
reference since no example imports it.
- Wrap Python examples in `async def agent_generator():` and mark as
pseudocode (surface_id kwarg shape varies by A2UI SDK version).
- Soften the "only @copilotkitnext/angular" blanket claim to describe the
specific mistake instead.
- package.json: add per-condition `types` to the `exports` map so
`attw --profile node16` and TS `moduleResolution: node16/nodenext/bundler`
consumers resolve types correctly via both import and require.
Replace @a2ui/lit with @a2ui/web_core 0.9, introduce createCatalog() API for
custom component catalogs, add basic (18 components) and minimal (5 components)
built-in catalogs, CSS variable theming for dark mode, eliminate XSS vector
(dangerouslySetInnerHTML removed from Text component).
Reverts the copy-dts.mjs approach from #3612 in favor of typesVersions
which is the standard Node/TS mechanism for resolving subpath types
under legacy moduleResolution: "node".
Copies .d.cts → .d.ts after each tsdown build so consumers on
moduleResolution "node" (e.g. DocuSign) can resolve types without
changing their tsconfig. Also points the "types" field back to .d.ts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All @copilotkit/* packages were missing type declarations in their exports
map. This meant TypeScript couldn't resolve types for subpath imports like
@copilotkit/react-core/v2 without manual tsconfig paths workarounds
pointing to dist .d.ts files (which no longer exist after the tsup to
tsdown migration).
Uses nested conditional exports to map .d.mts for ESM and .d.cts for CJS
consumers, satisfying both attw and TypeScript module resolution under
nodenext and bundler modes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>