create-openclaw-bot 5.2.2 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,106 @@
1
+ name: Check OpenClaw Version
2
+
3
+ on:
4
+ schedule:
5
+ # Run daily at 08:00 UTC (15:00 Vietnam time)
6
+ - cron: '0 8 * * *'
7
+ workflow_dispatch: # Allow manual trigger from GitHub Actions tab
8
+
9
+ jobs:
10
+ check-version:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ issues: write
14
+ contents: read
15
+
16
+ steps:
17
+ - name: Checkout repo
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '22'
24
+
25
+ - name: Get pinned vs latest version
26
+ id: versions
27
+ run: |
28
+ # Extract pinned version from cli.js e.g. 'openclaw@2026.4.5'
29
+ PINNED=$(grep -oP "OPENCLAW_NPM_SPEC\s*=\s*'openclaw@\K[^']+" cli.js | head -1)
30
+ echo "pinned=$PINNED" >> $GITHUB_OUTPUT
31
+
32
+ # Get latest version from npm registry
33
+ LATEST=$(npm view openclaw version 2>/dev/null || echo "")
34
+ echo "latest=$LATEST" >> $GITHUB_OUTPUT
35
+
36
+ echo "Pinned in repo : $PINNED"
37
+ echo "Latest on npm : $LATEST"
38
+
39
+ - name: Check if update needed
40
+ id: check
41
+ run: |
42
+ PINNED="${{ steps.versions.outputs.pinned }}"
43
+ LATEST="${{ steps.versions.outputs.latest }}"
44
+
45
+ if [ -z "$LATEST" ]; then
46
+ echo "needs_update=false" >> $GITHUB_OUTPUT
47
+ echo "WARNING: Could not fetch latest version from npm"
48
+ exit 0
49
+ fi
50
+
51
+ if [ "$PINNED" = "$LATEST" ]; then
52
+ echo "needs_update=false" >> $GITHUB_OUTPUT
53
+ echo "OK: Already on $PINNED"
54
+ else
55
+ echo "needs_update=true" >> $GITHUB_OUTPUT
56
+ echo "OUTDATED: pinned=$PINNED, latest=$LATEST"
57
+ fi
58
+
59
+ - name: Check if issue already exists
60
+ id: existing
61
+ if: steps.check.outputs.needs_update == 'true'
62
+ env:
63
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64
+ run: |
65
+ LATEST="${{ steps.versions.outputs.latest }}"
66
+ EXISTING=$(gh issue list --label "openclaw-update" --state open --json title -q ".[].title" | grep "$LATEST" | head -1)
67
+ if [ -n "$EXISTING" ]; then
68
+ echo "skip=true" >> $GITHUB_OUTPUT
69
+ echo "Issue already exists for $LATEST"
70
+ else
71
+ echo "skip=false" >> $GITHUB_OUTPUT
72
+ fi
73
+
74
+ - name: Create GitHub Issue
75
+ if: steps.check.outputs.needs_update == 'true' && steps.existing.outputs.skip != 'true'
76
+ env:
77
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78
+ run: |
79
+ PINNED="${{ steps.versions.outputs.pinned }}"
80
+ LATEST="${{ steps.versions.outputs.latest }}"
81
+
82
+ gh issue create \
83
+ --title "🔔 openclaw $LATEST available (pinned: $PINNED)" \
84
+ --label "openclaw-update" \
85
+ --body "## OpenClaw có phiên bản mới
86
+
87
+ | | Version |
88
+ |---|---|
89
+ | 📌 Đang dùng | \`$PINNED\` |
90
+ | 🆕 Mới nhất | \`$LATEST\` |
91
+
92
+ ## Việc cần làm
93
+
94
+ 1. Xem changelog tại: https://www.npmjs.com/package/openclaw?activeTab=versions
95
+ 2. Test upgrade thủ công: \`npx create-openclaw-bot@latest upgrade\` tại thư mục bot
96
+ 3. Kiểm tra các API mới / breaking changes trong phiên bản mới
97
+ 4. Cập nhật \`OPENCLAW_NPM_SPEC\` trong \`cli.js\` và \`setup.js\`:
98
+
99
+ \`\`\`
100
+ const OPENCLAW_NPM_SPEC = 'openclaw@$LATEST';
101
+ \`\`\`
102
+
103
+ 5. Chạy \`npm test\`, chạy \`/update\` để release bản mới của \`create-openclaw-bot\`
104
+
105
+ ---
106
+ *Tự động phát hiện bởi [check-openclaw-update workflow](/.github/workflows/check-openclaw-update.yml)*"
package/CHANGELOG.md CHANGED
@@ -1,8 +1,37 @@
1
1
  # Changelog (English)
2
2
 
3
3
 
4
+ ## [5.3.0] — 2026-04-11
5
+
6
+ ### 🆕 Multi-Channel: Telegram + Zalo Personal Simultaneously
7
+
8
+ - **Combo channel option** — New `telegram+zalo-personal` option in both CLI wizard (`select`) and web wizard (channel card). Selecting it configures a single bot to receive messages from both Telegram and Zalo Personal at the same time.
9
+ - **Auto-inject `plugins.entries.zalouser`** — When any Zalo Personal channel is selected, `openclaw.json` now automatically includes `plugins.entries.zalouser: { enabled: true }`, fixing the root cause of the "not configured" error on Zalo startup.
10
+ - **Docker cold-start fix in Dockerfile CMD** — A background `(sleep 45 && node -e '...touch historyLimit...')` script is now baked into the generated `Dockerfile` CMD. Triggers chokidar → gateway hot-reload → `restartChannel('zalouser')` after Docker network warms up. No more manual `lastTouchedAt` workarounds.
11
+ - **Helper predicates** — Added `hasTelegram(ck)` and `hasZaloPersonal(ck)` functions replacing all literal `channelKey === 'telegram/zalo-personal'` comparisons throughout `cli.js` for cleaner extensibility.
12
+ - **Smoke tests updated** — `tests/smoke-cli-logic.mjs` updated to match the new predicate-based assertions (78 checks passing).
13
+
14
+ ## [5.2.4] — 2026-04-10
15
+
16
+ ### 🐛 Bug Fixes & Developer Tooling
17
+
18
+ - **Fix: `docker compose build --no-cache` during upgrade** — Removed the `--no-cache` flag from the upgrade flow. Without it, Docker correctly reuses cached layers (including Playwright/Chromium ~300MB) and only rebuilds the `openclaw` layer that changed, making upgrades significantly faster.
19
+ - **UX: Upgrade CLI banner now matches upgrade.ps1/sh style** — `runUpgrade()` in `cli.js` now renders the same ╭╮╰╯ box using visual-width calculation (`vw()`) instead of plain `===` separators.
20
+ - **New: GitHub Actions workflow to auto-detect openclaw updates** — `.github/workflows/check-openclaw-update.yml` runs daily, compares the pinned `OPENCLAW_NPM_SPEC` in `cli.js` with the latest version on npm, and automatically creates a GitHub Issue with upgrade instructions if a new version is available.
21
+
22
+ ## [5.2.3] — 2026-04-10
23
+
24
+ ### 🐛 Bug Fixes & Encoding Improvements
25
+
26
+ - **Fix: `ReferenceError: projectDir is not defined`** — Crash when clicking "Generate Configs" in multi-bot mode. `nativeProjectOpenClawRoot` in `buildTelegramPostInstallChecklist()` referenced an undefined `projectDir` variable and was dead code (unused in return value). Removed.
27
+ - **Fix: Step 3 "Next" button validation** — `state._activeBotTab` was a typo of `state.activeBotIndex`, causing multi-bot validation to always read the wrong tab index.
28
+ - **Fix: `saveFormData()` always saved bot tab name to `bots[0]`** — In multi-bot mode, the active bot name was always written to `bots[0]` regardless of which tab was active. Now correctly saves to `bots[state.activeBotIndex]`.
29
+ - **UX: Inline hint for disabled "Generate Configs" button** — When the button is blocked, a warning now appears showing exactly which fields are still missing (e.g. "Missing: GOOGLE_API_KEY").
30
+ - **Fix: Vietnamese diacritics in generated `.bat` and `.sh` scripts** — All Vietnamese echo/Write-Host strings in the generated Windows setup script and Linux/macOS bash script have been converted to ASCII (no diacritics) to prevent encoding errors on systems with non-UTF-8 codepages.
31
+
4
32
  ## [5.2.2] — 2026-04-10
5
33
 
34
+
6
35
  ### 🐛 Docker & Native PM2 Bug Fixes
7
36
 
8
37
  - **Fix Docker crash loop (socat port conflict)**: `socat TCP-LISTEN:18791` was binding `0.0.0.0:18791` before `openclaw gateway run` started, causing `EADDRINUSE` on `127.0.0.1:18791`. Removed the broken gateway bridge from the generated Dockerfile CMD in both `cli.js` and `setup.js`.
package/CHANGELOG.vi.md CHANGED
@@ -1,8 +1,29 @@
1
1
  # Changelog (Tiếng Việt)
2
2
 
3
3
 
4
+ ## [5.3.0] — 2026-04-11
5
+
6
+ ### 🆕 Đa Kênh: Telegram + Zalo Personal Cùng Lúc
7
+
8
+ - **Tuỳ chọn kênh combo** — Thêm `telegram+zalo-personal` vào CLI wizard (menu `select`) và web wizard (channel card). Chọn option này để cấu hình 1 bot nhận tin nhắn từ cả Telegram **và** Zalo Personal cùng lúc trong 1 config duy nhất.
9
+ - **Tự inject `plugins.entries.zalouser`** — Khi chọn bất kỳ kênh Zalo Personal nào, `openclaw.json` giờ tự thêm `plugins.entries.zalouser: { enabled: true }`, xử lý nguyên nhân gốc rễ của lỗi "not configured" khi Zalo khởi động.
10
+ - **Fix cold-start Docker tích hợp sẵn** — Script nền `(sleep 45 && node -e '...touch historyLimit...')` giờ được baked thẳng vào Dockerfile CMD được generate. Kích hoạt chokidar → hot-reload gateway → `restartChannel('zalouser')` sau khi Docker network ổn định. Không cần hack `lastTouchedAt` thủ công nữa.
11
+ - **Helper predicates** — Thêm `hasTelegram(ck)` và `hasZaloPersonal(ck)` thay thế tất cả so sánh literal `channelKey === 'telegram/zalo-personal'` trong `cli.js` để dễ mở rộng sau này.
12
+ - **Cập nhật smoke tests** — `tests/smoke-cli-logic.mjs` cập nhật để match logic predicate mới (78 checks passing).
13
+
14
+ ## [5.2.3] — 2026-04-10
15
+
16
+ ### 🐛 Sửa lỗi & Cải thiện encoding
17
+
18
+ - **Fix: `ReferenceError: projectDir is not defined`** — Crash khi bấm "Generate Configs" ở chế độ multi-bot. Biến `projectDir` không được khai báo trong `buildTelegramPostInstallChecklist()` và là dead code (không dùng trong return). Đã xoá.
19
+ - **Fix: Nút "Tiếp theo" ở Bước 3 bị validate sai** — `state._activeBotTab` là typo của `state.activeBotIndex`, khiến validation multi-bot luôn đọc sai tab index.
20
+ - **Fix: `saveFormData()` luôn lưu tên bot vào `bots[0]`** — Trong multi-bot mode, tên bot đang active bị ghi đè cố định vào `bots[0]` thay vì `bots[state.activeBotIndex]`. Đã sửa.
21
+ - **UX: Hiển thị gợi ý khi nút "Generate Configs" bị khoá** — Khi nút bị disable, một cảnh báo xuất hiện ngay bên dưới cho biết trường nào còn thiếu (ví dụ: "Còn thiếu: GOOGLE_API_KEY").
22
+ - **Fix: Tiếng Việt có dấu trong file `.bat` và `.sh` được tạo ra** — Toàn bộ chuỗi echo/Write-Host tiếng Việt có dấu trong script cài đặt cho Windows và Linux/macOS đã được chuyển về dạng không dấu (ASCII thuần) để tránh lỗi encoding trên các máy không dùng UTF-8.
23
+
4
24
  ## [5.2.2] — 2026-04-10
5
25
 
26
+
6
27
  ### 🐛 Sửa lỗi Docker & Native PM2
7
28
 
8
29
  - **Sửa crash loop Docker (xung đột port socat)**: `socat TCP-LISTEN:18791` chiếm port `0.0.0.0:18791` trước khi `openclaw gateway run` khởi động, gây `EADDRINUSE`. Đã xóa gateway bridge khỏi Dockerfile CMD trong `cli.js` và `setup.js`.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # 🦞 OpenClaw Setup
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.2.2-0EA5E9?style=for-the-badge" alt="Version 5.2.2" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.3.0-0EA5E9?style=for-the-badge" alt="Version 5.3.0" /></a>
7
7
  <a href="https://github.com/tuanminhhole/openclaw-setup?tab=MIT-1-ov-file"><img src="https://img.shields.io/badge/LICENSE-MIT-success?style=for-the-badge" alt="MIT License" /></a>
8
8
  <a href="https://www.npmjs.com/package/create-openclaw-bot"><img src="https://img.shields.io/npm/v/create-openclaw-bot?style=for-the-badge&label=CLI&color=2563EB&logo=npm&logoColor=white" alt="NPM Version" /></a>
9
9
  <a href="https://github.com/tuanminhhole/openclaw-setup/stargazers"><img src="https://img.shields.io/github/stars/tuanminhhole/openclaw-setup?style=for-the-badge&color=eab308&logo=github&logoColor=white" alt="GitHub Stars" /></a>
@@ -24,20 +24,20 @@ An interactive **CLI tool** and **Setup Wizard** to deploy your own free AI Bot
24
24
 
25
25
  ---
26
26
 
27
- ## 🆕 What's new in v5.2.2
27
+ ## 🆕 What's new in v5.3.0
28
+
29
+ - 📱 **Telegram + Zalo Personal together** — New combo channel option lets you run one bot on both Telegram **and** Zalo Personal simultaneously, from a single config. No separate setup needed.
30
+ - 🔌 **Auto-inject `zalouser` plugin** — When Zalo Personal is selected, the wizard now automatically adds `plugins.entries.zalouser` to `openclaw.json`, eliminating the most common Zalo "not configured" startup error.
31
+ - ⏱️ **Docker cold-start fix baked in** — Dockerfile CMD now includes a background 45-second trigger that forces Zalo channel initialization after Docker network is warm. No more manual `lastTouchedAt` hacks.
32
+
33
+ <details>
34
+ <summary><b>Previous: What's new in v5.2.3</b></summary>
28
35
 
29
36
  - 🔄 **One-command upgrade** — Run `npx create-openclaw-bot@latest upgrade` in your bot folder to update OpenClaw without re-running the wizard. Auto-detects Docker vs Native mode.
30
37
  - 🪟 **Windows upgrade shortcut** — `upgrade.ps1` ships with the repo. Double-click it to upgrade instantly (no terminal knowledge required).
31
38
  - 🐧 **Linux / macOS / Ubuntu upgrade** — `upgrade.sh` for Unix users. Run `bash upgrade.sh` locally or pipe via `curl` / `wget` directly from GitHub.
32
39
  - 🛡️ **All user data preserved** — `.env`, memory, sessions, credentials, and 9Router OAuth tokens are never touched during upgrade.
33
40
 
34
- <details>
35
- <summary><b>Previous: What's new in v5.2.2</b></summary>
36
-
37
- - 🔒 **Pinned OpenClaw version** — The OpenClaw update published on `April 8, 2026` is currently broken, so setup now stays on `openclaw@2026.4.5` for stability.
38
- - 🐳 **Dockerfile fixes** — Fixed the Windows Docker flow so startup no longer breaks on bad command escaping or invalid generated `allowedOrigins`.
39
- - 🟢 **Stable Node.js note** — Added guidance to use `Node.js 20` through `24`, and to avoid `Node.js 25` for now due to reported OpenClaw issues.
40
-
41
41
  </details>
42
42
 
43
43
  ---
@@ -110,7 +110,7 @@ Run in your terminal → follow the interactive prompts → startup script is ge
110
110
  2. Open this repo as your workspace
111
111
  3. Paste into chat:
112
112
  ```
113
- Read SETUP.md and set up OpenClaw v5.2.2 for me.
113
+ Read SETUP.md and set up OpenClaw v5.3.0 for me.
114
114
  My bot token is X. Use 9Router (no API key).
115
115
  My project folder: <YOUR_PATH>
116
116
  ```
package/README.vi.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # 🦞 OpenClaw Setup
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.2.2-0EA5E9?style=for-the-badge" alt="Version 5.2.2" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.3.0-0EA5E9?style=for-the-badge" alt="Version 5.3.0" /></a>
7
7
  <a href="https://github.com/tuanminhhole/openclaw-setup?tab=MIT-1-ov-file"><img src="https://img.shields.io/badge/LICENSE-MIT-success?style=for-the-badge" alt="MIT License" /></a>
8
8
  <a href="https://www.npmjs.com/package/create-openclaw-bot"><img src="https://img.shields.io/npm/v/create-openclaw-bot?style=for-the-badge&label=CLI&color=2563EB&logo=npm&logoColor=white" alt="NPM Version" /></a>
9
9
  <a href="https://github.com/tuanminhhole/openclaw-setup/stargazers"><img src="https://img.shields.io/github/stars/tuanminhhole/openclaw-setup?style=for-the-badge&color=eab308&logo=github&logoColor=white" alt="GitHub Stars" /></a>
@@ -24,20 +24,20 @@ Công cụ **CLI tương tác** và **Setup Wizard** để tự triển khai Bot
24
24
 
25
25
  ---
26
26
 
27
- ## 🆕 Có gì mới trong v5.2.2
27
+ ## 🆕 Có gì mới trong v5.3.0
28
+
29
+ - 📱 **Telegram + Zalo Personal cùng lúc** — Tuỳ chọn kênh combo mới cho phép chạy 1 bot trên cả Telegram **và** Zalo Personal cùng lúc, từ 1 config duy nhất. Không cần cài riêng.
30
+ - 🔌 **Tự cấu hình plugin `zalouser`** — Khi chọn Zalo Personal, wizard tự động thêm `plugins.entries.zalouser` vào `openclaw.json`, xử lý lỗi "not configured" phổ biến nhất khi khởi động Zalo.
31
+ - ⏱️ **Fix cold-start Docker tích hợp sẵn** — Dockerfile CMD giờ có script nền chạy sau 45 giây để kích hoạt kênh Zalo khi Docker network đã ổn định. Không cần hack `lastTouchedAt` thủ công nữa.
32
+
33
+ <details>
34
+ <summary><b>Trước đó: Có gì mới ở v5.2.3</b></summary>
28
35
 
29
36
  - 🔄 **Upgrade 1 lệnh** — Chạy `npx create-openclaw-bot@latest upgrade` trong thư mục bot để cập nhật OpenClaw mà không cần chạy lại wizard. Tự động nhận diện Docker hay Native.
30
37
  - 🪟 **Windows: double-click để upgrade** — File `upgrade.ps1` có sẵn trong repo. Nhấp đúp là xong — không cần biết terminal.
31
38
  - 🐧 **Linux / macOS / Ubuntu** — `upgrade.sh` cho người dùng Unix. Chạy `bash upgrade.sh` hoặc pipe trực tiếp qua `curl` / `wget` từ GitHub.
32
39
  - 🛡️ **Dữ liệu cũ giữ nguyên hoàn toàn** — `.env`, memory, sessions, credentials, OAuth token 9Router không bao giờ bị xoá khi upgrade.
33
40
 
34
- <details>
35
- <summary><b>Trước đó: Có gì mới ở v5.2.2</b></summary>
36
-
37
- - 🔒 **Pin lại OpenClaw** — Bản OpenClaw cập nhật ngày `08/04/2026` đang lỗi, nên setup được fix để giữ ở `openclaw@2026.4.5` cho ổn định.
38
- - 🐳 **Fix Dockerfile** — Sửa luồng Docker cho Windows để không còn lỗi startup do command/escaping sai và tránh lỗi `allowedOrigins` bị sinh ra không hợp lệ.
39
- - 🟢 **Ghi chú Node.js ổn định** — Thêm note khuyên dùng `Node.js 20` đến `24`, tạm tránh `Node.js 25` vì có report lỗi với OpenClaw.
40
-
41
41
  </details>
42
42
 
43
43
  ---
@@ -110,7 +110,7 @@ Chạy lệnh trên trong Terminal → làm theo các prompt tương tác → sc
110
110
  2. Mở repo này làm workspace
111
111
  3. Paste vào chat:
112
112
  ```
113
- Read SETUP.md and set up OpenClaw v5.2.2 for me.
113
+ Read SETUP.md and set up OpenClaw v5.3.0 for me.
114
114
  My bot token is X. Use 9Router (no API key).
115
115
  My project folder: <THƯ_MỤC_CỦA_BẠN>
116
116
  ```