跳到主要内容

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

提交记录
修改scripts/test-windows-install.ps1+3 −11看文件
@@ -5,7 +5,6 @@ param([Parameter(Mandatory)][string]$Installer)
55. (Join-Path $PSScriptRoot 'windows-common.ps1')
66if (-not $IsWindows) { throw 'Installation smoke tests must run on Windows.' }
77$target = Join-Path $env:LOCALAPPDATA ('Programs/Cage-test-' + [guid]::NewGuid().ToString('N'))
8删除:$report = Join-Path ([IO.Path]::GetTempPath()) ('cage-smoke-' + [guid]::NewGuid().ToString('N') + '.json')
98$savedKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ClaudeCage'
109if (Test-Path $savedKey) { throw 'Use a disposable Windows user without an existing Cage installation.' }
1110$fixture = Join-Path $PSScriptRoot 'personal-data-fixture.mjs'
@@ -74,17 +73,10 @@ Invoke-BuildTool (Join-Path $target 'resources/cage.exe') @('verify-web-assets')
7473Invoke-BuildTool (Join-Path $target 'resources/mihomo.exe') @('-v')
7574Invoke-BuildTool (Join-Path $target 'resources/runtime/qemu/qemu-system-x86_64.exe') @('--version')
7675Invoke-BuildTool (Join-Path $target 'resources/runtime/openssh/ssh.exe') @('-V')
77删除:$savedProfile = $env:CLAUDE_CAGE_CONFIG
78删除:try {
79删除: # The UI test owns a separate profile; the installer must preserve the
80删除: # pre-existing default profile without asking the app to parse test bytes.
81删除: $env:CLAUDE_CAGE_CONFIG = Join-Path ([IO.Path]::GetTempPath()) ('cage-ui-profile-' + [guid]::NewGuid().ToString('N') + '/config.json')
82删除: $window = Start-Process -FilePath (Join-Path $target 'Cage.exe') -ArgumentList @('--smoke-test', "`"$report`"") -PassThru
83删除: if (-not $window.WaitForExit(180000)) { throw 'Cage WebView2/workbench smoke test timed out.' }
84删除: if ($window.ExitCode -ne 0 -or -not (Test-Path -LiteralPath $report)) { throw "Cage desktop smoke test failed ($($window.ExitCode))." }
85删除:} finally { $env:CLAUDE_CAGE_CONFIG = $savedProfile }
76新增:# Use the same isolated profile, process lifetime and retained diagnostics as
77新增:# build acceptance. The pre-existing default profile holds preservation markers.
78新增:Assert-WindowsWorkbench -AppDirectory $target
8679Assert-PersonalData
87删除:Get-Content -LiteralPath $report
8880# A locked installed executable must fail before replacing the installation.
8981$before = (Get-FileHash -LiteralPath (Join-Path $target 'Cage.exe') -Algorithm SHA256).Hash
9082$locked = [IO.File]::Open((Join-Path $target 'Cage.exe'), [IO.FileMode]::Open, [IO.FileAccess]::Read, [IO.FileShare]::Read)