修复 AGC 统一错误诊断与素材验收 (#376)
Project CI / AI game creator shell Rust shard 1/4 (push) Failing after 4m49s
Project CI / AI game creator shell Rust shard 2/4 (push) Failing after 5m9s
Project CI / AI game creator shell Rust shard 3/4 (push) Failing after 4m34s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m1s
Project CI / AI game creator shell Rust shard 4/4 (push) Failing after 4m20s
Project CI / AI game creator shell Rust crates (push) Successful in 2m27s
Project CI / Native shell tests (push) Failing after 2m36s
Project CI / AI game creator shell web tests (push) Failing after 47s
Project CI / Frontend tests (push) Successful in 4m23s
Project CI / Repository checks (push) Failing after 3m14s
Project CI / Backend tests (push) Successful in 7m17s
Project CI / AI game creator shell Rust shard 1/4 (push) Failing after 4m49s
Project CI / AI game creator shell Rust shard 2/4 (push) Failing after 5m9s
Project CI / AI game creator shell Rust shard 3/4 (push) Failing after 4m34s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m1s
Project CI / AI game creator shell Rust shard 4/4 (push) Failing after 4m20s
Project CI / AI game creator shell Rust crates (push) Successful in 2m27s
Project CI / Native shell tests (push) Failing after 2m36s
Project CI / AI game creator shell web tests (push) Failing after 47s
Project CI / Frontend tests (push) Successful in 4m23s
Project CI / Repository checks (push) Failing after 3m14s
Project CI / Backend tests (push) Successful in 7m17s
## 变更内容 - 新增统一 Agent Runtime 错误事件和项目内诊断 sidecar,统一 DirectProject、Agent Runtime、app-server 与 AGC 工具桥的失败记录。 - 失败回执写回 DirectProject 对话历史,下一轮可读取上一轮失败证据;前端支持读取脱敏诊断详情。 - 区分 app-server 终态、空闲/硬超时、工具参数错误和试玩次数越界。 - 素材完成门扫描实际 npm 源码模块,并识别 manifest 中合法的自定义登记素材路径。 - 更新 AGC 技术规范、项目决策记录、里程碑和实施计划。 ## 验证 - cargo check --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --tests - 统一错误测试 6/6 通过 - DirectProject 失败诊断测试 4/4 通过 - npm 场景模块素材引用回归测试通过 - npm run --prefix apps/ai-game-creator-shell typecheck - npm run check:encoding - npm run check:doc-index - git diff --check、Rust 格式检查 真实 Provider / 安装包 smoke 尚未在本 PR 中运行。 --------- Co-authored-by: Git Hooks Test <git-hooks-test@example.invalid> Reviewed-on: #376
This commit was merged in pull request #376.
This commit is contained in:
@@ -1379,3 +1379,15 @@ DirectProject 使用 `approvalPolicy=never`,避免每次原生调用再经过
|
||||
## 2026-09-14 新游戏策划到真实美术接入的连续交付
|
||||
|
||||
DirectProject 在收到完整游戏策划或游戏制作请求后,必须把视觉素材作为同一交付链路处理:先读取当前项目已登记资源;策划案包含角色、对象、背景、特效、界面或其它视觉实体且现有资源不满足时,Codex 必须在同一游戏实现任务中调用审核的 `agc_tools` 生图或编辑工具,读取返回的资源身份与相对路径,把真实产物接入游戏源码,再构建并验证实际渲染。生成了素材但源码仍使用 emoji、CSS 形状或临时占位图替代策划要求的视觉元素,不能报告游戏完成。只有策划明确不需要视觉素材,或现有已登记素材完全满足需求时,才允许跳过生图;图片生成、处理、登记和接入不因用户没有重复输入“生图”而降级为可选建议。
|
||||
|
||||
## 2026-09-15 AGC 统一错误事件、诊断落库与验收反馈
|
||||
|
||||
DirectProject、Agent Runtime、Provider、app-server、内置 MCP、命令执行、构建和浏览器试玩的失败必须先转换为统一的 `AgentRuntimeErrorEvent`,再分别投影到用户消息、运行面板和项目诊断文件;业务模块不得自行拼接只有一句“执行失败”的终态文案。统一事件至少包含 `schemaVersion / eventId / clientTurnId / source / stage / code / retryable / occurredAt / elapsedMs / publicText / recoveryHint / detailRef`,其中 `publicText` 是脱敏后的可行动摘要,`detailRef` 指向项目内有界诊断记录;Token、Cookie、URL/query、私钥、宿主绝对路径、原始请求正文和未脱敏 stderr 不得进入对话或用户可见文本。
|
||||
|
||||
项目内统一落库目录为 `.agent/runtime/errors/`,事件记录采用幂等 JSONL 或 JSON sidecar;写入失败不能覆盖原始业务错误,但必须在事件中标记 `persistenceFailed`。DirectProject 对话历史必须持久化本轮用户消息、终态错误的安全 assistant 投影和诊断引用,使下一轮能够读取上一轮失败证据。前端只展示 `publicText`,点击详情后按 `detailRef` 读取有界、脱敏的诊断,不直接展示私有 `detail`。
|
||||
|
||||
`turn/completed` 等待超时必须区分 `idle-timeout`、`hard-timeout`、`transport-closed`、`failed-turn`、`invalid-terminal` 和 `tool-error`;收到内置工具参数错误后必须结束当前工具调用并进入可行动终态,不能继续使用越界的试玩 `attempt` 或无限等待。试玩次数由客户端按当前 `clientTurnId` 持久化分配,模型不能自由递增;超过上限必须返回一次终态并停止回合。
|
||||
|
||||
游戏素材完成门必须扫描实际参与构建的 `game/` 源码模块,读取 manifest 的登记身份与相对路径,并把构建后的 URL 映射回登记身份。固定素材路径只能作为兼容候选,不能作为唯一准入。已登记且被真实源码引用、被构建纳入并在浏览器证据中观察到的资源通过;未登记、来源不匹配或只存在于设计规范中的资源继续失败关闭。
|
||||
|
||||
验收至少覆盖:普通错误、结构化 app-server failed turn、idle/hard timeout、MCP 参数错误、历史落库失败、脱敏边界、下一轮诊断上下文、源码子模块素材引用、Vite 构建 URL 映射以及试玩次数上限。统一错误事件和诊断落库先于 UI 美化或增加重试预算;不能用延长超时、删除完成门或把失败投影为成功来规避问题。
|
||||
|
||||
Reference in New Issue
Block a user