跳到主要内容

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

提交记录
修改internal/workbench/cli_channel_test.go+14 −1看文件
@@ -137,7 +137,20 @@ func TestImportedCLIUUIDIsIndependentOfPublicSessionID(t *testing.T) {
137137func TestArchivedCLIHistoryIsNotRediscovered(t *testing.T) {
138138 s, id, project := metadataFixture(t)
139139 home, _ := filepath.EvalSymlinks(t.TempDir())
140删除: mobileTestSSH(t, s, home, []string{"HOME=" + home, "PATH=/usr/bin:/bin:/usr/local/bin", "CLAUDE_CONFIG_DIR=" + filepath.Join(home, ".claude")})
140新增: bin := filepath.Join(home, "bin")
141新增: if err := os.MkdirAll(bin, 0700); err != nil {
142新增: t.Fatal(err)
143新增: }
144新增: // This archived history has no live CLI process. Keep the real discovery
145新增: // helper and SSH path independent of a developer's installed Claude CLI.
146新增: cli := "#!/bin/sh\n[ \"$#\" -eq 2 ] && [ \"$1\" = agents ] && [ \"$2\" = --json ] || exit 64\nprintf '[]\\n'\n"
147新增: if err := os.WriteFile(filepath.Join(bin, "claude"), []byte(cli), 0700); err != nil {
148新增: t.Fatal(err)
149新增: }
150新增: if err := os.WriteFile(filepath.Join(home, ".bash_profile"), []byte("export PATH="+shellescape.Quote(bin)+":/usr/bin:/bin\n"), 0600); err != nil {
151新增: t.Fatal(err)
152新增: }
153新增: mobileTestSSH(t, s, home, []string{"HOME=" + home, "PATH=" + bin + ":/usr/bin:/bin", "CLAUDE_CONFIG_DIR=" + filepath.Join(home, ".claude")})
141154 record, err := s.mobileCLI.record(s.profile, id)
142155 if err != nil {
143156 t.Fatal(err)