k88936 a03f13d0a5
Project CI / Repository checks (push) Successful in 1m28s
Project CI / Frontend tests (push) Successful in 3m19s
Project CI / Backend tests (push) Successful in 4m3s
Project CI / Native shell tests (push) Successful in 13m58s
Fix/动作 前端展示下载+后端数据结构+精选 的问题 (#117)
原问题

```
历史角色动作是一个兼容例外:
后端允许它没有 editor_project_resource 资源行,只要布局自身保存了完整图片序列帧。
```

- 把生成动作的原视频asstetkind改为 video, 只把图片序列作为action
- db asset新增字段image_sequence_frames_json image_seq_duration_ms等, (原来动作的这些数据存在generation-input中,并不合适)
修改了externaljob,把这部分数据正确填写到数据库中。
- 为避免到处fallback,做了数据库迁移, 脚本: `scripts/spacetime-normalize-editor-character-actions.mjs`   手动进行过画布+素材库中动作序列帧+原始视频 迁移的测试

- 移除preview_video_path字段,  reason:
>preview video
    → separate resource/asset with assetKind="video"
  final transparent action
    → assetKind="character-animation"
    → source_resource_id points to the preview-video resource
    → image_sequence_frames_json contains the actual playable result
>
> So preview_video_path on the final action duplicates the source video resource’s image_src.
- 移除每个frame的index字段 原因: 这个只用于后端内部处理时有一个并发请求, 每个赋一个index方便收集, 后续没有再用到,且与数组本身重复

- 清除副产品preview video的generation_input_json,  因为会影响改造功能, 迁移后预览视频不提供改造(参数), 只有序列帧动作有改造

仍存在的共性问题: #134

- 导出:
下载改为完整序列帧, 封面不再作为fallback, 部分帧读取失败时行为:仍生成 ZIP,并记录失败帧, 不变

画布放置:
before:
![shotmd-1785207959-compressed.webp](/attachments/e56454f0-49a3-4a8a-951f-c21960975f99)
after:
![shotmd-1785231365-compressed.webp](/attachments/886f07df-c25b-4ecc-acc9-160e1795a991)
精选模块: 主页展示, 审核部分UI:
![shotmd-1785500046-compressed.webp](/attachments/9ec3b679-0045-494a-9f20-134f7e73fecf)
![shotmd-1785499780-compressed.webp](/attachments/42396e63-5f26-4853-a367-0f3c15111add)
这两处序列帧们的加载设计为惰式的, 只有hover和单独preview才会全部加载

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/117
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-06 16:57:38 +08:00
2026-07-23 18:06:29 +08:00
2026-06-13 16:22:18 +08:00
2026-07-17 22:07:52 +08:00
2026-04-26 18:06:23 +08:00
2026-07-07 14:04:08 +08:00
2026-07-23 18:06:29 +08:00
2026-07-16 18:33:06 +08:00
2026-07-20 16:08:24 +08:00
2026-05-08 17:58:33 +08:00
2026-07-08 17:35:45 +08:00
2026-07-17 22:07:52 +08:00
1
2026-05-14 14:21:17 +08:00
2026-07-27 18:28:26 +08:00
2026-07-23 18:06:29 +08:00

AI Native Visual RPG

一个以“AI 叙事 + 本地规则 + 像素演出”为核心的视觉 RPG 原型。

当前已经具备这些主要能力:

  • 世界与角色选择
  • AI 剧情推进与流式对话
  • 战斗演出、NPC 战斗、切磋
  • NPC 交易、送礼、求助、招募
  • 宝藏交互
  • 同伴跟随与战斗
  • 游戏主流程内嵌的角色资产工坊、自定义世界实体编辑与角色形象编辑
  • 自动存档与继续游戏

运行

前置条件:

  • Node.js
  • Rust / Cargo
  • SpacetimeDB CLI

安装依赖:

npm install

准备环境变量:

  • 复制 .env.example.env.local
  • 填入 LLM_API_KEY / ARK_API_KEY
  • 按需设置 VITE_LLM_MODEL
  • 如需启用阿里云短信验证码登录,填写 ALIYUN_SMS_ACCESS_KEY_IDALIYUN_SMS_ACCESS_KEY_SECRET,并确认 SMS_AUTH_PROVIDER="aliyun"
  • 本地联调短信登录时,建议将 VITE_AUTH_ALLOW_DEV_GUEST 设为 false,避免开发模式自动进入游客账号而跳过登录页
  • 如需打印完整 prompt/output,可把 VITE_LLM_DEBUG_LOG 设为 true

启动开发环境:

npm run dev

补充说明:

  • npm run dev 会启动 SpacetimeDB standalone、独立 bgfilter-worker、Rust api-server、主站 Vite 与后台 Vite,适合完整联调;内部 worker ready 后才启动 API。
  • 主站默认地址是 http://127.0.0.1:3000,后台可从 http://127.0.0.1:3000/admin/ 进入,也可直连 http://127.0.0.1:3102
  • 五个模块可独立启动:npm run dev:spacetimenpm run dev:api-servernpm run dev:bgfilter-workernpm run dev:webnpm run dev:admin-web;其中 dev:api-server 会安全带起同 runner 的 BgFilter worker 依赖。
  • 如需自动刷新后端模块,使用 npm run dev -- --watch;其中 spacetime-module 改动后只会重新发布模块,不会重启 standalone,Rust 源码改动会把 api-serverbgfilter-worker 作为一个组合单元重启。主站和后台前端源码变化交给 Vite 自身 HMR,不由外层 watcher 重启。非 watch 模式下可在 npm run dev 终端输入 rs api-serverrs bgfilter-workerrs webrs admin-webrs spacetimers all,其中 rs spacetime 也是只重新发布模块。

构建生产包:

npm run build

常用检查

类型检查:

npm run lint

编码检查:

npm run check:encoding

内容引用校验:

npm run check:data

编辑器 override 校验:

npm run check:overrides

关键内容 smoke 检查:

npm run check:smoke

一键内容检查:

npm run check:content

主要结构

主运行时:

主流程内嵌编辑能力:

核心数据:

文档入口

docs/ 已在 2026-05-15 完成压缩整理,旧 PRD、设计、审计、阶段计划和技术流水账不再作为实现依据。当前只读取:

S
Description
叙世
Readme 821 MiB
Languages
Rust 54.7%
TypeScript 25.9%
JavaScript 9.9%
Java 3.6%
Go 3%
Other 2.7%