mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 22:17:20 +00:00
feat(browser): 接入 CCS browser MCP 与最小交互闭环
新增 browser MCP 安装、Chrome 复用与运行时接线, 实现 navigate、click、type、take_screenshot 四个 phase-1 工具并补齐相关单测。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
efecd7c7d9
commit
eb8149e8fa
29 files changed
+3627
-118
No files matched your search
@@ -14,7 +14,7 @@ import { DEFAULT_ACCOUNT_CONTEXT_MODE } from '../auth/account-context';
|
||||
import type { AccountContextPolicy } from '../auth/account-context';
|
||||
import { getCcsDir, getCcsHome } from '../utils/config-manager';
|
||||
|
||||
const MANAGED_MCP_SERVER_NAMES = new Set(['ccs-websearch', 'ccs-image-analysis']);
|
||||
const MANAGED_MCP_SERVER_NAMES = new Set(['ccs-websearch', 'ccs-image-analysis', 'ccs-browser']);
|
||||
|
||||
/** Options for instance creation */
|
||||
export interface InstanceOptions {
|
||||
@@ -252,9 +252,12 @@ class InstanceManager {
|
||||
}
|
||||
instanceContent.mcpServers = mergedMcpServers;
|
||||
|
||||
const fileMode = fs.existsSync(instanceClaudeJson)
|
||||
? fs.statSync(instanceClaudeJson).mode & 0o777
|
||||
: 0o600;
|
||||
fs.writeFileSync(instanceClaudeJson, JSON.stringify(instanceContent, null, 2), {
|
||||
encoding: 'utf8',
|
||||
mode: 0o600,
|
||||
mode: fileMode,
|
||||
});
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user