Files
Markus Ecker 40205f3900 fix(deps): resolve @ag-ui peers to the renamed build, not the old canary
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.
2026-08-10 15:10:17 +02:00

27 lines
851 B
JSON

{
"name": "@copilotkit/angular-demo-server",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsx --env-file-if-exists ../demo/.env --env-file-if-exists .env src/index.ts",
"start": "tsx --env-file-if-exists ../demo/.env --env-file-if-exists .env src/index.ts"
},
"dependencies": {
"@ag-ui/client": "https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@2350",
"@ag-ui/core": "https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@2350",
"@ag-ui/langgraph": "^0.0.11",
"@ai-sdk/openai": "3.0.36",
"@copilotkit/demo-agents": "workspace:^",
"@copilotkit/runtime": "workspace:^",
"@hono/node-server": "^1.13.6",
"hono": "^4.11.4"
},
"devDependencies": {
"nodemon": "^3.1.7",
"tsx": "^4.19.2",
"typescript": "^5.6.3"
}
}