feat: 增加共享 Agent Browser 调试能力
需求:在 AI 编程会话中让用户与 Agent 共享同一浏览器页面,并查看控制台与网络信息。 实现:新增沙箱浏览器内核、Host API/渲染器面板、OpenCode 工具接入及安全边界测试。
This commit is contained in:
@@ -14,6 +14,11 @@ vi.mock('../../electron/api/server', () => ({
|
||||
getHostApiToken: () => 'host-token',
|
||||
}));
|
||||
|
||||
vi.mock('../../electron/api/renderer-capability', () => ({
|
||||
getRendererCapability: () => 'renderer-token',
|
||||
RENDERER_CAPABILITY_HEADER: 'x-niancode-renderer-capability',
|
||||
}));
|
||||
|
||||
describe('Host API IPC proxy', () => {
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
@@ -47,6 +52,7 @@ describe('Host API IPC proxy', () => {
|
||||
headers: expect.objectContaining({
|
||||
Authorization: 'Bearer host-token',
|
||||
'Content-Type': 'application/json',
|
||||
'x-niancode-renderer-capability': 'renderer-token',
|
||||
}),
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user