From 5c3b8ec2679c649c8a9106d6181b70d0f5228edf Mon Sep 17 00:00:00 2001 From: AIGameCreator App Date: Mon, 13 Jul 2026 01:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Agent=E5=A4=9A=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8F=98=E6=9B=B4=E9=9B=86=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增受确认的 project.patchset 事务式多文件修改与回滚机制 补充 checkpoint 内容差异和文件内容哈希约束 加强隔离 Agent 路径范围与仓库指纹复核 扩展共享命令契约、真实 LLM E2E 与 Runtime 文档 --- .../scripts/agent-runtime-real-e2e.mjs | 506 ++++- .../src-tauri/Cargo.lock | 8 + .../src-tauri/Cargo.toml | 2 + .../src-tauri/src/agent.rs | 569 ++++- .../src-tauri/src/isolated_agent.rs | 49 + .../src-tauri/src/main.rs | 6 +- .../src-tauri/src/patchset.rs | 1889 +++++++++++++++++ .../src-tauri/src/project.rs | 551 ++++- .../src-tauri/src/tests.rs | 622 +++++- .../shared-memory/decision-log.md | 7 + ...案】AI游戏创作Agent Runtime V1.1-2026-07-12.md | 53 + ...案】AI游戏创作智能体App实施计划-2026-06-24.md | 8 +- .../src/contracts/gameCreationApp.test.ts | 8 +- .../shared/src/contracts/gameCreationApp.ts | 1 + .../shared-contracts/src/game_creation_app.rs | 14 +- 15 files changed, 4193 insertions(+), 100 deletions(-) create mode 100644 apps/ai-game-creator-shell/src-tauri/src/patchset.rs diff --git a/apps/ai-game-creator-shell/scripts/agent-runtime-real-e2e.mjs b/apps/ai-game-creator-shell/scripts/agent-runtime-real-e2e.mjs index c72fc9b24..7430e1e26 100644 --- a/apps/ai-game-creator-shell/scripts/agent-runtime-real-e2e.mjs +++ b/apps/ai-game-creator-shell/scripts/agent-runtime-real-e2e.mjs @@ -16,6 +16,9 @@ const mainAgentId = 'code-prototype'; const requestedRunId = `real-e2e-${Date.now()}-${randomUUID().slice(0, 8)}`; const visibleText = 'GENARRATIVE_REAL_E2E_VISIBLE'; const patchedText = 'REAL_E2E_PATCHED'; +const patchsetCreatedPath = 'game/e2e-patchset.txt'; +const patchsetCreatedMarker = 'GENARRATIVE_REAL_E2E_PATCHSET_CREATED'; +const patchsetCreatedContent = `${patchsetCreatedMarker}\n`; const editorAssetPrompt = 'real e2e amber arcade token, transparent background'; const verificationCommand = 'node verify-e2e.mjs'; const commandFailureMarker = 'real-e2e-command=failed'; @@ -416,7 +419,7 @@ async function seedDisposableProject() { ), fs.writeFile( path.join(state.projectRoot, 'verify-e2e.mjs'), - `import fs from 'node:fs';\nconst html = fs.readFileSync('game/index.html', 'utf8');\nconst agents = fs.readFileSync('AGENTS.md', 'utf8');\nif (!html.includes('${patchedText}') || !html.includes(' Real E2E -

${visibleText}

REAL_E2E_TARGET:before

+
+

${visibleText}

+

REAL_E2E_TARGET:before

+ +