openpencil/packages/mcp
Danila Poyarkov 9e013e60e7 fix(mcp): fix stdio handshake and eval return values
Stdio handshake:
Server now sends { type: register, token } to WebSocket clients on
connection, so the stdio bridge receives the token immediately instead
of deadlocking while both sides wait to receive.

Eval return values (REPL-style):
Add wrapEvalCode() that detects when the last non-empty line is a value
expression and promotes it to a return statement. Bare expressions like
JSON.stringify(result) now return the value instead of undefined.
Single implementation in packages/core/src/tools/analyze/eval-wrap.ts
used by both the tool and the automation bridge.

Co-authored-by: stiff <v.stiff@gmail.com>
Co-authored-by: Jais Pedersen <jais@pedersens.net>
2026-05-11 12:05:43 +03:00
..
src fix(mcp): fix stdio handshake and eval return values 2026-05-11 12:05:43 +03:00
package.json Refactor architecture boundaries across core, app, and packages (#234) 2026-04-30 15:14:19 +03:00
tsconfig.json Refactor architecture boundaries across core, app, and packages (#234) 2026-04-30 15:14:19 +03:00