mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
0363017503
The chat never responds and the browser console shows "TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation" on every agent run (onRunFailed, agentId: default). Root cause is in @ag-ui/client@0.0.56's HttpAgent: it stores the global fetch unbound (`this.fetch = config.fetch ?? fetch`) and later invokes it as `this.fetch(...)`, so native fetch runs with the agent instance as its receiver instead of `window`. Native fetch is brand-checked and throws "Illegal invocation". It surfaces in both dev and prod. Fixed upstream in @ag-ui/client@0.0.57 (`config.fetch ?? ((url, init) => fetch(url, init))`), which shipped in @copilotkit/* 1.60.1. Bumping these examples 1.60.0 -> 1.60.1 pulls 0.0.57 transitively; lockfiles regenerated. Scope: only the examples that take @ag-ui transitively from react-core are bumped here. Other integration examples force-pin @ag-ui via `overrides` to 0.0.53/0.0.55, where 1.60.1 would create a version skew; those need a per-integration bump and are intentionally left out of this change.
27 lines
588 B
JSON
27 lines
588 B
JSON
{
|
|
"name": "agent",
|
|
"version": "0.0.1",
|
|
"description": "",
|
|
"keywords": [],
|
|
"license": "ISC",
|
|
"author": "",
|
|
"type": "module",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "langgraphjs dev --port 8123 --no-browser"
|
|
},
|
|
"dependencies": {
|
|
"@copilotkit/sdk-js": "1.60.1",
|
|
"@langchain/core": "1.1.49",
|
|
"@langchain/langgraph": "1.3.0",
|
|
"@langchain/openai": "1.4.4",
|
|
"langchain": "1.3.4"
|
|
},
|
|
"devDependencies": {
|
|
"@langchain/langgraph-cli": "1.2.4",
|
|
"@types/html-to-text": "^9.0.4",
|
|
"@types/node": "^22.9.0",
|
|
"typescript": "^5.6.3"
|
|
}
|
|
}
|