refactor: WorkflowFn input → ThreadInput, remove threadId from bundle contract

- WorkflowFn first param is now ThreadInput { prompt, steps }
- threadId removed from WorkflowFnOptions and ThreadContext (engine-only)
- createRoleModerator seeds context from input.steps (fork/resume ready)
- New test: pre-filled steps skip already-completed roles

Closes #6
小橘 <xiaoju@shazhou.work>
This commit is contained in:
2026-05-06 05:27:14 +00:00
parent 9a4cec2b2d
commit 9943f21f5c
11 changed files with 94 additions and 35 deletions
+1
View File
@@ -47,6 +47,7 @@ export {
START,
type StartStep,
type ThreadContext,
type ThreadInput,
type WorkflowDefinition,
type WorkflowFn,
type WorkflowFnOptions,