跳到主要内容

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

提交记录
修改lib/code.sh+7 −3看文件
@@ -151,8 +151,12 @@ _agent_vm_code_session() {
151151 [[ -t 0 && -t 1 ]] && want_tty=1
152152 # Bound to the VM's loopback, which Lima forwards to this machine's only.
153153 # The cookie suffix keeps sessions apart at 127.0.0.1. --disable-proxy: no
154删除: # route from the browser to the VM's other ports; VSCODE_PROXY_URI sends a
155删除: # link to localhost:<port> to that port here instead. The --vscode-option
154新增: # route from the browser to the VM's other ports; empty VSCODE_PROXY_URI
155新增: # leaves a link to localhost:<port> at that port here instead of rewriting
156新增: # it through the editor's /proxy/. An absolute template such as
157新增: # http://localhost:{{port}}/ breaks the workbench: code-server runs
158新增: # new URL() on it before substituting {{port}}, which throws Invalid URL
159新增: # (coder/code-server#6504). The --vscode-option
156160 # ones: no experiments, and the built-in Copilot Chat never loads. Claude
157161 # Code's login pages open without the link prompt, those paths only.
158162 #
@@ -162,7 +166,7 @@ _agent_vm_code_session() {
162166 # other's editor; keeping them apart needs network isolation, which
163167 # agent-vm does not have yet.
164168 _agent_vm_lima_run "$vm_name" "$host_dir" "$want_tty" \
165删除: 'VSCODE_PROXY_URI=http://localhost:{{port}}/' code-server \
169新增: 'VSCODE_PROXY_URI=' code-server \
166170 --config "$cfg" \
167171 --bind-addr "127.0.0.1:$port" \
168172 --cookie-suffix "$vm_name" \
修改tests/22-code.sh+1 −1看文件
@@ -49,7 +49,7 @@ if _agent_vm_host_port_open "$first"; then
4949 printf ' skip code launch tests (port %s is taken on this machine)\n' "$first"
5050else
5151 out="$(rec code)"
52删除: rec_has "agent-vm VSCODE_PROXY_URI=http://localhost:{{port}}/ code-server --config /home/u/.config/code-server/agent-vm-lima-x.yaml --bind-addr 127.0.0.1:$first --cookie-suffix $PV" \
52新增: rec_has "agent-vm VSCODE_PROXY_URI= code-server --config /home/u/.config/code-server/agent-vm-lima-x.yaml --bind-addr 127.0.0.1:$first --cookie-suffix $PV" \
5353 && pass "code-server on the VM's loopback, the VM's own config and cookie" \
5454 || fail "code: $(grep 'code-server --config' "$REC")"
5555 rec_has "--disable-getting-started-override --link-protection-trusted-domains https://claude.com/cai/oauth --link-protection-trusted-domains https://platform.claude.com/oauth --vscode-option" \