修复子 Agent 澄清回执中转
Project CI / Repository checks (pull_request) Successful in 1m3s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / Backend tests (pull_request) Successful in 3m56s
Project CI / Native shell tests (pull_request) Failing after 11m22s

补齐 completed child 最终澄清回执的真实解析路径

将用户回答与原 delivery 持久绑定并校验 continuation 指纹

扩展 agent.delegate 原生 schema 并由 Runtime 派生稳定 continuation 身份

按原 delivery 逐一提问并支持自主构建重启恢复

补充端到端状态机测试和权威文档
This commit is contained in:
2026-08-12 17:51:02 +08:00
parent 5e16837f3d
commit 4be14df443
19 changed files with 1053 additions and 26 deletions
@@ -1,5 +1,13 @@
# AI 游戏创作智能体 App 实施计划
## 2026-08-12 Issue #163:子 Agent 澄清回执中转
正式用户对话 Agent 仍固定为 `project-supervisor`;委派专业 Agent 和隔离 child 不得直接调用 `user.input_request`。当 child 缺少会实质改变结果的用户事实时,child 以短小的 `AGC_NEEDS_USER_INPUT_V1` + 结构化 JSON 终态回执交付问题,Runtime 将其作为 `needs-user-input` delivery,而不是 `needs-repair`
Supervisor 认领该回执后,由父 run 自己为每个原 delivery 逐一创建 durable `user.input_request` pending action,并将原 `delegationId`、问题数量和 `questionsSha256` 放入父任务上下文;不同 child 的问题不得展平到同一请求。Runner 重启、重复 delivery 或重复 wake 只复用当前 delivery 的同一 pending action,不把 child 的 pending action 暴露给用户。用户回答仍走现有 Supervisor same-run continuation;回答 observation 绑定 `requestId``responseId`、问题 / 答案指纹,并把 `requestId / answersSha256` 原子写回原 delivery。答案收齐后,Supervisor 最多创建一次绑定原 `delegationId` 的 continuation child`agent.delegate` 必须提交 `continuationOfDelegationId / questionsSha256 / answersSha256`Runtime 自动派生稳定 continuation identity,不依赖已清理的 pending action,也不得按单个答案重复创建 child。
问题 envelope、问题数量、字段长度和 SHA 校验均 fail-closed;问题正文只在受保护的 Runtime sidecar / 父 run 上下文中流转,不写入公共审计。若合并后的问题超过用户输入上限,Runtime 停止自动提问并进入 reconciliation,等待人工核对。
## 目标
在 Genarrative 内建设独立桌面 App:普通用户通过项目开发工作台中的陶泥儿对话、资源画布、运行状态和确认操作,让平台生成保存在本地的可运行 Web 游戏原型,并通过本地 HTTP server 预览;主窗口提供运行时配置入口,用于保存发布版 AppData / Tauri 配置目录里的 LLM 配置及受控开发者 External Editor 配置。普通客户素材画布使用平台登录态调用内部编辑器 API,不展示或要求填写画板 Base URL / API Key。任务明细、原始文件、命令日志和专业 Agent 调试控制仍放到开发构建的独立开发窗口。v1 的生成闭环仍以 Web 小游戏为主,同时允许用户打开已有 Godot 项目:所选含 `project.godot` 的目录直接成为项目根,Agent 使用标准运行档在该目录内继续修改,只新增并保留 `.agent/` 作为运行元数据,不创建 `game/``assets/``memory/``exports/` 平行目录;本期不扩展 Unity、Godot 内嵌预览、云同步或插件市场。