跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

macos_mobile_browser.go

21 行 · 776 B历史下载
1package workbench
2
3import (
4 "context"
5 "os/exec"
6
7 "al.essio.dev/pkg/shellescape"
8)
9
10func (s *Server) macOSPhoneBrowserClient(parent context.Context) *windowsBrowserClient {
11 ctx, cancel := context.WithCancel(parent)
12 return &windowsBrowserClient{ctx: ctx, cancel: cancel, start: func(ctx context.Context) (*exec.Cmd, error) {
13 const base = "/usr/local/libexec/cage-workbench-browser-4.145.0-pw1.65.0/"
14 configuration, err := loadConfig(s.configPath)
15 if err != nil {
16 return nil, err
17 }
18 command := "exec " + shellescape.QuoteCommand([]string{"env", "LANG=" + configuration.Locale, "LC_ALL=" + configuration.Locale, base + "editor/lib/node", base + "controller/macos-phone-browser.mjs"})
19 return s.macOSSSHCommand(ctx, "-T", s.sshTarget(), "--", command), nil
20 }}
21}