1.2 KiB
1.2 KiB
Sandbox 子模块升级 Runbook
适用范围
- 主仓:
qiming-agent - Electron 客户端:
crates/agent-electron-client - 子模块:
crates/agent-sandbox-runtime
升级步骤
- 更新子模块到目标 commit。
- 检查
manifest.json是否包含目标平台产物和sha256。 - 在 Electron 客户端执行:
npm run prepare:sandbox-runtime
- 验证产物落地:
resources/sandbox-runtime/binresources/sandbox-runtime/resolved-manifest.json
- 运行构建并验证
after-sign日志包含sandbox-runtime(Windows 另含sandbox-helper)。
快速校验
node scripts/prepare/prepare-sandbox-runtime.js
npm run build:main
回滚步骤
- 将子模块回退到上一个稳定 commit。
- 重新执行
npm run prepare:sandbox-runtime。 - 重新构建安装包并验证。
常见故障
manifest 不存在:子模块未初始化或路径错误。sha256 mismatch:产物与清单不一致,拒绝继续。helper not found(Windows):未构建内置 helper(npm run build:sandbox-helper)且未通过子模块prepare:sandbox-runtime同步产物,或安装包未包含sandbox-helper/sandbox-runtime下的 exe。