create-openclaw-bot 5.0.7 → 5.0.9
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 +1 -1
- package/CHANGELOG.vi.md +1 -1
- package/README.md +3 -3
- package/README.vi.md +3 -3
- package/cli.js +18 -2
- package/docs/install-native.md +1 -1
- package/docs/install-native.vi.md +1 -1
- package/package.json +1 -1
- package/setup.js +1 -1
- package/tests/smoke-cli-logic.mjs +19 -1
package/CHANGELOG.md
CHANGED
package/CHANGELOG.vi.md
CHANGED
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.0.
|
|
6
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.0.9-0EA5E9?style=for-the-badge" alt="Version 5.0.9" /></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.0.
|
|
27
|
+
## 🆕 What's new in v5.0.9
|
|
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.
|
|
@@ -111,7 +111,7 @@ Run in your terminal → follow the interactive prompts → startup script is ge
|
|
|
111
111
|
2. Open this repo as your workspace
|
|
112
112
|
3. Paste into chat:
|
|
113
113
|
```
|
|
114
|
-
Read SETUP.md and set up OpenClaw v5.0.
|
|
114
|
+
Read SETUP.md and set up OpenClaw v5.0.9 for me.
|
|
115
115
|
My bot token is X. Use 9Router (no API key).
|
|
116
116
|
My project folder: <YOUR_PATH>
|
|
117
117
|
```
|
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.0.
|
|
6
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.0.9-0EA5E9?style=for-the-badge" alt="Version 5.0.9" /></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.0.
|
|
27
|
+
## 🆕 Có gì mới trong v5.0.9
|
|
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.
|
|
@@ -111,7 +111,7 @@ Chạy lệnh trên trong Terminal → làm theo các prompt tương tác → sc
|
|
|
111
111
|
2. Mở repo này làm workspace
|
|
112
112
|
3. Paste vào chat:
|
|
113
113
|
```
|
|
114
|
-
Read SETUP.md and set up OpenClaw v5.0.
|
|
114
|
+
Read SETUP.md and set up OpenClaw v5.0.9 for me.
|
|
115
115
|
My bot token is X. Use 9Router (no API key).
|
|
116
116
|
My project folder: <THƯ_MỤC_CỦA_BẠN>
|
|
117
117
|
```
|
package/cli.js
CHANGED
|
@@ -209,10 +209,25 @@ function printNativeDashboardAccessInfo({ isVi, providerKey, projectDir, gateway
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
function runPm2Save({ projectDir, isVi }) {
|
|
213
|
+
try {
|
|
214
|
+
execSync('pm2 save', {
|
|
215
|
+
cwd: projectDir,
|
|
216
|
+
stdio: 'inherit',
|
|
217
|
+
shell: true,
|
|
218
|
+
env: process.env
|
|
219
|
+
});
|
|
220
|
+
} catch {
|
|
221
|
+
console.log(chalk.yellow(isVi
|
|
222
|
+
? '⚠️ PM2 save khong hoan tat. Bot van co the dang chay, nhung hay thu chay lai `pm2 save` sau.'
|
|
223
|
+
: '⚠️ PM2 save did not complete. The app may still be running, but try `pm2 save` again afterwards.'));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
212
227
|
function startNative9RouterPm2({ isVi, projectDir, appName }) {
|
|
213
228
|
const routerAppName = `${appName}-9router`;
|
|
214
229
|
execSync(
|
|
215
|
-
`pm2 start "9router -n -t -l -H 0.0.0.0 -p 20128 --skip-update" --name "${routerAppName}" --cwd "${projectDir.replace(/\\/g, '/')}"
|
|
230
|
+
`pm2 start "9router -n -t -l -H 0.0.0.0 -p 20128 --skip-update" --name "${routerAppName}" --cwd "${projectDir.replace(/\\/g, '/')}"`,
|
|
216
231
|
{
|
|
217
232
|
cwd: projectDir,
|
|
218
233
|
stdio: 'inherit',
|
|
@@ -220,6 +235,7 @@ function startNative9RouterPm2({ isVi, projectDir, appName }) {
|
|
|
220
235
|
env: process.env
|
|
221
236
|
}
|
|
222
237
|
);
|
|
238
|
+
runPm2Save({ projectDir, isVi });
|
|
223
239
|
console.log(chalk.green(`\n✅ ${isVi ? '9Router da duoc khoi dong qua PM2.' : '9Router is running via PM2.'}`));
|
|
224
240
|
console.log(chalk.gray(isVi ? ` Xem log: pm2 logs ${routerAppName}` : ` View logs: pm2 logs ${routerAppName}`));
|
|
225
241
|
}
|
|
@@ -851,7 +867,7 @@ async function main() {
|
|
|
851
867
|
'# Fix chat.send dropping resolved agent timeout into reply pipeline.',
|
|
852
868
|
'# Without this, Telegram/WebChat paths fall back to an internal 300s default even when',
|
|
853
869
|
'# agents.defaults.timeoutSeconds is higher in config.',
|
|
854
|
-
`RUN node -e "const fs=require('fs');const
|
|
870
|
+
`RUN node -e "const fs=require('fs');const path=require('path');const dir='/usr/local/lib/node_modules/openclaw/dist';const file=(fs.readdirSync(dir).find(n=>/^gateway-cli-.*\\.js$/.test(n))||'');if(!file){console.warn('gateway cli dist file not found; skipping timeout patch');process.exit(0);}const p=path.join(dir,file);let s=fs.readFileSync(p,'utf8');const from='\\t\\t\\t\\t\\tonAgentRunStart: (runId) => {';const to='\\t\\t\\t\\t\\ttimeoutOverrideSeconds: Math.max(1, Math.ceil(timeoutMs / 1e3)),\\n\\t\\t\\t\\t\\tonAgentRunStart: (runId) => {';if(s.includes(to)){process.exit(0);}if(!s.includes(from)){console.warn('chat.send patch anchor not found; skipping timeout patch');process.exit(0);}s=s.replace(from,to);fs.writeFileSync(p,s);"`,
|
|
855
871
|
'',
|
|
856
872
|
'WORKDIR /root/.openclaw',
|
|
857
873
|
'',
|
package/docs/install-native.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Native installation is designed for users who cannot or prefer not to use Docker. This includes deployments on Shared Hosting (cPanel), low-tier VPS environments, or Windows desktops for direct access.
|
|
4
4
|
|
|
5
|
-
OpenClaw v5.0.
|
|
5
|
+
OpenClaw v5.0.9+ natively supports deployment script generation for Windows, Linux, VPS, and Hosting environments.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Chế độ Native được thiết kế dành cho những ai không thể hoặc không muốn cài Docker. Chế độ này thường tối ưu cho Shared Hosting (cPanel), các gói VPS cấu hình rất thấp, hoặc cài trực tiếp trên máy Window để chạy cá nhân.
|
|
4
4
|
|
|
5
|
-
OpenClaw v5.0.
|
|
5
|
+
OpenClaw v5.0.9+ tự động sinh sẵn các script cài đặt dành riêng cho Windows, Linux, VPS và Hosting.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -1815,7 +1815,7 @@ RUN apt-get update && apt-get install -y git curl${browserAptExtra} && rm -rf /v
|
|
|
1815
1815
|
|
|
1816
1816
|
ARG CACHEBUST=${Date.now()}
|
|
1817
1817
|
RUN npm install -g openclaw@latest${skillLines}${browserInstallLines}
|
|
1818
|
-
RUN node -e "const fs=require('fs');const
|
|
1818
|
+
RUN node -e "const fs=require('fs');const path=require('path');const dir='/usr/local/lib/node_modules/openclaw/dist';const file=(fs.readdirSync(dir).find(n=>/^gateway-cli-.*\\.js$/.test(n))||'');if(!file){console.warn('gateway cli dist file not found; skipping timeout patch');process.exit(0);}const p=path.join(dir,file);let s=fs.readFileSync(p,'utf8');const from='\\t\\t\\t\\t\\tonAgentRunStart: (runId) => {';const to='\\t\\t\\t\\t\\ttimeoutOverrideSeconds: Math.max(1, Math.ceil(timeoutMs / 1e3)),\\n\\t\\t\\t\\t\\tonAgentRunStart: (runId) => {';if(s.includes(to)){process.exit(0);}if(!s.includes(from)){console.warn('chat.send patch anchor not found; skipping timeout patch');process.exit(0);}s=s.replace(from,to);fs.writeFileSync(p,s);}"
|
|
1819
1819
|
WORKDIR /root/.openclaw
|
|
1820
1820
|
|
|
1821
1821
|
EXPOSE 18791
|
|
@@ -88,10 +88,16 @@ checks.push(() => expectMatch(
|
|
|
88
88
|
|
|
89
89
|
checks.push(() => expectMatch(
|
|
90
90
|
cli,
|
|
91
|
-
/function startNative9RouterPm2\(\{ isVi, projectDir, appName \}\) \{[\s\S]*9router -n -t -l -H 0\.0\.0\.0 -p 20128 --skip-update[\s\S]*
|
|
91
|
+
/function startNative9RouterPm2\(\{ isVi, projectDir, appName \}\) \{[\s\S]*9router -n -t -l -H 0\.0\.0\.0 -p 20128 --skip-update[\s\S]*runPm2Save\(\{ projectDir, isVi \}\)/s,
|
|
92
92
|
'VPS native 9Router flow must start a standalone 9Router dashboard on port 20128 via PM2'
|
|
93
93
|
));
|
|
94
94
|
|
|
95
|
+
checks.push(() => expectMatch(
|
|
96
|
+
cli,
|
|
97
|
+
/function runPm2Save\(\{ projectDir, isVi \}\) \{[\s\S]*execSync\('pm2 save'[\s\S]*PM2 save did not complete/s,
|
|
98
|
+
'Native PM2 save should be handled as a separate recoverable step'
|
|
99
|
+
));
|
|
100
|
+
|
|
95
101
|
checks.push(() => expectMatch(
|
|
96
102
|
cli,
|
|
97
103
|
/const child = spawn\('openclaw', \['gateway', 'run'\], \{/,
|
|
@@ -153,6 +159,18 @@ checks.push(() => expectMatch(
|
|
|
153
159
|
'Native script generation must install and start a standalone 9Router dashboard on port 20128'
|
|
154
160
|
));
|
|
155
161
|
|
|
162
|
+
checks.push(() => expectMatch(
|
|
163
|
+
cli,
|
|
164
|
+
/readdirSync\(dir\)\.find\(n=>\/\^gateway-cli-.*\\\\\.js\$\/\.test\(n\)\)[\s\S]*skipping timeout patch/,
|
|
165
|
+
'Dockerfile patching in CLI must resolve gateway-cli dist files dynamically instead of hardcoding one hash'
|
|
166
|
+
));
|
|
167
|
+
|
|
168
|
+
checks.push(() => expectMatch(
|
|
169
|
+
setup,
|
|
170
|
+
/readdirSync\(dir\)\.find\(n=>\/\^gateway-cli-.*\\\\\.js\$\/\.test\(n\)\)[\s\S]*skipping timeout patch/,
|
|
171
|
+
'Dockerfile patching in setup.js must resolve gateway-cli dist files dynamically instead of hardcoding one hash'
|
|
172
|
+
));
|
|
173
|
+
|
|
156
174
|
checks.push(() => expectMatch(
|
|
157
175
|
setup,
|
|
158
176
|
/else if \(state\.nativeOs === 'vps'\) \{[\s\S]*pm2 start --name openclaw-multibot -- sh -c "openclaw gateway run"[\s\S]*pm2 logs openclaw-multibot/s,
|