create-openclaw-bot 5.1.0 → 5.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,48 @@
1
- # Changelog (English)
2
-
3
- ## [5.0.9] — 2026-04-06
1
+ # Changelog (English)
2
+
3
+
4
+ ## [5.1.2] — 2026-04-06
5
+
6
+ ### 🐛 Fix Shell Injection: Sync Script Now Uses Base64 Encoding
7
+
8
+ The `node -e "...JSON.stringify(script)..."` approach caused `/bin/sh: Syntax error: "(" unexpected` because `JSON.stringify` produces a double-quoted string that breaks out of the surrounding `node -e "..."` shell argument.
9
+
10
+ - **Fix**: sync script content is now **base64-encoded at compose-generation time** using `Buffer.from(script).toString('base64')`
11
+ - The generated entrypoint becomes: `node -e "require('fs').writeFileSync('/tmp/sync.js',Buffer.from('<b64>','base64').toString())"`
12
+ - Base64 output contains only `[A-Za-z0-9+/=]` — zero shell quoting issues, works in YAML `|` blocks without escaping
13
+ - Applies to all compose generation paths: Docker web wizard (`setup.js` × 2) and Docker CLI (`cli.js` × 2)
14
+
15
+
16
+ ## [5.1.1] — 2026-04-06
17
+
18
+ ### 🔧 9Router Smart-Route Sync — Stable via API
19
+
20
+ Fixed a critical bug where the sync script could not detect active providers, causing all requests to fall back to `openai` (resulting in `404 No active credentials`).
21
+
22
+ - **Root cause**: sync script read `db.providerConnections` from `db.json`, but this field does not exist in 9Router v0.3.79+ — connections are only available via the REST API
23
+ - **Fix**: sync script now calls `fetch('http://localhost:20128/api/providers')` → `d.connections[]` to detect active providers dynamically
24
+ - **Fix**: replaced fragile `cat << 'CLAWEOF'` heredoc injection (which caused `const p=undefined`) with `node -e require('fs').writeFileSync(...)` — zero quoting issues in YAML+shell
25
+ - **Fix**: `build9RouterSmartRouteSyncScript()` in CLI docker flow now correctly passes `'/root/.9router/db.json'` as the db path
26
+ - Applies to all three sync script locations: Docker web wizard (`setup.js`), Docker CLI (`cli.js`), and native (`cli.js`)
27
+
28
+ ### 📱 Zalo Pairing — Auto-Approve During Gateway Run
29
+
30
+ - Previously, auto-approve only ran during the initial login flow; new pairing requests while the gateway was already running were silently ignored
31
+ - **Fix**: `openclaw gateway run` for Zalo Personal now pipes stdout/stderr and auto-calls `openclaw pairing approve zalouser <code>` whenever a new pairing code is detected
32
+
33
+ ### 🧹 Cleaner Docker CLI Output
34
+
35
+ - Removed redundant post-setup instructions (`docker compose build`, `openclaw gateway`, PM2 commands) that appeared after Docker auto-build; Docker mode is self-contained and needs no manual follow-up steps
36
+
37
+ ## [5.1.0] — 2026-04-07
38
+
39
+ ### 🤖 Zalo Personal Login Improvements
40
+
41
+ - Zalo Personal now uses the direct `zalouser` login flow on both native and Docker.
42
+ - Setup prints the QR path plus exact login/copy commands, so users can get in fast without `openclaw onboard`.
43
+ - Docker QR login now targets the generated `ai-bot` compose service instead of brittle container names.
44
+
45
+ ## [5.0.9] — 2026-04-06
4
46
 
5
47
  ### 🚀 Native Install Mode — No Docker Required
6
48
 
package/CHANGELOG.vi.md CHANGED
@@ -1,6 +1,48 @@
1
- # Changelog (Tiếng Việt)
2
-
3
- ## [5.0.9] — 2026-04-06
1
+ # Changelog (Tiếng Việt)
2
+
3
+
4
+ ## [5.1.2] — 2026-04-06
5
+
6
+ ### 🐛 Fix Shell Injection: Sync Script Dùng Base64
7
+
8
+ Approach node -e JSON.stringify gây lỗi /bin/sh: Syntax error "(" unexpected vì JSON.stringify sinh chuỗi double-quoted phá vỡ shell argument.
9
+
10
+ - **Fix**: nội dung sync script nay được **base64-encode tại thời điểm gen compose** bằng Buffer.from(script).toString base64
11
+ - Entrypoint sinh ra dạng: node -e writeFileSync Buffer.from b64 base64 toString
12
+ - Base64 chỉ chứa [A-Za-z0-9+/=] — không có ký tự đặc biệt, hoạt động đúng trong YAML block
13
+ - Áp dụng cho tất cả luồng gen compose: Docker web wizard (setup.js x2) và Docker CLI (cli.js x2)
14
+
15
+
16
+ ## [5.1.1] — 2026-04-06
17
+
18
+ ### 🔧 9Router Smart-Route Sync — Ổn định qua API
19
+
20
+ Sửa lỗi nghiêm trọng khiến sync script không nhận ra provider đang active, làm tất cả request fallback về `openai` (lỗi `404 No active credentials`).
21
+
22
+ - **Nguyên nhân**: script đọc `db.providerConnections` từ `db.json` nhưng field này không tồn tại trong 9Router v0.3.79+ — connections chỉ có qua REST API
23
+ - **Fix**: script giờ gọi `fetch('http://localhost:20128/api/providers')` → `d.connections[]` để detect provider đang active
24
+ - **Fix**: thay heredoc `cat << 'CLAWEOF'` (gây ra `const p=undefined`) bằng `node -e require('fs').writeFileSync(...)` — không còn lỗi escaping trong YAML+shell
25
+ - **Fix**: `build9RouterSmartRouteSyncScript()` trong CLI docker flow giờ truyền đúng `'/root/.9router/db.json'` làm db path
26
+ - Áp dụng cho cả 3 vị trí: Docker web wizard (`setup.js`), Docker CLI (`cli.js`), và native (`cli.js`)
27
+
28
+ ### 📱 Zalo Pairing — Tự Động Approve Khi Gateway Đang Chạy
29
+
30
+ - Trước đây, auto-approve chỉ chạy trong login flow ban đầu; pairing request mới khi gateway đang chạy bị bỏ qua
31
+ - **Fix**: `openclaw gateway run` với Zalo Personal giờ pipe stdout/stderr và tự gọi `openclaw pairing approve zalouser <code>` khi phát hiện pairing code mới
32
+
33
+ ### 🧹 Output Docker CLI Gọn Hơn
34
+
35
+ - Xóa các hướng dẫn thừa sau khi Docker build xong (`docker compose build`, `openclaw gateway`, PM2) — Docker mode tự chạy hoàn toàn, không cần thao tác thủ công thêm
36
+
37
+ ## [5.1.0] — 2026-04-07
38
+
39
+ ### 🤖 Zalo Personal Login Improvements
40
+
41
+ - Zalo Personal giờ sử dụng luồng đăng nhập `zalouser` trực tiếp trên cả native và Docker.
42
+ - Setup in ra đường dẫn QR cùng các lệnh login/copy chính xác, giúp người dùng đăng nhập nhanh mà không cần `openclaw onboard`.
43
+ - QR login Docker giờ nhắm vào service compose `ai-bot` đã sinh ra thay vì các tên container cũ dễ hỏng.
44
+
45
+ ## [5.0.9] — 2026-04-06
4
46
 
5
47
  ### 🚀 Chế độ Native Install — Không cần Docker
6
48
 
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- <div align="center">
1
+ <div align="center">
2
2
 
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.1.0-0EA5E9?style=for-the-badge" alt="Version 5.1.0" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.1.2-0EA5E9?style=for-the-badge" alt="Version 5.1.2" /></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,7 +24,7 @@ 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.1.0
27
+ ## 🆕 What's new in v5.1.2
28
28
 
29
29
  - 💻 **OS-First Setup** — Step 1 is now choosing your OS (Windows, macOS, Ubuntu, VPS). All scripts, configs, and instructions are generated to match.
30
30
  - 🧠 **Gemma 4 — 4 sizes** — `gemma4:e2b` (~4 GB), `gemma4:e4b` (~8 GB), `gemma4:26b` (~18 GB), `gemma4:31b` (~24 GB). Auto-pulled on first launch.
@@ -33,6 +33,7 @@ An interactive **CLI tool** and **Setup Wizard** to deploy your own free AI Bot
33
33
  - 🤖 **Multi-Bot Deployment** — Deploy up to **5 independent Telegram bots** in one setup. Each bot runs in its own isolated workspace (`bot1/`, `bot2/`...) with its own token, name, slash command, and AI personality.
34
34
  - 💬 **Department Room Model** — Add all bots to one Telegram group and they behave like a professional team. Bots stay silent by default, only responding when @mentioned or their slash command is used — no spam, no chaos.
35
35
  - 🔗 **Group ID Helper** — "Get Group ID" button in Web Wizard + step-by-step guide in CLI. Opens @userinfobot directly — no documentation hunting needed.
36
+ - 🔐 **Zalo Personal QR Login** — Zalo Personal now uses direct QR login flow for both native and Docker. Setup prints exact QR path + copy/login commands — no need to go through `openclaw onboard`.
36
37
 
37
38
  <details>
38
39
  <summary><b>Previous: What's new in v5.0.0</b></summary>
@@ -111,7 +112,7 @@ Run in your terminal → follow the interactive prompts → startup script is ge
111
112
  2. Open this repo as your workspace
112
113
  3. Paste into chat:
113
114
  ```
114
- Read SETUP.md and set up OpenClaw v5.1.0 for me.
115
+ Read SETUP.md and set up OpenClaw v5.1.2 for me.
115
116
  My bot token is X. Use 9Router (no API key).
116
117
  My project folder: <YOUR_PATH>
117
118
  ```
package/README.vi.md CHANGED
@@ -1,9 +1,9 @@
1
- <div align="center">
1
+ <div align="center">
2
2
 
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.1.0-0EA5E9?style=for-the-badge" alt="Version 5.1.0" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.1.2-0EA5E9?style=for-the-badge" alt="Version 5.1.2" /></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,7 +24,7 @@ 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.1.0
27
+ ## 🆕 Có gì mới trong v5.1.2
28
28
 
29
29
  - 💻 **OS-First Setup** — Bước đầu tiên bây giờ là chọn hệ điều hành của bạn (Windows, macOS, Ubuntu, VPS). Toàn bộ script, cấu hình và hướng dẫn được tạo ra phù hợp với lựa chọn đó.
30
30
  - 🧠 **Gemma 4 — 4 kích thước** — `gemma4:e2b` (~4 GB), `gemma4:e4b` (~8 GB), `gemma4:26b` (~18 GB), `gemma4:31b` (~24 GB). Tự pull về khi bot khởi động lần đầu.
@@ -33,6 +33,7 @@ Công cụ **CLI tương tác** và **Setup Wizard** để tự triển khai Bot
33
33
  - 🤖 **Triển khai nhiều Bot** — Setup tới **5 Telegram bot độc lập** chỉ trong một lần cài. Mỗi bot sống trong thư mục riêng (`bot1/`, `bot2/`...) với token, tên, slash command và cá tính AI riêng biệt.
34
34
  - 💬 **Chế độ Phòng Ban** — Thêm tất cả bot vào một Telegram group, chúng sẽ hoạt động như một đội nhân viên chuyên nghiệp. Bot im lặng theo mặc định — chỉ phản hồi khi được @tag hoặc gọi đúng lệnh slash, không spam, không ồn ào.
35
35
  - 🔗 **Nút lấy Group ID tự động** — Nút "Lấy Group ID" ngay trong Web Wizard + hướng dẫn từng bước trong CLI. Mở @userinfobot thẳng luôn — không cần mò docs.
36
+ - 🔐 **Zalo Personal QR Login** — Zalo Personal giờ dùng flow login `zalouser` trực tiếp cho cả native lẫn Docker. Setup in sẵn lệnh login, lệnh copy QR và đường dẫn file QR, không cần vòng qua `openclaw onboard`.
36
37
 
37
38
  <details>
38
39
  <summary><b>Trước đó: Có gì mới ở v5.0.0</b></summary>
@@ -111,7 +112,7 @@ Chạy lệnh trên trong Terminal → làm theo các prompt tương tác → sc
111
112
  2. Mở repo này làm workspace
112
113
  3. Paste vào chat:
113
114
  ```
114
- Read SETUP.md and set up OpenClaw v5.1.0 for me.
115
+ Read SETUP.md and set up OpenClaw v5.1.2 for me.
115
116
  My bot token is X. Use 9Router (no API key).
116
117
  My project folder: <THƯ_MỤC_CỦA_BẠN>
117
118
  ```