Compare commits

..

278 Commits

Author SHA1 Message Date
suzmii e695cdf499 修复序列帧去背景面板导入顺序
Project CI / Repository checks (pull_request) Successful in 1m7s
Project CI / Frontend tests (pull_request) Successful in 3m4s
Project CI / Backend tests (pull_request) Successful in 4m14s
Project CI / Native shell tests (pull_request) Successful in 14m27s
按 simple-import-sort 规则调整类型导入顺序
2026-08-17 21:12:13 +08:00
suzmii 4ca93a6f16 合并master并保留双方决策记录
Project CI / Frontend tests (pull_request) Successful in 3m4s
Project CI / Backend tests (pull_request) Successful in 3m58s
Project CI / Native shell tests (pull_request) Successful in 14m2s
Project CI / Repository checks (pull_request) Failing after 34s
保留Spine序列帧去背景双模式与悬浮窗决策

保留预览发布记录使用Jenkins构建编号与有限保留决策

同步master预览部署控制面代码与文档变更
2026-08-17 20:48:11 +08:00
suzmii 2f1da79f9c 同步远端分支并保留序列帧去背景修复
Project CI / Backend tests (pull_request) Failing after 14s
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / Frontend tests (pull_request) Successful in 2m39s
Project CI / Native shell tests (pull_request) Successful in 13m41s
2026-08-17 20:22:20 +08:00
suzmii c59a912eef 完善序列帧去背景交互与队列处理
将序列帧去背景选择框改为贴近画布的非模态悬浮窗

增加原始帧取色、实时色样与自适应方向的像素放大预览

区分提交接受状态与 durable 任务处理状态,入队成功后立即关闭悬浮窗

支持纯色键控轻微色差并补充通用模式与后端回归验证

同步更新Spine技术方案与项目决策记录
2026-08-17 20:16:16 +08:00
suzmii 3d145379f2 明确序列帧去背景处理模式
去背景弹窗要求用户显式选择纯色键控或通用智能分割。

纯色模式支持颜色输入和吸管取色,并以本地算法处理任意键色。

通用模式逐帧使用 BgFilter complex 分割,禁止携带键色。

入队与 durable worker 统一校验模式参数并持久化权威处理元数据。

补充双色键控、模式冲突、双路径路由和前端交互回归。

同步更新 Spine 技术方案与团队决策记录。
2026-08-17 15:27:13 +08:00
suzmii ae5c2d8821 收紧角色外观参考图容量门禁
限制视频模式角色外观图最多九张,并在前端追加、恢复和提交链路统一收口。

在入队归一化和 durable worker 执行前限制单图、累计字节、解码边长与总像素。

补充九/十张、三十兆字节、累计大小和压缩炸弹像素边界回归。

同步更新 Spine 技术方案与团队决策记录。
2026-08-17 15:01:17 +08:00
kdletters e455cd593c 兼容历史预览构建记录
Project CI / Repository checks (push) Successful in 1m2s
Project CI / Frontend tests (push) Successful in 2m58s
Project CI / Native shell tests (push) Successful in 14m17s
Project CI / Backend tests (push) Successful in 3m56s
启动时回填旧记录的 Jenkins 构建编号

将旧 loopback 构建详情转换为局域网地址

补充历史记录迁移测试
2026-08-17 12:52:40 +08:00
kdletters 38ae9d7d07 完善预览发布记录管理
Project CI / Frontend tests (push) Successful in 2m55s
Project CI / Backend tests (push) Successful in 3m53s
Project CI / Native shell tests (push) Successful in 15m2s
Project CI / Repository checks (push) Successful in 1m6s
发布记录改用 Jenkins 构建编号并展示

失败与停止记录增加自动清理期限

构建详情改为局域网 Jenkins 地址

同步测试、部署配置和运维文档
2026-08-17 12:42:29 +08:00
kdletters abb3912530 增加分支与提交搜索校验
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / Native shell tests (push) Successful in 14m0s
Project CI / Repository checks (push) Successful in 1m6s
Project CI / Backend tests (push) Successful in 3m54s
增加分支和 commit 的输入搜索下拉构建前复核固定仓库中的分支与 commit 归属补充预览控制面接口合同、配置和测试
2026-08-17 12:04:31 +08:00
suzmii 8b4ec2c4d4 Merge branch 'master' into feat/spine-sequence-export-v2
Project CI / Repository checks (pull_request) Successful in 1m7s
Project CI / Frontend tests (pull_request) Successful in 3m4s
Project CI / Backend tests (pull_request) Successful in 4m24s
Project CI / Native shell tests (pull_request) Successful in 13m56s
2026-08-17 11:37:43 +08:00
kdletters ced4b56dee 优化预览发布记录展示
Project CI / Repository checks (push) Successful in 1m22s
Project CI / Frontend tests (push) Successful in 2m55s
Project CI / Backend tests (push) Successful in 3m56s
Project CI / Native shell tests (push) Successful in 14m7s
发布记录增加后端校验后的 Web 端口号

列表隐藏已成功卸载的容器记录

兼容恢复旧运行记录并回填 Web 端口

补充后端、前端测试和技术说明
2026-08-17 10:47:58 +08:00
kdletters 080c3ebc4f 修复预览部署结果字段冲突
Project CI / Frontend tests (push) Successful in 3m49s
Project CI / Backend tests (push) Failing after 3m50s
Project CI / Repository checks (push) Successful in 1m11s
Project CI / Native shell tests (push) Successful in 14m44s
使用权威 branch 和 resolvedCommit 字段解析 Jenkins 产物

移除与附加 source 字段冲突的旧别名

保留状态解析错误上下文以便安全排障
2026-08-15 19:18:49 +08:00
kdletters c75fcbf023 修复预览构建状态解析与工作进程恢复
Project CI / Repository checks (push) Successful in 55s
Project CI / Frontend tests (push) Successful in 3m35s
Project CI / Backend tests (push) Successful in 4m38s
Project CI / Native shell tests (push) Successful in 15m53s
限制 Jenkins 状态接口只返回监控所需字段

避免完整构建 JSON 触发反序列化递归深度限制

让预览外部生成工作进程在身份初始化后自动重启

补充定向测试、防回归检查和技术说明
2026-08-15 18:52:10 +08:00
kdletters cf5eac1c63 修复Jenkins成功收尾状态竞态
Project CI / Repository checks (push) Successful in 53s
Project CI / Frontend tests (push) Successful in 3m36s
Project CI / Native shell tests (push) Successful in 15m35s
Project CI / Backend tests (push) Successful in 4m19s
为队列、构建状态和部署产物查询增加有限重试

避免 Jenkins 瞬态无效响应永久覆盖成功部署状态

增加构建收尾竞态回归测试和技术说明
2026-08-15 18:38:59 +08:00
kdletters ea81d8ebb5 修复预览数据库容器内存不足
Project CI / Native shell tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Successful in 1m20s
将分支预览 SpacetimeDB 内存上限覆盖为 2 GiB

保留生产与压测 Compose 的原有资源基线

增加预览内存覆盖防回归检查和故障说明
2026-08-15 18:33:30 +08:00
kdletters d0a8f254b3 修复预览环境非交互发布
Project CI / Repository checks (push) Successful in 1m0s
Project CI / Backend tests (push) Successful in 4m16s
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Native shell tests (push) Successful in 17m18s
允许 SpacetimeDB 向受控容器网络地址非交互发布

固定预览结果使用内网主机地址

补充发布参数与内网地址防回归检查和文档
2026-08-15 18:30:08 +08:00
kdletters a312ee20b5 修复预览流水线空提交参数
Project CI / Repository checks (push) Successful in 56s
Project CI / Frontend tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
允许 Jenkins 检出阶段安全读取未导出的可选参数

显式使用 bash 执行源码检出脚本

增加空提交参数与脚本执行方式防回归检查
2026-08-15 18:17:21 +08:00
kdletters 1a61c0bea7 修复Jenkins构建地址归一化
Project CI / Repository checks (push) Successful in 59s
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
将 Jenkins 返回的外部构建路径重绑定到受信本机 origin
增加外部 Jenkins URL 的状态与产物轮询回归测试
2026-08-15 18:12:39 +08:00
suzmii 95e34b8760 Merge branch 'master' into feat/spine-sequence-export-v2
Project CI / Frontend tests (pull_request) Successful in 3m33s
Project CI / Repository checks (pull_request) Successful in 1m17s
Project CI / Backend tests (pull_request) Successful in 4m11s
Project CI / Native shell tests (pull_request) Successful in 17m58s
2026-08-15 18:09:16 +08:00
kdletters 7cd8b39593 Revert "修复预览部署可选提交参数"
Project CI / Repository checks (push) Successful in 1m2s
Project CI / Frontend tests (push) Successful in 3m46s
Project CI / Backend tests (push) Successful in 4m22s
Project CI / Native shell tests (push) Failing after 13m9s
This reverts commit d2366bc40a.
2026-08-15 18:09:04 +08:00
kdletters 5e7ff450b6 Revert "修复预览部署脚本执行方式"
This reverts commit 7fc739fad0.
2026-08-15 18:09:04 +08:00
kdletters 7fc739fad0 修复预览部署脚本执行方式
Project CI / Repository checks (push) Successful in 1m23s
Project CI / Frontend tests (push) Successful in 4m28s
Project CI / Backend tests (push) Successful in 4m22s
Project CI / Native shell tests (push) Successful in 17m7s
通过 bash 显式调用 Jenkins 源码检出脚本

增加脚本执行方式防回归门禁

同步预览部署执行合同文档
2026-08-15 18:03:49 +08:00
kdletters d2366bc40a 修复预览部署可选提交参数
Project CI / Repository checks (push) Successful in 1m40s
Project CI / Frontend tests (push) Successful in 2m59s
Project CI / Backend tests (push) Successful in 4m5s
Project CI / Native shell tests (push) Successful in 18m44s
修复 Checkout 阶段在严格 shell 下展开未定义 COMMIT_HASH 的失败

增加预览流水线参数归一化防回归门禁

同步预览部署参数合同与项目决策文档
2026-08-15 18:00:05 +08:00
suzmii c51d88fd19 合并 master 的预览部署控制面
Project CI / Repository checks (pull_request) Successful in 55s
Project CI / Frontend tests (pull_request) Successful in 2m56s
Project CI / Backend tests (pull_request) Successful in 3m35s
Project CI / Native shell tests (pull_request) Successful in 17m44s
保留 Spine 序列帧与 Jenkins 容器预览决策记录

合入 preview-deployer-web、preview-deployer-server 及部署脚本
2026-08-15 17:48:16 +08:00
kdletters 7400c706f8 修复预览流水线空参数校验
Project CI / Repository checks (push) Successful in 50s
Project CI / Frontend tests (push) Successful in 3m14s
Project CI / Backend tests (push) Successful in 4m5s
Project CI / Native shell tests (push) Successful in 15m22s
在严格 shell 模式下归一化首次触发的空参数
避免 STATUS 与未指定 commit 的请求误报未定义变量
2026-08-15 17:39:07 +08:00
kdletters 6befa3c33a 补全预览流水线首次触发参数
Project CI / Repository checks (push) Successful in 1m13s
Project CI / Frontend tests (push) Successful in 4m7s
Project CI / Backend tests (push) Successful in 5m4s
Project CI / Native shell tests (push) Failing after 12m44s
在 Jenkins Job 配置中预声明部署参数
增加 buildWithParameters 首次触发合同检查
2026-08-15 17:29:25 +08:00
kdletters 1746c77cb1 修复预览控制台子路径静态资源
Project CI / Repository checks (push) Successful in 1m3s
Project CI / Frontend tests (push) Successful in 3m1s
Project CI / Backend tests (push) Successful in 3m46s
Project CI / Native shell tests (push) Failing after 12m48s
让控制服务原生托管 /build 页面与静态资源
保持内网 Nginx 路径透传并补充部署合同检查
2026-08-15 17:25:40 +08:00
kdletters 41874ab391 新增内网容器预览部署控制面
Project CI / Repository checks (push) Successful in 1m16s
Project CI / Frontend tests (push) Successful in 3m1s
Project CI / Backend tests (push) Successful in 4m2s
Project CI / Native shell tests (push) Successful in 17m2s
新增分支与指定提交的预览部署 SPA 和 Jenkins 代理服务
新增多实例 Docker 预览流水线、端口租约、实时健康状态和卸载能力
新增 /build 内网路由、systemd 部署资产和运维文档
修正容器 Nginx 健康检查探针
2026-08-15 17:18:10 +08:00
suzmii 4d1c9d9b1b 收紧序列帧预览恢复校验
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Successful in 2m56s
Project CI / Native shell tests (pull_request) Failing after 12m17s
taskId 缺失时不恢复关联预览视频

补充序列帧与预览任务标识缺失的恢复测试
2026-08-15 17:02:52 +08:00
suzmii 90cfdfdf97 修正序列帧计费边界测试数量
将character_animation_assets的持久计费边界预期从3调整为4

覆盖AI生成、视频转换、去背景与视频生成四条内联路由
2026-08-15 15:37:34 +08:00
suzmii f65a813768 限制序列帧去背景仅用于视频转换
后端仅接受 character-animation.convert 结果执行序列帧去背景

前端工具栏与工作流同步收紧视频转换门禁

更新相关测试与Spine序列帧技术方案
2026-08-15 15:35:27 +08:00
suzmii b5dc99e067 Revert "local: stash the document"
Project CI / Frontend tests (pull_request) Successful in 3m12s
Project CI / Native shell tests (pull_request) Successful in 14m9s
Project CI / Backend tests (pull_request) Failing after 2m29s
Project CI / Repository checks (pull_request) Successful in 1m0s
This reverts commit 0123f3db76.
2026-08-15 15:08:12 +08:00
suzmii c94bb6d3ed Merge branch 'master' into feat/spine-sequence-export-v2
Project CI / Repository checks (pull_request) Successful in 1m19s
Project CI / Backend tests (pull_request) Failing after 3m12s
Project CI / Frontend tests (pull_request) Successful in 3m14s
Project CI / Native shell tests (pull_request) Successful in 14m53s
2026-08-15 15:00:53 +08:00
suzmii 101fd952d5 收紧序列帧去背景来源与绿幕门禁
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Backend tests (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Successful in 2m38s
Project CI / Native shell tests (pull_request) Failing after 11m22s
验证去背景每帧正式资产对象的用户归属、对象路径和来源任务
仅允许编辑器生成的纯绿幕角色动画执行算法去背景
补齐去背景生成 action 白名单但保持不可改造
更新工具栏门禁、回归测试和Spine序列帧技术方案
2026-08-15 14:50:18 +08:00
suzmii 2c85ea0b83 修复序列帧后处理结果应用与存储幂等
视频直接转换和序列帧去背景按 operation 隔离对象存储路径
队列后处理失败统一返回脱敏用户文案
inline 转换和去背景结果直接应用服务端项目快照
修复去背景加载状态和相关前端回归测试
2026-08-15 14:27:55 +08:00
kdletters aa5221abcf 修复Jenkins Web依赖安装
Project CI / Repository checks (push) Successful in 1m8s
Project CI / Frontend tests (push) Successful in 3m0s
Project CI / Backend tests (push) Successful in 3m40s
Project CI / Native shell tests (push) Successful in 13m52s
Web构建同时安装根目录与AGC独立lockfile依赖
Full流水线同步RUN_NPM_CI参数说明
生产运维门禁锁定双依赖安装顺序
运维文档补充故障原因与依赖边界
2026-08-15 14:15:03 +08:00
suzmii 13afdd7a3b 修复序列帧去背景队列与幂等发布
序列帧去背景改用本地绿幕算法并在 durable 父任务内并行处理。

将去背景操作加入生成结果白名单,并按 operation_id 隔离帧对象路径。

去背景结果发布为新的序列资源、素材和画布图层,同时保留原始序列。

同步前端生成占位、相关测试及队列与资源契约文档。
2026-08-15 11:59:50 +08:00
kdletters 9f5c84ee71 重构AGC项目管理界面
Project CI / Repository checks (push) Successful in 1m40s
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Native shell tests (push) Successful in 14m20s
Project CI / Backend tests (push) Successful in 4m17s
参考成熟桌面项目管理器重构紧凑项目表、搜索和行尾菜单

支持Windows路径及Godot根目录和一层子目录工程识别与导入

修复1280×720页面溢出、列表滚动和末行菜单裁切

补充项目页回归测试、PRD、技术方案和项目记忆
2026-08-15 11:43:58 +08:00
kdletters 578f8019fc 优化AGC项目入口并识别Godot工作区
Project CI / Repository checks (push) Successful in 1m14s
Project CI / Frontend tests (push) Successful in 3m9s
Project CI / Native shell tests (push) Successful in 14m6s
Project CI / Backend tests (push) Successful in 3m58s
项目页只保留打开项目和新建项目并统一原生目录选择
按根目录及一层子目录识别project.godot并记录相对Godot根
保持.agent位于用户选择的工作区根并补齐Windows构建门禁
补充响应式布局、测试、技术方案和共享项目记忆
2026-08-14 21:53:43 +08:00
suzmii 05f0e2db06 合并master并保留Spine序列帧修复
合并master当前工程、后端、前端和文档更新

按已确认方案解决Spine序列帧多模态、帧数和快速编辑冲突

保留当前分支底部工具栏宽度与隐藏滚动条样式
2026-08-14 21:33:26 +08:00
lhk229 4d3f87cd39 修复完美像素无法识别自身产物的网格 (#169)
Project CI / Repository checks (push) Successful in 1m21s
Project CI / Backend tests (push) Successful in 3m57s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / Native shell tests (push) Successful in 14m7s
边缘 profile 用的是跨度 2 的中心差分,硬块边界落在列 b-1|b 之间时
profile[b-1] 与 profile[b] 逐位相等:两者跨的是同一条边,逐行被加数
相同、求和顺序相同。峰值判定两侧都用严格大于,会把这个 2 宽平台的
两端一起丢掉,于是最干净的输入反而 0 个峰、被判为未识别到网格——
完美像素处理不了自己的输出。

estimate_step_size 左邻比较放宽为 >=,右邻保持严格 >:平台只保留
一个索引,且是右端,正好是左闭右开语义下的真实块边。两侧都放宽则
会把长度 K 的常数段整段判为峰。

walk 与 snap_uniform_cuts 的 argmax 同样改为 >=,取等值段的最后一
个索引。取第一个会让每条切线落在真实边界左边 1px,每个 cell 因此
混进 1/4 的邻块。实测在 266x253 的最近邻放大像素画上,切线命中真实
块边从 2.6% 升到 98.5%,左右镜像、上下翻转、180° 旋转下一致;龙图
内容区内 134/134 全中。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/169
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-14 20:42:58 +08:00
k88936 d901945c77 移除视频快速编辑支持 (#157)
Project CI / Repository checks (push) Successful in 1m20s
Project CI / Backend tests (push) Successful in 3m56s
Project CI / Native shell tests (push) Successful in 14m1s
Project CI / Frontend tests (push) Successful in 2m53s
当前实现: 视频快速编辑错误地复用了图片快速编辑的panel, 然后发起一个实际是生成视频的请求

策划建议删除.

因为后端没有实际意义上的视频快速编辑, 所以api 后端代码没有改动, 只在前端删除入口和处理

---------

Co-authored-by: kdletters <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/157
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-14 18:52:56 +08:00
kdletters d155e303bd 实现AGC回车自动创建工作区
Project CI / Repository checks (push) Successful in 1m3s
Project CI / Frontend tests (push) Successful in 3m9s
Project CI / Backend tests (push) Successful in 4m17s
Project CI / Native shell tests (push) Failing after 11m3s
首页普通回车自动分配系统文档目录下的唯一工作区并启动项目总控

保留加号按钮手动选择目录和Shift回车换行语义

统一Windows Linux与macOS默认项目路径解析并移除产品态tmp默认值

补充自动工作区安全测试 首页交互回归与技术方案说明
2026-08-14 17:45:27 +08:00
kdletters 8e78be766e 修复AGC运行与首板版本登记
Project CI / Repository checks (push) Successful in 55s
Project CI / Frontend tests (push) Successful in 3m26s
Project CI / Backend tests (push) Successful in 3m59s
Project CI / Native shell tests (push) Failing after 11m44s
修复旧模型定价覆盖缺少ElevenLabs音效模型导致启动恢复持续失败

支持对话框回车发送并保留Shift换行和输入法组合态

重试受理后立即清理旧失败投影并展示新Run状态

阻止Windows后台Codex探测反复弹出控制台窗口

首板试玩持久回执通过后幂等登记初始项目版本

补充定价、交互、Windows与版本登记回归测试和文档
2026-08-13 20:11:51 +08:00
suzmii e368145f9d Merge branch 'master' of https://git.genarrative.world/git/GenarrativeAI/Genarrative 2026-08-13 14:13:47 +08:00
kdletters 7052d3e692 修复Windows维护页门禁执行
Project CI / Repository checks (push) Successful in 1m21s
Project CI / Frontend tests (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 4m1s
Project CI / Native shell tests (push) Failing after 10m34s
转换WSL bash所需的脚本、参数和环境路径
在POSIX平台校验实际0644权限并在Windows校验安装源码契约
保留维护页原子替换与符号链接防护测试
2026-08-13 14:01:34 +08:00
kdletters 1b4cb3c45e 修复Windows下Git钩子回归测试
统一比较Git恢复文件时的换行符
将WSL bash测试使用的临时工具路径转换为可执行路径
确保master推送门禁在Windows与Unix环境下均可重复验证
2026-08-13 13:50:27 +08:00
kdletters 15c227cebf 修复AGC Windows运行与全量测试稳定性
完善Codex CLI、App Server、ConPTY与进程会话在Windows下的发现、启动、恢复和退出行为
修复Agent Runtime、Provider重试、项目写锁及工具交接账本的并发与跨测试串线问题
补齐配置目录、路径脱敏、原子写入、浏览器探测和本地Provider smoke的跨平台兼容
增强Goal Contract、自动策略、资源生成及运行态恢复的契约和回归测试
更新AI游戏创作智能体App技术文档中的Windows稳定性说明
验证AGC开发态、Release打包、打包后GUI运行及完整agc:check门禁
2026-08-13 13:36:21 +08:00
lhk229 21137f676b 修复issue160 (#166)
Project CI / Repository checks (push) Successful in 1m16s
Project CI / Frontend tests (push) Successful in 3m14s
Project CI / Backend tests (push) Successful in 4m6s
Project CI / Native shell tests (push) Successful in 14m16s
#160

---------

Co-authored-by: kdletters <kdletters@qq.com>
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/166
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-13 13:28:45 +08:00
suzmii 0123f3db76 local: stash the document 2026-08-13 10:13:31 +08:00
suzmii d6cb68cf13 Spine序列帧修复与功能收紧 2026-08-13 01:05:57 +08:00
kdletters f395a6ed36 稳定Agent失败审计时序测试
Project CI / Repository checks (push) Successful in 1m1s
Project CI / Frontend tests (push) Successful in 2m58s
Project CI / Backend tests (push) Successful in 4m0s
Project CI / Native shell tests (push) Successful in 14m15s
等待 Runtime 失败后的审计记录有界落盘
保持 final-reply-failed 审计最终存在的强断言
连续五次验证流式连接中断回归
2026-08-12 22:38:59 +08:00
kdletters da7c4dc71c 修正Agent失败关闭回归语义
Project CI / Repository checks (push) Successful in 1m0s
Project CI / Frontend tests (push) Successful in 3m4s
Project CI / Backend tests (push) Successful in 3m44s
Project CI / Native shell tests (push) Failing after 10m20s
将流式连接中断断言为 Runtime 失败
禁止 transport 错误提交 planning fallback 冒充成功
保留安全失败消息与 final-reply-failed 审计验证
2026-08-12 22:24:17 +08:00
kdletters fd423770d8 根治Repository checks本地漏检
Project CI / Repository checks (push) Successful in 1m18s
Project CI / Frontend tests (push) Successful in 3m1s
Project CI / Backend tests (push) Successful in 4m17s
Project CI / Native shell tests (push) Failing after 12m32s
修复 Agent 失败展示变更中的 import 排序错误
统一 CI 与 master pre-push 的 Repository checks 入口
让 staged JS 和 TS 自动执行 ESLint 修复与 Prettier
补充部分暂存、忽略文件和待推 SHA 回归测试
同步分支保护与本地门禁流程文档
2026-08-12 22:06:35 +08:00
kdletters 794f3d4cf8 修复Agent失败原因丢失与成功误判
Project CI / Repository checks (push) Failing after 45s
Project CI / Frontend tests (push) Successful in 3m39s
Project CI / Backend tests (push) Successful in 4m44s
Project CI / Native shell tests (push) Failing after 13m11s
解析 Codex app-server 稳定失败分类并生成安全可行动摘要
统一 Runtime 事件、任务、阶段记录和各 Agent 状态面的失败展示
限制自主构建最终回复 fallback,避免鉴权与网络错误被提交为成功
补充失败分类、防泄漏、待核对和 fallback 回归测试
同步技术方案与共享决策记录
2026-08-12 21:35:11 +08:00
kdletters e04a8310a0 重做AGC智能体设置界面
Project CI / Repository checks (push) Successful in 1m32s
Project CI / Frontend tests (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 4m5s
Project CI / Native shell tests (push) Successful in 14m27s
将常用设置、Agent 模型、连接工具和高级参数分层展示

补充保存中、保存成功和失败状态反馈

更新设置页测试与项目决策记录
2026-08-12 21:04:30 +08:00
kdletters 82957fe1d4 修复子 Agent 澄清回执中转 (#165)
Project CI / Repository checks (push) Successful in 1m14s
Project CI / Frontend tests (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 4m5s
Project CI / Native shell tests (push) Successful in 14m31s
Closes #163

实现 child 澄清回执到 Supervisor 的 needs-user-input 中转。

- child 返回结构化问题回执,Runtime fail-closed 校验问题和 SHA-256。
- Supervisor 创建自己的 durable user.input_request,重复唤醒复用同一 action。
- 用户回答沿用 same-run 回灌,后续 continuation 绑定原 delegation。
- 补充 Rust 定向测试、技术方案和共享排障记忆。

验证:
- cargo check --tests
- cargo test ... claimed_needs_user_input_delivery_becomes_one_supervisor_wait
- cargo test ... static_delegate_user_input
- git diff --check

注:npm run check:encoding 在当前受限执行环境中因 spawnSync git EPERM 未能运行。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/165
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-12 20:07:59 +08:00
kdletters 5e16837f3d 恢复游戏创作 External Editor 配置入口
Project CI / Repository checks (push) Successful in 1m34s
Project CI / Frontend tests (push) Successful in 3m5s
Project CI / Backend tests (push) Successful in 4m12s
Project CI / Native shell tests (push) Failing after 10m55s
普通 Launcher、开发工作台和独立 game-chat 统一显示 External Editor 配置。

补齐配置可见性、密码输入和持久化回归测试。

同步配置静态门禁、PRD、技术合同与共享决策。
2026-08-12 18:43:55 +08:00
suzmii 132bf7db35 角色多方向图生成 2026-08-12 18:14:25 +08:00
kdletters effdaefc63 修复游戏智能体计划拒绝后的重复规划
Project CI / Repository checks (push) Successful in 1m5s
Project CI / Frontend tests (push) Successful in 3m22s
Project CI / Native shell tests (push) Failing after 12m42s
Project CI / Backend tests (push) Successful in 3m55s
在 runtime.plan_update 被拒绝后按角色收窄下一轮工具目录

恢复 Supervisor 首次项目修改的活性门禁

补充请求目录与活性门禁回归测试

同步更新游戏创作智能体实施规则
2026-08-12 17:00:50 +08:00
k88936 8abeb333bb 统一画布快速编辑白名单与入口行为 (#140)
Project CI / Repository checks (push) Successful in 56s
Project CI / Frontend tests (push) Successful in 4m1s
Project CI / Backend tests (push) Successful in 4m26s
Project CI / Native shell tests (push) Successful in 15m12s
- 使用白名单控制快速编辑功能的显示

- 同步浮动工具栏、右键菜单、打开入口和提交门禁
- 禁用角色动作序列帧(整体)、音频和单个图标(explain: backend reject)的快速编辑

- 把快速编辑api改为只接受resource Id | asset Id,删除 image_src 参数, 以保证校验

其中包含生产数据迁移。迁移用于清理历史普通图片错误持久化的 assetKind="image",覆盖 asset → project-resource → showcase → canvas 四个作用域,并包含 operator 鉴权、分批 dry-run、批次 SHA-256 绑定 apply、active 结构化画
  > 布迁移摘要同步及最终零残留复核。

---------

Co-authored-by: kdletters <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/140
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-12 14:46:24 +08:00
kdletters 4c3c0e9cd4 修正GameAgent灵感区数据接入
Project CI / Repository checks (push) Successful in 1m24s
Project CI / Frontend tests (push) Successful in 3m31s
Project CI / Backend tests (push) Successful in 4m22s
Project CI / Native shell tests (push) Successful in 15m18s
保留灵感推荐空态展示

移除主站精选接口与素材类型接入

补充无数据状态回归测试与产品边界文档
2026-08-12 14:17:47 +08:00
k88936 e3d28c50af 修复陶泥儿精选点赞刷新状态 (#156)
Project CI / Frontend tests (push) Successful in 3m25s
Project CI / Repository checks (push) Successful in 1m12s
Project CI / Backend tests (push) Successful in 3m54s
Project CI / Native shell tests (push) Successful in 15m9s
原实现:

用户对某个精选素材点赞与否, 后端没有发送这部分数据

修复:

后端刷新精选素材列表(校验可选的auth信息, 不影响未登录状态的查看) , 根据这部分信息每个素材多查询一下用户是否点赞

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/156
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-12 13:53:30 +08:00
menghao 8e3d9991fa 完成资源管理的功能修复 (#154)
Project CI / Repository checks (push) Successful in 1m5s
Project CI / Frontend tests (push) Successful in 3m0s
Project CI / Backend tests (push) Successful in 4m4s
Project CI / Native shell tests (push) Successful in 14m17s
实现资源卡本体化与图片视频音频预览播放

实现四个资源分区独立高度与内外滚动

实现依赖视图确定性聚类与拓扑变化重排

补齐布局、SVG、AppSurface、性能和媒体回归

同步工作台PRD、技术方案与项目共享记忆

---------

Co-authored-by: kdletters <kdletters@qq.com>
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/154
Co-authored-by: menghao <mh18530625731@163.com>
Co-committed-by: menghao <mh18530625731@163.com>
2026-08-12 13:14:55 +08:00
kdletters 51e35468a5 修复自主构建测试项目锁竞态
Project CI / Repository checks (push) Successful in 1m21s
Project CI / Frontend tests (push) Successful in 3m8s
Project CI / Backend tests (push) Successful in 4m24s
Project CI / Native shell tests (push) Successful in 16m33s
将纯继续契约测试改为异步并等待子任务持久化终态。

等待 Agent lane 释放后再执行后续 manifest 写入,避免后台终态投影竞争项目锁。
2026-08-12 11:42:49 +08:00
menghao 03a4410272 game agent无限画布开发 (#136)
Project CI / Native shell tests (push) Failing after 11m56s
Project CI / Repository checks (push) Successful in 1m5s
Project CI / Frontend tests (push) Successful in 3m20s
Project CI / Backend tests (push) Successful in 4m1s
主要工作是共享同一套“画布内核与通用 UI 源码”,网站和 Tauri 只分别实现宿主适配层。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Co-authored-by: kdletters <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/136
Co-authored-by: menghao <mh18530625731@163.com>
Co-committed-by: menghao <mh18530625731@163.com>
2026-08-12 10:54:16 +08:00
kdletters e118d66699 增加提交前 TypeScript 自动格式化
Project CI / Repository checks (push) Successful in 53s
Project CI / Frontend tests (push) Successful in 3m9s
Project CI / Backend tests (push) Successful in 4m19s
Project CI / Native shell tests (push) Successful in 16m9s
接入 Husky 与 lint-staged,仅格式化暂存的 TS/TSX 文件
补充部分暂存和未暂存内容隔离回归测试
更新共享开发工作流中的提交前格式化规则
2026-08-12 10:43:29 +08:00
kdletters 1363b9374c 引入游戏智能体动态目标验收图 (#161)
Project CI / Repository checks (push) Successful in 1m14s
Project CI / Frontend tests (push) Successful in 3m16s
Project CI / Backend tests (push) Successful in 4m26s
Project CI / Native shell tests (push) Successful in 16m2s
## 变更

- 冻结根 Supervisor 的 Goal Contract
- 引入动态 Acceptance Graph 并传播到专业 Agent
- 使用当前 revision 的真实动作回执作为完成证据
- 安全处理 steer 后旧根任务树替换

## 验证

- `npm run check:native-shells`
- `npm run agc:typecheck`
- `npm run check:encoding`
- `cargo fmt --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check`
- `git diff --check`

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/161
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-12 10:34:20 +08:00
lhk229 3c457feb4c 完美像素功能回归逻辑分辨率 (#155)
Project CI / Repository checks (push) Successful in 1m7s
Project CI / Frontend tests (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 4m8s
Project CI / Native shell tests (push) Successful in 13m48s
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/155
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-11 15:58:31 +08:00
kdletters aa5c857060 修复 Godot 项目提交后的 CI 门禁
Project CI / Repository checks (push) Successful in 1m8s
Project CI / Frontend tests (push) Successful in 2m59s
Project CI / Backend tests (push) Successful in 4m0s
Project CI / Native shell tests (push) Successful in 13m41s
移除根 H5 包中冗余的 Tauri HTTP 依赖并同步锁文件
修正客户端错误边界测试的 import 顺序
固定两项后台 Runtime 恢复测试使用 Provider 模式
补充 AGC 原生 HTTP 依赖归属约束
2026-08-11 14:34:42 +08:00
kdletters 755bf80858 支持 AI 游戏创作打开现有 Godot 项目
Project CI / Repository checks (push) Failing after 44s
Project CI / Native shell tests (push) Failing after 1m42s
Project CI / Frontend tests (push) Successful in 2m50s
Project CI / Backend tests (push) Successful in 3m41s
新增 Godot 项目选择、校验、导入和项目上下文切换入口。

只在所选项目根保留 .agent 元数据,并让总控使用标准运行档。

修复发布版原生 API 访问和 React runtime 重复加载问题。

收紧 Provider 工具 Schema 子集并增加回归门禁。

补充 Rust、前端测试及 PRD、技术方案和共享决策记录。
2026-08-11 13:25:29 +08:00
k88936 4c0fdf1806 修正画布改造工具恢复链路 (#158)
Project CI / Repository checks (push) Successful in 1m4s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / Backend tests (push) Successful in 3m52s
Project CI / Native shell tests (push) Successful in 14m46s
在文档中明确改造特殊情况的处理

修复fallback到快速编辑的行为:
旧版图片按 assetKind 与 mediaType 选择工具,未知图片回落默认生成工具并保留旧版告警,而不是all in fallback到快速编辑

清理冗余代码:
移除 QuickEditPanelState 的 redraw 模式、旧提交分支及无调用结果层构造器

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/158
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-11 12:36:30 +08:00
kdletters 7f129ddd6e 修复 Native CI 的 Agent 模式测试隔离
Project CI / Repository checks (push) Successful in 1m10s
Project CI / Frontend tests (push) Successful in 2m52s
Project CI / Backend tests (push) Successful in 3m53s
Project CI / Native shell tests (push) Successful in 14m31s
为 Provider handoff 与 mock 请求测试显式固定 Provider 模式
同步 Goal steer 测试到条件中断语义
补充模拟 Provider 测试不得依赖本机 Codex 的排障约束
2026-08-11 11:14:38 +08:00
kdletters 4d79971d6b 修复多模式 Provider 请求栈溢出
Project CI / Repository checks (push) Successful in 57s
Project CI / Frontend tests (push) Successful in 2m51s
Project CI / Backend tests (push) Successful in 3m36s
Project CI / Native shell tests (push) Failing after 10m48s
装箱持久重试与非持久压缩的完整 Provider 请求 future
补充默认 Tokio worker 栈溢出排障经验
同步 AI 游戏创作 Runtime 的异步装箱约束
2026-08-11 10:24:58 +08:00
kdletters 5550e24f83 接入 Codex 节点 Agent 并完善总控交互
Project CI / Repository checks (push) Successful in 1m13s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / Backend tests (push) Successful in 3m57s
Project CI / Native shell tests (push) Failing after 6m11s
新增 Codex app-server 与 CLI 节点执行模式并保留 Provider 回退
加固节点凭据隔离、终态未知回收、进程生命周期与持久恢复边界
修复资源画布等价刷新闪烁
为 Supervisor steer 增加 LLM 回复与条件中断
补齐配置界面、测试和技术文档
2026-08-10 20:58:43 +08:00
kdletters a4ead1a5d6 合并主线并同步四不写约定
Project CI / Repository checks (push) Successful in 1m16s
Project CI / Frontend tests (push) Successful in 3m0s
Project CI / Backend tests (push) Successful in 4m15s
Project CI / Native shell tests (push) Successful in 13m48s
合入最新远端主线且保留退役对象四不写规则

同步团队约定中的公开契约与正式迁移例外

保持原工作树其他已暂存和未暂存修改不变
2026-08-10 20:16:21 +08:00
kdletters 5949c2fd58 规范退役对象四不写原则
明确无现役依赖对象不写历史兼容代码与退役行为测试

禁止墓碑注释和墓碑文档并要求权威文档表达当前状态

保留公开契约、持久化数据和正式迁移的必要兼容边界
2026-08-10 20:14:30 +08:00
suzmii 1575afc92c Spine序列帧动画多模态生成 2026-08-10 20:14:09 +08:00
lhk229 bcff8f1957 修复 SFX 音效信息页元数据整块丢失 (#153)
Project CI / Native shell tests (push) Successful in 13m23s
Project CI / Repository checks (push) Successful in 1m12s
Project CI / Frontend tests (push) Successful in 2m55s
Project CI / Backend tests (push) Successful in 4m0s
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
读边界的内联媒体脱敏在每层对象上无差别删除 null 值,把 SFX 自动时长 metadata 里
合法的 requestedDurationSeconds: null 一并删掉;客户端据此判定整份 soundEffect 非法,
音频信息页的「生成输入」退化成空,Task 也被截成 0 这类误导值。手动指定时长的音效不受
影响,图片路径的 generationInputs 没有可为 null 的字段,所以只有部分 SFX 可见。

- sanitize_editor_payload_media_value 改为返回「是否被抹除」,只删除本次抹掉的内联
  媒体,调用方原有的显式 null 保留;脱敏强度不变,内联媒体与保留字段仍连键消失
- SFX 自动时长的 requestedDurationSeconds 接受显式 null 与整个键缺失两种同义形态
- 音频信息页 Task 按图层 assetKind 判定,不再随 soundEffect 元数据缺失降级成截断值

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/153
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-09 13:47:16 +08:00
kdletters dfcd67bd05 修复进程会话终止清理竞态
Project CI / Repository checks (push) Successful in 52s
Project CI / Frontend tests (push) Successful in 2m46s
Project CI / Backend tests (push) Successful in 4m6s
Project CI / Native shell tests (push) Successful in 14m34s
在发布终态通知前先移除 live registry 会话\n避免取消清理瞬时误判仍有未收束进程
2026-08-08 22:33:55 +08:00
kdletters 8d4d7ecc95 兼容历史 UI 规范的统一图标入口
Project CI / Repository checks (push) Successful in 59s
Project CI / Frontend tests (push) Successful in 3m36s
Project CI / Backend tests (push) Successful in 4m20s
Project CI / Native shell tests (push) Successful in 16m1s
将历史 spec.generate 的 ui 类型映射到 icon\n补充 GenerationInputs V2 恢复回归测试
2026-08-08 22:25:28 +08:00
kdletters 0a6d550d73 修复双 PR 合并后的持续集成问题
Project CI / Repository checks (push) Failing after 51s
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Backend tests (push) Successful in 4m8s
Project CI / Native shell tests (push) Successful in 16m0s
补齐生成引用槽位参数并恢复 source 稳定标识\n恢复画布导出元数据格式化函数导入\n同步图标规范 GenerationInputs V2 测试契约\n修正音效提交并发测试的画布落层断言\n统一 Rust 格式以通过仓库门禁
2026-08-08 22:21:57 +08:00
kdletters 2412700e66 同步 PR 137 最新测试修复
Project CI / Repository checks (push) Failing after 27s
Project CI / Backend tests (push) Failing after 2m4s
Project CI / Frontend tests (push) Failing after 2m10s
Project CI / Native shell tests (push) Failing after 11m20s
纳入 PR 137 最新 head badb886790\n保留 simple-import-sort 导入顺序
2026-08-08 22:11:56 +08:00
kdletters fb558baa8d 同步 PR 137 最新主分支合并
纳入 PR 137 最新 head bb16c41938\n保留 PR 135、PR 137 与 master 的既有冲突解法

# Conflicts:
#	server-rs/crates/api-server/src/external_generation_worker.rs
#	src/services/image-editor/editorProjectClient.test.ts
2026-08-08 22:10:23 +08:00
k88936 badb886790 修复编辑器客户端测试导入排序
Project CI / Repository checks (pull_request) Successful in 1m3s
Project CI / Native shell tests (pull_request) Successful in 15m17s
Project CI / Frontend tests (pull_request) Failing after 2m1s
Project CI / Backend tests (pull_request) Successful in 4m0s
按 simple-import-sort 规则调整合并后的导入顺序
保留远端合并提交历史并避免强制推送

# Conflicts:
#	src/services/image-editor/editorProjectClient.test.ts
2026-08-08 22:08:03 +08:00
kdletters 0a11507266 同步图标规范内联引用校验
合入 PR 137 最新提交的 owner 引用预校验
保留合并后的 SFX V2 稳定字段恢复回归测试
2026-08-08 22:04:42 +08:00
kdletters a27798be77 合并生成参数恢复与改造入口修复
合入 PR 135 的 GenerationInputs V2 稳定字段与严格恢复链路
统一缺失来源时保留改造入口并在点击后复检拒绝
保留主分支 SFX V2 自动时长、Loop 与权威元数据语义
将队列引用槽位与场景配方修复移植到 PR 137 的模块结构
2026-08-08 22:03:50 +08:00
k88936 0723df0e6d 合并远端主分支更新
同步主分支音效生成与External v1契约更新
保留图标规范与图集生成链路
适配VectorEngine LLM客户端命名并解决前端提交语义冲突
2026-08-08 22:03:26 +08:00
k88936 bb16c41938 合并远端主分支更新
Project CI / Repository checks (pull_request) Failing after 54s
Project CI / Frontend tests (pull_request) Successful in 3m30s
Project CI / Backend tests (pull_request) Successful in 4m21s
Project CI / Native shell tests (pull_request) Has been cancelled
同步主分支音效生成与External v1契约更新
保留图标规范与图集生成链路
适配VectorEngine LLM客户端命名并解决前端提交语义冲突
2026-08-08 21:54:30 +08:00
kdletters 3c00bcd2e0 合并图标规范与图集生成优化
合入 PR 137 的图标规范生成、稳定引用与图集提示词链路
保留主分支现行音效提交、Prompt 模块与结果压缩逻辑
解决 External Worker、生成提交和客户端测试冲突
2026-08-08 21:44:15 +08:00
k88936 c188accafb 修复图标规范内联引用校验
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Backend tests (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Successful in 2m35s
Project CI / Native shell tests (pull_request) Has been cancelled
在共享执行入口转换 referenceId 前校验引用 ID 与 owner。

新增调用顺序回归测试并同步决策记录。
2026-08-08 21:37:36 +08:00
kdletters a2fc6054e3 Merge pull request '音效生成路径优化' (#145) from feat/sound_opt into master
Project CI / Repository checks (push) Successful in 1m16s
Project CI / Frontend tests (push) Successful in 3m4s
Project CI / Backend tests (push) Successful in 4m9s
Project CI / Native shell tests (push) Successful in 13m49s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/145
2026-08-08 21:30:49 +08:00
lhk229 5736ad62b4 调整BGM提示词助手Token预算
Project CI / Repository checks (pull_request) Successful in 1m6s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / Backend tests (pull_request) Successful in 3m49s
Project CI / Native shell tests (pull_request) Successful in 13m17s
AI补全使用2048 completion tokens

AI简化两轮均使用8192 completion tokens

同步设计文档并补充请求预算断言
2026-08-08 12:53:31 +00:00
lhk229 2d82ac55e4 补齐音频响应脱敏回归测试
Project CI / Repository checks (pull_request) Successful in 1m9s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / Backend tests (pull_request) Successful in 3m52s
Project CI / Native shell tests (pull_request) Successful in 13m15s
更新 Agent 音频结果紧凑化断言

同步画板音乐成功响应契约文档
2026-08-08 12:41:05 +00:00
lhk229 dea6576f89 修复音频生成响应泄露 Provider
Project CI / Repository checks (pull_request) Successful in 1m6s
Project CI / Frontend tests (pull_request) Successful in 2m52s
Project CI / Backend tests (pull_request) Failing after 3m1s
Project CI / Native shell tests (pull_request) Failing after 9m54s
收紧音频公开 DTO 与前端响应类型

统一清理 inline 和 Agent 队列结果中的 Provider

覆盖嵌套快照脱敏与历史 Agent 回填兼容
2026-08-08 12:26:41 +00:00
k88936 02b4b6955d 补齐图标规范生成持久化白名单
Project CI / Repository checks (pull_request) Successful in 1m21s
Project CI / Frontend tests (pull_request) Successful in 2m49s
Project CI / Backend tests (pull_request) Successful in 3m46s
Project CI / Native shell tests (pull_request) Successful in 13m17s
SpacetimeDB生成结果白名单加入独立图标规范任务
新增icon-spec durable result shape回归测试
同步后端数据契约与长期决策记录
2026-08-08 19:38:12 +08:00
k88936 a43c84fd75 修正AGC图集规范引用字段
AI游戏创作图集请求改用External v1必填referenceId
持久生成账本兼容回读旧本地sidecar并补充请求断言
同步Agent提示合同与项目文档
2026-08-08 19:08:29 +08:00
k88936 9a326c940a 统一缺失来源的改造入口合同
Project CI / Repository checks (pull_request) Successful in 52s
Project CI / Frontend tests (pull_request) Successful in 3m37s
Project CI / Backend tests (pull_request) Successful in 3m28s
Project CI / Native shell tests (pull_request) Successful in 13m25s
明确不可替换 source 缺失时保留改造按钮并在点击后报错

同步现役设计文档、后端契约与长期决策记录

补齐角色动作和 UI 素材提取的按钮与失败回归测试
2026-08-08 19:01:03 +08:00
lhk229 0edefc67ec 修复 Agent 音频失败脱敏
Project CI / Repository checks (pull_request) Successful in 1m19s
Project CI / Frontend tests (pull_request) Successful in 2m59s
Project CI / Backend tests (pull_request) Successful in 3m57s
Project CI / Native shell tests (pull_request) Successful in 13m28s
复用外部生成任务的用户可见错误投影

按 Agent 工具名称映射音效任务并在回填前脱敏

补充音效和背景音乐失败回归测试
2026-08-08 10:26:38 +00:00
k88936 c1342910c5 补齐场景生成的持久计费边界
场景 inline 路由建立稳定 operation 身份并延迟退款决策至持久化完成

更新图标图集与场景路由的生产调用计数

静态计数排除测试模块并校验场景调用顺序
2026-08-08 18:16:31 +08:00
k88936 ae78e3bd5b 拒绝未完整结束的图标规范元数据
图标规范元数据解析统一检查 OpenAI Chat finish_reason

length 与 content_filter 结果进入既有重试循环

新增完整 JSON 仍被不完整原因拒绝的回归测试
2026-08-08 18:13:06 +08:00
k88936 84ec79a8bb 统一队列生成的冻结价格与资产成本
worker 优先读取任务 billing context 中的入队价格

扣费与 generationCostMudPoints 共用同一有效价格

新增冻结价格显式数据流回归测试
2026-08-08 18:10:17 +08:00
k88936 92832e56c2 恢复可选目录生成器的默认素材目录
角色图片生成在入队与同步执行预检前恢复 project 默认目录

UI 设计素材提取在入队与 worker 执行预检前恢复 project 默认目录

新增默认目录策略及四条调用路径回归测试
2026-08-08 18:06:04 +08:00
k88936 18ae260069 补全视频快速编辑来源配方
将源视频写入 V2 videoReference 引用列表

补充提交与改造水合回归测试及契约说明
2026-08-08 18:03:36 +08:00
lhk229 6a6d1f85d6 合并 master 的 AGC 启动脚本导入顺序修复
Project CI / Repository checks (pull_request) Successful in 55s
Project CI / Frontend tests (pull_request) Successful in 3m27s
Project CI / Backend tests (pull_request) Successful in 4m27s
Project CI / Native shell tests (pull_request) Successful in 15m25s
2026-08-08 09:53:17 +00:00
k88936 f30a55069a 修复媒体生成配方时长字段
保留 V2 durationSeconds 字段标识和数值类型

补充回归测试与改造契约说明
2026-08-08 17:52:54 +08:00
lhk229 d58e5cbebd 修复 inline 泄露 provider问题
Project CI / Repository checks (pull_request) Failing after 10s
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
2026-08-08 09:52:18 +00:00
k88936 9e70f7a07c 再次合并远端主分支更新
同步 AGC 启动脚本导入顺序修复
2026-08-08 17:37:43 +08:00
k88936 dc3e92433f 合并主分支并同步AGC启动脚本修复
调整开发端口与启动栈模块的导入顺序
保持启动脚本符合ESLint导入顺序规则
2026-08-08 17:37:35 +08:00
k88936 cef79f629a 合并远端主分支更新
修复 AGC 实时清单测试竞态
同步实时清单测试约束与项目记忆
2026-08-08 17:32:45 +08:00
kdletters 6cb13b3884 修复AGC启动脚本导入顺序
Project CI / Repository checks (push) Successful in 1m32s
Project CI / Frontend tests (push) Successful in 4m3s
Project CI / Backend tests (push) Successful in 4m13s
Project CI / Native shell tests (push) Successful in 16m47s
按ESLint规则调整开发端口与启动栈模块的导入顺序
2026-08-08 17:30:51 +08:00
lhk229 a9575f0f04 合并 master 的 AGC 实时清单测试竞态修复
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
2026-08-08 09:25:56 +00:00
k88936 ae174ecb06 合并主分支并同步AGC开发端口修复
统一AGC开发端口分配与旧注册记录迁移逻辑
修复AGC实时清单测试竞态
补齐相关测试、开发文档与共享记忆
2026-08-08 17:23:08 +08:00
lhk229 4024ea53ed 移除 External v1 完成结果联合的 discriminator
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
BGM 回 audioKind=background-music 无映射,图片、视频与历史结果没有
audioKind,fallback 分支又不可能把 audioKind 声明为必填,任何映射都覆盖
不全合法结果。oneOf 加 not 本已精确互斥,删掉 discriminator 不改变校验
语义,只恢复依赖它的客户端生成

契约测试反向锁定 discriminator 缺席,并锁定 fallback 只排除 SFX 一种
audioKind

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 09:20:42 +00:00
kdletters 5393ef8720 修复AGC实时清单测试竞态
Project CI / Backend tests (push) Successful in 4m21s
Project CI / Repository checks (push) Failing after 45s
Project CI / Frontend tests (push) Successful in 3m28s
Project CI / Native shell tests (push) Successful in 16m15s
等待最近项目目录检查完成后再触发清单失效事件
收紧事件后只重读清单且不重新检查目录的断言
同步实时清单测试时序约束文档
2026-08-08 17:16:00 +08:00
k88936 7ce7c11ca4 合并主分支并解决编辑器冲突
保留图片生成 V2 配方中的像素艺术风格断言
合并 AGC 统一端口段、文本编辑器与移动端欢迎页改动
合并 Jenkins 产物权限门禁并同步项目共享文档
2026-08-08 17:15:07 +08:00
k88936 9820203597 避免图标图集入队重复下载规范图
抽取图标规范 metadata-only 解析器。

队列提交只校验 owner、类型、对象元数据与游戏类型。

worker 执行阶段复用元数据校验后单次读取 OSS 正文。

补充无正文读取回归测试与契约说明。
2026-08-08 17:14:15 +08:00
k88936 78675326c7 补齐图标规范入队目标预检
在参考资源解析和定价前校验项目与素材目录。

将预检返回的规范化目标写入队列任务。

拆分本地字段与远端引用校验并补充顺序回归测试。
2026-08-08 17:11:00 +08:00
k88936 b91350f3f2 避免重复完成图标规范队列任务
共享原子持久化成功后 worker 直接返回成功。

移除仅用于二次 completion 的响应包装 helper。

补充 lease 完成职责回归测试与契约说明。
2026-08-08 17:05:10 +08:00
k88936 5379e038f6 恢复图标图集目标预检
入队前预检并回写规范化项目与素材目录。

worker 执行前再次预检最终写入目标。

补充默认目录及副作用顺序的回归测试和契约说明。
2026-08-08 17:02:13 +08:00
k88936 57c825089b 修复图标规范内联生成计费上下文
为 inline 图标规范生成初始化稳定 operation。

使用 durable billing 边界包裹共享执行器。

补充调用顺序回归测试与图标生成契约说明。
2026-08-08 16:58:41 +08:00
lhk229 0073fbd188 修正音效提交守卫的注释
Project CI / Repository checks (pull_request) Failing after 32s
Project CI / Frontend tests (pull_request) Successful in 3m56s
Project CI / Backend tests (pull_request) Successful in 4m35s
Project CI / Native shell tests (pull_request) Failing after 11m25s
改正 soundEffectDialog 的描述:它只是类型收窄,不做 canonical 化。

说明 canGenerate 守卫与 disabled 同源,是防止未来移除 disabled 后漏发付费请求的冗余防线。
2026-08-08 08:56:12 +00:00
lhk229 299cfdcd5e Merge remote-tracking branch 'origin/feat/sound_opt' into feat/sound_opt
Project CI / Repository checks (pull_request) Failing after 38s
Project CI / Frontend tests (pull_request) Successful in 2m48s
Project CI / Backend tests (pull_request) Successful in 3m57s
Project CI / Native shell tests (pull_request) Successful in 16m1s
2026-08-08 08:51:52 +00:00
lhk229 52fbdb29f7 Merge remote-tracking branch 'web/master' into feat/sound_opt 2026-08-08 08:42:07 +00:00
kdletters 83f07fc58d 统一 AGC 开发端口分配
Project CI / Repository checks (push) Failing after 1m2s
Project CI / Frontend tests (push) Successful in 3m19s
Project CI / Backend tests (push) Successful in 4m18s
Project CI / Native shell tests (push) Failing after 11m47s
将 AGC Vite 纳入 Linux 用户端口段第六槽位
同步 Tauri devUrl、Vite 监听和配套后端端口预留
兼容迁移旧五端口注册记录并阻止重复分配
补齐动态配置顺序、跨平台和进程生命周期回归测试
更新开发运维文档、端口 skill 与项目共享记忆
2026-08-08 16:18:45 +08:00
kdletters 1bbb6b7e1b 合并主分支并同步生产构建产物权限
为Stdb、API、Web与数据库导出任务精确授权产物消费者
增加Copy Artifact Production模式权限静态门禁
补充跨任务产物复制排障与生效流程文档
2026-08-08 16:11:34 +08:00
kdletters e536882479 Merge branch 'master' into feat/sound_opt
Project CI / Backend tests (pull_request) Successful in 4m40s
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Successful in 47s
Project CI / Frontend tests (pull_request) Successful in 3m42s
2026-08-08 16:11:17 +08:00
kdletters 6b1dfc77d9 修复Jenkins跨任务产物复制权限
Project CI / Repository checks (push) Successful in 45s
Project CI / Frontend tests (push) Successful in 3m6s
Project CI / Backend tests (push) Successful in 3m31s
Project CI / Native shell tests (push) Has been cancelled
为Stdb、API、Web与数据库导出任务精确授权产物消费者
增加Copy Artifact Production模式权限静态门禁
补充跨任务产物复制排障与生效流程文档
2026-08-08 16:09:54 +08:00
k88936 6d1937e6ff 合并主分支
Project CI / Repository checks (pull_request) Successful in 59s
Project CI / Frontend tests (pull_request) Successful in 3m10s
Project CI / Backend tests (pull_request) Successful in 3m46s
Project CI / Native shell tests (pull_request) Successful in 16m15s
解决合并冲突
2026-08-08 16:04:11 +08:00
k88936 3451c17142 修正图标规范主参考权威校验
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
规划与确认时从 SpacetimeDB 重建工具上下文
仅允许 icon-spec 作为精灵图主规范并完善提示
补充普通图片拒绝与图标规范通过测试
同步后端数据契约文档
2026-08-08 16:02:47 +08:00
kdletters 6db06b6c97 合并远端master更新
Project CI / Repository checks (push) Successful in 51s
Project CI / Frontend tests (push) Successful in 3m7s
Project CI / Backend tests (push) Successful in 3m32s
Project CI / Native shell tests (push) Successful in 16m20s
融合移动端提示恢复与远端钱包刷新改动

# Conflicts:
#	src/components/platform-entry/PlatformEntryActiveFlowShell.test.tsx
#	src/components/platform-entry/PlatformEntryActiveFlowShell.tsx
2026-08-08 15:56:47 +08:00
lhk229 bae124a054 合并 master 的滑动条样式改造
Project CI / Frontend tests (pull_request) Successful in 3m39s
Project CI / Repository checks (pull_request) Successful in 1m24s
Project CI / Backend tests (pull_request) Successful in 4m10s
Project CI / Native shell tests (pull_request) Has been cancelled
音效面板跟随 master 从 form 提交改为按钮 onClick,保留 canonical soundEffectDialog 与 canGenerate 守卫。

音效锁定态断言改读 aria-readonly,适配 AutoGrowTextArea 改用 Lexical contentEditable。
2026-08-08 07:53:47 +00:00
kdletters 1fb72ba26c 恢复移动端原有提示与门禁
恢复移动端首次进入欢迎遮罩与单次关闭状态
恢复删除前的桌面端创作主页提示与旧 IP 资源
保留移动端仅“我的”页签及项目画布硬门禁
补充现役依赖、静态资源与回归测试门禁
同步平台入口权威文档
2026-08-08 15:50:55 +08:00
lhk229 1664bc6bc8 修复画布 Agent 音频回填丢失 provider
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
原子提交与 worker 直接完成两条路径共用同一份结果紧凑化实现,删除重复副本。

紧凑化对 Agent 消费者保留音频必填 provider,历史上该豁免只加在 worker 副本里,原子化改造新写的副本没带上。

新增 Agent 音频紧凑结果仍可被 EditorAudioGenerateResponse 反序列化的契约测试,覆盖音效与背景音乐。
2026-08-08 07:40:27 +00:00
k88936 d1562ab65f 合并主分支并适配图标精灵图编辑
Project CI / Repository checks (pull_request) Successful in 1m35s
Project CI / Frontend tests (pull_request) Successful in 3m18s
Project CI / Backend tests (pull_request) Successful in 4m14s
Project CI / Native shell tests (pull_request) Successful in 16m18s
合入统一 Lexical 文本编辑器与滚动条样式调整
保留图标规范字段优化、字符限制与提交门禁
补齐图标生成及画布集成测试的 Lexical 交互适配
2026-08-08 15:23:29 +08:00
k88936 676bd524ee 滑动条样式调整 (#149)
Project CI / Repository checks (push) Successful in 1m23s
Project CI / Frontend tests (push) Successful in 3m1s
Project CI / Backend tests (push) Successful in 3m51s
Project CI / Native shell tests (push) Successful in 13m32s
示例来自微信:
![shotmd-1786091231.jpg](/attachments/b59bae77-00ca-4669-8a54-a9786ae53c93)

before:
- firefox:
![shotmd-1786091298.jpg](/attachments/80bbd46e-551d-4b44-abe4-d3d0ecaa34dd)

- edge:
![shotmd-1786091062.jpg](/attachments/7918c523-1b5b-4439-926d-591e0029c5b9)

after:
- firefox:
![shotmd-1786110119.jpg](/attachments/31b22537-236b-4782-bc47-28ac5ecb0f9f)
![shotmd-1786110060.jpg](/attachments/b48d5343-fd07-451d-943a-55000600e248)

- edge:

![shotmd-1786110050.jpg](/attachments/cfd0d8e4-7d52-45f2-bab8-1b573b3a43b0)

- 使用 Lexical + OverlayScrollbars 实现统一可控的滑动条样式, 取代原来的textarea

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/149
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-08 15:10:16 +08:00
lhk229 8f4cce288c 更新调试输出泄漏遗留问题状态
Project CI / Repository checks (pull_request) Successful in 1m10s
Project CI / Frontend tests (pull_request) Successful in 2m52s
Project CI / Backend tests (pull_request) Successful in 3m54s
Project CI / Native shell tests (pull_request) Successful in 13m16s
主泄漏链已由 master 修复并随合并落地,文档改记 AppConfig、AppState 与 SpacetimeClientConfig 的允许清单 Debug 与五路哨兵覆盖。

补记本分支为哨兵测试加入 ElevenLabs base URL 与 API key。

第二档仍未脱敏的九个历史 provider 配置类型逐条列出位置与明文字段,并记录已生效的止血规约。
2026-08-08 05:54:45 +00:00
lhk229 8a42b23ea4 修复 External SFX 轮询契约
Project CI / Repository checks (pull_request) Successful in 1m2s
Project CI / Frontend tests (pull_request) Successful in 2m55s
Project CI / Backend tests (pull_request) Successful in 3m51s
Project CI / Native shell tests (pull_request) Successful in 13m14s
新增具名 SFX compact 结果联合与稳定引用约束

补强轮询 OpenAPI 以及音效 metadata 结果测试
2026-08-08 05:39:51 +00:00
lhk229 38e195060b 合并 master 的付费生成预检与调试输出脱敏
Project CI / Repository checks (pull_request) Successful in 1m14s
Project CI / Frontend tests (pull_request) Successful in 2m52s
Project CI / Backend tests (pull_request) Successful in 3m54s
Project CI / Native shell tests (pull_request) Has been cancelled
合入 master 的编辑器付费生成目标预检与应用状态调试输出密钥泄漏两项修复。

SFX 直连与入队沿用 master 预检,源码顺序回归改为锁定本分支的 ElevenLabs worker 编排入口。

画布 Agent 音效参数恢复通用 null 缺省兼容,但保留 duration null 表示自动时长的 SFX V2 语义。

音效时长越界断言按 SFX V2 的 0.5-30 秒边界上移,重算契约测试期望。

哨兵测试补入 ElevenLabs base URL 与 API key,锁定其默认缺席于 AppConfig 调试输出。
2026-08-08 05:33:40 +00:00
k88936 1303df1ee7 修复运行详情竞态与场景断言
同步关闭项目或 Run 切换时的运行详情弹窗,消除延迟 effect 覆盖用户点击的竞态
更新场景提交测试,按当前稳定枚举值和完整兼容字段断言
同步补充 AI 游戏 Runtime 与场景 V2 配方文档
2026-08-08 12:53:53 +08:00
k88936 5c0e84c78a 场景生成接入改造配方
新增 scene.generate V2 配方、解码与场景面板恢复
服务端按结构化请求重建权威场景字段和参考图槽位
兼容旧场景画面内容字段并限制非场景改造入口
补充前后端测试与 assetKind 改造接入文档
2026-08-08 12:26:43 +08:00
k88936 777f567cb4 合并主分支
解决合并冲突
2026-08-08 12:03:09 +08:00
k88936 3016b6a3af 合并主分支并保留画布图标与场景生成能力
解决编辑项目后端、SpacetimeDB 客户端与前端生成流程冲突

保留图标规范及图集链路并接入场景生成与统一目标预检

同步合并运行时、钱包、契约、文档与测试改动
2026-08-08 11:43:45 +08:00
k88936 179c4c36c5 整理场景提交模型导入顺序
按 ESLint 规则排序场景生成契约导入
2026-08-08 11:23:50 +08:00
k88936 d5f0f6de93 修复场景生成输入契约
场景请求提交前将画布参数转换为字符串契约

保留素材结果中的原始画布参数类型
2026-08-08 11:16:47 +08:00
kdletters fb47002bfb 合并主分支素材库多选更新
合入素材库多选操作与批量导出更新
保留画布生成配方分支改动并解决冲突
2026-08-08 11:11:58 +08:00
k88936 498b905bd8 优化素材库多选操作 (#114)
Project CI / Repository checks (push) Successful in 1m21s
Project CI / Frontend tests (push) Successful in 3m9s
Project CI / Backend tests (push) Successful in 4m2s
Project CI / Native shell tests (push) Successful in 15m48s
<video src="attachments/2377fc8b-50e4-4919-ba41-5027b957709f" title="2026-07-27 16-15-53.mp4" controls></video>

- 实现shift ctrl的范围选扩选
- 实现多选下载(为一个zip)
- 原本有搜索和文件夹折叠展开功能, 我的处理是: 只作为方便查找的用途. 最终操作会有"目前一些(比如待删除)元素被隐藏了,请再确认"的提示.

result:
```shell
root@k88936-t14p: ~/Downloads# unzip 未命名画布-选中素材-20260806-195631.zip
Archive:  未命名画布-选中素材-20260806-195631.zip
   creating: 未命名画布-选中素材/
   creating: 未命名画布-选中素材/images/
   creating: 未命名画布-选中素材/media/
 extracting: 未命名画布-选中素材/media/001-角色动作(原始视频).mp4
   creating: 未命名画布-选中素材/sequences/
   creating: 未命名画布-选中素材/sequences/002-角色动作/
   creating: 未命名画布-选中素材/sequences/002-角色动作/frames/
 extracting: 未命名画布-选中素材/sequences/002-角色动作/frames/frame-01.png
 extracting: 未命名画布-选中素材/sequences/002-角色动作/frames/frame-02.png
 extracting: 未命名画布-选中素材/sequences/002-角色动作/frames/frame-03.png
...
 extracting: 未命名画布-选中素材/sequences/002-角色动作/frames/frame-31.png
 extracting: 未命名画布-选中素材/sequences/002-角色动作/frames/frame-32.png
 extracting: 未命名画布-选中素材/sequences/002-角色动作/metadata.json
 extracting: 未命名画布-选中素材/sequences/002-角色动作/skeleton.json
 extracting: 未命名画布-选中素材/sequences/002-角色动作/README.md
 extracting: 未命名画布-选中素材/sequences/002-角色动作/manifest.txt
 extracting: 未命名画布-选中素材/metadata.json
 extracting: 未命名画布-选中素材/manifest.txt
 ```

~~动作的导出存在很大的问题, 在另一个pr #117 解决~~

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/114
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-08 11:11:25 +08:00
k88936 e564db43f1 合并主分支
解决合并冲突
2026-08-08 10:48:13 +08:00
kdletters b8e73766fe 修复创作主页动画测试竞态 (#152)
Project CI / Frontend tests (push) Successful in 2m52s
Project CI / Backend tests (push) Successful in 3m47s
Project CI / Repository checks (push) Successful in 1m22s
Project CI / Native shell tests (push) Successful in 14m18s
## 修复内容

- 隔离角色动作预览测试中的真实帧定时器,避免异步交互期间帧序号偶发漂移。
- 保留 50ms 动画调度与失败帧、重试交互断言。
- 补充 React 中间状态断言的可控定时器约束。

## 验证

- `npm run test -- src/components/creation-home/CreationLandingView.test.tsx --reporter=dot`
- `npm run typecheck`
- `npm run check:encoding`
- `git diff --check`

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/152
2026-08-08 10:26:54 +08:00
suzmii 72f268e088 Feat/游戏场景需求v1.0 (#139)
Project CI / Repository checks (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
实现[游戏场景需求v1.0](https://kcnz41bksl1c.feishu.cn/wiki/JSF3wdhduinpqhkrVGKcZFp4nng?psg_id=8477599259997387860&refer_index=1&refer_type=citation)。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Co-authored-by: suzmii <suzmii@foxmail.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/139
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-08-08 10:25:42 +08:00
k88936 fc0dcb0782 修复泥点消耗刷新不及时 (#138)
Project CI / Repository checks (push) Successful in 50s
Project CI / Frontend tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
refactor:
- 主站复用game agent的zustand store

fix:
- 修复旧请求覆盖问题
- 修复账号切换问题

- 主站原本已经每 4 秒轮询 external generation 任务状态, 在这里补充触发余额刷新的时机

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/138
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-08 10:25:02 +08:00
kdletters 44de26d204 重构 game-chat 为单主 Agent 按需美术编排
Project CI / Repository checks (push) Successful in 1m19s
Project CI / Frontend tests (push) Successful in 2m48s
Project CI / Backend tests (push) Successful in 3m44s
Project CI / Native shell tests (push) Successful in 13m12s
由 Supervisor 持久化用户意图并只启动 code-prototype 主 Agent
按真实素材缺口动态委派受限美术 child 并绑定回执
补齐旧 Run 迁移、fixed-graph 与 isolated 后代失效及嵌套硬截止恢复
收紧美术 child 为 assets 路径写入并阻断 memory、manifest 等旁路
更新运行时 Prompt、回归测试与协作文档
2026-08-08 04:10:16 +08:00
kdletters 82a486e72b 修复编辑器付费生成目标预检 (#151)
Project CI / Repository checks (push) Successful in 57s
Project CI / Frontend tests (push) Successful in 2m48s
Project CI / Backend tests (push) Successful in 3m42s
Project CI / Native shell tests (push) Successful in 13m7s
修复 Issue #147。

- 新增只读生成目标预检 procedure,并要求编辑器生成 Runtime 服务身份
- 图片、改图、图集、UI 提取、视频、角色动作、SFX、BGM 在入队、扣费、Provider 与 OSS 写之前失败关闭
- 预检返回 canonical projectId / assetFolderId,enqueue、worker/direct 与最新原子 persist 全链复用
- 覆盖 project、旧 folder-*、默认目录、自定义目录、空值与角色生图缺省目录语义
- 更新后端架构文档、项目排障记忆和源码顺序回归

验证:
- API preflight 定向测试 4/4
- canonical target 定向测试 1/1
- SpacetimeDB module preflight 定向测试 2/2
- cargo check -p api-server -p spacetime-client -p spacetime-module --all-targets
- npm run check:spacetime-schema
- npm run check:encoding
- npm run check:rustfmt
- git diff --check

剩余边界:预检不持有跨 Provider 调用的锁;若目录在预检后并发变化,最终原子提交仍会重新校验并安全失败。

Closes #147

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/151
2026-08-07 23:56:45 +08:00
kdletters 4974844090 修复应用状态调试输出密钥泄漏 (#150)
Project CI / Frontend tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
修复 Issue #148。

- AppConfig、AppState、AppStateInner 改为封闭的手写 Debug 安全摘要
- SpacetimeClientConfig 隐藏 token、URL 与数据库自由字符串,SpacetimeClient 复用安全摘要
- 唯一哨兵覆盖五条独立 Debug 路径,并精确锁定 AppConfig 允许输出字段
- 补充运行时日志规约与项目排障记忆

验证:
- cargo test -p api-server debug_summaries_redact_all_runtime_credentials
- cargo check -p spacetime-client -p api-server --all-targets
- cargo fmt --all --check
- npm run check:encoding
- git diff --check

剩余边界:报告第二档中的历史 provider 配置类型独立 Debug 脱敏另行处理,本 PR 聚焦第一档主泄漏链。

Closes #148

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/150
2026-08-07 23:56:01 +08:00
lhk229 1f2906217b 文档:统一SFX自动时长默认口径
更新权威设计为新建 SFX 面板默认开启自动时长

同步实施计划与共享决策记录,保留预置手动值 5s
2026-08-07 15:51:30 +00:00
k88936 48b852ab04 修正图片画布编辑器导入排序
调整 ImageCanvasEditorView 的生成输入模型导入顺序以通过 ESLint。
2026-08-07 22:04:37 +08:00
lhk229 840f219e18 Merge branch 'master' into feat/sound_opt
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
2026-08-07 13:57:30 +00:00
lhk229 c4d7a76a0a 合并 master 的编辑器原子提交改造
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
引入编辑器生成 durable receipt 与原子提交链路

将 SFX Worker 适配为原子写回并保留退款与失败分类

保持 External SFX 结果脱敏、实际时长和 Loop 契约
2026-08-07 13:54:26 +00:00
k88936 8ee4ff5b4f 合并主分支
解决冲突
2026-08-07 21:46:39 +08:00
k88936 cdf41012fb 合并主分支
处理合并冲突
2026-08-07 21:08:41 +08:00
k88936 9a8564bc1d 修复图集切片配方记录类型
从预处理记录读取实际素材记录
2026-08-07 21:01:46 +08:00
suzmii d793b0e4c7 Fix: 去除账号信息弹窗四角不透明遮罩 (#144)
Project CI / Repository checks (push) Successful in 54s
Project CI / Backend tests (push) Successful in 3m51s
Project CI / Frontend tests (push) Failing after 2m19s
Project CI / Native shell tests (push) Successful in 15m8s
`before:`
![image.png](/attachments/fc0f1c7d-e722-46d4-8360-fd8069d6bb12)
`after:`
![image.png](/attachments/3c0f0f95-c27f-4053-9ce2-55a11a56b580)

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Co-authored-by: suzmii <suzmii@foxmail.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/144
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-08-07 20:46:08 +08:00
k88936 1d23f51433 调整图标优化按钮样式
将图标规范字段的一键优化按钮字号从 9px 调整为 12px
将对应撤销优化按钮字号同步调整为 12px
2026-08-07 20:45:36 +08:00
k88936 7d904974f2 合并主分支并同步外部编辑器契约
同步外部编辑器项目选择与 MCP 工具契约
同步外部 v1 OpenAPI、API 实现及相关测试
同步 CI 容器网络韧性配置
2026-08-07 20:45:36 +08:00
k88936 bd972662c7 合并 origin/master
合并编辑器生成结果原子提交与外部 MCP 项目选择修复

保留确定性派生配方与改造 capability 分离语义
2026-08-07 20:38:30 +08:00
lhk229 87c0e167c4 音频信息的时长展示收敛到两位小数
Project CI / Repository checks (pull_request) Failing after 7s
Project CI / Backend tests (pull_request) Failing after 8s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / Native shell tests (pull_request) Has been cancelled
模型返回的时长是全精度秒数,落库后信息面板会直出 8.306938775510204秒
这类无意义尾数。

- 新增 formatEditorGenerationInputFieldValue,只改写标题为「时长」或
  duration 的字段中的首个数字,四舍五入到两位小数
- 接入音频信息弹窗与导出的可见元数据两处用户可见出口
- 不补零,"自动"这类无数字取值与其他字段原样保留

只作用于展示:generationInputs 落库值不变,重绘默认时长与作品时长推断
仍按原精度解析,已有素材也一并生效。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 12:28:41 +00:00
k88936 e99f3209f1 阻止损坏生成配方降级恢复
保留生成配方 hydrate 来源状态

禁止损坏或未来版本配方回退 legacy 恢复

补齐资源快照与改造入口回归测试

记录已生成图层点击恢复浮层的产品待确认项

同步画布编辑器恢复契约文档
2026-08-07 20:25:42 +08:00
lhk229 97de29a58f 优化SFX生成面板界面
按设计稿重排音效 composer 的底部控件,并统一循环开关的选中态配色。

- 一键优化与撤销移入底部行,与时长、循环、ElevenLabs 和生成同处一排
- SFX footer 改 flex 并作用域隔离,共享的 5 列 grid 不受影响;模型 chip
  起分组作用,它与生成按钮靠右
- option-cluster 的 width: 100% 是给 grid 单元格写的,在 flex 行里会把基准
  宽度撑成整行再收缩,循环按钮因此被拉到 355px,改为按内容取宽
- footer 直接子 anchor 改 flex,消除块级盒与 inline-block 之间的基线空隙
- 时长按钮补时钟图标,新建音效默认改为自动时长
- 循环按钮补图标,Loop 改为「循环 开 / 关」,aria-label 同步
- 选中态由实心橙底配近白文字改为设计稿的淡橙底 + 橙字 + 橙描边;实底方案在
  通用 hover 用 background 简写换掉底色后会变成白底白字,hover 变体一并写死
- 删除 sound-effect-loop 选中态的重复规则,其声明与通用规则完全相同

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 11:48:32 +00:00
k88936 a321243945 合并主分支并统一编辑器生成原子提交
接入编辑器生成结果 durable receipt、稳定指纹和 SpacetimeDB 原子事务
保留图标规范与图集生成分模块实现并纳入原子提交和计费边界
统一队列 lease fencing、未知结果重放、画布 CAS 与失败退款语义
同步 schema、bindings、架构文档与回归测试
2026-08-07 19:43:37 +08:00
kdletters 1bc8ccd077 合并外部 MCP 项目选择修复
Project CI / Frontend tests (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 3m29s
Project CI / Repository checks (push) Successful in 1m3s
Project CI / Native shell tests (push) Failing after 9m33s
合并紧凑项目列表与封面稳定引用
合并 MCP 请求体参数提示与回归测试
同步 External v1 契约、Skill 与项目记忆
2026-08-07 19:41:27 +08:00
kdletters e099a519ba 修复外部 MCP 项目选择与参数提示
项目列表新增紧凑摘要和最新封面稳定引用
MCP 固定摘要视图并前置校验必填请求体
同步 External v1 OpenAPI、Skill 与项目记忆
补充十九项目超限和四个 415 工具回归测试
2026-08-07 19:21:34 +08:00
k88936 2a19ee1e27 修复图片画布生成流程导入排序
调整画布生成工作流类型导入顺序,通过 simple-import-sort 检查。
2026-08-07 17:30:14 +08:00
lhk229 cad861a13d 完成 SFX V2 T6 测试与发布门禁
抽出单一 SFX Worker 编排并覆盖计费、翻译、ElevenLabs、OSS 与写回
补齐稳定失败分类、退款和零副作用组合测试
修复画布 Agent 的自动时长、小数范围、Loop 与 Prompt 参数契约
同步测试证据、发布门禁和项目共享记忆
2026-08-07 09:30:03 +00:00
lhk229 69f850ff82 音效外部调用纳入 worker provider 预算
Project CI / Repository checks (pull_request) Successful in 58s
Project CI / Frontend tests (pull_request) Failing after 2m11s
Project CI / Backend tests (pull_request) Successful in 3m51s
Project CI / Native shell tests (pull_request) Failing after 11m35s
ElevenLabs 设置新增 request_deadline,单次请求超时按剩余预算收窄,预算耗尽时不再发出请求。

音效翻译按同一预算逐轮判定,超期直接失败而不是继续占用终态写回时间。

音效生成把 request_context 上的 provider 截止时刻分别传给翻译与 ElevenLabs 调用。

新增预算耗尽时 provider 与 LLM 请求数均为 0 的回归测试及各自的对照用例。
2026-08-07 08:27:31 +00:00
lhk229 7733202bb3 音效失败对外只返回稳定文案
把音效任务加入用户可见失败文案白名单,不再透出 ElevenLabs 端点与传输层诊断。

新增音效失败文案脱敏测试,原始诊断仍保留在任务记录、tracing 与审计事件中。
2026-08-07 08:12:03 +00:00
lhk229 92085dfdd5 音效生成请求拒绝未知字段
给 EditorSoundEffectGenerateRequest 补 deny_unknown_fields,与 OpenAPI 的 additionalProperties false 对齐。

新增 loopEnabled 等未知字段必须返回错误而非静默丢弃的契约测试。
2026-08-07 08:08:34 +00:00
lhk229 122835839a 修正 SFX Chat completion 预算契约
Project CI / Repository checks (pull_request) Successful in 1m20s
Project CI / Frontend tests (pull_request) Successful in 3m49s
Project CI / Backend tests (pull_request) Successful in 4m24s
Project CI / Native shell tests (pull_request) Successful in 14m26s
将优化与翻译的 VectorEngine Chat wire 锁定为 max_completion_tokens。

拒绝旧 max_tokens 与不适用于 Chat 的 max_output_tokens 字段。

统一权威设计、共享计划与决策记录中的 completion tokens 语义。
2026-08-07 07:39:43 +00:00
lhk229 5424424bad 合并:同步最新 master
同步 Chat completion token 预算字段能力与兼容策略。

保留 SFX V2 正式生成链路和最新 Prompt 规范化修复。
2026-08-07 07:29:43 +00:00
lhk229 5c316fc680 统一SFX提示词 trim 规范化
将 SFX Prompt 首尾规范化改为 ECMAScript String.trim 语义并同步 Rust 等值实现

更新共享边界 fixture、前后端与 Worker 回归测试

同步权威设计、实施计划、决策日志和 External OpenAPI 描述
2026-08-07 07:27:52 +00:00
k88936 e088106541 从改造入口排除原位快速编辑
移除 image.edit 的可改造 action 能力
保留快速编辑入口并隐藏改造按钮
说明原位替换结果无法可靠恢复旧 source
同步权威设计文档和回归测试
2026-08-07 15:15:18 +08:00
k88936 0b44253c9d 收窄改造缺失来源拒绝范围
可补选的必填与可选引用统一按最佳努力恢复
仅对三个无来源替换入口的 action 拒绝改造
细化快速编辑与来源绑定错误提示
补充权威设计说明和回归测试
2026-08-07 14:34:24 +08:00
lhk229 392741215c 完成 SFX V2 T5 正式生成链路
Project CI / Repository checks (pull_request) Failing after 7s
Project CI / Backend tests (pull_request) Failing after 7s
Project CI / Frontend tests (pull_request) Successful in 2m52s
Project CI / Native shell tests (pull_request) Successful in 13m43s
接通 Luna 英文化、ElevenLabs 单次生成、MP3 校验、OSS 与权威元数据写回
演进站内和 External v1 契约、幂等参数、详情重绘与 Agent 音效模型
新增 ElevenLabs 动态定价键及历史定价快照兼容
同步 OpenAPI、外部 Agent Skill、共享计划与决策记录
2026-08-07 06:13:34 +00:00
k88936 130dc8ef9a 修正改造按钮显隐语义
按生成 action 能力决定改造按钮显隐
保留支持 action 的错误入口并在点击后提示原因
补充损坏配方与缺失来源回归测试
同步画布编辑器设计文档
2026-08-07 13:58:26 +08:00
k88936 21b05f9446 修复画布生成配方恢复边界
兼容生成配方未来字段与历史完美像素快照
补齐参数回退、旧版恢复告警和本地参考图上传
收紧生成任务幂等比较与裁扩来源归属
同步画布编辑器设计文档和回归测试
2026-08-07 13:19:47 +08:00
lhk229 44ac7f1252 修正参数浮层 Escape 与全局快捷键叠加
Project CI / Frontend tests (pull_request) Successful in 2m45s
Project CI / Native shell tests (pull_request) Successful in 13m37s
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / Repository checks (pull_request) Failing after 12s
浮层处理 Escape 后截断冒泡,避免画布全局快捷键顺带关闭整个生成面板。

补齐 Escape 不外泄、外部点击不抢焦点两条回归测试。

预设轨道锁定测试改为同时校验 CSS 规则本体,堵住只断言类名的空转。
2026-08-07 05:16:31 +00:00
k88936 6725ee1b8c 合并主分支
Project CI / Frontend tests (pull_request) Successful in 3m29s
Project CI / Backend tests (pull_request) Successful in 3m47s
Project CI / Repository checks (pull_request) Successful in 1m6s
Project CI / Native shell tests (pull_request) Successful in 12m4s
解决简单合并冲突
2026-08-07 13:06:05 +08:00
k88936 323051be29 合并主分支
解决简单合并冲突
2026-08-07 13:03:38 +08:00
lhk229 6506e95fa1 音效时长浮层改用参数分组语义并补键盘策略
Project CI / Repository checks (pull_request) Failing after 8s
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Successful in 2m39s
Project CI / Native shell tests (pull_request) Successful in 12m15s
给浮层原语加 options 变体,含复选框和滑块的时长浮层退回 role=group。

浮层收起 hook 支持 Escape 关闭并把焦点还给触发按钮。

时长浮层打开后主动移焦到自动时长复选框,修正 portal 破坏的 Tab 可达性。

把一直未被 vitest 收录的浮层原语测试文件纳入 include 名单。
2026-08-07 04:43:35 +00:00
lhk229 7b67d8e9b7 锁定音频预设轨道时禁用手动横向滚动
锁定态给预设轨道加 --locked 修饰类,收紧为不可滚动容器并只放行纵向手势。

补齐 BGM 与 SFX 跑马灯锁定态的轨道滚动与相位保留断言。
2026-08-07 04:38:00 +00:00
lhk229 cb7bcbc67e 修复音效直连回包越账号刷新钱包
为 SFX 直连生成回包的钱包刷新补上账号门禁,与排队路径和 BGM 分支口径一致。

新增直连回包成功、失败两条切账号回归测试和一条同账号刷新对照测试。
2026-08-07 04:35:47 +00:00
k88936 21209910dd 修复图标生成引用与提示词校验
Project CI / Frontend tests (pull_request) Successful in 2m41s
Project CI / Native shell tests (pull_request) Successful in 12m9s
Project CI / Repository checks (pull_request) Failing after 7s
Project CI / Backend tests (pull_request) Failing after 8s
修复外部 API 参数覆盖与图标描述数组边界

提前校验 Agent 正式引用并收紧 SpacetimeDB 对象一致性

修正自然语言提示词转义与纯文本格式校验

移除图标规范占位提示词并避免重复下载参考图

补充定向测试与对应架构文档
2026-08-07 12:18:01 +08:00
k88936 e2fbef79e1 修复画布生成配方恢复与快照失真
保持背景音乐规范提示词与生成输入快照一致。

统一 V2 generationInputs 的项目、素材与完美像素账本水合,并保留 legacy 兼容。

为完美像素、裁扩、去背景和图集切片保存确定性配方并禁止改造。

由服务端按当前账号资源重建安全来源引用,修复布尔元数据显示。

补齐刷新恢复、数值布尔、无标签引用、来源溯源与确定性操作回归测试。
2026-08-07 11:53:25 +08:00
lhk229 2281458ba6 合并:同步原分支音频边界修复
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / Backend tests (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Successful in 3m8s
Project CI / Native shell tests (pull_request) Successful in 12m16s
同步 ElevenLabs 客户端单次请求约束。

同步真实 MP3 六百秒边界回归测试。

同步敏感配置调试输出遗留问题记录。
2026-08-07 03:50:24 +00:00
lhk229 e1e4f487f5 实现 SFX V2 T4 生成面板交互
新增独立 SFX Prompt 助手状态机与请求隔离、单层撤销。

抽取通用音频预设跑马灯并接入 SFX 预设、计数和优化入口。

实现自动/手动时长、Loop、模型展示及同步提交参数冻结。

恢复项目布局状态,补齐回归测试并更新 T4 权威文档与共享决策。
2026-08-07 03:49:04 +00:00
k88936 4a9f4657e9 同步编辑器图标生成权威合同
更新图标规范独立队列、计费与 worker 语义
收紧主规范引用为 referenceId 与正式资源或素材 ID
保留普通附加参考图边界并移除客户端价格字段
2026-08-07 11:45:54 +08:00
lhk229 b64c3c05ef 记录调试输出敏感配置遗留问题
Project CI / Native shell tests (pull_request) Successful in 13m18s
Project CI / Repository checks (pull_request) Failing after 10s
Project CI / Backend tests (pull_request) Failing after 10s
Project CI / Frontend tests (pull_request) Failing after 2m1s
补充 AppConfig 与 AppState 调试输出的既有风险、审查归属和后续修复边界。
2026-08-07 03:36:25 +00:00
lhk229 9d581bbe8c 锁定 ElevenLabs 单次请求与音频时长边界
显式禁用 ElevenLabs 专用 HTTP 客户端重试。

增加真实 MP3 帧的 600 秒上下边界回归测试。
2026-08-07 03:35:08 +00:00
k88936 f8bcf7cf54 修复图标规范上传类型合同
图标规范上传在项目资源与账号素材分支统一登记为 icon-spec。

补充上传后提交图集生成及两条持久化分支回归测试。

同步编辑器设计文档、外部 API Skill 与 Python helper 的 referenceId 合同。
2026-08-07 11:15:11 +08:00
lhk229 9d1f4c1975 修复项目切换 manifest 测试竞态
等待 manifest 失效监听注册后再发送失效事件

避免 CI 中测试事件丢失导致超时
2026-08-07 02:55:26 +00:00
lhk229 c3b3b47c9a 实现 SFX V2 T3 ElevenLabs 音频适配
新增 ElevenLabs 直接二进制适配、固定请求契约和单次 POST 边界。
实现 40 MiB 有界读取、MIME/MP3 校验和 600 秒纯 Rust 时长探测。
接入服务端环境配置、失败关闭 settings guard 与持久化来源解耦。
补齐 mock 回归测试、环境模板和 T3 tracked 文档记录。
2026-08-07 02:50:59 +00:00
lhk229 d208c44c86 合并:同步 SFX V2 T1 验收修复
合入共享 Prompt 边界、正式提交 canonicalization 与任意小数时长修复
合入严格 V2 metadata 构造和音频 compact 到 Agent reconcile 契约
确认 T1 修复与 T2 助手、翻译 service 依赖兼容并通过融合验证
2026-08-06 14:17:23 +00:00
lhk229 db9f452cae 修复 SFX V2 T1 验收问题
修复音频 compact 结果与 Agent reconcile 契约
统一正式 SFX 提交流程的 Unicode canonicalization
锁定队列 duration 与 Loop JSON 形态
收紧 Rust V2 metadata 构造和反序列化不变量
补齐共享边界、52 个预设 ID 和任意小数时长测试
2026-08-06 14:07:05 +00:00
lhk229 9734f78474 实现 SFX V2 T2 助手与翻译服务
新增登录态音效提示词一键优化 BFF 与严格 JSON 候选门禁
新增 Worker 内部英文化服务、Unicode Script 校验和业务重试边界
补齐 mock LLM、路由埋点、回归测试及 T2 共享实施记录
2026-08-06 14:04:36 +00:00
lhk229 cd80c085ff 实现 SFX V2 T1 契约与提示词基础
统一前后端 SFX Prompt Unicode canonicalization、字符计数和 2048 边界
固化 52 个音效预设、追加规则及跨语言测试向量
演进共享音频请求响应、duration、Loop 和 V2 metadata 契约
增加 External model 输入矩阵纯函数并保持正式接线归属 T5
补齐前端提交、读取、深拷贝与请求边界回归测试
更新共享计划并标记 T1 完成且当前不可发布
2026-08-06 13:06:10 +00:00
k88936 5eee62cf39 修复预览权限拒绝测试竞态
为自动预览权限检查断言增加 2500 毫秒等待预算
保持权限拒绝文案与禁止启动预览断言不变
2026-08-06 20:12:21 +08:00
lhk229 6fd731f56c 合并:同步最新 master 并放行 SFX T0
合并 master 的 BGM 生成路径与角色动作媒体契约更新
保留并收敛 SFX V2 权威设计与共享实施计划
标记 T0 已通过并允许进入 T1
明确 SFX V2 实际时长响应对通用媒体口径的专项覆盖
2026-08-06 12:09:53 +00:00
k88936 29498a727d 修复图标提示词与背景音乐测试
更新图标图集用户提示词隔离门禁以匹配规范化输入
调整背景音乐同步回退用例以避开项目权威快照路径
2026-08-06 19:54:31 +08:00
lhk229 c72d295a84 文档:冻结SFX生成优化V2实施口径
完善SFX V2权威设计、LLM参数、二进制与时长安全边界
新增可共享的T0至T6任务拆解、测试矩阵和迁移发布门禁
同步项目决策日志与文档索引
2026-08-06 11:47:04 +00:00
k88936 3bbde84f87 修复测试
更新图标规范生成逻辑:调整资源引用为 `resourceId`
统一后端 LLM 客户端接口
2026-08-06 19:37:32 +08:00
k88936 706fa3ca8c 同步测试用例
支持音频背景音乐生成链路的 `version: 2` 和 `action: audio.background-music.generate` 参数
2026-08-06 19:36:03 +08:00
k88936 baa1f32f8e 标注图集计费与流水线历史债务
确认计费提交早于持久化的边界继承自 master,并补充可对账状态 TODO
确认编码与上传共用并发槽继承自 master,并补充有界流水线 TODO
保留既有 OSS 清理历史 TODO,本提交不改变运行行为
2026-08-06 19:23:47 +08:00
k88936 b2b517d5b9 说明改造缺失源素材的拒绝条件
明确仅在必需 source 无法手动补齐且请求无法执行时拒绝改造
说明可手动补选的 reference 继续按 best-effort 恢复参数
2026-08-06 19:15:40 +08:00
k88936 2266d7fe89 修复图标图集审查中的边界问题
校验 LLM 完成原因并规范化 Agent 图标描述
统一前后端图标规范输入、错误返回和精确撤销行为
收紧图集拆分授权并拒绝引用 ID 歧义
修正快照映射诊断和表单标签可访问性
补充定向测试与编辑器设计文档
2026-08-06 19:15:10 +08:00
k88936 942d2d36ad 合并 BGM 生成路径优化
接入画板背景音乐预设、提示词优化与生成链路
统一前后端音频契约和 canonical prompt 语义
保留画布生成输入改造契约并同步文档与测试
2026-08-06 19:04:46 +08:00
k88936 2b8ced9195 合并主分支
解决简单冲突
2026-08-06 18:55:15 +08:00
k88936 fa02c366a9 显示图标规范输入字符计数
在一键优化与撤销操作行右侧实时显示 Unicode 字符数和 200 字符上限。

补充计数更新、emoji 截断和右对齐布局测试,并同步编辑器方案文档。
2026-08-06 17:19:41 +08:00
k88936 969afbaf94 合并主分支并解决图标生成模块冲突
保留图标规范与图集生成独立模块边界

融合主分支角色动画与图片序列字段
2026-08-06 17:13:41 +08:00
k88936 291724a984 合并主分支并解决画布生成冲突
同步主分支的角色动作序列、精选展示与外部编辑器契约更新
保留画布生成输入 V2 契约并合并视频、音效时长元数据
修复精选视频对数值型 V2 时长元数据的兼容
2026-08-06 17:09:39 +08:00
k88936 ea3b3d423d 标注图集持久化历史边界
标注并发上传失败后的对象补偿生命周期缺口。

标注 PUT、HEAD 与批量持久化尚未纳入统一处理期限。
2026-08-06 16:54:47 +08:00
lhk229 b79f72391b 优化BGM生成面板界面
Project CI / Frontend tests (pull_request) Successful in 3m7s
Project CI / Backend tests (pull_request) Successful in 3m51s
Project CI / Repository checks (pull_request) Successful in 1m27s
Project CI / Native shell tests (pull_request) Successful in 12m40s
按设计稿重排 BGM composer 的控件布局,并统一输入框行为。

- 字数计数移到「预设」标题行右端,与预设展开控件同排
- AI补全 / 一键简化 / 撤销 移入底部行,与 Suno、生成同区域
- 助手按钮补图标并压回 2.25rem 高度与胶囊圆角;shape="pill" 与
  size="xs" 走的是 Tailwind 分层 utility,压不过未分层的
  .platform-button,因此显式写死
- 预设展开 / 收起改为裸 chevron 图标按钮,可访问名由 aria-label 承担
- 预设滚动箭头去边框,hover 才出淡底
- BGM footer 改 flex 并作用域隔离,共享的 5 列 grid 不受影响
- 生成按钮收到 2.25rem,样式、文案与泥点角标保持不变
- 面板 min-height 归零并移除多余显式行,消除收起预设时的空白
- 输入框改用 AutoGrowTextArea,与生图 / 生视频 / 角色 / 图标同源,
  53.6px 起自动增高至 128px 后内滚

交互逻辑未改动。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 08:44:45 +00:00
k88936 55ff47c6c4 收紧图标图集提示词输入契约
新增独立的 spritesheet prompt 单项字符、聚合字符和 UTF-8 字节上限。

以已验证类型约束 prompt builder,并覆盖 inline、队列与 worker 执行边界。

同步画布校验、Editor Agent 工具合同、External v1 OpenAPI、文档和边界测试。
2026-08-06 16:44:33 +08:00
k88936 0b3475ef98 修复图标生成审查中的轻量问题
图标规范输出校验失败时携带无效响应和修正指令重试。
图标图集队列在定价和持久化前归一化描述数量。
手工编辑规范字段后清除失效撤销快照。
收口项目生成对话框的重复复位逻辑并补充测试和文档。
2026-08-06 16:19:48 +08:00
k88936 3fdbe81bfe 重构图标规范与图集生成链路
新增图标规范独立队列任务并将参数补全纳入统一计费操作
将图标图集生成和手工拆分迁入独立图标模块并复用公共生图能力
将图标规范引用收紧为项目资源或素材 ID
同步 SpacetimeDB 引用解析契约、External OpenAPI、前端与 Agent 提交链路
补充相关回归测试和长期架构约定
2026-08-06 15:43:10 +08:00
lhk229 59b92123b9 合并:同步最新master
Project CI / Repository checks (pull_request) Successful in 1m6s
Project CI / Backend tests (pull_request) Successful in 3m26s
Project CI / Frontend tests (pull_request) Successful in 3m18s
Project CI / Native shell tests (pull_request) Successful in 14m13s
合入远端 master 的最新提交
2026-08-06 07:24:02 +00:00
lhk229 c3e8be719d 配置BGM助手中等推理强度
Project CI / Repository checks (pull_request) Failing after 7s
Project CI / Backend tests (pull_request) Failing after 8s
Project CI / Frontend tests (pull_request) Successful in 3m42s
Project CI / Native shell tests (pull_request) Successful in 14m59s
将BGM补全与简化请求统一设置reasoning_effort为medium
补充请求对象和HTTP载荷断言并同步权威设计
2026-08-06 07:22:37 +00:00
lhk229 a786fa7562 修复背景音乐预设克隆焦点
Project CI / Repository checks (pull_request) Successful in 9m55s
Project CI / Backend tests (pull_request) Successful in 12m19s
Project CI / Frontend tests (pull_request) Successful in 15m31s
Project CI / Native shell tests (pull_request) Successful in 27m2s
将中间队列设为唯一可访问按钮并移除视觉克隆的焦点能力
为键盘预设补充可见焦点样式
补充克隆点击、锁定及键盘导航回归测试
2026-08-06 06:33:17 +00:00
lhk229 9671944e0f 合并:同步最新master
Project CI / Repository checks (pull_request) Successful in 57s
Project CI / Frontend tests (pull_request) Successful in 3m51s
Project CI / Backend tests (pull_request) Successful in 4m2s
Project CI / Native shell tests (pull_request) Failing after 3m59s
纳入远端master最新变更
2026-08-06 05:18:34 +00:00
lhk229 ee474b8ec8 测试:修复画布缓存断言竞态
Project CI / Backend tests (pull_request) Failing after 13s
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / Native shell tests (pull_request) Successful in 14m54s
等待会话缓存完成revision更新后再校验内容
2026-08-06 05:16:38 +00:00
lhk229 5b4599f147 合并:同步最新master
Project CI / Repository checks (pull_request) Successful in 1m21s
Project CI / Frontend tests (pull_request) Failing after 2m15s
Project CI / Backend tests (pull_request) Successful in 4m2s
Project CI / Native shell tests (pull_request) Failing after 10m23s
纳入远端master最新变更
2026-08-06 03:55:26 +00:00
lhk229 fe08a2643c 文档:同步T6提交与视觉验证状态
Project CI / Frontend tests (pull_request) Successful in 3m14s
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Backend tests (pull_request) Failing after 8s
Project CI / Native shell tests (pull_request) Successful in 14m18s
记录T6收口已提交并推送

补记共享音频Composer浏览器视觉验证结果
2026-08-06 03:43:56 +00:00
k88936 e6f0e6248e 修复图标规范优化细节
空响应纳入有界重试,并为优化请求设置输出 token 上限。
修复题材提示词括号并补充回归测试。
将优化请求身份更新移入已提交 effect,避免并发渲染污染。
移除冗余类型注释并同步编辑器文档。
2026-08-06 11:33:26 +08:00
k88936 aec9b61121 合并主分支游戏创作更新
同步 AI 游戏创作 Runtime、资源图与工作台主线改动
保留画布编辑器生成配方恢复改动
2026-08-06 11:32:00 +08:00
lhk229 eba8f25995 BGM音频模块迁移回isSoundEffect
Project CI / Repository checks (pull_request) Successful in 1m26s
Project CI / Frontend tests (pull_request) Successful in 3m33s
Project CI / Backend tests (pull_request) Successful in 5m52s
Project CI / Native shell tests (pull_request) Successful in 15m1s
2026-08-06 03:26:20 +00:00
k88936 3550f046e4 修复图标规范参考图超限预检
后端在调用 LLM 前按模型上限拒绝超限参考图。
前端在请求发送前限制图标规范参考图数量。
补充超限零请求回归测试与预检顺序断言。
2026-08-06 11:25:48 +08:00
lhk229 477eb1a003 合并:同步最新master
Project CI / Repository checks (pull_request) Failing after 44s
Project CI / Frontend tests (pull_request) Failing after 2m51s
Project CI / Backend tests (pull_request) Successful in 5m29s
Project CI / Native shell tests (pull_request) Successful in 13m32s
合并 origin/master 最新提交 7b075df39
保留当前分支的 BGM 优化与共享音频面板方案

# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
#	docs/project-memory/shared-memory/pitfalls.md
#	server-rs/crates/api-server/src/editor_generation_queue.rs
#	src/components/image-editor/useImageCanvasGenerationSurface.tsx
#	src/services/image-editor/editorProjectClient.ts
2026-08-06 03:10:30 +00:00
lhk229 3a363c98ff 文档:恢复音频生成共享分流并停止跟踪本地方案
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Frontend tests (pull_request) Failing after 2m48s
Project CI / Native shell tests (pull_request) Successful in 14m43s
新增共享音频 Composer 重构方案并收口权威设计
更新实施记录、决策日志、踩坑记录与文档索引
停止跟踪 local-docs 中的 T5 实施方案并保留本地文件
2026-08-06 03:03:26 +00:00
k88936 c932f5e8fb 合并主线并保留图标规范生成逻辑
同步游戏创作运行时、资源依赖画布与像素编辑链路更新
保留图标规范参考图解析与提示词结构调整
补齐合并后的前后端合同、文档与测试
2026-08-06 11:02:15 +08:00
lhk229 17bf54f211 修复:整理画布生成工作流导入顺序
按 simple-import-sort 要求调整完美像素与 BGM 助手导入顺序

通过目标文件 ESLint 与 git diff --check
2026-08-05 14:00:49 +00:00
lhk229 2a0a4238d1 Merge branch 'master' of ssh://genarrative-station:2222/GenarrativeAI/Genarrative into codex/bgm-generation-opt-v1
Project CI / Repository checks (pull_request) Failing after 43s
Project CI / Frontend tests (pull_request) Failing after 2m17s
Project CI / Backend tests (pull_request) Successful in 4m13s
Project CI / Native shell tests (pull_request) Successful in 13m17s
2026-08-05 13:54:59 +00:00
lhk229 de98219a94 合并:同步最新master
Project CI / Native shell tests (pull_request) Successful in 14m13s
Project CI / Frontend tests (pull_request) Failing after 2m22s
Project CI / Backend tests (pull_request) Successful in 4m6s
Project CI / Repository checks (pull_request) Failing after 43s
合并 origin/master 8f19964e3 到 BGM 优化分支

保留 BGM 记录、完美像素改动及双方前端测试

通过冲突相关前端定向测试(61项)
2026-08-05 13:43:10 +00:00
lhk229 aeb5894b9d 测试:完成BGM提示词优化收口并切换助手模型
增加 TypeScript/Rust 共用 canonicalization fixture
补齐 BGM 跨层等值、SFX 和后端边界测试
将 BGM 补全与简化请求模型改为 gpt-5.6-luna,保留画布 Agent gpt-5.4-mini
同步权威设计、项目记忆和 T6 发布门禁记录
验证本地定向测试与真实 VectorEngine 补全/简化请求
2026-08-05 13:35:02 +00:00
k88936 3c9039d08b 调整图标规范提示词生成逻辑
支持参考图解析
优化提示词结构
2026-08-05 20:27:59 +08:00
lhk229 69426ee61c 合并:同步最新master
保留BGM独立composer与提示词优化链路

合入master最新编辑器和项目能力

解决决策日志与音频输入组件冲突
2026-08-05 10:37:39 +00:00
k88936 93b36cb97c 合并主分支托管 MCP 更新
同步托管 MCP 开发域名访问白名单
保留画布生成配方分支改动
2026-08-05 17:52:46 +08:00
k88936 eff046a27a 修正图片画布导出导入顺序
按 ESLint 规则排序生成输入格式化函数导入
2026-08-05 17:47:43 +08:00
k88936 a47262b551 合并主分支硬截止恢复测试更新
同步游戏创作硬截止恢复测试修正
保留画布生成配方分支改动
2026-08-05 17:47:27 +08:00
k88936 0804e29daf 合并主分支运行态测试更新
同步运行态测试来源默认值修正
保留画布生成配方分支改动
2026-08-05 17:47:11 +08:00
k88936 0d0d4c0915 合并主分支协作 Prompt 约束更新
同步协作 Prompt 跨语义复用禁止规则
保留画布生成配方分支改动
2026-08-05 17:46:49 +08:00
lhk229 3b69b48860 功能:完成BGM正式提交链路
前端接入规范化提示词、同步排他锁及账号与项目分层回调门禁

关闭BGM正式POST自动重试并补充真实传输层单次请求回归

后端统一站内BGM规范载荷并保留External v1原始载荷幂等语义

补齐队列、直返、平台音频及生命周期边界测试

新增并更新T5独立实施记录
2026-08-05 09:40:02 +00:00
k88936 d4a4d0ba3a 修复持久化画布生成结果重复落层
为图标规范、视频和音频补齐项目快照缺失时的提前返回
恢复生成对话框状态并避免前端重复创建本地图层
补充 canvasCompletion 回归测试和图片画布技术文档
2026-08-05 17:05:21 +08:00
k88936 baaa587f2f 修复图标提示词标签注入风险
统一转义图标规范与图集提示词中的不可信 XML 保留字符
补充恶意闭合标签回归测试并覆盖分析、润色与图集提示词
同步后端架构文档中的提示词数据边界约束
2026-08-05 16:50:53 +08:00
k88936 ce1afde307 合并主线并同步外部接口修复
同步 Runner 客户端与 External MCP 修复
同步智能体应用方案、外部编辑器接口方案与共享记忆
保留图标规范生成面板的交互与样式调整
2026-08-05 15:45:12 +08:00
k88936 262dad5563 优化:图标规范生成面板的多行输入框, 按钮交互与图标样式
- 优化输入框样式,与画布编辑器一致。
- 调整按钮布局,添加间距和微调样式以提升一致性。
- 替换按钮文本为动态图标及文本组合,优化用户体验。
2026-08-05 15:34:39 +08:00
k88936 1f530bc806 合并主线并解决图标规范冲突
同步主线的智能体运行时、画布编辑器与后端生成链路更新
解决图标规范面板、编辑器客户端与长期决策文档冲突
保留图标规范分支的字段合同与生成入口
2026-08-05 14:40:38 +08:00
k88936 059826b06d 修复图标规范 LLM 模型配置与错误提示
为图标规范优化与参数补全请求指定默认模型
将两类请求切换为 OpenAI Chat 协议
统一 VectorEngine LLM 客户端读取与未配置错误信息
2026-08-05 14:30:56 +08:00
k88936 e9f50248b9 统一 VectorEngine LLM 客户端命名
将 editor_agent_llm_client 重命名为 vector_engine_llm_client
更新图标生成、角色动画、美术 Agent 与应用状态调用
同步排障文档中的客户端名称
2026-08-05 14:30:30 +08:00
lhk229 07eb59fb6d 文档:收口BGM正式提交边界
明确 BGM 正式提交在 queue 与 inline 模式下的结算时点
关闭 BGM 正式 POST 的 unsafe 自动重试并冻结非扩展边界
删除请求侧固定泥点价格并改为服务端动态价格口径
收紧归档与账号项目切换后的 scope-safe 写回规则
2026-08-05 06:07:41 +00:00
k88936 755f58ddfb 拆分图标规范生成预检与执行
在文本模型调用前完成图片引用、Provider与定价参数预检
补齐最终提示词后复用现有图片生成内联与队列分流
在图集业务层校验图标规范类型并解析游戏类型
补充执行顺序、任务契约与失败关闭回归测试
同步更新生成链路文档与长期决策记录
2026-08-05 14:04:54 +08:00
k88936 f76d338e69 新增编辑器引用窄查询
按主键或图片地址索引解析单个工程资源与素材
校验运行时身份、资源归属及关联对象归属并失败关闭
复用现有完整资源快照并生成客户端绑定
同步更新SpacetimeDB索引与图集引用文档
2026-08-05 14:03:51 +08:00
lhk229 d825d81810 前端:增加BGM预设与提示词交互
- 新增 ImageCanvasBackgroundMusicPresetModel:三组 30 个固定预设(用途 12 / 氛围 3 / 场景 15)与追加纯函数;按 Unicode code point 读取末位字符,标点用 \p{Punctuation} 判定,非标点先补中文句号,不去重、不截断、不改内部空白。
- 新增独立 BGM composer:canonical preview 计数不改写输入框,AI 补全、一键简化、撤销与生成按动作矩阵启用,错误复用 PlatformStatusMessage,底部保留固定 Suno 胶囊与动态泥点价格。
- 撤销按钮按权威设计矩阵渲染:可见条件为存在可撤销快照或本次临时快照,启用条件为可见且面板未锁定;AI 处理与提交期间显示并禁用,不隐藏。
- 新增预设轨道组件:多份等宽队列 + ResizeObserver 实测宽度 + rAF 按帧步进取模归位实现无缝循环;左右 15% 加速、中间 70% 暂停、箭头 hover 加速与点击离散滚动,底部细线标记当前控制区。
- 轨道只保留一份可聚焦预设按钮,视觉克隆移出可访问树但点击映射到同一动作;收起、锁定、页面不可见、dialog 切换和卸载都取消 rAF。
- 桌面 hover 控制区按 (hover: hover) and (pointer: fine) 启用,能力丢失时清空当前控制区,避免没有 pointerleave 的设备永久停在暂停态;reduced-motion 初值与运行中变化都生效。
- 触摸抬手后等待滚动事件停止再恢复 rAF,不使用固定等待时长,且不把 rAF 自身写 scrollLeft 触发的 scroll 计入空闲判定。
- 加速档按真机实测定为 238 px/s,左右控制区与箭头共用,避免两者之间出现速度突变。
- 将原共享音频 composer 收窄为 SFX-only,BGM 路由到独立组件并按 dialog ID 设置 key;SFX 的 Vidu 胶囊、时长滑块、默认 Prompt 与价格行为不变。
- 补充 ImageCanvasBackgroundMusicPresetModel、独立 composer 与预设轨道的定向测试,并扩展现有 composer 的 SFX 回归与 BGM 路由断言。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 04:59:04 +00:00
k88936 ac12e929f2 修复图标规范评审问题
迁移旧版 ui 规范快照并隔离跨对话框优化结果。

关闭非幂等图标规范生成重试并统一参考图解析逻辑。

限制 LLM 重试范围并严格校验优化文本与补全参数。

修正图集键色、数量与素材间距提示约束并补充行为测试。

同步图片画布与生成面板技术文档。
2026-08-05 11:32:18 +08:00
lhk229 0dc1eed38e 文档:明确BGM撤销按钮可见性与禁用口径
- 权威设计「单层撤销」增加撤销按钮可见性与可用性小节:可见条件为存在可撤销快照或本次 AI 操作的临时快照,启用条件为可见且面板未处于 completing / simplifying / submitting / generating 锁定状态,并补 10 行状态矩阵。
- 说明发起 AI 操作时可撤销快照被本次临时快照取代,「处理中没有可撤销快照」不等于「没有快照」,不得据此隐藏按钮;禁止为让处理期间按钮可见而保留旧快照,避免与 AI 失败不恢复旧快照冲突。
- 权威设计「AI 操作与方案 A 提交锁」限定「禁用撤销」指显示并禁用,可见性按单层撤销矩阵判定,不得隐藏。
- 权威设计验收增加撤销按钮逐行验收,要求处理期间按钮仍在可访问树中且为真实禁用态,不得用隐藏或视觉伪装代替禁用。
- decision-log 追加对应长期交互决策,标注不修改状态模型字段且不适用于 SFX。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 03:06:59 +00:00
lhk229 3fbdf210be 修复:加固BGM助手前端生命周期
- Prompt 助手 scope 改为账号与项目联合绑定:hook 接收 currentUserId / projectId 两个原始值,内部生成稳定 scope key,调用方无法再传入按引用比较的对象。
- 删除 render 阶段的 scope ref 改写,scope 身份只在已提交的 React 生命周期中推进,被放弃的并发 render 不再污染迟到响应判断。
- scope 切换改用 useLayoutEffect 在 commit 阶段同步原子清理:中止旧请求、清空 active operation、reset 状态模型、清空错误与公开 dialog 状态、重建已知 dialog 集合。修复新 scope 已 commit 而 passive effect 未执行时,旧账号 / 旧项目候选被写入同 ID dialog 的竞态。
- 迟到响应判定为 stale 时先让状态模型完成 reject 再移除 active operation,不再残留 completing / simplifying 忙状态。
- Prompt 助手 client 增加 EDITOR_BACKGROUND_MUSIC_PROMPT_ASSIST_TIMEOUT_MS = 180_000 并透传 timeoutMs,仍不启用前端重试;超时按现有失败路径恢复 idle,保留 canonical Prompt,不产生撤销快照。
- 补充定向测试:账号切换中止与清理、scope 清理早于任何 passive effect 的相位回归、等值 scope props 不误判 stale、StrictMode 双渲染、浏览器超时恢复,以及两个助手路由的超时透传与无重试断言。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 14:22:50 +00:00
lhk229 825b0ccf6c 前端:增加BGM提示词助手状态与客户端
增加补全与简化内部客户端及共享DTO
实现对话框级状态、取消、迟到响应保护和交换式撤销
接入画布生成工作流并将submitting设为排他锁
补齐同步读取、项目切换和字符边界回归测试
2026-08-04 12:36:08 +00:00
k88936 f5035af504 更新图标规范数据合同文档
将图片画布接入方案对齐 icon-spec 数据结构与专用生成链路
补充图标规范字段、优化接口、生成路由与校验约束
同步生成类面板的图标规范交互说明
2026-08-04 20:04:16 +08:00
k88936 3485bad2d3 重构:统一编辑器工作流中的 "icon-spec" 处理
- 将所有相关工作流从 "ui-spec" 迁移至 "icon-spec"。
- 优化 `playSetting` 和 `artStyle` 的输入处理逻辑。
- 更新编辑器提示词、提交模型及测试用例以适配 "icon-spec"。
- 在 UI 及后端调用中集成 `EDITOR_ICON_SPEC_PROMPT_MAX_LENGTH` 及相关校验。
- 新增 "icon-spec" 生成与微调的专用 API 路径。
- 移除旧版 "ui-spec" 相关定义及提示词构建器。
2026-08-04 20:04:07 +08:00
lhk229 b563c82c7b 修复:加固BGM助手完整性与入口保护
冻结简化输入上限、请求体边界与未完成响应规则

拒绝不完整模型响应并补齐2000字和413校验

补充助手路由埋点、回归测试与长期决策记录
2026-08-04 11:08:20 +00:00
k88936 cc86d29b83 新增基于 LLM 的图标规格优化与生成接口
新增 refine_game_play 与 refine_art_style 提示词优化接口
实现图标规范游戏类型解析与提示词构建契约
集成 API 路由并补充校验与 LLM 行为测试
2026-08-04 19:06:24 +08:00
lhk229 b4a4d68c55 后端:增加BGM提示词补全与简化接口
新增登录态补全与简化内部BFF及共享请求约束
实现OpenAI Chat四字段严格响应解析与180到170两轮简化
隔离上游错误与未通过候选并补齐重试和协议测试
同步权威设计与项目决策记录
2026-08-04 10:01:24 +00:00
k88936 59a69f063d 修复图片修改参数恢复与提交一致性
- 图片修改面板优先恢复历史模型、比例和尺寸,并保留显式设置优先级

- 图片修改提交计划统一归一化参数并下发 model、aspectRatio、imageSize 和 size

- 画布完成占位使用实际目标输出尺寸

- 补充参数恢复回归测试与编辑器方案说明
2026-08-04 18:00:23 +08:00
k88936 78307de9a1 修复图片编辑复用与元数据回退的小问题
- 修复参考素材标签的空白文本回退显示

- 重构 quick-edit 参数选择逻辑,移除嵌套三元并统一回退

- 抽取生成复用流程的参数回退与缺失素材提示逻辑

- 使用 quick-edit 提交计划中的输出尺寸构建复用时占位符
2026-08-04 17:15:33 +08:00
lhk229 8d269d785d 修复BGM规范化契约与基础校验
补全T0一键简化两轮输入、结构化结果和互斥状态规则
新增TypeScript Unicode White_Space canonicalizer与生成、补全、简化状态
新增Rust零分配canonicalizer并让计数和校验返回规范化Prompt
补齐跨语言Unicode及200/201字符边界测试
2026-08-04 08:53:55 +00:00
k88936 96b06cc39b 收紧画布生成输入V2参数恢复
新增按action统一解码生成输入参数
将失效与不兼容参数回落到当前默认值
恢复和再次提交共用规范V2结果并展示告警
记录原地收紧决策与Review处理结果
补充历史模型和非法参数回归测试
2026-08-04 16:24:31 +08:00
lhk229 dafcfbe6b7 基础:统一BGM提示词规则与助手契约
新增前端 Unicode code point 与有效字符计数规则
新增 Rust BGM 原样校验并覆盖生成和补全边界
新增 Prompt 助手 camelCase 内部 DTO 与契约测试
补齐跨语言 Unicode、200 字和 SFX 回归测试
2026-08-04 07:28:23 +00:00
k88936 a9b462d43f 修复画布生成参数复用问题
强化持久化生成输入的运行时结构校验
统一快速编辑请求尺寸、模型、参考图与生成快照
补齐视频联网搜索参数保存与恢复
隐藏缺少必需来源的复用参数入口
补充回归测试并同步编辑器方案文档
2026-08-04 14:38:56 +08:00
lhk229 8daf85df6c 文档:定稿BGM提示词优化规则
融合画板音乐权威设计,固定BGM原样Prompt、预设、补全、简化、撤销和提交锁口径。
追加长期决策,明确SFX、字段名、External v1和LLM日志策略保持不变。
2026-08-04 06:31:14 +00:00
k88936 d0fedd1d99 处理生成输入复用
新增不可用引用检测与警告
拒绝缺失必要来源的参数复用
优化引用匹配逻辑
同步测试与文档
2026-08-04 14:11:37 +08:00
k88936 5fd26a11ee 统一画布生成产物改造契约
新增 generationInputs V2 稳定 action、field id 与 reference id 契约
恢复图片、视频、音频、角色动作等生成面板并保留 legacy 回退
非生成裁扩、去背景和图集拆分不再继承生成配方
匿名精选响应不再返回 owner generationInputs
同步前后端测试与架构文档
2026-08-03 20:07:06 +08:00
646 changed files with 144402 additions and 29741 deletions
@@ -17,7 +17,7 @@ Prefer `scripts/genarrative_external_api.py` for runnable REST calls. It uses on
2. Before the first generation in a new conversation, obtain a canvas name unless an existing `projectId` and `assetFolderId` were supplied. Create or reuse a project and a same-name asset-library folder. Retain `canvasName`, `projectId`, `assetFolderId`, and the current art spec.
3. Normalize art requests into a reusable spec. Ask only for missing values that block the selected operation. Reuse the spec until the user changes its style, subject family, palette, format, or constraints.
4. Infer the operation from the user's intent. Do not ask the user to select an API unless two operations would produce materially different artifacts.
5. If a reference exists only as a local file, upload and confirm it first. Pass the stable returned `objectKey` to generation; never substitute a temporary signed URL.
5. If a reference exists only as a local file, upload and confirm it first. Pass the stable returned `objectKey` to operations that accept object references; never substitute a temporary signed URL. For an icon-spritesheet primary spec, additionally create a project resource or asset record with `assetKind="icon-spec"`, then pass the returned resource or asset ID as `referenceId`.
6. For generation endpoints that support the fields, include `projectId`, `assetFolderId`, an asset label, and `canvasCompletion` so the result enters both the canvas and its same-name library folder.
7. Treat every generation POST as asynchronous. Send one stable `Idempotency-Key` per logical request, retain the returned `operationId`, and poll the returned `statusUrl` or `GET /api/external/v1/generations/{operationId}` according to `pollAfterMs`.
8. Consume `result` only after `status=completed`. On `failed`, surface the safe error. On a client timeout or lost response, retain the operation/key; do not create a replacement request.
@@ -29,9 +29,10 @@ Prefer `scripts/genarrative_external_api.py` for runnable REST calls. It uses on
- Authenticate MCP and business API calls with `Authorization: Bearer <tnr_sk_...>`. Never ask the user to paste a key into chat or place one in repository files.
- All eight generation POST routes require `Idempotency-Key` and return HTTP `202`; `202` is durable acceptance, not a media result.
- Retry an uncertain submission only with the exact same body and the same idempotency key. A polling timeout is not permission to generate again.
- Use stable references such as `objectKey`, project resource ID, or asset ID in generation requests. Use `/assets/read-url` only for temporary preview/download access.
- Use stable references such as `objectKey`, project resource ID, or asset ID where each operation permits them. Image edit/redraw is stricter: `sourceReferenceId` accepts only a registered project resource ID or asset ID; upload confirmation alone is not enough. Use `/assets/read-url` only for temporary preview/download access.
- Preserve both warning channels after completion. A general `warning` can coexist with `sliceWarning`; do not discard either.
- Do not invent missing derivatives. A source-preserved warning means the main source remains usable but requested post-processing failed. A slice warning means the complete transparent sheet is usable but individual slices are absent.
- For successful `style="pixelArt"`, treat completed-result and nested resource/asset dimensions as the final logical-grid PNG dimensions. They may differ from `size`, `imageSize`, the provider image, and `canvasCompletion.placeholder`; do not rescale or reject the artifact to match those inputs.
- Keep generated artifacts in the canvas and asset library together. Character animation accepts `assetFolderId` and `assetLabel`; its completed result directly returns the final `assetKind="character-animation"` resource and asset with formal sequence fields. Do not create a duplicate first-frame record.
## Documentation Navigation
@@ -8,7 +8,7 @@ All paths below are relative to `https://www.genarrative.world`. Discovery and S
| Operation | Method and path | Minimum input |
| --- | --- | --- |
| List projects | `GET /api/external/v1/editor/projects` | Authentication |
| List projects | `GET /api/external/v1/editor/projects` | Authentication; optional `view=full\|summary` (default `full`) |
| Create project | `POST /api/external/v1/editor/projects` | Optional `title` |
| Load recent project | `GET /api/external/v1/editor/projects/recent` | Authentication |
| Get project | `GET /api/external/v1/editor/projects/{projectId}` | `projectId` |
@@ -19,6 +19,13 @@ All paths below are relative to `https://www.genarrative.world`. Discovery and S
Canvas save uses optimistic revision control. Pass the last authoritative `expectedRevision`; on conflict, reload instead of replaying a stale full layout.
Project listing supports two views:
- `view=full` is the REST default and returns the complete project, canvas, layers, and resources.
- `view=summary` returns only `projectId`, `title`, `updatedAt`, and nullable `cover`, so callers can display, search, disambiguate same-name projects, and select a safe target without loading every canvas snapshot.
- Hosted MCP `list_editor_projects` always uses `summary`; call `get_editor_project` after selecting a `projectId` when complete authoritative state is required.
- `cover` contains only `resourceId`, stable `objectKey`, dimensions, and `updatedAt`. It never embeds image bytes, a Data URL, or a signed URL. To display it, pass `cover.objectKey` to `get_external_asset_read_url`; signed URLs are temporary and must not be persisted or reused as generation references.
## Asset and Upload Operations
| Operation | Method and path | Minimum input |
@@ -43,12 +50,12 @@ Every generation row requires a stable `Idempotency-Key` header and returns HTTP
| Capability | POST path | Required body fields | Common optional body fields |
| --- | --- | --- | --- |
| Image generation | `/api/external/v1/editor/images/generations` | `prompt` | `kind`, `style`, `model`, `aspectRatio`, `imageSize`, `size`, `referenceImageSrcs`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion`, `generationInputs` |
| Image edit/redraw | `/api/external/v1/editor/images/edits` | `prompt`, `sourceImageSrc` | `referenceImageSrcs`, `model`, `size`, `projectId`, `assetFolderId`, `assetLabel`, `sourceResourceId`, `targetLayerId`, `canvasCompletion` |
| Icon spritesheet | `/api/external/v1/editor/icon-spritesheets/generations` | `referenceImageSrc`, `iconDescriptions` | `style`, `referenceImageSrcs`, `screenColor`, `model`, `aspectRatio`, `imageSize`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion` |
| Image edit/redraw | `/api/external/v1/editor/images/edits` | `prompt`, `sourceReferenceId` | `referenceImageSrcs`, `model`, `size`, `projectId`, `assetFolderId`, `assetLabel`, `targetLayerId`, `canvasCompletion` |
| Icon spritesheet | `/api/external/v1/editor/icon-spritesheets/generations` | `referenceId`, `iconDescriptions` | `style`, `referenceImageSrcs`, `screenColor`, `model`, `aspectRatio`, `imageSize`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion` |
| UI asset extraction | `/api/external/v1/editor/ui-designs/assets/extractions` | `sourceImageSrc`, `aspectRatio`, `imageSize` | `screenColor`, `model`, `referenceImageSrcs`, `projectId`, `assetFolderId`, `spritesheetLabel`, `canvasCompletion` |
| Character animation | `/api/external/v1/editor/character-animations/generations` | `sourceLayerId`, `sourceImageSrc`, `sourceWidth`, `sourceHeight`, `promptText`, `resolution`, `ratio`, `frameCount`, `durationSeconds`, `model` | `projectId`, `sourceResourceId`, `assetFolderId`, `assetLabel`, `canvasCompletion` |
| Video generation | `/api/external/v1/editor/videos/generations` | `prompt`, `model`, `aspectRatio`, `durationSeconds`, `resolution`, `mode`, `sound` | `referenceImageSrcs`, `referenceVideoSrcs`, `referenceAudioSrcs`, `webSearchEnabled`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion` |
| Sound effect | `/api/external/v1/editor/audios/sound-effects/generations` | `prompt`, `duration` | `model`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion`, `generationInputs` |
| Sound effect | `/api/external/v1/editor/audios/sound-effects/generations` | `prompt` | `model`, `duration`, `loop`, `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion`, `generationInputs` |
| Background music | `/api/external/v1/editor/audios/background-music/generations` | `gptDescriptionPrompt`, `makeInstrumental` | `projectId`, `assetFolderId`, `assetLabel`, `canvasCompletion`, `generationInputs` |
Poll all eight through:
@@ -70,24 +77,27 @@ Supply the `operationId` returned by submission. Poll no faster than `pollAfterM
## Reference Field Mapping
After confirming a local upload, pass its stable `objectKey` into:
After confirming a local upload, pass its stable `objectKey` into operations that accept object references:
| Target capability | Field |
| --- | --- |
| Image generation | `referenceImageSrcs` |
| Image edit/redraw | `sourceImageSrc`; additional references in `referenceImageSrcs` |
| Icon spritesheet | `referenceImageSrc`; additional style references in `referenceImageSrcs` |
| Image edit/redraw | `sourceReferenceId` must be a registered project resource ID or asset ID; additional references remain in `referenceImageSrcs` |
| Icon spritesheet | Register the primary spec as an `assetKind="icon-spec"` project resource or asset, then pass its returned ID as `referenceId`; additional style references remain in `referenceImageSrcs` |
| UI design extraction | `sourceImageSrc`; additional references in `referenceImageSrcs` |
| Character animation | `sourceImageSrc` |
| Video with image references | `referenceImageSrcs` |
Use video/audio reference arrays only with models that support them. Do not pass an expiring signed read URL as a generation reference.
For image edit/redraw, confirming an upload is not sufficient: create a project resource or asset-library record first, then pass that record's ID as `sourceReferenceId`. The main source never accepts objectKey, URL, Data URL, or Blob URL. Use video/audio reference arrays only with models that support them. Do not pass an expiring signed read URL as a generation reference.
The icon-spritesheet primary `referenceId` is intentionally stricter than ordinary image references: it accepts only a current-owner project resource ID or asset ID whose authoritative `assetKind` is `icon-spec`. It does not accept an `objectKey`, URL, Data URL, or Blob URL.
## Common Values
Use OpenAPI as the final authority; these common values are a routing aid:
- Image `kind`: `spec`, `character`, `quick-edit`, `ui-design`, `publication-material`; ordinary image generation may omit it.
- External v1 currently has no structured game-scene generation operation. Do not send `kind: "scene"` or `assetKind: "scene"` through generic image generation; the server rejects both before queueing.
- Image `model`: `gpt-image-2`, `gemini-3.1-flash-image-preview`, `nanobanana2`, `nano-banana`.
- Image `aspectRatio`: `1:1`, `2:3`, `3:2`, `9:16`, `16:9`.
- Image `imageSize`: `0.5K`, `1K`, `2K`.
@@ -95,6 +105,7 @@ Use OpenAPI as the final authority; these common values are a routing aid:
- Video `aspectRatio`: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`.
- Video `resolution`: `480p`, `720p`, `1080p`; `mode`: `std`; `sound`: `on` or `off`.
- Character animation uses `model: "seedance2.0-fast"`; `resolution`: `480p` or `720p`; `frameCount`: `32`, `40`, or `48`; `durationSeconds`: `4`, `5`, or `6`; `ratio`: `same`, `1:1`, `4:3`, `16:9`, `9:16`, or `3:4`.
- Sound effect uses canonical model `eleven_text_to_sound_v2`; omit `duration` or send `null` for automatic duration, otherwise send a finite `0.5-30` number. `loop` defaults to `false` and remains independent from Prompt text.
- UI extraction uses `aspectRatio: "1:1"`; use `imageSize: "1K"` for normal/small extraction and `2K` for dense designs.
Do not hard-code this list as a replacement client schema. In particular, the top-level image `style` field is intentionally extensible; see `requests-and-outputs.md` for its fallback behavior.
@@ -78,7 +78,7 @@ Keep the existing autonomous-build task graph. Do not add a parallel task system
1. `art-director` generates `assets/art-spec.png` with image generation, `kind: "spec"`, then registers it as `assetKind: "icon-spec"`. This image is the authoritative visual spec; `generationInputs.artSpec` is supporting structured context.
2. `design-foundation` generates `assets/ui-prototype.png` with `kind: "ui-design"`, using the registered art-spec resource ID in `referenceImageSrcs`.
3. `art-asset-plan` generates transparent `assets/art-spritesheet.png` through icon spritesheet generation, using the same registered art-spec resource ID as `referenceImageSrc` plus concrete `iconDescriptions`.
3. `art-asset-plan` generates transparent `assets/art-spritesheet.png` through icon spritesheet generation, using the same registered art-spec resource ID as `referenceId` plus concrete `iconDescriptions`.
For a playable Canvas game, do not stop at generation. Make `code-prototype` depend on `art-asset-plan` and consume the persisted `iconImageSrcs` slices for core players, blocks or targets, scene obstacles, and feedback. For the four-category game-chat contract, require exactly four slices before registering the local runtime sheet; both fewer and extra components fail closed. Treat `art-spec.png` as reference-only. A full-sheet `<img>`, CSS background, path-only mention, guessed equal-grid crop, or code-drawn replacement for core entities is not runtime asset use. If slicing produces `sliceWarning`, keep the complete transparent sheet as a valid editor artifact, but fail the playable game asset gate until real slice files or verified atlas coordinates exist; never invent coordinates or replace the icon-spritesheet route with ordinary image generation.
@@ -96,7 +96,7 @@ A minimal `canvasCompletion` is:
}
```
`dialogId` is optional. Do not reconstruct canvas state from completion results. Reload the project and asset library when complete authoritative snapshots are needed.
`dialogId` is optional. The placeholder supplies canvas placement and completion coordinates; it is not a final media pixel-size constraint. For successful pixel-art snapping, the result layer uses the final logical-grid PNG dimensions even when they differ from the placeholder. Do not reconstruct canvas state from completion results. Reload the project and asset library when complete authoritative snapshots are needed.
Character animation accepts `assetFolderId` and `assetLabel` and persists the final transparent sequence directly. Its completed compact result includes the authoritative `assetKind="character-animation"` resource and asset with `imageSequenceFrames` and `imageSequenceDurationMs`. Use those records directly and never synthesize a duplicate asset from the first frame.
@@ -104,6 +104,8 @@ For the lower-level asset/resource creation endpoints, `generationInputs` is rep
## Art Spec and Image Request
Generic External v1 image generation does not expose the main-site structured game-scene contract. `kind: "scene"` and `assetKind: "scene"` are both invalid and return HTTP `400` before any generation job is queued. Do not replace the structured scene fields and server-owned prompt assembly with a generic image prompt.
Carry the current art spec in `generationInputs.artSpec` and reflect important constraints in the prompt:
```json
@@ -143,7 +145,7 @@ Carry the current art spec in `generationInputs.artSpec` and reflect important c
The top-level `style` field is not the art spec's visual-style prose. It appends a short server-side clause to the prompt sent to the provider and enables deterministic post-processing:
- Omitted, `null`, empty string, or `"none"`: no clause is appended and no post-processing runs, without warning.
- `"pixelArt"`: append one short pixel-art line to the end of the prompt sent to the provider, and enable pixel-art snapping, for ordinary image generation, `kind: "character"`, and icon spritesheet generation. The line is appended, not substituted — the rest of your prompt is unchanged. For the exact per-kind wording, read the `style` field description in the OpenAPI document; it is the contract, and this guide deliberately does not copy it.
- `"pixelArt"`: append one short pixel-art line to the end of the prompt sent to the provider, and enable pixel-art snapping, for ordinary image generation, `kind: "character"`, and icon spritesheet generation. On successful snapping, each detected grid cell becomes one output pixel and the logical-grid PNG is persisted directly; it is not resized back to `size`, `imageSize`, the provider image, or `canvasCompletion.placeholder`. The line is appended, not substituted — the rest of your prompt is unchanged. For the exact per-kind wording, read the `style` field description in the OpenAPI document; it is the contract, and this guide deliberately does not copy it.
- Unknown strings, or `"pixelArt"` on unsupported kinds such as `spec`, `quick-edit`, `ui-design`, or `publication-material`: continue without style processing and return `warning.code: "unsupported-image-style"`.
- Non-string JSON values: malformed request, HTTP `400`.
@@ -167,6 +169,10 @@ client.generate_image(
)
```
Image edit/redraw has a stricter main-source identity rule. After upload confirmation, create either a project resource or an asset-library record and pass its `resourceId` or `assetId` as `sourceReferenceId`. Do not pass the uploaded objectKey as the main source; objectKey remains valid only for auxiliary `referenceImageSrcs` where the OpenAPI permits it.
Icon spritesheet generation has a stricter primary-spec contract. After upload confirmation, create a project resource or asset record with `assetKind: "icon-spec"`, retain its returned `resourceId` or `assetId`, and pass that ID as `referenceId`. The primary spec does not accept the uploaded `objectKey` directly; only additional style references may continue to use stable object keys in `referenceImageSrcs`.
For character animation from a local-only source, use actual dimensions and a stable synthetic layer ID:
```json
@@ -192,7 +198,8 @@ Do not guess dimensions or pass a temporary signed read URL. See `authentication
The completed `result` may contain stable artifact fields such as:
- `objectKey`, media type, dimensions, or task ID.
- `objectKey`, media type, dimensions, or task ID. For successful `pixelArt`, image `width`/`height`, icon `spritesheetWidth`/`spritesheetHeight`, and nested resource/asset dimensions are the actual final logical-grid PNG dimensions rather than requested, provider, or placeholder dimensions.
- Sound-effect `durationSeconds` is the probed MP3 duration and `loop` is the frozen request boolean; neither is inferred from Prompt text.
- `resource`, `resourceId`, or equivalent canvas reference.
- `asset`, `assetId`, or equivalent library reference.
- `spritesheetResource`, `spritesheetAsset`, and stable spritesheet metadata.
@@ -204,6 +211,10 @@ It deliberately excludes a complete project/canvas/library snapshot, Data URL, B
Interpret warnings only after the query reaches `status=completed`. The query-level `warning` is display-ready text. Compact `result.warning` and `result.sliceWarning` preserve structured artifact semantics.
### Delivery-size normalization result before pixel-art snapping
`result.warning.code: "dimension-restore-fallback"` records only the delivery-size normalization result established before any subsequent `pixelArt` snapping: the provider image could not be safely normalized, so its dimensions were preserved at that processing boundary. It does not describe or constrain the dimensions after `pixelArt`; if snapping succeeds, use the completed result's actual logical-grid dimensions as authoritative.
### Source-preserved post-processing failure
When `result.warning.code` is `postprocess-failed-source-preserved`:
@@ -548,22 +548,28 @@ class GenarrativeExternalClient:
idempotency_key=idempotency_key,
)
def edit_image(self, prompt: str, source_image_src: str, **fields: Any) -> Any:
def edit_image(self, prompt: str, source_reference_id: str, **fields: Any) -> Any:
source_reference_id = source_reference_id.strip()
if not source_reference_id:
raise GenarrativeApiError("source_reference_id must be a registered resource or asset ID")
self._apply_canvas_session_fields(fields, prompt, 1024, 1024)
prompt = self._apply_art_spec(fields, prompt)
idempotency_key = fields.pop("idempotencyKey", None)
return self.submit_and_wait_generation(
"/api/external/v1/editor/images/edits",
{"prompt": prompt, "sourceImageSrc": source_image_src, **fields},
{"prompt": prompt, "sourceReferenceId": source_reference_id, **fields},
idempotency_key=idempotency_key,
)
def generate_icon_spritesheet(
self,
reference_image_src: str,
reference_id: str,
icon_descriptions: list[str],
**fields: Any,
) -> Any:
reference_id = normalize_optional_text(reference_id)
if not reference_id:
raise GenarrativeApiError("reference_id must be a registered icon-spec resource or asset ID")
descriptions = [item.strip() for item in icon_descriptions if item.strip()]
if not descriptions:
raise GenarrativeApiError("icon_descriptions must contain at least one non-empty item")
@@ -574,9 +580,9 @@ class GenarrativeExternalClient:
return self.submit_and_wait_generation(
"/api/external/v1/editor/icon-spritesheets/generations",
{
"referenceImageSrc": reference_image_src,
"iconDescriptions": descriptions,
**fields,
"referenceId": reference_id,
"iconDescriptions": descriptions,
},
idempotency_key=idempotency_key,
)
@@ -649,13 +655,19 @@ class GenarrativeExternalClient:
idempotency_key=idempotency_key,
)
def generate_sound_effect(self, prompt: str, duration: int, **fields: Any) -> Any:
def generate_sound_effect(
self,
prompt: str,
duration: float | None = None,
loop: bool = False,
**fields: Any,
) -> Any:
self._apply_canvas_session_fields(fields, prompt, 360, 120)
prompt = self._apply_art_spec(fields, prompt)
idempotency_key = fields.pop("idempotencyKey", None)
return self.submit_and_wait_generation(
"/api/external/v1/editor/audios/sound-effects/generations",
{"prompt": prompt, "duration": duration, **fields},
{"prompt": prompt, "duration": duration, "loop": loop, **fields},
idempotency_key=idempotency_key,
)
@@ -766,9 +778,11 @@ def _self_test() -> None:
["蛇头向上", "蛇身直线", "转角", "尾部", "四类食物"],
canvasSession=session,
assetLabel="贪吃蛇透明图集",
referenceId="must-not-override-explicit-reference",
iconDescriptions=["不得覆盖显式图标描述"],
)
assert calls[0]["path"] == "/api/external/v1/editor/icon-spritesheets/generations"
assert calls[0]["body"]["referenceImageSrc"] == "editor-resource-spec"
assert calls[0]["body"]["referenceId"] == "editor-resource-spec"
assert calls[0]["body"]["screenColor"] == "auto"
assert calls[0]["body"]["iconDescriptions"][0] == "蛇头向上"
assert calls[1]["path"] == "/api/external/v1/generations/task-operation-demo"
+5
View File
@@ -130,6 +130,11 @@ VECTOR_ENGINE_BASE_URL="https://api.vectorengine.cn"
VECTOR_ENGINE_API_KEY=""
VECTOR_ENGINE_IMAGE_REQUEST_TIMEOUT_MS="1000000"
# ElevenLabs editor sound-effect generation is server-side only.
ELEVENLABS_BASE_URL="https://api.elevenlabs.io"
ELEVENLABS_API_KEY=""
ELEVENLABS_REQUEST_TIMEOUT_MS="180000"
# 阿里云 OSS 配置。
# Rust `server-rs` 的 `api-server` 会优先从 `.env` / `.env.local` 读取这些变量,
# 用于签发浏览器 PostObject 直传票据,并保持 `/generated-*` 旧路径习惯。
+2
View File
@@ -46,6 +46,7 @@ module.exports = {
{
files: [
'apps/admin-web/src/pages/*.tsx',
'src/components/platform-entry/PlatformActiveMobileWelcomeDialog.tsx',
'src/components/platform-entry/PlatformMobileHomeWelcomeDialog.tsx',
],
rules: {
@@ -72,6 +73,7 @@ module.exports = {
'src/components/image-editor/**/*.{ts,tsx}',
'src/components/project/**/*.{ts,tsx}',
'src/components/platform-entry/PlatformActiveProfileView*.tsx',
'src/components/platform-entry/PlatformActiveMobileWelcomeDialog*.tsx',
'src/components/platform-entry/PlatformEntryActiveFlowShell*.tsx',
'src/components/platform-entry/PlatformEntryFlowShell.tsx',
'src/components/platform-entry/PlatformProfileApiKeysModal.tsx',
+2 -17
View File
@@ -69,23 +69,8 @@ jobs:
- name: Install npm dependencies
run: bash scripts/ci-npm-ci-with-retry.sh
- name: Run repository lint gates
run: npm run lint
- name: Build web applications
run: npm run build
- name: Validate content data
run: npm run check:content
- name: Check committed whitespace
shell: bash
run: |
set -euo pipefail
base_ref="${SPACETIME_SCHEMA_BASE_REF:-}"
test -n "${base_ref}"
git cat-file -e "${base_ref}^{commit}"
git diff --check "${base_ref}"...HEAD
- name: Run repository checks
run: npm run check:repository-ci
frontend-tests:
name: Frontend tests
+2
View File
@@ -39,6 +39,8 @@ temp*build*/
/apps/ai-game-creator-shell/game-creator.config.local.json
/apps/mobile-shell/.expo/
/apps/mobile-shell/.expo-export-smoke/
/apps/preview-deployer-web/dist/
/apps/preview-deployer-web/node_modules/
/server-rs/.spacetimedb/
/server-rs/.data/
/public/generated-animations
@@ -2,7 +2,7 @@
name: genarrative-dev-stack-port-routing
short_description: 修改 Genarrative 本地 dev 启动端口、代理目标、端口冲突处理时使用。
description: 在 Genarrative 中修改 npm run dev / dev:spacetime / dev:api-server / dev:bgfilter-worker / dev:web / dev:admin-web 的本地启动端口、端口可用性探测、端口漂移、SpacetimeDB publish server、Rust 进程环境变量、Vite 代理目标和后台 admin-web 启动串联时使用。
version: 1.1.0
version: 1.2.0
author: Hermes Agent
license: MIT
metadata:
@@ -17,7 +17,7 @@ metadata:
## 适用场景
- 修改 `scripts/dev.mjs``scripts/dev-utils.mjs``scripts/dev-stack-port-utils.mjs`
- 修改 `scripts/dev.mjs``scripts/dev-utils.mjs``scripts/dev-stack-port-utils.mjs` 或 AI 游戏创作客户端 dev 启动器
- 处理 `3000``3101``3102``8082` 等端口被占用导致本地开发栈启动失败。
- 排查 Vite 代理仍指向旧 api-server 端口、前端打开了旧 dev server、后台代理错配。
- 调整 SpacetimeDB standalone、publish、Rust `api-server`、主站 Vite、后台 Vite 的启动顺序。
@@ -32,10 +32,11 @@ metadata:
3. SpacetimeDB standalone`3101`,健康检查为 `http://127.0.0.1:<spacetime-port>/v1/ping`
4. 后台 Vite`3102`,后台地址为 `http://127.0.0.1:<admin-web-port>/admin/`
5. 独立 BgFilter worker`8083`,就绪检查为 `http://127.0.0.1:<bgfilter-worker-port>/readyz`
6. AI 游戏创作 Vite:非 Linux 兼容首选 `3080`Linux 使用当前用户端口段的 `start + 5`
端口不可用时,脚本会从优先端口开始向后寻找可用端口。后续流程必须以解析后的实际端口为准,不能继续使用默认端口。
Linux 多用户并发开发时,`GENARRATIVE_DEV_PORT_RANGE``--port-range` 会先向系统级注册表 `/var/tmp/genarrative-dev-port-ranges/registry.json` 申请一个端口段,再把该段映射为 `web = start``api = start + 1``spacetime = start + 2``adminWeb = start + 3``bgfilterWorker = start + 4`。注册表锁文件是 `/var/tmp/genarrative-dev-port-ranges/registry.lock`,可通过 `GENARRATIVE_DEV_PORT_RANGE_REGISTRY_DIR` 覆盖目录。自动分配从 `10000-10099` 起,每次占用 100 个端口块,后续块按 `10100-10199``10200-10299` 递增;当前口径是“一个用户固定占用一个段,后续启动继续复用这段并在段内漂移”;该注册表只在 Linux 上生效;Windows 继续沿用原有统一端口探测和漂移逻辑,不读系统级注册表。
Linux 多用户并发开发时,`GENARRATIVE_DEV_PORT_RANGE``--port-range` 会先向系统级注册表 `/var/tmp/genarrative-dev-port-ranges/registry.json` 申请一个端口段,再把该段映射为 `web = start``api = start + 1``spacetime = start + 2``adminWeb = start + 3``bgfilterWorker = start + 4``agcVite = start + 5`。注册表锁文件是 `/var/tmp/genarrative-dev-port-ranges/registry.lock`,可通过 `GENARRATIVE_DEV_PORT_RANGE_REGISTRY_DIR` 覆盖目录。自动分配从 `10000-10099` 起,每次占用 100 个端口块,后续块按 `10100-10199``10200-10299` 递增;当前口径是“一个用户固定占用一个段,后续启动继续复用这段并在段内漂移”;该注册表只在 Linux 上生效;Windows 继续沿用原有统一端口探测和漂移逻辑,不读系统级注册表。
## 实现入口
@@ -51,9 +52,12 @@ Linux 多用户并发开发时,`GENARRATIVE_DEV_PORT_RANGE` 或 `--port-range`
- `scripts/dev.mjs`
- 解析 CLI 参数后统一计算 client host、端口、`SPACETIME_SERVER``RUST_SERVER_TARGET`
- 完整栈按 SpacetimeDB、publish、BgFilter worker readiness、api-server readiness、主站 Vite、后台 Vite 顺序启动。
- Linux 下会先申请系统级端口段并把它映射成五个 dev 端口;自动分配从 `10000-10099`Windows 则把第五个服务纳入原有统一参数解析与端口漂移逻辑。
- Linux 下会先申请系统级端口段并映射成六个预留槽位;主 dev 栈使用前五个,AGC Vite 使用 `start + 5`自动分配从 `10000-10099`Windows 的主 dev 栈和 AGC 则各自沿用统一端口探测与漂移逻辑。
- 完整栈和 `dev:api-server` 把两个 Rust 进程作为同一重启单元,先全部停止,再先启动 BgFilter worker、后启动 api-server;不要为同一份 Rust 源码创建两个并发 `cargo` watcher。
- 单模块命令复用同一套参数和 env 解析。
- `apps/ai-game-creator-shell/scripts/dev-port.mjs`
- 复用系统级用户端口段,解析 AGC Vite 的 `start + 5` 首选槽位。
- 把最终端口通过 `GENARRATIVE_AGC_VITE_PORT` 同步给 `beforeDevCommand` 和配套后端端口解析器,通过 Tauri CLI `--config` 同步 `build.devUrl`,并通过 Vite CLI `--port` 同步 `strictPort` 监听。
## 必须保持的传递链路
@@ -69,6 +73,7 @@ Linux 多用户并发开发时,`GENARRATIVE_DEV_PORT_RANGE` 或 `--port-range`
8. 后台 Vite`ADMIN_API_TARGET``GENARRATIVE_API_TARGET``GENARRATIVE_API_PORT``--port=${ADMIN_WEB_PORT}`
9. 控制台日志:`[dev:ports]``[dev] web/admin web/api-server/bgfilter-worker/spacetime` 必须显示最终实际地址。
10. Linux 端口段注册:`[dev] port-range:``[dev] port-range-registry:` 只在 Linux 输出,Windows 不应依赖系统级注册表。
11. AI 游戏创作客户端:外层启动器解析最终 AGC Vite 端口后,通过 Tauri CLI `--config` 覆盖 `build.devUrl`,把同一 `GENARRATIVE_AGC_VITE_PORT` 传给 `beforeDevCommand` 与配套后端端口解析器,并用 Vite CLI `--port` 启动严格监听;后端端口漂移必须跳过该预留端口。
如果只改了其中一段,通常会出现:浏览器打开的前端可用,但 `/api/*` 代理到旧端口;后台页面可用但后台 API 失败;SpacetimeDB 启动在新端口但 publish 仍发往旧端口。
@@ -128,6 +133,7 @@ node scripts/dev-stack-port-utils.mjs resolve-dev-stack spacetime:127.0.0.1:0 ap
- [ ] `npm run dev` 的 SpacetimeDB、publish、api-server、主站 Vite、后台 Vite 都使用实际端口。
- [ ] BgFilter worker 在 api-server 前 ready,父子共享实际 base URL / TokenRust watch 只触发一次组合重启。
- [ ] `npm run dev:web` 在主站端口不可用时能切换到可用端口。
- [ ] `npm run agc` / `npm run agc:game-chat` 在 Linux 使用用户段 `start + 5`Tauri、Vite、marker 和预检使用同一最终端口。
- [ ] 文档同步更新 `docs/【开发运维】本地开发验证与生产运维-2026-05-15.md`
- [ ] 长期踩坑同步更新 `docs/project-memory/shared-memory/pitfalls.md`
- [ ] 修改中文文件后运行 `npm run check:encoding`
+1
View File
@@ -0,0 +1 @@
npm run format:staged
+1
View File
@@ -0,0 +1 @@
npm run check:pre-push-master -- "$@"
+6
View File
@@ -26,6 +26,12 @@
- 后续新增 Markdown 文档文件名必须以分类标签开头,格式为 `【标签名】中文标题-日期.md`;历史文档不要求批量重命名,除非本次任务明确涉及。
- 工程修改要同步更新对应 `docs/` 文档;产生长期有效的架构约定、接口变化、排障经验、开发流程或协作规则时,同步更新 `docs/project-memory/shared-memory/`
- 默认保持系统简洁:优先复用、修改、扩展现有系统、页面和公共组件,不新建平行系统或平行页面。
- 对已明确退役且不存在现役调用方、公开契约、持久化数据、活跃实例或迁移要求的对象,坚持“四不写”:
1. 不写历史兼容代码。
2. 不写用于维持退役行为的防御性兼容测试。
3. 不写仅说明其曾存在或已删除的墓碑注释。
4. 不写仅记录其已删除的墓碑文档;直接将权威文档更新为当前状态。
- 公开 API、持久化数据、SpacetimeDB schema、跨版本重放、活跃实例和正式迁移不适用“四不写”;必要兼容应最小化、白名单化并配套契约或迁移测试,迁移完成后同步删除兼容实现与对应测试。
- UI 面板中不要默认写功能说明、规则描述或开发解释文案;移动端优先,同时保证网页端可正常显示和操作。
- 点击按钮弹出独立面板的设计,不要实现成在当前面板下面追加内容。
@@ -1,4 +1,5 @@
{
"agentMode": "codex_app_server",
"llm": {
"apiKey": "",
"baseUrl": "https://api.openai.com/v1",
+11
View File
@@ -10,7 +10,9 @@
"dependencies": {
"@lexical/react": "^0.47.0",
"@lexical/utils": "^0.47.0",
"@tauri-apps/api": "^2.11.1",
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
"@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-opener": "~2",
"@vitejs/plugin-react": "^5.0.4",
"lexical": "^0.47.0",
@@ -2208,6 +2210,15 @@
"@tauri-apps/api": "^2.8.0"
}
},
"node_modules/@tauri-apps/plugin-http": {
"version": "2.5.9",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-http/-/plugin-http-2.5.9.tgz",
"integrity": "sha512-lCiY0+vs4HvIUSvZrBs8TC3TiCB0MOPRmiUjTq4prW7SlcJE2jdLeT6KBsJrT9Tlplufl7W1pY6SFAO3gCWxDA==",
"license": "MIT OR Apache-2.0",
"dependencies": {
"@tauri-apps/api": "^2.11.0"
}
},
"node_modules/@tauri-apps/plugin-opener": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.4.tgz",
+2
View File
@@ -36,7 +36,9 @@
"dependencies": {
"@lexical/react": "^0.47.0",
"@lexical/utils": "^0.47.0",
"@tauri-apps/api": "^2.11.1",
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
"@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-opener": "~2",
"@vitejs/plugin-react": "^5.0.4",
"lexical": "^0.47.0",
@@ -253,12 +253,24 @@ export function defaultRuntimeConfigDirCandidates({
),
);
} else {
const configuredRoot = environment.XDG_CONFIG_HOME;
const posixAbsoluteConfiguredRoot =
configuredRoot && path.posix.isAbsolute(configuredRoot);
const hostAbsoluteConfiguredRoot =
configuredRoot &&
!posixAbsoluteConfiguredRoot &&
path.isAbsolute(configuredRoot);
const configRoot =
environment.XDG_CONFIG_HOME &&
path.posix.isAbsolute(environment.XDG_CONFIG_HOME)
? environment.XDG_CONFIG_HOME
configuredRoot &&
(posixAbsoluteConfiguredRoot || hostAbsoluteConfiguredRoot)
? configuredRoot
: path.posix.join(homeDirectory, '.config');
pushUnique(candidates, path.posix.join(configRoot, appIdentifier));
pushUnique(
candidates,
hostAbsoluteConfiguredRoot
? path.join(configRoot, appIdentifier)
: path.posix.join(configRoot, appIdentifier),
);
}
return candidates;
}
@@ -62,6 +62,14 @@ const viteConfigSource = fs.readFileSync(
new URL('../vite.config.ts', import.meta.url),
'utf8',
);
const devPortSource = fs.readFileSync(
new URL('../scripts/dev-port.mjs', import.meta.url),
'utf8',
);
const startTauriDevSource = fs.readFileSync(
new URL('../scripts/start-tauri-dev.mjs', import.meta.url),
'utf8',
);
const appSource = [
readSourceTree(new URL('../src/', import.meta.url), '.ts'),
readSourceTree(new URL('../src/', import.meta.url), '.tsx'),
@@ -106,9 +114,22 @@ const rustSharedContractSource = fs.readFileSync(
'utf8',
);
const allowedUncalledTauriCommands = [
'archive_failed_local_project_resource_edit',
'chat_with_game_creator_agent',
'commit_local_project_asset',
'confirm_local_project_asset_canvas_generation_service_identity',
'create_local_project_asset_canvas_draft',
'discard_local_project_asset_canvas_draft',
'generate_local_project_asset_canvas_image',
'open_game_creator_launcher_window',
'open_game_creator_workspace_window',
'read_local_project_asset_canvas_draft',
'read_local_project_asset_canvas_media',
'recover_local_project_asset_canvas_transactions',
'recover_local_project_asset_canvas_generations',
'stage_local_project_asset_canvas_image',
'store_local_project_asset_canvas_media',
'update_local_project_asset_canvas_draft',
];
const sourceExtensions = new Set([
'.json',
@@ -643,10 +664,12 @@ async function runConfigWizardRegressionChecks() {
apiKind: 'openai_responses',
},
);
assert.equal(updatedPrimary.agentMode, 'provider');
await writeGameCreatorWizardConfig(overlayState, updatedPrimary);
const reloadedState =
await readGameCreatorWizardConfigState(overlayConfigDir);
assert.equal(reloadedState.effectiveConfig.llm.apiKey, 'fixture-new-key');
assert.equal(reloadedState.effectiveConfig.agentMode, 'provider');
assert.equal(reloadedState.effectiveConfig.llm.model, 'new-model');
assert.equal(
reloadedState.effectiveConfig.llm.baseUrl,
@@ -1152,6 +1175,12 @@ if (defaultAppConfig.llm?.apiKey !== '') {
throw new Error('AI game creator shell default llm.apiKey must stay empty');
}
if (defaultAppConfig.agentMode !== 'codex_app_server') {
throw new Error(
'AI game creator shell default agentMode must be codex_app_server',
);
}
const allowedLlmReasoningEfforts = new Set([
'default',
'low',
@@ -1208,16 +1237,16 @@ if (
clientWindow.width !== 1280 ||
clientWindow.height !== 800 ||
clientWindow.minWidth !== 1280 ||
clientWindow.minHeight !== 800
clientWindow.minHeight !== 720
) {
throw new Error(
'AI game creator shell client window must keep the landscape workbench size',
'AI game creator shell client window must default to 1280x800 and stay at least 1280x720',
);
}
if (tauriConfig.build?.devUrl !== 'http://127.0.0.1:3080/') {
throw new Error(
'AI game creator shell Tauri devUrl must stay on the fixed Vite dev port',
'AI game creator shell Tauri config must retain the non-launcher fallback devUrl',
);
}
@@ -1227,12 +1256,41 @@ if (!viteConfigSource.includes("host: '127.0.0.1'")) {
);
}
if (!viteConfigSource.includes('port: 3080')) {
if (
!viteConfigSource.includes('port: 3080') ||
!viteConfigSource.includes('port: server.config.server.port')
) {
throw new Error(
'AI game creator shell Vite dev port must match Tauri devUrl',
'AI game creator shell Vite config must retain its fallback and report the actual CLI-selected port',
);
}
for (const snippet of [
'mapDevPortsToPortRange',
'agcVitePort',
'resolveAgcDevEndpoint',
'GENARRATIVE_AGC_VITE_PORT',
]) {
if (!devPortSource.includes(snippet)) {
throw new Error(
`AI game creator shell dev port resolver drifted: ${snippet}`,
);
}
}
for (const snippet of [
'resolveAgcDevEndpoint',
'withAgcDevEndpointEnv',
"'--config'",
'configOverride',
]) {
if (!startTauriDevSource.includes(snippet)) {
throw new Error(
`AI game creator shell Tauri dev port injection drifted: ${snippet}`,
);
}
}
if (!viteConfigSource.includes('strictPort: true')) {
throw new Error(
'AI game creator shell Vite dev server must not drift away from Tauri devUrl',
@@ -1253,7 +1311,7 @@ if (
)
) {
throw new Error(
'AI game creator shell beforeDevCommand must reuse or start the fixed Vite dev server',
'AI game creator shell beforeDevCommand must start the selected Vite dev server',
);
}
@@ -1414,6 +1472,22 @@ if (
);
}
const gameChatReleaseWindows = gameChatReleaseTauriConfig.app?.windows ?? [];
const gameChatReleaseClientWindow = gameChatReleaseWindows[0];
if (
gameChatReleaseWindows.length !== 1 ||
gameChatReleaseClientWindow?.label !== 'client' ||
gameChatReleaseClientWindow?.url !== 'index.html' ||
gameChatReleaseClientWindow?.width !== 1280 ||
gameChatReleaseClientWindow?.height !== 800 ||
gameChatReleaseClientWindow?.minWidth !== 1280 ||
gameChatReleaseClientWindow?.minHeight !== 720
) {
throw new Error(
'AI game creator game-chat client window must default to 1280x800 and stay at least 1280x720',
);
}
if (
tauriConfig.version !== '0.1.0' ||
packageConfig.version !== '0.1.0' ||
@@ -1463,12 +1537,15 @@ if (
}
for (const snippet of [
'const port = 3080',
'resolveAgcDevEndpoint',
'withAgcDevEndpointEnv',
"response.body.includes('<title>AI 游戏创作</title>')",
'function isPortListening()',
'reuse existing Vite dev server',
'cannot be safely reused',
'non-HTTP or unrecognized server',
"'--config', 'vite.config.ts'",
"'--config'",
"'vite.config.ts'",
"'--port'",
]) {
if (!devServerSource.includes(snippet)) {
throw new Error(
@@ -1490,7 +1567,6 @@ for (const snippet of [
'$verified = $targetItem.GetAccessControl()',
'$rules.Count -ne 1',
'[System.Security.AccessControl.FileSystemRights]::FullControl',
"runChildCapture('powershell.exe'",
"'-NoProfile'",
"'-Command'",
'windowsPrivateAclScript',
@@ -1503,6 +1579,11 @@ for (const snippet of [
);
}
}
if (!/runChildCapture\(\s*['"]powershell\.exe['"]/u.test(configWizardSource)) {
throw new Error(
'AI game creator config wizard guardrail drifted: runChildCapture(powershell.exe)',
);
}
if (/\bGet-Acl\b/u.test(configWizardSource)) {
throw new Error(
'AI game creator config wizard must not rely on Get-Acl module auto-loading',
@@ -1529,7 +1610,8 @@ for (const snippet of [
'const GAME_CREATOR_LOCAL_CONFIG_FILE_NAME: &str = "game-creator.config.local.json"',
'const DEFAULT_GAME_CREATOR_APP_CONFIG_JSON: &str = include_str!("../../game-creator.config.json")',
'fn configure_game_creator_runtime_config_dir(',
'app.path().app_config_dir()?',
'game_creator_runtime_config_dir()',
'.unwrap_or_else(|| app.path().app_config_dir())?',
'fn load_game_creator_app_config()',
'fn read_game_creator_app_config()',
'fn write_game_creator_app_config(',
@@ -1623,7 +1705,8 @@ for (const snippet of [
"'write_game_creator_app_config'",
'aria-label="运行时配置"',
'LLM API Key',
'画板 API Key',
'External Editor Base URL',
'External Editor API Key',
'runtime_config.save',
"'/run:运行自检,启动本地 HTTP 预览并载入客户端运行视图'",
"'activate_local_game_preview'",
@@ -0,0 +1,111 @@
import {
findAvailablePort,
formatPortDecision,
mapDevPortsToPortRange,
normalizePort,
reserveLinuxDevPortRange,
} from '../../../scripts/dev-stack-port-utils.mjs';
const agcDevHost = '127.0.0.1';
const legacyAgcDevPort = 3080;
const agcVitePortEnvKey = 'GENARRATIVE_AGC_VITE_PORT';
function readConfiguredAgcDevPort(env = process.env) {
const rawPort = String(env[agcVitePortEnvKey] ?? '').trim();
if (!rawPort) {
return null;
}
const port = normalizePort(rawPort, -1);
if (port < 1024) {
throw new Error(`${agcVitePortEnvKey} 必须是 1024-65535 的有效端口`);
}
return port;
}
function createAgcDevEndpoint(port, portRange = null) {
const url = `http://${agcDevHost}:${port}/`;
return {
host: agcDevHost,
port,
url,
markerUrl: `${url}__agc_dev_server.json`,
portRange,
};
}
function readAgcDevEndpoint(env = process.env) {
return createAgcDevEndpoint(
readConfiguredAgcDevPort(env) ?? legacyAgcDevPort,
);
}
async function resolveAgcDevEndpoint({
env = process.env,
platform = process.platform,
strictConfigured = false,
reservePortRange = reserveLinuxDevPortRange,
findPort = findAvailablePort,
} = {}) {
const configuredPort = readConfiguredAgcDevPort(env);
let portRange = null;
let preferredPort = configuredPort ?? legacyAgcDevPort;
if (platform === 'linux') {
const allocation = await reservePortRange({ env });
if (!allocation?.range) {
throw new Error('无法取得当前 Linux 用户的 dev 端口段');
}
portRange = allocation.range;
const mappedAgcVitePort = mapDevPortsToPortRange(portRange)?.agcVitePort;
if (!Number.isInteger(mappedAgcVitePort)) {
throw new Error(
`当前 Linux dev 端口段 ${portRange.label} 缺少 AGC Vite 槽位;请先迁移为至少 6 个端口且不与其它用户重叠的端口段`,
);
}
if (configuredPort != null && configuredPort < mappedAgcVitePort) {
throw new Error(
`${agcVitePortEnvKey} ${configuredPort} 占用了 Linux dev 端口段 ${portRange.label} 的前五个服务槽位`,
);
}
preferredPort = configuredPort ?? mappedAgcVitePort;
}
const port = await findPort({
host: agcDevHost,
preferredPort,
portRange,
strict: strictConfigured && configuredPort != null,
});
console.log(
formatPortDecision({
name: 'ai-game-creator-shell',
host: agcDevHost,
preferredPort,
resolvedPort: port,
}),
);
if (portRange) {
console.log(`[ai-game-creator-shell] dev port-range: ${portRange.label}`);
}
return createAgcDevEndpoint(port, portRange);
}
function withAgcDevEndpointEnv(endpoint, env = process.env) {
return {
...env,
[agcVitePortEnvKey]: String(endpoint.port),
};
}
export {
agcDevHost,
agcVitePortEnvKey,
createAgcDevEndpoint,
legacyAgcDevPort,
readAgcDevEndpoint,
readConfiguredAgcDevPort,
resolveAgcDevEndpoint,
withAgcDevEndpointEnv,
};
@@ -211,6 +211,7 @@ export function buildGameCreatorWizardConfig(existingConfig, llmInput) {
}
return {
...source,
agentMode: 'provider',
llm: {
...previousLlm,
apiKey,
@@ -290,21 +291,25 @@ export async function secureWindowsGameCreatorPathForCurrentUser(
targetPath,
{ isDirectory },
) {
const result = await runChildCapture('powershell.exe', [
'-NoLogo',
'-NoProfile',
'-NonInteractive',
'-ExecutionPolicy',
'Bypass',
'-Command',
windowsPrivateAclScript,
], {
env: {
...process.env,
GENARRATIVE_AGC_PRIVATE_PATH: targetPath,
GENARRATIVE_AGC_PRIVATE_IS_DIRECTORY: String(isDirectory),
const result = await runChildCapture(
'powershell.exe',
[
'-NoLogo',
'-NoProfile',
'-NonInteractive',
'-ExecutionPolicy',
'Bypass',
'-Command',
windowsPrivateAclScript,
],
{
env: {
...process.env,
GENARRATIVE_AGC_PRIVATE_PATH: targetPath,
GENARRATIVE_AGC_PRIVATE_IS_DIRECTORY: String(isDirectory),
},
},
});
);
if (result.code !== 0 || result.signal) {
const detail = result.stderr.trim() || result.stdout.trim();
throw new Error(
@@ -46,6 +46,8 @@ export function buildProcessSessionFixtureSource({
' if (!echoed && line === challenge) {',
' echoed = true;',
" console.log(echoPrefix + ' ' + challenge);",
" } else if (line === challenge + ':stop') {",
' stop();',
' }',
' }',
'});',
@@ -4,8 +4,9 @@ import fs from 'node:fs/promises';
import http from 'node:http';
import os from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const appRoot = path.resolve(new URL('..', import.meta.url).pathname);
const appRoot = fileURLToPath(new URL('..', import.meta.url));
const localConfigPath = path.join(appRoot, 'game-creator.config.local.json');
const projectRoot = path.join(
os.tmpdir(),
@@ -884,7 +885,28 @@ function readBrowserDom(url) {
}
function resolveChromeBin() {
const windowsRoot = path.parse(os.homedir()).root;
for (const candidate of [
path.join(
windowsRoot,
'Program Files/Google/Chrome/Application/chrome.exe',
),
path.join(
windowsRoot,
'Program Files (x86)/Google/Chrome/Application/chrome.exe',
),
path.join(
os.homedir(),
'AppData/Local/Google/Chrome/Application/chrome.exe',
),
path.join(
windowsRoot,
'Program Files/Microsoft/Edge/Application/msedge.exe',
),
path.join(
windowsRoot,
'Program Files (x86)/Microsoft/Edge/Application/msedge.exe',
),
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
'/Applications/Chromium.app/Contents/MacOS/Chromium',
'/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
@@ -3,10 +3,11 @@ import http from 'node:http';
import net from 'node:net';
import { fileURLToPath } from 'node:url';
import { resolveAgcDevEndpoint, withAgcDevEndpointEnv } from './dev-port.mjs';
const appRoot = fileURLToPath(new URL('..', import.meta.url));
const host = '127.0.0.1';
const port = 3080;
const devUrl = `http://${host}:${port}/`;
const endpoint = await resolveAgcDevEndpoint();
const { host, port, url: devUrl } = endpoint;
function readExistingServer() {
return new Promise((resolve) => {
@@ -69,8 +70,10 @@ function isPortListening() {
const existing = await readExistingServer();
if (existing) {
if (isAiGameCreatorServer(existing)) {
console.log(`[ai-game-creator-shell] reuse existing Vite dev server ${devUrl}`);
process.exit(0);
console.error(
`[ai-game-creator-shell] ${devUrl} is already running but cannot be safely reused. Stop that process before starting the dev server.`,
);
process.exit(1);
}
console.error(
`[ai-game-creator-shell] ${devUrl} is already in use by another server. Stop that process before starting Tauri dev.`,
@@ -88,9 +91,20 @@ if (await isPortListening()) {
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const child = spawn(
npm,
['--prefix', '../..', 'exec', 'vite', '--', '--config', 'vite.config.ts'],
[
'--prefix',
'../..',
'exec',
'vite',
'--',
'--config',
'vite.config.ts',
'--port',
String(endpoint.port),
],
{
cwd: appRoot,
env: withAgcDevEndpointEnv(endpoint),
stdio: 'inherit',
// Node 18.20+/20+/24 on Windows rejects spawning .cmd (npm.cmd) without a shell (EINVAL).
shell: true,
@@ -5,13 +5,16 @@ import net from 'node:net';
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import {
agcVitePortEnvKey,
readAgcDevEndpoint,
resolveAgcDevEndpoint,
withAgcDevEndpointEnv,
} from './dev-port.mjs';
const appRoot = fileURLToPath(new URL('..', import.meta.url));
const repoRoot = resolve(appRoot, '../..');
const devStackStatePath = resolve(repoRoot, '.app/dev-stack.json');
const viteHost = '127.0.0.1';
const vitePort = 3080;
const viteUrl = `http://${viteHost}:${vitePort}/`;
const viteMarkerUrl = `${viteUrl}__agc_dev_server.json`;
const defaultApiTarget =
process.env.RUST_SERVER_TARGET || 'http://127.0.0.1:8082';
const backendDatabase = 'genarrative-game-creator-dev';
@@ -131,13 +134,13 @@ async function isBackendReady() {
);
}
async function readExistingViteServer() {
return httpGetText(viteUrl);
async function readExistingViteServer(endpoint = readAgcDevEndpoint()) {
return httpGetText(endpoint.url);
}
function isVitePortListening() {
function isVitePortListening(endpoint = readAgcDevEndpoint()) {
return new Promise((resolveRequest) => {
const socket = net.connect({ host: viteHost, port: vitePort });
const socket = net.connect({ host: endpoint.host, port: endpoint.port });
socket.once('connect', () => {
socket.destroy();
resolveRequest(true);
@@ -160,8 +163,8 @@ function isAiGameCreatorServer(response) {
);
}
async function readExistingViteMarker() {
const response = await httpGetText(viteMarkerUrl, 2000);
async function readExistingViteMarker(endpoint = readAgcDevEndpoint()) {
const response = await httpGetText(endpoint.markerUrl, 2000);
if (!response || response.statusCode !== 200) {
return null;
}
@@ -173,15 +176,16 @@ async function readExistingViteMarker() {
}
async function preflightExistingVite({
endpoint = readAgcDevEndpoint(),
readServer = readExistingViteServer,
portListening = isVitePortListening,
readMarker = readExistingViteMarker,
} = {}) {
const existing = await readServer();
const existing = await readServer(endpoint);
if (!existing) {
if (await portListening()) {
if (await portListening(endpoint)) {
throw new Error(
`${viteUrl} is already in use by a non-HTTP or unrecognized server. Stop it before starting Tauri dev.`,
`${endpoint.url} is already in use by a non-HTTP or unrecognized server. Stop it before starting Tauri dev.`,
);
}
return { status: 'available', apiTarget: '' };
@@ -189,11 +193,11 @@ async function preflightExistingVite({
if (!isAiGameCreatorServer(existing)) {
throw new Error(
`${viteUrl} is already in use by another server. Stop it before starting Tauri dev.`,
`${endpoint.url} is already in use by another server. Stop it before starting Tauri dev.`,
);
}
const marker = await readMarker();
const marker = await readMarker(endpoint);
const markerApiTarget =
marker?.schemaVersion === 1 &&
marker?.app === 'ai-game-creator-shell' &&
@@ -202,7 +206,7 @@ async function preflightExistingVite({
: '';
const actualTarget = markerApiTarget || 'unknown';
throw new Error(
`${viteUrl} is already running with API target ${actualTarget}. Its owning worktree cannot be proven, so it will not be reused. Stop that Vite dev server before starting Tauri dev.`,
`${endpoint.url} is already running with API target ${actualTarget}. Its owning worktree cannot be proven, so it will not be reused. Stop that Vite dev server before starting Tauri dev.`,
);
}
@@ -549,7 +553,7 @@ async function ensureBackend({
}
}
async function startVite(apiTarget) {
async function startVite(apiTarget, endpoint = readAgcDevEndpoint()) {
const { apiUrl } = readBackendTargets();
if (apiUrl !== apiTarget) {
throw new Error(
@@ -557,22 +561,32 @@ async function startVite(apiTarget) {
);
}
const existing = await readExistingViteServer();
const existing = await readExistingViteServer(endpoint);
if (existing) {
if (isAiGameCreatorServer(existing)) {
throw new Error(
`${viteUrl} is already running and cannot be safely reused. Stop it before starting Tauri dev.`,
`${endpoint.url} is already running and cannot be safely reused. Stop it before starting Tauri dev.`,
);
}
throw new Error(
`${viteUrl} is already in use by another server. Stop it before starting Tauri dev.`,
`${endpoint.url} is already in use by another server. Stop it before starting Tauri dev.`,
);
}
return spawnChild(
npm,
['--prefix', '../..', 'exec', 'vite', '--', '--config', 'vite.config.ts'],
{ cwd: appRoot },
[
'--prefix',
'../..',
'exec',
'vite',
'--',
'--config',
'vite.config.ts',
'--port',
String(endpoint.port),
],
{ cwd: appRoot, env: withAgcDevEndpointEnv(endpoint) },
);
}
@@ -593,7 +607,9 @@ async function main() {
}
try {
await preflightExistingVite();
const endpoint = await resolveAgcDevEndpoint({ strictConfigured: true });
process.env[agcVitePortEnvKey] = String(endpoint.port);
await preflightExistingVite({ endpoint });
const backend = await ensureBackend({
onBackendChild(child) {
backendChild = child;
@@ -607,7 +623,7 @@ async function main() {
throw new Error(`启动期收到 ${shutdownSignal},已停止配套后端`);
}
viteChild = await startVite(backend.targets.apiUrl);
viteChild = await startVite(backend.targets.apiUrl, endpoint);
if (shutdownSignal) {
stopChild(viteChild, shutdownSignal);
throw new Error(`启动期收到 ${shutdownSignal},已停止前端服务`);
@@ -1,6 +1,11 @@
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import {
readAgcDevEndpoint,
resolveAgcDevEndpoint,
withAgcDevEndpointEnv,
} from './dev-port.mjs';
import {
preflightExistingVite,
spawnChild,
@@ -22,17 +27,41 @@ function parseLauncherArguments(argv) {
return { gameChat, args };
}
function buildTauriArguments(argv) {
function buildTauriArguments(argv, devUrl = readAgcDevEndpoint().url) {
const { gameChat, args } = parseLauncherArguments(argv);
const configOverride = JSON.stringify({ build: { devUrl } });
if (gameChat) {
return ['dev', '--', '--', '--game-chat', ...args];
return [
'dev',
'--config',
configOverride,
'--',
'--',
'--game-chat',
...args,
];
}
return ['dev', ...args];
const separatorIndex = args.indexOf('--');
if (separatorIndex < 0) {
return ['dev', ...args, '--config', configOverride];
}
const separatedArguments = args.slice(separatorIndex);
if (separatedArguments[1] !== '--') {
separatedArguments.unshift('--');
}
return [
'dev',
...args.slice(0, separatorIndex),
'--config',
configOverride,
...separatedArguments,
];
}
function spawnTauriCli(argv) {
function spawnTauriCli(argv, { env = process.env } = {}) {
return spawnChild(process.execPath, [tauriCliPath, ...argv], {
cwd: appRoot,
env,
shell: false,
});
}
@@ -40,16 +69,20 @@ function spawnTauriCli(argv) {
async function runTauriDev(
argv = process.argv.slice(2),
{
resolveDevEndpoint = resolveAgcDevEndpoint,
preflight = preflightExistingVite,
spawnCli = spawnTauriCli,
waitForCli = waitForChildTermination,
terminateTree = terminateChildTree,
} = {},
) {
await preflight();
const endpoint = await resolveDevEndpoint();
await preflight({ endpoint });
const tauriArguments = buildTauriArguments(argv);
const child = spawnCli(tauriArguments);
const tauriArguments = buildTauriArguments(argv, endpoint.url);
const child = spawnCli(tauriArguments, {
env: withAgcDevEndpointEnv(endpoint),
});
let resolveShutdown;
let shutdownSignal = '';
let repeatedSignal = false;

Some files were not shown because too many files have changed in this diff Show More