Commit Graph

11 Commits

Author SHA1 Message Date
hfshfg
3c2500b7a0 fix(ci): use absolute path for stage_dir to survive cd into core
The `cd "$core_dir"` for npm install changed cwd, so the trailing
`du -sh "$stage_dir"` (with stage_dir as relative path) failed:
  du: cannot access 'dist/u-claw-portable-windows-v2.1.3'

Fix: prefix stage_dir with $(pwd) so it's absolute.

Surfaced by v2.1.3 release run that successfully npm-installed all
764 packages in 70s but exited 1 on the cosmetic du line.
2026-05-04 11:07:29 +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
c99b52e8e2 fix(ci): normalize CRLF for .bat/.cmd/.ps1 in portable zip
Real bug found in v2.1.0: ubuntu-runner zip preserved LF line endings, which
breaks Windows batch parsing. cmd.exe mis-tokenized 'setlocal' as 'local',
trashed env vars, and produced 'URL: //node--win-x64.zip' on Node download.

Symptom: Windows users who unzip and double-click setup.bat see a flood of
'XXX is not recognized as a command' errors followed by curl 'No host part'.

Fix: convert .bat/.cmd/.ps1 to CRLF, ensure .sh/.command/.mjs stay LF, before
zipping in the portable-skeleton job.
2026-05-02 18:44:40 +08:00
hfshfg
5916ff5158 fix(ci): portable zip emit skeleton-only to stay under 2GB GitHub asset cap
The previous job ran setup.{sh,bat} on the runner which downloaded Node.js +
3.4 GB of OpenClaw deps (clawdbot, @sliverp, node-llama-cpp), pushing the
Windows zip past GitHub's 2 GB single-file limit.

The portable folder is designed to fetch deps on first launch via setup.sh —
ship just the source skeleton (~1 MB) and let the user-side script populate
app/runtime + app/core/node_modules from China mirrors at first launch.

This also collapses portable-windows + portable-mac into one ubuntu-runner
job since the skeleton is platform-agnostic.
2026-05-02 17:27:54 +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
efeec6473e chore(ci): remove obsolete daily-content workflow
website/ 已拆分到 u-claw.org 私有仓库,本仓库的 Daily Content Generator
工作流写入路径不存在,每天定时失败。直接删除工作流和对应脚本。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 21:14:01 +08:00
hfshfg
b0a9cb3f58 fix(install): npm-cli.js path + CONTRIBUTING/PR template
install.sh: bundled Node 的 INSTALL_NPM 之前指向 bin/npm shell wrapper,
通过 \"node npm\" 调用会失败。改为 lib/node_modules/npm/bin/npm-cli.js,
并加 run_npm() 帮助函数区分系统 Node(用 npm 可执行)和 bundled Node。

install.ps1: 系统 Node 场景下 npm-cli.js 路径推导脆弱。改为按候选路径
依次试探,找不到则直接退到 npm.cmd。

新增 CONTRIBUTING.md + .github/PULL_REQUEST_TEMPLATE.md,规范 PR 流程,
减少空白/无说明 PR(对应 issue PR #36)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:41:42 +08:00
hfshfg
2b7522d173 docs: 扩充 FAQ + 添加 Issue 模板
- README FAQ 新增 8 个高频问题(Node 版本兼容、npm 安装失败、U 盘格式、多 provider 配置、QQbot 编译等),中英文同步更新
- 新增 .github/ISSUE_TEMPLATE/:bug 报告模板(含环境信息字段)、功能建议模板、config.yml(禁用空白 issue,引导至 FAQ 和教程)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:47:30 +08:00
hfshfg
840e8ef734 fix: switch to DeepSeek API (deepseek-chat) 2026-04-02 20:34:15 +08:00
hfshfg
c22ab032ec fix: switch to ZhipuAI GLM-4-Plus API 2026-04-02 20:28:45 +08:00
hfshfg
f3530888f3 feat: add daily tip & case auto-publish system
- GitHub Actions workflow: daily-content.yml (UTC 00:00 / 北京 08:00)
- Content generation script: .github/scripts/generate-daily.js (Claude API)
- Initial data: website/daily/data.json
- website/index.html: new 每日精选 section with bilingual support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 20:07:03 +08:00