Files
Genarrative/server-rs/packages/module-runtime-item/README.md

31 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# module-runtime-item 独立模块 package 占位说明
日期:`2026-04-20`
## 1. package 职责
`module-runtime-item` 是运行时物品模块 package后续负责
1. `treasure_record` 等运行时物品与宝藏状态模型
2. 奖励解析、宝藏逻辑、运行时物品结算规则
3. 与 story、inventory、quest 的运行时物品联动
4.`apps/api-server` 的运行时物品兼容接口对接
5.`apps/spacetime-module` 的运行时物品表、reducer、view 聚合对接
## 2. 当前阶段说明
当前提交仅完成目录占位,不提前进入奖励解析、意图生成与兼容接口实现。
后续与本 package 直接相关的任务包括:
1. 设计 `treasure_record`
2. 设计运行时物品结算与宝藏交互 reducer
3. 对齐奖励、宝藏、patch 与兼容输出结构
4. 接入 story action 主循环的运行时物品联动
## 3. 边界约束
1. `module-runtime-item` 负责运行时物品状态真相与奖励规则,生成型物品意图与外部 AI 编排不直接塞进模块内部。
2. 奖励与宝藏状态最终回写到 `apps/spacetime-module` 聚合的状态模型中,前端兼容接口由 `apps/api-server` 暴露。
3. 运行时物品逻辑不能再次散落到 story、inventory 或 route handler 中分别维护。