create-openclaw-bot 5.4.0 → 5.4.1
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 +13 -0
- package/CHANGELOG.vi.md +13 -0
- package/README.md +2 -2
- package/README.vi.md +3 -3
- package/cli.js +17 -19
- package/package.json +1 -1
- package/setup.js +15 -5
- package/openclaw_correct_structure.md +0 -203
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Changelog (English)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [5.4.1] — 2026-04-14
|
|
5
|
+
|
|
6
|
+
### 🐛 Docker CLI Generation Fixes
|
|
7
|
+
|
|
8
|
+
- **Browser Automation Restoration**: Reintroduced `xvfb` APT installation and the background Xvfb frame buffer execution (`Xvfb :99 -screen...`) to the generated Dockerfile `CMD`. This prevents headful Playwright processes from crashing on startup within the container.
|
|
9
|
+
- **REST API CORS Hotfix**: Reintroduced the runtime Internal IP injector script. It correctly patches `openclaw.json` at container startup strictly mapping Docker internal bridge IPs (`172...`) into `allowedOrigins`, eliminating 403 CORS blocks inside Docker Web Control UIs.
|
|
10
|
+
|
|
11
|
+
### 🧹 Automated Uninstall Scripts
|
|
12
|
+
|
|
13
|
+
- **Wizard UI Generation**: The HTML setup wizard now generates a matching `uninstall-openclaw-*.bat/sh` script when downloading the configuration for Native or Docker deployments.
|
|
14
|
+
- **Complete Cleanup**: The generated scripts cleanly kill 9Router/OpenClaw background processes, uninstall global npm packages, and safely remove the project and `.9router` data directories, allowing for a fresh start whenever needed.
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
## [5.4.0] — 2026-04-14
|
|
5
18
|
|
|
6
19
|
### 🗑️ Remove: Telegram + Zalo Combo Channel
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Changelog (Tiếng Việt)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [5.4.1] — 2026-04-14
|
|
5
|
+
|
|
6
|
+
### 🐛 Sửa Lỗi Build Dockerfile
|
|
7
|
+
|
|
8
|
+
- **Phục hồi hỗ trợ Trình duyệt**: Đưa trở lại gói lệnh cài đặt `xvfb` APT và việc thực thi Xvfb quay trong nền (`Xvfb :99 -screen...`) vào Dockerfile `CMD`. Nó giúp các bot chạy Playwright có giao diện headful khởi động mà không bị crash vì thiếu khung màn hình.
|
|
9
|
+
- **Sửa lỗi REST API CORS**: Khôi phục script tiêm dải IP nội bộ lúc runtime. Script này tự động lấy các bridge IP nội bộ của Docker (`172...`) để cấp phép vào mục `allowedOrigins` cho `openclaw.json` ngay lúc container khởi động, sửa hoàn toàn lỗi bị block CORS 403 không vào được Web UI.
|
|
10
|
+
|
|
11
|
+
### 🧹 Tự Động Tạo Script Gỡ Cài Đặt
|
|
12
|
+
|
|
13
|
+
- **Tính Năng Wizard UI**: Giao diện HTML wizard giờ đây sẽ tự động tải thêm một file script dọn dẹp hệ thống (`uninstall-openclaw-*.bat/sh`) mỗi khi tải file cài đặt cho Native hoặc Docker.
|
|
14
|
+
- **Dọn Dẹp Triệt Để**: Các script này giúp dừng sạch sẽ các tiến trình nền của 9Router/OpenClaw, gỡ cài đặt các gói npm toàn cầu và xoá an toàn thư mục project cũng như data `.9router`, giúp bạn làm sạch máy để cài đặt lại dễ dàng.
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
## [5.4.0] — 2026-04-14
|
|
5
18
|
|
|
6
19
|
### 🗑️ Xóa: Kênh Combo Telegram + Zalo
|
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.4.
|
|
6
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.4.1-0EA5E9?style=for-the-badge" alt="Version 5.4.1" /></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.4.
|
|
27
|
+
## 🆕 What's new in v5.4.1
|
|
28
28
|
|
|
29
29
|
- 🏗️ **Multi-bot architecture refactored** — All duplicate flags (`isTelegramMultiBot`, `isSharedMultiBot`, `isMultiBotWizard`) merged into a single `isMultiBot`. Generated `agentDir` paths now correctly point to `.openclaw/agents/{slug}/agent` relative to `OPENCLAW_HOME`.
|
|
30
30
|
- 🗑️ **Telegram + Zalo combo channel removed** — Combo mode has been deprecated and removed from both the Web Wizard and CLI. It will be redesigned in a future release.
|
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.4.
|
|
6
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.4.1-0EA5E9?style=for-the-badge" alt="Version 5.4.1" /></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.4.
|
|
27
|
+
## 🆕 Có gì mới trong v5.4.1
|
|
28
28
|
|
|
29
29
|
- 🏗️ **Tái cấu trúc kiến trúc multi-bot** — Các flag `isTelegramMultiBot`, `isSharedMultiBot`, `isMultiBotWizard` được gộp thành một biến `isMultiBot` duy nhất. Đường dẫn `agentDir` trong `openclaw.json` được tạo ra nay đúng chuẩn `.openclaw/agents/{slug}/agent` (tương đối với `OPENCLAW_HOME`).
|
|
30
30
|
- 🗑️ **Xóa hoàn toàn kênh combo Telegram + Zalo** — Combo mode đã được gỡ bỏ khỏi cả Web Wizard lẫn CLI. Sẽ được thiết kế lại trong bản phát hành sau.
|
|
@@ -111,7 +111,7 @@ Chạy trong terminal → làm theo hướng dẫn → script khởi động đ
|
|
|
111
111
|
2. Mở repo này làm workspace
|
|
112
112
|
3. Paste vào chat:
|
|
113
113
|
```
|
|
114
|
-
Đọc SETUP.md và cài đặt OpenClaw v5.4.
|
|
114
|
+
Đọc SETUP.md và cài đặt OpenClaw v5.4.1 cho tôi.
|
|
115
115
|
Bot token của tôi là X. Dùng 9Router (không cần API key).
|
|
116
116
|
Thư mục project: <ĐƯỜNG_DẪN_CỦA_BẠN>
|
|
117
117
|
```
|
package/cli.js
CHANGED
|
@@ -44,24 +44,22 @@ const {
|
|
|
44
44
|
buildToolsDoc,
|
|
45
45
|
buildRelayDoc,
|
|
46
46
|
} = _require('./setup/shared/scaffold-gen.js');
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @returns {{name:string, content:string}|null}
|
|
64
|
-
*/
|
|
47
|
+
|
|
48
|
+
let dataExport = _require('./setup/data/index.js');
|
|
49
|
+
if (!dataExport.CHANNELS) dataExport = globalThis.__openclawData || {};
|
|
50
|
+
|
|
51
|
+
const {
|
|
52
|
+
PROVIDERS: _PROVIDERS,
|
|
53
|
+
SKILLS: _SKILLS,
|
|
54
|
+
CHANNELS: _CHANNELS,
|
|
55
|
+
OLLAMA_MODELS,
|
|
56
|
+
} = dataExport;
|
|
57
|
+
|
|
58
|
+
const {
|
|
59
|
+
buildChromeDebugBat,
|
|
60
|
+
buildChromeDebugSh,
|
|
61
|
+
} = _require('./setup/shared/runtime-gen.js');
|
|
62
|
+
|
|
65
63
|
function buildCLIUninstallScript({ os, projectDir, botName = 'openclaw', isDocker = false }) {
|
|
66
64
|
const absWin = projectDir.replace(/\//g, '\\');
|
|
67
65
|
const absUnix = projectDir.replace(/\\/g, '/');
|
|
@@ -1824,7 +1822,7 @@ async function main() {
|
|
|
1824
1822
|
// ── start-bot.bat / start-bot.sh — one-click restart scripts ─────────────
|
|
1825
1823
|
// Generated for native deployments only (docker has docker compose up)
|
|
1826
1824
|
if (deployMode !== 'docker') {
|
|
1827
|
-
const { generateStartBotBat, generateStartBotSh } = _require('
|
|
1825
|
+
const { generateStartBotBat, generateStartBotSh } = _require('./setup/generators/gateway-start-gen.js');
|
|
1828
1826
|
|
|
1829
1827
|
// Windows: start-bot.bat
|
|
1830
1828
|
const startBotBatPath = path.join(projectDir, 'start-bot.bat');
|
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -1863,7 +1863,7 @@
|
|
|
1863
1863
|
emitBrowserInstall = true,
|
|
1864
1864
|
} = options;
|
|
1865
1865
|
|
|
1866
|
-
const browserAptExtra = hasBrowser ? '
|
|
1866
|
+
const browserAptExtra = hasBrowser ? ' xvfb' : '';
|
|
1867
1867
|
const browserInstallLines = hasBrowser && emitBrowserInstall
|
|
1868
1868
|
? [
|
|
1869
1869
|
'',
|
|
@@ -1879,8 +1879,18 @@
|
|
|
1879
1879
|
? `\n# Install skills (ClawHub)\n${allSkills.map((skill) => `RUN openclaw skills install ${skill} || echo "Warning: Failed to install ${skill} due to rate limits."`).join('\n')}\n`
|
|
1880
1880
|
: '';
|
|
1881
1881
|
const patchLine = `RUN node -e "const fs=require('fs');const path=require('path');const dir='/usr/local/lib/node_modules/openclaw/dist';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) => {';const files=fs.readdirSync(dir).filter(n=>/\\.js$/.test(n));let patched=0;for(const file of files){const p=path.join(dir,file);let s='';try{s=fs.readFileSync(p,'utf8');}catch{continue;}if(s.includes(to)||!s.includes(from))continue;s=s.replace(from,to);fs.writeFileSync(p,s);patched++;}if(!patched){process.exit(0);}"`;
|
|
1882
|
+
|
|
1883
|
+
// Dynamic runtime configuration injection for container internal IPs
|
|
1884
|
+
const setupInternalIpScript = `const fs=require('fs'),os=require('os'),p='/root/.openclaw/openclaw.json';if(fs.existsSync(p)){const c=JSON.parse(fs.readFileSync(p,'utf8'));const a=new Set(['http://localhost:18791','http://127.0.0.1:18791','http://0.0.0.0:18791']);for(const entries of Object.values(os.networkInterfaces()||{})){for(const entry of entries||[]){if(!entry||entry.internal||entry.family!=='IPv4'||!entry.address)continue;a.add('http://' + entry.address + ':18791');}}c.tools=Object.assign({},c.tools,{profile:'full',exec:{host:'gateway',security:'full',ask:'off'}});c.gateway=Object.assign({},c.gateway,{port:18791,bind:'custom',customBindHost:'0.0.0.0',controlUi:Object.assign({},c.gateway?.controlUi,{allowedOrigins:Array.from(a).filter(Boolean)})});fs.writeFileSync(p,JSON.stringify(c,null,2));}`;
|
|
1885
|
+
const setupInternalIpB64 = encodeBase64Utf8(setupInternalIpScript);
|
|
1886
|
+
|
|
1882
1887
|
const runtimeParts = runtimeCommandParts.filter(Boolean);
|
|
1883
|
-
runtimeParts.
|
|
1888
|
+
runtimeParts.unshift(`node -e "eval(Buffer.from('${setupInternalIpB64}','base64').toString())" &&`);
|
|
1889
|
+
if (hasBrowser) {
|
|
1890
|
+
runtimeParts.push('(Xvfb :99 -screen 0 1280x720x24 > /dev/null 2>&1 &) && export DISPLAY=:99 && openclaw gateway run');
|
|
1891
|
+
} else {
|
|
1892
|
+
runtimeParts.push('openclaw gateway run');
|
|
1893
|
+
}
|
|
1884
1894
|
const dockerfile = `FROM node:22-slim
|
|
1885
1895
|
|
|
1886
1896
|
RUN apt-get update && apt-get install -y git curl${browserAptExtra} && rm -rf /var/lib/apt/lists/*
|
|
@@ -2147,7 +2157,7 @@
|
|
|
2147
2157
|
if (p) allPlugins.push(p.package);
|
|
2148
2158
|
});
|
|
2149
2159
|
if (isMultiBot && state.channel === 'telegram') allPlugins.push(relayPluginSpec);
|
|
2150
|
-
const pluginCmd = allPlugins.length > 0 ? ('call npm exec -- openclaw plugins install ' +
|
|
2160
|
+
const pluginCmd = allPlugins.length > 0 ? allPlugins.map(function(pkg) { return 'call npm exec -- openclaw plugins install ' + pkg + ' || goto :fail'; }).join('\r\n') : '';
|
|
2151
2161
|
const nativeSkillInstallCmds = nativeSkillConfigs.map((skill) => `call openclaw skills install ${skill.slug} || echo Warning: Failed to install skill ${skill.slug}`);
|
|
2152
2162
|
|
|
2153
2163
|
Object.assign(globalThis, {
|
|
@@ -5250,7 +5260,7 @@
|
|
|
5250
5260
|
const dockerGen = globalThis.__openclawDockerGen;
|
|
5251
5261
|
const relayPluginInstallCmd = isMultiBot ? `${buildRelayPluginInstallCommand('openclaw')} && ` : '';
|
|
5252
5262
|
const pluginInstallCmd = allPlugins.length > 0
|
|
5253
|
-
? `openclaw plugins install ${
|
|
5263
|
+
? `${allPlugins.map((p) => `openclaw plugins install ${p} 2>/dev/null || true`).join(' && ')} && ${relayPluginInstallCmd}`
|
|
5254
5264
|
: relayPluginInstallCmd;
|
|
5255
5265
|
const dockerArtifacts = dockerGen.buildDockerArtifacts({
|
|
5256
5266
|
openClawNpmSpec: 'openclaw@2026.4.5',
|
|
@@ -6008,7 +6018,7 @@
|
|
|
6008
6018
|
// ========== Zalo Personal Login Guide (post-setup) ==========
|
|
6009
6019
|
function generateZaloOnboardGuide() {
|
|
6010
6020
|
const lang = document.getElementById('cfg-language')?.value || 'vi';
|
|
6011
|
-
setOutput('out-zalo-onboard-cmd', `docker compose exec -it ai-bot openclaw channels login --channel zalouser --
|
|
6021
|
+
setOutput('out-zalo-onboard-cmd', `docker compose exec -it ai-bot openclaw channels login --channel zalouser --verbose`);
|
|
6012
6022
|
|
|
6013
6023
|
if (lang === 'vi') {
|
|
6014
6024
|
setOutput('out-zalo-onboard-guide', `┌─────────────────────────────────────────────────────┐
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
# OpenClaw - Kien truc thu muc va secrets hien tai
|
|
2
|
-
|
|
3
|
-
Tai lieu nay mo ta dung behavior code hien tai cua wizard sau khi da dong bo lai native/docker va logic `.env`.
|
|
4
|
-
|
|
5
|
-
## Pham vi ho tro hien tai
|
|
6
|
-
|
|
7
|
-
- Native: `win`, `macos`, `linux-desktop`, `vps`
|
|
8
|
-
- Docker: cung mot cau truc file cho moi OS, chi khac launcher script tai ve
|
|
9
|
-
- Channel ho tro:
|
|
10
|
-
- `telegram`
|
|
11
|
-
- `zalo-bot`
|
|
12
|
-
- `zalo-personal`
|
|
13
|
-
- Multi-bot: chi ap dung cho `telegram`
|
|
14
|
-
- Combo `telegram + zalo-*`: hien khong duoc wizard UI mo ra
|
|
15
|
-
|
|
16
|
-
## Nguyen tac chung
|
|
17
|
-
|
|
18
|
-
- `OPENCLAW_HOME = {projectDir}/.openclaw`
|
|
19
|
-
- `OPENCLAW_STATE_DIR = {projectDir}/.openclaw`
|
|
20
|
-
- `DATA_DIR = {projectDir}/.9router`
|
|
21
|
-
- `agents.list[].agentDir` la duong dan relative theo `OPENCLAW_HOME`
|
|
22
|
-
- `agents.list[].workspace` cung la duong dan relative theo `OPENCLAW_HOME`
|
|
23
|
-
- Workspace luon dung format `workspace-{slug}`, ke ca single bot
|
|
24
|
-
|
|
25
|
-
## Secrets va .env
|
|
26
|
-
|
|
27
|
-
### Native
|
|
28
|
-
|
|
29
|
-
Native setup hien tai tao `{projectDir}/.env` va cac script native deu load file nay truoc khi chay `openclaw gateway run`.
|
|
30
|
-
|
|
31
|
-
`.env` trong native dung de luu:
|
|
32
|
-
|
|
33
|
-
- API key cua direct provider, vd `OPENAI_API_KEY`, `GEMINI_API_KEY`, ...
|
|
34
|
-
- channel token khi can:
|
|
35
|
-
- `TELEGRAM_BOT_TOKEN`
|
|
36
|
-
- `TELEGRAM_BOT_TOKEN_1..N` cho telegram multi-bot
|
|
37
|
-
- `ZALO_BOT_TOKEN` cho `zalo-bot`
|
|
38
|
-
- `TELEGRAM_GROUP_ID` neu user nhap group id
|
|
39
|
-
- env vars cua skills da chon
|
|
40
|
-
|
|
41
|
-
Luu y:
|
|
42
|
-
|
|
43
|
-
- `9router` khong can AI API key trong `.env`
|
|
44
|
-
- nhung neu channel la `telegram` hoac `zalo-bot` thi `.env` van co token channel
|
|
45
|
-
- `zalo-personal` khong dung bot token; login bang `openclaw channels login --channel zalouser --verbose`
|
|
46
|
-
|
|
47
|
-
### Docker
|
|
48
|
-
|
|
49
|
-
Docker setup hien tai tao ca hai file:
|
|
50
|
-
|
|
51
|
-
- `{projectDir}/.env`
|
|
52
|
-
- `{projectDir}/docker/openclaw/.env`
|
|
53
|
-
|
|
54
|
-
Trong do:
|
|
55
|
-
|
|
56
|
-
- root `.env` la ban ghi secrets tai project root de user de theo doi/chinh sua
|
|
57
|
-
- `docker/openclaw/.env` la file duoc `docker compose` nap vao container
|
|
58
|
-
|
|
59
|
-
## Provider auth
|
|
60
|
-
|
|
61
|
-
- Direct provider va provider local van co `.openclaw/auth-profiles.json`
|
|
62
|
-
- Per-agent `auth-profiles.json` duoc tao trong `.openclaw/agents/{slug}/agent/` khi khong dung `9router`
|
|
63
|
-
- Khi dung `9router`, khong tao root/per-agent `auth-profiles.json`
|
|
64
|
-
- Khi dung `9router`, provider endpoint duoc khai bao trong `.openclaw/openclaw.json -> models.providers.9router`
|
|
65
|
-
|
|
66
|
-
## Cau truc chuan theo case
|
|
67
|
-
|
|
68
|
-
### Case 1: Single bot
|
|
69
|
-
|
|
70
|
-
Ap dung cho:
|
|
71
|
-
|
|
72
|
-
- `telegram` single bot
|
|
73
|
-
- `zalo-bot`
|
|
74
|
-
- `zalo-personal`
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
{projectDir}/
|
|
78
|
-
|-- .env # native secrets; docker cung co ban root nay
|
|
79
|
-
|-- .openclaw/
|
|
80
|
-
| |-- openclaw.json
|
|
81
|
-
| |-- exec-approvals.json
|
|
82
|
-
| |-- auth-profiles.json # chi khi khong dung 9router
|
|
83
|
-
| |-- agents/
|
|
84
|
-
| | |-- {slug}.yaml
|
|
85
|
-
| | `-- {slug}/agent/
|
|
86
|
-
| | `-- auth-profiles.json # chi khi khong dung 9router
|
|
87
|
-
| `-- workspace-{slug}/
|
|
88
|
-
| |-- IDENTITY.md
|
|
89
|
-
| |-- SOUL.md
|
|
90
|
-
| |-- AGENTS.md
|
|
91
|
-
| |-- USER.md
|
|
92
|
-
| |-- TOOLS.md
|
|
93
|
-
| |-- MEMORY.md
|
|
94
|
-
| |-- browser-tool.js # neu bat browser
|
|
95
|
-
| `-- BROWSER.md # neu bat browser
|
|
96
|
-
|-- .9router/
|
|
97
|
-
| `-- 9router-smart-route-sync.js # chi khi provider = 9router
|
|
98
|
-
|-- start-bot.bat / start-bot.sh # chi native
|
|
99
|
-
|-- start-chrome-debug.bat/sh # neu bat browser va native
|
|
100
|
-
|-- uninstall-openclaw-*.bat/sh
|
|
101
|
-
`-- docker/
|
|
102
|
-
`-- openclaw/
|
|
103
|
-
|-- Dockerfile # chi docker mode
|
|
104
|
-
|-- docker-compose.yml # chi docker mode
|
|
105
|
-
`-- .env # chi docker mode
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Case 2: Telegram multi-bot
|
|
109
|
-
|
|
110
|
-
```text
|
|
111
|
-
{projectDir}/
|
|
112
|
-
|-- .env
|
|
113
|
-
|-- .openclaw/
|
|
114
|
-
| |-- openclaw.json
|
|
115
|
-
| |-- exec-approvals.json
|
|
116
|
-
| |-- auth-profiles.json # chi khi khong dung 9router
|
|
117
|
-
| |-- agents/
|
|
118
|
-
| | |-- {bot1}.yaml
|
|
119
|
-
| | |-- {bot2}.yaml
|
|
120
|
-
| | |-- {bot1}/agent/auth-profiles.json # chi khi khong dung 9router
|
|
121
|
-
| | `-- {bot2}/agent/auth-profiles.json # chi khi khong dung 9router
|
|
122
|
-
| |-- workspace-{bot1}/
|
|
123
|
-
| | |-- IDENTITY.md
|
|
124
|
-
| | |-- SOUL.md
|
|
125
|
-
| | |-- AGENTS.md
|
|
126
|
-
| | |-- USER.md
|
|
127
|
-
| | |-- TOOLS.md
|
|
128
|
-
| | |-- MEMORY.md
|
|
129
|
-
| | |-- browser-tool.js # neu bat browser
|
|
130
|
-
| | `-- BROWSER.md # neu bat browser
|
|
131
|
-
| `-- workspace-{bot2}/
|
|
132
|
-
| |-- IDENTITY.md
|
|
133
|
-
| |-- SOUL.md
|
|
134
|
-
| |-- AGENTS.md
|
|
135
|
-
| |-- USER.md
|
|
136
|
-
| |-- TOOLS.md
|
|
137
|
-
| |-- MEMORY.md
|
|
138
|
-
| |-- browser-tool.js # neu bat browser
|
|
139
|
-
| `-- BROWSER.md # neu bat browser
|
|
140
|
-
|-- TELEGRAM-POST-INSTALL.md
|
|
141
|
-
|-- .9router/
|
|
142
|
-
| `-- 9router-smart-route-sync.js # chi khi provider = 9router
|
|
143
|
-
|-- start-bot.bat / start-bot.sh # chi native
|
|
144
|
-
|-- uninstall-openclaw-*.bat/sh
|
|
145
|
-
`-- docker/
|
|
146
|
-
`-- openclaw/
|
|
147
|
-
|-- Dockerfile # chi docker mode
|
|
148
|
-
|-- docker-compose.yml # chi docker mode
|
|
149
|
-
`-- .env # chi docker mode
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Ghi chu multi-bot:
|
|
153
|
-
|
|
154
|
-
- `openclaw.json` co `channels.telegram.accounts` cho tung bot
|
|
155
|
-
- moi workspace co `AGENTS.md` mo ta handoff/routing
|
|
156
|
-
- wizard hien khong tao file rieng `TEAM.md` hay `RELAY.md`
|
|
157
|
-
- noi dung team coordination da duoc nhap vao `AGENTS.md`
|
|
158
|
-
- noi dung security da duoc nhap vao `AGENTS.md`
|
|
159
|
-
- noi dung relay da duoc nhap vao `TOOLS.md`
|
|
160
|
-
|
|
161
|
-
## Hanh vi theo channel
|
|
162
|
-
|
|
163
|
-
### Telegram single
|
|
164
|
-
|
|
165
|
-
- co `TELEGRAM_BOT_TOKEN` trong `.env`
|
|
166
|
-
- native script load `.env` roi chay gateway
|
|
167
|
-
- docker dung `docker/openclaw/.env`
|
|
168
|
-
|
|
169
|
-
### Telegram multi-bot
|
|
170
|
-
|
|
171
|
-
- co `TELEGRAM_BOT_TOKEN_1..N` va co the co `TELEGRAM_GROUP_ID` trong `.env`
|
|
172
|
-
- `openclaw.json` van co `channels.telegram.accounts` cho tung bot
|
|
173
|
-
- relay plugin `openclaw-telegram-multibot-relay` duoc bat
|
|
174
|
-
|
|
175
|
-
### Zalo Bot API
|
|
176
|
-
|
|
177
|
-
- co `ZALO_BOT_TOKEN` trong `.env`
|
|
178
|
-
- code hien cung de san `ZALO_APP_ID` va `ZALO_APP_SECRET` placeholder
|
|
179
|
-
- native va docker deu can secrets nay
|
|
180
|
-
|
|
181
|
-
### Zalo Personal
|
|
182
|
-
|
|
183
|
-
- khong co bot token trong `.env`
|
|
184
|
-
- native: script tu dong mo flow login `zalouser`
|
|
185
|
-
- docker: user chay lenh login sau khi container da len
|
|
186
|
-
|
|
187
|
-
## Danh sach file khong nen tao
|
|
188
|
-
|
|
189
|
-
- khong tao `agents/` o project root
|
|
190
|
-
- khong tao `.openclaw/workspace` chung kieu cu
|
|
191
|
-
- khong tao `models.json` trong agent dir khi dung `9router`
|
|
192
|
-
- khong tao Docker artifacts trong native mode
|
|
193
|
-
- khong tao root/per-agent `auth-profiles.json` khi dung `9router`
|
|
194
|
-
- khong tao file rieng `TEAM.md` / `RELAY.md` trong wizard hien tai
|
|
195
|
-
|
|
196
|
-
## Ket luan thuc te hien tai
|
|
197
|
-
|
|
198
|
-
Sau khi chinh code:
|
|
199
|
-
|
|
200
|
-
- logic tao thu muc `.openclaw`, `workspace-{slug}`, `auth-profiles.json` da dong bo hon giua native va docker
|
|
201
|
-
- native va docker deu co `.env` de ghi nhan secrets theo provider/channel
|
|
202
|
-
- 4 OS native deu load project `.env` truoc khi start gateway
|
|
203
|
-
- tai lieu nay mo ta code thuc te hien tai, khong mo ta combo modes dang tam ngung trong UI
|