From 95b81972359ba6987d9b16961c9dcefaaea159ca Mon Sep 17 00:00:00 2001 From: Linghong Date: Mon, 27 Jul 2026 07:46:42 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=87=E6=9C=9F=E6=96=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...规銆慉I娓告垙鍒涗綔鏅鸿兘浣揂pp瀹炴柦璁″垝-2026-06-24.md | 1 + scripts/check-native-shells.mjs | 46 ++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/technical/銆愭妧鏈柟妗堛慉I娓告垙鍒涗綔鏅鸿兘浣揂pp瀹炴柦璁″垝-2026-06-24.md b/docs/technical/銆愭妧鏈柟妗堛慉I娓告垙鍒涗綔鏅鸿兘浣揂pp瀹炴柦璁″垝-2026-06-24.md index f7a20de50..ac55c4af5 100644 --- a/docs/technical/銆愭妧鏈柟妗堛慉I娓告垙鍒涗綔鏅鸿兘浣揂pp瀹炴柦璁″垝-2026-06-24.md +++ b/docs/technical/銆愭妧鏈柟妗堛慉I娓告垙鍒涗綔鏅鸿兘浣揂pp瀹炴柦璁″垝-2026-06-24.md @@ -14,6 +14,7 @@ - Run 鎺у埗鍙傝冿細鍊熼壌 Harbour 鐨勬帶鍒跺钩闈㈡濇兂锛屽彧鍚告敹 `run lifecycle`銆乤ctivity/output stream銆乧ontext bundle銆乲ill/retry/resume 绛夋湰鍦拌繍琛屾不鐞嗚兘鍔涳紱涓嶅紩鍏 Harbour 鐨勫绉熸埛鍚庡彴銆佽皟搴 UI銆侀氱敤 shell workflow 鎴栬繙绋 runner 浣滀负 v1 渚濊禆銆 - 鏈湴宸ョ▼鍙傝冿細鍊熼壌 Godcoder 鐨勬湰鍦颁骇鐗 checkpoint / diff / restore銆佷笂涓嬫枃瀹夊叏杩囨护銆佽交閲忛」鐩储寮曘侀」鐩骇鍐欓攣鍜岄」鐩骇鏉冮檺绛栫暐锛涗笉寮曞叆閫氱敤 IDE 鎻掍欢銆佷簯宸ヤ綔鍖烘垨浠绘剰浠g爜浠g悊銆 - 浠g爜缁勭粐锛氭闈㈠鎴风鍏ュ彛淇濇寔涓鸿杽缁勫悎灞傘傚墠绔妸璁よ瘉銆乀auri 妗ユ帴銆丷untime 閰嶇疆銆丄gent Runtime 灞曠ず鍜岄」鐩憳瑕佸垎鍒斁鍏 `src/app`銆乣src/services` 涓 `src/features`锛汻ust 椤圭洰鑳藉姏鍜屾祴璇曟寜鍔熻兘鍩熶娇鐢ㄧ洰褰曟ā鍧楋紱鐣岄潰娴嬭瘯涓庣湡瀹 Runtime E2E 浣跨敤钖 suite registry / entry 淇濈暀鍘熸墽琛岄『搴忋傚悗缁媶鍒嗗繀椤讳繚鎸佸叕寮瀵煎嚭銆佸懡浠ゅ绾︺佹祴璇曞悕绉板拰琛屼负涓嶅彉锛屼笉鑳界敤 `include!`銆佹暣鏂囦欢鏂囨湰鎷兼帴鎴栧彧绉诲姩鍒板彟涓涓秴澶ф枃浠朵唬鏇跨湡瀹炴ā鍧楄竟鐣屻 +- 婧愮爜闂ㄧ锛歚check:native-shells` 绛夋簮鐮佹壂鎻忓繀椤昏窡闅忕湡瀹炴ā鍧楀綊灞烇紱鍏ュ彛缁勫悎灞傚彧楠岃瘉鍙楁帶缁勪欢鐨勬寕杞藉叧绯伙紝鍏蜂綋瀹炵幇鐢辨墍灞炴ā鍧楀崟鐙獙璇併傛ā鍧楁媶鍒嗗悗涓嶅緱涓轰簡婊¤冻鏃у瓧绗︿覆鎵弿鎶婂疄鐜版惉鍥 `App.tsx`锛屼篃涓嶅緱鐢ㄨ法鏂囦欢鏂囨湰鎷兼帴浠f浛缁勪欢褰掑睘妫鏌ャ ## 寮鍙戞 Project Supervisor 绾亰澶╃嫭绔嬬獥鍙 diff --git a/scripts/check-native-shells.mjs b/scripts/check-native-shells.mjs index 10941faf1..c25060c25 100644 --- a/scripts/check-native-shells.mjs +++ b/scripts/check-native-shells.mjs @@ -26,6 +26,18 @@ const aiGameCreatorShellAppSource = fs.readFileSync( 'apps/ai-game-creator-shell/src/App.tsx', 'utf8', ); +const aiGameCreatorShellAppModelSource = fs.readFileSync( + 'apps/ai-game-creator-shell/src/features/app-shell/model.ts', + 'utf8', +); +const aiGameCreatorShellProjectWorkspaceChatPaneSource = fs.readFileSync( + 'apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx', + 'utf8', +); +const aiGameCreatorShellDeveloperProjectPanelsSource = fs.readFileSync( + 'apps/ai-game-creator-shell/src/features/project-workspace/DeveloperProjectPanels.tsx', + 'utf8', +); const aiGameCreatorProjectDevelopmentSource = fs.readFileSync( 'apps/ai-game-creator-shell/src/view/project-development/index.tsx', 'utf8', @@ -1937,31 +1949,53 @@ function assertAiGameCreatorShellUserDevBoundary() { 'function isDeveloperMode()', 'if (!import.meta.env.DEV)', "return params.has('dev') || window.location.hash === '#dev';", + ]) { + if (!aiGameCreatorShellAppModelSource.includes(snippet)) { + throw new Error( + `AI game creator developer mode boundary drifted: missing ${snippet}`, + ); + } + } + for (const snippet of [ + 'projectSupervisorOnly ? false : isDeveloperMode()', "{devMode ? (", 'className="developer-pane"', - 'className="chat-pane"', ]) { if (!aiGameCreatorShellAppSource.includes(snippet)) { throw new Error(`AI game creator user/dev UI boundary drifted: missing ${snippet}`); } } + if ( + !aiGameCreatorShellAppSource.includes(' match.index ?? -1); + const previewFrameCount = [ + ...aiGameCreatorShellDeveloperProjectPanelsSource.matchAll(/ index < devModeBranchIndex || index < developerPaneIndex, ) ) { - throw new Error('AI game creator preview iframe must stay inside the dev-only pane'); + throw new Error('AI game creator preview panels must stay inside the dev-only pane'); } const clientPreviewFrameCount = [