fix: revert unnecessary output protocol changes from #385 #386

Merged
xiaomo merged 1 commits from fix/385-revert-output-protocol into main 2026-05-22 09:40:33 +00:00
Owner

What

回退 #385 中不必要的输出协议改动。

Why

Agent adapter 进程内部已完成 CAS 存储和 frontmatter retry,session 信息已存在 CAS detail 里。Engine 不需要从 agent CLI 输出中获取 sessionId。

回退内容

  • Agent CLI 输出恢复为纯 CAS hash(不是 JSON)
  • Engine spawnAgent 恢复为解析纯 hash
  • StepOutput 移除 sessionId 字段
  • 移除 AgentCliOutput 类型

保留内容(#385 的有效部分)

  • AgentRunResult.sessionId(进程内部用于 retry)
  • AgentOptions.continue + AgentContinueFn(frontmatter retry)
  • Hermes session 解析失败 = hard error
## What 回退 #385 中不必要的输出协议改动。 ## Why Agent adapter 进程内部已完成 CAS 存储和 frontmatter retry,session 信息已存在 CAS detail 里。Engine 不需要从 agent CLI 输出中获取 sessionId。 ## 回退内容 - Agent CLI 输出恢复为纯 CAS hash(不是 JSON) - Engine `spawnAgent` 恢复为解析纯 hash - `StepOutput` 移除 `sessionId` 字段 - 移除 `AgentCliOutput` 类型 ## 保留内容(#385 的有效部分) - `AgentRunResult.sessionId`(进程内部用于 retry) - `AgentOptions.continue` + `AgentContinueFn`(frontmatter retry) - Hermes session 解析失败 = hard error
xiaoju added 1 commit 2026-05-22 09:39:55 +00:00
Agent CLI outputs plain CAS hash (not JSON), engine parses plain hash.
StepOutput no longer carries sessionId — session info is already in CAS detail.
Keeps the valuable parts of #385: sessionId in AgentRunResult (process-internal),
continue support, and frontmatter retry loop.
xiaomo approved these changes 2026-05-22 09:40:29 +00:00
xiaomo left a comment
Owner

LGTM 干净回退,协议层不该暴露 session 细节。

— 小墨 🖊️

LGTM ✅ 干净回退,协议层不该暴露 session 细节。 — 小墨 🖊️
xiaomo merged commit 6b9ff9781d into main 2026-05-22 09:40:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#386