跳到主要内容

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

提交记录

Merge pull request #62 from libiucode/fix/issue-35-windows-manifest-bom

fix: add BOM for Windows component manifest publisher

作者
Shihao Li
时间
2026/11/11 16:11
提交
b0d7378
这个版本的全部文件

这是一个合并提交,下面是和第一个上一提交相比的改动。

修改scripts/guest-os/publish-windows-component-manifest.ps1+1 −1看文件
@@ -1,4 +1,4 @@
1删除:# Records only the files verified in this fixed guest after installation.
1新增:# Records only the files verified in this fixed guest after installation.
22param([guid]$VMId,[string]$GUIUserSID,[string]$ManifestJSON)
33$ErrorActionPreference='Stop'
44if ([guid](Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters').VirtualMachineId -ne $VMId -or
修改scripts/guest-os/windows-host-image.tests.ps1+9 −0看文件
@@ -70,4 +70,13 @@ if ($retireAt -lt 0 -or $publishAt -le $retireAt) { throw 'Host enrollment can p
7070$retireAt = $publisher.Body.Extent.Text.LastIndexOf('Complete-CloneSetup $stageBinding')
7171$publishAt = $publisher.Body.Extent.Text.IndexOf('[IO.File]::Copy($stageBinding')
7272if ($retireAt -lt 0 -or $publishAt -le $retireAt) { throw 'The local host can publish before clone retirement.' }
73新增:
74新增:$manifestPublisher = Join-Path $PSScriptRoot 'publish-windows-component-manifest.ps1'
75新增:$manifestBytes = [IO.File]::ReadAllBytes($manifestPublisher)
76新增:if ($manifestBytes.Length -lt 3 -or $manifestBytes[0] -ne 0xEF -or $manifestBytes[1] -ne 0xBB -or $manifestBytes[2] -ne 0xBF) {
77新增: throw 'The component manifest publisher must start with a UTF-8 BOM for Windows PowerShell 5.1.'
78新增:}
79新增:$parseErrors = $null
80新增:$null = [Management.Automation.Language.Parser]::ParseFile($manifestPublisher, [ref]$null, [ref]$parseErrors)
81新增:if ($parseErrors.Count) { throw "The component manifest publisher failed Windows PowerShell parsing: $($parseErrors[0].Message)" }
7382Write-Output 'Passed isolated account XML, locale preservation, build validation, retained credential identity and interrupted retirement recovery.'