Commit Graph

13 Commits

Author SHA1 Message Date
hfshfg
0d88c9b0cc chore(portable): 回归纯开源 — 移除指纹/自动开户/崩溃上报
去掉不适合开源的商业逻辑,保持一个纯粹的开源 U 盘工具:

- 删除设备指纹 (fingerprint.mjs)、虾盘云自动开户 (bootstrap-xiapan.mjs /
  xiapan-client.mjs)、自动崩溃上报 (report-bug.mjs),portable 和 Electron 两份都删
- 启动脚本去掉绑定指纹调用 + 全部 --auto 自动上报;保留 bonjour 禁用与括号转义
- config-server 删掉 /api/xiapan/* 和 /api/report-bug 端点
- Config.html:虾盘云改为普通「首选」卡片,强调中转站 / 国内外全部大模型,
  和其它 provider 一样需用户自填 Key(去 u-claw.org/cloud.html 注册),不再自动开户
- 报 Bug 表单改为指向 GitHub Issue,不再上传日志
- README / release notes / CLAUDE.md 文案改为「选模型填 Key,不绑定设备、不打指纹、不上传数据」
- OPENCLAW_VERSION 跟进最新龙虾版本 2026.6.6 → 2026.6.8

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:47:19 +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
78bcb7fd8e fix(release): Windows-only portable bundle with pre-installed deps
Root cause: portable zip was 1MB skeleton; first launch triggered
`npm install` of OpenClaw + 36 bundled deps on customer's USB drive.
On exFAT-formatted USB this hangs/takes 20+ minutes, gateway never
binds 18789, dashboard shows "Gateway 未启动".

Fix follows StanleyChanH/openclaw-offline-package pattern (153MB
single-platform zip, gateway starts directly):

- release.yml: only build Windows bundle (~150-200MB). Mac users
  fall back to setup.sh. Reasoning: 99% of customers are Windows;
  bundling 3 platforms × Node ~30MB + 3× node_modules dedup pain
  is what blew the previous attempt past GitHub's 2GB cap (see
  5916ff5 history). Smaller scope = simpler + safer.
- Windows-Start.bat / Mac-Start.command: warn if node_modules
  missing; fallback `npm install` adds --ignore-scripts --no-audit
  --no-fund for speed.
- Release notes: NTFS U-disk recommendation.

Lessons applied (from 5916ff5):
- Stay on linux runner with --ignore-scripts (Stanley pattern)
- Drop mac-x64 / mac-arm64 Node from bundle (setup.sh handles Mac)
- rm -rf node-llama-cpp / sharp / canvas explicitly
- Hard size guard: fail CI if zip > 1500MB (buffer below 2GB cap)
2026-05-04 11:02:56 +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
hfshfg
b6ba958b79 fix(portable): node-extract path + unreachable legacy-config sync
Two real bugs in the portable launchers:

1. Windows-Install.bat: xcopy reads from %TEMP%\node-<ver>-win-x64
   but Expand-Archive extracts into %TEMP%\node-extract\node-<ver>-win-x64.
   Result: empty runtime\node-win-x64\ on networked install path.

2. Mac-Start.command + Windows-Start.bat: legacy-config sync block
   was placed AFTER the default-config block, so the "config.json
   exists but openclaw.json doesn't" branch was unreachable. Existing
   USB users with config.json never got their settings migrated;
   they got the empty default instead.

Reordered so legacy migration runs first, default only as fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:36:34 +08:00
hfshfg
fc9e20125d fix: Mac-Start.command 重写 + Node.js 升级到 v22.22.1
Mac-Start.command:
- 用 config-server (18788端口) 替代 python3 读取 token 和打开 Config.html
- 去掉 python3 依赖(HAS_MODEL 检测、token 读取)
- 启动后同时打开 Dashboard 和 Config Center
- 退出时自动清理 gateway 和 config-server 进程
- 对齐 Windows-Start.bat 和 G 盘 Pro 版的架构

setup.sh:
- Node.js v22.14.0 → v22.22.1(满足 openclaw >=22.16.0 要求)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:49:40 +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
e4c8e7550a feat: add Intel Mac (x64) support in Mac-Start.command
Co-authored-by: Zhangchen <2hangchen@users.noreply.github.com>
Closes #6
2026-03-13 19:02:11 +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
hfshfg
25bc0076b0 fix: Windows support & cross-platform architecture
Major fixes for Windows portable version:

1. **Fixed critical bugs:**
   - Replace Unix /dev/null with Windows nul in all .bat files
   - Unified config path to data/.openclaw/openclaw.json
   - Fixed cross-platform node_modules compatibility issue

2. **Implemented separated core directories:**
   - app/core-mac/ for Mac dependencies
   - app/core-win/ for Windows dependencies
   - Prevents cross-platform file system conflicts
   - Shared data/ directory for configs and memory

3. **Enhanced setup.sh:**
   - Now downloads both Mac and Windows Node.js runtimes
   - Ensures U-Claw works on both platforms after setup

4. **Added diagnostic tools:**
   - Windows-Diagnose.bat for troubleshooting
   - Mac-Diagnose.command for troubleshooting
   - Auto-generates diagnostic-log.txt

5. **Improved user experience:**
   - Added Welcome.html - Simple 3-step guide in Chinese
   - All scripts updated to use platform-specific core directories
   - Better error messages and user guidance

Files modified:
- portable/Windows-Start.bat: Use core-win, fix syntax
- portable/Windows-Menu.bat: Use core-win, fix syntax
- portable/Mac-Start.command: Use core-mac
- portable/Mac-Menu.command: Use core-mac
- portable/setup.sh: Download both platforms, use core-mac

Files added:
- portable/Windows-Diagnose.bat: Diagnostic tool
- portable/Mac-Diagnose.command: Diagnostic tool
- portable/Welcome.html: User-friendly welcome page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 18:50:55 +08:00
dongsheng123132
5b9673c947 fix: correct openclaw.mjs path and remove broken build step
- openclaw.mjs is at node_modules/openclaw/openclaw.mjs, not core root
- Remove npm run build (openclaw doesn't need a build step via npm)
- Fix both Mac-Start.command and Mac-Menu.command
2026-03-12 12:00:09 +08:00
dongsheng123132
e04c205399 feat: add Chinese config page (Config.html) to replace onboard wizard
- Comprehensive Config.html with 10 model providers, 6 chat platforms
- Auto-detect gateway port, pre-fill existing config, import/export
- Mac-Start.command opens Config.html on first run, dashboard on subsequent runs
- U-Claw.html updated to reference Config.html
2026-03-11 00:35:29 +08:00
dongsheng123132
c1e94d4dd9 feat: add navigation page and rename scripts to English prefixes
- Add U-Claw.html navigation page with OS auto-detection and live status
- Rename scripts: start → Mac-Start/Windows-Start, menu → Mac-Menu/Windows-Menu
- Update installer scripts to reference new v2 directory structure (app/core)
- Update .gitignore to exclude build artifacts and marketing assets
2026-03-10 22:55:20 +08:00