feat: 增加共享 Agent Browser 调试能力
需求:在 AI 编程会话中让用户与 Agent 共享同一浏览器页面,并查看控制台与网络信息。 实现:新增沙箱浏览器内核、Host API/渲染器面板、OpenCode 工具接入及安全边界测试。
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type SpawnOptionsWithoutStdio,
|
||||
} from 'node:child_process';
|
||||
import {
|
||||
ensureBundledAgentBrowserPlugin,
|
||||
ensureBundledCourseSkills,
|
||||
ensureBundledSuperpowersPlugin,
|
||||
getManagedOpencodeConfigDir,
|
||||
@@ -163,6 +164,7 @@ export interface OpencodeManagerOptions {
|
||||
userDataDir?: string;
|
||||
bundledSuperpowersDir?: string;
|
||||
bundledCourseSkillsDir?: string;
|
||||
bundledAgentBrowserPluginPath?: string;
|
||||
pythonRuntime?: PythonRuntime;
|
||||
spawn?: SpawnFn;
|
||||
configProvider?: ConfigProvider;
|
||||
@@ -580,6 +582,10 @@ export class OpencodeManager extends EventEmitter {
|
||||
managedConfigDir,
|
||||
sourceDir: this.options.bundledCourseSkillsDir,
|
||||
});
|
||||
ensureBundledAgentBrowserPlugin({
|
||||
managedConfigDir,
|
||||
sourcePath: this.options.bundledAgentBrowserPluginPath,
|
||||
});
|
||||
const environment = {
|
||||
...runtimeEnv,
|
||||
OPENCODE_CONFIG_DIR: managedConfigDir,
|
||||
|
||||
Reference in New Issue
Block a user