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 vastsa#548
Keep the translated specification structure and E2E traceability table aligned with the authoritative transport contract.
Owner
|
已在当前 main 上落地:#557 (保留本 PR 的 LF 分帧修复,并补了 shared 单测 / 契约锁 / 中文文档)。合入后会关闭本 issue 与本 PR。 |
Owner
|
已由 #557 合入(含本 PR 的分帧修复与落地加固)。 |
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
会话内容含
U+2028/U+2029时,Nodereadline会把一条合法 JSON 消息拆开,造成会话读取或发送请求超时。旧代码已用真实 host 进程复现:写入此类消息后,session.get无法在测试期限内返回。新增共用的 LF 分帧读取器,替换主进程读取 host stdout、主进程读取 sidecar stdout,以及 sidecar 读取 stdin 的三个入口。保留跨数据块的 UTF-8 字符、CRLF 和 EOF 尾帧兼容,并在关闭时释放缓冲和监听器。非法 JSON 仅记录字节长度,不记录消息内容。
文本内容、存储格式及协议版本不变;已有含特殊字符的会话可直接读取,无需修改用户数据。同步补充 RPC 规范和 E2E 场景。
验证
pnpm build:js、Desktop typecheck、pnpm lint、架构检查和pnpm docs:check通过。pnpm test:e2e:rpc-unicode通过:真实 HostProcess/AgentSidecar、隔离存储、本地模拟模型,覆盖历史读取与重启恢复、发送、host proxy 历史恢复、流式回复、收到回复后的 HostProcess 落库,以及错误回复后的健康检查。候选版本
b5aef762598a11f35db137a149eae6aa2b8de114b07b64347693760a23d6e0374f3e263f25326481527e127b3548e68c94c0179692ac5539bc4b7cd8806432619206a5754c224f6969ed928238a1d714。已补齐中文文档镜像的 E2E 索引行,最终提交本地文档检查和 Electron Unicode E2E 均通过。GitHub JS(构建 / 类型检查 / lint / 架构 / 全量测试)、Rust(格式 / clippy / 测试)和 Docs CI 均已通过。Vercel 预览需要维护者授权,此项尚未通过。
仓库交付文档仍有“先合入本地 main 再做 E2E”的旧描述;本次遵循根目录 AGENTS.md,在独立工作目录验证候选提交,未合入本地 main。