Repository navigation
feat(command): 支持按游标重读会话输出与断线后恢复 - #167
Closed
porschepo31-lang wants to merge 1 commit into
Closed
porschepo31-lang wants to merge 1 commit into
porschepo31-lang wants to merge 1 commit into
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.
远程
session_observe action=status在返回响应前推进共享输出游标,完成后还会删除会话。响应在网络中丢失时,客户端重试无法重读该段输出;小输出上限也会使未返回的部分无法继续分页获取。本 PR 新增
action=read,使用客户端独立保存的stdout_offset/stderr_offset,返回各流的*_next_offset。重试同一偏移可重读仍在缓冲中的输出,多观察者互不推进游标,完成后的结果也不会被 read 删除。分页保持 UTF-8 边界,运行中的尾部不完整字符等待后续字节;缓冲淘汰或偏移处于字符中间时,用*_missed_bytes明确报告缺口。保留原有 status/write/kill 行为;它们仍可能消费或删除会话。仍使用既有 4 MiB/流、完成后一小时及会话数量上限,不承诺跨 Core 重启保留结果。无需修改共享协议或 NexusDock;变更由 command capability 的工具 Schema 自己拥有。
验证:
make check:完整 Go 测试、脚本检查、vet、构建通过。go test -race ./internal/tool/command/... -count=1 -timeout=3m通过。仓库内的
docs/session-output-replay.md说明调用顺序、兼容性和边界;官方中英文文档将在关联的 agentdock-docs PR 中同步。官方文档同步:uvwt/agentdock-docs#8