Commit Graph

9 Commits

Author SHA1 Message Date
hfshfg
b1468d455c feat(portable): 虾盘云插上即用 — 自动开户送试用额度 + Config 首选卡片
解决「插上 U 盘选虾盘云模型却 Invalid token」:之前客户端只生成
sk-uc-指纹 key 写进配置,但后台从没注册该 token。

- xiapan-client.mjs 加 provisionApiKey():把设备指纹送到虾盘云后台
  (POST api.u-claw.org/internal/token/provision) 自动开一个带试用额度
  的 token,返回真正可用的 key。
- bootstrap-xiapan.mjs 改:首启(配置无 cloud key 时)调 provision 拿真
  key 写配置;已有 key 则幂等跳过;provision 失败回退指纹 key 不阻塞启动。
  后端按 deviceId 幂等,刷不出额度。
- Config.html:模型网格加「虾盘云」首选卡片(一个 key 用全部模型,无需
  申请,选中直接启动跳过填 Key);更新过时型号(MiniMax-M2/kimi-k2/
  qwen-plus/doubao-seed-1.6/gpt-5.4/claude-opus-4-6/deepseek-v4);
  banner 文案改为「已含试用额度」。

注:开户/送额度的商业逻辑在闭源服务端(token-key-service),开源仓只放
调用机制。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 16:01:35 +08:00
hfshfg
270cf4bda0 fix(portable): gateway 启动卡死/Dashboard 拒连 (issue #46/#48)
根因:Windows-Start.bat 在 gateway 启动【前】就打开 http://127.0.0.1:18789,
而慢 U 盘上 OpenClaw 首次启动要几十秒 staging bundled deps,浏览器打开时
端口还没监听 → "127.0.0.1 拒绝连接",用户以为坏了。

修复:
- 新增 lib/wait-gateway.bat:后台轮询端口(每2s,最多~5min),gateway 真正
  LISTENING 后才打开 Dashboard;超时回退到 Config Center。
- Windows-Start.bat:移除 gateway 启动前的过早开浏览器,改由 wait-gateway
  在 ready 后触发;加"首次启动需 30-90 秒"的明确提示。
- Mac-Start.command 本就先轮询 curl 再开浏览器,无此问题。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 12:23:13 +08:00
hfshfg
6eb54f8ea3 feat(portable): bug 一键上报 + 自动崩溃上报 + openclaw 升级 2026.6.6
Bug 上报(方便服务器侧排查便携版问题):
- 新增 lib/report-bug.mjs:算设备指纹→sk-uc apiKey,收集 openclaw 版本/
  系统信息/最近日志(gzip+base64),POST 到 api.u-claw.org/recharge/bug/submit。
  静默失败,绝不影响主流程。复用 fingerprint.mjs + xiapan-client.mjs。
- config-server 加 POST /api/report-bug:本地补齐信息后转发,配置中心加
  「🐛 报 Bug」表单(标题/描述/是否附日志)。
- Windows-Start.bat / Mac-Start.command:gateway 端口耗尽或异常退出时
  自动后台上报(Ctrl+C 正常停止不上报)。

openclaw 升级:
- OPENCLAW_VERSION 2026.4.29 → 2026.6.6(X 盘真实 USB 实测 gateway
  启动/ready、Dashboard 200、旧配置兼容、虾盘云 status 均通过)。

便携性改进(借鉴 OpenClaw-Windows-Portable):
- setup.sh / 启动脚本的 npm install 设 npm_config_cache 指向盘内
  app/.npm-cache,避免污染系统缓存,拔盘不留痕。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 11:46:42 +08:00
hfshfg
d9dd98d650 feat(portable): 便携版更新检测 — config-server 加 /api/update-status + check/publish 脚本 + CI 剥 BOM
config-server 新增 /api/update-status 和 /api/update-check,读取 check-update.mjs
写入的 update-available.json,便携版可提示有无新版本。publish-latest.mjs 用于
发布端生成 manifest。release.yml 顺手修打包时 .bat 的 UTF-8 BOM(BOM 会让 cmd.exe
把首条命令认错报 not internal/external command)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 13:12:16 +08:00
hfshfg
cc2984234b feat(v2.1.2): align with ClawX schema + config-server port fallback
Three changes for v2.1.2:

1. bootstrap-xiapan now writes "agents.defaults.model.primary/fallbacks"
   (uclaw-cloud/deepseek-v4-flash + 3 fallbacks) and an empty models[],
   matching the ClawX commercial schema. Lets OpenClaw runtime auto-discover
   models from /v1/models instead of hard-coding a list that drifts.

2. config-server tries ports 18788..18798 with EADDRINUSE fallback and
   persists the live port to data/.openclaw/runtime.json so future tooling
   can discover it. Fixes silent failure when a second portable instance
   started while 18788 was occupied.

3. u-claw-app/package.json version 2.0.0 -> 2.1.2 so .exe/.dmg filenames
   align with the release tag.
2026-05-03 00:07:09 +08:00
hfshfg
1f8224561b fix(bootstrap): use "name" instead of "label" for model schema
OpenClaw 2026.4.29 renamed the per-model field from "label" to "name". The
old field is now an Unrecognized key, which fails schema validation at
gateway startup and exits OpenClaw before any HTTP listener binds.

Symptom (v2.1.0 first-launch):
  - models.providers.uclaw-cloud.models.0.name: Invalid input: expected string, received undefined
  - models.providers.uclaw-cloud.models.0: Unrecognized key: "label"
  - throwInvalidConfig() at io-DaEsZ_NY.js:2901 -> process exit

Found via end-to-end H: drive test of v2.1.0 portable zip.
2026-05-02 18:58:05 +08:00
hfshfg
9ecbbd445c 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 增加内置虾盘云说明 + 直接下载发行版指引
2026-05-02 17:07:42 +08:00
dongsheng123132
4fcd22d4e3 cleanup: remove Linux scripts, unify core dir, fix Intel Mac bug
- Delete usb-scripts/, Linux-*.sh, setup-linux-usb.sh, migrate.js
- Rename core-mac/core-win → core (with migration shims for existing USBs)
- Fix Mac-Menu.command ARM64 hardcode — now detects Intel/Apple Silicon
- setup.sh: remove Linux branch, Windows download only with --all-platforms
- Update README.md and CLAUDE.md to reflect Mac + Windows only
2026-03-14 00:08:56 +08:00
dongsheng123132
7766d59e55 merge: resolve conflict in Windows-Start.bat, add Linux scripts and maintain lib 2026-03-13 17:35:55 +08:00