From b4e25ea0020dae89304901685e0fc766d7512e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Mon, 18 May 2026 07:12:38 +0000 Subject: [PATCH] docs: add done field to step output --- docs/wf-stateless-design.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/wf-stateless-design.md b/docs/wf-stateless-design.md index 21bfaf5..0444432 100644 --- a/docs/wf-stateless-design.md +++ b/docs/wf-stateless-design.md @@ -63,11 +63,12 @@ uwf thread step 01J7K9M2XNPQR5VWBCDF8G3H4T --agent "bunx uwf-cursor" { "workflow": "4KNM2PXR3B1QW", "thread": "01J7K9M2XNPQR5VWBCDF8G3H4T", - "head": "8FWKR3TN5V1QA" // 新链头 StepNode 的 CAS hash + "head": "8FWKR3TN5V1QA", // 新链头 StepNode 的 CAS hash + "done": false // true = moderator 返回 END,thread 已归档 } ``` -若 moderator 返回 END,thread 归档(从 threads.json 移除),本次 step 不产生新 StepNode,输出中 head 为归档前的最后一个链头。 +`done: true` 时 head 仍然有值(最后一个 StepNode),但 thread 已从 threads.json 移除。 对已结束或不存在的 thread 调用 step 会报错(非 active thread)。 详细信息通过 `uwf thread show ` 或 `json-cas get ` 查看。