Files
kdletters cbc27bad4a
Some checks failed
CI / verify (push) Has been cancelled
init with react+axum+spacetimedb
2026-04-26 18:06:23 +08:00

32 lines
1.3 KiB
Markdown
Raw Permalink 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-npc 独立模块 package 说明
日期:`2026-04-21`
## 1. package 职责
`module-npc` 是 NPC 状态与互动模块 package当前首轮已经开始承接
1. `relation_state`
2. `stance_profile`
3. `npc_state`
4. `resolve_npc_social_action`
5.`spacetime-module` 的 NPC 表、reducer、procedure 聚合对接
## 2. 当前阶段说明
当前提交不再只是目录占位,已经进入首版领域 contract 落地阶段。
当前已冻结的最小能力包括:
1. `npc_state` 字段、校验与归一化 helper
2. `relation_state``stance_profile` 的派生规则
3. `Chat / Help / Gift / Recruit / QuestAccept` 五类社交动作的最小状态迁移
4. `SpacetimeDB` 真相表与同步 procedure 接线
## 3. 边界约束
1. `module-npc` 负责 NPC 状态真相与互动规则,外部 LLM 台词生成与流式文本输出不直接塞进模块内部。
2. 对话与招募文案生成优先通过应用层和平台适配完成,`module-npc` 当前只处理状态真相,不直接产出台词。
3. 前端兼容接口与 SSE 由 `api-server` 暴露,但 NPC 状态不能再次分散到会话缓存或前端临时状态中。
4. 背包、任务、战斗、副本等副作用暂不在本 crate 内部结算,继续通过其他模块协作完成。