429f991bde
Project CI / AI game creator shell Rust shard 2/4 (push) Failing after 19s
Project CI / AI game creator shell Rust shard 3/4 (push) Failing after 20s
Project CI / AI game creator shell Rust shard 1/4 (push) Failing after 20s
Project CI / AI game creator shell Rust shard 4/4 (push) Failing after 20s
Project CI / Backend tests (push) Failing after 17s
Project CI / AI game creator shell Rust crates (push) Failing after 17s
Project CI / AI game creator shell Rust smoke (push) Failing after 19s
Project CI / Native shell tests (push) Failing after 18s
Project CI / Frontend tests (push) Failing after 8s
Project CI / AI game creator shell web tests (push) Failing after 15s
Project CI / Repository checks (push) Failing after 17s
- 撤销 39aed2e48 夹带的游戏分发前后端、SpacetimeDB 绑定、主站路由、后台审核页、文档与 nginx 改动,master 恢复可编译状态
- 保留该提交自身的 AGC 发号改动:agc-global-version.mjs 与其参数构造单测
- 恢复被误删的 output 产物,避免把无关清理混进该提交
- 补回两篇技术文档在 docs/README.md 的索引(它们属于后续两个补提交文档,不属于游戏分发)
- 游戏分发完整实现保留在 codex/game-distribution 分支继续开发
shared-contracts 共享 crate 说明
日期:2026-04-21
1. crate 职责
shared-contracts 是前后端兼容 contract 共享 crate,后续负责:
- HTTP 请求与响应 DTO
- SSE 事件结构与事件名约定
- response envelope、错误结构、兼容头部契约
- 各模块对外暴露的共享协议类型
2. 当前阶段说明
当前阶段已完成 Stage1 最小真实落地:
- 统一 response envelope / 头部常量
auth/login-optionsauth/meauth/sessionsruntime/settings
当前阶段继续补齐的 Stage2 鉴权 DTO:
auth/entryauth/refreshauth/logoutauth/logout-allauth/phone/send-codeauth/phone/loginauth/wechat/startauth/wechat/callbackauth/wechat/bind-phoneauth/wechat/miniprogram-login
当前阶段继续补齐的 Stage3 公开请求 DTO:
assets/direct-upload-ticketsassets/read-urlassets/objects/confirmassets/objects/bindstory-sessions/beginstory-sessions/continue
当前阶段继续补齐的 Stage4 显式成功响应 DTO:
assets/direct-upload-ticketsassets/read-urlassets/objects/confirmassets/objects/bindstory-sessions/beginstory-sessions/continue
当前阶段新增 Stage6 character visual 兼容 DTO:
assets/character-visual/generateassets/character-visual/jobs/:taskIdassets/character-visual/publish
当前阶段新增 Stage7 character animation 模板与导入兼容 DTO:
assets/character-animation/templatesassets/character-animation/import-video
当前阶段新增 Stage8 character workflow cache 第一批兼容 DTO:
assets/character-workflow-cacheassets/character-workflow-cache/:characterId
当前阶段新增 Stage9 character animation 主链兼容 DTO:
assets/character-animation/generateassets/character-animation/jobs/:taskIdassets/character-animation/publish
当前阶段新增 Stage5 story session scoped runtime story 写读 DTO:
BeginStoryRuntimeSessionRequestResolveStoryRuntimeActionRequestStoryRuntimeProjectionResponseStoryRuntimeMutationResponseStoryRuntimeSnapshotPayload仅用于 story session scoped 写侧持久化边界,不复用旧/api/runtime/story/*总入口 contract。
WP-DEL 已删除旧 runtime story HTTP DTO:RuntimeStoryStateResolveRequest、RuntimeStoryBootstrapRequest/Response、RuntimeStoryActionResponse 和旧 RuntimeStorySnapshotPayload。runtime_story 模块中仍保留的 RuntimeStoryViewModel、RuntimeStoryPresentation、RuntimeStoryPatch 与 battle presentation 是当前投影/表现构件,不作为旧 HTTP 写入口。
当前仍刻意未做:
- SSE 事件结构
- 自动代码生成或跨语言 contract 同步
- 其他尚未收口模块的 handler 响应体显式 DTO 化
3. 边界约束
shared-contracts只放协议类型与兼容结构,不承接业务规则、供应商适配或状态写入逻辑。- 各模块 crate 对外暴露的协议优先复用这里的共享定义,避免重复散落。
- 前端兼容契约一旦进入本 crate,就必须与任务清单和基线文档同步维护。
assets模块依赖platform-oss的稳定返回类型,默认通过oss-contractsfeature 给api-server使用;SpacetimeDB WASM 构建链路必须通过 workspace 依赖关闭默认 feature,避免把platform-oss/reqwest/wasm-bindgen带进spacetime-module。