跳到主要内容

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

提交记录
修改scripts/bundle-qemu-sources.sh+2 −1看文件
@@ -10,12 +10,13 @@ for tool in "$node_command" git curl tar sha256sum find sort xargs pacman-key mk
1010 command -v "$tool" >/dev/null 2>&1 || { echo "Missing source-collection tool: $tool" >&2; exit 1; }
1111done
1212commit=$("$node_command" -p "JSON.parse(require('fs').readFileSync(process.argv[1])).qemuSource.commit" "$repository/packaging/windows/dependencies.json")
13新增:source_repository=$("$node_command" -p "JSON.parse(require('fs').readFileSync(process.argv[1])).qemuSource.repository" "$repository/packaging/windows/dependencies.json")
1314[[ $commit =~ ^[a-f0-9]{40}$ && -s "$runtime/build-source-packages.txt" ]] || { echo 'QEMU source/package identity is missing.' >&2; exit 1; }
1415stage=$(mktemp -d)
1516trap 'rm -rf "$stage"' EXIT
1617mkdir -p "$stage/source/packages" "$stage/source/cage"
1718git -c core.autocrlf=false init -q "$stage/source/qemu"
18删除:git -C "$stage/source/qemu" fetch --depth=1 https://github.com/stweil/qemu.git "$commit"
19新增:git -C "$stage/source/qemu" fetch --depth=1 "$source_repository" "$commit"
1920git -c core.autocrlf=false -C "$stage/source/qemu" checkout -q --detach FETCH_HEAD
2021[[ $(git -C "$stage/source/qemu" rev-parse HEAD) == "$commit" ]]
2122# All shipped firmware comes from QEMU's pinned ROM submodules. Include nested
修改scripts/bundle-qemu-sources.test.mjs+2 −1看文件
@@ -12,7 +12,7 @@ test('source collector includes pinned firmware and authenticated package source
1212 const repository=join(root,'repository'),runtime=join(root,'runtime'),bin=join(root,'bin'),artifact=join(root,'bundle.tar.gz');
1313 for(const path of [bin,runtime,join(repository,'packaging/windows'),join(repository,'scripts'),join(repository,'patches/qemu')])await mkdir(path,{recursive:true});
1414 const sha='a'.repeat(40),content='fixture source archive\n';
15删除: await writeFile(join(repository,'packaging/windows/dependencies.json'),JSON.stringify({qemuSource:{commit:sha},qemuKeycodemap:{url:'https://source.invalid/keymap.tar.gz',hash:createHash('sha256').update(content).digest('hex')}}));
15新增: await writeFile(join(repository,'packaging/windows/dependencies.json'),JSON.stringify({qemuSource:{repository:'https://source.invalid/locked-qemu.git',commit:sha},qemuKeycodemap:{url:'https://source.invalid/keymap.tar.gz',hash:createHash('sha256').update(content).digest('hex')}}));
1616 for(const name of ['build-source-packages.txt','build-packages.txt','cage-build.json'])await writeFile(join(runtime,name),name==='build-source-packages.txt'?'mingw-w64-fixture 1.2.3-1\n':'fixture');
1717 for(const name of ['build-qemu-windows.sh','build-qemu-windows.ps1','bundle-qemu-sources.sh'])await writeFile(join(repository,'scripts',name),'fixture build input');
1818 await writeFile(join(repository,'patches/qemu/fixture.patch'),'fixture patch');
@@ -20,6 +20,7 @@ test('source collector includes pinned firmware and authenticated package source
2020 await command('cygpath','printf "%s\\n" "$2"');
2121 await command('node','echo "The collector must use the explicit CAGE_NODE path" >&2; exit 99');
2222 await command('git',`if [[ "$*" == *' init '* ]];then mkdir -p "\${@: -1}/.git";fi
23新增: if [[ "$*" == *' fetch '* ]];then [[ "$*" == *'fetch --depth=1 https://source.invalid/locked-qemu.git ${sha}' ]] || exit 98;fi
2324 if [[ "$*" == *rev-parse* ]];then printf '${sha}\\n';fi
2425 if [[ "$*" == *'submodule update'* ]];then for ((i=1;i<=$#;i++));do if [[ "\${!i}" == -C ]];then j=$((i+1));q="\${!j}";fi;done;mkdir -p "$q/roms/seabios";echo 'firmware code' > "$q/roms/seabios/code.c";echo 'gitdir: private' > "$q/roms/seabios/.git";fi
2526 if [[ "$*" == *'submodule status'* ]];then printf ' ${sha} roms/seabios\\n';fi`);