mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
40205f3900
The lockfile installed TWO incompatible copies of the protocol: the PR-2350 preview carrying `subagentRunId`, and the old `0.0.59-canary.1785518626.0` carrying `subagentId`. Any subagent-attributed event passing through a package bound to the canary copy lost its attribution silently -- the registry would read a field the stream no longer emits, so every lookup returned undefined with no error. Reported in review of the rename commit. The cause is peer auto-install, which took a while to find. `pnpm.overrides` governs DECLARED dependencies. `@ag-ui/langgraph`, `@ag-ui/a2a` and `@ag-ui/mcp-apps-middleware` declare `@ag-ui/core` / `@ag-ui/client` as PEERS, and four workspace packages depended on them without declaring those peers themselves -- so pnpm auto-installed the peers straight from the registry, resolving to the canary and bypassing the overrides. That is why the overrides looked ignored: they were never consulted for those edges. Fixed the conventional way, by declaring the peers so they resolve from the graph instead of being fetched: - `packages/sdk-js` -- @ag-ui/core, @ag-ui/client - `examples/v2/angular/demo-server` -- @ag-ui/core, @ag-ui/client - `examples/showcases/generative-ui-playground` -- @ag-ui/core - `examples/v2/vue/demo` -- @ag-ui/client (it declared mcp-apps-middleware but no client, which was the last remaining edge) Result: zero references to the canary in the lockfile, and exactly ONE @ag-ui/core installed -- the renamed preview. Verified by deleting the stale store directories and reinstalling from the committed lockfile alone: they are not recreated, so nothing can reach the old copy. Things that did NOT work, recorded so they are not retried: plain install, `--force`, `pnpm dedupe`, `>`-scoped overrides (`@ag-ui/a2a>@ag-ui/core`), version-specific overrides, and deleting the lockfile to regenerate from scratch -- which reproduced it byte-identically, since the resolution was correct given the package.json files rather than stale. These four declarations are TEMPORARY, like the overrides they support, and come out with them when @ag-ui publishes the rename. Verified: @copilotkit/core, react-core and sdk-js typecheck; react-core 1424 tests and vue 1071 tests pass.