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.