Commit Graph
33 Commits
Author SHA1 Message Date
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
fisherdaddy 298aa63caa feature: add bundled Windows Python runtime support 2026-03-01 19:27:51 +08:00
liuzhq 703b2366ff feat: bundle rss-parser for technology-news-search skill 2026-02-27 10:44:19 +08:00
fisherdaddy 81d69d83b9 support openclaw engine 2026-02-26 12:34:21 +08:00
liuzhq 709dcf3d7e feat: add automatic dependency management for imap-smtp-email skill 2026-02-25 12:21:37 +08:00
xumengxiang bab44b16ca fix: mac平台打Windows包运行node-nim报错 2026-02-24 09:16:38 +08:00
fisherdaddy 3ab5afbc53 Initial open-source release 2026-02-19 04:22:03 +08:00