补齐Agent模型视觉检查闭环

新增 image.inspect 安全图片读取、多模态 Provider 调用与只读恢复语义
补齐共享契约、视觉动作回执和多模态失败日志脱敏
扩展确定性测试与真实 Provider 双视口 E2E 验收
同步 Runtime 技术方案和项目共享决策记录
This commit is contained in:
AIGameCreator App
2026-07-13 21:30:13 +08:00
parent 0d643ddbbb
commit 74dd45ef13
15 changed files with 1703 additions and 61 deletions
@@ -19,7 +19,7 @@ describe('AI 游戏创作 App 共享契约', () => {
it('keeps command permissions explicit', () => {
const commandIds = GAME_CREATION_APP_COMMANDS.map((command) => command.id);
expect(GAME_CREATION_APP_COMMANDS).toHaveLength(54);
expect(GAME_CREATION_APP_COMMANDS).toHaveLength(55);
expect(commandIds).toContain('project.git_inspect');
expect(commandIds).toContain('project.patchset');
expect(commandIds).toContain('command.exec');
@@ -122,6 +122,11 @@ describe('AI 游戏创作 App 共享契约', () => {
(command) => command.id === 'asset.register',
)?.permission,
).toBe('confirm');
expect(
GAME_CREATION_APP_COMMANDS.find(
(command) => command.id === 'image.inspect',
)?.permission,
).toBe('auto');
expect(
GAME_CREATION_APP_COMMANDS.find(
(command) => command.id === 'preview.open',
@@ -186,7 +191,7 @@ describe('AI 游戏创作 App 共享契约', () => {
(capability) => capability.id,
);
expect(GAME_CREATION_AGENT_CAPABILITIES).toHaveLength(32);
expect(GAME_CREATION_AGENT_CAPABILITIES).toHaveLength(33);
expect(capabilityIds).toEqual(
expect.arrayContaining([
'chat',
@@ -201,6 +206,7 @@ describe('AI 游戏创作 App 共享契约', () => {
'isolated-subagents',
'repository-startup-context',
'browser-validation',
'visual-inspection',
'persistent-runner',
'multi-agent-collaboration',
'role-level-collaboration',
@@ -224,6 +230,15 @@ describe('AI 游戏创作 App 共享契约', () => {
title:
'受控命令执行(固定 program + argv、非 shell、项目内 cwd、有界输出)',
});
expect(
GAME_CREATION_AGENT_CAPABILITIES.find(
(capability) => capability.id === 'visual-inspection',
),
).toEqual({
id: 'visual-inspection',
area: 'local-runtime',
title: '模型视觉检查',
});
expect(
GAME_CREATION_AGENT_CAPABILITIES.find(
(capability) => capability.id === 'conversation-history',
@@ -50,6 +50,7 @@ export const GAME_CREATION_APP_COMMANDS = [
{ id: 'asset.list', permission: 'auto' },
{ id: 'asset.upload', permission: 'confirm' },
{ id: 'asset.register', permission: 'confirm' },
{ id: 'image.inspect', permission: 'auto' },
{ id: 'preview.start', permission: 'confirm' },
{ id: 'preview.validate', permission: 'auto' },
{ id: 'preview.open', permission: 'confirm' },
@@ -145,6 +146,11 @@ export const GAME_CREATION_AGENT_CAPABILITIES = [
area: 'local-runtime',
title: '浏览器试玩验证',
},
{
id: 'visual-inspection',
area: 'local-runtime',
title: '模型视觉检查',
},
{
id: 'canvas-project-sync',
area: 'local-runtime',