# module-runtime-story `module-runtime-story` 承接 RPG runtime story 的纯领域规则、应用用例、事件和错误模型,不依赖 HTTP / `AppState` / SpacetimeDB。 当前已经迁入的历史快照态纯逻辑会继续收口为 session scoped 新主链;顶层 DDD 物理拆分已经完成: 1. `src/domain.rs` 承载 action 结算结果结构、NPC 委托上下文、functionId / 队伍上限常量。 2. `src/commands.rs` 承载 action 文本解析 helper。 3. `src/application.rs` 承载 action response 组装参数、status patch 和 world type helper。 4. `src/events.rs` 承载 runtime story 领域事件。 5. `src/errors.rs` 承载 runtime story 纯规则错误。 6. `src/lib.rs` 只保留模块声明、公开导出和子模块 re-export。 后续 WP-RS 继续按 battle / forge / NPC / quest / presentation 的顺序,把旧 `/api/runtime/story/*` 写侧能力迁到 session scoped 新接口,并删除运行代码中的旧入口命名。 配套记录见 [../../../docs/technical/SERVER_RS_DDD_WP_RS_RUNTIME_STORY_DOMAIN_SPLIT_2026-04-30.md](../../../docs/technical/SERVER_RS_DDD_WP_RS_RUNTIME_STORY_DOMAIN_SPLIT_2026-04-30.md)。