56 Commits
Author SHA1 Message Date
Dylan 04b8652fec refactor(openclaw): migrate runtime hotfixes to version-specific source-level git patches
Replace the code-level string-replacement hotfix system (openclawRuntimeHotfix.ts)
with git patch files applied to OpenClaw TypeScript sources before compilation.
Patches are now organized under scripts/patches/<version>/ directories, tied to
the openclaw version declared in package.json.

- Move 8 patch files into scripts/patches/v2026.3.2/
- Update apply-openclaw-patches.cjs to resolve version from package.json
- Update build-openclaw-runtime.sh patch hash to use versioned directory
- Remove openclaw:hotfix build step from all 6 platform build chains
- Delete openclawRuntimeHotfix.ts, apply-openclaw-runtime-hotfixes.cjs, and tests
- Remove applyRuntimeHotfixes() from openclawEngineManager.ts

Signed-off-by: Dylan <[email protected]>
2026-03-24 11:18:25 +08:00
liuzhq fc692b99d6 feat(im): 新增微信 IM 接入,支持扫码绑定微信机器人
- 新增 weixin 平台类型定义、默认配置与 Redux 状态管理
- 集成 openclaw-weixin 插件,通过 OpenClaw Gateway RPC 实现二维码扫码登录
- 新增微信 IM 设置面板(二维码扫码、DM/群策略、连通性测试)
- 同步微信配置至 OpenClaw channels.openclaw-weixin
- 安装后自动补丁 openclaw-weixin 插件的 gatewayMethods 声明
- 新增中英文 i18n 翻译,微信在 IM 列表中位于企微上方
2026-03-22 16:24:28 +08:00
zhangxiaochang 319bf96aab refactor(openclaw): remove warmup and clean up diagnostic code
- Remove warmupCompileCacheIfNeeded and its execFile import since
  ELECTRON_RUN_AS_NODE warmup cache is incompatible with gateway's
  spawn context (1514 vs 6026 cache files, never hit)
- Remove NSIS install-time warmup (wrote cache to wrong admin path)
- Add Windows Defender exclusion for cfmind/ during NSIS install
  to reduce first-launch I/O overhead from Defender scanning
- Clean up Defender exclusion on uninstall
- Simplify gateway-launcher.cjs to minimal logging
- Remove warmup-compile-cache.cjs copy step from bundle script
2026-03-21 12:01:11 +08:00
zhangxiaochang 2c8ca97c52 perf(openclaw): skip runtime hotfixes when gateway bundle exists 2026-03-21 12:01:10 +08:00
zhangxiaochang 744285eff7 perf: optimize Windows first-launch startup performance 2026-03-21 12:01:10 +08:00
xumengxiang 6eecc40b07 feat(im): add one-click Feishu bot creation via QR code device flow 2026-03-20 14:28:24 +08:00
btc69m979y-dotcom 88c082c208 Merge pull request #548 from winsan-zhang/feature/prune-openclaw
fix: stop stubbing playwright-core and pdfjs-dist in OpenClaw runtime…
2026-03-20 11:11:51 +08:00
zhangxiaochang c4f629eaa5 fix: stop stubbing playwright-core and pdfjs-dist in OpenClaw runtime pruning 2026-03-20 10:34:38 +08:00
liuzhq 79f958ab4f fix(build): 清理 stub 包后残留的 .bin 断链导致 macOS 签名失败 2026-03-19 21:41:39 +08:00
btc69m979y-dotcom 1a4f2a185a Merge pull request #475 from zhangheng18/fix-setup-python-runtime-pip
fix: 修复打包 Python 运行 pip 失败
2026-03-19 17:32:49 +08:00
zhangxiaochang 7e36c05056 add: 管理员权限安装 2026-03-19 14:42:13 +08:00
zhangxiaochang 34f0eae21b add: 优化tar打包逻辑 2026-03-19 09:56:13 +08:00
zhangxiaochang 9241078e78 add: 添加解压tar报错详细信息 2026-03-19 09:56:13 +08:00
zhangxiaochang 4a8c65041c refactor: 💡 修复tar包解压错误问题 2026-03-19 09:56:13 +08:00
zhangxiaochang aada56b643 add: skills filter 2026-03-19 09:56:13 +08:00
zhangxiaochang 8682cf290a refactor: 💡 add docs 2026-03-19 09:56:13 +08:00
DylanandSisyphus 3f2e525263 feat(build): extend tar-based Windows packaging to SKILLs and python-win
Move SKILLs from common extraResources to platform-specific sections so Windows can ship skills.tar and python-win.tar alongside cfmind.tar. All three archives are packed in beforePack, extracted by the NSIS customInstall macro via the shared unpack-cfmind.cjs script, then deleted to free disk space. Mac and Linux retain the original directory-copy approach.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
2026-03-19 09:56:13 +08:00
DylanandSisyphus de214d8281 feat(build): ship OpenClaw runtime as tar archive in Windows installer
Replace the extraResources directory copy of vendor/openclaw-runtime/current with a single cfmind.tar archive for Windows builds. The beforePack hook now packs the runtime into tar, electron-builder ships the tar as a resource, and the NSIS customInstall macro extracts it post-install using Electron's Node runtime before V8 warmup. This dramatically speeds up NSIS installation on NTFS by avoiding per-file 7z extraction of thousands of small files.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
2026-03-19 09:56:13 +08:00
DylanandSisyphus 060a95e22b feat(build): add tar pack/unpack scripts for Windows OpenClaw runtime
Add minimal zero-dependency POSIX ustar tar writer (pack-openclaw-tar.cjs) and reader (unpack-cfmind.cjs) for packing the OpenClaw runtime directory into a single archive at build time and extracting it during NSIS post-install. This avoids the slow per-file extraction of thousands of small files on NTFS.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
2026-03-19 09:56:13 +08:00
zhangxiaochang 50c38599fd add: remove mingit 2026-03-19 09:56:13 +08:00
zhangxiaochang b9db0a76a3 add: 精简extensions 2026-03-19 09:56:13 +08:00
zhangxiaochang f4c34f051c feat: prune openclaw 2026-03-19 09:56:13 +08:00
zhangheng18 8df7a19b5d fix: 修复打包 Python 运行 pip 失败 2026-03-17 22:07:31 +08:00
zhangxiaochang 3ca83092c4 feat: add popo 2026-03-17 19:28:02 +08:00
fisherdaddy 9fb5901e3e fix: 修复 MCP 不可用的问题 2026-03-16 02:34:59 +08:00
liuzhq b3f4d0acd3 refactor: 清理内置 VM 沙箱的构建脚本、打包配置和文档残留 2026-03-13 10:16:45 +08:00
liuzhq 776a0418e4 fix: 修复开发模式 Electron 启动时 main.js 未构建完的竞态问题,并修复 openclaw 插件预编译时核心内部引用解析失败 2026-03-12 19:49:14 +08:00
btc69m979y-dotcom 9a54e4ab61 Merge remote-tracking branch 'origin/feature/openclaw' into feat/openclaw-gateway-esbuild-bundle
# Conflicts:
#	package.json
2026-03-12 17:50:41 +08:00
btc69m979y-dotcomandClaude Opus 4.6 bc147d6d15 feat: pre-compile openclaw extension plugins to eliminate jiti overhead
Add scripts/precompile-openclaw-extensions.cjs that uses esbuild to
compile each extension's TypeScript entry point to JavaScript at build
time. This eliminates jiti's runtime Babel transpilation (~135s on
first Windows startup reduced to ~82s). Extensions already shipping
as .js (feishu-openclaw-plugin, wecom-openclaw-plugin) are skipped.

Also:
- Add install timing log to NSIS installer for diagnosing slow installs
- Hide empty details list (ShowInstDetails nevershow) since
  electron-builder uses 7z solid extraction with no per-file output
- Integrate precompile step into all openclaw:runtime:* build scripts

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-12 17:43:54 +08:00
btc69m979y-dotcomandClaude Opus 4.6 53b58234e9 fix: improve fresh-install gateway startup and installer UX
- Remove plugins from minimal openclaw config so gateway can bind port
  immediately on fresh install (plugins loaded via jiti were blocking
  httpServer.listen for minutes)
- Protect existing configs with IM plugin settings from being overwritten
  by minimal config on sync
- Show file extraction details in NSIS installer while hiding warmup
  operations from progress text
- Fix apply-openclaw-patches idempotent detection for patches containing
  new files

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-12 15:34:10 +08:00
BlxsseastandClaude Opus 4.5 a9053ce0eb fix: resolve macOS code signing failures
- Override isbinaryfile to ^5.0.0 to fix RangeError in @electron/osx-sign
- Add cleanup for broken symlinks in cfmind/extensions before signing

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-03-12 11:20:25 +08:00
btc69m979y-dotcomandClaude Opus 4.6 d3a54d98e2 fix: normalize asar paths for Windows compatibility in builder hooks
On Windows, @electron/asar listPackage() returns backslash-separated
paths (e.g. \dist\entry.js) but the validation code checks for
forward-slash paths (/dist/entry.js). Normalize to forward slashes.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-12 10:06:29 +08:00
btc69m979y-dotcomandClaude Opus 4.6 6d6041a0f5 feat: V8 compile cache warmup for faster gateway cold start
Enable V8 compile cache for the openclaw gateway to eliminate cold-start
V8 compilation overhead (~35s for the 26MB bundle).

Changes:
- Set NODE_COMPILE_CACHE env var in utilityProcess.fork() for ESM support
- Add enableCompileCache() + flushCompileCache() in gateway-launcher.cjs
- Add warmup-compile-cache.cjs script for pre-populating the cache
- Add NSIS post-install hook to run warmup during Windows installation
- Copy warmup script to runtime dir during bundle step

The compile cache is stored at <userData>/openclaw/state/.compile-cache
and persists across app restarts. On Windows NSIS install, the warmup
runs automatically after file extraction using ELECTRON_RUN_AS_NODE=1.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-11 19:16:49 +08:00
btc69m979y-dotcomandClaude Opus 4.6 2e13597f7d feat: 添加 openclaw gateway-entry patch 机制,跳过 CLI 开销
- 新增 scripts/patches/openclaw-gateway-entry.patch:
  为 openclaw 添加专用 gateway 入口(gateway-entry.ts),
  跳过 Commander CLI 基础设施,冷启动从 156s 降至 95s
- 新增 scripts/apply-openclaw-patches.cjs:
  自动化 patch 应用脚本,幂等执行,已应用则跳过
- 构建链中插入 openclaw:patch 步骤(ensure → patch → build)
- build-openclaw-runtime.sh 增加 patchHash 指纹,
  patch 文件变更时自动触发重新构建

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-11 16:58:14 +08:00
btc69m979y-dotcomandClaude Opus 4.6 3620a795df feat: esbuild 单文件 bundle 加速 openclaw gateway 启动
在 Electron utilityProcess 中,openclaw 的 ~1100 个 ESM 模块解析极慢
(80-100s)。通过 esbuild 将 dist/entry.js 打包为单文件 gateway-bundle.mjs,
使用 import() 动态加载,消除模块解析开销。

主要改动:
- 新增 scripts/bundle-openclaw-gateway.cjs: esbuild 打包脚本,带缓存检查
- package.json: 添加 openclaw:bundle 步骤到所有平台构建链
- openclawEngineManager.ts: launcher 优先 import(bundle),失败回退到 require(dist/entry.js)
- 添加 esbuild devDependency
- launcher 中 argv[1] patch 确保 isMainModule() 识别 bundle 为主入口
- banner 注入 createRequire 解决 ESM 上下文中 CJS 模块的 require() 问题

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-11 15:55:41 +08:00
btc69m979y-dotcomandClaude Opus 4.6 4a619bf29a fix: add --legacy-peer-deps to plugin dependency install
Prevents npm from installing peer dependencies (e.g. openclaw) into
plugin directories. The qqbot plugin's peerDependencies pulled in ~2 GB
of unnecessary packages; with this flag, only the 3 actual dependencies
(silk-wasm, ws, mpg123-decoder) are installed.

Ref: https://github.com/sliverp/qqbot/issues/89

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-10 11:46:20 +08:00
btc69m979y-dotcomandClaude Opus 4.6 f6211a89f0 feat: add generic OpenClaw plugin preinstall system
Add a plugin preinstall mechanism that declares plugins in package.json
(openclaw.plugins), auto-downloads them during development, and bundles
them into the runtime for production builds.

- Add openclaw.plugins array in package.json with DingTalk connector as first plugin
- Create scripts/ensure-openclaw-plugins.cjs for downloading and caching plugins
- Update all openclaw:runtime:* scripts to run plugin install after runtime build
- Update openclawConfigSync.ts to write plugins.allow + entries.enabled config
- Set OPENCLAW_BUNDLED_PLUGINS_DIR env var for reliable plugin discovery
- Add plugin verification in electron-builder-hooks.cjs beforePack
- Add vendor/openclaw-plugins/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-09 15:19:15 +08:00
btc69m979y-dotcomandClaude Opus 4.6 8d2d1a7ebd merge: sync main into feature/openclaw
Resolve conflicts:
- .gitignore: add .vscode/ from main
- package.json: bump version to 0.2.2, keep openclaw config
- Settings.tsx: adopt custom icon components from main, keep CpuChipIcon for openclaw

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-09 10:54:21 +08:00
btc69m979y-dotcomandClaude Opus 4.6 b9941e4ca2 fix: Windows compatibility fixes for OpenClaw runtime build and gateway
- Fix build cache check: use "node -" with process.argv instead of
  "node -e" with interpolated paths (MSYS2 path style breaks require())
- Fix unbound variable error: use ${OPENCLAW_FORCE_BUILD:-} for set -u
- Remove slow `du -sh` at end of build script (extremely slow on Windows)
- Use NTFS junction (Windows) / symlink (macOS/Linux) instead of
  fs.cpSync for near-instant runtime sync
- Fix asar extraction: preserve backslash paths for extractFile() lookup
- Fix gateway-launcher.cjs: use fs.realpathSync to resolve junctions
  when comparing process.argv[1] with __filename
- Fix client module loading: use require(path) instead of
  import(file://url) since TypeScript CJS output downgrades import()
  to require() which doesn't support file:// URLs
- Increase gateway boot timeout from 120s to 180s

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 19:15:44 +08:00
btc69m979y-dotcomandClaude Opus 4.6 6bb25e2ef2 feat: pin OpenClaw dependency to versioned releases with auto-fetch and build cache
- Add `openclaw.version` and `openclaw.repo` config in package.json
- Add `ensure-openclaw-version.cjs` to auto-clone or checkout the pinned tag
- Add build cache in `build-openclaw-runtime.sh` — skip rebuild when version matches
- Enhanced `runtime-build-info.json` with openclawVersion and openclawCommit
- Fix Windows: prefer Git Bash over WSL bash (WindowsApps\bash.exe)
- Fix Windows: normalize PATH env for bash, use relative script path
- Fix Windows: add `shell: true` for npm.cmd in openclaw-runtime-host.cjs
- Add `.gitattributes` to enforce LF line endings for .sh files
- Update README.md and README_zh.md with OpenClaw dev workflow and version management docs

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 16:35:07 +08:00
xumengxiang 4463609b4f feat: 支持群组、圈组中的@消息,移除 node-nim 依赖及打包配置,优化会话标题显示,调整日志打印级别 2026-03-06 13:12:54 +08:00
btc69m979y-dotcom 42f6c4437a Merge branch 'main' into feature/openclaw 2026-03-06 11:42:47 +08:00
fisherdaddy fc02bb1b31 fix: 修复 Windows 端沙箱不能用的 bug,更新沙箱镜像 2026-03-06 11:22:24 +08:00
btc69m979y-dotcomandClaude Opus 4.6 cc869c6646 fix: resolve OpenClaw gateway startup failures on Windows
Three issues prevented the gateway from starting on Windows after a fresh
runtime build:

1. The build script packs openclaw.mjs and dist/ into gateway.asar then
   deletes the originals, but utilityProcess.fork() cannot load ESM from
   inside .asar archives on Windows. Added auto-extraction of bare entry
   files from gateway.asar at startup (ensureBareEntryFiles) and at
   build-time (sync-openclaw-runtime-current.cjs).

2. The ESM loader misinterprets Windows drive letters (e.g. "D:") as URL
   schemes, causing ERR_UNSUPPORTED_ESM_URL_SCHEME. Added a CJS wrapper
   (gateway-launcher.cjs) that uses pathToFileURL() to load the ESM entry
   via a proper file:// URL.

3. OpenClaw's isMainModule() guard checks process.argv[1] basename against
   known entry pairs. The CJS wrapper patches argv[1] back to the ESM
   entry path so the guard recognizes it as the main module.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-05 12:00:29 +08:00
btc69m979y-dotcomandClaude Opus 4.6 aeb553d713 fix: Windows 兼容性修复 - OpenClaw runtime 构建和启动
- build-openclaw-runtime.sh: 修复 asar 校验在 Windows 上路径分隔符不匹配问题
  (Windows 上 @electron/asar 返回反斜杠路径,统一转为正斜杠后再比较)
- openclawEngineManager.ts: 优先使用解包的裸文件而非 asar 虚拟路径
  (utilityProcess.fork 在 Windows 上加载 asar 内 ESM 模块会静默失败)
- openclawEngineManager.ts: ensureConfigFile 确保 gateway.mode=local 存在
  (即使配置同步失败,gateway 也能正常启动)
- openclawEngineManager.ts: 添加 gateway 启动调试日志

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-04 16:54:49 +08:00
fisherdaddy 1c94dab5e0 feature: support openclaw 2026-03-04 12:00:43 +08:00
fisherdaddy 4ca5f8500f fix: 修复 Windows 端提示缺少 git bash 的问题 2026-03-02 22:02:51 +08:00
btc69m979y-dotcomandClaude Opus 4.6 ac4d371fe1 fix: Windows 打包时 skill 依赖安装失败 - spawnSync 无法解析 npm.cmd
Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-02 16:48:38 +08:00
fisherdaddy 976357179a chore: fix conflict 2026-03-02 13:57:05 +08:00
liuzhq 5b3bf25134 Merge branch 'main' into liuzhq/skill-optimize
Resolve package.json conflict: combine build:skills with setup:python-runtime
2026-03-01 19:33:05 +08:00