Compare commits

..

180 Commits

Author SHA1 Message Date
k88936 d558cfe42d 修复预览画布快捷键测试的平台兼容
根据 navigator.platform 发送 Ctrl 或 Cmd 修饰键。

避免 Apple CI 下快捷键被正确忽略导致断言读取初始缩放值。
2026-09-08 16:00:45 +08:00
k88936 3e6fbaed9a 修复预览画布缩放百分比编辑
Project CI / Repository checks (pull_request) Successful in 2m45s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / Backend tests (pull_request) Successful in 6m40s
Project CI / Native shell tests (pull_request) Successful in 17m32s
将百分比按钮替换为可编辑数字输入框

失焦时限制缩放范围并同步画布视口

新增百分比输入组件级回归测试并更新交互文档
2026-09-08 11:17:12 +08:00
k88936 3fa19600f2 Merge remote-tracking branch 'origin/fix/ui-editor-minor-adjusts' into fix/ui-editor-minor-adjusts
Project CI / Repository checks (pull_request) Successful in 2m21s
Project CI / Frontend tests (pull_request) Successful in 3m0s
Project CI / Backend tests (pull_request) Successful in 6m58s
Project CI / Native shell tests (pull_request) Successful in 17m24s
2026-09-07 18:49:04 +08:00
k88936 1a03bfebf6 修复UI编辑器通知弹窗文档末尾空行
删除文档末尾多余空行,保留标准EOF换行
2026-09-07 18:26:47 +08:00
k88936 777f928830 Merge branch 'master' into fix/ui-editor-minor-adjusts
Project CI / Frontend tests (pull_request) Successful in 2m38s
Project CI / Repository checks (pull_request) Failing after 2m13s
Project CI / Backend tests (pull_request) Successful in 6m34s
Project CI / Native shell tests (pull_request) Successful in 19m41s
2026-09-07 17:26:21 +08:00
suzmii e15e3b455f 修复AGC大上下文请求体限制 (#295)
Project CI / Repository checks (push) Successful in 3m12s
Project CI / Frontend tests (push) Successful in 3m21s
Project CI / Backend tests (push) Successful in 7m42s
Project CI / Native shell tests (push) Successful in 20m14s
Project CI / Frontend tests (pull_request) Successful in 50m43s
Project CI / Repository checks (pull_request) Successful in 20m21s
Project CI / Backend tests (pull_request) Successful in 6m18s
Project CI / Native shell tests (pull_request) Successful in 18m19s
## 背景与问题

AGC(AI 游戏创作智能体 App)Direct Codex 模式在携带图片工具结果等大上下文调用 LLM 时,`/api/llm/responses` 与 `/api/llm/chat/completions` 会命中 Axum 默认 **2 MiB** 请求体上限,直接被 413 拒绝,大上下文任务无法执行;同时 Codex app-server 的 failed turn 未把上游 413 映射为稳定错误分类,前端只能显示笼统的“其他错误”,无法引导用户处理。

## 改动内容

**1. api-server(server-rs)**
- 新增常量 `LLM_REQUEST_MAX_BODY_BYTES = 32 MiB`,作为两个 LLM 代理路由的正式请求体上限;
- 两个路由显式配置 `DefaultBodyLimit::max(32 MiB)`,避免 Axum 默认 2 MiB 提前拒绝;handler 内保留超限检查,超过 32 MiB 仍返回 `413 PAYLOAD_TOO_LARGE`;
- 补充回归测试:>2 MiB 大上下文请求不再命中默认限制;超过 32 MiB 仍返回 413。

**2. AGC 壳(apps/ai-game-creator-shell)**
- `codex_app_server` 错误映射:上游/连接层 HTTP 413、`PAYLOAD_TOO_LARGE`、`provider request too large` 等统一映射为稳定分类 `codex-app-server-error:request-too-large`,不再落入 `other` 或误判为权限/安全策略错误;
- 前端新增用户可见文案“模型请求体过大,请减少参考图或上下文后重试”,并补充单测断言。

**3. 文档**
- 【技术方案】AI游戏创作智能体App实施计划-2026-06-24.md 补充“2026-09-06 AGC LLM 代理请求体合同”:明确 32 MiB 上限、必须显式配置 `DefaultBodyLimit`、413 映射规则与用户文案。

## 验证

- `cargo test -p api-server llm_routes_accept_large_context_bodies_beyond_axum_default` 通过
- `cargo test -p api-server llm_responses_rejects_bodies_above_explicit_limit` 通过
- `cargo test ... ai-game-creator-shell ... codex_app_server_failed_turn_maps_request_too_large_details` 通过
- `npm run test -- apps/ai-game-creator-shell/tests/agentRuntimeModel.test.ts`(27 通过)

全量 workspace 测试与 CI 门禁待推送后由 CI 覆盖。

Reviewed-on: #295
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-09-07 17:05:42 +08:00
k88936 a08b224590 Merge branch 'master' into fix/ui-editor-minor-adjusts
Project CI / Repository checks (pull_request) Failing after 2m16s
Project CI / Backend tests (pull_request) Successful in 7m7s
Project CI / Frontend tests (pull_request) Successful in 2m56s
Project CI / Native shell tests (pull_request) Successful in 20m43s
2026-09-07 15:44:17 +08:00
k88936 964290c641 优化错误报告 (#286)
Project CI / Native shell tests (push) Successful in 21m3s
Project CI / Repository checks (push) Successful in 2m37s
Project CI / Frontend tests (push) Successful in 2m41s
Project CI / Backend tests (push) Successful in 7m2s
样式

before:
![shotmd-1788605870.jpg](/attachments/0470de00-944f-466e-a339-cf9e6cc0b780)
![shotmd-1788605755.jpg](/attachments/3e7be68e-31c5-41ba-9f8b-6dc98ec08868)

after:
![shotmd-1788607435.jpg](/attachments/165c878e-5c1c-4517-b7d5-74ce97a1a99b)
![shotmd-1788608364.jpg](/attachments/4dd20baf-879c-4aa8-ab51-bcc588d48dbc)

逻辑:
每次打开报告modal会再次查询队列中的错误
<video src="attachments/6d9d9bd7-5b7b-4a05-a7c3-ca64b6fb77f3" title="2026-09-05 19-46-02.mp4" controls></video>

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/286
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-07 15:17:21 +08:00
k88936 3f8b438fdc Merge branch 'master' into fix/ui-editor-minor-adjusts
Project CI / Native shell tests (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 / Repository checks (pull_request) Has been cancelled
2026-09-07 13:11:54 +08:00
k88936 584b0f95cb Merge remote-tracking branch 'origin/fix/ui-editor-minor-adjusts' into fix/ui-editor-minor-adjusts
Project CI / Repository checks (pull_request) Failing after 9s
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-09-07 12:49:13 +08:00
k88936 933ddca561 Merge branch 'master' into fix/ui-editor-minor-adjusts 2026-09-07 11:12:56 +08:00
lhk229 60fbee2353 修复设置页重新出现连接与工具 (#287)
Project CI / Repository checks (pull_request) Failing after 10s
Project CI / Frontend tests (pull_request) Successful in 3m3s
Project CI / Backend tests (pull_request) Failing after 26s
Project CI / Native shell tests (pull_request) Successful in 20m54s
Project CI / Repository checks (push) Successful in 4m37s
Project CI / Frontend tests (push) Successful in 5m31s
Project CI / Backend tests (push) Successful in 8m38s
Project CI / Native shell tests (push) Successful in 20m0s
移除运行时配置中的连接与工具入口及 External Editor 字段

更新 AppSurface 回归断言,确保普通客户端不展示该入口

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/287
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-06 19:47:33 +08:00
kdletters 2975062c69 Merge pull request 'AGC 官方 LLM Router 账号链路与流式联网输出' (#242) from feat/agc-llm-router-official-chain into master
Project CI / Repository checks (push) Successful in 3m22s
Project CI / Frontend tests (push) Successful in 3m16s
Project CI / Backend tests (push) Successful in 6m29s
Project CI / Native shell tests (push) Successful in 18m25s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/242
2026-09-06 16:49:13 +08:00
suzmii 6166094a3c 修复AGC配置测试字段
Project CI / Repository checks (pull_request) Successful in 2m46s
Project CI / Frontend tests (pull_request) Successful in 2m55s
Project CI / Backend tests (pull_request) Successful in 7m6s
Project CI / Native shell tests (pull_request) Successful in 18m3s
同步配置测试夹具使用 selected_model_id

移除已删除的 model_profiles 与 selected_model_profile_id 字段
2026-09-06 01:16:48 +08:00
suzmii 736a1b6ac6 接入 LLM Router 累计额度结算
Project CI / Repository checks (pull_request) Successful in 2m36s
Project CI / Frontend tests (pull_request) Successful in 3m15s
Project CI / Backend tests (pull_request) Successful in 7m35s
Project CI / Native shell tests (pull_request) Failing after 7m43s
按 Router used_quota 累计值与首次基线结算泥点
新增原子 checkpoint 事务及 llm_router_consume 钱包流水
同步额度查询校验、前端展示、生成绑定和技术文档
2026-09-06 00:36:31 +08:00
suzmii 78f547d26d Merge remote-tracking branch 'origin/master' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Successful in 2m38s
Project CI / Frontend tests (pull_request) Successful in 3m46s
Project CI / Backend tests (pull_request) Successful in 6m35s
Project CI / Native shell tests (pull_request) Failing after 8m14s
# Conflicts:
#	apps/ai-game-creator-shell/tests/appSurface/runtime-settings.suite.ts
2026-09-05 20:08:43 +08:00
suzmii 0b9fb40108 Merge remote-tracking branch 'origin/master' into feat/agc-llm-router-official-chain
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
# Conflicts:
#	apps/ai-game-creator-shell/scripts/check-config.mjs
#	apps/ai-game-creator-shell/src/features/runtime-config/RuntimeConfigDialog.tsx
#	apps/ai-game-creator-shell/tests/appSurface/runtime-settings.suite.ts
2026-09-05 20:03:25 +08:00
kdletters c4f344678f 收窄设置页删除改动
Project CI / Repository checks (push) Successful in 2m36s
Project CI / Frontend tests (push) Successful in 3m4s
Project CI / Backend tests (push) Successful in 8m42s
Project CI / Native shell tests (push) Successful in 20m38s
移除多余的页面回归门禁
清理已删除入口的冗余测试断言
2026-09-05 20:01:02 +08:00
k88936 6271026e2d Merge branch 'master' into fix/ui-editor-minor-adjusts
Project CI / Repository checks (pull_request) Failing after 2m38s
Project CI / Frontend tests (pull_request) Successful in 3m8s
Project CI / Backend tests (pull_request) Successful in 6m35s
Project CI / Native shell tests (pull_request) Successful in 21m42s
2026-09-05 19:55:27 +08:00
k88936 29b0b944bd 修复缩放控件焦点拦截节点删除
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 20s
Project CI / Frontend tests (pull_request) Successful in 3m37s
Project CI / Native shell tests (pull_request) Successful in 21m7s
允许缩放滑杆和缩放按钮焦点下继续执行 Delete/Backspace。

修正 UI 树宽度测量重复节点文本并保持预览点击选择语义。

补充缩放焦点快捷键回归测试与交互文档。
2026-09-05 19:54:06 +08:00
k88936 df72dd4bed 接入预览画布加减快捷缩放
复用工具栏中心缩放逻辑并统一加减倍率常量
为预览画布增加悬停与键盘焦点作用域
保留既有适配画布和实际尺寸快捷键行为
2026-09-05 19:49:27 +08:00
suzmii 34e3f70409 补充服务启动配置校验并优化模型菜单
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
启动时校验 LLM Router 地址、模型和相关密钥配置

将刷新操作移入模型展开菜单并修复菜单样式覆盖

更新启动运维文档与定向测试
2026-09-05 19:48:27 +08:00
k88936 af8e1df139 封装预览画布快捷缩放判定
识别跨平台加减、适配画布与实际尺寸快捷键
限制快捷键作用域并放行可编辑和可操作目标
增加按键变体、重复输入和默认行为回归测试
2026-09-05 19:33:10 +08:00
k88936 c50960f4c4 明确预览画布快捷缩放约定
区分滑杆选择范围与快捷加减的核心视口边界
约定跨平台按键、作用域、事件拦截与既有重置行为
补充组件级回归测试和定向验证标准
2026-09-05 19:25:33 +08:00
suzmii 4f3f0f24ff 接入AGC后台模型目录与对话模型选择
新增后台 AGC 模型目录、别名、启停和默认项管理

客户端设置页恢复原状,对话框右下角按别名选择模型

服务端按稳定模型标识映射并校验实际模型白名单

修复 AGC 配套后端端口漂移、启动等待和 SpacetimeDB 版本检查

补充迁移、文档、启动与模型选择测试
2026-09-05 19:10:49 +08:00
k88936 9deae852ec 补充 UI 树布局约定
记录节点操作列与树横向滚动规则
说明深层节点名称不得截断
2026-09-05 18:46:58 +08:00
k88936 39736fb54f 优化 UI 树节点操作布局
统一节点操作列宽度并对齐可见性与删除按钮
为树内容增加横向滚动和动态宽度测量
组件数量改用实心橙色拼图图标徽标
2026-09-05 18:46:37 +08:00
kdletters 524e2f0f4f 删除连接与工具设置页
Project CI / Repository checks (push) Successful in 2m34s
Project CI / Frontend tests (push) Successful in 3m3s
Project CI / Backend tests (push) Successful in 6m53s
Project CI / Native shell tests (push) Successful in 17m53s
移除运行设置中的连接与工具导航及页面内容
更新运行设置测试以校验该入口已删除
同步配置门禁,防止已删除页面重新出现
2026-09-05 17:39:05 +08:00
k88936 98c5768ebf 修正缩放滑杆百分比映射
Project CI / Repository checks (pull_request) Failing after 2m35s
Project CI / Frontend tests (pull_request) Failing after 2m9s
Project CI / Native shell tests (pull_request) Failing after 4m57s
Project CI / Backend tests (pull_request) Successful in 6m33s
使用显示百分比同步滑块位置
2026-09-05 14:42:37 +08:00
k88936 9d53c44241 优化预览画布缩放滑杆
新增桌面端可拖动缩放滑杆

保留按钮与视口中心缩放行为
2026-09-05 14:42:02 +08:00
k88936 dd6bd0cb7b 补充预览画布缩放滑杆交互文档
新增桌面端缩放滑杆交互约定

明确范围、键盘操作与验收标准
2026-09-05 14:40:57 +08:00
k88936 48b78c1b33 Merge remote-tracking branch 'origin/fix/ui-editor-minor-adjusts' into fix/ui-editor-minor-adjusts 2026-09-05 13:59:09 +08:00
k88936 d8d4501665 补充弹窗快捷键规范
明确对话框打开时暂停编辑器级撤销重做
2026-09-05 13:54:28 +08:00
k88936 5b75792d6a 修复弹窗内编辑器快捷键误触发
抽取UI编辑器键盘快捷键处理模块

阻止对话框内撤销重做并保留普通按钮快捷键行为
2026-09-05 13:54:26 +08:00
k88936 84222dd44e Merge branch 'master' into fix/ui-editor-minor-adjusts
Project CI / Native shell tests (pull_request) Failing after 4m11s
Project CI / Frontend tests (pull_request) Failing after 30m6s
Project CI / Repository checks (pull_request) Failing after 30m26s
Project CI / Backend tests (pull_request) Successful in 35m27s
2026-09-05 13:50:25 +08:00
k88936 897683e63f 补充UI树删除计数测试
覆盖嵌套节点定位与后代节点递归计数
2026-09-05 13:17:51 +08:00
k88936 8242885c79 新增UI树节点快捷删除
在可删除节点行提供桌面端垃圾桶按钮

复用右键删除入口并对后代节点显示确认弹窗
2026-09-05 13:17:49 +08:00
k88936 b4ba318849 补充UI树快捷删除方案
记录桌面端快捷删除按钮与右键删除复用规则

明确后代节点确认提示、页面根禁删和底层命令边界
2026-09-05 13:01:35 +08:00
suzmii 76f0c8e58e Merge branch 'master' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Successful in 3m39s
Project CI / Frontend tests (pull_request) Successful in 4m0s
Project CI / Backend tests (pull_request) Successful in 8m3s
Project CI / Native shell tests (pull_request) Successful in 19m58s
2026-09-04 19:07:08 +08:00
k88936 6f29c60d63 统一节点选区的严格空值判断
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Backend tests (pull_request) Failing after 19s
Project CI / Frontend tests (pull_request) Successful in 2m57s
Project CI / Native shell tests (pull_request) Successful in 18m0s
将 selectedNodeId 的宽松不等比较改为 !== null
2026-09-04 18:07:08 +08:00
k88936 6f0bae7724 让工作流步骤标题映射显式穷举
使用覆盖全部 UiEditorStepId 的 switch 映射步骤标题

增加 never 穷举检查以便新增步骤触发类型错误
2026-09-04 18:06:47 +08:00
k88936 efd67911c9 提取工作流完成状态上报逻辑
统一成功与失败分支的提示拼接、状态更新和终态通知

保持三个工作流步骤现有消息与状态行为不变
2026-09-04 18:06:03 +08:00
k88936 f029992083 修复弹窗内删除快捷键误删节点
排除 role=dialog 和 aria-modal 弹窗内的 Delete/Backspace 快捷键

补充弹窗焦点下节点不应被删除的回归测试

同步更新 UI 编辑器撤销重做规范
2026-09-04 18:04:16 +08:00
k88936 f9e1e5d2a7 Fix/修复ui editor选择逻辑 (#270)
Project CI / Backend tests (push) Successful in 7m35s
Project CI / Repository checks (push) Successful in 3m2s
Project CI / Frontend tests (push) Successful in 3m24s
Project CI / Native shell tests (push) Successful in 18m52s
close #266
当前实现: 按下就重新选择

实际上应该: 松开而且没有发生拖动才重新选择

before:
![shotmd-1788407266-compressed.webp](/attachments/251eccf6-ae02-4ae6-b9d2-4eb1fbf67df3)

after:
![shotmd-1788418953-compressed.webp](/attachments/5c05b506-ae08-4cb1-83c8-8da8e1590a7f)

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/270
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-04 16:30:43 +08:00
k88936 fe813802a5 简化工作流检查提示拼接
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Backend tests (pull_request) Failing after 10s
Project CI / Frontend tests (pull_request) Successful in 3m26s
Project CI / Native shell tests (pull_request) Successful in 20m41s
移除请检查文案探测逻辑
终态文案统一直接追加检查提示
2026-09-04 16:09:19 +08:00
suzmii 87c0cbd06d 修复 Provider 代理错误外发 AGC 主站客户端标记
Project CI / Repository checks (pull_request) Successful in 3m13s
Project CI / Frontend tests (pull_request) Successful in 3m34s
Project CI / Backend tests (pull_request) Successful in 7m43s
Project CI / Native shell tests (pull_request) Successful in 19m55s
仅 PlatformSession 的 /api/llm 主站路由携带 x-genarrative-client 标记

通用 Provider 与第三方凭据桥接不再自动附加该标记

补充主站路由代理的标记回归测试
2026-09-04 15:52:47 +08:00
k88936 7f3cf3b64b 调整工作流通知测试位置
将通知辅助测试纳入AGC测试目录
保持提示文案和步骤映射覆盖
2026-09-04 15:34:18 +08:00
k88936 e6b2539dfe 增加工作流通知文案测试
覆盖请检查提示去重
覆盖三项步骤标题映射
2026-09-04 15:32:48 +08:00
k88936 620c2c5015 接入UI工作流终态通知
为三项工作流动作增加成功失败通知
扩展结果数量与请检查提示
在编辑器页面挂载阻塞通知弹窗
2026-09-04 15:31:54 +08:00
k88936 e7345508df 提取UI工作流通知文案工具
拆分通知类型与文案辅助函数
修复组件快速刷新导出约束
2026-09-04 15:31:35 +08:00
k88936 fc37bfbceb 补充UI工作流完成通知设计
新增工作流终态通知弹窗交互约定
明确三步骤反馈文案与验收边界
2026-09-04 15:26:21 +08:00
suzmii 13639d9f8c 修复 AGC 运行时配置模型方案测试断言
Project CI / Repository checks (pull_request) Successful in 4m23s
Project CI / Frontend tests (pull_request) Successful in 5m11s
Project CI / Backend tests (pull_request) Successful in 7m25s
Project CI / Native shell tests (pull_request) Failing after 15m15s
将推理档断言迁移到模型方案管理面板的推理档位选择器

补充持久化测试 fixture 的 modelProfiles 与选中方案字段

同步保存回写断言中的模型方案结构
2026-09-04 15:19:01 +08:00
suzmii 020f7d7a7a 修复 Router 凭据并发一致性问题
Project CI / Repository checks (pull_request) Failing after 8m28s
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
移除 Router Key 进程内 TTL 缓存,改为每次读取权威账号状态并即时解密当前密文

Router 账号写入改为同主键原地更新,避免 delete+insert 读取缺口

新增 owner/route 映射冲突校验,防止并发写入插入重复账号行

同步更新后端数据契约文档中的凭据读取语义
2026-09-04 14:08:16 +08:00
suzmii aa47fa833d Merge remote-tracking branch 'origin/master' into feat/agc-llm-router-official-chain 2026-09-04 13:54:16 +08:00
suzmii 4bbef74859 feat: AGC 支持模型方案选择
新增 Router 模型目录接口并返回可用模型列表

客户端配置新增模型方案与当前选中方案字段

设置页新增模型方案卡片和管理弹层,支持方案名称、模型和推理强度

自定义下拉菜单圆角、遮罩层级与窗口边界定位,并隐藏滚动条

AGC 官方路由保留所选模型并携带客户端标记,由服务端校验后转发

补齐配置结构变更后的既有测试初始化字段
2026-09-04 13:52:00 +08:00
k88936 20a065e540 同步 UI 编辑器快捷键规范
Project CI / Repository checks (pull_request) Failing after 16s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 2m47s
Project CI / Native shell tests (pull_request) Successful in 19m22s
记录 macOS Backspace 删除节点快捷键

明确按钮链接焦点下撤销重做与删除快捷键的差异
2026-09-04 13:00:04 +08:00
k88936 fb058adb17 明确删除后的节点选区判断
仅在存在选中节点时查询删除节点集合

避免使用空字符串作为节点 ID 查询值
2026-09-04 12:56:44 +08:00
k88936 4886dffda2 稳定 UI 编辑器删除回调引用
使用 useCallback 保持 deleteNode 在输入未变化时的函数引用稳定

减少全局键盘监听器不必要的解绑与重新注册
2026-09-04 12:56:13 +08:00
k88936 d456b97eaf 恢复工具栏聚焦时撤销快捷键
将删除快捷键的交互控件过滤与撤销重做的可编辑目标过滤分离

避免按钮和链接聚焦时意外屏蔽 Ctrl/Cmd+Z/Y
2026-09-04 12:55:00 +08:00
k88936 21aa894871 修复 UI 编辑器 macOS 删除快捷键
支持 macOS 标准 Delete 键上报的 Backspace 事件

保留原有修饰键、重复事件和交互控件过滤
2026-09-04 12:54:12 +08:00
k88936 2d884f1bc5 补充 Delete 快捷键页面验收测试
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / Native shell tests (pull_request) Successful in 18m50s
验证页面选中节点可通过 Delete 删除

覆盖真实树面板选择与删除后的渲染结果
2026-09-04 11:37:00 +08:00
k88936 5898d38083 支持 UI 编辑器 Delete 删除选中节点
复用现有 deleteNode 命令处理 Delete 快捷键

过滤交互控件、修饰键和重复按键事件

清理删除子树后的无效节点选区并补充页面测试
2026-09-04 11:35:58 +08:00
k88936 a2876eaf65 补充 UI 编辑器 Delete 快捷键规范
明确 Delete 快捷键触发范围与交互控件过滤

规定复用 deleteNode、子树删除、撤销与脏状态语义

补充删除后无效选区清理和验收标准
2026-09-04 11:28:56 +08:00
lhk229 8d13e868bd AGC 更新提示增加 X 关闭按钮 (#276)
Project CI / Frontend tests (push) Successful in 8m49s
Project CI / Repository checks (push) Successful in 8m50s
Project CI / Backend tests (push) Successful in 10m3s
Project CI / Native shell tests (push) Failing after 20m52s
## 变更内容
- 为 AGC 更新提示增加可访问的 X 关闭按钮。
- 复用现有 dismiss 逻辑,手动关闭后立即移除提示。
- 增加关闭按钮的 hover、禁用和图标样式。

## 验证
- npm --prefix apps/ai-game-creator-shell run typecheck
- npm exec vitest run apps/ai-game-creator-shell/tests/appUpdate.test.ts
- npm run check:encoding
- git diff --check

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/276
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 孔令弘 <ink29535@proton.me>
Co-committed-by: 孔令弘 <ink29535@proton.me>
2026-09-04 11:24:21 +08:00
k88936 754964c57e 完善组件建议,增加容器背景与节点大小一致的实现
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Frontend tests (pull_request) Successful in 2m59s
Project CI / Native shell tests (pull_request) Failing after 11m40s
2026-09-04 11:03:09 +08:00
suzmii 938c37ca1b 修复 AGC 本地 Provider Smoke 路由
Project CI / Repository checks (pull_request) Successful in 3m54s
Project CI / Frontend tests (pull_request) Successful in 5m1s
Project CI / Backend tests (pull_request) Successful in 8m26s
Project CI / Native shell tests (pull_request) Successful in 18m51s
允许显式 Debug E2E 开关使用 loopback Provider

为 smoke 子进程透传环境并启用 Debug E2E 开关
2026-09-03 23:27:54 +08:00
suzmii d0d3466a56 修复 Direct MCP 路径文案泄露
Project CI / Repository checks (pull_request) Successful in 4m24s
Project CI / Frontend tests (pull_request) Successful in 4m46s
Project CI / Backend tests (pull_request) Successful in 7m44s
Project CI / Native shell tests (pull_request) Failing after 13m40s
平台无关拒绝盘符、绝对路径和上级目录

避免未审核路径出现在 Direct Codex 活动文案中
2026-09-03 21:42:39 +08:00
suzmii 75da77dcb4 Merge remote-tracking branch 'origin/master' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Successful in 2m31s
Project CI / Backend tests (pull_request) Successful in 8m6s
Project CI / Frontend tests (pull_request) Successful in 3m57s
Project CI / Native shell tests (pull_request) Has been cancelled
2026-09-03 20:07:51 +08:00
suzmii 703b90938b 合并 master 并保留 Router 账号链路整改
合并 origin/master 最新 UI 编辑器与 AGC 运行时变更

保留 external_api_key 恢复为 master 原始结构

保留 LLM Router 凭据统一存储于 llm_router_account 的整改

解决 App.tsx 与 appSurface 测试冲突并完成定向验证
2026-09-03 20:05:50 +08:00
k88936 f5f94111ca Feat/图片绑定选择器改用带预览的模态框 (#269)
Project CI / Native shell tests (push) Successful in 20m12s
Project CI / Repository checks (push) Successful in 2m42s
Project CI / Frontend tests (push) Successful in 3m39s
Project CI / Backend tests (push) Successful in 7m18s
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Native shell tests (pull_request) Failing after 32m52s
Project CI / Frontend tests (pull_request) Failing after 44m27s
before:
![image.png](/attachments/5ae7df1f-cf57-4712-8038-f65ae83e2ffa)

after:
![shotmd-1788417438.jpg](/attachments/676e653d-2561-4eca-b28f-9725d3b8af02)

close #268

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/269
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-03 20:02:48 +08:00
suzmii cbc73f111c 恢复外部 API Key 表并统一 Router 账号存储
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
恢复 external_api_key 表及客户端绑定为 master 原始结构

将 LLM Router 凭据、状态、撤销和缓存统一收敛到 llm_router_account

移除后台与契约中的 purpose 字段及 Router 专用撤销 procedure

同步更新架构文档并补齐相关测试契约
2026-09-03 19:43:10 +08:00
k88936 4cd53688e9 Feat/优化UI编辑器inspector offset编辑部分UI (#265)
Project CI / Repository checks (push) Successful in 2m21s
Project CI / Frontend tests (push) Successful in 3m37s
Project CI / Backend tests (push) Successful in 6m21s
Project CI / Native shell tests (push) Successful in 19m48s
before:
![image.png](/attachments/e0344964-55c6-4ba1-9191-a79d81f32b2e)
after:
![shotmd-1788414839.jpg](/attachments/14c8a723-b2df-48d5-9773-7f576bcef873)
close #267

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/265
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-03 19:36:18 +08:00
kdletters cb7bc50ef9 Merge pull request 'UI编辑器撤销回退功能' (#261) from feat/ui-editor-edit-history into master
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
Project CI / Frontend tests (push) Has been cancelled
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/261
2026-09-03 19:31:25 +08:00
kdletters b7641f94b7 Merge branch 'master' into feat/ui-editor-edit-history
Project CI / Repository checks (pull_request) Successful in 2m40s
Project CI / Frontend tests (pull_request) Successful in 3m6s
Project CI / Backend tests (pull_request) Successful in 6m40s
Project CI / Native shell tests (pull_request) Successful in 20m27s
2026-09-03 19:30:43 +08:00
k88936 520b9344ef Fix/AGC上下文丢失问题 (#247)
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Backend tests (push) Successful in 7m20s
Project CI / Repository checks (push) Successful in 3m1s
Project CI / Native shell tests (push) Has been cancelled
权衡之后选择附加历史消息构造一个巨大的prompt
before:
```
1. user:  aabb
2. assistant: bbaa 这里codex崩溃了或者重启上下文丢失
```
after:
重启之后发送新消息abab
 codex看到:
```
user:  aabb
assistant: bbaa
这里崩溃了!
user: abab
```

移除了原来的"会话最后只有用户消息就自动重新发送用户消息"功能, 因为存在冲突: 现在的实现是每次用户手动发送新消息才做以上的步骤

before and after:
![shotmd-1788345830.jpg](/attachments/28549e4d-9913-459a-bae2-a195b8ee9e04)

Close #249

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/247
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-03 19:30:21 +08:00
suzmii 270aa38ccb Merge branch 'master' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Successful in 3m32s
Project CI / Frontend tests (pull_request) Successful in 3m40s
Project CI / Backend tests (pull_request) Successful in 7m25s
Project CI / Native shell tests (pull_request) Failing after 13m42s
2026-09-03 19:04:22 +08:00
suzmii 6d41dc2f89 切换 LLM Router 凭据到专用账号表
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Repository checks (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
- 将 Router 账号、API Key 元数据和密文统一保存到 llm_router_account

- 增加 Router API Key 的进程内缓存并清理旧 external_api_key 兼容路径

- 更新 SpacetimeDB 绑定、后端架构文档和决策记录
2026-09-03 19:03:40 +08:00
kdletters 3e034d681d 修复 master CI 的 Codex CLI 失败状态竞态 (#273)
Project CI / Frontend tests (push) Successful in 3m0s
Project CI / Backend tests (push) Successful in 6m29s
Project CI / Repository checks (push) Successful in 2m39s
Project CI / Native shell tests (push) Successful in 20m46s
修复 Codex CLI 子进程提前退出时 stdin BrokenPipe 导致未采集真实退出码的问题。\n\n- BrokenPipe 时继续等待并采集脱敏 stderr\n- 非零退出优先返回真实退出码\n- 保留其他 stdin 错误的快速失败行为\n\n已验证:Codex CLI 失败回归测试、cargo fmt、编码检查、git diff --check。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/273
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-09-03 17:34:28 +08:00
k88936 51b7d51d01 Merge branch 'master' into feat/ui-editor-edit-history
Project CI / Backend tests (pull_request) Successful in 7m2s
Project CI / Repository checks (pull_request) Successful in 3m8s
Project CI / Frontend tests (pull_request) Successful in 3m9s
Project CI / Native shell tests (pull_request) Successful in 21m38s
2026-09-03 16:08:23 +08:00
suzmii c12d744d91 合并master并保留双侧最新决策记录
Project CI / Frontend tests (pull_request) Successful in 3m16s
Project CI / Repository checks (pull_request) Successful in 2m37s
Project CI / Backend tests (pull_request) Successful in 7m14s
Project CI / Native shell tests (pull_request) Failing after 21m2s
合入主站 AGC 请求头归属与项目命名链路改动。
保留本分支 Direct 过程卡决策记录。
保留主站登录归属、workspace 边界与 Native shell 决策记录。
2026-09-03 16:04:04 +08:00
suzmii e34d797336 修复 AGC 确定性 E2E 与 master 合并后的运行链路
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Frontend tests (pull_request) Successful in 2m59s
Project CI / Repository checks (pull_request) Failing after 21s
Project CI / Native shell tests (pull_request) Failing after 16m26s
合并 master 后 isolated AppData 配置改为私有副本,避免 Windows 安全校验拒绝硬链接。
只读 runner 状态命令显式配置 config dir,避免误读为 runner 未启用。
为 debug 构建增加仅 E2E 显式开启的确定性 Provider 路由开关,并补充回归测试。
兼容 Windows 对私有副本权限位的校验差异。
2026-09-03 15:59:19 +08:00
suzmii d5e05d79fe 优化项目名称显示与命名链路 (#248)
Project CI / Repository checks (push) Successful in 2m49s
Project CI / Frontend tests (push) Successful in 2m45s
Project CI / Backend tests (push) Successful in 7m4s
Project CI / Native shell tests (push) Failing after 15m31s
## 优化项目名称显示与命名链路

关联:#245

按 Issue 中的需求文档实现:

- 新增项目名称修改入口,保存到本地项目 \.agent/manifest.json\
- 项目页、当前项目上下文、窗口标题在重命名后同步刷新
- 首页自动创建工作区时,根据用户输入用 LLM 提炼项目名
- LLM 命名失败或返回非法内容时,回退现有默认名,不阻断创作流程

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/248
Co-authored-by: suzmii <suzmii@qq.com>
Co-committed-by: suzmii <suzmii@qq.com>
2026-09-03 15:50:55 +08:00
lhk229 8b4c3792c7 主站对AGC请求头做特殊处理和记录 (#246)
Project CI / Repository checks (push) Successful in 2m43s
Project CI / Frontend tests (push) Successful in 3m26s
Project CI / Backend tests (push) Successful in 6m23s
Project CI / Native shell tests (push) Successful in 20m45s
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/246
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-03 15:33:26 +08:00
k88936 0c0cad7fa4 Merge branch 'master' into feat/ui-editor-edit-history
Project CI / Repository checks (pull_request) Failing after 1m57s
Project CI / Frontend tests (pull_request) Successful in 4m9s
Project CI / Backend tests (pull_request) Successful in 6m17s
Project CI / Native shell tests (pull_request) Failing after 20m35s
2026-09-03 14:44:36 +08:00
k88936 9fd160efc5 合并批量组件绑定历史记录
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / Backend tests (pull_request) Failing after 10s
Project CI / Frontend tests (pull_request) Successful in 3m7s
Project CI / Native shell tests (pull_request) Successful in 22m4s
批处理中的前置绑定批次跳过历史,最后一批使用非跳过替换统一形成撤销边界

为跳过后记录历史的状态基线补充撤销回归测试
2026-09-03 14:42:38 +08:00
suzmii f86a1320f6 Merge remote-tracking branch 'origin/master' into feat/agc-llm-router-official-chain 2026-09-03 14:41:44 +08:00
suzmii 9ae3aba092 清理已退役工具测试并补充 Router 账号文档
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / Backend tests (pull_request) Failing after 10s
Project CI / Frontend tests (pull_request) Successful in 3m26s
Project CI / Native shell tests (pull_request) Has been cancelled
删除已移除 Skill 引用工具的遗留专用测试

补充 llm_router_account 表结构与用途说明
2026-09-03 14:35:22 +08:00
suzmii 8aaa3f5c7b 修复运行时配置诊断阻塞窗口
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Native shell tests (pull_request) Failing after 11m21s
Project CI / Frontend tests (pull_request) Successful in 11m46s
将 Codex CLI 与 app-server 探测移入 Tokio 阻塞线程池

保持 GameAgent 运行时配置读写流程不变

增加异步 LLM 配置诊断回归测试并补充技术方案约束
2026-09-03 14:24:40 +08:00
suzmii 75845bd7e9 Merge remote-tracking branch 'origin/feat/agc-llm-router-official-chain' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Successful in 3m2s
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / Native shell tests (pull_request) Failing after 7m30s
2026-09-03 13:42:19 +08:00
suzmii 4f79a275a8 美化 AGC 客户端设置页
收敛账号与角色协作展示文案

增加账号状态检测动画和状态卡片样式

将流式输出与联网检索整理为单列

更新设置页回归测试与配置护栏
2026-09-03 13:39:32 +08:00
k88936 e4680d6f70 统一节点变换实时预览
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Native shell tests (pull_request) Successful in 19m52s
预览拖动和缩放时同步解析保持子节点页面矩形的变换

将检查器的子节点保持选项传入预览交互并补充回归测试
2026-09-03 13:38:19 +08:00
k88936 79d3e5e6de 保留颜色草稿卸载时的修改
组件卸载前提交仍未关闭的颜色草稿,避免切换面板或删除组件导致颜色丢失
2026-09-03 13:17:15 +08:00
k88936 08caa1f29f 防止资源比较循环递归溢出
为 sameResource 增加对象对访问跟踪,遇到循环结构时安全终止递归
2026-09-03 13:15:49 +08:00
k88936 6b332e8c12 阻止快捷键重复触发历史操作
忽略 keydown 重复事件,避免长按撤销或重做键耗尽历史记录
2026-09-03 13:15:17 +08:00
k88936 cb86ab8be9 减少编辑器历史快照复制
提交历史时复用已克隆的 nextState,避免每次编辑产生冗余深拷贝
2026-09-03 13:15:01 +08:00
k88936 071998fee9 提取编辑器历史上限常量
为撤销历史容量 100 增加命名常量,便于理解和调节内存权衡
2026-09-03 13:14:43 +08:00
k88936 d60d93a327 简化预览变换查找
单次读取节点预览变换,移除重复 Map 查找和非空断言
2026-09-03 13:14:18 +08:00
k88936 e75450357d 优化预览变换回退分配
复用空的预览变换映射,避免节点递归渲染重复分配
2026-09-03 13:14:00 +08:00
kdletters 025f627297 新增旧玩法表阶段一清空迁移能力 (#251)
Project CI / Frontend tests (push) Successful in 3m11s
Project CI / Backend tests (push) Successful in 6m52s
Project CI / Repository checks (push) Failing after 53s
Project CI / Native shell tests (push) Failing after 17m50s
阶段一新增受 migration operator 保护的旧玩法表清空 procedure,暂不删除表定义。\n\n固定 63 张旧表,支持 dry-run 与事务 apply;生成 bindings;更新契约和决策记录;保留阶段二删表 TODO。\n\n已完成 cargo check、migration 测试、bindings/schema/encoding/diff 检查;本地 dry-run 返回 63 张表且全为 0 行,未执行 apply。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/251
2026-09-03 12:57:01 +08:00
k88936 d6f0c2642f 提交颜色选择器结束态草稿
Project CI / Repository checks (pull_request) Failing after 19s
Project CI / Backend tests (pull_request) Failing after 19s
Project CI / Frontend tests (pull_request) Successful in 2m41s
Project CI / Native shell tests (pull_request) Successful in 14m54s
使用 RgbaColorPicker 的 onChangeEnd 处理指针与键盘结束\n关闭颜色弹层时提交仍存在的草稿
2026-09-03 12:17:36 +08:00
k88936 074ee615ae 更新节点拖拽提交测试
断言 pointermove 仅更新预览\n断言 pointerup 才提交一次节点变换
2026-09-03 12:17:25 +08:00
k88936 d44c924f5e 简化 UI 编辑器历史提交边界
移除撤销事务 API 与额外事务状态

让绑定每个 batch 独立提交一条撤销记录

同步更新规格和独立提交测试
2026-09-03 12:14:21 +08:00
k88936 b07c8a5e25 优化编辑器状态相等性检查
用可提前退出的递归比较替代完整状态序列化\n减少每次编辑提交的无谓 JSON 字符串构造
2026-09-03 12:00:36 +08:00
k88936 37c465dbc3 稳定编辑器快捷键监听
按稳定的撤销重做回调绑定全局监听\n尊重已被其他处理器阻止的键盘事件
2026-09-03 11:54:59 +08:00
k88936 95f5904b92 放宽编辑器快捷键焦点限制
仅将文本输入控件视为可编辑目标\n保持工具栏按钮聚焦时仍可使用撤销重做快捷键
2026-09-03 11:54:27 +08:00
k88936 e616e2c899 清理透明度输入的颜色草稿
透明度修改提交前显式清除颜色草稿\n避免无效更新后残留未提交颜色
2026-09-03 11:51:58 +08:00
k88936 f79ccccf44 稳定预览手势清理回调
通过 ref 读取最新预览回调\n避免回调身份变化时重复取消进行中的手势
2026-09-03 11:51:34 +08:00
k88936 093a2ace76 优化预览变换状态更新
仅在预览变换实际变化时创建新 Map\n避免取消不存在手势时触发预览树重渲染
2026-09-03 11:51:07 +08:00
suzmii 1c4a7bd221 Merge branch 'master' into feat/agc-llm-router-official-chain
Project CI / Repository checks (pull_request) Successful in 2m49s
Project CI / Frontend tests (pull_request) Successful in 3m36s
Project CI / Backend tests (pull_request) Failing after 2m51s
Project CI / Native shell tests (pull_request) Failing after 6m42s
2026-09-03 11:42:37 +08:00
kdletters 8ed0626627 恢复预览环境本地配置注入
Project CI / Frontend tests (push) Successful in 3m15s
Project CI / Repository checks (push) Successful in 2m12s
Project CI / Backend tests (push) Successful in 7m31s
Project CI / Native shell tests (push) Successful in 20m0s
恢复 API 与 worker 的 .env.local BuildKit secret 挂载

补齐 Jenkins 固定文件校验与预览文档

增加双配置文件构建门禁
2026-09-03 11:38:40 +08:00
suzmii ac0f6bb783 Revert "恢复 Router provisioning 固定密钥方案"
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
This reverts commit 9a06945e44.
2026-09-03 11:22:29 +08:00
suzmii 9a06945e44 恢复 Router provisioning 固定密钥方案
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / Frontend tests (pull_request) Successful in 3m4s
Project CI / Backend tests (pull_request) Failing after 9s
Project CI / Native shell tests (pull_request) Failing after 10m8s
恢复 api-server 内置 provisioning secret,保持现有账号派生兼容

移除 provisioning secret 的环境变量和示例配置入口

补充阶段性取舍而非设计缺陷的代码注释

同步 Router 账号链路架构文档
2026-09-03 11:10:32 +08:00
k88936 90623f136d 登记 UI 编辑器撤销重做规范
将撤销重做规格加入文档总览入口
2026-09-03 11:08:52 +08:00
k88936 dc0ea0eda0 接入 UI 编辑器撤销重做入口
在编辑器头部增加撤销与重做按钮及禁用态

增加桌面 Cmd/Ctrl 快捷键并保留文本控件原生行为
2026-09-03 11:07:19 +08:00
k88936 0544e78996 修正清空编辑器历史边界
清空编辑器时重置撤销与重做栈

补充清空操作不会进入历史的测试
2026-09-03 11:06:47 +08:00
k88936 e379459820 降低 UI 编辑器颜色选择器提交频率
颜色拖动期间使用本地草稿预览

指针释放时一次提交最终颜色 State
2026-09-03 11:05:58 +08:00
k88936 15caf1cafc 收敛 UI 编辑器锁与历史事务
新增统一的加锁并包裹历史事务操作

将 AI 建议、识别、合并和批量绑定改用统一入口
2026-09-03 11:05:04 +08:00
k88936 f79724cb17 实现 UI 编辑器 State 撤销重做核心
在统一 State 提交入口增加 100 条快照历史与 no-op 过滤

提供撤销、重做、事务分组及加载重置历史 API

补充 State 历史、事务回滚和加载清理测试
2026-09-03 11:01:21 +08:00
k88936 c519f65ac2 补充 UI 编辑器撤销重做规范
明确撤销与重做的 State 范围、事务边界和生命周期

明确连续控件与节点变换的低频提交规则

明确资产文件、副作用、快捷键和验收标准
2026-09-03 10:58:54 +08:00
k88936 8a18b1b181 调整 UI 编辑器节点变换为松开时提交
Project CI / Repository checks (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Failing after 2m3s
Project CI / Backend tests (pull_request) Failing after 20s
Project CI / Native shell tests (pull_request) Failing after 4m30s
拖动和缩放期间仅更新预览临时变换

指针松开时提交最终变换,取消操作不写入 State

补充 UI 编辑器拖动变换提交边界文档
2026-09-03 10:51:52 +08:00
kdletters 53070e0390 支持 AGC 多行发布说明
Project CI / Repository checks (push) Successful in 2m31s
Project CI / Frontend tests (push) Successful in 3m10s
Project CI / Backend tests (push) Successful in 7m6s
Project CI / Native shell tests (push) Successful in 19m53s
Jenkins 参数改为多行文本输入
客户端更新提示保留换行并支持滚动
增加清单与客户端多行说明测试
同步 AGC 更新发布文档
2026-09-03 10:36:43 +08:00
suzmii 258501918f 修复 AGC 运行预览尺寸抖动 (#252)
Project CI / Repository checks (push) Successful in 2m42s
Project CI / Frontend tests (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 6m59s
Project CI / Native shell tests (push) Successful in 17m33s
## 问题

AGC 项目运行页的本地预览会根据 iframe 上报内容尺寸调整 iframe viewport;部分使用 `100vh`、百分比或响应式布局的游戏会把宿主调整后的 viewport 再反映为新的内容尺寸,形成反馈环并在两个缩放档位之间持续抖动。

附件工程和录屏已确认可触发该问题,普通浏览器直接打开不受影响。

## 落地方案

- 补充宿主 viewport 变更与真实内容变更的区分,忽略由宿主首次应用 fit 引起的回灌尺寸;
- 保留同一稳定 viewport 下真实动态内容变化后的重新适配;
- 增加反馈环收敛、动态内容变化和陈旧消息回归;
- 同步 AGC 运行预览权威文档和项目记忆。

## 验证计划

- 附件 `gameagent-2873e5ac` 在 AGC WebView 中稳定显示;
- 相关 TypeScript 单测与类型检查;
- preview Rust 定向测试;
- `npm run check:encoding`、`git diff --check`。

Fixes #250

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/252
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-09-03 10:35:23 +08:00
suzmii 6bea5bb2b1 合并 master 并整合 Router 安全修复
Project CI / Native shell tests (pull_request) Failing after 6m32s
Project CI / Repository checks (pull_request) Successful in 3m5s
Project CI / Backend tests (pull_request) Failing after 3m16s
Project CI / Frontend tests (pull_request) Successful in 3m44s
合入 origin/master 最新提交 a465e481e

保留后台错误报告、AGC 受控搜索与 Router 计费安全修复

同步 SpacetimeDB migration、技能文档和配置契约
2026-09-03 10:28:20 +08:00
suzmii 4b3d27e3d3 修复 AGC Router 计费与登录安全问题
绑定 LLM 幂等键与请求指纹,阻止跨请求免扣费

放宽登录对 Router 控制面的依赖并迁移 provisioning secret

加强 AGC 配置文件校验与 SSE UTF-8 处理

同步环境配置、架构文档和回归测试
2026-09-03 10:24:36 +08:00
lhk229 a465e481e3 修复 AGC 本地 BgFilter worker 启动链路 (#258)
Project CI / Repository checks (push) Successful in 3m14s
Project CI / Frontend tests (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 6m58s
Project CI / Native shell tests (push) Successful in 18m13s
backend 模式复用 Rust 双进程启动与 watcher

AGC 后端复用门禁增加 BgFilter worker readiness

补充启动编排与 ready 门禁回归测试

同步本地开发运维文档

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/258
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-03 10:15:29 +08:00
kdletters 2079e274b6 修复 AGC 发布清单覆盖
Project CI / Repository checks (push) Successful in 3m3s
Project CI / Frontend tests (push) Successful in 3m49s
Project CI / Backend tests (push) Successful in 7m16s
Project CI / Native shell tests (push) Successful in 17m49s
强制覆盖版本安装包与 latest.json
增加 latest 上传覆盖回归检查
同步 AGC 更新发布文档
2026-09-03 10:11:29 +08:00
k88936 422c8931d6 Feat/AGC错误报告 (#240)
Project CI / Repository checks (push) Successful in 2m45s
Project CI / Frontend tests (push) Successful in 3m22s
Project CI / Backend tests (push) Successful in 5m53s
Project CI / Native shell tests (push) Successful in 16m45s
实现:
在rust内存里维护错误事件队列, webview调用tauri command传入, 后台任务agent工具等直接插入
把rust , webview console的日志统一写到AppData文件夹下的(滚动保存的)日志文件.
rust对传入的错误进行筛选,脱敏, 防抖,后通知前端提醒用户.
用户提醒是一个不阻塞的小UI, 展开后可以选择错误上报, 可以附加文字描述
上传时附带最近日志, 错误堆栈等信息

元数据存在数据库, 考虑到字符串信息很难查询, 所以在api server打包成zip存在OSS.
管理页面新增错误报告的查看页面

![shotmd-1788328504.jpg](/attachments/641b43c8-deed-47d8-8c78-36adb9a2548f)
![shotmd-1788328495.jpg](/attachments/33c6ada3-dd4d-44b6-9859-f18f944eb653)
![shotmd-1788328222.jpg](/attachments/59267df9-f624-4e47-bb9b-b69d77f595c4)
![shotmd-1788328230.jpg](/attachments/63ea6a86-9a51-412b-a98c-dce454bcc968)

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/240
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-03 10:02:05 +08:00
kdletters aad9be8274 Merge pull request '移除 AGC Skill 读取工具' (#256) from fix/remove-read-skill-tool into master
Project CI / Frontend tests (push) Successful in 3m18s
Project CI / Repository checks (push) Successful in 2m37s
Project CI / Backend tests (push) Successful in 6m59s
Project CI / Native shell tests (push) Successful in 19m4s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/256
Reviewed-by: 段舒康 <kdletters@qq.com>
2026-09-02 20:04:59 +08:00
suzmii beae1dfe5f 过程卡工具文案改为用户语义
- MCP 工具按写入、浏览、读取素材、导入、生成图片等用户动作显示文案
- 写入工具与文件变更统一显示正在写入文件和项目相对路径
- 命令显示具体命令,验证类命令显示正在验证游戏
- 未知工具只显示正在调用工具,不暴露内部工具名和未审核参数
- 工具详情限制路径长度并拒绝绝对路径与上跳路径
- stream=false 时继续保留新的具体工具执行文案
- 补充工具映射、安全边界、命令分类与过程卡心跳回归
- 决策记录同步工具语义文案规则
2026-09-02 19:44:57 +08:00
suzmii 73f5c94de4 合并master并保留双侧决策记录
合并 origin/master 的 UI 编辑器、GDD 审批与前端修复。

保留本分支 LLM Router、Direct 过程卡与私有路径相关实现和决策记录。

解决 decision-log 文档冲突,完整保留双方新增决策条目。
2026-09-02 19:31:12 +08:00
k88936 d93dd39e23 Merge remote-tracking branch 'origin/master' into fix/remove-read-skill-tool
Project CI / Repository checks (pull_request) Successful in 3m24s
Project CI / Frontend tests (pull_request) Successful in 3m47s
Project CI / Native shell tests (pull_request) Successful in 17m20s
Project CI / Backend tests (pull_request) Successful in 7m20s
2026-09-02 19:15:44 +08:00
k88936 1e67728953 清理已移除工具名称残留
删除 unknown-tool 测试中对旧 AGC 工具名的硬编码引用
2026-09-02 19:12:38 +08:00
k88936 6fe91a169c 移除 AGC Skill 受控引用读取工具
删除 agc_read_skill_resource 的实现、MCP 暴露、审计分支与专用测试

将内置 Skill references 改为 Codex 原生相对路径读取

同步 Skill manifest 指纹、Runtime 提示词与 AGC 项目文档

保留既有 references 安装与隔离 HOME 校验
2026-09-02 19:00:31 +08:00
suzmii 8932f0b27c 修复泥点紧凑显示向上舍入 (#255)
Project CI / Repository checks (push) Successful in 2m59s
Project CI / Frontend tests (push) Successful in 3m15s
Project CI / Backend tests (push) Successful in 7m57s
Project CI / Native shell tests (push) Successful in 17m13s
## 变更内容

- 将泥点紧凑显示从四舍五入改为按一位小数向下截断;
- “万”和“亿”两个紧凑单位分支使用一致规则,不会再显示出高于实际余额的数值;
- `12,999` 由 `1.3万` 改为 `1.2万`,`19,999` 由 `2.0万` 改为 `1.9万`;
- 低于 `1万` 的完整数字显示和非紧凑模式保持不变。

## 前后对照

| 实际泥点 | 修改前 | 修改后 |
| --- | --- | --- |
| `9,999` | `9,999` | `9,999` |
| `12,999` | `1.3万` | `1.2万` |
| `19,999` | `2.0万` | `1.9万` |

## 排查范围

- 仓库内泥点紧凑缩写只有 `formatMudPointCount` 一处;
- 该函数仅包含“万”和“亿”两个单位分支,本次均已修改;
- 其它泥点展示使用完整整数,不存在同类单位舍入问题。

## 验证

- `npm run check:encoding`
- `git diff --check`
- 按需求未新增测试
- 首轮 Frontend CI 唯一失败为 `AdminEditorAssetQueryPage.test.tsx` 既有大量缩略图换签用例超时,与本次格式化改动无关;新提交已触发 CI 重跑

Closes #254

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/255
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: suzmii <suzmii@qq.com>
Co-committed-by: suzmii <suzmii@qq.com>
2026-09-02 18:40:17 +08:00
suzmii 5008691975 过程卡思考阶段显示正在思考并保留具体执行命令
Project CI / Native shell tests (pull_request) Failing after 12m28s
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Successful in 3m31s
Project CI / Backend tests (pull_request) Failing after 9s
- preparing 活动词文案由正在理解需求改为正在思考中
- Codex 计划与推理通知只收敛为 thinking 活动,不再把原始推理正文送入 UI
- 推理期 thinking 活动按 1.2 秒限流,避免重复事件刷屏
- command-exec 等执行细节不再依赖回复流开关,stream=false 也保留具体命令
- 同一活动的心跳事件不再用通用文案覆盖正在执行的具体命令
- 补充 Rust 纯函数单测与 AppSurface 思考态、命令心跳回归
- 决策记录同步 thinking 与执行细节展示规则
2026-09-02 18:24:14 +08:00
kdletters 97b0231afc 优化 AGC 会话恢复超时与 Runner 启动校验 (#253)
Project CI / Frontend tests (push) Successful in 4m33s
Project CI / Repository checks (push) Successful in 4m48s
Project CI / Backend tests (push) Successful in 8m38s
Project CI / Native shell tests (push) Successful in 18m37s
## 变更内容

- 增加启动会话恢复阶段、等待时间和可操作错误提示。
- 为客户端 HTTP 请求增加默认超时、AbortController 取消和可选长请求豁免。
- 会话恢复失败后提供重试,并隔离旧请求的迟到结果。
- 让 Runner 启动探测严格遵守剩余启动时间预算。
- 补充前端、HTTP、Runner 定向测试并同步技术方案。

## 验证

- npm run typecheck --workspace @genarrative/ai-game-creator-shell
- npm run check:encoding
- clientHttp 定向测试
- AuthenticatedClient 定向测试
- Runner 启动探测测试
- cargo fmt --check
- git diff --check

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/253
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-09-02 18:15:38 +08:00
suzmii c668964d2f 优化 Direct 流式回复展示
将生成中的累计正文直接显示在助手会话气泡中。

过程卡只保留阶段与执行信息,避免工具事件覆盖正文。

展开详情的滚动条轨道与角落改为透明。

补充流式、失败清理与正式消息接管的界面回归验证。
2026-09-02 17:50:17 +08:00
suzmii 8f7017f6c0 Direct 过程卡改为按回合阶段状态驱动并移除合成打字机
Project CI / Frontend tests (pull_request) Successful in 3m20s
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Native shell tests (pull_request) Failing after 13m20s
- DirectProject observer 只把真实回复增量标记 streaming,工具中间文本与活动一律 running
- 删除最终回复的合成打字机回放,改由真实事件驱动流式展示
- App 事件投影新增回合状态与 processKey,小字统一补充正在前缀
- 过程卡标题只由回合状态决定,展开状态在同一回合内保持
- 失败与接受态文案改为当前阶段描述,旧直接活动词映射移除
- AppSurface 回归覆盖接受态、展开保持、流式标题与失败态断言
- 决策记录与 Direct 审计账本同步新的状态口径
2026-09-02 16:49:42 +08:00
k88936 5de9554426 Feat/ui编辑器与code agent整合 (#237)
Project CI / Repository checks (push) Successful in 3m36s
Project CI / Frontend tests (push) Successful in 4m30s
Project CI / Native shell tests (push) Successful in 18m33s
Project CI / Backend tests (push) Successful in 8m12s
实现:
在ui编辑器保存旁增加一个保存并生成代码(js)
生成的是js字符串形式的html, 在整个js前有文档说明
code agent使用js直接注入已经生成的 export的html片段,
每次保存会直接覆盖这些html片段, 依靠动态注入实现编辑器的微调反映到游戏中.
每个节点提供了稳定的id用于code agent在生成html的基础上进行功能实现, 节点增删

目前是作为一个自说明的文件直接让code agent阅读使用, 都是用户调整保存顺便生成, 不提供工具调用.
希望以skill的形式使用

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 孔令弘 <ink29535@proton.me>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/237
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-02 16:49:19 +08:00
suzmii bbf9500bea 合并最新主线并保留官方路由锁定
Project CI / Frontend tests (pull_request) Failing after 3m0s
Project CI / Repository checks (pull_request) Failing after 3m1s
Project CI / Backend tests (pull_request) Failing after 3m52s
Project CI / Native shell tests (pull_request) Failing after 5m55s
合并客户端扩展、应用更新、格式化门禁和后台表查询等主线改动。

运行时设置页保留官方账号服务与安全元数据,同时接入主线扩展管理与更新能力。

DirectProject 文档合并主线第三方 MCP 支持与官方路由、受控搜索边界。

修复合并后的后台 API Key 详情 Eye 图标导入。
2026-09-02 15:34:30 +08:00
kdletters fe35fcf264 修复 AGC Windows NSIS 打包工具缓存
Project CI / Backend tests (push) Successful in 6m48s
Project CI / Repository checks (push) Successful in 2m46s
Project CI / Frontend tests (push) Successful in 3m16s
Project CI / Native shell tests (push) Successful in 15m39s
启用 Tauri 项目级 NSIS 工具缓存,避开 Jenkins systemprofile AppData。

补充 Windows 配置门禁,防止 useLocalToolsDir 回退。

增强 Jenkins 预检与失败诊断,记录实际用户和 makensis 路径。

同步 AGC 发布文档与 NSIS 排障记忆。
2026-09-02 15:24:07 +08:00
suzmii a30f03a38c 零泥点用户禁止发起 LLM 对话
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Frontend tests (pull_request) Failing after 6m53s
Project CI / Native shell tests (pull_request) Failing after 9m17s
Responses 与 Chat 兼容入口在解析 Router 凭据前读取用户钱包余额。

余额为 0 时直接返回 409 MUD_POINTS_INSUFFICIENT,不创建、续期或访问 Router 账号。

余额读取失败时失败关闭并提示稍后重试。

补充零余额前置门禁回归测试与架构决策记录。
2026-09-02 15:22:51 +08:00
suzmii 44e1e03f2e 格式化 AGC Rust 模块
Project CI / Frontend tests (pull_request) Failing after 2m13s
Project CI / Native shell tests (pull_request) Failing after 4m39s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Backend tests (pull_request) Failing after 11s
按当前 rustfmt 规则整理 Agent Runtime、配置、预览、会话与相关测试的代码布局。

本提交不改变运行逻辑,保持 AGC Rust 工作区格式门禁可通过。
2026-09-02 14:57:18 +08:00
suzmii b414f2f5f8 完善 Router 共享账号与订阅契约
Router 固定 Token 展示名改为 agc_auto_generate,并同步后台安全查询测试。

文档记录跨独立数据库的稳定账号恢复、default 分组、订阅续期和 best-effort 扣费规则。

调整共享官方 Router 的非生产启动告警,并保留错误 code 构造能力。
2026-09-02 14:56:19 +08:00
suzmii 1c6c499a11 登录返回前同步认证投影
新增 create_auth_session_and_sync,统一密码、手机号和微信登录会话的投影同步时机。

避免登录接口签发的新 access token 在下一次请求被当前或其它节点的 SpacetimeDB 校验拒绝。

补充登录投影同步回归测试。
2026-09-02 14:55:52 +08:00
suzmii e9591c0543 锁定 AGC 官方路由并强化美术素材使用
真实 Debug 和 Release 构建都强制通过 API Server 使用官方 LLM Router,仅 Rust 测试构建保留显式 loopback fixture。

清理配置读取中的旧 Provider 凭据入口,并补充配置锁定回归。

code-prototype 任务提示要求实际读取并渲染四类平台美术切片,防止只引用整图或路径。
2026-09-02 14:55:23 +08:00
suzmii 479094ef89 取消 DirectProject 成功回复脱敏
DirectProject 流式文本和最终回复只移除 thinking 包装,成功正文按用户项目内容原样展示。

删除路径、链接和凭据占位符替换以及回复长度截断逻辑。

同步删除最终回复必须脱敏的文档要求,并更新回归测试验证项目内容保持原样。
2026-09-02 14:43:54 +08:00
lhk229 65d7a57eb7 AGC对主站的请求添加header (#241)
Project CI / Frontend tests (push) Successful in 4m0s
Project CI / Repository checks (push) Successful in 4m4s
Project CI / Backend tests (push) Successful in 8m40s
Project CI / Native shell tests (push) Successful in 17m56s
Project CI / Frontend tests (pull_request) Successful in 5m16s
Project CI / Repository checks (pull_request) Successful in 6m57s
Project CI / Backend tests (pull_request) Successful in 6m31s
Project CI / Native shell tests (pull_request) Successful in 16m57s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/241
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-02 14:39:01 +08:00
suzmii 529a1a0a77 格式化 AGC Agent 既有代码
修正 generation 与 runtime_state 两个文件的 rustfmt 布局,使工作区格式门禁可通过。
2026-09-02 14:27:08 +08:00
suzmii 2e15289264 补齐 AGC 直连活动状态与泥点错误映射
Codex app-server 将文件、命令、验证、搜索等 item/started 事件映射为具体活动标题和安全短详情。

泥点不足错误映射为稳定 409 上游错误并在 DirectProject 显示明确充值引导,不再落到 other。

官方平台会话保持 Provider Proxy 链路,测试专用 API Key/AuthBridge 逻辑仅保留在 cfg(test)。Codex 子进程清理代理环境,确保 loopback SSE 不被系统代理劫持。

补充活动投影、错误映射、流式配置和敏感内容脱敏回归测试。
2026-09-02 14:26:00 +08:00
suzmii 69c11c3285 调整 LLM 泥点后置扣费与执行状态展示
LLM Router 计费改为每开始 10000 token 扣 1 点且至少 1 点。

钱包在同一事务内按可消费余额扣光并记录赠送差额,成功响应不再因余额不足中断。

Responses 流式终态延后到结算后发送,泥点不足映射为稳定错误。

执行状态改为具体工具标题,详情默认单行折叠并增加扫过高亮动画。

补充计费公式、幂等扣费与状态展示回归测试。
2026-09-02 14:17:27 +08:00
suzmii 700d7940a7 修复 Router 分组与账号凭据契约
- 固定 Router 用户为 taonier、Token 为 default 并确保订阅

- 复用本地账号 Key,禁止无管理员令牌绕过订阅校验

- LLM 转发只读取服务端已验证的 Router 凭据并保持请求流式参数
2026-09-02 12:06:31 +08:00
kdletters a75dc94f20 稳定 GDD 审批响应标识测试
Project CI / Repository checks (push) Successful in 3m2s
Project CI / Frontend tests (push) Successful in 3m46s
Project CI / Backend tests (push) Successful in 7m10s
Project CI / Native shell tests (push) Successful in 16m58s
等待审批提交按钮恢复可用后再触发重试

消除慢环境下 React 状态更新未完成导致的偶发红灯
2026-09-02 11:36:00 +08:00
kdletters 4a2f5be6c5 同步 AGC 更新下载域名门禁
Project CI / Repository checks (push) Successful in 3m2s
Project CI / Backend tests (push) Successful in 7m7s
Project CI / Frontend tests (push) Failing after 2m54s
Project CI / Native shell tests (push) Successful in 17m15s
允许受信任 OSS 更新资源域名

保持客户端更新网络范围与运行时配置一致
2026-09-02 11:14:47 +08:00
kdletters cb737cae94 修复 AGC Jenkins 空参数处理
Project CI / Repository checks (push) Successful in 3m44s
Project CI / Frontend tests (push) Successful in 4m34s
Project CI / Backend tests (push) Successful in 6m55s
Project CI / Native shell tests (push) Failing after 16m37s
COMMIT_HASH 为空时按空字符串处理

OSSUTIL_BIN 为空时按默认命令处理

补充 Windows 构建节点参数行为说明
2026-09-02 11:02:30 +08:00
kdletters eb14cec0b8 修复客户端更新代码格式
Project CI / Frontend tests (push) Successful in 4m4s
Project CI / Backend tests (push) Successful in 8m3s
Project CI / Repository checks (push) Successful in 2m48s
Project CI / Native shell tests (push) Failing after 17m21s
同步 Rust 更新下载与重启逻辑的 rustfmt 输出
2026-09-01 20:17:42 +08:00
kdletters 89e021f52b 补齐 H5 导航静态断言格式兼容
兼容原生页面 URL 调用对象被格式化拆行
2026-09-01 20:16:51 +08:00
kdletters 3e8e238286 统一原生壳静态断言格式兼容
所有源码片段断言统一兼容格式化拆行

保留严格语义匹配并归一化空白与标点
2026-09-01 20:16:51 +08:00
lhk229 b14e42d9bb AGC支持安装扩展skill、MCP (#233)
Project CI / Repository checks (push) Failing after 1m45s
Project CI / Frontend tests (push) Successful in 4m1s
Project CI / Backend tests (push) Successful in 6m55s
Project CI / Native shell tests (push) Failing after 16m22s
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/233
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-01 20:13:48 +08:00
kdletters a7e810b999 添加 AGC 客户端更新检查与下载能力 (#230)
Project CI / Backend tests (push) Successful in 7m40s
Project CI / Native shell tests (push) Failing after 18m53s
Project CI / Repository checks (push) Failing after 1m11s
Project CI / Frontend tests (push) Failing after 2m27s
实现 AGC 启动版本检测与 OSS 安装包下载。

- 每次客户端打开时从 OSS latest.json 检查新版本
- 新版本提示支持 releaseNotes,并通过 Tauri 命令下载到系统下载目录
- 下载地址限制受信任 OSS、HTTPS、大小与可选 SHA-256 校验
- 补充 Tauri capability/CSP、单测和发布文档

Closes #224

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/230
2026-09-01 19:23:55 +08:00
kdletters 59a76be3c4 补齐微信认证静态断言格式兼容
Project CI / Native shell tests (push) Failing after 19m0s
Project CI / Repository checks (push) Successful in 2m57s
Project CI / Frontend tests (push) Successful in 3m24s
Project CI / Backend tests (push) Successful in 7m56s
兼容认证边界测试被格式化拆行后的源码匹配
2026-09-01 19:17:06 +08:00
kdletters a187d78a1c 修复原生壳静态断言格式兼容
Project CI / Repository checks (push) Successful in 4m5s
Project CI / Frontend tests (push) Successful in 4m59s
Project CI / Backend tests (push) Successful in 8m12s
Project CI / Native shell tests (push) Failing after 18m0s
放宽能力文档方法表的 Markdown 空白解析

统一源码片段断言的空白、括号与尾逗号归一化
2026-09-01 18:37:41 +08:00
kdletters 80f34d062d 修复原生壳能力检查换行解析
Project CI / Repository checks (push) Successful in 2m40s
Project CI / Frontend tests (push) Successful in 4m2s
Project CI / Backend tests (push) Successful in 7m43s
Project CI / Native shell tests (push) Failing after 20m9s
允许能力数组导出等号后的格式化空白
2026-09-01 17:28:30 +08:00
kdletters b489244e03 修复原生壳 CI 格式化兼容
Project CI / Frontend tests (push) Successful in 3m44s
Project CI / Repository checks (push) Successful in 3m1s
Project CI / Backend tests (push) Successful in 7m54s
Project CI / Native shell tests (push) Failing after 17m32s
放宽移动壳能力数组导出解析的空白匹配

兼容格式化后的移动壳源码断言换行

放宽桌面壳能力数组导出解析的空白匹配
2026-09-01 17:00:44 +08:00
kdletters 669405c8b8 忽略所有 Rust target 目录
Project CI / Repository checks (push) Successful in 3m35s
Project CI / Frontend tests (push) Successful in 4m21s
Project CI / Native shell tests (push) Failing after 3m19s
Project CI / Backend tests (push) Successful in 7m56s
将 target 忽略规则扩展到仓库任意层级
2026-09-01 16:30:15 +08:00
kdletters 071faa482c 统一 Rust 与 TypeScript 格式化门禁
纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口

完成项目 TypeScript/Prettier 与 Rust 全量格式化

修复 Pingora expected executable 门禁的空白敏感误报

同步开发运维文档与 AGC skill pack 格式化忽略规则
2026-09-01 16:28:34 +08:00
k88936 ae79d50b14 Fix/修复ui-editor调用llm与实际配置不一致 (#235)
Project CI / Repository checks (push) Successful in 2m54s
Project CI / Frontend tests (push) Successful in 4m56s
Project CI / Backend tests (push) Successful in 6m39s
Project CI / Native shell tests (push) Successful in 14m28s
复用统一的LLM调用, 原来的方法内部会默认不stream传输,
一些上游要求流式传输会出现问题

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/235
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-09-01 14:35:45 +08:00
suzmii f0142f7019 Close213/215 本地资源注册与后台表查询 (#232)
Project CI / Repository checks (push) Successful in 4m8s
Project CI / Frontend tests (push) Successful in 4m52s
Project CI / Backend tests (push) Successful in 6m35s
Project CI / Native shell tests (push) Successful in 16m33s
## 关联 Issue

- Close #213:补充本地资源注册类型
- Close #215:后台表查询添加字段查询

## 背景

本 PR 合并处理两个规模较小、已完成统一 review 的客户端与后台能力改动,整体已基于远端最新 master。

## 本地资源注册(#213)

- AGC 本地项目资源支持图片、字体、音频、视频、文档和代码类型。
- 支持 PNG/JPEG/WEBP/GIF/SVG/AVIF/BMP、TTF/OTF/WOFF/WOFF2、MP3/WAV/OGG/FLAC/M4A/AAC/OPUS、MP4/WEBM/MOV,以及常见文本、配置和源码扩展名。
- 同步更新 Direct Tool Bridge、MCP schema、Runtime/Provider Prompt、AGC Skill 文档和技术方案。
- 保留项目相对路径、敏感目录、符号链接、文件大小、字体解析、UTF-8、项目锁、manifest/revision 和幂等语义。
- 修复从 game 等目录复制到 assets/uploads 时扩展名退化为 .bin 的问题。

## 后台表查询(#215)

- 使用结构化筛选条件替换手写筛选 JSON。
- 支持多条件、比较、包含、前后缀、列表、空值和旧 JSON object 兼容。
- 优化预览表格、详情复制、Toast、JSON 预览和排序交互。
- 修复数字范围筛选,包括数据库字符串化数字的数值比较。
- 补充前后端回归测试与文档。

## 验证

- AGC 本地资源导入测试:6/6
- AGC Direct/MCP 工具测试:8/8
- 本地资源扩展名与 Prompt 映射回归测试通过
- 后台 admin 数据库测试:17/17
- 后台页面 Vitest:16/16
- `npm run admin-web:typecheck`
- `npm run admin-web:build`
- `npm run check:encoding`
- `git diff --check`
- `rustfmt --edition 2024 --check server-rs/crates/api-server/src/admin.rs`

## 限制

- 未执行真实生产 SpacetimeDB、OSS 或其它付费服务验证。
- Native shell CI 及其它 PR CI 以最新 head 的远端结果为准。
- 当前 PR 保持 WIP,待 reviewer 基于最新 head 重新 review。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/232
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-09-01 14:27:39 +08:00
suzmii c0694ceedd Merge remote-tracking branch 'origin/master' into feat/hide-llm-router-and-stream-transport
Project CI / Repository checks (pull_request) Failing after 8s
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
# Conflicts:
#	apps/ai-game-creator-shell/src-tauri/src/config.rs
2026-09-01 12:15:24 +08:00
suzmii c2354f855f 收敛 AGC 官方 LLM Router 账号链路
新增 llm_router_account 表、procedures 与客户端绑定
api-server 改为 New API 管理员流程签发独立 Router 账号
Router 成功后执行幂等后置泥点扣费
生产外锁定非生产 Router 控制面为 loopback
AGC 正式模式清除手工 Provider 凭据并锁定官方代理
AGC 状态面只返回账号凭据与官方路由安全元数据
后台数据库表查询适配账号凭据状态展示
补充 AGC 与后端测试、环境示例和架构文档
修正 dev-stack 状态路径按仓库脚本位置解析
2026-09-01 12:03:07 +08:00
suzmii 26e4eab6b6 对齐主线ACL文件边界
将AGC Rust源码中的ACL专用实现恢复为主线版本

移除本分支内的Windows ACL提权命令与私有路径调用

保留Router、联网搜索和流式传输改动在后续stash中继续处理
2026-08-31 13:09:29 +08:00
suzmii c3c572dbac 合并最新 Agent 编排基线
合并 origin/master 的 Agent Runtime 编排依赖与测试门禁

恢复 platform-agent 的任务图校验与动态编排实现

为后续 AGC Router 流程调试提供可启动的最新基线
2026-08-31 11:54:18 +08:00
suzmii 7132ce543e 修正Responses流式结算事件顺序
延迟透传上游 [DONE],确保扣费失败时客户端先收到 error 事件

补充 SSE done 标记边界解析回归测试
2026-08-30 16:18:19 +08:00
suzmii 9f832ee96a 完善AGC Router代理与后置计费
修正无 provisioning 时仅使用服务端 fallback Key,禁止生成 Router 不认识的随机 Key

补齐 AGC 凭据元数据脱敏、失效复用保护与 SpacetimeDB 字段映射

让 Responses 与 Chat 流式调用在成功后按 usage 幂等扣除泥点

同步 schema 迁移、环境变量示例、后端架构和决策文档
2026-08-30 16:14:10 +08:00
suzmii e2689b4be5 调整配置默认值回归断言
移除已不再存在的前端 Agent 推理映射源码断言

保留 Rust 侧规范 Agent 默认映射和配置模板验证
2026-08-30 14:43:06 +08:00
suzmii ddb668710e 补回联网搜索测试依赖导入
保留 DirectToolBridge 测试路由使用的 Query 和 get
2026-08-30 14:36:41 +08:00
suzmii b27df8dfab 修正配置迁移测试可见性
开放 AGC 配置迁移测试所需的 crate 内函数

清理受控联网搜索合并后的未使用导入
2026-08-30 14:35:24 +08:00
suzmii 8d6b923607 合并AGC流式输出与受控联网搜索
保留官方路由锁定、账号凭据状态和 Windows 私有路径安全边界

合入 DirectProject 流式可见文本投影与受控联网搜索

同步配置 schema 迁移、状态输出和回归测试
2026-08-30 14:32:35 +08:00
suzmii 68dfd2c24f 补齐AGC流式输出与受控联网搜索
增加 DirectProject 流式可见文本投影和敏感内容过滤

接入受控 web search 工具及参数、网络边界测试

补充配置迁移和运行时回归覆盖
2026-08-30 14:22:03 +08:00
suzmii 93477f2b1b 重整AGC官方路由与安全文件链路
记录当前 AGC 客户端、Tauri、API Server、后台查询和契约改动

保留后续按新 Router 后端方案重构的检查点
2026-08-30 14:21:18 +08:00
2435 changed files with 53669 additions and 672881 deletions
+1 -1
View File
@@ -1 +1 @@
{"containers":[],"config":{}}
{ "containers": [], "config": {} }
+23 -11
View File
@@ -7,23 +7,33 @@ import { fileURLToPath } from 'node:url';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const repoRoot = resolve(scriptDir, '..', '..');
const logDir = resolve(repoRoot, '.codex', 'logs');
const hasCodegraphConfig = existsSync(resolve(repoRoot, '.codegraph', 'config.json'));
const hasCodegraphConfig = existsSync(
resolve(repoRoot, '.codegraph', 'config.json'),
);
const npmCommand = process.platform === 'win32' ? 'cmd' : 'npm';
if (!hasCodegraphConfig) {
console.log('[codex-hook] 未发现 .codegraph/config.json,跳过 CodeGraph 同步。');
console.log(
'[codex-hook] 未发现 .codegraph/config.json,跳过 CodeGraph 同步。',
);
process.exit(0);
}
const result = spawnSync(npmCommand, process.platform === 'win32' ? ['/d', '/s', '/c', 'npm run codegraph:sync'] : ['run', 'codegraph:sync'], {
cwd: repoRoot,
shell: false,
encoding: 'utf8',
env: {
...process.env,
NO_COLOR: process.env.NO_COLOR ?? '1',
const result = spawnSync(
npmCommand,
process.platform === 'win32'
? ['/d', '/s', '/c', 'npm run codegraph:sync']
: ['run', 'codegraph:sync'],
{
cwd: repoRoot,
shell: false,
encoding: 'utf8',
env: {
...process.env,
NO_COLOR: process.env.NO_COLOR ?? '1',
},
},
});
);
mkdirSync(logDir, { recursive: true });
if (result.stdout) {
@@ -44,7 +54,9 @@ if (result.signal) {
}
if ((result.status ?? 0) !== 0) {
console.error('[codex-hook] CodeGraph 同步失败,请手动运行 npm run codegraph:sync 查看详情。');
console.error(
'[codex-hook] CodeGraph 同步失败,请手动运行 npm run codegraph:sync 查看详情。',
);
process.exit(result.status ?? 1);
}
@@ -28,16 +28,11 @@
"longDescription": "Plan, prototype, and build browser games with guided workflows for gameplay systems, UI, asset pipelines, and playtesting across 2D and 3D projects.",
"developerName": "OpenAI",
"category": "Coding",
"capabilities": [
"Interactive",
"Write"
],
"capabilities": ["Interactive", "Write"],
"websiteURL": "https://openai.com/",
"privacyPolicyURL": "https://openai.com/policies/privacy-policy/",
"termsOfServiceURL": "https://openai.com/policies/terms-of-use/",
"defaultPrompt": [
"Design a browser game and plan the core loop"
],
"defaultPrompt": ["Design a browser game and plan the core loop"],
"brandColor": "#0F766E",
"composerIcon": "./assets/game-studio.svg",
"logo": "./assets/app-icon.png",
+2 -1
View File
@@ -1,6 +1,7 @@
name: game-studio
version: 0.1.0
description: Design, prototype, and ship browser games with guided 2D and 3D workflows,
description:
Design, prototype, and ship browser games with guided 2D and 3D workflows,
asset pipelines, and playtesting support.
author: OpenAI
kind: standalone
@@ -5,19 +5,19 @@ Use this as the canonical minimal pattern for loading shipped 3D content.
## Vanilla Three.js
```ts
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader.js";
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
const draco = new DRACOLoader();
draco.setDecoderPath("/draco/");
draco.setDecoderPath('/draco/');
const gltfLoader = new GLTFLoader();
gltfLoader.setDRACOLoader(draco);
gltfLoader.load("/assets/hero.glb", (gltf) => {
gltfLoader.load('/assets/hero.glb', (gltf) => {
const root = gltf.scene;
root.traverse((node) => {
if ("castShadow" in node) {
if ('castShadow' in node) {
node.castShadow = true;
node.receiveShadow = true;
}
@@ -29,10 +29,10 @@ gltfLoader.load("/assets/hero.glb", (gltf) => {
## React Three Fiber
```tsx
import { useGLTF } from "@react-three/drei";
import { useGLTF } from '@react-three/drei';
function HeroModel() {
const gltf = useGLTF("/assets/hero.glb");
const gltf = useGLTF('/assets/hero.glb');
return <primitive object={gltf.scene} />;
}
```
@@ -5,12 +5,14 @@ Use this as the smallest canonical pattern for adding physics without letting it
## Vanilla Three.js
```ts
import RAPIER from "@dimforge/rapier3d-compat";
import RAPIER from '@dimforge/rapier3d-compat';
await RAPIER.init();
const world = new RAPIER.World({ x: 0, y: -9.81, z: 0 });
const body = world.createRigidBody(RAPIER.RigidBodyDesc.dynamic().setTranslation(0, 2, 0));
const body = world.createRigidBody(
RAPIER.RigidBodyDesc.dynamic().setTranslation(0, 2, 0),
);
world.createCollider(RAPIER.ColliderDesc.cuboid(0.5, 0.5, 0.5), body);
renderer.setAnimationLoop(() => {
@@ -24,7 +26,7 @@ renderer.setAnimationLoop(() => {
## React Three Fiber
```tsx
import { Physics, RigidBody } from "@react-three/rapier";
import { Physics, RigidBody } from '@react-three/rapier';
<Physics gravity={[0, -9.81, 0]}>
<RigidBody colliders="cuboid">
@@ -12,7 +12,7 @@ src/
## `src/App.tsx`
```tsx
import { Canvas } from "@react-three/fiber";
import { Canvas } from '@react-three/fiber';
function Spinner() {
return (
@@ -27,7 +27,7 @@ export default function App() {
return (
<div className="app-shell">
<Canvas camera={{ position: [0, 1.5, 4], fov: 60 }}>
<color attach="background" args={["#101418"]} />
<color attach="background" args={['#101418']} />
<ambientLight intensity={0.7} />
<directionalLight position={[4, 6, 3]} intensity={1.2} />
<Spinner />
@@ -12,12 +12,17 @@ src/
## `src/main.ts`
```ts
import * as THREE from "three";
import * as THREE from 'three';
const scene = new THREE.Scene();
scene.background = new THREE.Color("#101418");
scene.background = new THREE.Color('#101418');
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 200);
const camera = new THREE.PerspectiveCamera(
60,
window.innerWidth / window.innerHeight,
0.1,
200,
);
camera.position.set(0, 1.5, 4);
const renderer = new THREE.WebGLRenderer({ antialias: true });
@@ -32,11 +37,11 @@ scene.add(light);
const mesh = new THREE.Mesh(
new THREE.BoxGeometry(1, 1, 1),
new THREE.MeshStandardMaterial({ color: "#3dd9b8" }),
new THREE.MeshStandardMaterial({ color: '#3dd9b8' }),
);
scene.add(mesh);
window.addEventListener("resize", () => {
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
@@ -1,4 +1,4 @@
interface:
display_name: "Game Playtest"
short_description: "Run browser-game playtests and QA"
default_prompt: "Playtest the browser game, check core interactions and visual state changes, and report concrete issues."
display_name: 'Game Playtest'
short_description: 'Run browser-game playtests and QA'
default_prompt: 'Playtest the browser game, check core interactions and visual state changes, and report concrete issues.'
@@ -1,4 +1,4 @@
interface:
display_name: "Game Studio"
short_description: "Route browser-game work to the right path"
default_prompt: "Help me choose the right browser-game stack and workflow before implementation starts."
display_name: 'Game Studio'
short_description: 'Route browser-game work to the right path'
default_prompt: 'Help me choose the right browser-game stack and workflow before implementation starts.'
@@ -1,4 +1,4 @@
interface:
display_name: "Game UI Frontend"
short_description: "Design browser-game HUDs, menus, and overlays"
default_prompt: "Design a browser-game UI layer that supports the play experience without crowding the playfield."
display_name: 'Game UI Frontend'
short_description: 'Design browser-game HUDs, menus, and overlays'
default_prompt: 'Design a browser-game UI layer that supports the play experience without crowding the playfield.'
@@ -1,4 +1,4 @@
interface:
display_name: "Phaser 2D Game"
short_description: "Build 2D browser games with Phaser"
default_prompt: "Implement this 2D browser game with Phaser, TypeScript, and a clear gameplay architecture."
display_name: 'Phaser 2D Game'
short_description: 'Build 2D browser games with Phaser'
default_prompt: 'Implement this 2D browser game with Phaser, TypeScript, and a clear gameplay architecture.'
@@ -1,4 +1,4 @@
interface:
display_name: "React Three Fiber Game"
short_description: "Build React-hosted 3D browser games"
default_prompt: "Build this 3D browser game with React Three Fiber and keep the 3D runtime aligned with the React app shell."
display_name: 'React Three Fiber Game'
short_description: 'Build React-hosted 3D browser games'
default_prompt: 'Build this 3D browser game with React Three Fiber and keep the 3D runtime aligned with the React app shell.'
@@ -1,4 +1,4 @@
interface:
display_name: "Sprite Pipeline"
short_description: "Generate and normalize 2D sprite animations"
default_prompt: "Create and normalize 2D sprite animation assets for a browser game with consistent scale and anchors."
display_name: 'Sprite Pipeline'
short_description: 'Generate and normalize 2D sprite animations'
default_prompt: 'Create and normalize 2D sprite animation assets for a browser game with consistent scale and anchors.'
@@ -1,4 +1,4 @@
interface:
display_name: "Three WebGL Game"
short_description: "Build browser-game runtimes with Three.js"
default_prompt: "Implement this browser-game runtime with plain Three.js and keep the scene architecture easy to debug."
display_name: 'Three WebGL Game'
short_description: 'Build browser-game runtimes with Three.js'
default_prompt: 'Implement this browser-game runtime with plain Three.js and keep the scene architecture easy to debug.'
@@ -1,4 +1,4 @@
interface:
display_name: "Web 3D Asset Pipeline"
short_description: "Prepare and optimize browser-game 3D assets"
default_prompt: "Prepare these browser-game 3D assets for shipping as predictable runtime-ready GLB or glTF files."
display_name: 'Web 3D Asset Pipeline'
short_description: 'Prepare and optimize browser-game 3D assets'
default_prompt: 'Prepare these browser-game 3D assets for shipping as predictable runtime-ready GLB or glTF files.'
@@ -1,4 +1,4 @@
interface:
display_name: "Web Game Foundations"
short_description: "Set browser-game architecture before implementation"
default_prompt: "Establish the core architecture for this browser game before implementation starts."
display_name: 'Web Game Foundations'
short_description: 'Set browser-game architecture before implementation'
default_prompt: 'Establish the core architecture for this browser game before implementation starts.'
@@ -5,7 +5,13 @@ license: MIT
metadata:
codex:
tags: [BDD, Gherkin, 验收标准, 用户故事, 测试, Genarrative]
related_skills: [writing-plans, test-driven-development, systematic-debugging, requesting-code-review]
related_skills:
[
writing-plans,
test-driven-development,
systematic-debugging,
requesting-code-review,
]
---
# BDD 行为驱动开发流程
@@ -218,14 +224,14 @@ Feature: Work publish permission
## 映射到测试类型
| BDD 场景关注点 | 推荐测试层级 | 示例 |
| --- | --- | --- |
| 纯领域规则、状态机、校验 | Rust/TS 单元测试 | reducer、module-*、schema validator |
| DTO 契约、API 请求响应 | API/contract 测试 | Axum handler、shared-contracts serde |
| 页面渲染、按钮状态、表单校验 | 组件测试 | Vitest + Testing Library |
| 路由、tab、页面阶段切换 | 前端集成测试 | appPageRoutes、FlowShell 行为 |
| 登录态、发布、运行态完整链路 | E2E/smoke | Playwright 或项目 smoke 脚本 |
| 埋点、副作用、后台导出 | 后端集成/API 测试 | tracking event、admin export |
| BDD 场景关注点 | 推荐测试层级 | 示例 |
| ---------------------------- | ----------------- | ------------------------------------ |
| 纯领域规则、状态机、校验 | Rust/TS 单元测试 | reducer、module-\*、schema validator |
| DTO 契约、API 请求响应 | API/contract 测试 | Axum handler、shared-contracts serde |
| 页面渲染、按钮状态、表单校验 | 组件测试 | Vitest + Testing Library |
| 路由、tab、页面阶段切换 | 前端集成测试 | appPageRoutes、FlowShell 行为 |
| 登录态、发布、运行态完整链路 | E2E/smoke | Playwright 或项目 smoke 脚本 |
| 埋点、副作用、后台导出 | 后端集成/API 测试 | tracking event、admin export |
原则:
@@ -255,8 +261,8 @@ describe('帮助与反馈入口', () => {
// Given ...
// When ...
// Then ...
})
})
});
});
```
Rust 测试命名建议:
@@ -276,13 +282,13 @@ fn anonymous_user_cannot_publish_generated_draft() {
### Gherkin/BDD 场景默认落点
| 产物类型 | 推荐路径 | 适用场景 |
| --- | --- | --- |
| 实施前分析 / 临时计划 | 当前任务说明或 `.tmp/<task-name>-bdd-scenarios.md` | 某次 Codex 开发任务前,用于澄清行为、拆测试、辅助实现;不作为长期产品依据。 |
| 正式产品验收 / PRD 场景 | 当前 `docs/` 融合文档,必要时新增 `docs/【产品验收】<功能名>BDD场景-YYYY-MM-DD.md` | 产品、测试、开发都需要长期参考的验收标准、用户故事、功能边界。 |
| 技术/API/领域行为场景 | 当前 `docs/` 融合文档,必要时新增 `docs/【技术验收】<功能名>BDD场景-YYYY-MM-DD.md` | 后端 API、领域规则、状态机、SpacetimeDB reducer/table、SSE/异步任务、埋点副作用。 |
| 自动化 Gherkin feature 文件 | `tests/features/*.feature``e2e/features/*.feature` | 项目已接入 Cucumber/Playwright BDD 等 Gherkin runner 时。未接入前不要随意新建测试 runner 目录。 |
| 稳定流程或团队经验 | `docs/project-memory/shared-memory/``.codex/skills/` | 不是某个功能验收,而是长期可复用的团队流程、坑点、执行规范。 |
| 产物类型 | 推荐路径 | 适用场景 |
| --------------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| 实施前分析 / 临时计划 | 当前任务说明或 `.tmp/<task-name>-bdd-scenarios.md` | 某次 Codex 开发任务前,用于澄清行为、拆测试、辅助实现;不作为长期产品依据。 |
| 正式产品验收 / PRD 场景 | 当前 `docs/` 融合文档,必要时新增 `docs/【产品验收】<功能名>BDD场景-YYYY-MM-DD.md` | 产品、测试、开发都需要长期参考的验收标准、用户故事、功能边界。 |
| 技术/API/领域行为场景 | 当前 `docs/` 融合文档,必要时新增 `docs/【技术验收】<功能名>BDD场景-YYYY-MM-DD.md` | 后端 API、领域规则、状态机、SpacetimeDB reducer/table、SSE/异步任务、埋点副作用。 |
| 自动化 Gherkin feature 文件 | `tests/features/*.feature``e2e/features/*.feature` | 项目已接入 Cucumber/Playwright BDD 等 Gherkin runner 时。未接入前不要随意新建测试 runner 目录。 |
| 稳定流程或团队经验 | `docs/project-memory/shared-memory/``.codex/skills/` | 不是某个功能验收,而是长期可复用的团队流程、坑点、执行规范。 |
默认规则:
@@ -313,15 +319,17 @@ e2e/features/invite-code.feature
BDD 文档建议包含:
```markdown
````markdown
# <功能名> BDD 验收场景
## 背景
- 需求来源:
- 相关文档:
- 相关入口/接口:
## 角色与目标
- 角色:
- 目标:
- 非目标:
@@ -336,16 +344,19 @@ BDD 文档建议包含:
当 ...
那么 ...
```
````
## 测试映射
| 场景 | 测试层级 | 目标文件 | 状态 |
| --- | --- | --- | --- |
| ... | component | ... | planned |
| 场景 | 测试层级 | 目标文件 | 状态 |
| ---- | --------- | -------- | ------- |
| ... | component | ... | planned |
## 开放问题
- ...
```
````
注意:上面的 Markdown 模板中如果嵌套代码块,需要在真实文档里调整围栏长度,避免代码块提前闭合。
@@ -384,7 +395,7 @@ BDD 文档建议包含:
npm run check:encoding
npm run typecheck
npm run test -- --run <相关测试文件>
```
````
- [ ] 若涉及后端 Rust/API,按相关 DDD/SpacetimeDB 文档运行对应 cargo/npm/API smoke 验证。
- [ ] 若产生长期有效经验,已同步到 `docs/project-memory/shared-memory/` 或合适的仓库级 skill。
@@ -4,7 +4,17 @@ description: 在 Genarrative/陶泥儿后台新增或修改管理页、后台 BF
license: MIT
metadata:
codex:
tags: [Genarrative, 陶泥儿后台, admin-web, 后台接口, Excel导出, Rust, Axum, SpacetimeDB]
tags:
[
Genarrative,
陶泥儿后台,
admin-web,
后台接口,
Excel导出,
Rust,
Axum,
SpacetimeDB,
]
related_skills: [genarrative-play-type-integration]
---
@@ -206,6 +216,7 @@ npm install
3. `cargo fmt --all` 可能格式化不相关 Rust 文件;提交前用 `git status` 检查并 revert 非本任务文件。
4. patch 工具对 Rust 单文件 lint 可能用 Rust 2015 edition 误报 `async fn is not permitted in Rust 2015`;以 `cargo test/check` 为准。
5. `adminRoutes` 新增 route id 后,`AdminShell.routeIcons` 必须同步,否则 TypeScript 会因 `satisfies Record<AdminRouteId, ...>` 报错。
- 后台页面中的中文和 JSON 预览要避免整文件重写导致编码问题;修改后运行 `npm run check:encoding`
- 后台数据页移动端要保证表格横向滚动,不要让整页布局撑坏。
- 若用户追问“之前不是说要把 npm run dev 修好吗”这类已承诺的 dev 启动问题,不要只解释;先复现 `npm run dev`,再按启动日志修脚本并验证到服务就绪。WSL/Linux 下本地开发应走 `spacetime start --data-dir=server-rs/.spacetimedb/local/data` 这一类数据目录隔离,不再用项目级 `--root-dir`,详见 `references/dev-rust-stack-startup-2026-05-08.md`
@@ -1,10 +1,12 @@
# 本次后台表查询接入的可复用经验
## 需求落点
- 后台“总览”页的表统计仍保留,只把每张表的表名改成可点击跳转到 `#tables?table=<name>`
- 新增独立 `#tables` 页承载表选择、关键词搜索、JSON filters、limit、行详情弹窗
- 新增独立 `#tables` 页承载表选择、关键词搜索、结构化字段筛选、limit、行详情弹窗(详情内保留字段复制,列头漏斗按钮可按列添加条件;每条条件可勾选启用或停用,停用时保留字段和值;`in` / `notIn` 使用逐项值标签,支持粘贴多行值,逗号不再作为隐式分隔符)
## 后端实现要点
- 新增只读接口:
- `GET /admin/api/database/tables`
- `GET /admin/api/database/tables/{table_name}/rows`
@@ -13,17 +15,20 @@
- `search` / `filters` 不进入 SQL 字符串:
- SQL 只负责 `SELECT * FROM {table_name} LIMIT {limit}`
- 返回后在 api-server 内存中过滤
- `filters` 接受 JSON object,按列名匹配;非 object 直接 400
- `filters` 接受两种 JSON 形式:object(列名到等值,如 `{"user_id":"u1"}`)与条件数组(如 `[{"column":"points","op":"gt","value":"5"}]`,运算符含 `eq``ne``gt``gte``lt``lte``contains``notContains``startsWith``endsWith``in``notIn``isEmpty``isNotEmpty`,允许同列多条件,条件间为 AND;非 object 且非数组直接 400,未知运算符或 value 形态不匹配也 400。数组中的 `eq` / `ne` 和其他标量运算符一样必须提供 `value`;显式空值判断使用 `isEmpty` / `isNotEmpty`
- SpacetimeDB HTTP SQL 返回可能是 statement array + rows,解析时要兼容这一层结构。
## 前端实现要点
- `adminRoutes` 必须新增 `tables``AdminShell.routeIcons` 也要同步覆盖。
- `AdminApp` 需要显式渲染 `AdminDatabaseTablesPage`
- 预览表格数据行直接点击(或行自身聚焦后按 Enter / Space)打开详情,行内按钮 / 输入控件的键盘操作不冒泡打开详情;详情按钮不单独占列。详情字段仅提供复制操作,成功、剪贴板失败和空字段复制都使用右下角自动消失的 Toast,JSON 预览与平台亮色 / 暗色主题保持一致,表头保持单行并在空间不足时省略显示。表单和标题区查询按钮共用筛选完整性校验。
- worktree 下可能没有本地 `node_modules/typescript/bin/tsc`,而根目录有依赖;在验证前可以临时把根目录 `node_modules` 软链到 worktree 再执行 `npm run admin-web:typecheck`,验证后删除软链,避免污染 git 状态。
## 验证结果
- `cargo test -p api-server admin_database -- --nocapture` 通过。
- `cargo fmt --manifest-path Cargo.toml -p api-server -p shared-contracts --check` 通过。
- `npm run admin-web:typecheck` 通过。
- `npm run admin-web:build` 通过。
- `npm run check:encoding` 通过。
- `npm run check:encoding` 通过。
@@ -1,6 +1,7 @@
# `npm run dev` / `scripts/dev-rust-stack.sh` 启动修复记录
## 症状
- 多个 worktree 同时本地开发时,SpacetimeDB 数据库名可能相同,早期曾用项目级 CLI root 隔离 CLI 状态来规避冲突。
- 实测后确认:真正需要隔离的是 standalone 的 `data-dir`,不需要把 publish 也绑到项目级 CLI root。
- 早期脚本曾通过把用户级 SpacetimeDB 可执行文件目录同步到 `server-rs/.spacetimedb/local/bin/current` 来满足 standalone 回调需求,但这会把整套可执行文件复制进项目本地目录,维护成本高,也容易和用户级 CLI 版本漂移。
@@ -9,6 +10,7 @@
- `api-server` 首次冷编译时,默认 300 秒超时不够,容易在就绪前被回收。
## 当前方案
1. SpacetimeDB 可执行文件继续使用用户环境里的 `spacetime` 命令
- 启动 standalone 时不再复制 `spacetimedb-cli`、版本目录或 `bin/current`
- `spacetime start` 不再通过工程内 CLI root 寻找可执行文件。
@@ -29,6 +31,7 @@
- `API_SERVER_TIMEOUT_SECONDS` 保持 600,降低首次冷编译误判失败概率。
## 复现 / 验证
- 运行脚本语法检查:`bash -n scripts/dev-rust-stack.sh`
- 运行帮助检查:`bash scripts/dev-rust-stack.sh --help`,确认有 `--spacetime-data-dir`
- 运行 `npm run dev` 后观察日志:
@@ -41,6 +44,7 @@
- api-server 进入健康检查等待并最终可访问 `/healthz`
## 相关文件
- `scripts/dev-rust-stack.sh`
- `server-rs/.spacetimedb/local/data/`
- `server-rs/.cargo/config.toml`
@@ -1,28 +1,34 @@
# 本地 private table SQL 权限修复
场景:
- 后台或 api-server 通过 SpacetimeDB HTTP SQL 读取 `tracking_event` 这类 private table。
- 本地清库、重建 standalone 或重新发布模块后,原 CLI token 失效,SQL 可能报 `no such table ... If the table exists, it may be marked private`
操作步骤:
1. 清空本地 SpacetimeDB 数据目录
- 使用项目脚本停止本地实例后,备份或删除 `server-rs/.spacetimedb/local/data`
- 只清本地开发环境,不要误伤远端或其他 worktree。
2. 启动本地 standalone
- 用项目约定的 `scripts/dev-rust-stack.sh` 或等价命令启动 `spacetime`
- 确认 `/v1/ping` 可访问后再取 identity。
3. 通过 `/v1/identity` 获取新 token 和 identity
- 使用 `POST http://127.0.0.1:3101/v1/identity`
- 只记录 identity,不要在日志中打印 token 明文。
4. 用新 token 登录 CLI
- 运行:`spacetime login --token <token>`
- 这会把 token 写到本地 CLI 配置,后续 HTTP SQL 可读 private table。
5. 重新验证 SQL
- 使用带 token 的 `POST /v1/database/<db>/sql`
- 先尝试 `SELECT ... FROM tracking_event LIMIT 1`
- 若成功,再让 api-server 走同样 token。
@@ -32,6 +38,7 @@
- 输出日志时统一 `[REDACTED]`
排查要点:
- `ORDER BY` 和 private table 是两个独立问题,先分开修。
- 清库后旧 token 很可能不再能看见 private table,不代表表不存在。
-`/v1/identity` 返回的 token 没权限,再检查当前 standalone 是否就是刚启动的本地实例、database 名是否一致、模块是否已重新发布。
@@ -4,8 +4,14 @@ description: 在 Genarrative 中排查或修改登录、access token、refresh c
license: MIT
metadata:
codex:
tags: [Genarrative, auth, session, cookie, refresh-token, AuthGate, tracking]
related_skills: [systematic-debugging, test-driven-development, genarrative-profile-features]
tags:
[Genarrative, auth, session, cookie, refresh-token, AuthGate, tracking]
related_skills:
[
systematic-debugging,
test-driven-development,
genarrative-profile-features,
]
---
# Genarrative 认证会话与登录埋点链路
@@ -4,7 +4,16 @@ description: 在 Genarrative 中修改 npm run dev / dev:spacetime / dev:api-ser
license: MIT
metadata:
codex:
tags: [Genarrative, dev-stack, 端口探测, Vite, api-server, SpacetimeDB, npm-run-dev]
tags:
[
Genarrative,
dev-stack,
端口探测,
Vite,
api-server,
SpacetimeDB,
npm-run-dev,
]
related_skills: [genarrative-admin-backoffice]
---
@@ -1,6 +1,6 @@
interface:
display_name: "Genarrative External Editor API"
short_description: "Route async canvas generation safely"
default_prompt: "Use $genarrative-external-editor-api to discover the hosted integration, prepare a canvas session, and submit and poll asset generation into the canvas and library."
display_name: 'Genarrative External Editor API'
short_description: 'Route async canvas generation safely'
default_prompt: 'Use $genarrative-external-editor-api to discover the hosted integration, prepare a canvas session, and submit and poll asset generation into the canvas and library.'
policy:
allow_implicit_invocation: true

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