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
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
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
19774a89ab
fix(portable): honor bundled OpenClaw version on USB
2026-06-20 15:59:09 +08:00
hfshfg
1517152a19
fix(portable): keep config center visible on startup
2026-06-20 12:16:42 +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
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
b57aeb068c
fix portable config and qqbot packaging
2026-04-30 19:47:57 +08: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
hfshfg
5dc204ab4e
fix: 补全遗漏的 botToken 修复(config-server + 官网教程)
...
code review 发现三处漏修:
- fix(config-server/public/index.html): botToken → token,
这是实际运行的配置页面,漏改会导致用户配置后仍然 401
- fix(website/tutorial.html): 示例 JSON botToken → token
- fix(website/guide.html): 示例 JSON botToken → token
文档示例错误会导致用户手动配置时照抄出错
全仓库现已无 botToken 残留。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-01 10:04:24 +08:00
hfshfg
6569bcddf6
fix: Windows-Start.bat 启动修复 + Config Center 全面升级
...
Windows-Start.bat:
- 去掉 EnableDelayedExpansion,避免感叹号解析问题
- 用 config-server (18788端口) 替代直接打开 Config.html
- 去掉有 bug 的 token 读取(引号嵌套问题)
- 去掉 powershell 日志管道,简化启动流程
- 对齐 H 盘已验证可用的方案
Config Center (config-server/public/index.html):
- 步骤式引导:选模型 → 填 Key → 启动
- 11 个模型:MiniMax/Kimi/DeepSeek/智谱GLM/通义千问/豆包/OpenAI/Claude/Groq/硅基流动/自定义
- 4 个聊天平台:Telegram/QQ/飞书/企业微信
- Gateway 状态实时检测
- 正确的 OpenClaw v3 配置格式
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-20 10:47:52 +08:00
hfshfg
8ae4d87e4f
feat: add independent config server to replace Config.html
...
Replaces the problematic file:// protocol Config.html with a stable
Node.js HTTP server following industry standard patterns (n8n, Langflow).
Changes:
- Add portable/config-server/ with REST API (GET/POST /api/config)
- Add simplified Chinese/English web UI for AI model and QQ Bot config
- Update Windows-Start.bat to launch both services simultaneously
- Config Center on port 18788
- OpenClaw Gateway on port 18789
- Remove Config.html file:// protocol issues
- Use zero-dependency pure Node.js standard library
Benefits:
- No file:// CORS or WebSocket issues
- Industry-standard localhost HTTP pattern
- Simplified configuration interface for Chinese users
- Unified startup experience
🤖 Generated with Claude Code
2026-03-12 20:26:15 +08:00