0be8c3e3fe
ci: 将 workflow 的 runs-on 改为 internal_docker
...
Tests / test (push) Successful in 55s
自托管 Gitea runner 只注册了 internal_docker 标签,ubuntu-latest 会导致 job 永远排队。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-18 14:03:48 +08:00
45026b9d35
docs: 翻掉我上轮漏掉的三处,并修正发布说明里一条错误建议
...
Tests / test (push) Has been cancelled
上一轮我说"剩余中文都合理",说得太满。这三处不合理:
1. bootable/linux-setup/test-installation.sh —— 在用户的 Linux 机器上跑的
自检脚本,输出中英混杂(check "安装目录存在" ... "Directory $INSTALL_DIR")
2. issue / PR 模板 —— 贡献者第一眼看到的东西,而 CONTRIBUTING.md 已经是
英文了。顺带修掉模板里指向上游官网和上游微信的链接(那些我们控制不了),
改为指向本仓库。PR 模板加了一条"说明你在哪个平台跑过" —— 只在 Mac 上
验证过的 .bat 改动一直是本项目最主要的故障来源。
3. release.yml 的发布说明正文 —— 那是用户在 release 页面读到的文字,内容
还停留在旧产品(DeepSeek/通义、预装微信 QQ 钉钉飞书企微)。
第 3 项里还有一条**和事实相反**的建议:它让用户把 U 盘格式化成 NTFS。
macOS 对 NTFS 只读,照做正好会让"配置跟着盘走"这个核心卖点在 Mac 上
彻底失效。改为 exFAT,并说明为什么慢、以及我们如何用本机缓存补偿。
track-upstream.yml 的输入描述和输出也翻了 —— 它们会显示给手动触发
workflow 的人。
2026-08-17 19:24:55 +08:00
46a1218fc8
ci: 让测试真的跑起来(Gitea Actions + pre-push 钩子)
...
Tests / test (push) Has been cancelled
`node --test tests/` 在 Node 22 上根本不工作 —— Node 把路径当模块加载,
报 "Cannot find module .../tests",退出码 1,零个测试执行。而这条命令在
CLAUDE.md 里被当作标准用法记了很久。这大概就是这套断言从来没人跑起来的
一个主要原因:照文档敲,得到一个看不懂的错误。
正确形式是裸 `node --test`(自动发现 **/*.test.mjs)。四处全改,并加断言
钉住 —— 我自己第一版钩子和 workflow 也照抄了那个错误形式,实测才发现
它会无条件拦住每一次 push。
- .gitea/workflows/tests.yml:Gitea 原生位置。用 node 容器而非 setup-node,
自建 Gitea 上后者要从 GitHub 拉,是新 runner 上又一个可能缺的东西。
容器 tag 与 NODE_VERSION 绑定,否则 CI 测的运行时和出货的不是一个。
- .github/workflows/tests.yml:镜像一份,断言保证两边执行内容一致。
- .githooks/pre-push:不依赖任何 runner 的兜底。实测过它会拦下失败的 push。
写明 --no-verify 怎么跳过 —— 拦不掉的钩子会被第一个被卡住的人删掉。
为什么需要钩子这一层:这台 Gitea 的 Actions 是开着的,但推上去的 workflow
产生了 0 次运行(total_count: 0),runner API 要鉴权查不了,最可能是没注册
runner。钩子是唯一完全不需要服务端支持的一层。
CLAUDE.md 补上 `git config core.hooksPath .githooks` —— 钩子是 per-clone 的,
没人替你装。
2026-08-17 18:46:53 +08:00
b076815171
feat: 海外化改造(新加坡市场)—— 阶段 0-3
...
Tests / test (push) Has been cancelled
按 U-Claw-海外化改造方案.md 与 范围决策记录.md 实施。这是 fork,不回上游:
海外版删掉的正是上游的中国市场默认值。
阶段 0 地基
- 下载源全部改国际:脚本/CI 61 处 + lockfile 880 条 npmmirror URL 归零
(lockfile 那 880 条是 npm 的 resolved 字段,脚本层参数化根本绕不过它)
- 移除 install.ps1 里三个第三方 GitHub 加速代理,bundle 改直连 + SHA256 校验
(原来只检查"文件大于 1MB"就解压运行)
- 技能内容与分发分离:skills/manifest.json 单一来源,install.sh 1170→658 行、
install.ps1 721→546 行,两者技能内容归零
实测原来是三份不一致:skills-cn 完整、install.sh 约 40%、install.ps1 约 17%,
且 7 个通用技能只有 U 盘版有 —— 一键安装的用户一个能用的技能都没有
- Node 版本三种(v22.14/16/22.1)统一,新建 NODE_VERSION 单一来源
- Config 页三份合一。portable/Config.html 用根相对路径调 API 却只从 file:// 打开,
保存功能已静默失效两个月;现缩为 120 行重定向壳
- 测试接入 CI(此前 node --test 无人运行,所有断言形同虚设)
阶段 1 双语可用
- 浏览器侧 i18n:JSON 为源、生成经典 script(file:// 下 fetch 本地 JSON 被拦)
语言跟盘走不跟机器走:启动器写 data/.openclaw/locale.js
- 8 处硬编码 lang="zh-CN" 归零,data-i18n 覆盖 213 处,词条 en/zh 各 279 条
- B3 单框 Key:12 张模型卡 → 一个输入框,前缀识别 provider,
服务端 /api/test-key 发 1-token 请求实测,错误映射成人话
Key 填错到得知:从"直到对话失败"降到 ≤1 秒
- 区域格式 SG:DD/MM/YYYY、12 小时、S$、Asia/Singapore
(ICU 在 en-SG 下把 SGD 渲染成裸 $,与美元无法区分,故自行拼 S$)
- README 内容分叉而非翻译,§1.3 证据清单逐条清零
阶段 2 降门槛
- 启动逻辑上移 lib/start.mjs:Windows-Start.bat 220→28 行、
Mac-Start.command 235→33 行
修掉 Mac 侧两个 bug:控制台端口硬编码 18788(回落时打开死页)、
微信插件从未在 Mac 上安装
- U 盘根目录 23 → 3 个可点文件,其余进 advanced/
- 首启向导:语言 → 用途(7 角色,manifest 驱动)→ 密钥,答过不再问
- 三档界面,Simple 档隐藏一切技术名词
- 自动自愈:启动失败先自查自修,修不好导出脱敏诊断包
(Doctor 从"用户要知道去点的工具"变成后台机制)
阶段 3 技能库
- 19 个英文技能,planned 归零。sg-weather / sg-transport 的端点均实测过
- SkillHub 从 56 张手写第三方卡片改为 manifest 生成:703→125 行,中文归零
其他
- origin.json 收拢所有运行时地址,tests/origin.test.mjs 保证迁移不会漏
- portable/ 下用户可见中文归零(由断言保证)
- 82 项测试
未验证(本机无 Windows / 无 pwsh):
- install.ps1、setup.ps1 约 210 行改动从未经 PowerShell 解析器
- 完整启动路径仅在假 node + 假 openclaw 上冒烟
- 8 个 .bat 的盘根推导仅静态断言
详见 U盘实测清单.md
受阻:
- 隐藏黑窗口 —— 需代码签名证书(.vbs 已被 Windows 弃用,替代方案都要签名)
- 场景卡 —— OpenClaw 上游 Dashboard 无预填 prompt 接口
- 官网 36 条 —— 上游 2026-04-14 拆到私有仓库,无权限
2026-08-17 18:37:49 +08:00
hfshfg
8cd5dbfea4
chore: 停发并归档 Electron 桌面版,产品只保留便携 U 盘版
...
桌面 Electron 版是商业版 ClawX 已做得更好的事的劣化版,且启动坑多
(冷启动建编译缓存 >30s 撞写死的 30s 硬超时,绿色版每次解压 837MB
永远冷启动)。U-Claw 的本质是「插上 U 盘解压即用」,故停发桌面版,
只发便携版。
- release.yml: 删除 desktop-windows / desktop-mac 两个 job;publish
只依赖 portable-windows-full;发布说明去掉桌面安装版/dmg,只留便携版
- u-claw-app/DEPRECATED.md: 新增归档说明(停发原因、坑、如何捡回)
- u-claw-app/src/main.js: 顺带修 gateway 超时 30s→180s + spawn 加固定
NODE_COMPILE_CACHE(让归档代码处于可用状态)
- 删除 usb-release/: portable/ 的老前身,2026-04 后无人维护、全仓库零
引用,是「为什么有两个 U 盘版」的混乱源
- README.md / CLAUDE.md: 分发形态更新为便携版唯一主发
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-20 00:15:32 +08:00
hfshfg
dcc034fa85
ci: 新增自动跟踪 OpenClaw 上游 workflow
...
每天 cron 检测 npm openclaw 新版,自动 bump 壳版本+改 OPENCLAW_VERSION+打 tag
触发 release.yml 发版。借鉴 agentkernel/openclaw-desktop 的 pin 思路,
补上其缺失的定时自动发版。半自动模式(推 tag 后手动 Run release)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 22:45:59 +08:00
hfshfg
8bffa5d9d7
feat(portable): 预装国内渠道+本地模型自动发现+4个新技能
...
- release.yml 便携包离线预装 钉钉/飞书中国版/企业微信 插件(借鉴 openclaw-china 生态)
- config-server 新增 /api/local-models:自动探测 Ollama/LM Studio 本地模型(借鉴 RealShocky/openclaw-windows)
- Config.html 检测到本地模型自动生成卡片、免 Key 点选即用;新增钉钉渠道卡片
- skills-cn 新增 pdf-toolkit/web-to-markdown/qrcode-maker/image-compress(13→17)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 22:45:59 +08:00
hfshfg
4fab64e877
fix(wechat): 便携包打包微信插件 + 修连接成功却报「插件未安装」的矛盾提示
...
根因:微信插件 @tencent-weixin/openclaw-weixin 是独立 npm 包,但 setup/CI
从没装过它,portable/app/ 又被 gitignore —— 发布包 app/extensions/ 是空的,
客户扫码连上后 config-server 找不到插件源,报「插件未安装」。
- release.yml: 装 @tencent-weixin/openclaw-weixin@latest 到 app/extensions/
(npm 包自带 dist/index.js 无需 build;显式把 qrcode-terminal 放进插件
node_modules 以满足 server.js:52 的硬要求)
- config-server/public/index.html: 去掉「连接成功」却又「插件未安装」的自相
矛盾提示。后端已自动装插件+写好 openclaw.json+存账号,只需重启即可,
不再暴露 pluginInstalled 内部状态吓客户,改为清晰的「重启 U-Claw 即可用」
- config-server/server.js: 插件 copy 失败时容错(不抛错中断 confirmed 流程)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 19:33:25 +08:00
hfshfg
7b561009a5
docs(release): 修正发布正文 — 虾盘云链接改 cloud.u-claw.org + 措辞改注册创建 Key
...
- u-claw.org/cloud.html 会 301 跳 www 成坏链,改为 cloud.u-claw.org(实测可达不跳转)
- 措辞从「选模型填 Key 即可」改为「虾盘云需先到控制台注册创建 Key」,
与 cloud.html 停用前端一键生成的口径一致
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 17:35:05 +08:00
hfshfg
df96be9af9
fix(release): 桌面版版本号跟 git tag 自动联动
...
之前 electron-builder 从 package.json 取版本号(写死 2.1.4),
导致 dmg/exe 文件名与 git tag(v2.1.5)脱节。
- 两个 electron build job 在构建前用 tag 号同步 package.json
(npm version --no-git-tag-version),文件名自动跟 tag 走
- bump package.json 到 2.1.5 保持本地一致
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-17 17:27:00 +08:00
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
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
c75188f935
fix(ci): match Stanley pattern — only install openclaw, skip bundled deps
...
v2.1.3 first build was 540MB (vs Stanley 153MB). Investigation:
- Our zip: app/core/node_modules = 1200MB unzipped (467 dirs)
- Stanley: node_modules = 365MB unzipped (361 dirs)
Single biggest offender: @node-llama-cpp at 701MB (local LLM binary,
pulled transitively via clawdbot when we pre-installed bundled deps).
Stanley only `npm install openclaw` (transitive resolution gets ~360
dirs, no bundled plugin deps). OpenClaw lazy-stages plugin deps at
runtime. We were forcing pre-install of all 36 bundled deps which
pulled @node-llama-cpp + clawdbot tree.
Fix:
- Drop the "pre-install bundled deps" loop entirely
- Keep belt-and-suspenders prune of @node-llama-cpp in case it shows
up via a different transitive path
2026-05-04 11:27:57 +08:00
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