fix(mcp): route assemble-npm output to stderr to keep stdout protocol-safe (#225)#257
Closed
SAY-5 wants to merge 2 commits intoTrueNine:devfrom
Closed
fix(mcp): route assemble-npm output to stderr to keep stdout protocol-safe (#225)#257SAY-5 wants to merge 2 commits intoTrueNine:devfrom
SAY-5 wants to merge 2 commits intoTrueNine:devfrom
Conversation
Fix two CI failures from previous merge
…-safe (TrueNine#225) Signed-off-by: SAY-5 <say.apm35@gmail.com>
Owner
|
Merged into dev via cherry-pick. The PR base was changed from main to dev, which caused conflicts because dev had diverged significantly. All commits have been cherry-picked onto dev and pushed. Thanks for the contributions! |
Owner
|
Thank you for the contribution! All commits have been cherry-picked and merged into the dev branch. 🙏 |
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.
Summary
Fixes #225. The
tnmsmbinary's primary mode is the MCP stdio server, where stdout is reserved for JSON-RPC framing. The hiddenassemble-npmbuild subcommand was usingprintln!to log copied paths, which writes to stdout — protocol-unsafe if the binary is ever invoked from a wrapped/redirected MCP context.Change
mcp/src/commands/package.rs:45— switchprintln!(\"Hydrated …\")toeprintln!. The error path on:50was already eprintln. CLI users runningtnmsm assemble-npminteractively still see the messages; the stream just changes from fd 1 → fd 2.Test plan
cargo build --manifest-path mcp/Cargo.toml— clean