Commit Graph

267 Commits

Author SHA1 Message Date
45026b9d35 docs: 翻掉我上轮漏掉的三处,并修正发布说明里一条错误建议
Some checks failed
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
3221856d50 docs: 文档改为英文,并修正过时内容
Some checks failed
Tests / test (push) Has been cancelled
不是翻译 —— 多数文档描述的行为已经不存在了。

先修一个更基本的问题:我们不拥有 u-claw.org 域名,那是上游的。所以之前写在
README、诊断包提示、联系方式里的 help@u-claw.org 全都会把用户的问题发给
上游 —— 一个没有理由回复的人。改为指向我们自己的 issue tracker,并加断言
禁止再出现指向该域名的支持入口。

重写(内容过时,不是语言问题):
- install/README.md —— 还写着 10 个中国技能、DeepSeek 优先、国内镜像。
  现在按实际流程写:技能读 manifest、模型菜单 Gemini 优先、bundle 有
  SHA256 校验。并如实写明 curl|bash 在受管企业电脑上会被 EDR 拦。
- CLAUDE.md 的模型配置整节 —— 还在描述虾盘云首选卡片和 12 个 provider,
  那个界面已经换成单框 Key 输入了。
- SECURITY.md —— 安全报告原本指向上游维护者个人邮箱。fork 之后那条路由
  是错的:漏洞会发给写不了这份代码、也修不了的人。
- CONTRIBUTING.md —— 补上 fork 关系、pre-push 钩子怎么装、以及
  `node --test tests/` 为什么不能用。

翻译并保留:
- bootable/README.md、TROUBLESHOOTING.md —— 面向用户,顺带把
  「国内镜像」「小米/华为 BIOS 按键」等换成目标市场的实际情况

HANDOFF.md 重写为一份事故复盘:原文一半是过时的一次性交接笔记(引用的
website/guide.html 已不在本仓库),另一半是 persistence.dat 未格式化导致
启动失败的排查记录 —— 后者有长期价值,尤其是「读 offset 1080 的两字节
验证 ext4」这个判断方法,已同时写进 bootable/README.md。

bootable/IMPROVEMENTS_SUMMARY.md 保留中文,加了说明:它是上游 fork 前的
历史改进记录,没人引用,描述的是已完成的工作而非当前行为。翻译它反而会
让人误以为是现行文档。

新增 skills/en/uclaw-help —— 把「怎么用、东西在哪、出问题怎么办」做成
内置知识,每个角色都装。方案 C10.8:能问的产品才是不需要学的产品。
2026-08-17 19:12:07 +08:00
46a1218fc8 ci: 让测试真的跑起来(Gitea Actions + pre-push 钩子)
Some checks failed
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
Some checks failed
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
9a23aec097 docs: redesign README landing page
Some checks failed
Track OpenClaw upstream / Check upstream & auto-bump (push) Has been cancelled
2026-07-27 23:45:12 +08:00
hfshfg
77a3546459 chore(release): 发布 v2.1.17 — 修复 DeepSeek 已下线模型名
api.deepseek.com 停用 deepseek-chat,配置页和安装脚本仍写死旧名,导致选
DeepSeek 的客户每条消息都 400 失败且界面无报错。详见 0be55b9。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 22:46:11 +08:00
hfshfg
0be55b9064 fix(models): DeepSeek 写死已下线的 deepseek-chat,客户配完必坏
api.deepseek.com 已停用 deepseek-chat / deepseek-coder / deepseek-reasoner,
现在只接受 deepseek-v4-flash 和 deepseek-v4-pro,用旧名调用直接返回:

  400 The supported API model names are deepseek-v4-pro or
      deepseek-v4-flash, but you passed deepseek-chat.

Config.html 把 card.dataset.model 直接写进 openclaw.json 的 models[].id 和
agents.defaults.model.primary,所以客户只要在配置页点「DeepSeek」卡片,配出来
的就是必然失败的配置——网关照常 listening、webchat 照常连上,只在日志里刷
embedded_run_agent_end/isError=True,界面上表现为「发消息没反应」,极难自诊。

客户机 pc-5376 实测:连续 2 小时、20+ 次对话全部 400 失败。

改动(deepseek-chat -> deepseek-v4-flash):
- portable/Config.html                     data-model,落盘值
- portable/config-server/public/index.html data-model,落盘值(同一清单第 2 份拷贝)
- install/install.ps1                      交互式选项 1
- install/install.sh                       交互式选项 1 + 未知选项兜底
- u-claw-app/resources/Config.html         已废弃的 Electron 归档,一并改防止复活
- portable/Mac-Menu.command                提示文字
- portable/skills-cn/deepseek-helper/      技能文档模型表(会被 AI 读取并转述给用户)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 20:48:35 +08:00
u-claw-bot
735e4de854 chore(upstream): 跟随 OpenClaw 2026.7.1-2,发布 v2.1.16
自动跟踪上游:OpenClaw npm latest 升到 2026.7.1-2,
自动 bump 壳版本到 2.1.16 并打 tag 触发发版。
2026-07-19 04:17:40 +00:00
u-claw-bot
50a4e45ea4 chore(upstream): 跟随 OpenClaw 2026.7.1-1,发布 v2.1.15
自动跟踪上游:OpenClaw npm latest 升到 2026.7.1-1,
自动 bump 壳版本到 2.1.15 并打 tag 触发发版。
2026-07-18 03:49:16 +00:00
u-claw-bot
7c23358142 chore(upstream): 跟随 OpenClaw 2026.7.1,发布 v2.1.14
自动跟踪上游:OpenClaw npm latest 升到 2026.7.1,
自动 bump 壳版本到 2.1.14 并打 tag 触发发版。
2026-07-14 03:52:03 +00:00
hfshfg
02bf4ddf95 docs(readme): 顶部加 U-King 装机管家导流 + 代理合作加 U-King 分销条目
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 15:58:45 +08:00
u-claw-bot
b3fc827b60 chore(upstream): 跟随 OpenClaw 2026.6.11,发布 v2.1.13
自动跟踪上游:OpenClaw npm latest 升到 2026.6.11,
自动 bump 壳版本到 2.1.13 并打 tag 触发发版。
2026-07-01 05:15:56 +00:00
u-claw-bot
06113d8429 chore(upstream): 跟随 OpenClaw 2026.6.10,发布 v2.1.12
自动跟踪上游:OpenClaw npm latest 升到 2026.6.10,
自动 bump 壳版本到 2.1.12 并打 tag 触发发版。
2026-06-24 04:58:30 +00:00
hfshfg
6ab87c6b67 fix(portable): 微信扫码重定向/Telegram botToken/Windows 启动端口 (v2.1.11)
- 微信扫码卡死: config-server 跟随 IDC scaned_but_redirect 把后续轮询切到
  redirect_host,刷新二维码时重置 pollBaseUrl(扫码后不再卡住等不到 confirmed)。新增测试。
- Telegram 渠道改用 botToken(顶层 telegram 只认 botToken,旧 token 别名被静默忽略 → 连不上)。
- Windows-Start: 先起 config-server 再探测 gateway 端口,从 runtime.json 读实际
  configServerPort 并按该端口开 Config Center / 传给 wait-gateway(18788 被占也能开)。
- wait-gateway.bat: 用 ping 代替 timeout /t(避开 PATH 上 GNU coreutils timeout 冲突),接受 CONFIG_PORT 参数。
- Windows-Menu: IF 块内 echo 的 () 转义为 ^(^),修 v2.1.10 闪退回归。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 00:41:20 +08:00
hfshfg
3439db32ad feat(portable): 内网/局域网可用性工具包 + 启动绕代理 (v2.1.10)
便携版在内网/离线/受控浏览器环境下"配不上、用不了、查不清"的三个痛点工具化,
Win + Mac 双端,纯 Node 零依赖脚本,中文提示由 node 打印(.bat 保持纯 ASCII,
.command 保持 LF),三端真机验证(本机 Win / Mac mini / 客户机 pc-7512)。

新增工具:
- lib/intranet-check.mjs (+ Windows-IntranetFix.bat / Mac-IntranetFix.command)
  一键体检: 代理env + 直连可达 + 真发一条对话,分清"网络不通 vs 配置错"。
- lib/setup-local-model.mjs (+ Windows-LocalModel.bat / Mac-LocalModel.command)
  纯命令行配 Ollama / newapi 并当场实测,绕开打不开的 Control UI;写前自动备份+merge。
- lib/resolve-no-proxy.mjs 接入 Windows-Start.bat / Mac-Start.command:
  把配置里的模型 host 写进 NO_PROXY,避免系统代理劫持内网模型请求
  (OpenClaw 自身只 bypass loopback CDP,不管模型 host)。
- OpenClaw-Doctor.bat / Mac-OpenClaw-Doctor.command: 官方 doctor 的隔离进阶入口
  (只读、非交互;doctor 实跑慢且 TTY-only,故不进客户一键流程)。

测试: tests/windows-launchers.test.mjs 新增回归
- 客户面 .bat 必须纯 ASCII (UTF-8 中文会被 GBK cmd 读乱,报 usebackq 不是命令)
- macOS .command 必须 LF-only (CRLF 触发 bad interpreter: /bin/bash^M)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 18:53:21 +08:00
u-claw-bot
7805ee01f7 chore(upstream): 跟随 OpenClaw 2026.6.9,发布 v2.1.9
自动跟踪上游:OpenClaw npm latest 升到 2026.6.9,
自动 bump 壳版本到 2.1.9 并打 tag 触发发版。
2026-06-21 05:55:16 +00:00
hfshfg
d4fe3b6410 chore: bump version to 2.1.8
只发便携 U 盘版的首个补丁版:修 gateway.auth.scopes 致命 bug + 配置中心可见性。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 19:03:57 +08:00
hfshfg
19774a89ab fix(portable): honor bundled OpenClaw version on USB 2026-06-20 15:59:09 +08:00
hfshfg
8981c21262 fix(config): 移除 gateway.auth.scopes,修复保存后 gateway 起不来
Config.html 生成的 openclaw.json 里 gateway.auth 带 scopes:['operator.admin'],
被 OpenClaw 2026.6.x 的 strict schema 拒绝(gateway.auth: Invalid input),
导致用户选完模型保存后 gateway 启动失败。三个 Config 页统一为
{ mode:'local', auth:{ mode:'token', token:'uclaw' }, remote:{ token:'uclaw' } },
与服务页 public/index.html 及启动脚本默认配置对齐。

实测:虾盘云 Key + deepseek-v4-pro 直连 api.u-claw.org/v1 返回 200;
去 scopes 后 gateway 正常启动并加载 uclaw-cloud provider。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 15:51:26 +08:00
hfshfg
1517152a19 fix(portable): keep config center visible on startup 2026-06-20 12:16:42 +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
2697b893d5 chore: bump version to 2.1.7
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 22:45:59 +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
086fd35b29 chore: bump version to 2.1.6 2026-06-17 19:33:25 +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
f715aef9c9 perf(portable): U盘启动加速 — 缓存搬本机 + 启动首屏 + 首轮预热
便携版从 U 盘启动慢,瓶颈在 U 盘随机小写 IO + 首屏无反馈 + 首轮冷启动。
移植 v2 u-clawx 4.0 的 4 个可在纯脚本层复刻的手段(均零依赖、静默失败):

- portable-cache.mjs: 把浏览器 user-data(几百 MB 随机小写)+ V8 编译缓存
  从 U 盘搬到本机 SSD(win junction / mac symlink 重定向 .openclaw/browser,
  NODE_COMPILE_CACHE 落本机)。UUID 隔离让换盘符仍命中同一份缓存。
  业务数据(openclaw.json/memory/账号)仍留 U 盘,便携性不变。
- loading.html: 双击即弹的启动首屏,自轮询 /ready,gateway 真就绪后自动跳
  Dashboard——天然规避"gateway 没起就开 Dashboard 拒连"(issue #46/#48)。
- prewarm.mjs: gateway 首轮预热,后台静默唤醒 config/model 子系统。
- Windows-Start.bat: 等 config-server 改写死 timeout 为动态轮询 18788。
- wait-gateway.bat 退居兜底(首屏页负责主跳转)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 16:38:05 +08:00
hfshfg
29238fc423 fix(portable/mac): setup.sh 装不上 + Bonjour 广播 + 首次启动浏览器不开
在 macmini (Apple Silicon, macOS 15.6.1) 实测发现并修复 3 个 Mac 版问题:

1. setup.sh 漏 --ignore-scripts → 装不上 openclaw(致命)
   openclaw 的 preinstall 脚本会调系统 `node`,但便携版用 app/runtime 下的
   node(不在 PATH),未装 Node 的 Mac 用户 → "node: command not found" code 127。
   两条 npm install 补 --ignore-scripts --no-audit --no-fund --omit=dev,与
   Mac-Start.command 的 fallback install 对齐。

2. Mac-Start.command 没关 Bonjour → mDNS 自动对外广播
   macOS 上 bonjour 插件 auto-start(Win/Linux 是 opt-in)。实测日志:
   `bonjour: advertised ... state=announcing` + `no IPv4 address available on
   utun12`。本地用 Dashboard 不需要 LAN 发现。补 OPENCLAW_DISABLE_BONJOUR=1
   (Windows-Start.bat 早已设)。

3. 首次启动浏览器不自动打开(同 issue #46/#48,此前误判 Mac 无此问题)
   首次启动实测 94.5s(staging 35 个 bundled deps),但浏览器轮询只等 15s
   (30×0.5s) 就放弃。改为最多等 ~3 分钟 (180×1s),加"首次启动需 30-90 秒"
   提示,超时回退打开 Config Center。

三处修复均已在 macmini 端到端重测通过。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 12:02:48 +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
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
2d0f33d5a0 chore: 加 .gitattributes 锁定换行符(修跨平台脚本隐患)
core.autocrlf 在不同机器上会把 .command/.sh 转成 CRLF,导致 Mac 用户
双击 .command 报 bad interpreter。明确锁定:
- .bat/.cmd/.ps1 → CRLF(Windows 批处理需要)
- .command/.sh/.mjs/.js/.json → LF(Mac/Linux 需要)

附带把 install/README.md、Windows-Menu.bat 的换行一次性规范化(纯换行,
无内容改动)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 12:29:45 +08:00
hfshfg
01ed1348ef feat(portable): 交互式 CLI 启动器 + 3 个办公技能(采纳自 PR #36)
基于最新 main 重做 PR #36(fanjiazhen)中有价值的部分:
- OpenClaw-CLI.bat / Mac-OpenClaw-CLI.command:进阶用户双击打开一个配好
  便携环境(盘内 Node + 盘内数据 + .bin 入 PATH)的命令行,可直接敲
  openclaw 命令(chat/configure/doctor/gateway status 等)。
- skills-cn/ 新增 word-writer / excel-helper / ppt-designer 三个办公文本
  技能,与现有 10 个本地化技能(小红书/知乎等)互补,frontmatter 格式一致。

未采纳 PR #36 的其余部分:HTML 品牌改动、skill_zip 二进制、删充值.html。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 12:27:13 +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
c6a11b6aac build(portable): 把 OPENCLAW_VERSION 拷进 portable/ 让 U盘用户能读版本 + Start.bat 转义修复
setup.bat/setup.sh 打包时把版本文件 copy 进 portable/,U盘用户脱离 repo 根
也能读到版本号。Windows-Start.bat 修 cmd.exe 把未转义 ) 当块结束的坑(加 ^ 转义)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 12:58:01 +08:00
8000cabbage
3ff3661825 fix: stabilize Windows launchers for v2.1.4
Fix Windows portable, installer, and desktop launcher startup paths; bump desktop metadata to 2.1.4.
2026-05-19 14:30:34 +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
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