拆分策划 Agent 与 Codex 随包清单
将 design-agent 资源包放到全平台 Tauri 基础配置 Windows 配置只保留 pinned Codex sidecar 配置门禁分别校验两份清单,禁止互相混入
This commit is contained in:
@@ -1285,6 +1285,9 @@ if (tauriConfig.identifier !== 'world.genarrative.ai-game-creator') {
|
||||
throw new Error('AI game creator shell identifier drifted');
|
||||
}
|
||||
|
||||
const expectedBundledDesignAgentResources = {
|
||||
'design-agent': 'design-agent',
|
||||
};
|
||||
const expectedBundledCodexResources = {
|
||||
'resources/codex/win-x64/bin/codex.exe': 'codex/win-x64/bin/codex.exe',
|
||||
'resources/codex/win-x64/bin/codex-code-mode-host.exe':
|
||||
@@ -1300,16 +1303,33 @@ const expectedBundledCodexResources = {
|
||||
'resources/codex/win-x64/NOTICE.md': 'codex/win-x64/NOTICE.md',
|
||||
'resources/codex/win-x64/manifest.json': 'codex/win-x64/manifest.json',
|
||||
};
|
||||
if (tauriConfig.bundle?.resources !== undefined) {
|
||||
assert.deepEqual(
|
||||
tauriConfig.bundle?.resources,
|
||||
expectedBundledDesignAgentResources,
|
||||
'AI game creator shell base Tauri config must bundle the design-agent resource pack',
|
||||
);
|
||||
for (const key of Object.keys(tauriConfig.bundle?.resources ?? {})) {
|
||||
if (String(key).includes('codex')) {
|
||||
throw new Error(
|
||||
'AI game creator shell base Tauri config must not require Windows-only Codex resources',
|
||||
);
|
||||
}
|
||||
}
|
||||
assert.deepEqual(
|
||||
windowsTauriConfig.bundle?.resources,
|
||||
expectedBundledCodexResources,
|
||||
'AI game creator shell Windows Tauri config must bundle the complete pinned Codex resource set',
|
||||
);
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(
|
||||
windowsTauriConfig.bundle?.resources ?? {},
|
||||
'design-agent',
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'design-agent resource pack must not be mixed into the Windows Codex sidecar bundle',
|
||||
);
|
||||
}
|
||||
if (windowsTauriConfig.bundle?.useLocalToolsDir !== true) {
|
||||
throw new Error(
|
||||
'AI game creator shell Windows Tauri config must cache bundling tools in the project target directory',
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"resources": {
|
||||
"design-agent": "design-agent"
|
||||
},
|
||||
"linux": {
|
||||
"deb": {
|
||||
"depends": ["bubblewrap"]
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
"resources/codex/win-x64/codex-resources/codex-windows-sandbox-setup.exe": "codex/win-x64/codex-resources/codex-windows-sandbox-setup.exe",
|
||||
"resources/codex/win-x64/codex-package.json": "codex/win-x64/codex-package.json",
|
||||
"resources/codex/win-x64/NOTICE.md": "codex/win-x64/NOTICE.md",
|
||||
"resources/codex/win-x64/manifest.json": "codex/win-x64/manifest.json",
|
||||
"design-agent": "design-agent"
|
||||
"resources/codex/win-x64/manifest.json": "codex/win-x64/manifest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user