提交记录修改.github/workflows/release-platforms.yml+1 −0看文件
修改.github/workflows/release.yml+2 −0看文件
修改docs/releases/v0.1.7-rc.1.md+1 −0看文件
修改scripts/guest-os/build-macos-guest-core.sh+2 −0看文件
新增scripts/guest-os/tests/build-macos-guest-core.test.mjs+38 −0看文件
| @@ -32,6 +32,7 @@ jobs: | ||
| 32 | 32 | needs: validate |
| 33 | 33 | if: github.repository == 'Lee-xeo/Claude-Cage' && github.ref == 'refs/heads/main' |
| 34 | 34 | uses: ./.github/workflows/windows-build.yml |
| 35 | 新增: secrets: inherit | |
| 35 | 36 | with: |
| 36 | 37 | ref: ${{ inputs.ref }} |
| 37 | 38 | release: true |
| @@ -86,6 +86,7 @@ jobs: | ||
| 86 | 86 | macos: |
| 87 | 87 | needs: prepare |
| 88 | 88 | uses: ./.github/workflows/macos-build.yml |
| 89 | 新增: secrets: inherit | |
| 89 | 90 | with: |
| 90 | 91 | ref: ${{ needs.prepare.outputs.commit_sha }} |
| 91 | 92 | release: true |
| @@ -93,6 +94,7 @@ jobs: | ||
| 93 | 94 | windows: |
| 94 | 95 | needs: prepare |
| 95 | 96 | uses: ./.github/workflows/windows-build.yml |
| 97 | 新增: secrets: inherit | |
| 96 | 98 | with: |
| 97 | 99 | ref: ${{ needs.prepare.outputs.commit_sha }} |
| 98 | 100 | release: true |
| @@ -49,6 +49,7 @@ | ||
| 49 | 49 | - macOS 主机:Apple Silicon、macOS 14 及以上。 |
| 50 | 50 | - Windows 主机:Windows 10 22H2/11 x64;Windows 11 客机需要支持 Hyper-V 的 Windows 11 专业版、企业版或教育版主机。 |
| 51 | 51 | - Linux 主机:Debian 12、Ubuntu 22.04/24.04 x86_64。Intel Mac、Windows ARM64 和 Linux ARM64 主机暂不支持。 |
| 52 | 新增:- 使用旧版未签名 Windows 预览包的用户,需要手动下载并安装本版可信签名安装器一次,之后才能使用签名校验的自动更新。 | |
| 52 | 53 | - 新增或更新原生客机能力后,请按工作台提示同步环境组件。不要删除 `.claude-cage`、旧环境磁盘或迁移备份来解决升级问题。 |
| 53 | 54 | - 真实账号授权、特定主机权限、音频设备、显示缩放、第三方输入法以及手机网络环境仍可能有差异。自动化、构建及隔离网络测试不等于所有设备组合的实机验收。 |
| 54 | 55 | |
| @@ -8,7 +8,9 @@ trap 'rm -rf "$work"' EXIT | ||
| 8 | 8 | mod=github.com/Code-Hex/vz/v3 |
| 9 | 9 | version=$(go list -m -f '{{.Version}}' "$mod") |
| 10 | 10 | [[ $version == v3.7.1 ]] || { echo "Review the login view against VZ binding $version" >&2; exit 1; } |
| 11 | 新增:go mod download "$mod" | |
| 11 | 12 | dir=$(go list -m -f '{{.Dir}}' "$mod") |
| 13 | 新增:[[ -n "$dir" && -d "$dir" ]] || { echo 'VZ binding source is unavailable after download.' >&2; exit 1; } | |
| 12 | 14 | cp -R "$dir" "$work/vz" |
| 13 | 15 | chmod -R u+w "$work/vz" |
| 14 | 16 | cat > "$work/vz/cage_view_object_darwin.go" <<'GO' |
| @@ -0,0 +1,38 @@ | ||
| 1 | 新增:import test from 'node:test'; | |
| 2 | 新增:import assert from 'node:assert/strict'; | |
| 3 | 新增:import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs'; | |
| 4 | 新增:import { tmpdir } from 'node:os'; | |
| 5 | 新增:import { join, resolve } from 'node:path'; | |
| 6 | 新增:import { spawnSync } from 'node:child_process'; | |
| 7 | 新增: | |
| 8 | 新增:test('fresh-cache Mac core build downloads VZ source before copying and builds its patched binding', () => { | |
| 9 | 新增: const root = mkdtempSync(join(tmpdir(), 'cage-vz-fresh-cache-')); | |
| 10 | 新增: try { | |
| 11 | 新增: const bin = join(root, 'bin'), module = join(root, 'module'); | |
| 12 | 新增: mkdirSync(bin); mkdirSync(module); | |
| 13 | 新增: writeFileSync(join(module, 'go.mod'), 'module github.com/Code-Hex/vz/v3\n'); | |
| 14 | 新增: writeFileSync(join(bin, 'go'), `#!/bin/sh | |
| 15 | 新增:set -eu | |
| 16 | 新增:if test "$1 $2" = 'mod download'; then touch "$CAGE_VZ_FIXTURE/downloaded"; exit; fi | |
| 17 | 新增:if test "$1 $2" = 'mod edit'; then exit; fi | |
| 18 | 新增:case "$*" in | |
| 19 | 新增: *Version*) printf v3.7.1 ;; | |
| 20 | 新增: *Dir*) if test -f "$CAGE_VZ_FIXTURE/downloaded"; then printf '%s/module' "$CAGE_VZ_FIXTURE"; fi ;; | |
| 21 | 新增: *) exit 2 ;; | |
| 22 | 新增:esac | |
| 23 | 新增:`, { mode: 0o755 }); | |
| 24 | 新增: writeFileSync(join(bin, 'make'), `#!/bin/sh | |
| 25 | 新增:set -eu | |
| 26 | 新增:trial=$(printf '%s' "$GOFLAGS" | sed 's/.*-modfile=//') | |
| 27 | 新增:test -f "$(dirname "$trial")/vz/cage_view_object_darwin.go" | |
| 28 | 新增:grep -q CageViewObject "$(dirname "$trial")/vz/cage_view_object_darwin.go" | |
| 29 | 新增:test "$1" = cage | |
| 30 | 新增:printf patched-binding-built | |
| 31 | 新增:`, { mode: 0o755 }); | |
| 32 | 新增: const result = spawnSync('/bin/bash', [resolve('scripts/guest-os/build-macos-guest-core.sh'), '0.1.7-rc.1'], { | |
| 33 | 新增: encoding: 'utf8', env: { ...process.env, PATH: `${bin}:${process.env.PATH}`, CAGE_VZ_FIXTURE: root }, | |
| 34 | 新增: }); | |
| 35 | 新增: assert.equal(result.status, 0, result.stderr); | |
| 36 | 新增: assert.match(result.stdout, /patched-binding-built/); | |
| 37 | 新增: } finally { rmSync(root, { recursive: true, force: true }); } | |
| 38 | 新增:}); | |

