fix(rpc): 修复 U+2028/U+2029 拆断 NDJSON 导致会话超时 - #557
Merged
Merged
Conversation
Read stdio frames at LF boundaries so valid Unicode text cannot split requests or responses and strand their pending RPCs. Share the reader across all three Node transport inputs and clean up on teardown. Cover UTF-8 chunk boundaries and the real host/sidecar persistence and prompt paths using isolated storage and a loopback provider. fixes #548
Keep the translated specification structure and E2E traceability table aligned with the authoritative transport contract.
Keep the Unicode-separator transport fix. Run the reader tests through the shared package compiler instead of importing TypeScript from desktop, translate the zh-CN framing notes, and reject readline regressions on the three Node stdio RPC paths.
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 #548
Lands #553
会话内容含
U+2028/U+2029时,Nodereadline会把一条合法 JSON 消息拆开,造成session.get/agent.prompt超时。本分支保留 #553 的 LF 分帧读取器,并补上落地加固:packages/shared,不再从 desktop 直接 import.tsreadline验证
packages/sharedndjson 单测 5/5rpc-lifecycle-contract14/14pnpm test:e2e:rpc-unicode通过(真实 HostProcess/AgentSidecar,隔离存储,本地 fixture 模型)pnpm docs:check通过候选版本
origin/main)