refactor: move server rs workspace entries into crates
This commit is contained in:
30
server-rs/crates/module-story/README.md
Normal file
30
server-rs/crates/module-story/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# module-story 独立模块 package 占位说明
|
||||
|
||||
日期:`2026-04-20`
|
||||
|
||||
## 1. package 职责
|
||||
|
||||
`module-story` 是故事主循环模块 package,后续负责:
|
||||
|
||||
1. `story_session`、`story_event` 等故事会话状态模型
|
||||
2. story action 主循环与状态推进规则
|
||||
3. `currentStory`、story state、兼容视图模型的模块级拼装
|
||||
4. 与 `apps/api-server` 的 story facade 与 SSE 输出对接
|
||||
5. 与 `apps/spacetime-module` 的 story 表、reducer、view 聚合对接
|
||||
|
||||
## 2. 当前阶段说明
|
||||
|
||||
当前提交仅完成目录占位,不提前进入 reducer、view 与 SSE 兼容实现。
|
||||
|
||||
后续与本 package 直接相关的任务包括:
|
||||
|
||||
1. 设计 `story_session`、`story_event`
|
||||
2. 设计 `resolve_story_action`、`continue_story`、`begin_story_session`
|
||||
3. 对齐 `RuntimeStoryActionResponse`、`RuntimeStoryOptionView`
|
||||
4. 落地 `/api/runtime/story/*` 兼容链路
|
||||
|
||||
## 3. 边界约束
|
||||
|
||||
1. `module-story` 负责故事状态真相与主循环规则,不把外部 LLM、OSS、短信、微信等副作用塞进模块内部。
|
||||
2. 流式文本输出与 HTTP 协议兼容由 `apps/api-server` 暴露,但阶段状态与故事真相必须回写到 `apps/spacetime-module` 聚合的状态模型中。
|
||||
3. 跨模块联动通过明确的 reducer 与模块边界协作,不回到单大 service 直接改整包 JSON 的旧实现方式。
|
||||
Reference in New Issue
Block a user