跳到主要内容

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

浏览文件

mobile_cli_identity.go

22 行 · 846 B历史下载
1package workbench
2
3import _ "embed"
4
5//go:embed mobile_cli_identity.py
6var mobileCLIIdentity string
7
8// Runs after the guest login shell has established the CLI's environment.
9func mobileIdentityCommand(prefix, args []string) []string {
10 if len(prefix) == 5 && prefix[0] == "env" && prefix[2] == "/usr/local/bin/cage-claude-account" && prefix[3] == "run" {
11 command := []string{prefix[0], prefix[1], "python3", "-I", "-c", mobileCLIIdentity, "official", prefix[2], prefix[4]}
12 return append(command, args...)
13 }
14 if len(prefix) == 1 && prefix[0] == "claude" || len(prefix) == 2 && prefix[0] == "ccs" {
15 command := []string{"python3", "-I", "-c", mobileCLIIdentity, prefix[0]}
16 if prefix[0] == "ccs" {
17 command = append(command, prefix[1])
18 }
19 return append(command, args...)
20 }
21 return append(append([]string(nil), prefix...), args...)
22}