fix(cli): route node-target serve through @flue/runtime/node#197
Closed
k161196 wants to merge 1 commit into
Closed
fix(cli): route node-target serve through @flue/runtime/node#197k161196 wants to merge 1 commit into
k161196 wants to merge 1 commit into
Conversation
Node-target builds returned HTTP 500 on every WebSocket upgrade to
`/agents/:name/:id`. Cause: dual-instance Symbol mismatch.
- @flue/cli bundled @hono/node-server into generated dist/server.mjs;
the bundled copy attached WAIT_FOR_WEBSOCKET_SYMBOL on env.
- Generated entry also imported createNodeWebSocketTransport from
@flue/runtime/node (external), which re-imported upgradeWebSocket
from the disk copy of @hono/node-server.
- Two module instances => two distinct Symbol identities. injectWebSocket
wrote symbol A; upgradeWebSocket read symbol B => undefined =>
`new Response(null, { status: 500 })`. Same dual-copy applied to ws.
Fix: re-export `serve` from @flue/runtime/node and import it (plus
createNodeWebSocketTransport) through that single entry in the generated
server. Mark @hono/node-server and ws external in the node-target
bundler so any future imports also share the disk copy. Update dev
test fixture to symlink the now-external deps so the generated server
can resolve them.
Verified end-to-end: handshake 500 -> 101, SDK client streams events.
|
Thanks for the contribution! We're closing this PR and moving the conversation to the issue: #198 We've moved to a model where bugs and feature proposals are discussed in issues/discussions before code review, so the community can help prioritize and shape the work. Your branch is linked from the new thread so the implementation isn't lost — please join us there to continue the conversation. — astrobot 🤖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Node-target builds returned HTTP 500 on every WebSocket upgrade to
/agents/:name/:id. Cause: dual-instance Symbol mismatch.new Response(null, { status: 500 }). Same dual-copy applied to ws.Fix: re-export
servefrom @flue/runtime/node and import it (plus createNodeWebSocketTransport) through that single entry in the generated server. Mark @hono/node-server and ws external in the node-target bundler so any future imports also share the disk copy. Update dev test fixture to symlink the now-external deps so the generated server can resolve them.Verified end-to-end: handshake 500 -> 101, SDK client streams events.