feat(plugin): replace outputs with Baton verbs - #253
Conversation
Expose reconcile-scoped ask, confirm, draft, and harness capabilities through the public Plugin API and Runner boundary. Persist human decisions and Harness invocations in Baton Core so reconcile receives durable, replayable results. Choose main or new Lane only when Harness execution is scheduled, remove the public TurnRequest and Output contracts, and update documentation and tests for the breaking baton-plugin 0.3.0 API.
| | { | ||
| readonly state: "cancelled"; | ||
| readonly reason?: string; | ||
| }; |
There was a problem hiding this comment.
🤖 devloop code-review · seed-2.1-turbo
The HarnessResult.cancelled state has reason?: string while AskResult.cancelled and ConfirmResult.cancelled both use reason: CancellationReason. The implementation in manager.ts never populates reason and the internal cancellation reason set ("resource") doesn't map to the public CancellationReason union. This means plugin authors cannot distinguish why a harness invocation was cancelled — unlike ask/confirm where the reason is always available. If the intent is to eventually expose the reason, the type should use CancellationReason and the manager.ts implementation should map the internal reason to the public union. If the intent is to never expose the reason, the field should be removed from the type to avoid confusion.
ccr:fp=70ccc8db1d23
There was a problem hiding this comment.
ccr:label=important — origin/main 中取消事件已记录 user/resource/recovery 与 detail,但 HarnessInvocationSnapshot 未投影该结果,Manager 对 harness() 返回无 reason 的 cancelled,并把 draft() 的所有 cancelled 映射为 dismissed,Plugin 无法区分用户放弃与可重试的调度故障。#cross-file
|
🤖 devloop code-review · 1 finding(s)(1 条已作为独立 review thread 发布) |
Expose reconcile-scoped ask, confirm, draft, and harness capabilities through
the public Plugin API and Runner boundary. Persist human decisions and Harness
invocations in Baton Core so reconcile receives durable, replayable results.
Choose main or new Lane only when Harness execution is scheduled, remove the
public TurnRequest and Output contracts, and update documentation and tests for
the breaking baton-plugin 0.3.0 API.