refactor: replace Moderator function with ModeratorTable in WorkflowDefinition (#200)

- WorkflowDefinition.moderator → WorkflowDefinition.table (ModeratorTable)
- Moderator type + tableToModerator no longer exported from protocol/runtime
- tableToModerator internalized in workflow-execute engine layer
- WorkflowDescriptor gains graph: WorkflowGraph (auto-extracted from table)
- buildDescriptor extracts serializable graph edges from ModeratorTable
- validateWorkflowDescriptor validates graph structure
- All templates (develop, solve-issue) export table directly
- CLI init scaffold updated to use ModeratorTable
- 99 tests pass, 0 failures
This commit is contained in:
2026-05-12 10:01:30 +08:00
parent 0fe17b0fb2
commit db45089922
30 changed files with 202 additions and 70 deletions
+4
View File
@@ -6,6 +6,10 @@
".": {
"types": "./dist/index.d.ts",
"import": "./src/index.ts"
},
"./moderator-table.js": {
"types": "./dist/moderator-table.d.ts",
"import": "./src/moderator-table.ts"
}
},
"peerDependencies": {