This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.

ChaiHaoandClaude Fable 5
7c609e852c
Mastra 化阶段1:抽 FlowRuntime 端口 —— 编排层执行面成为可替换切面,解耦完全成形
目标(用户定):完全实现编排层与活动解耦。解耦线(TaskGateway 起活动 / 终态回报)
本就存在;缺的是 CONTRACT M5-1 那句「Mastra 编译器作可替换 adapter、usecase 不动」
的端口 —— 勘察坐实它此前不存在,状态机直接写在 usecase 里揉着五端口副作用编排。
- port.ts 立 FlowRuntime 端口:begin / onTaskTerminal / applyFailure /
onApprovalVerdict / refreshState / terminate —— 执行面的全部
- 状态机整体迁入 internal/runtime/self-hosted-runtime.ts(逐字搬迁,行为零变化):
enter(调度+组轮值分派+实例落 assignee)、advanceFrom(条件出边选路+死路诊断+
分支不连坐)、失败走向四选一、审批裁决(边优先、声明兜底)、三态聚合投影、终止级联
- process-service 573→248 行薄壳:定义生命周期(保存/激活/校验)+ 起单前置
(取生效版/入参校验/工作组快照/建单留痕)+ 五方法委托;
ProcessServiceDeps.runtime 可注入 —— Mastra 编译产物从这里换入,路由/接线零动
- index 出口 FlowRuntime 型;CONTRACT.md 记切面与已核实的语义冲突清单
(reopen 无原语待 spike / parallel 失败连坐须 step 内自吞 / abnormal 三态 /
node_instance 投影必留);debt M5-1 → 切面已立
等价性护栏:process 49 单测 + 八例端到端真库,提取前后原样全绿 —— 行为零变化实证。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
2026-07-28 23:12:04 +08:00
..
2026-07-28 21:24:41 +08:00
2026-07-28 23:12:04 +08:00
2026-07-28 23:12:04 +08:00
2026-07-28 20:11:41 +08:00
2026-07-28 23:12:04 +08:00
2026-07-27 01:55:47 +08:00
2026-07-28 23:12:04 +08:00