重构 lewan 履约:拆分发货模块并统一 registry 入口

将 task-finalization 拆为 dispatch/stock/return/redeem/confirm 等用例,
claim 与 admin 经 executor registry 调用;admin 退号仅清理虚拟号不核销。
This commit is contained in:
yml2213
2026-07-10 22:23:26 +08:00
parent c665ef5851
commit 792680bd19
19 changed files with 2111 additions and 1488 deletions
@@ -1,5 +1,14 @@
# 工程债:lewan 拆分、默认角色、短链
## 命名约定
| 叫法 | 用途 |
| --- | --- |
| lewan / kuaishou-lewan | 业务/文案 |
| `kuaishou_ct_assisted` | `executor_key` |
| `kuaishou-cloud/` | 履约领域模块路径 |
| `cloudtentacles` | 外部发货平台 API |
## lewan 模块拆分(已做)
```text
@@ -13,11 +22,23 @@ kuaishou-cloud/
delivery-plan.ts
ensure-claim-link.ts
dispatch-role-sync.ts
task-finalization.ts # dispatch / return(仍厚,后续可再拆)
redeem-fulfillment.ts # 一键兑换用例
confirm-role.ts # 确认角色用例
dispatch-fulfillment.ts # 发货编排
dispatch-stock.ts # 库存/采购/下发
dispatch-failure.ts # 发货失败落库
return-fulfillment.ts # 退号 + 电子凭证核销收尾
mock-helpers.ts
task-finalization.ts # 兼容 re-export
domain.ts
executors/
kuaishou-cloud-executor # preparePaid + prepareBinding + rebind/refresh/confirm + redeem + dispatch + return
registry # prepare/rebind/refresh/confirm/redeem/dispatch/return 统一入口
```
对外 import 路径仍为 `.../kuaishou-cloud/index.js`
对外 import 路径仍为 `.../kuaishou-cloud/index.js`
claim / admin 应优先走 `executors/registry`,不要直连子模块动作。
## 默认角色