mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-18 21:02:50 +03:00
* build/mcp: externalize @modelcontextprotocol/sdk in standalone server bundle The SDK client graph contains a module-level class-extends-Client cycle against the top-level-await Client module. Webpack's TLA runtime evaluates that circular subgraph out of order when it is inlined into route chunks, throwing "Cannot access 'l' before initialization" during module evaluation. Every request to /api/mcp/stream then answers HTTP 500 on initialize and the failed module is evicted and re-evaluated per request, which floods the logs with the same ReferenceError. Node's native ESM loader resolves the same circular graph through live bindings, so keep the SDK external to the server bundle like the other packages that break only when bundled. Signed-off-by: Minxi Hou <houminxi@gmail.com> * changelog: record @modelcontextprotocol/sdk externalize fix (#13859) Signed-off-by: Minxi Hou <houminxi@gmail.com> --------- Signed-off-by: Minxi Hou <houminxi@gmail.com>