feat: 内置虾盘云 + 设备指纹绑定 + Release 流水线
- 新增 portable/lib/{fingerprint,xiapan-client,bootstrap-xiapan}.mjs:
跨平台设备指纹(Win USB/disk + Mac UUID + Linux machine-id + seed 兜底)
生成 sk-uc-{fingerprint} 形式的虾盘云 apiKey,启动时 merge 到 openclaw.json
- Config.html 顶部新增「已绑定虾盘云」横幅:指纹来源 + Key + 余额 + 充值/解绑
- config-server 增加 /api/xiapan/{status,bind,unbind} 三个端点
- Electron app 在 whenReady 调 bootstrap,新增 sync-lib.js 让 build 前自动同步
- 锁 OpenClaw 版本到 2026.4.29(OPENCLAW_VERSION 单一来源)
- 删除死代码 portable/充值.html
- 新增 .github/workflows/release.yml:tag 触发,出 portable zip + Electron exe/dmg
- README 增加内置虾盘云说明 + 直接下载发行版指引
This commit is contained in:
@@ -89,6 +89,20 @@ function ensureConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
async function bindXiapanCloud() {
|
||||
try {
|
||||
const mod = await import(path.join(__dirname, 'lib/bootstrap-xiapan.mjs'));
|
||||
const result = await mod.bootstrapXiapan({
|
||||
configPath,
|
||||
appRoot: userDataPath,
|
||||
log: console,
|
||||
});
|
||||
console.log(`[${APP_NAME}] xiapan bind: ${result.action || 'noop'} (source=${result.source})`);
|
||||
} catch (err) {
|
||||
console.warn(`[${APP_NAME}] xiapan bind failed:`, err.message);
|
||||
}
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
||||
@@ -445,6 +459,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
// Setup
|
||||
ensureConfig();
|
||||
await bindXiapanCloud();
|
||||
createMenu();
|
||||
setupIPC();
|
||||
createWindow();
|
||||
|
||||
Reference in New Issue
Block a user