Skip to content

同步上游 agy-cli 0.1.153 - #21

Merged
ifccod merged 9 commits into
mainfrom
sync/0.1.153
Nov 27, 2026
Merged

ifccod merged 9 commits into
mainfrom
sync/0.1.153

Conversation

@ifccod

@ifccod ifccod commented Nov 27, 2026

Copy link
Copy Markdown
Owner

合并上游 agy-cli 0.1.121–0.1.153(magpie-community/plugins@35437082),取代 #17、#18、#19、#20。

冲突

只在 index.mjs,6 处,都是上游在补丁挂的位置改了结构:上游代码全留,补丁接回。

  • namedEffort(上游拆出 requestedEffort、读 X-Magpie-Effort):disabled 仍走 disabledEffort。
  • #onNotification:上游先处理 available_commands_update,视频的 dropReadVideo 跟在会话判断后面。
  • acquireProcLocked:留上游的 parkMiss/resumeStep,takeParked 用通道自己的键。
  • makeAnthropicStream:留上游的 toolResultStep/emittedCalls,thinking 关闭照样转发;retry.reply 和 lastToolStep 并存。
  • streamResponse:留上游的 SSE_HEADERS、toolResultStep,retryKey/retryResponse 放在前面。

Retry attach 收窄

上游 0.1.131 的 replay_tool_step 已经处理“带工具结果的请求在回复结束后重发”,比对整份请求的摘要、回放同一个消息 id。补丁的重发键只看消息,消息相同、工具列表变了的请求也会拿到旧回复(tool-step-retry.mjs 查出)。现在补丁只接原请求还在跑的重发,和不带工具结果的请求丢了回复的重发。FORK.md 第 2 条同改。

fork.sh

  • 导入上游前把本地 upstream 分支快进到 origin/upstream。本地停在旧快照时合并基点错,每个上游改过的文件都冲突。
  • bun test 用空 HOME 跑(上游也这样跑)。装了 agy 的机器上,signin/smoke/usage 会读到真实登录而失败,signin 还被判成补丁引入。

测试(本机)

  • video selfcheck ok,fork/patch-e2e.mjs 16/16。
  • test/tool-step-retry.mjs 5/5,补丁开、关各一遍。
  • 空 HOME 全量:本分支和上游快照失败项完全相同,都是 3 项(usage 的计时用例 “a read longer than magpie waits…”、catalog 缺 monorepo 的 registry.json、re2 本机 Go 工具链版本)。

🤖 Generated with Claude Code

github-actions Bot and others added 9 commits November 25, 2026 08:29
…atches

- effort: upstream split requestedEffort into namedEffort + budgetEffort and
  reads magpie's X-Magpie-Effort; disabled still goes to disabledEffort.
- #onNotification: upstream handles available_commands_update before the
  session check; the video drop follows the session check as before.
- acquireProcLocked: upstream's parkMiss/resumeStep kept, takeParked gets the
  lane's own key.
- makeAnthropicStream: upstream's toolResultStep/emittedCalls kept, thinking
  forwarded when disabled; the retry reply is recorded beside lastToolStep.
- streamResponse: upstream's SSE_HEADERS and toolResultStep kept, retryKey
  and retryResponse stay before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… replay

Upstream 0.1.131 replays the step that answered a tool_result request when
the same request comes again (replay_tool_step: whole-request digest, same
message id). The retry key here is the messages alone, so a request with the
same messages and a grown tool list got the old reply. The patch now takes
only a retry of a request still running, and a lost reply of a request with
no tool results; test/tool-step-retry.mjs passes with the patches on and off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fore importing

Actions pushes its snapshots to origin/upstream. A local branch left at an
older snapshot made that snapshot the merge base, and every file upstream
changed since then conflicted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a machine signed in to agy, signin/smoke/usage tests read the real
sign-ins and failed, and a failure that hit only the patched run was
reported as the patch's. The upstream snapshot runs with its own empty
HOME too, and is checked out as refs/heads/upstream (the bare name is
ambiguous with the upstream remote).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ifccod
ifccod merged commit 633a20b into main Nov 27, 2026
1 check passed
@ifccod
ifccod deleted the sync/0.1.153 branch November 27, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant