Commit Graph

227 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
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
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
1bf5402d34 fix(bootable+install): harden persistence script, setup-openclaw, install.sh + add SECURITY.md
- 3-create-persistence.ps1: chain dd && mkfs.ext4 with && (was ;, so dd
  failures still ran mkfs and produced bogus images); fix \wsl$\$wslDistro
  variable expansion ambiguity using \${wslDistro}; mirror docker-desktop
  branch with the same && chaining
- setup-openclaw.sh: guard mktemp failure; ensure partial node tarballs are
  cleaned via EXIT trap; tolerate hosts with no non-loopback NIC under
  pipefail; don't let test-installation.sh failure exit the post-install
- install.sh: add `set -o pipefail`; surface npm install failures (was
  hidden by `| tail -5`); JSON-escape user-provided API_KEY before writing
  to openclaw.json so keys with backslashes/quotes don't break the config
- Add SECURITY.md: private disclosure channel + scope
2026-05-01 15:45:32 +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
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
88cf2b2dc4 fix(portable/setup.ps1): cd to core dir before npm install
When users run setup.ps1 from PowerShell with cwd outside the repo
(e.g. C:\Users\Admin>), npm 11 walks up looking for package.json and
errors with ENOENT before honoring --prefix. setup.bat already pushd's
into core; setup.ps1 was missing the equivalent Push-Location guard.

Fixes #27 (setup.ps1 ENOENT package.json reported by lawler-code).
2026-05-01 15:29:04 +08:00
hfshfg
efebe923aa fix windows install node version guard 2026-04-30 19:50:15 +08:00
hfshfg
b57aeb068c fix portable config and qqbot packaging 2026-04-30 19:47:57 +08:00
hfshfg
a42a1269a4 docs: 署名改为贺去病 ai 工作室 2026-04-21 12:17:28 +08:00
hfshfg
3ff102f1d0 docs: 添加微信二维码 + 代理合作招募
- 新增 assets/wechat-qr.jpg(贺去病 ai 工作室微信二维码)
- README 中文/英文联系区域各插入二维码图片和代理合作说明

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 12:16:06 +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
a254486ca1 docs: CLAUDE.md 添加虾航导航站说明
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 15:05:18 +08:00
hfshfg
d52755ea86 docs: 更新 CLAUDE.md,移除 website 相关内容
官网已拆分到独立仓库 u-claw.org

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 11:55:29 +08:00
hfshfg
0298a0ac17 chore: 删除 website 残留文件
rebase 后残留的新增文件,已迁移至 u-claw.org 仓库

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 11:48:14 +08:00
hfshfg
65f830ef56 refactor: 拆分官网到独立仓库 u-claw.org
website/ 和 vercel.json 已迁移到 https://github.com/dongsheng123132/u-claw.org
本仓库专注于开源工具(portable/install/bootable/u-claw-app)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 11:47:04 +08:00
github-actions[bot]
a1ca40b598 chore: update daily content 2026-04-14 2026-04-14 03:33:24 +00:00
dongsheng123132
d5f372f77a fix: add uninstall.ps1, restore privacy.html and terms.html
- uninstall.ps1: Windows one-click uninstall script (was 404)
- privacy.html & terms.html: restore from server (were missing on Vercel)
2026-04-13 18:25:31 +08:00
dongsheng123132
49b875b081 feat: add uninstall.sh for one-click uninstall 2026-04-13 18:17:14 +08:00
dongsheng123132
c6e87b8183 feat: add one-click uninstall + Intel Mac support
- agent.sh: add --uninstall flag, detect arm64/x86_64 for macOS
- agent.html: add uninstall section with tab switching
- guide.html: replace simple uninstall with full one-click uninstall blocks
  in both oneclick-install and remote-support sections
- downloads: add agent-mac-intel binary for Intel Mac users
2026-04-13 17:47:24 +08:00
github-actions[bot]
c4c9e829f4 chore: update daily content 2026-04-13 2026-04-13 03:45:22 +00:00
hfshfg
6685f6be51 chore: add .env to .gitignore
Prevent accidental commit of environment variable files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:33:06 +08:00
github-actions[bot]
b0be519d25 chore: update daily content 2026-04-12 2026-04-12 03:37:49 +00:00
github-actions[bot]
6466775595 chore: update daily content 2026-04-11 2026-04-11 02:56:46 +00:00
github-actions[bot]
84f3330590 chore: update daily content 2026-04-10 2026-04-10 03:33:42 +00:00
hfshfg
690d1b7060 fix: 修复 QQ Bot 配置后 Gateway 无法启动的问题
1. 清除旧版 "agent" 废弃键 — 保存 channel 配置时自动删除旧的 agent 键,
   防止 OpenClaw 报 "agent.* was moved" 错误(前端 + 服务端双重防御)
2. Dashboard URL 动态端口探测 — 将硬编码 18789 改为扫描 18789-18799,
   解决端口被占用时打不开 Dashboard 的问题
3. 安装脚本配置格式升级 — install.sh / install.ps1 / install-silent.ps1
   生成的 openclaw.json 从旧的 "agent" 格式迁移到 "agents.defaults.model.primary"
4. 文档示例同步更新 — CLAUDE.md / cloud.html / guide.html 中的配置示例

影响文件: 14 个(portable/, install/, website/, u-claw-app/, usb-release/)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 22:05:09 +08:00
hfshfg
220599584e feat: add WeChat QR code login to config-server
Add in-app WeChat scanning via Tencent iLink API:
- server.js: QR code PNG renderer, WeChat API proxy, plugin auto-install
- index.html: WeChat channel card with QR display and polling UI
- Windows-Start.bat: auto-install WeChat plugin on startup
- Windows-Install.bat: copy WeChat plugin during installation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 22:03:20 +08:00
github-actions[bot]
65f9bc3df0 chore: update daily content 2026-04-09 2026-04-09 03:19:51 +00:00
github-actions[bot]
b99d8ee6cb chore: update daily content 2026-04-08 2026-04-08 03:26:05 +00:00
github-actions[bot]
47447433b7 chore: update daily content 2026-04-07 2026-04-07 03:23:14 +00:00
hfshfg
42b2ead421 feat: cloud.html 自动读取URL ?key=参数并填入充值输入框
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:55:15 +08:00
hfshfg
e67c6a5586 feat: 虾盘云API导航按钮改为可用,链接到cloud.u-claw.org
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:52:52 +08:00
hfshfg
e9c508a27e fix: 充值页改为浅色风格,仅支付宝,余额401显示新用户提示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:52:39 +08:00
hfshfg
6598eaaa35 fix: 充值.html 余额显示乘以7.2换算为CNY
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:27:45 +08:00
hfshfg
8d2c5be25f fix: 兼容 new-api 后台创建的 token 格式
validateKey 正则从只认 sk-xp-+32位hex,
改为同时支持 sk-+48位字母数字(new-api 后台 token)。
同步更新 placeholder、错误提示、FAQ 文字。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:24:35 +08:00
hfshfg
2c309be648 feat: 虾盘云上线 - 重写 cloud.html,新增 docs.html 开发文档
- cloud.html: 完整重写,加入余额查询、充值流程、全功能 JS
- 导航:暂不可用 → 立即充值,新增余额查询/开发文档导航链接
- docs.html: 新增开发者文档页,含接口说明/代码示例/在线测试

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 15:42:26 +08:00
github-actions[bot]
6fbc7f49db chore: update daily content 2026-04-06 2026-04-06 03:33:23 +00:00
github-actions[bot]
1d9c2cac69 chore: update daily content 2026-04-05 2026-04-05 03:30:26 +00:00
hfshfg
70fc030e8e fix: replace setup.bat with complete version (add QQ plugin + --all-platforms)
PR #13 (luckylibin) version includes:
- QQ plugin installation step (was missing)
- --all-platforms flag to download Mac Node.js runtimes
- More robust error handling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 22:28:36 +08:00
hfshfg
974a59d3ba docs: clarify Windows setup options (setup.bat / setup.ps1) in README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 21:25:27 +08:00
dongsheng123132
c0ea59e16f feat: add Windows setup.ps1 for portable
# Add Windows setup.ps1 for portable
2026-04-04 21:21:57 +08:00
dongsheng123132
1f9726ac16 docs: add Japanese README section
docs: add JA section
2026-04-04 21:21:54 +08:00
github-actions[bot]
8490306cb7 chore: update daily content 2026-04-04 2026-04-04 02:52:29 +00:00
github-actions[bot]
cadfd62cb5 chore: update daily content 2026-04-03 2026-04-03 03:19:59 +00:00
github-actions[bot]
1b465bf249 chore: update daily content 2026-04-02 2026-04-02 12:34:55 +00:00