|
@@ -66,6 +66,7 @@ describe('CodexProvider(模拟 app-server)', () => {
|
|
|
// 插件、应用连接器、插件安装建议与子代理在服务中关闭
|
|
// 插件、应用连接器、插件安装建议与子代理在服务中关闭
|
|
|
expect(cfg.features).toMatchObject({ plugins: false, remote_plugin: false, apps: false, tool_suggest: false, multi_agent: false })
|
|
expect(cfg.features).toMatchObject({ plugins: false, remote_plugin: false, apps: false, tool_suggest: false, multi_agent: false })
|
|
|
expect(cfg.apps._default.enabled).toBe(false)
|
|
expect(cfg.apps._default.enabled).toBe(false)
|
|
|
|
|
+ expect(cfg.agents).toEqual({ enabled: false })
|
|
|
// 网关以 HTTP MCP 方式配置,携带本次 Run 的令牌
|
|
// 网关以 HTTP MCP 方式配置,携带本次 Run 的令牌
|
|
|
expect(cfg.mcp_servers.gateway).toMatchObject({ url: 'http://127.0.0.1:9/mcp', http_headers: { Authorization: 'Bearer rt_test' }, default_tools_approval_mode: 'approve' })
|
|
expect(cfg.mcp_servers.gateway).toMatchObject({ url: 'http://127.0.0.1:9/mcp', http_headers: { Authorization: 'Bearer rt_test' }, default_tools_approval_mode: 'approve' })
|
|
|
})
|
|
})
|
|
@@ -76,6 +77,8 @@ describe('CodexProvider(模拟 app-server)', () => {
|
|
|
const cfg = JSON.parse((t.events.find(e => (e.payload as { messageId?: string }).messageId === 'cfg')!.payload as { text: string }).text)
|
|
const cfg = JSON.parse((t.events.find(e => (e.payload as { messageId?: string }).messageId === 'cfg')!.payload as { text: string }).text)
|
|
|
expect(cfg.features).toMatchObject({ plugins: true, remote_plugin: true, apps: true, tool_suggest: false, multi_agent: false })
|
|
expect(cfg.features).toMatchObject({ plugins: true, remote_plugin: true, apps: true, tool_suggest: false, multi_agent: false })
|
|
|
expect(cfg.apps._default.enabled).toBe(true)
|
|
expect(cfg.apps._default.enabled).toBe(true)
|
|
|
|
|
+ // Playground 中子代理同样关闭
|
|
|
|
|
+ expect(cfg.agents).toEqual({ enabled: false })
|
|
|
expect(cfg.skills).toEqual({ config: [{ path: '/sys/skill-installer/SKILL.md', enabled: false }] })
|
|
expect(cfg.skills).toEqual({ config: [{ path: '/sys/skill-installer/SKILL.md', enabled: false }] })
|
|
|
expect(t.interactions[0]).toMatchObject({ kind: 'approval', tool: 'mcp__codex_apps', title: '允许调用 Gmail 的 search_emails?' })
|
|
expect(t.interactions[0]).toMatchObject({ kind: 'approval', tool: 'mcp__codex_apps', title: '允许调用 Gmail 的 search_emails?' })
|
|
|
expect(t.events.some(e => (e.payload as { text?: string }).text === 'app:accept')).toBe(true)
|
|
expect(t.events.some(e => (e.payload as { text?: string }).text === 'app:accept')).toBe(true)
|