Repository navigation
Commit 8681e57
fix(mcp): register toolkits via registerToolkit (outer McpServer), not self-providing McpServer.toolkit
Root-cause (confirmed at effect source): McpServer.toolkit(x) =
Layer.effectDiscard(registerToolkit(x)).pipe(Layer.provide(McpServer.layer))
(effect McpServer.js:951) — it SELF-PROVIDES its own McpServer.layer, so each
declarative toolkit registration (preview + generation, incl. generate_3d)
registers into a throwaway McpServer the HTTP transport (layerHttp) never
serves. The fork's /mcp then exposes an empty tools/list and no harness tool
reaches agents. Switch both declarative registrations to
`Layer.effectDiscard(McpServer.registerToolkit(x))` — which leaves McpServer an
OUTER requirement, discharged from the transport's served instance via the
existing `Layer.provideMerge(McpTransportLive)` — matching the manual
registerPreviewSnapshot/registerInspectGeneration registrations.
STATUS: necessary + correct (all 79 MCP unit tests still pass, tsgo clean), but
NOT yet confirmed sufficient LIVE — the one desktop re-test was a flaky
no-harness-connection turn and a direct /mcp tools/list probe couldn't catch a
live agent. A deeper memo-fork (ancestor-provide of a single McpServer across
transport+registrations) may still be required, plus a PRODUCTION-topology test
(build the real McpHttpServer.layer, assert the served server lists generate_3d)
— the existing McpHttpServer.test.ts builds an ancestor-McpServer topology, NOT
the production provideMerge(layerHttp) one, which is exactly why this shipped
undetected. Tracked in task pingdotgg#155.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AJELkERZpuwwe4zS4iXj271 parent 5d4955d commit 8681e57
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
385 | 395 | | |
386 | 396 | | |
387 | 397 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
391 | 403 | | |
392 | 404 | | |
393 | 405 | | |
| |||
0 commit comments