Commit Graph

2161 Commits

Author SHA1 Message Date
k88936 0e313405d6 修复:生成绑定校验不再用 prettier 改写生成文件
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m54s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m36s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m44s
Project CI / Backend tests (pull_request) Successful in 5m46s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m41s
Project CI / Native shell tests (pull_request) Successful in 6m39s
Project CI / Repository checks (pull_request) Successful in 6m12s
- scripts/check-generated-bindings.mjs:删掉生成后的 prettier 归一化,直接逐字节比较 ts-rs 原始输出
- .prettierignore 与 .eslintrc.cjs:四个 ts-rs 生成目录统一排除,禁止格式化工具二次改写
- .prettierrc.json:删除 contracts/generated 的 printWidth / singleQuote 覆盖
- .gitattributes:生成目录标 linguist-generated 并豁免 trailing-space,保证 git diff --check 通过
- 重新生成 AGC chat/generated 与 services/generated 的 51 个绑定,改为提交 ts-rs 原始输出(纯格式,语义不变)
- docs/project-memory:记录生成绑定不再经 prettier 的口径,修正旧流程说明
2026-10-03 15:40:21 +08:00
k88936 141e59c971 Merge remote-tracking branch 'origin/master' into refactor/turn-error-to-explicit-struct
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m0s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 2m45s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m52s
Project CI / Frontend tests (pull_request) Successful in 2m30s
Project CI / Backend tests (pull_request) Successful in 4m54s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m0s
Project CI / Native shell tests (pull_request) Successful in 7m38s
Project CI / Repository checks (pull_request) Successful in 6m34s
2026-10-03 14:50:04 +08:00
lhk229 ae2d1a3a21 修复 AGC 生成准备依赖全量素材库的问题 (#592)
Project CI / AI game creator shell Rust crates (push) Successful in 1m47s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m1s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 5m18s
Project CI / Frontend tests (push) Successful in 2m27s
Project CI / Backend tests (push) Successful in 5m49s
Project CI / Native shell tests (push) Successful in 6m21s
Project CI / Repository checks (push) Successful in 3m36s
Project CI / AI game creator shell web tests (push) Successful in 2m54s
修复已有项目和素材目录绑定时,AGC 生成准备仍读取完整账户素材库、导致无关素材读取失败阻断生成的问题。

- 新增站内与 External v1 的单目录 GET,按主键读取并校验账号归属;复用目录 DTO,不读取素材列表或创建默认目录。
- 已有 binding 和 partial 恢复改为确认目标目录;首次建绑直接沿用稳定幂等创建,不再读取全库。
- 目录缺失、越权、超时、响应身份不符或会话切换时停止,保留恢复证据,不自动重建、不换键重发生成;已有生成账本继续沿用冻结快照恢复。
- 既有素材库与目录创建、修改、删除 API 合同保持不变,持久化表结构不变。同步 OpenAPI、生成绑定及技术文档。

验证:
- AGC Rust:目录绑定 7 项、生成 94 项、资源编辑 60 项、抠图 5 项通过(目录绑定用例包含在生成组中)。
- api-server:External Editor 30 项、受保护路由矩阵 3 项通过。
- 真实隔离 SpacetimeDB:目录读取成功、空目录、缺失、越权、删除后缺失、只读不变,以及既有幂等/并发/孤儿检查通过。
- smoke 脚本测试 4 项通过;module 编译、生成绑定、87 张表 schema guard、DDD、编码、文档索引、定向 Rust 格式与 diff 检查通过。
- 已比较 OpenAPI:除新增单目录 GET 外,原有定义逐项保持一致。

验证限制:未完成独立 API `/healthz` 联调,本地隔离数据库与授权配置未就绪;启动尝试已停止并清理。未运行全量测试或真实付费生成。

发布顺序:先发布后端模块与 API,再发布新客户端;不提供全库回退。#574 的素材分页、筛选及按素材 ID 读取不在本 PR 范围内。

Closes #550

Reviewed-on: #592
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-03 14:48:54 +08:00
kdletters b62e32946b 修复 cc 反馈回复的 DirectProject 条目冲突
Project CI / AI game creator shell Rust crates (push) Successful in 1m41s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m23s
Project CI / Backend tests (push) Successful in 4m50s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m9s
Project CI / Frontend tests (push) Successful in 2m25s
Project CI / AI game creator shell web tests (push) Successful in 2m29s
Project CI / Native shell tests (push) Successful in 5m59s
Project CI / Repository checks (push) Successful in 3m0s
同一 client turn 的反馈回复冲突时生成独立 assistant item ID

保持相同回复幂等并补充回归测试与排障记录
2026-10-03 13:45:02 +08:00
k88936 d7d09f310c 合并:把 origin/master 并入回合错误重构分支并保留双方行为
- 解决 direct_runtime/mod.rs 冲突:保留本分支 typed 回合错误重构(TurnError/EnqueueError 与 record_direct_codex_failure_facts 拆分),接入 master 的诊断 v3 口径(persist_agent_runtime_error 新签名 + typed error 字段)、prompt 反馈改截断不脱敏、项目写锁改名
- 解决 thread_manager/dispatch.rs 冲突:保留本分支 TurnError/TurnCompletion 换代与 finish_turn_failure 分类层,接住 master 的 tt= 日志改名与 cc 执行器整轮成功后补写 completed 终态
- 解决 direct_tools_mcp.rs 冲突:采用 master 版(本分支唯一改动是 external MCP 容量测试读 body,master 已有等价实现)
- 处理 direct_turn_failure.rs 删除/修改冲突:维持本分支删除,把 completed() 语义迁进 TurnCompletion::Completed 并补回对应测试
- 处理 runtime_driver/entrypoints.rs 修改/删除冲突:接受 master 退役自建 Agent Runtime 的删除(本分支只在该文件做 direct_now_ms 改名)
- 合并 decision-log.md:双方条目都保留
- 修复 auto-merge 漏掉的语义冲突:claude_code_cli.rs 的 direct_now_ms() 改名 now_ms();诊断测试改为断言 AGENT_RUNTIME_ERROR_SCHEMA_VERSION、detail 字段改 message;record_direct_codex_failure_facts 新增 typed_error 入参(TurnError 不序列化,落盘用 classify 投影出的 TurnFailure)
2026-10-03 13:12:10 +08:00
k88936 a8948f27bb 文档:记录回合错误分类层与线程条目脱敏边界
- decision-log 增加 2026-10-03 条目:TurnError::classify / TurnErrorClassified 取代 terminal_failure
- 记录 ThreadManager 不再做字段级脱敏与限长、脱敏搬到前端 directThreadSanitize,失败载荷脱敏保留在 classify
2026-10-03 12:08:25 +08:00
k88936 3aef44c54a 文档:同步错误投影点改名与逐 delta 脱敏退役现状
- ADR 与 decision-log 里的 TurnError::terminal_failure 改成 TurnError::classify
- pitfalls 的「逐 delta 脱敏吃掉段尾换行」补一条现状:Rust 逐 delta 脱敏已退役,脱敏搬到前端 directThreadSanitize
2026-10-03 12:07:42 +08:00
kdletters 25beb3ad59 修复 cc 回复只在重进项目时才可见:补下发 item.completed 事件
Project CI / AI game creator shell Rust crates (push) Successful in 1m16s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 4m50s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m33s
Project CI / Backend tests (push) Successful in 4m1s
Project CI / Frontend tests (push) Successful in 2m31s
Project CI / AI game creator shell web tests (push) Successful in 1m55s
Project CI / Repository checks (push) Successful in 2m49s
Project CI / Native shell tests (push) Successful in 5m9s
- claude_code_cli.rs 在 cc 解析成功、回复落盘之后,用同一个条目 id 下发 ThreadEvent::item_completed(ThreadItem::Message{role:"assistant"}),聊天区按事件流投影即可实时显示本轮回复
- 之前只落盘 project.jsonl、不下发条目事件,用户看到的是"用户气泡 + 本轮结束于 … · 耗时",回复要重进项目才从历史读出来
- pitfalls.md 补记第四条根因与 CDP + DOM 断言验收证据
2026-10-03 11:42:52 +08:00
k88936 c7e51266c8 Merge pull request 'fix/资源编辑错误通道补 typed 错误并把平台失败原文带出' (#589) from fix/res-edit-error-handling into master
Project CI / AI game creator shell Rust crates (push) Successful in 1m56s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m14s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 4m40s
Project CI / Backend tests (push) Successful in 4m37s
Project CI / Frontend tests (push) Successful in 2m27s
Project CI / AI game creator shell web tests (push) Successful in 2m19s
Project CI / Native shell tests (push) Successful in 5m30s
Project CI / Repository checks (push) Successful in 2m52s
Reviewed-on: #589
2026-10-03 11:32:40 +08:00
kdletters 3f0895fa41 修复 cc 回合"模型已回复却报宿主任务提前结束",并放行宿主 MCP 工具
Project CI / AI game creator shell Rust crates (push) Successful in 1m45s
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
- thread_manager/dispatch.rs 在放行成功出口补写 DirectTurnTerminal::completed():cc 执行器没有 codex app-server 那条深层终态出口,否则占用对象兜底会把已拿到回复的回合收成 HostDropped
- direct_turn_failure.rs 新增 completed() 终态(status=completed、无失败载荷)与对应单测
- claude_code_cli.rs 在 cc 解析成功后把回复按 response_item/assistant 落进 .agent/conversations/project.jsonl(id=direct-codex:<clientTurnId>:assistant),落盘失败按回合失败收口
- agent-sidecar 按 mcp__<server> 前缀放行请求声明的 MCP 服务器,避免 dontAsk 模式下宿主工具被直接拒绝
- dispatch.rs 的 host_dropped / panic 诊断字段改用 tt=,不再被日志脱敏整行吃掉(原 turnToken= 命中凭据标记)
- pitfalls.md 记录三条根因、现行口径、诊断口径与 CDP 注入验收证据
2026-10-03 11:28:07 +08:00
k88936 bb446553fd Merge remote-tracking branch 'origin/master' into fix/res-edit-error-handling
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m4s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m9s
Project CI / Backend tests (pull_request) Successful in 4m39s
Project CI / Frontend tests (pull_request) Successful in 2m19s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m20s
Project CI / Repository checks (pull_request) Successful in 3m2s
Project CI / Native shell tests (pull_request) Successful in 5m37s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-03 11:21:20 +08:00
k88936 0ae94caf16 修复:更早历史的世代号在渲染期推进,切换项目的守卫不等 effect
- 换项目时 historyLoadTokenRef 与 projectPathRef 同一处推进,复位 effect 不再推进
- 旧读取在「切换提交完成、复位 effect 未跑」的窗口落地时立刻失效,不再合并条目或写游标
- ADR 第 1 条与决策记录说明推进时机与其安全性依据(该窗口内不会新起带旧游标的读取)

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 22:27:33 +08:00
k88936 2b01476891 修复:动画期间内容变高时把回到底部动画重新对准新底部
- 程序化平滑滚动期间布局补偿不再直接跳过:内容变高时以新的 scrollHeight 重发平滑滚动
- 避免动画停在旧目标后 programmaticScrollRef 等不到贴底事件、跟随与补偿整段挂起
- hook 用例断言动画目标从 [1200] 变为 [1200,1500] 且仍能交还控制权
- ADR 第 3 条补一条口径,决策记录补齐本条与错误行结构两条

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 22:25:47 +08:00
k88936 c0ad48798f Merge remote-tracking branch 'origin/master' into fix/res-edit-error-handling
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m1s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m51s
Project CI / Backend tests (pull_request) Successful in 4m43s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m48s
Project CI / Frontend tests (pull_request) Successful in 2m19s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m26s
Project CI / Repository checks (pull_request) Successful in 2m53s
Project CI / Native shell tests (pull_request) Successful in 6m5s
2026-10-02 22:21:24 +08:00
k88936 9a75ea57f0 修复两处过期用例并补记 Direct 失败载荷改名与透传口径
- 修复 direct_tools_mcp 容量用例:handler 已改为返回 Response,改为取出 body 后再断言 JSON-RPC id
- 修复 direct_runtime 命令边界诊断用例:改为断言结构化 sidecar(schemaVersion/source/stage/code/clientTurnId/detail),不再断言早已不落盘的 direct-codex-failure:v2 文案
- AGC 命令错误 ADR 补记 TurnFailure 两个字符串债臂的命名与“terminal_failure 是唯一投影点、不许重包”口径
- 决策记录新增 2026-10-02 条目:两臂改名(SuperErrorFromStringPlusStage / Unclassified)与 typed 失败原样下发
- 排查记录补充:cargo test 过滤是子串匹配,会连带命中 export_bindings 并重写生成目录,用 --skip export_bindings 避开
2026-10-02 22:19:36 +08:00
k88936 ff88ad9210 Merge remote-tracking branch 'origin/master' into feat/smoother-dialog-history
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m39s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 3m41s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m25s
Project CI / Backend tests (pull_request) Successful in 4m46s
Project CI / Frontend tests (pull_request) Successful in 2m30s
Project CI / Repository checks (pull_request) Successful in 2m58s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m14s
Project CI / Native shell tests (pull_request) Successful in 5m37s
2026-10-02 20:19:53 +08:00
k88936 14afd21d7e 资源编辑错误文案只认平台 error 原文,phaseDetail 只进诊断
RemoteResourceEditFailure / ResourceEditError 的 to_user_msg 只回平台 error 原文,平台没给时回「服务器未返回错误信息」
typed 错误新增 phaseDetail 字段,只随诊断 sidecar 序列化,不参与用户文案
远端轮询 failed 分支同时读取 error 与 phaseDetail
删除断言 to_user_msg 字面量的单测,只保留 typed 字段原样序列化进诊断的结构断言
canvas_generation 远端 failed 分支不再拿 phaseDetail 当用户文案
同步 decision-log 与 pitfalls
2026-10-02 20:16:47 +08:00
k88936 9f7c2e318c 文档:前插锚点改用稳定块身份
锚点契约从「回合 key + 块序号 + 偏移」改为「回合 key + 块身份(data-block-key)+ 偏移」,写明 running→finished 收口后块序号整体后移、序号锚点会解析到隔壁块的原因。

补记锚点块没有布局盒(被折进收起的 details)时读锚点跳过、还原判失败并放弃这次补偿的规则。

备选方案补记被否掉的「锚点存块序号」与「改找同回合其它可见块」,验收清单补「长回合收口时视口不跳」。

决策记录同步同一条决策与测试口径。

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 20:12:35 +08:00
k88936 a589dad003 文档:同步 review 修正后的会话滚动契约
- ADR 第 1 条补「一次加载与它所属的世代绑定」,第 2 条补块集合缓存与失效信号
- 决策记录追加两处内部缺陷的症状、修正与验证口径

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 19:59:34 +08:00
kdletters db0332ea09 把 AGC 的 cc 执行器与本机 Claude Code 配置彻底隔离
Project CI / AI game creator shell Rust crates (push) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m14s
Project CI / Backend tests (push) Successful in 4m38s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m23s
Project CI / Frontend tests (push) Successful in 2m8s
Project CI / Native shell tests (push) Successful in 6m11s
Project CI / Repository checks (push) Successful in 3m15s
Project CI / AI game creator shell web tests (push) Successful in 2m34s
- sidecar 子进程把 HOME、USERPROFILE、CLAUDE_CONFIG_DIR 全部指向项目内隔离目录,不再读用户自己的 ~/.claude.json(个人 MCP、插件市场、凭据),也不再往真实 profile 写 projects / sessions
- requestTimeoutMs 在 cc 执行器里改为静默预算:sidecar 每有一条事件就重置,连续静默超预算才按 sidecar-turn-timeout 收口
- 新增 CLAUDE_CODE_TURN_MAX_DURATION(45 分钟)兜底事件流假活,正常情况更早到的是 DirectProject 的 maxTurnSeconds
- claude_route 诊断行改成 source / host / auth,避开日志脱敏标记(原 credential=bearer 会被整行替换)
- 新增 sidecar 环境隔离单测:USERPROFILE / CLAUDE_CONFIG_DIR 指向隔离目录,且不下发本机 ANTHROPIC_*
- pitfalls.md 记录配置隔离、静默超时语义与脱敏标记的坑
2026-10-02 19:54:13 +08:00
kdletters c5673c5757 修复 AGC 的 cc 路由被本机 ANTHROPIC_* 环境顶掉
- claude_code_cli.rs 用 claude_code_route 统一决定 cc 的 baseUrl 与凭据:平台会话 > 自定义端点 > 配置 key,本机 ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN / ANTHROPIC_API_KEY 完全不再参与
- 未登录且没配 key 时由 game_creator_claude_code_cli_route_error 明确报「cc 模式需要先登录陶泥儿账号」,不再静默回落到用户个人中转
- 不再把 ANTHROPIC_API_KEY、ANTHROPIC_AUTH_TOKEN 放进 sidecar 的 copy_env 白名单,凭据只由解析出的路由下发
- 新增 agent.direct_codex.claude_route 诊断行(source / host / credential),只写主机名,不带路径与凭据
- 新增 claude_code_cli 路由单测:平台优先、自定义端点用 x-api-key、未登录不回落本机环境、baseUrl /v1 归一化、主机名诊断
- pitfalls.md 记录本次「官方模型全被发到用户个人中转」的根因、现行口径与排查手段
2026-10-02 19:30:59 +08:00
k88936 d62afe3275 图片生成远端失败不再兜底一句重复的「生成任务失败」
- canvas_generation 轮询到 status=failed 时,平台既没给 error 也没给 phaseDetail 的兜底由「生成任务失败」改为「服务器未返回错误信息」,不再和句首「平台图片生成任务失败:」重复
- decision-log 追加同类兜底决策,说明这条与资源编辑同属「缺省时要说清是服务器没给信息,而不是再喊一次失败」
2026-10-02 19:30:03 +08:00
k88936 a932c9635e 资源编辑 typed 错误只给事实,前缀交给使用方
- ResourceEditError::to_user_msg 不再拼「资源编辑生成失败」:远端终态只回平台 error 原文,平台没给时统一说「服务器未返回错误信息」
- 桌面命令面 derive/resume_local_project_resource 自己补「资源编辑生成失败:」前缀,桌面 UI 文案不变,前缀落在它真正的使用者这一层
- 单测:typed 错误断言原文逐字透传与缺省兜底;抠图远端失败测试同口径更新
- decision-log 追加「前缀归属」决策(工具面各用各的前缀、桌面面用资源编辑生成失败、叶子错误不写死总结),pitfalls 同步口径
2026-10-02 19:29:49 +08:00
k88936 97e8f1b652 Merge remote-tracking branch 'origin/master' into feat/smoother-dialog-history
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m50s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m30s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m51s
Project CI / Backend tests (pull_request) Successful in 4m53s
Project CI / Frontend tests (pull_request) Successful in 2m33s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m27s
Project CI / Native shell tests (pull_request) Successful in 5m47s
Project CI / Repository checks (pull_request) Successful in 3m4s
2026-10-02 19:20:53 +08:00
k88936 95a32a316f 文档:换会话时复位 DirectProject 滚动所有权
- ADR 新增第 6 条:会话身份作为显式信号复位跟随最新/锚点/胶囊状态,并记录「key 重建列表」的取舍
- 决策记录追加换会话复位的症状、决策与验证口径

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 19:08:54 +08:00
k88936 d2a5bceaba 资源编辑远端失败原文透传到工具错误与诊断
Project CI / Backend tests (pull_request) Failing after 29s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m48s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 3m54s
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m28s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m55s
Project CI / Native shell tests (pull_request) Successful in 6m48s
- agent/tool/error.rs 新增共用载体 RemoteResourceEditFailure { serverMessage },两个工具的平台失败文案只写一份
- CreateOrDeriveResourceError 与 RemoveBackgroundError 各加 RemoteGenerationFailed(RemoteResourceEditFailure) 变体,远端终态失败不再压回字符串
- 两个工具各加显式 from_resource_edit_error 翻译,不用 impl From<ResourceEditError>;Other 仍落回各工具原有的「失败:<文案>」变体并留 TODO
- 桥里四个资源编辑调用点改用 typed 入口,并 Box::pin 后再 await:资源编辑 future 内联会顶穿 handle_direct_tool_bridge 状态机的调试测试线程栈
- assets.rs 新增 with_direct_editor_api_credentials_as,保留调用方 error 类型,凭据解析失败由调用方显式翻译成 ResourceEditError::Other,旧名与其余调用点零改动
- 工具错误模块补单测:平台原文进 message、进序列化的 typed 错误,无原文与未分类失败各自的文案
- decision-log 补工具层承载、凭据作用域错误类型、future 装箱三条决策与真实验证结果;pitfalls 补工具层原样透传口径
2026-10-02 18:43:07 +08:00
k88936 e82070098c 文档:修订 DirectProject 对话滚动契约
- 补充程序化平滑滚动独占滚动位置的规则:动画期间滚动事件与布局补偿都不得写 scrollTop
- 补充折叠展开「刚好露出新展开正文」的最小位移规则,并明确收起不额外滚动
- 决策记录追加两个真机缺陷的根因、修正与 Chromium 复验结论

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 18:18:20 +08:00
k88936 c18c73fa2f 文档:记录 DirectProject 回合错误命名化、wire 拆分与终态判别联合
- AGC 命令错误 ADR:三条错误表补 DirectProject 现有命名(TurnError / TurnFailure / EnqueueError),并写明"回合终态 TurnCompletion 是宿主内部判别联合,不导出、不进 wire"
- 决策记录新增 2026-10-02 条目:命名去冗余前缀、wire.rs 按职责拆分、宿主终态改判别联合与 TurnCompletion 的落点
2026-10-02 18:10:54 +08:00
k88936 5092412d89 文档:同步 DirectProject 对话滚动契约与旧口径
- ADR 修正样式删除口径:.message-history-more 因策划对话仍在用而保留,后续项一并说明
- 历史技术方案去掉「必须显示显示更早的对话按钮」的过期要求,改为引用新 ADR 的入口形态
- 决策记录新增本次滚动契约、边界与验证口径

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 17:54:15 +08:00
k88936 ccff6cdceb 记录资源编辑远端失败要带出平台原因的设计决策
- decision-log 新增 2026-10-02 条目:ResourceEditError 造型、不用 blanket From、不按 terminal_failure_code 分支、前缀去留、原文边界、Other 命名与 error.rs 落点
- 条目里写清 terminal_failure_code 的清理前置条件:字段无 skip_serializing_if 且账本是 deny_unknown_fields,清掉会影响每个已落盘账本
- pitfalls「远端资源编辑终态必须指出唯一出口」补上处理与验证口径:轮询终态把平台 error 原文装进 typed 错误带出、不再压成一句,断言同时要求原文进文案且不进账本
2026-10-02 17:50:00 +08:00
k88936 4246052bff 合并 origin/master 到 feat/typed-tool-error
- 取 master 退役 DirectProject 工具调用与回合流账本(#560):删除 direct_tool_calls / direct_turn_stream,direct_events 的回合更新收敛为状态与活动,不再广播 game-creator-direct-turn-update
- 取 master 修复 AGC 文件列举被无关临时锁删除打断(#552)与素材导入 / 资源提交项目锁争用(#581)
- 保留本分支 typed 工具错误口径:逐工具错误枚举、派发边界携带原始 error、工具返回不再软失败
- 保留本分支退役 AGC 独立 Agent Runtime / CLI 执行面的删除,继续删掉 master 侧 runtime_actions 等测试与入口
- 补齐 master 新增的 with_conversation_write_contention 测试助手,项目写锁调用统一为 acquire_project_write_lock_with_wait
- 账户素材分页 offset 上限 500 的 schema、预检与行为对齐,越界 offset 返回 typed 错误并适配相关用例
- 错误事件结构体 message 保留调用方原文,脱敏只发生在落盘与应用日志边界
2026-10-02 16:18:50 +08:00
k88936 839051f532 退役AGC独立Agent Runtime与CLI执行面
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 1m50s
Project CI / Backend tests (pull_request) Failing after 24s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m47s
Project CI / Repository checks (pull_request) Failing after 21s
Project CI / Frontend tests (pull_request) Successful in 2m38s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m41s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m23s
Project CI / Native shell tests (pull_request) Successful in 6m20s
- 删除 agent/runtime_driver、runtime_protocol、runtime_tools、runtime_actions、runtime_state、runtime_adapter、context_compaction、collaboration、delegation、goal 等自建 Runtime 执行面及专属测试与 fixture
- CliCommand 收敛为 LlmStatus | EnvironmentCheck | PreviewServe,删除 --agent-run / --agent-task / --agent-goal-* / --agent-resume / --agent-context-compact 等 CLI 与 Tauri 命令白名单条目
- 外部 Runner 收缩为编辑器桥 RPC 与 runner.attach_gui_owner + GUI owner 参与锁 / watchdog,保留 --agent-runner
- 前端删除 AgentRuntime* / AgentGoal* 状态与命令调用链,移除 agent-runtime real-e2e / steer / smoke / llm-transient-fault 脚本与对应 CI job
- 内置工具错误收口为 typed error,抽取 agent/tool/error.rs 共享错误供各工具复用
- 新增 agent/redaction.rs、runtime_models.rs、json_sidecar.rs、task_lock.rs、process_identity.rs、art_manifest.rs、design_session.rs、direct_events.rs
- 同步更新 ADR、decision-log、Runtime V1.1、App 实施计划、本地开发运维、pitfalls 与 CI 脚本
2026-10-02 15:23:12 +08:00
k88936 a9ecc3806d 文档清理已退役的 toolOutputTokenLimit 配置残留
- 删除 Runtime V1.1 文档中对 toolOutputTokenLimit 的对标、默认配置、observation 收紧与 MCP sidecar 绑定四处引用
- MCP 结果 sidecar 与模型 observation 描述改为不再依赖该已删字段
- 同步修正 decision-log 该配置项,只保留仍存在的 contextWindowTokens / autoCompactTokenLimit
2026-10-02 15:14:04 +08:00
k88936 264b99914f Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m59s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 2m9s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 3m6s
Project CI / Frontend tests (pull_request) Successful in 3m31s
Project CI / Repository checks (pull_request) Successful in 3m34s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m57s
Project CI / Backend tests (pull_request) Successful in 6m48s
Project CI / Native shell tests (pull_request) Successful in 7m29s
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 15:01:38 +08:00
k88936 29a21f480c Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m47s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m35s
Project CI / Backend tests (pull_request) Successful in 5m5s
Project CI / Native shell tests (pull_request) Successful in 6m7s
Project CI / Frontend tests (pull_request) Successful in 2m19s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m55s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m55s
Project CI / Repository checks (pull_request) Successful in 2m32s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 12m54s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 14:36:32 +08:00
suzmii ad4884c808 合并 master 最新变更
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 14:22:25 +08:00
k88936 50925d96eb 统一 AGC launcher 页面高度,修复帮助页底部被裁
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 2m29s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 2m31s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 3m2s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m49s
Project CI / Backend tests (pull_request) Failing after 19s
Project CI / Repository checks (pull_request) Failing after 30s
Project CI / Frontend tests (pull_request) Successful in 3m16s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m37s
Project CI / Native shell tests (pull_request) Failing after 5m2s
- styles.css:新增页面高度契约,.launcher-main 改纵向 flex 列、页面根节点 flex: 1 1 auto,帮助页自带滚动
- src/view/home/index.tsx:首页根节点去掉 h-screen 与 h-[calc(100vh-32px)],改用外壳分配高度的钩子类
- src/view/template-library/index.tsx:模板库去掉 JS 量父级高度与内联 height,改用外壳分配高度的钩子类
- decision-log.md、pitfalls.md:记录页面高度契约与自绘标题栏里自己算 100vh 的排障口径

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 13:57:45 +08:00
k88936 f756b52d8c Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 2m23s
Project CI / Backend tests (pull_request) Failing after 19s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 1m48s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 2m14s
Project CI / Repository checks (pull_request) Failing after 36s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m49s
Project CI / Frontend tests (pull_request) Successful in 4m7s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m41s
Project CI / Native shell tests (pull_request) Failing after 5m46s
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 13:56:47 +08:00
suzmii 8433334af5 合并 master 最新变更
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m57s
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m35s
Project CI / Frontend tests (pull_request) Successful in 2m16s
Project CI / Repository checks (pull_request) Failing after 18s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m34s
Project CI / Native shell tests (pull_request) Successful in 6m45s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 14m9s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 14m23s
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 13:52:07 +08:00
k88936 a512786996 读body失败保留已确认状态码
- auth_session:拿到 status 后 response.text() 失败不再一律报网络不可达;非 2xx 按状态码走既有分类(serverMessage 为 None,如 503 → authServiceUnavailable),只有 2xx 响应没收完才归传输层故障
- 抽出 classify_unreadable_body 并补单测(503 / 会话 401 / 400 / 2xx)
- 决策记录追加该口径
2026-10-02 13:47:03 +08:00
k88936 836f8a7348 手机号登录401归phoneCodeLoginRejected
- auth_session:/api/auth/phone/login 的 401(只来自「用户不存在」)改判为 phoneCodeLoginRejected{serverMessage},不再冒充「验证码错误或过期」
- auth_error:退役顶层变体 smsCodeRejected(唯一产生点就是这个错配的 401 分支)
- 前端三个 catch 删掉 smsCodeRejected 分支;phoneCodeLoginRejected 文案统一为「验证码登录失败:<服务端原文>」,冒号改全角
- ts-rs 重新生成 ClientAuthError 联合;carrier 用例同步删掉 smsCodeRejected
- 文档:ADR + decision-log 记录 401 归属与 smsCodeRejected 退役
2026-10-02 13:35:40 +08:00
kdletters e3b4127440 统一 AGC 失败兜底口径:兜底只用专用错误码与专用文案
Project CI / AI game creator shell Rust crates (push) Successful in 1m52s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m47s
Project CI / Backend tests (push) Failing after 4m0s
Project CI / Frontend tests (push) Successful in 1m59s
Project CI / Native shell tests (push) Successful in 6m19s
Project CI / Repository checks (push) Successful in 2m43s
Project CI / AI game creator shell web tests (push) Successful in 1m47s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 11m5s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 11m19s
新增 homeCreationFailure 统一创建失败出口:宿主机器码 / IPC 失联 / 专用未分类兜底三种文案,宿主原始文本改为 appendWebviewLog 落 application.log 而不上屏
首页创建失败不再无条件覆盖成「创建未完成,请重试」,也不再写死「首条需求投递失败」指认某一步;工作区已建好时保留该事实并提供「已创建的工作区」恢复说法
宿主预检按真实原因分流浏览器验证错误码(browser-missing / launch-timeout / launch-failed / cancelled / browser-cleanup-failed / browser-environment-failed / evidence-failed / input-invalid / page-check-failed),未识别落回专用 web-preflight-unclassified
依赖准备收据保留宿主返回的真实失败码,不再一律写成 web-scaffold-preparation-failed
直连回合失败分类器 else 改为专用 runtime-unclassified,并补 sidecar-turn-timeout / sidecar-launch-failed / app-server-launch-failed / claude-code-failed 四个有证据的具体码
Codex CLI 与 Claude sidecar 的进程启动失败保留真实 OS 错误,不再报成「不支持 app-server 子命令」或「Node runtime 不可用」
更新检查新增结果型入口 checkForAppUpdateResult,「关于」页检查失败显示真实原因而不是「当前已是最新版本」
首页无码预检兜底文案不再写「请检查 Node/npm 或浏览器」这类未证实的候选原因
同步 pitfalls 六条与团队约定:兜底码/兜底文案规则、五项修复的现象根因处理验证、测试夹具编译修复记录
验证:vitest homeCreationFailure/homeWebPreflight/appUpdate/appSurface 共 215 passed;cargo test environment_check:: 19 passed、agent::runtime_error:: 5 passed、direct_failure_diagnostic 4 passed、tests::configuration:: 45 passed;cargo fmt --check、tsc --noEmit、npm run typecheck、check:encoding、git diff --check 通过
2026-10-02 13:07:00 +08:00
lhk229 98cb0d237e 修复固定试玩误判祖先指针穿透样式(#547) (#583)
Project CI / AI game creator shell Rust crates (push) Failing after 1m30s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 2m8s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m18s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 3m38s
Project CI / Frontend tests (push) Successful in 2m58s
Project CI / Backend tests (push) Failing after 4m26s
Project CI / Repository checks (push) Successful in 3m4s
Project CI / AI game creator shell web tests (push) Successful in 1m47s
Project CI / Native shell tests (push) Successful in 6m21s
关联 #547。

固定试玩将任意祖先的 `pointer-events:none` 累计为按钮禁用,导致覆盖层穿透、按钮恢复 `auto` 的合法布局在实际点击前被拒绝。现在只检查目标控件自身的计算样式;未覆盖的继承 `none` 仍拒绝,原有命中、可见性、disabled、aria-disabled、inert 和真实输入校验保持有效。

复用现有浏览器夹具,补充双视口穿透布局回归及九种不可用控件拒绝场景,并同步场景指纹快照、技术方案和共享排障记录。

验证:
- 修复前真实 Chrome 在 desktop/mobile 均复现 start 被误判 disabled;修复后合法布局完整通过开始、主要操作和重开,sequence 从 0 到 3、最终 phase 为 ready。
- 浏览器模块单元测试:27 passed;14 个真实浏览器测试默认 ignored,其中本次显式执行并通过 4 个相关用例(新增 2 个,已有 2 个)。新增拒绝用例在双视口覆盖继承 none、目标 none、目标 none/子元素 auto、disabled、禁用 fieldset、aria-disabled、inert、隐藏和遮挡。
- rustfmt、编码检查、文档索引检查、git diff --check 通过;完成独立代码审查。

验证边界:未运行全量测试;当前工作区未找到现场游戏导出,尚未复核该游戏开始流程。generic 的 mobile 结果为移动视口下的真实鼠标输入,未进行真实触摸验收。

Reviewed-on: #583
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-02 12:56:55 +08:00
k88936 e4b15d3bbf Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m25s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 53s
Project CI / Backend tests (pull_request) Failing after 21s
Project CI / Frontend tests (pull_request) Successful in 2m25s
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m45s
Project CI / Native shell tests (pull_request) Successful in 5m48s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 11m18s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 12:19:13 +08:00
k88936 d518bb2ceb 文档:系统类失败载荷保留原始错误
- 命令错误结构化 ADR:本机 IO / 网络客户端构建失败的原始 detail 留在载荷(调用方分流与报告诊断用),界面只用固定文案,路径交给报告侧 sanitize
- 认证失败 JS 侧载体 ADR:带 detail 的本机失败是例外,不把原始错误文本贴到界面上
- 决策记录:追加 2026-10-02 口径,取代上一轮"本机 IO 失败不进载荷"
2026-10-02 12:06:03 +08:00
k88936 8edbab9f3e 文档:本机IO失败去掉detail载荷
- 命令错误结构化 ADR:本机凭据/运行时会话 IO 失败不再把原始错误文本放进载荷,原始 error 只写本地日志
- 认证失败 JS 侧载体 ADR 与决策记录同步去掉 detail 口径,并追加 2026-10-02 的变体改无字段决定
2026-10-02 11:51:43 +08:00
k88936 f8c32e6346 文档:登录路由429归业务变体
- 命令错误结构化 ADR 补 429 按路由判定的口径:发码是频控、登录是验证码次数耗尽、其余才落未识别拒绝
- 决策记录同步追加 2026-10-02 的 429 归类
2026-10-02 11:50:34 +08:00
k88936 62f1a80e87 文档:认证失败载体把载荷序列化进message
- 更新 JS 侧载体 ADR:ClientAuthErrorWrapper 构造时把整份载荷 JSON.stringify 进 Error.message,上报事件拿到变体名与载荷,事件指纹按变体区分
- 记录 Tauri 缺陷抛真 Error 时序列化只有 {},但上报链路对真 Error 优先用其自身 message/stack
- 同步决策记录与技术方案的载体口径,不再写 Error.message 留空
2026-10-02 11:07:03 +08:00
lhk229 f2127a6489 修复 AGC 文件列举被无关临时锁删除打断(#552) (#580)
Project CI / AI game creator shell Rust smoke (push) Successful in 2m6s
Project CI / AI game creator shell Rust crates (push) Successful in 1m10s
Project CI / Backend tests (push) Successful in 4m15s
Project CI / Native shell tests (push) Successful in 6m43s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 11m2s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 10m12s
Project CI / AI game creator shell web tests (push) Successful in 2m23s
Project CI / Repository checks (push) Successful in 3m14s
列举 `assets` 时,原实现先递归扫描整个项目,再过滤范围;`.agent/project.lock` 在枚举与读取元数据之间正常删除会使整次查询失败。

现在在读取条目元数据前裁剪目标范围与受保护路径,只遍历目标子树及必要祖先。枚举后消失的文件/目录仅跳过 `NotFound`,其余权限与 IO 错误仍返回;进入排队目录前复核符号链接与 Windows 重解析点。通用文件树保留原有可见范围,Agent 结果继续过滤、排序后分页。

通过通道协调真实项目写锁释放,确定性覆盖全量扫描的 TOCTOU 及定向 `assets` 扫描;另覆盖目录消失/类型变化、权限错误、私有路径、链接、引擎目录和分页。同步更新 AGC 契约与共享排障记录。

验证:

- 15 条定向 Rust 测试通过:`cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell -- --test-threads=1 project_file_listing generic_file_tools local_project_file_commands external_listing`
- 生产 Rust 检查通过:`cargo check --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell`
- `npm run check:encoding`、`npm run check:doc-index`、`git diff --check` 通过。
- 本地验证在 Linux 执行,未运行 Windows 专属运行时验证;分页仍是实时观察,不承诺跨请求快照一致性。

Fixes #552

Reviewed-on: #580
2026-10-02 10:55:47 +08:00
lhk229 89d40c0836 修复素材导入与资源提交的项目锁争用 (#581)
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
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
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
修复 #551:本地素材导入、账户素材提交和资源编辑提交在 conversation.write 短暂持有项目锁时会立即失败。现在复用既有约 10 秒有界等待,并将同步取锁与提交放入阻塞线程池,等待期间异步 runtime 继续响应。

- 项目锁先于账号身份租约,等待后重新验证账号身份、导入权限及原 WritePermit;保留跨进程互斥、权限分类和持锁方诊断。
- 资源资产/版本提交和已完成结果清理保留 operation/project guard,取消异步等待不会提前释放仍在执行的提交互斥。超时保留原 operation、幂等键与 staging,恢复不重复远端生成。
- Runtime 素材导入与 UI workflow 切图登记也接入阻塞池,避免共享导入函数新增等待后阻塞这些调用方。同步更新 AGC 行为规范及共享记忆。

验证:163 项 Rust 定向测试通过,覆盖导入与资源编辑、Direct bridge、Runtime 导入、UI workflow、项目锁恢复和失败分类。包含同进程争用、单线程 runtime 心跳、并行 manifest/revision、账号切换、许可取消、完整超时后原 operation 恢复及取消后的 guard 生命周期。

```sh
cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell -- resource_editor:: commands::agent_asset_import_tests agent::direct_tool_bridge::tests tests::project_lock_recovery project::write_lock agent::runtime_tools::context::asset_import_input_tests ui_editor::agent_tools --test-threads=1
npm run check:rustfmt
npm run check:encoding
npm run check:doc-index
git diff --check
```

全部上述检查通过。Linux 本地未执行 Windows 专属删除挂起行为测试;未调用真实付费 Provider,远端链路使用既有 mock 测试和已下载账本恢复测试验证。没有 API/DTO/schema 变更或数据迁移。

Closes #551

Reviewed-on: #581
Co-authored-by: lhk <ink29535@proton.me>
Co-committed-by: lhk <ink29535@proton.me>
2026-10-02 10:55:29 +08:00