mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
feat(mcp): 添加 CCW_DISABLE_SANDBOX 环境变量支持禁用工作空间访问限制
- 在 path-validator.ts 中添加 isSandboxDisabled() 函数 - 修改 validatePath() 在沙箱禁用时跳过路径限制检查 - MCP server 启动日志显示沙箱状态 - /api/mcp-install-ccw API 支持 disableSandbox 参数 - Dashboard UI 添加禁用沙箱的复选框选项 - 添加中英文 i18n 翻译支持
This commit is contained in:
@@ -1171,13 +1171,17 @@ export async function handleMcpRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
return { error: 'projectPath is required', status: 400 };
|
||||
}
|
||||
|
||||
// Check if sandbox should be disabled
|
||||
const disableSandbox = body.disableSandbox === true;
|
||||
|
||||
// Generate CCW MCP server config
|
||||
// Use cmd /c to inherit Claude Code's working directory
|
||||
const ccwMcpConfig = {
|
||||
const ccwMcpConfig: Record<string, any> = {
|
||||
command: "cmd",
|
||||
args: ["/c", "npx", "-y", "ccw-mcp"],
|
||||
env: {
|
||||
CCW_ENABLED_TOOLS: "all"
|
||||
CCW_ENABLED_TOOLS: "all",
|
||||
...(disableSandbox && { CCW_DISABLE_SANDBOX: "1" })
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user