create-openclaw-bot 5.5.0 → 5.6.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.
Files changed (39) hide show
  1. package/README.md +18 -17
  2. package/README.vi.md +18 -17
  3. package/{cli.js → dist/cli.js} +295 -224
  4. package/dist/setup/shared/install-gen.js +485 -0
  5. package/{setup/shared/scaffold-gen.js → dist/setup/shared/workspace-gen.js} +247 -25
  6. package/{setup.js → dist/setup.js} +771 -1158
  7. package/package.json +10 -7
  8. package/.github/workflows/check-openclaw-update.yml +0 -106
  9. package/CHANGELOG.md +0 -602
  10. package/CHANGELOG.vi.md +0 -588
  11. package/docs/SETUP.md +0 -532
  12. package/docs/SETUP.vi.md +0 -439
  13. package/docs/ai-providers.md +0 -144
  14. package/docs/ai-providers.vi.md +0 -144
  15. package/docs/browser-automation-guide.md +0 -207
  16. package/docs/faq.md +0 -63
  17. package/docs/faq.vi.md +0 -63
  18. package/docs/hardware-guide.md +0 -55
  19. package/docs/hardware-guide.vi.md +0 -55
  20. package/docs/install-docker.md +0 -161
  21. package/docs/install-docker.vi.md +0 -161
  22. package/docs/install-native.md +0 -96
  23. package/docs/install-native.vi.md +0 -96
  24. package/docs/preview.png +0 -0
  25. package/docs/skills-plugins-guide.md +0 -126
  26. package/index.html +0 -589
  27. package/old_v510.js +0 -0
  28. package/setup/shared/runtime-gen.js +0 -710
  29. package/style.css +0 -1653
  30. package/upgrade.ps1 +0 -90
  31. package/upgrade.sh +0 -93
  32. /package/{setup → dist/setup}/data/channels.js +0 -0
  33. /package/{setup → dist/setup}/data/header.js +0 -0
  34. /package/{setup → dist/setup}/data/index.js +0 -0
  35. /package/{setup → dist/setup}/data/plugins.js +0 -0
  36. /package/{setup → dist/setup}/data/providers.js +0 -0
  37. /package/{setup → dist/setup}/data/skills.js +0 -0
  38. /package/{setup → dist/setup}/shared/common-gen.js +0 -0
  39. /package/{setup → dist/setup}/shared/docker-gen.js +0 -0
package/index.html DELETED
@@ -1,589 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="vi">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta name="description" content="Setup your own free AI Bot on Telegram or Zalo in minutes with OpenClaw.">
7
- <title>🦞 OpenClaw Setup — AI Bot Wizard</title>
8
- <link rel="stylesheet" href="style.css">
9
- </head>
10
- <body>
11
-
12
- <div class="app-container">
13
-
14
- <!-- ========== Header ========== -->
15
- <header class="header">
16
- <div class="header__logo" aria-hidden="true">🦞</div>
17
- <h1 class="header__title">OpenClaw Setup</h1>
18
- <p class="header__subtitle" data-vi="Tạo AI Bot miễn phí trên Telegram hoặc Zalo trong vài phút" data-en="Create your free AI Bot on Telegram or Zalo in minutes">Tạo AI Bot miễn phí trên Telegram hoặc Zalo trong vài phút</p>
19
- </header>
20
-
21
- <!-- ========== Progress Bar ========== -->
22
- <nav class="progress-bar" aria-label="Setup progress">
23
- <div class="progress-step progress-step--active" data-pstep="1" onclick="window.__navToStep && window.__navToStep(1)" style="cursor:pointer" title="Bước 1">
24
- <span class="progress-step__circle">1</span>
25
- <span class="progress-step__label" data-vi="Môi trường" data-en="Environment">Môi trường</span>
26
- </div>
27
- <div class="progress-line" data-after="1"></div>
28
- <div class="progress-step" data-pstep="2" onclick="window.__navToStep && window.__navToStep(2)" style="cursor:pointer" title="Bước 2">
29
- <span class="progress-step__circle">2</span>
30
- <span class="progress-step__label" data-vi="Chọn kênh" data-en="Channel">Chọn kênh</span>
31
- </div>
32
- <div class="progress-line" data-after="2"></div>
33
- <div class="progress-step" data-pstep="3" onclick="window.__navToStep && window.__navToStep(3)" style="cursor:pointer" title="Bước 3">
34
- <span class="progress-step__circle">3</span>
35
- <span class="progress-step__label" data-vi="Cấu hình Bot" data-en="Configure Bot">Cấu hình Bot</span>
36
- </div>
37
- <div class="progress-line" data-after="3"></div>
38
- <div class="progress-step" data-pstep="4" onclick="window.__navToStep && window.__navToStep(4)" style="cursor:pointer" title="Bước 4">
39
- <span class="progress-step__circle">4</span>
40
- <span class="progress-step__label" data-vi="API Keys" data-en="API Keys">API Keys</span>
41
- </div>
42
- <div class="progress-line" data-after="4"></div>
43
- <div class="progress-step" data-pstep="5" onclick="window.__navToStep && window.__navToStep(5)" style="cursor:pointer" title="Bước 5">
44
- <span class="progress-step__circle">5</span>
45
- <span class="progress-step__label" data-vi="Hoàn tất" data-en="Finish">Hoàn tất</span>
46
- </div>
47
- </nav>
48
-
49
- <!-- ========== Steps Container ========== -->
50
- <main class="steps-container">
51
-
52
- <!-- ===== Step 1: Environment / Deploy Mode ===== -->
53
- <section class="step step--active" data-step="1">
54
- <!-- Header row: title + lang toggle -->
55
- <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px;">
56
- <div>
57
- <h2 class="step__title" data-vi="Bạn đang dùng hệ điều hành nào?" data-en="What's your operating system?" style="margin-bottom: 4px;">Bạn đang dùng hệ điều hành nào?</h2>
58
- <p class="step__description" style="margin: 0;" data-vi="Chọn môi trường để nhận script cài đặt phù hợp nhất." data-en="Choose your environment to get the most suitable setup script.">Chọn môi trường để nhận script cài đặt phù hợp nhất.</p>
59
- </div>
60
- <input type="hidden" id="cfg-language" value="vi">
61
- <div class="lang-toggle" id="lang-toggle" style="flex-shrink: 0; margin-left: 16px;">
62
- <button type="button" class="lang-toggle__btn lang-toggle__btn--active" data-lang="vi" onclick="window.__selectLang('vi')">
63
- <span class="lang-toggle__flag" data-lang="vi"></span>
64
- <span>VI</span>
65
- </button>
66
- <button type="button" class="lang-toggle__btn" data-lang="en" onclick="window.__selectLang('en')">
67
- <span class="lang-toggle__flag" data-lang="en"></span>
68
- <span>EN</span>
69
- </button>
70
- </div>
71
- </div>
72
-
73
- <!-- OS Selection: 4 horizontal cards -->
74
- <div id="native-os-grid" style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px;">
75
-
76
- <!-- Windows -->
77
- <div class="channel-card channel-card--selected env-os-card" data-os="win" id="card-os-win" onclick="window.__selectOs('win')" style="cursor:pointer; padding: 18px 14px; text-align: center; position: relative;">
78
- <div style="font-size: 36px; margin-bottom: 10px; line-height: 1;">🪟</div>
79
- <div style="font-weight: 700; font-size: 15px; margin-bottom: 6px;">Windows</div>
80
- <div style="font-size: 12px; color: var(--text-muted); margin-bottom: 12px;" data-vi="10 / 11" data-en="10 / 11">10 / 11</div>
81
- <span class="env-deploy-badge badge--official" style="font-size: 10.5px; padding: 3px 8px; border-radius: 20px; display: inline-block;" data-vi="🐳 Docker + .bat" data-en="🐳 Docker + .bat">🐳 Docker + .bat</span>
82
- </div>
83
-
84
- <!-- macOS -->
85
- <div class="channel-card env-os-card" data-os="linux" id="card-os-linux" onclick="window.__selectOs('linux')" style="cursor:pointer; padding: 18px 14px; text-align: center; position: relative;">
86
- <div style="font-size: 36px; margin-bottom: 10px; line-height: 1;">🍎</div>
87
- <div style="font-weight: 700; font-size: 15px; margin-bottom: 6px;">macOS</div>
88
- <div style="font-size: 12px; color: var(--text-muted); margin-bottom: 12px;" data-vi="Ventura trở lên" data-en="Ventura and above">Ventura trở lên</div>
89
- <span class="env-deploy-badge badge--official" style="font-size: 10.5px; padding: 3px 8px; border-radius: 20px; display: inline-block;" data-vi="🐳 Docker + .sh" data-en="🐳 Docker + .sh">🐳 Docker + .sh</span>
90
- </div>
91
-
92
- <!-- Ubuntu / VPS -->
93
- <div class="channel-card env-os-card" data-os="vps" id="card-os-vps" onclick="window.__selectOs('vps')" style="cursor:pointer; padding: 18px 14px; text-align: center; position: relative;">
94
- <div style="font-size: 36px; margin-bottom: 10px; line-height: 1;">🐧</div>
95
- <div style="font-weight: 700; font-size: 15px; margin-bottom: 6px;">Ubuntu / VPS</div>
96
- <div style="font-size: 12px; color: var(--text-muted); margin-bottom: 12px;" data-vi="Server, cloud VPS" data-en="Server, cloud VPS">Server, cloud VPS</div>
97
- <span class="env-deploy-badge badge--warning" style="font-size: 10.5px; padding: 3px 8px; border-radius: 20px; display: inline-block;" data-vi="💻 Native + PM2" data-en="💻 Native + PM2">💻 Native + PM2</span>
98
- </div>
99
-
100
- <!-- Linux Desktop -->
101
- <div class="channel-card env-os-card" data-os="linux-desktop" id="card-os-linux-desktop" onclick="window.__selectOs('linux-desktop')" style="cursor:pointer; padding: 18px 14px; text-align: center; position: relative;">
102
- <div style="font-size: 36px; margin-bottom: 10px; line-height: 1;">🖥️</div>
103
- <div style="font-weight: 700; font-size: 15px; margin-bottom: 6px;" data-vi="Linux Desktop" data-en="Linux Desktop">Linux Desktop</div>
104
- <div style="font-size: 12px; color: var(--text-muted); margin-bottom: 12px;" data-vi="Ubuntu, Debian, Mint..." data-en="Ubuntu, Debian, Mint...">Ubuntu, Debian, Mint...</div>
105
- <span class="env-deploy-badge badge--warning" style="font-size: 10.5px; padding: 3px 8px; border-radius: 20px; display: inline-block;" data-vi="💻 Native .sh" data-en="💻 Native .sh">💻 Native .sh</span>
106
- </div>
107
- </div>
108
-
109
- <!-- Smart Advisory Panel (updates per OS selection) -->
110
- <div id="env-advisory" style="margin-top: 16px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02);">
111
- <!-- Advisory content filled by JS -->
112
- <div id="env-advisory-inner" style="padding: 14px 18px; display: flex; gap: 16px; align-items: flex-start;">
113
- <div style="font-size: 28px; flex-shrink: 0; line-height: 1; margin-top: 2px;" id="env-adv-icon">🪟</div>
114
- <div style="flex: 1; min-width: 0;">
115
- <div style="font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text-primary);" id="env-adv-title">Windows — Khuyên dùng Docker</div>
116
- <div style="font-size: 13px; color: var(--text-secondary); line-height: 1.6;" id="env-adv-desc">Bot chạy trong container isolation. Script <code>.bat</code> tự động cài Docker Desktop, pull model, build &amp; start — không cần thao tác thủ công.</div>
117
- </div>
118
- <div id="env-adv-badge" style="flex-shrink: 0; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); white-space: nowrap;">🐳 Docker</div>
119
- </div>
120
-
121
- <!-- Advanced override toggle -->
122
- <div style="border-top: 1px solid rgba(255,255,255,0.06); padding: 10px 18px; display: flex; align-items: center; justify-content: space-between;">
123
- <span style="font-size: 12px; color: var(--text-muted);" data-vi="Muốn thay đổi chế độ deploy?" data-en="Want to override deploy mode?">Muốn thay đổi chế độ deploy?</span>
124
- <button onclick="window.__toggleDeployOverride()" style="background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 2px 0; font-weight: 500;" id="btn-deploy-toggle">
125
- <span data-vi="Tuỳ chỉnh ▾" data-en="Customize ▾">Tuỳ chỉnh ▾</span>
126
- </button>
127
- </div>
128
-
129
- <!-- Deploy override panel (hidden by default) -->
130
- <div id="deploy-override-panel" style="display: none; border-top: 1px solid rgba(255,255,255,0.06); padding: 14px 18px;">
131
- <p style="font-size: 12px; color: var(--text-muted); margin-bottom: 10px;" data-vi="Chọn chế độ deploy thủ công nếu bạn biết mình muốn gì:" data-en="Manually select deploy mode if you know what you want:">Chọn chế độ deploy thủ công nếu bạn biết mình muốn gì:</p>
132
- <div id="deploy-mode-grid" style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
133
- <div class="channel-card" data-deploy="docker" id="card-deploy-docker" style="padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px;">
134
- <span style="font-size: 22px;">🐳</span>
135
- <div>
136
- <div style="font-weight: 600; font-size: 13px;">Docker</div>
137
- <div style="font-size: 11px; color: var(--text-muted);" data-vi="Container isolation" data-en="Container isolation">Container isolation</div>
138
- </div>
139
- </div>
140
- <div class="channel-card" data-deploy="native" id="card-deploy-native" style="padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px;">
141
- <span style="font-size: 22px;">💻</span>
142
- <div>
143
- <div style="font-weight: 600; font-size: 13px;" data-vi="Native" data-en="Native">Native</div>
144
- <div style="font-size: 11px; color: var(--text-muted);" data-vi="Chạy thẳng trên máy" data-en="Run directly on machine">Chạy thẳng trên máy</div>
145
- </div>
146
- </div>
147
- </div>
148
- <!-- Docker notice -->
149
- <div id="docker-install-notice" style="display: none; margin-top: 10px; padding: 10px 14px; background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2); border-radius: 8px; font-size: 12px; color: var(--text-secondary);">
150
- 🐳 <span data-vi="Script tự cài Docker Engine + Compose V2 nếu chưa có." data-en="Script auto-installs Docker Engine + Compose V2 if missing.">Script tự cài Docker Engine + Compose V2 nếu chưa có.</span>
151
- <div id="docker-win-notice" style="display:none; margin-top: 6px; color: #ffc107;">
152
- ⚠️ <span data-vi="Windows: yêu cầu khởi động lại sau khi cài Docker Desktop." data-en="Windows: restart required after Docker Desktop install.">Windows: yêu cầu khởi động lại sau khi cài Docker Desktop.</span>
153
- </div>
154
- </div>
155
- </div>
156
- </div>
157
-
158
- </section>
159
-
160
-
161
- <!-- ===== Step 2: Choose Channel ===== -->
162
- <section class="step" data-step="2">
163
- <h2 class="step__title" data-vi="Chọn kênh chat cho Bot" data-en="Choose Chat Channel">Chọn kênh chat cho Bot</h2>
164
- <p class="step__description" data-vi="Bot AI của bạn sẽ hoạt động trên nền tảng nào? Chọn 1 kênh bên dưới." data-en="Which platform will your AI Bot operate on? Choose a channel below.">Bot AI của bạn sẽ hoạt động trên nền tảng nào? Chọn 1 kênh bên dưới.</p>
165
-
166
- <div class="channel-grid">
167
- <div class="channel-card" data-channel="telegram" id="card-telegram">
168
- <div class="channel-card__icon"><img src="https://thesvg.org/icons/telegram/default.svg" alt="Telegram" width="32" height="32"></div>
169
- <h3 class="channel-card__name">Telegram</h3>
170
- <p class="channel-card__desc" data-vi="Bot API chính thức. Hỗ trợ DM & nhóm. Phổ biến nhất." data-en="Official Bot API. Supports DMs & groups. Most popular.">Bot API chính thức. Hỗ trợ DM & nhóm. Phổ biến nhất.</p>
171
- <span class="channel-card__badge badge--official">✅ Official</span>
172
- </div>
173
-
174
- <!-- Combo mode (Telegram + Zalo Personal) — tạm ngưng, sẽ mở lại sau khi nghiên cứu xong -->
175
- <div class="channel-card" data-channel="telegram+zalo-personal" id="card-telegram-zalo-personal" style="display:none">
176
- <div class="channel-card__icon" style="display:flex;gap:4px;align-items:center;">
177
- <img src="https://thesvg.org/icons/telegram/default.svg" alt="Telegram" width="24" height="24">
178
- <span style="font-size:12px;opacity:.5;">+</span>
179
- <img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Icon_of_Zalo.svg" alt="Zalo" width="24" height="24" style="opacity:0.9;">
180
- </div>
181
- <h3 class="channel-card__name" data-vi="Telegram + Zalo" data-en="Telegram + Zalo">Telegram + Zalo</h3>
182
- <p class="channel-card__desc" data-vi="Bot hoạt động cùng lúc trên Telegram và Zalo Personal." data-en="Bot works simultaneously on Telegram and Zalo Personal.">Bot hoạt động cùng lúc trên Telegram và Zalo Personal.</p>
183
- <span class="channel-card__badge badge--warning">⚡ Combo</span>
184
- </div>
185
-
186
- <div class="channel-card" data-channel="zalo-bot" id="card-zalo-bot">
187
- <div class="channel-card__icon"><img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Icon_of_Zalo.svg" alt="Zalo" width="32" height="32"></div>
188
- <h3 class="channel-card__name">Zalo Bot API</h3>
189
- <p class="channel-card__desc" data-vi="Bot API chính thức Zalo. Chat 1:1. Phù hợp hỗ trợ khách hàng." data-en="Official Zalo Bot API. 1:1 Chat. Good for customer support.">Bot API chính thức Zalo. Chat 1:1. Phù hợp hỗ trợ khách hàng.</p>
190
- <span class="channel-card__badge badge--official">✅ Official</span>
191
- </div>
192
-
193
- <div class="channel-card" data-channel="zalo-personal" id="card-zalo-personal">
194
- <div class="channel-card__icon"><img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Icon_of_Zalo.svg" alt="Zalo" width="32" height="32" style="opacity: 0.9;"></div>
195
- <h3 class="channel-card__name">Zalo Personal</h3>
196
- <p class="channel-card__desc" data-vi="Dùng tài khoản Zalo cá nhân. Login bằng QR code." data-en="Use personal Zalo account. Login via QR code.">Dùng tài khoản Zalo cá nhân. Login bằng QR code.</p>
197
- <span class="channel-card__badge badge--warning">⚠️ Unofficial</span>
198
- </div>
199
- </div>
200
-
201
- <!-- Multi-bot selector (Telegram only) -->
202
- <div id="multibot-panel" style="display:none; margin-top:24px; padding:20px 22px; border:1px solid rgba(99,102,241,0.3); border-radius:12px; background:linear-gradient(135deg,rgba(99,102,241,0.05),rgba(139,92,246,0.03));">
203
- <div style="display:flex;align-items:center;gap:10px;margin-bottom:14px;">
204
- <span style="font-size:22px;">🤖</span>
205
- <div>
206
- <div style="font-weight:700;font-size:15px;color:var(--text-primary);" data-vi="Muốn triển khai nhiều bot không?" data-en="Want to deploy multiple bots?">Muốn triển khai nhiều bot không?</div>
207
- <div style="font-size:12px;color:var(--text-muted);margin-top:2px;" data-vi="Các bot sẽ hoạt động như một phòng ban — mỗi bot có vai trò riêng." data-en="Bots work like a team department — each with a distinct role.">Các bot sẽ hoạt động như một phòng ban — mỗi bot có vai trò riêng.</div>
208
- </div>
209
- </div>
210
-
211
- <!-- How it works -->
212
- <div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;">
213
- <div style="flex:1;min-width:180px;padding:8px 12px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:8px;font-size:12px;color:var(--text-secondary);">
214
- <div style="font-weight:600;color:var(--text-primary);margin-bottom:4px;">🔇 Không có mention</div>
215
- <span data-vi="Bot sẽ react 👍❤️🔥 vào tin nhắn nhưng không reply để tránh spam" data-en="Bots react 👍❤️🔥 to messages but stay silent to avoid spam">Bot sẽ react 👍❤️🔥 vào tin nhắn nhưng không reply để tránh spam</span>
216
- </div>
217
- <div style="flex:1;min-width:180px;padding:8px 12px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:8px;font-size:12px;color:var(--text-secondary);">
218
- <div style="font-weight:600;color:var(--text-primary);margin-bottom:4px;">📣 @mention / /slash</div>
219
- <span data-vi="Chỉ bot được tag mới trả lời — như gọi đúng tên nhân viên trong phòng họp" data-en="Only the tagged bot responds — like calling an employee by name in a meeting">Chỉ bot được tag mới trả lời, như gọi đúng tên nhân viên trong phòng họp</span>
220
- </div>
221
- <div style="flex:1;min-width:180px;padding:8px 12px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:8px;font-size:12px;color:var(--text-secondary);">
222
- <div style="font-weight:600;color:var(--text-primary);margin-bottom:4px;">🗃️ Workspace chia sẻ</div>
223
- <span data-vi="Các bot cùng chung thư mục workspace — có thể đọc file của nhau, phối hợp tác vụ" data-en="Bots share a workspace folder — can read each other's files, collaborate on tasks">Các bot cùng chung thư mục workspace, có thể đọc file của nhau, phối hợp tác vụ</span>
224
- </div>
225
- </div>
226
-
227
- <!-- Bot count picker -->
228
- <div>
229
- <div style="font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:10px;" data-vi="Số lượng bot:" data-en="Number of bots:">Số lượng bot:</div>
230
- <div style="display:flex;gap:8px;flex-wrap:wrap;" id="botcount-grid">
231
- <button class="botcount-btn botcount-btn--active" data-count="1" onclick="window.__selectBotCount(1)" style="padding:8px 20px;border-radius:8px;border:1px solid rgba(99,102,241,0.5);background:rgba(99,102,241,0.15);color:var(--text-primary);font-weight:600;cursor:pointer;font-size:14px;">1 bot</button>
232
- <button class="botcount-btn" data-count="2" onclick="window.__selectBotCount(2)" style="padding:8px 20px;border-radius:8px;border:1px solid rgba(255,255,255,0.12);background:transparent;color:var(--text-secondary);font-weight:600;cursor:pointer;font-size:14px;">2 bot</button>
233
- <button class="botcount-btn" data-count="3" onclick="window.__selectBotCount(3)" style="padding:8px 20px;border-radius:8px;border:1px solid rgba(255,255,255,0.12);background:transparent;color:var(--text-secondary);font-weight:600;cursor:pointer;font-size:14px;">3 bot</button>
234
- <button class="botcount-btn" data-count="4" onclick="window.__selectBotCount(4)" style="padding:8px 20px;border-radius:8px;border:1px solid rgba(255,255,255,0.12);background:transparent;color:var(--text-secondary);font-weight:600;cursor:pointer;font-size:14px;">4 bot</button>
235
- <button class="botcount-btn" data-count="5" onclick="window.__selectBotCount(5)" style="padding:8px 20px;border-radius:8px;border:1px solid rgba(255,255,255,0.12);background:transparent;color:var(--text-secondary);font-weight:600;cursor:pointer;font-size:14px;">5 bot</button>
236
- </div>
237
- </div>
238
-
239
- <!-- Multi-bot group option -->
240
- <div id="multibot-group-option" style="display:none;margin-top:18px;">
241
- <div style="font-size:12px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:10px;">
242
- 📱 <span data-vi="Telegram Group cho các bot" data-en="Telegram Group for the bots">Telegram Group cho các bot</span>
243
- </div>
244
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:10px;">
245
- <!-- Card: Create later -->
246
- <label id="group-card-create" for="group-opt-create" style="cursor:pointer;display:flex;flex-direction:column;gap:6px;padding:14px 16px;background:rgba(16,185,129,0.08);border:1.5px solid rgba(16,185,129,0.5);border-radius:12px;transition:all .18s;position:relative;">
247
- <input type="radio" name="group-option" value="create" id="group-opt-create" checked style="position:absolute;opacity:0;pointer-events:none;" onchange="window.__onGroupOptionChange()">
248
- <div style="display:flex;align-items:center;gap:8px;">
249
- <span style="font-size:20px;">✨</span>
250
- <span style="font-size:13px;font-weight:600;color:var(--text-primary);" data-vi="Tôi sẽ tạo sau" data-en="I'll create later">Tôi sẽ tạo sau</span>
251
- </div>
252
- <p style="margin:0;font-size:11.5px;color:var(--text-secondary);line-height:1.5;" data-vi="Setup xong rồi tạo group, thêm từng bot vào là xong." data-en="Finish setup first, then create a group and add each bot.">Setup xong rồi tạo group, thêm từng bot vào là xong.</p>
253
- <div id="group-card-create-check" style="position:absolute;top:10px;right:12px;width:16px;height:16px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;">
254
- <svg width="9" height="9" viewBox="0 0 9 9" fill="none"><path d="M1.5 4.5L3.5 6.5L7.5 2.5" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
255
- </div>
256
- </label>
257
- <!-- Card: Already have group -->
258
- <label id="group-card-existing" for="group-opt-existing" style="cursor:pointer;display:flex;flex-direction:column;gap:6px;padding:14px 16px;background:rgba(255,255,255,0.03);border:1.5px solid rgba(255,255,255,0.1);border-radius:12px;transition:all .18s;position:relative;">
259
- <input type="radio" name="group-option" value="existing" id="group-opt-existing" style="position:absolute;opacity:0;pointer-events:none;" onchange="window.__onGroupOptionChange()">
260
- <div style="display:flex;align-items:center;gap:8px;">
261
- <span style="font-size:20px;">🔗</span>
262
- <span style="font-size:13px;font-weight:600;color:var(--text-primary);" data-vi="Đã có group" data-en="Already have a group">Đã có group</span>
263
- </div>
264
- <p style="margin:0;font-size:11.5px;color:var(--text-secondary);line-height:1.5;" data-vi="Nhập Group ID để bot tự join và nhận diện nhau." data-en="Enter the Group ID so bots can join and recognize each other.">Nhập Group ID để bot tự join và nhận diện nhau.</p>
265
- <div id="group-card-existing-check" style="position:absolute;top:10px;right:12px;width:16px;height:16px;border-radius:50%;background:rgba(255,255,255,0.12);border:1.5px solid rgba(255,255,255,0.2);display:flex;align-items:center;justify-content:center;">
266
- <svg width="9" height="9" viewBox="0 0 9 9" fill="none"><path d="M1.5 4.5L3.5 6.5L7.5 2.5" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" opacity=".3"/></svg>
267
- </div>
268
- </label>
269
- </div>
270
- <!-- Group ID input (shown when existing selected) -->
271
- <div id="group-id-wrap" style="display:none;margin-top:12px;">
272
- <div style="display:flex;gap:8px;align-items:stretch;">
273
- <input type="text" id="cfg-group-id" class="form-input" placeholder="-1001234567890" style="font-family:monospace;font-size:13px;flex:1;" oninput="window.__saveGroupId(this.value)">
274
- <a href="https://t.me/userinfobot" target="_blank" rel="noopener"
275
- style="display:inline-flex;align-items:center;gap:6px;padding:0 14px;background:rgba(99,102,241,0.15);border:1.5px solid rgba(99,102,241,0.4);border-radius:8px;font-size:12px;font-weight:600;color:#a5b4fc;text-decoration:none;white-space:nowrap;transition:all .15s;"
276
- onmouseover="this.style.background='rgba(99,102,241,0.28)';this.style.borderColor='rgba(99,102,241,0.7)'"
277
- onmouseout="this.style.background='rgba(99,102,241,0.15)';this.style.borderColor='rgba(99,102,241,0.4)'">
278
- <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>
279
- <span data-vi="Lấy Group ID" data-en="Get Group ID">Lấy Group ID</span>
280
- </a>
281
- </div>
282
- <p class="form-group__hint" style="margin-top:6px;" id="group-id-hint">
283
- <span data-vi="Hướng dẫn lấy Group ID: Vào thanh tìm kiếm trên Telegram → nhập @userinfobot → bấm nút Start để bắt đầu → chọn nút Group trên màn hình chat → chọn Group bạn muốn thêm bot vào → bot trả về Group ID." data-en="Search @userinfobot on Telegram → click Start → click Group → select the group you want to add the bot to → the bot will reply with the Group ID.">Hướng dẫn lấy Group ID: Vào thanh tìm kiếm trên Telegram → nhập @userinfobot → bấm nút Start để bắt đầu → chọn nút Group trên màn hình chat → chọn Group bạn muốn thêm bot vào → bot trả về Group ID.</span>
284
- </p>
285
- </div>
286
-
287
- </div>
288
-
289
- </div>
290
-
291
- </section>
292
-
293
- <!-- ===== Step 3: Bot Config ===== -->
294
- <section class="step" data-step="3">
295
- <h2 class="step__title"><span data-vi="Cấu hình Bot — " data-en="Configure Bot — ">Cấu hình Bot — </span><span id="selected-channel-label"></span></h2>
296
- <p class="step__description" data-vi="Chọn AI model, đặt tên, tính cách và quy tắc cho Bot của bạn." data-en="Choose AI model, set name, persona and rules for your Bot.">Chọn AI model, đặt tên, tính cách và quy tắc cho Bot của bạn.</p>
297
-
298
- <!-- Multi-bot tab switcher (hidden for single bot) -->
299
- <div id="bot-tab-bar" style="display:block; margin-bottom:20px;">
300
- <div id="multibot-tab-label" style="display:none; font-size:12px;color:var(--text-muted);margin-bottom:8px;" data-vi="Cấu hình từng bot — click vào tab để chuyển đổi:" data-en="Configure each bot — click a tab to switch:">Cấu hình từng bot — click vào tab để chuyển đổi:</div>
301
- <div id="bot-tabs" style="display:none;gap:6px;flex-wrap:wrap;"></div>
302
- <!-- Per-bot quick config -->
303
- <div id="bot-tab-meta" style="margin-top:14px;padding:14px 16px;background:rgba(99,102,241,0.05);border:1px solid rgba(99,102,241,0.2);border-radius:10px;">
304
- <div style="display:flex;gap:12px;flex-wrap:wrap;">
305
- <div class="form-group" style="flex:1;min-width:160px;margin:0;">
306
- <label class="form-group__label" data-vi="Tên bot này" data-en="This bot's name">Tên bot này <span style="color: var(--danger, #ef4444);">*</span></label>
307
- <input type="text" class="form-input" id="cfg-bot-tab-name" placeholder="VD: Williams, Luna..." oninput="window.__saveBotTabName(this.value)" style="font-size:13px;">
308
- </div>
309
- <div class="form-group" id="slash-cmd-group" style="flex:1;min-width:160px;margin:0;">
310
- <label class="form-group__label" data-vi="Slash command riêng" data-en="Dedicated slash command">Slash command riêng</label>
311
- <input type="text" class="form-input" id="cfg-bot-tab-slash" placeholder="/research" oninput="window.__saveBotTabSlash(this.value)" style="font-size:13px;font-family:monospace;">
312
- <p class="form-group__hint" data-vi="Nhập /slash_name để bot react." data-en="Enter /slash_name for bot to react.">Nhập /slash_name để bot react.</p>
313
- </div>
314
- <div class="form-group" style="flex:2;min-width:200px;margin:0;">
315
- <label class="form-group__label" data-vi="Vai trò / Mô tả bot này" data-en="This bot's role / desc">Vai trò / Mô tả bot này</label>
316
- <input type="text" class="form-input" id="cfg-bot-tab-desc" placeholder="VD: Trợ lý AI cá nhân" oninput="window.__saveBotTabDesc(this.value)" style="font-size:13px;">
317
- </div>
318
- </div>
319
- <div style="margin-top:12px;">
320
- <div class="form-group" style="margin:0;">
321
- <label class="form-group__label" data-vi="Tính cách, Vibe & Quy tắc trả lời" data-en="Personality, Vibe & Rules">Tính cách, Vibe & Quy tắc trả lời</label>
322
- <input type="text" class="form-input" id="cfg-bot-tab-persona" placeholder="VD: Gọn gàng, xưng hô lịch sự, thân thiện" oninput="window.__saveBotTabPersona(this.value)" style="font-size:13px;">
323
- <p class="form-group__hint" data-vi="Quy định cách ứng xử của bot (lưu vào SOUL.md / AGENTS.md)." data-en="Defines how the bot behaves (saved to SOUL.md / AGENTS.md).">Quy định cách ứng xử của bot (lưu vào SOUL.md / AGENTS.md).</p>
324
- </div>
325
- </div>
326
- </div>
327
- <p class="form-group__hint" style="margin-top:8px;" data-vi="AI Provider, Model và cài đặt bên dưới được áp dụng cho toàn cục." data-en="AI Provider, Model and settings below apply system-wide.">AI Provider, Model và cài đặt bên dưới được áp dụng chung.</p>
328
- </div>
329
-
330
- <!-- ─── User Info (→ USER.md) ─── -->
331
- <div class="form-group" style="margin-top:28px;padding-top:20px;border-top:1px solid rgba(255,255,255,0.06);">
332
- <label class="form-group__label" for="cfg-user-info" data-vi="👤 Thông tin về bạn và cách xưng hô với bạn (Vd: Tên bạn, sở thích, cách xưng hô)" data-en="👤 About You (so the bot replies better)">👤 Thông tin về bạn (Vd: Tên bạn, sở thích, cách xưng hô)</label>
333
- <textarea class="form-textarea" id="cfg-user-info" placeholder="VD: Tuấn thích vọc code, múi giờ UTC+7. Xưng hô tui-bro, thích câu trả lời đi thẳng vào vấn đề, không thảo mai..." style="min-height: 90px;"></textarea>
334
- <div class="prompt-notice">
335
- <span class="prompt-notice__icon">👤</span>
336
- <span class="prompt-notice__text" data-vi="Nội dung trên sẽ vào <code>USER.md</code> — bot dùng để cá nhân hóa cách trả lời cho bạn." data-en="This configures <code>USER.md</code> — used to personalize answers for you.">Nội dung trên sẽ vào <code>USER.md</code> — bot dùng để cá nhân hóa cách trả lời cho bạn.</span>
337
- </div>
338
- </div>
339
-
340
- <div class="form-group">
341
- <label class="form-group__label" data-vi="Nhà cung cấp AI" data-en="AI Provider">Nhà cung cấp AI</label>
342
- <div class="provider-grid" id="provider-grid">
343
- <!-- Rendered by JS -->
344
- </div>
345
- </div>
346
-
347
- <!-- ─── 2. Model Selection + Language Toggle ─── -->
348
- <div class="form-group">
349
- <div class="model-header">
350
- <label class="form-group__label" for="cfg-model">AI Model</label>
351
-
352
- </div>
353
- <select class="form-select" id="cfg-model">
354
- <!-- Populated by JS based on provider -->
355
- </select>
356
- </div>
357
-
358
- <!-- ─── Section divider ─── -->
359
- <div class="section-divider">
360
- <span class="section-divider__icon">🔐</span>
361
- <span class="section-divider__text" data-vi="Quy tắc Bảo mật" data-en="Security Rules">Quy tắc Bảo mật</span>
362
- </div>
363
-
364
- <!-- ─── 5. Security Rules (editable) ─── -->
365
- <div class="form-group">
366
- <div class="security-rules-header">
367
- <label class="form-group__label" data-vi="Quy tắc bảo mật mặc định" data-en="Default Security Rules">Quy tắc bảo mật mặc định</label>
368
- <button type="button" class="btn-toggle-edit" id="btn-toggle-security" onclick="window.__toggleSecurityEdit()"><span data-vi="✏️ Sửa" data-en="✏️ Edit">✏️ Sửa</span></button>
369
- </div>
370
- <p class="form-group__hint" style="margin-bottom: 12px;" data-vi="OpenClaw tự áp dụng các quy tắc này. Bạn có thể sửa nếu cần." data-en="OpenClaw applies these rules by default. You can edit if needed.">OpenClaw tự áp dụng các quy tắc này. Bạn có thể sửa nếu cần.</p>
371
- <textarea class="form-textarea security-textarea" id="cfg-security" readonly></textarea>
372
- <div class="prompt-notice" style="background: linear-gradient(135deg, rgba(239,68,68,0.06), rgba(239,68,68,0.02)); border-color: rgba(239,68,68,0.15);">
373
- <span class="prompt-notice__icon">🛡️</span>
374
- <span class="prompt-notice__text" style="color: var(--text-secondary);" data-vi="<strong style='color: #f87171;'>Quan trọng:</strong> Các quy tắc này bảo vệ hệ thống, credentials, và ví crypto. Sửa cẩn thận — xóa quy tắc bảo mật có thể gây rủi ro." data-en="<strong style='color: #f87171;'>Important:</strong> These rules protect your system, credentials, and crypto wallets. Edit carefully — removing them causes risk."><strong style="color: #f87171;">Quan trọng:</strong> Các quy tắc này bảo vệ hệ thống, credentials, và ví crypto. Sửa cẩn thận — xóa quy tắc bảo mật có thể gây rủi ro.</span>
375
- </div>
376
- </div>
377
-
378
- <!-- ─── Section divider ─── -->
379
- <div class="section-divider">
380
- <span class="section-divider__icon">🧩</span>
381
- <span class="section-divider__text" data-vi="Mở rộng" data-en="Extensions">Mở rộng</span>
382
- </div>
383
-
384
- <!-- ─── 6. Skills (ClawHub) ─── -->
385
- <div class="form-group">
386
- <label class="form-group__label" data-vi="🧠 Skills — Kỹ năng mở rộng" data-en="🧠 Skills — Capabilities">🧠 Skills — Kỹ năng mở rộng</label>
387
- <p class="form-group__hint" style="margin-bottom: 12px;" data-vi="Chọn skills để bot có thêm khả năng. Được cài từ <a href='https://clawhub.com' target='_blank' style='color: var(--claw-coral);'>ClawHub</a> registry." data-en="Choose skills to give your bot new superpowers. Installed from <a href='https://clawhub.com' target='_blank' style='color: var(--claw-coral);'>ClawHub</a> registry.">Chọn skills để bot có thêm khả năng. Được cài từ <a href="https://clawhub.com" target="_blank" style="color: var(--claw-coral);">ClawHub</a> registry.</p>
388
- <div class="plugin-grid" id="plugin-grid">
389
- <!-- Rendered by JS -->
390
- </div>
391
- </div>
392
-
393
- <!-- ─── 7. Plugins (npm packages — extra channels) ─── -->
394
- <div class="form-group">
395
- <label class="form-group__label" data-vi="🔌 Plugins — Kênh & mở rộng thêm" data-en="🔌 Plugins — Channels & Addons">🔌 Plugins — Kênh & mở rộng thêm</label>
396
- <p class="form-group__hint" style="margin-bottom: 12px;" data-vi="Thêm kênh chat hoặc tính năng runtime. Cài qua npm (<code>openclaw plugins install</code>)." data-en="Add chat channels or runtime features. Installed via npm (<code>openclaw plugins install</code>).">Thêm kênh chat hoặc tính năng runtime. Cài qua npm (<code>openclaw plugins install</code>).</p>
397
- <div class="plugin-grid" id="extra-plugin-grid">
398
- <!-- Rendered by JS -->
399
- </div>
400
- </div>
401
- </section>
402
-
403
- <!-- ===== Step 4: API Keys & Thư Mục ===== -->
404
- <section class="step" data-step="4">
405
- <h2 class="step__title" data-vi="Nhập API Keys & Thư mục" data-en="Enter API Keys & Folder">Nhập API Keys & Thư mục</h2>
406
- <p class="step__description" style="margin-bottom: 4px;" data-vi="Nhập key trực tiếp + chọn nơi lưu project — wizard lo phần còn lại." data-en="Enter keys + choose project folder — the wizard handles the rest.">Nhập key trực tiếp + chọn nơi lưu project — wizard lo phần còn lại.</p>
407
- <p style="font-size: 13px; color: var(--danger, #ef4444); margin-top: 0; margin-bottom: 20px;" data-vi="Các trường có dấu <span style='color:var(--danger,#ef4444)'>*</span> là bắt buộc điền." data-en="Fields marked with <span style='color:var(--danger,#ef4444)'>*</span> are required.">Các trường có dấu <span style="color:var(--danger,#ef4444)">*</span> là bắt buộc điền.</p>
408
-
409
- <!-- Section 1: AI Provider (9Router / Direct API / Ollama) -->
410
- <div id="key-section-provider" style="margin-bottom: 20px;"></div>
411
-
412
- <!-- Section 2: Channel (Telegram / Zalo) -->
413
- <div id="key-section-channel" style="margin-bottom: 20px;"></div>
414
-
415
- <!-- Section 3: Skill env vars -->
416
- <div id="key-section-skills"></div>
417
-
418
- <!-- Project Path Input -->
419
- <div class="form-group" style="margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06);">
420
- <label class="form-group__label" data-vi="📁 Thư mục lưu trữ Bot <span style='color:var(--danger,#ef4444)'>*</span>" data-en="📁 Bot Directory <span style='color:var(--danger,#ef4444)'>*</span>">📁 Thư mục lưu trữ Bot <span style="color:var(--danger,#ef4444)">*</span></label>
421
- <input type="text" class="form-input" id="cfg-project-path" value="D:\openclaw-setup" placeholder="VD: D:\openclaw-setup hoặc /home/user/openclaw-setup" style="font-family: monospace;">
422
- <p class="form-group__hint" data-vi="Script sẽ tự động tạo thư mục này và sinh các file config bên trong." data-en="The script will auto-create this folder and generate config files inside.">Script sẽ tự động tạo thư mục này và sinh các file config bên trong.</p>
423
- </div>
424
-
425
- <div style="margin-top: 16px; padding: 10px 14px; background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.15); border-radius: 8px; font-size: 12px; color: var(--text-secondary);">
426
- 🔒 <span data-vi="Keys chỉ lưu trên máy bạn — không gửi đi đâu. Wizard chạy 100% client-side." data-en="Keys stay on your machine — never sent anywhere. Wizard runs 100% client-side.">Keys chỉ lưu trên máy bạn — không gửi đi đâu. Wizard chạy 100% client-side.</span>
427
- </div>
428
-
429
- <!-- Hidden .env content for internal use -->
430
- <pre id="env-content" style="display:none;"></pre>
431
- </section>
432
-
433
- <!-- ===== Step 5: Generated Output ===== -->
434
- <section class="step" data-step="5">
435
- <h2 id="step4-title" class="step__title" data-vi="🎉 Sẵn sàng! Tải script cài đặt" data-en="🎉 Ready! Download setup script">🎉 Sẵn sàng! Tải script cài đặt</h2>
436
- <p id="step4-desc" class="step__description" data-vi="Script dưới đây đã được tạo sẵn theo cấu hình bạn đã chọn. Tải về và chạy — mọi thứ còn lại được xử lý tự động." data-en="The script below is generated from your choices. Download and run it — everything else is handled automatically.">Script dưới đây đã được tạo sẵn theo cấu hình bạn đã chọn. Tải về và chạy — mọi thứ còn lại được xử lý tự động.</p>
437
-
438
- <!-- What the script does automatically -->
439
- <div id="script-auto-steps" style="margin-bottom: 24px; padding: 14px 16px; background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.2); border-radius: 10px; font-size: 13px; color: var(--text-secondary);">
440
- <div style="font-weight: 600; margin-bottom: 8px; color: var(--text-primary);">⚡ <span data-vi="Script sẽ tự động làm:" data-en="Script will automatically:">Script sẽ tự động làm:</span></div>
441
- <div id="auto-steps-list"></div>
442
- </div>
443
-
444
- <div id="docker-output">
445
- <!-- Option 1: Docker setup download (OS-adaptive) -->
446
- <div class="output-section" style="padding: 24px; border: 2px solid rgba(16, 185, 129, 0.3); border-radius: 12px; background: linear-gradient(135deg, rgba(16,185,129,0.04), rgba(139,92,246,0.03)); margin-bottom: 20px;">
447
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 16px;">
448
- <span id="docker-dl-icon" style="font-size: 28px;">🪟</span>
449
- <div>
450
- <h3 class="output-section__title" style="margin: 0;" id="docker-dl-title" data-vi="Download Script Cài Đặt" data-en="Download Setup Script">Download Script Cài Đặt</h3>
451
- <p style="font-size: 13px; color: var(--text-muted); margin: 4px 0 0;" id="docker-dl-desc" data-vi="Tải file → chạy → cài Docker, pull model và khởi động bot tự động" data-en="Download → run → auto-installs Docker, pulls model and starts bot">Tải file → chạy → cài Docker, pull model và khởi động bot tự động</p>
452
- </div>
453
- </div>
454
- <div style="display: flex; justify-content: center; margin: 20px 0 8px;">
455
- <button class="btn btn--primary" onclick="downloadAutoSetupBat()" style="font-size: 15px; padding: 14px 40px; border-radius: 8px;">
456
- <span>📥 Download <span id="docker-dl-filename">setup-openclaw-docker-win.bat</span></span>
457
- </button>
458
- </div>
459
- <div id="docker-dl-win-note" style="font-size: 12.5px; color: var(--warning, #ffc107); margin: 10px 0 8px; text-align: center; padding: 6px; background: rgba(255, 193, 7, 0.08); border-radius: 6px; border: 1px solid rgba(255, 193, 7, 0.2);">
460
- ⚠️ <strong data-vi="Lưu ý quan trọng:" data-en="Important notice:">Lưu ý quan trọng:</strong>
461
- <span data-vi="Click chuột phải vào file .bat → Properties → tick Unblock trước khi chạy!" data-en="Right-click the .bat file → Properties → check Unblock before running!">Click chuột phải vào file .bat → Properties → tick Unblock trước khi chạy!</span>
462
- </div>
463
- <div id="docker-dl-sh-note" style="display:none; font-size: 12.5px; color: var(--text-secondary); margin: 10px 0 8px; text-align: center; padding: 6px; background: rgba(255,255,255,0.04); border-radius: 6px; border: 1px solid rgba(255,255,255,0.1);">
464
- <span data-vi="Tải xong → chạy trong Terminal:" data-en="After download → run in Terminal:">Tải xong → chạy trong Terminal:</span>
465
- <code id="docker-dl-sh-cmd" style="margin-left:6px; color: var(--claw-coral);">chmod +x setup-openclaw-docker-macos.sh && ./setup-openclaw-docker-macos.sh</code>
466
- </div>
467
- </div>
468
-
469
-
470
- <!-- Option 2: Linux/macOS/VPS Terminal -->
471
- <div class="output-section" style="padding: 24px; border: 2px solid rgba(255, 107, 53, 0.3); border-radius: 12px; background: linear-gradient(135deg, rgba(255,107,53,0.04), rgba(139,92,246,0.03)); margin-bottom: 20px;">
472
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 16px;">
473
- <span style="font-size: 28px;">💻</span>
474
- <div>
475
- <h3 class="output-section__title" style="margin: 0;" data-vi="Cách 2: NPX (macOS / Linux / Ubuntu / VPS)" data-en="Option 2: NPX (macOS / Linux / Ubuntu / VPS)">Cách 2: NPX (macOS / Linux / Ubuntu / VPS)</h3>
476
- <p style="font-size: 13px; color: var(--text-muted); margin: 4px 0 0;" data-vi="Chạy lệnh bên dưới trong Terminal — script tự cài Docker, 9Router/Ollama và khởi động bot." data-en="Run the command below in Terminal — script installs Docker, 9Router/Ollama and starts bot.">Chạy lệnh bên dưới trong Terminal — script tự cài Docker, 9Router/Ollama và khởi động bot.</p>
477
- </div>
478
- </div>
479
- <div class="code-block">
480
- <div class="code-block__header">
481
- <span class="code-block__filename">Terminal</span>
482
- <button class="btn-copy" onclick="copyToClipboard(this, 'out-setup-npx')">📋 Copy</button>
483
- </div>
484
- <pre class="code-block__content" id="out-setup-npx" style="font-size: 15px; text-align: center; padding: 16px;">npx create-openclaw-bot</pre>
485
- </div>
486
- <p style="font-size: 12px; color: var(--text-muted); margin: 12px 0 0; text-align: center;" data-vi="Yêu cầu: Node.js 20+ — Script tự cài Docker Compose V2 và các thành phần cần thiết" data-en="Requires: Node.js 20+ — Script auto-installs Docker Compose V2 and required components">Yêu cầu: Node.js 20+ — Script tự cài Docker Compose V2 và các thành phần cần thiết</p>
487
- </div>
488
- </div>
489
-
490
- <!-- Native Output (shown when deployMode === native) -->
491
- <div id="native-output" style="display:none;">
492
- <div class="output-section" style="padding: 24px; border: 2px solid rgba(139, 92, 246, 0.3); border-radius: 12px; background: linear-gradient(135deg, rgba(139,92,246,0.04), rgba(16,185,129,0.03)); margin-bottom: 20px;">
493
- <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 16px;">
494
- <span style="font-size: 28px;">💻</span>
495
- <div>
496
- <h3 class="output-section__title" style="margin: 0;" data-vi="Download Script Cài đặt" data-en="Download Setup Script">Download Script Cài đặt</h3>
497
- <p style="font-size: 13px; color: var(--text-muted); margin: 4px 0 0;" id="native-instructions" data-vi="Tải file → chạy để cài OpenClaw trực tiếp trên máy (tự động cài 9Router/Ollama nếu đã chọn)" data-en="Download → run to install OpenClaw directly on your machine (auto-installs 9Router/Ollama if selected)">Tải file → chạy để cài OpenClaw trực tiếp trên máy (tự động cài 9Router/Ollama nếu đã chọn)</p>
498
- </div>
499
- </div>
500
- <div style="display: flex; justify-content: center; margin: 20px 0 8px;">
501
- <button class="btn btn--primary" onclick="downloadNativeScript()" style="font-size: 15px; padding: 14px 40px; border-radius: 8px;">
502
- <span>📥 Download <span id="native-script-name">setup-openclaw-win.bat</span></span>
503
- </button>
504
- </div>
505
- <div style="font-size: 12.5px; color: var(--warning, #ffc107); margin: 10px 0 8px; text-align: center; padding: 6px; background: rgba(255, 193, 7, 0.08); border-radius: 6px; border: 1px solid rgba(255, 193, 7, 0.2);">
506
- ⚠️ <strong data-vi="Yêu cầu:" data-en="Requires:">Yêu cầu:</strong>
507
- <span data-vi="Node.js 20+ phải được cài sẵn trên máy" data-en="Node.js 20+ must be installed on your machine">Node.js 20+ phải được cài sẵn trên máy</span>
508
- </div>
509
- </div>
510
- </div>
511
-
512
- <!-- ===== Post-setup notices (conditional) ===== -->
513
-
514
- <!-- Multi-Bot Group Setup Notice (shown when botCount > 1) -->
515
- <div id="multibot-output-notice" class="cred-section" style="display:none; margin-top:24px; border-color:rgba(99,102,241,0.3); padding:20px 22px; background:linear-gradient(135deg,rgba(99,102,241,0.05),rgba(139,92,246,0.03));">
516
- <!-- Filled by JS: generateOutput() -->
517
- </div>
518
-
519
- <!-- Zalo Personal: Post-setup Docker Onboard Guide -->
520
- <div id="zalo-onboard-notice" class="cred-section" style="display: none; margin-top: 24px; border-color: rgba(255, 193, 7, 0.3);">
521
- <h3 class="cred-section__title" data-vi="📱 Login Zalo QR (1 Lần)" data-en="📱 Login Zalo QR (1 Lần)">📱 Login Zalo QR (1 Lần)</h3>
522
- <p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 12px;" data-vi="Chạy lệnh bên dưới để mở quét mã QR cho Zalo:" data-en="Run this command to scan QR code for Zalo:">Chạy lệnh bên dưới để mở quét mã QR cho Zalo:</p>
523
- <div class="code-block" style="margin-bottom: 12px;">
524
- <div class="code-block__header">
525
- <span class="code-block__filename" data-vi="Terminal" data-en="Terminal">Terminal</span>
526
- <button class="btn-copy" onclick="copyToClipboard(this, 'out-zalo-onboard-cmd')">📋 Copy</button>
527
- </div>
528
- <pre class="code-block__content" id="out-zalo-onboard-cmd"></pre>
529
- </div>
530
- <div class="code-block" style="font-size: 13px; margin-bottom: 12px;">
531
- <div class="code-block__header">
532
- <span class="code-block__filename" data-vi="Cheat Sheet — Chọn các tùy chọn này" data-en="Cheat Sheet — Select these options">Cheat Sheet — Chọn các tùy chọn này</span>
533
- </div>
534
- <pre class="code-block__content" id="out-zalo-onboard-guide"></pre>
535
- </div>
536
- </div>
537
-
538
- <!-- 9Router post-setup -->
539
- <div id="9router-notice" class="cred-section" style="display: none; margin-top: 24px; border-color: rgba(0, 200, 150, 0.3);">
540
- <h3 class="cred-section__title"><span data-vi="🔀 Kích hoạt 9Router" data-en="🔀 Activate 9Router">🔀 Kích hoạt 9Router</span></h3>
541
- <div style="font-size: 14px; color: var(--text-secondary);">
542
- <div class="cred-step" style="margin-bottom: 8px;">
543
- <span class="cred-step__number">1</span>
544
- <span class="cred-step__text"><span data-vi="Mở trình duyệt" data-en="Open browser">Mở trình duyệt</span> → <a href="http://localhost:20128/dashboard" target="_blank" style="color: var(--accent);">localhost:20128/dashboard</a></span>
545
- </div>
546
- <div class="cred-step" style="margin-bottom: 8px;">
547
- <span class="cred-step__number">2</span>
548
- <span class="cred-step__text" data-vi="Đăng nhập OAuth vào các AI provider (Google, Claude, GitHub...)" data-en="OAuth login to AI providers (Google, Claude, GitHub...)">Đăng nhập OAuth vào các AI provider (Google, Claude, GitHub...)</span>
549
- </div>
550
- <div class="cred-step">
551
- <span class="cred-step__number">3</span>
552
- <span class="cred-step__text" data-vi="Sao chép API key từ dashboard → đặt vào .env của bot (script đã chuẩn endpoint)" data-en="Copy API key from dashboard → paste into bot .env (script has already set the endpoint)">Sao chép API key từ dashboard → đặt vào .env của bot (script đã chuẩn endpoint)</span>
553
- </div>
554
- </div>
555
- </div>
556
-
557
- <!-- Browser notice -->
558
- <div id="browser-notice" class="cred-section" style="display: none; margin-top: 24px; border-color: rgba(66, 133, 244, 0.3);">
559
- <h3 class="cred-section__title"><span data-vi="🌐 Browser Automation — Bật Chrome Debug" data-en="🌐 Browser Automation — Enable Chrome Debug">🌐 Browser Automation — Bật Chrome Debug</span></h3>
560
- <div style="font-size: 13px; color: var(--text-secondary);">
561
- <div style="margin-bottom: 12px; padding: 10px 14px; background: rgba(66,133,244,0.06); border: 1px solid rgba(66,133,244,0.15); border-radius: 8px;">
562
- <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;"><span style="font-size: 18px;">🪟</span><strong data-vi="Windows" data-en="Windows">Windows</strong></div>
563
- <span data-vi="Double-click file <code>start-chrome-debug.bat</code> trong thư mục project trước khi nhờ bot làm gì liên quan tới web." data-en="Double-click <code>start-chrome-debug.bat</code> in your project folder before asking bot to do web tasks.">Double-click file <code>start-chrome-debug.bat</code> trong thư mục project trước khi nhờ bot làm gì liên quan tới web.</span>
564
- </div>
565
- <div style="padding: 10px 14px; background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15); border-radius: 8px;">
566
- <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;"><span style="font-size: 18px;">🐧</span><strong data-vi="macOS / Linux" data-en="macOS / Linux">macOS / Linux</strong></div>
567
- <span data-vi="Chạy <code>chmod +x start-chrome-debug.sh && ./start-chrome-debug.sh</code> trong terminal. Script tự detect Chrome trên macOS/Linux." data-en="Run <code>chmod +x start-chrome-debug.sh && ./start-chrome-debug.sh</code> in terminal. Script auto-detects Chrome on macOS/Linux.">Chạy <code>chmod +x start-chrome-debug.sh && ./start-chrome-debug.sh</code> trong terminal. Script tự detect Chrome trên macOS/Linux.</span>
568
- </div>
569
- </div>
570
- </div>
571
- </section>
572
-
573
- </main>
574
-
575
- <!-- ========== Navigation ========== -->
576
- <div class="nav-buttons">
577
- <button class="btn btn--ghost" id="btn-prev" style="visibility: hidden;">
578
- <span data-vi="← Quay lại" data-en="← Go Back">← Quay lại</span>
579
- </button>
580
- <button class="btn btn--primary" id="btn-next">
581
- <span id="btn-next-label" data-vi="Tiếp theo" data-en="Next">Tiếp theo</span> →
582
- </button>
583
- </div>
584
-
585
- </div>
586
-
587
- <script src="setup.js"></script>
588
- </body>
589
- </html>