Repository navigation
fix(proxy): tell a request the server started from a result - #130
Merged
moise10r merged 2 commits intoOct 12, 2026
Merged
Conversation
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.
Closes #7.
What this changes
replyForlooked an incoming server message up inlistRequestIdsandopenCallsbyidalone. Client and server number their ids independently, so a request the server starts can carry the id of a call the client has open. Onmain, withtools/callid 1 open,{"id":1,"method":"sampling/createMessage"}arriving from the server:frameResultandwithNotes, so it reaches the client rewrittentools/list, firesonListing([])and wipes the manifestOne condition fixes it: a server message counts as a response only when it has no
methodand does carry aresultor anerror. Anything the server started — request or notification — goes to the client untouched.How it was verified
Seven tests, all of which fail on
main:sampling/createMessage,roots/list,elicitation/createandpingeach reach the client with their method intact, and no row is written for a call that has not come backtools/listkeeps its manifest when aroots/liststeals its id, and still reads the listing when the real response arrivesprettier,tsc,vitestandknipall clean, on Node 24.Checklist
pnpm format && pnpm typecheck && pnpm test && pnpm deadcodeall passany, no magic values, noconsole.*outsidecli-output.ts