create-openclaw-bot 5.17.1 → 5.17.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.
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable no-undef, no-unused-vars */
3
3
  /**
4
4
  * @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
5
- * This file is concatenated (not imported) globals are shared via setup.js IIFE scope.
5
+ * This file is concatenated (not imported) - globals are shared via setup.js IIFE scope.
6
6
  * Do NOT add import/export statements. Edit, then run: node build.mjs
7
7
  *
8
8
  * @global {object} state - Wizard UI state
@@ -53,18 +53,18 @@
53
53
  },
54
54
  pluginInstall: '',
55
55
  },
56
- // 'telegram+zalo-personal' Combo mode tạm ngưng, nghiên cứu thêm.
56
+ // 'telegram+zalo-personal' - Combo mode tạm ngưng, nghiên cứu thêm.
57
57
  'zalo-personal': {
58
- name: 'Zalo cá nhân OpenClaw Zalo Connect',
58
+ name: 'Zalo cá nhân - OpenClaw Zalo Connect',
59
59
  hasZaloPersonal: true,
60
60
  envKeys: [],
61
61
  envExtra: '',
62
62
  credSteps: [
63
- { textVi: '⚠️ Zalo cá nhân chạy qua <strong>OpenClaw Zalo Connect (unofficial, zca-js)</strong> tự động hoá tài khoản cá nhân có thể vi phạm điều khoản Zalo và khiến tài khoản bị hạn chế. <strong>Chỉ nên dùng tài khoản phụ.</strong>', textEn: '⚠️ Personal Zalo runs on <strong>OpenClaw Zalo Connect (unofficial, zca-js)</strong> automating a personal account may violate Zalo terms and can get the account restricted. <strong>Use a secondary account.</strong>' },
63
+ { textVi: '⚠️ Zalo cá nhân chạy qua <strong>OpenClaw Zalo Connect (unofficial, zca-js)</strong> - tự động hoá tài khoản cá nhân có thể vi phạm điều khoản Zalo và khiến tài khoản bị hạn chế. <strong>Chỉ nên dùng tài khoản phụ.</strong>', textEn: '⚠️ Personal Zalo runs on <strong>OpenClaw Zalo Connect (unofficial, zca-js)</strong> - automating a personal account may violate Zalo terms and can get the account restricted. <strong>Use a secondary account.</strong>' },
64
64
  { textVi: 'Sau khi tạo bot, bấm <strong>Đăng nhập Zalo</strong> để quét QR ngay trong giao diện. Nếu cần chạy thủ công: <code>openclaw channels login --channel zalo-connect --account default</code>.', textEn: 'After creating the bot, click <strong>Zalo Login</strong> to scan the QR right in the UI. Manual fallback: <code>openclaw channels login --channel zalo-connect --account default</code>.' },
65
65
  { textVi: 'Sau khi quét QR, bot nhận được tin nhắn xác nhận Owner ngay; bạn có thể siết lại DM/nhóm sau trong cấu hình.', textEn: 'After QR login, the bot can receive the initial Owner confirmation immediately; you can tighten DM/group access later in config.' },
66
66
  ],
67
- // Mirrors buildZaloConnectChannelConfig() in bot-config-gen.js keys validated
67
+ // Mirrors buildZaloConnectChannelConfig() in bot-config-gen.js - keys validated
68
68
  // against OpenClaw Zalo Connect 3.0.1's strict channel schema.
69
69
  channelConfig: {
70
70
  'zalo-connect': {
@@ -111,7 +111,7 @@
111
111
 
112
112
  // ========== Default Security Rules ==========
113
113
  const DEFAULT_SECURITY_RULES = {
114
- vi: `## 🔐 Quy Tắc Bảo Mật BẮT BUỘC
114
+ vi: `## 🔐 Quy Tắc Bảo Mật - BẮT BUỘC
115
115
 
116
116
  ### File & thư mục hệ thống
117
117
  - ❌ KHÔNG đọc, sao chép, hoặc truy cập bất kỳ file nào ngoài thư mục project
@@ -138,7 +138,7 @@
138
138
  - ❌ KHÔNG mount nguyên ổ đĩa (C:/ hoặc D:/)
139
139
  - ❌ KHÔNG chạy container với --privileged
140
140
  - ✅ Giới hạn port expose (chỉ 38789)`,
141
- en: `## 🔐 Security Rules MANDATORY
141
+ en: `## 🔐 Security Rules - MANDATORY
142
142
 
143
143
  ### System files & directories
144
144
  - ❌ DO NOT read, copy, or access any file outside the project folder
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable no-undef, no-unused-vars */
3
3
  /**
4
4
  * @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
5
- * This file is concatenated (not imported) globals are shared via setup.js IIFE scope.
5
+ * This file is concatenated (not imported) - globals are shared via setup.js IIFE scope.
6
6
  * Do NOT add import/export statements. Edit, then run: node build.mjs
7
7
  *
8
8
  * @global {object} state - Wizard UI state
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  /**
3
- * setup/data/index.js Shared data for CLI + Wizard
3
+ * setup/data/index.js - Shared data for CLI + Wizard
4
4
  *
5
5
  * Provides CLI-compatible views of PROVIDERS, SKILLS, CHANNELS, and OLLAMA_MODELS.
6
6
  * The wizard uses these via IIFE concatenation (providers.js, skills.js, channels.js).
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable no-undef, no-unused-vars */
3
3
  /**
4
4
  * @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
5
- * This file is concatenated (not imported) globals are shared via setup.js IIFE scope.
5
+ * This file is concatenated (not imported) - globals are shared via setup.js IIFE scope.
6
6
  * Do NOT add import/export statements. Edit, then run: node build.mjs
7
7
  *
8
8
  * @global {object} state - Wizard UI state
@@ -18,7 +18,7 @@
18
18
  * @global {string} projectDir - Output project directory path
19
19
  * @global {Function} getGatewayAllowedOrigins
20
20
  */
21
- // ========== Available Plugins (npm packages runtime/channel extensions) ==========
21
+ // ========== Available Plugins (npm packages - runtime/channel extensions) ==========
22
22
  const PLUGINS = [
23
23
  {
24
24
  id: 'browser-automation',
@@ -31,7 +31,7 @@
31
31
  id: 'telegram-multibot-relay',
32
32
  name: 'Telegram Multi-Bot Relay',
33
33
  icon: '🤝',
34
- descVi: 'Điều phối nhiều bot Telegram trong cùng group tự động khi chọn nhiều bot', descEn: 'Coordinate multiple Telegram bots in one group auto-selected with multi-bot',
34
+ descVi: 'Điều phối nhiều bot Telegram trong cùng group - tự động khi chọn nhiều bot', descEn: 'Coordinate multiple Telegram bots in one group - auto-selected with multi-bot',
35
35
  package: 'openclaw-telegram-multibot-relay',
36
36
  hidden: true, // hidden in UI, auto-selected programmatically
37
37
  },
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable no-undef, no-unused-vars */
3
3
  /**
4
4
  * @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
5
- * This file is concatenated (not imported) globals are shared via setup.js IIFE scope.
5
+ * This file is concatenated (not imported) - globals are shared via setup.js IIFE scope.
6
6
  * Do NOT add import/export statements. Edit, then run: node build.mjs
7
7
  *
8
8
  * @global {object} state - Wizard UI state
@@ -92,10 +92,10 @@
92
92
  free: true,
93
93
  isLocal: true,
94
94
  models: [
95
- { id: 'ollama/gemma4:e2b', name: 'Gemma 4 E2B', descVi: '🟢 Nhẹ nhất (~4-6 GB RAM) Edge, laptop, test nhanh', descEn: '🟢 Lightest (~4-6 GB RAM) Edge, laptop, fastest startup', badge: '🆕 Apr 2 2026' },
96
- { id: 'ollama/gemma4:e4b', name: 'Gemma 4 E4B', descVi: '🟡 Cân bằng (~8-10 GB RAM) Khuyên dùng', descEn: '🟡 Balanced (~8-10 GB RAM) Recommended', badge: '🆕 Apr 2 2026' },
97
- { id: 'ollama/gemma4:26b', name: 'Gemma 4 26B', descVi: '🟠 Mạnh (~18-24 GB RAM/VRAM) Máy mạnh', descEn: '🟠 Powerful (~18-24 GB RAM/VRAM) High-end machine', badge: '🆕 Apr 2 2026' },
98
- { id: 'ollama/gemma4:31b', name: 'Gemma 4 31B', descVi: '🔴 Mạnh nhất (~24+ GB RAM/VRAM) Workstation/GPU', descEn: '🔴 Most powerful (~24+ GB RAM/VRAM) Workstation/GPU', badge: '🆕 Apr 2 2026' },
95
+ { id: 'ollama/gemma4:e2b', name: 'Gemma 4 E2B', descVi: '🟢 Nhẹ nhất (~4-6 GB RAM) - Edge, laptop, test nhanh', descEn: '🟢 Lightest (~4-6 GB RAM) - Edge, laptop, fastest startup', badge: '🆕 Apr 2 2026' },
96
+ { id: 'ollama/gemma4:e4b', name: 'Gemma 4 E4B', descVi: '🟡 Cân bằng (~8-10 GB RAM) - Khuyên dùng', descEn: '🟡 Balanced (~8-10 GB RAM) - Recommended', badge: '🆕 Apr 2 2026' },
97
+ { id: 'ollama/gemma4:26b', name: 'Gemma 4 26B', descVi: '🟠 Mạnh (~18-24 GB RAM/VRAM) - Máy mạnh', descEn: '🟠 Powerful (~18-24 GB RAM/VRAM) - High-end machine', badge: '🆕 Apr 2 2026' },
98
+ { id: 'ollama/gemma4:31b', name: 'Gemma 4 31B', descVi: '🔴 Mạnh nhất (~24+ GB RAM/VRAM) - Workstation/GPU', descEn: '🔴 Most powerful (~24+ GB RAM/VRAM) - Workstation/GPU', badge: '🆕 Apr 2 2026' },
99
99
  { id: 'ollama/qwen3:8b', name: 'Qwen 3 8B', descVi: 'Đa ngôn ngữ, nhẹ', descEn: 'Multi-lingual, lightweight', badge: '🏠 Local' },
100
100
  { id: 'ollama/deepseek-r1:8b', name: 'DeepSeek R1 8B', descVi: 'Suy luận, code', descEn: 'Reasoning, code', badge: '🏠 Local' },
101
101
  { id: 'ollama/llama3.3:8b', name: 'Llama 3.3 8B', descVi: 'Meta, đa năng', descEn: 'Meta, versatile', badge: '🏠 Local' },
@@ -110,11 +110,11 @@
110
110
  envKey: null,
111
111
  envLabel: null,
112
112
  envLink: 'https://github.com/decolua/9router',
113
- envInstructionsVi: '9Router chạy cùng Docker <strong>không cần API key</strong>. Sau khi <code>docker compose up</code>, mở <a href="http://localhost:20128/dashboard" target="_blank">localhost:20128/dashboard</a> → đăng nhập OAuth.<br>✅ <b>Mới v0.3.75:</b> Claude Code, Codex, Gemini CLI và Antigravity có thể dùng 9Router làm endpoint trực tiếp.<br><span style="color:var(--danger)">⚠️ <b>CẢNH BÁO:</b> TUYỆT ĐỐI KHÔNG chọn Provider <b>Antigravity</b> khi đăng nhập OAuth trên dashboard 9Router (nguy cơ bị ban Google Account vĩnh viễn).</span>', envInstructionsEn: '9Router runs with Docker <strong>no API key needed</strong>. After <code>docker compose up</code>, open <a href="http://localhost:20128/dashboard" target="_blank">localhost:20128/dashboard</a> and OAuth login.<br>✅ <b>New in v0.3.75:</b> Claude Code, Codex, Gemini CLI, and Antigravity can use 9Router as their endpoint directly.<br><span style="color:var(--danger)">⚠️ <b>WARNING:</b> Do NOT select <b>Antigravity</b> as your OAuth Provider when logging into the 9Router dashboard (high risk of permanent Google Account ban).</span>',
113
+ envInstructionsVi: '9Router chạy cùng Docker - <strong>không cần API key</strong>. Sau khi <code>docker compose up</code>, mở <a href="http://localhost:20128/dashboard" target="_blank">localhost:20128/dashboard</a> → đăng nhập OAuth.<br>✅ <b>Mới v0.3.75:</b> Claude Code, Codex, Gemini CLI và Antigravity có thể dùng 9Router làm endpoint trực tiếp.<br><span style="color:var(--danger)">⚠️ <b>CẢNH BÁO:</b> TUYỆT ĐỐI KHÔNG chọn Provider <b>Antigravity</b> khi đăng nhập OAuth trên dashboard 9Router (nguy cơ bị ban Google Account vĩnh viễn).</span>', envInstructionsEn: '9Router runs with Docker - <strong>no API key needed</strong>. After <code>docker compose up</code>, open <a href="http://localhost:20128/dashboard" target="_blank">localhost:20128/dashboard</a> and OAuth login.<br>✅ <b>New in v0.3.75:</b> Claude Code, Codex, Gemini CLI, and Antigravity can use 9Router as their endpoint directly.<br><span style="color:var(--danger)">⚠️ <b>WARNING:</b> Do NOT select <b>Antigravity</b> as your OAuth Provider when logging into the 9Router dashboard (high risk of permanent Google Account ban).</span>',
114
114
  free: true,
115
115
  isProxy: true,
116
116
  models: [
117
- { id: '9router/smart-route', name: 'Smart Proxy (Auto Route)', descVi: 'Tự động luân chuyển FREE models không tốn xu', descEn: 'Auto-routing across FREE providers zero cost', badgeVi: '🌟 Khuyên dùng', badgeEn: '🌟 Recommended' }
117
+ { id: '9router/smart-route', name: 'Smart Proxy (Auto Route)', descVi: 'Tự động luân chuyển FREE models - không tốn xu', descEn: 'Auto-routing across FREE providers - zero cost', badgeVi: '🌟 Khuyên dùng', badgeEn: '🌟 Recommended' }
118
118
  ],
119
119
  },
120
120
  };
@@ -1,11 +1,11 @@
1
1
  // @ts-nocheck
2
2
  /**
3
- * @fileoverview Centralized bot configuration builders single source of truth.
3
+ * @fileoverview Centralized bot configuration builders - single source of truth.
4
4
  *
5
5
  * Generates openclaw.json, auth-profiles.json, exec-approvals.json, and .env content.
6
6
  * Used by BOTH the Wizard (IIFE bundle) and CLI (CJS require).
7
7
  *
8
- * Pattern: same as common-gen.js / workspace-gen.js IIFE + CJS dual export.
8
+ * Pattern: same as common-gen.js / workspace-gen.js - IIFE + CJS dual export.
9
9
  */
10
10
  (function (root) {
11
11
 
@@ -35,7 +35,7 @@
35
35
 
36
36
 
37
37
  // ═══════════════════════════════════════════════════════════════════════════════
38
- // buildOpenclawJson the ONE function that generates the full openclaw.json
38
+ // buildOpenclawJson - the ONE function that generates the full openclaw.json
39
39
  // ═══════════════════════════════════════════════════════════════════════════════
40
40
  /**
41
41
  * @param {object} opts
@@ -99,7 +99,7 @@
99
99
  }));
100
100
 
101
101
  const cfg = {
102
- // NOTE: do NOT seed a `meta` block here. `meta` is owned by OpenClaw it stamps
102
+ // NOTE: do NOT seed a `meta` block here. `meta` is owned by OpenClaw - it stamps
103
103
  // `{ lastTouchedVersion, lastTouchedAt }` itself on first run and adds the block if
104
104
  // missing. Writing our own fields into it (osChoice/deployMode), or seeding
105
105
  // `lastTouchedVersion` from OPENCLAW_NPM_SPEC which is a range/`latest`
@@ -118,16 +118,16 @@
118
118
  // cost on long sessions AND keeps a heavy multi-step turn (deep research +
119
119
  // file/PDF gen) from piling up tool output that overflows the model window
120
120
  // mid tool-loop. These bots run on 9router (no Anthropic prompt cache), so a
121
- // short 2m TTL lets pruning engage sooner inside a long turn no cache
121
+ // short 2m TTL lets pruning engage sooner inside a long turn - no cache
122
122
  // downside. The stable system prompt (AGENTS.md/SOUL.md…) is never pruned.
123
123
  contextPruning: { mode: 'cache-ttl', ttl: '2m' },
124
- // Compress vision inputs these bots are image-heavy (infographics, PDF
124
+ // Compress vision inputs - these bots are image-heavy (infographics, PDF
125
125
  // charts, screenshots). "efficient" keeps vision-token cost down so an
126
126
  // image-rich turn is far less likely to blow past the context window.
127
127
  imageQuality: 'efficient',
128
128
  // Downscale image payloads when sanitizing transcript/tool-result content
129
129
  // (OpenClaw default is 1200px). Verified failure mode: the bot generated 4K
130
- // infographics for a PDF and then read them back with the image tool each
130
+ // infographics for a PDF and then read them back with the image tool - each
131
131
  // read landed a ~100KB base64 blob in the transcript, and the overflow
132
132
  // precheck counts that base64 as plain text (~14k tokens per image). Eight of
133
133
  // them in one turn = 214k estimated tokens against a 180k budget → abort with
@@ -137,16 +137,16 @@
137
137
  // Cap each persisted tool result. The model-context auto default is huge
138
138
  // (64k chars/result at 200k tokens), so one heavy turn (e.g. deep research
139
139
  // with 40+ web fetches) can pile up 200k+ tokens of tool output in a SINGLE
140
- // unsplittable turn which then can't be compacted ("nothing to compact")
140
+ // unsplittable turn - which then can't be compacted ("nothing to compact")
141
141
  // and poisons the session until a manual reset. 12k chars (~3k tokens) per
142
142
  // result keeps per-source content substantial while making that runaway
143
143
  // impossible. Applies to persisted results + overflow recovery.
144
144
  // No contextLimits.toolResultMaxChars: openclaw 2026.8.x strict schema rejects the
145
- // key outright (measured on a fresh native install, 03/09/2026) the runaway-turn
145
+ // key outright (measured on a fresh native install, 03/09/2026) - the runaway-turn
146
146
  // protection it provided is handled by the 2026.8 runtime itself.
147
147
  // Agent-TURN budget (seconds). 120 was too short for multi-step cloud turns (OCR +
148
148
  // file gen + tool calls). 900 = OpenClaw's own native default and the practical max
149
- // we use. This is the turn budget a DIFFERENT layer from 9router's per-request
149
+ // we use. This is the turn budget - a DIFFERENT layer from 9router's per-request
150
150
  // timeout, so raising it does not conflict with / overrun 9router.
151
151
  timeoutSeconds: 900,
152
152
  // Đổi model trong Control UI KHÔNG được ghi vào config. OpenClaw mặc định "dính" lựa
@@ -155,11 +155,11 @@
155
155
  // giữ lựa chọn trong phiên đang chat. Khoá có từ OpenClaw 2026.8 (setup cài 2026.8.1).
156
156
  modelSelectionScope: 'session',
157
157
  // Nhiều agent mà không khai chủ thì OpenClaw TẮT heartbeat và chỉ ghi một dòng log:
158
- // "[heartbeat] disabled multi-agent config has no ambient heartbeat owner". Bot mất
158
+ // "[heartbeat] disabled - multi-agent config has no ambient heartbeat owner". Bot mất
159
159
  // nhịp tự kiểm tra mà không ai hay. Chủ là bot THẬT đầu tiên, không phải agent `main`.
160
160
  // Roster nhiều agent mà không khai chủ thì hỏng ba chỗ, đo được từng cái trên máy thật:
161
- // • [heartbeat] disabled bot mất nhịp tự kiểm tra, không báo gì
162
- // • cron.list ✗ "Agent-less cron job has no resolvable owner" VỠ CẢ TRANG Automations
161
+ // • [heartbeat] disabled - bot mất nhịp tự kiểm tra, không báo gì
162
+ // • cron.list ✗ "Agent-less cron job has no resolvable owner" - VỠ CẢ TRANG Automations
163
163
  // trong Control UI, vì job hệ thống (memory-dreaming…) không gắn agent nào
164
164
  // • talk.catalog ✗ "Talk session ownership has no explicit owner"
165
165
  // Chủ là bot THẬT đầu tiên, không phải agent `main` của gateway chat.
@@ -207,7 +207,7 @@
207
207
 
208
208
  // ── messages (ack reaction) ───────────────────────────────────────────────
209
209
  // Drop a reaction on inbound messages so people can see the bot registered theirs
210
- // before the reply lands. This happens in the channel transport the model is never
210
+ // before the reply lands. This happens in the channel transport - the model is never
211
211
  // involved, so it costs no tokens.
212
212
  //
213
213
  // Zalo-only, and deliberately so: zalo-connect reads this GLOBAL key (it has no
@@ -218,14 +218,14 @@
218
218
  //
219
219
  // `/-heart` is one of Zalo's 55 BUILT-IN reactions, so every zalo-connect version can
220
220
  // send it. The previous default (🦞) went out as a Zalo *custom* reaction (emoji as
221
- // rIcon + a hash as rType), which needs zalo-connect ≥3.0.15 on anything older it was
221
+ // rIcon + a hash as rType), which needs zalo-connect ≥3.0.15 - on anything older it was
222
222
  // dropped silently and the bot looked unresponsive until the reply landed.
223
223
  // Scope "all" covers DMs and groups; in a mention-gated group the plugin still only
224
224
  // reacts to messages that address the bot, since non-addressed ones are buffered as
225
225
  // passive context before the reaction step.
226
226
  if (isZaloPersonal(channelKey)) {
227
227
  // KHÔNG khai `removeAckAfterReply`: OpenClaw 2026.9 bỏ khoá này và schema chặt từ chối
228
- // khoá lạ máy nâng lên 2026.9.2 sẽ chết với "messages: Unrecognized key" (đo trên
228
+ // khoá lạ - máy nâng lên 2026.9.2 sẽ chết với "messages: Unrecognized key" (đo trên
229
229
  // vps_thuy-le 07/09, gateway không khởi động được cho tới khi gỡ khoá ra).
230
230
  cfg.messages = { ackReaction: '/-heart', ackReactionScope: 'all' };
231
231
  }
@@ -238,12 +238,12 @@
238
238
  // Two things go wrong in practice, both measured on vps_thuy-le 07/09/2026: the Control
239
239
  // UI shows no DM session at all (there is nothing per-peer to list, so only groups
240
240
  // appear), and the one shared session grows without bound until the model answers with
241
- // an empty turn "incomplete turn … payloads=0 tools=0" surfacing to the user as
241
+ // an empty turn - "incomplete turn … payloads=0 tools=0" surfacing to the user as
242
242
  // "⚠️ Agent couldn't generate a response".
243
243
  // per-channel-peer (not per-peer) is the vendor's own wording and is the right split for
244
244
  // a bot wired to several channels: the same person on Zalo and on Telegram stays apart.
245
245
  // The key exists since 2026.7, so this is safe on every runtime setup installs.
246
- // Only NEW configs get it existing customer bots keep their current scope until
246
+ // Only NEW configs get it - existing customer bots keep their current scope until
247
247
  // someone changes it deliberately, because splitting sessions drops the old context.
248
248
  cfg.session = { ...(cfg.session || {}), dmScope: 'per-channel-peer' };
249
249
 
@@ -279,7 +279,7 @@
279
279
  cfg.tools = {
280
280
  profile: 'full',
281
281
  exec: { host: 'gateway', security: 'full', ask: 'off' },
282
- // Mặc định của OpenClaw là "all" nguyên văn schema: "any session on the Gateway, including
282
+ // Mặc định của OpenClaw là "all" - nguyên văn schema: "any session on the Gateway, including
283
283
  // other agents and users". Máy khách hay chạy nhiều bot cho nhiều người, để nguyên là bot này
284
284
  // đọc được hội thoại của bot kia qua sessions_history/sessions_search. "agent" giới hạn trong
285
285
  // đúng agent của mình. (Khoá có ở cả 2026.7 lẫn 2026.8.)
@@ -304,7 +304,7 @@
304
304
  }
305
305
  // Hide OpenClaw's native `browser` tool: browsing goes through the browser-automation
306
306
  // plugin's own CLI (skills/browser-automation/browser-tool.js), which adds the page-
307
- // reading commands the native tool lacks (get_text, get_links) that is the whole
307
+ // reading commands the native tool lacks (get_text, get_links) - that is the whole
308
308
  // point of shipping the plugin. Left visible, the model reaches for the native tool
309
309
  // instead and asks it for the container-local "openclaw" profile, which has no browser
310
310
  // behind it, then reports "no browser available" while the real one sits unused.
@@ -333,14 +333,14 @@
333
333
  // ── gateway ──────────────────────────────────────────────────────────────
334
334
  // Docker MUST bind 0.0.0.0 inside the container to be reachable at all, but that is contained:
335
335
  // compose publishes the port as `127.0.0.1:<port>:<port>` (docker-gen), so the host still only
336
- // answers on loopback. A NATIVE gateway has no port mapping to hide behind 0.0.0.0 there puts
336
+ // answers on loopback. A NATIVE gateway has no port mapping to hide behind - 0.0.0.0 there puts
337
337
  // it straight on the VPS's public interface, with the auth token crossing the wire in plaintext
338
338
  // (the gateway speaks plain HTTP/WS) and, on a fresh VPS, no firewall in front of it. The
339
339
  // `osChoice === 'vps'` clause predates native mode; keep native on loopback and reach it through
340
340
  // an SSH tunnel, which is what docker-on-a-VPS effectively does too.
341
341
  const openGatewayBind = deployMode === 'docker' || (osChoice === 'vps' && deployMode !== 'native');
342
342
  // Talk (thoại) cũng cần chủ khi có nhiều agent: "Multiple agents are configured, but Talk
343
- // session ownership has no explicit owner. Set talk.agentId…" không khai là talk.catalog
343
+ // session ownership has no explicit owner. Set talk.agentId…" - không khai là talk.catalog
344
344
  // lỗi ngay lúc mở Control UI.
345
345
  if (agentMetas.length > 1 && agentMetas[0]?.agentId) {
346
346
  cfg.talk = { ...(cfg.talk || {}), agentId: agentMetas[0].agentId };
@@ -363,14 +363,14 @@
363
363
 
364
364
  // ── skills ───────────────────────────────────────────────────────────────
365
365
  const skillEntries = buildSkillsEntries(skills, selectedSkills);
366
- // NOTE: the "zalo-actions" skill was removed its guidance now lives in the `zalo-connect`
366
+ // NOTE: the "zalo-actions" skill was removed - its guidance now lives in the `zalo-connect`
367
367
  // tool description itself (fork ≥ v3.0.2), so no per-bot skill entry is needed anymore.
368
368
  //
369
369
  // Skill Workshop `approvalPolicy: "auto"` lets the assistant author its own
370
370
  // workspace skills end-to-end when the user asks ("tạo skill X"): create the
371
371
  // proposal AND apply it in one turn, without a separate operator approval.
372
372
  // Apply is still scanner-gated + workspace-scoped + rollback-tracked, so this
373
- // stays safe. Workspace SKILL.md files auto-load via the skills watcher no
373
+ // stays safe. Workspace SKILL.md files auto-load via the skills watcher - no
374
374
  // per-skill openclaw.json entry is needed. `autonomous.enabled` stays false so
375
375
  // the bot only creates skills on explicit request, never spontaneously.
376
376
  cfg.skills = { workshop: { approvalPolicy: 'auto' } };
@@ -405,7 +405,7 @@
405
405
 
406
406
 
407
407
  // ═══════════════════════════════════════════════════════════════════════════════
408
- // buildChannelConfig returns the full `channels: { ... }` object
408
+ // buildChannelConfig - returns the full `channels: { ... }` object
409
409
  // ═══════════════════════════════════════════════════════════════════════════════
410
410
  function buildChannelConfig(opts) {
411
411
  const { channelKey, isMultiBot, groupId, agentMetas = [], botName, agentId } = opts;
@@ -427,7 +427,7 @@
427
427
  };
428
428
 
429
429
  if (isMultiBot) {
430
- // Multiple accounts each bot gets its own account keyed by accountId
430
+ // Multiple accounts - each bot gets its own account keyed by accountId
431
431
  telegramConfig.accounts = {};
432
432
  for (const meta of agentMetas) {
433
433
  telegramConfig.accounts[meta.accountId || 'default'] = {
@@ -454,7 +454,7 @@
454
454
  // First-run defaults keep owner confirmation reachable immediately after QR:
455
455
  // DMs are open to every sender and groups are enabled without requiring a mention.
456
456
  // Every key below is validated against OpenClaw Zalo Connect 3.0.1's schema
457
- // (`additionalProperties: false`) do NOT add keys (e.g. historyLimit,
457
+ // (`additionalProperties: false`) - do NOT add keys (e.g. historyLimit,
458
458
  // groupAllowFrom) without re-checking `openclaw.plugin.json` first, an unknown
459
459
  // key crashes the gateway on boot.
460
460
  channels['zalo-connect'] = buildZaloConnectChannelConfig();
@@ -467,7 +467,7 @@
467
467
 
468
468
 
469
469
  // ═══════════════════════════════════════════════════════════════════════════════
470
- // buildZaloConnectChannelConfig secure-default channels['zalo-connect'] block
470
+ // buildZaloConnectChannelConfig - secure-default channels['zalo-connect'] block
471
471
  // ═══════════════════════════════════════════════════════════════════════════════
472
472
  function buildZaloConnectChannelConfig() {
473
473
  return {
@@ -487,14 +487,14 @@
487
487
 
488
488
 
489
489
  // ═══════════════════════════════════════════════════════════════════════════════
490
- // buildPluginsConfig returns { plugins: { ... } }
490
+ // buildPluginsConfig - returns { plugins: { ... } }
491
491
  // ═══════════════════════════════════════════════════════════════════════════════
492
492
  function buildPluginsConfig(opts) {
493
493
  const { channelKey, selectedSkills = [], botName = 'Bot', agentId = 'bot', hasBrowser = false } = opts;
494
494
 
495
495
  const entries = {};
496
496
 
497
- // memory-core with dreaming always present
497
+ // memory-core with dreaming - always present
498
498
  entries['memory-core'] = {
499
499
  config: {
500
500
  dreaming: {
@@ -545,7 +545,7 @@
545
545
 
546
546
 
547
547
  // ═══════════════════════════════════════════════════════════════════════════════
548
- // buildSkillsEntries returns { slug: { enabled: true } } map
548
+ // buildSkillsEntries - returns { slug: { enabled: true } } map
549
549
  // ═══════════════════════════════════════════════════════════════════════════════
550
550
  function buildSkillsEntries(skills, selectedSkillIds) {
551
551
  const entries = {};
@@ -554,7 +554,7 @@
554
554
  for (const skill of skills) {
555
555
  const skillId = skill.value || skill.id;
556
556
  if (!selectedSkillIds.includes(skillId)) continue;
557
- // Skills without a slug are native (browser, scheduler) not in skills.entries
557
+ // Skills without a slug are native (browser, scheduler) - not in skills.entries
558
558
  const slug = skill.slug;
559
559
  if (!slug) continue;
560
560
  // Skip browser-automation slug (handled by browser config)
@@ -567,7 +567,7 @@
567
567
 
568
568
 
569
569
  // ═══════════════════════════════════════════════════════════════════════════════
570
- // buildExecApprovalsJson exec-approvals.json content
570
+ // buildExecApprovalsJson - exec-approvals.json content
571
571
  // ═══════════════════════════════════════════════════════════════════════════════
572
572
  function buildExecApprovalsJson(opts) {
573
573
  const { agentMetas = [] } = opts;
@@ -585,7 +585,7 @@
585
585
 
586
586
 
587
587
  // ═══════════════════════════════════════════════════════════════════════════════
588
- // buildEnvFileContent .env file content for a single bot
588
+ // buildEnvFileContent - .env file content for a single bot
589
589
  // ═══════════════════════════════════════════════════════════════════════════════
590
590
  /**
591
591
  * @param {object} opts
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  (function (root) {
3
3
  // GHIM version, khong dung @latest: Dockerfile sinh ra mang spec nay, nen "@latest" nghia la
4
- // MOI lan rebuild image co the nhay han mot the he openclaw schema config doi, state DB doi
4
+ // MOI lan rebuild image co the nhay han mot the he openclaw - schema config doi, state DB doi
5
5
  // migration, va bot khach chet ngay sau mot lan bam rebuild vo hai (ca that 103.98.149.154,
6
6
  // 31/08/2026: rebuild keo 2026.7.1-2 → 2026.8.1, gateway tu choi boot, 66 lan restart).
7
7
  // Nang version = doi spec nay MOT CACH CO Y trong mot ban phat hanh setup, kem kiem chung.
@@ -45,9 +45,9 @@
45
45
  const TELEGRAM_RELAY_PLUGIN_ID = 'telegram-multibot-relay';
46
46
  const TELEGRAM_SETUP_GUIDE_FILENAME = 'TELEGRAM-GROUP-SETUP.md';
47
47
 
48
- // ── OpenClaw Zalo Connect single source of truth ──────────────────────────
48
+ // ── OpenClaw Zalo Connect - single source of truth ──────────────────────────
49
49
  // Installed from ClawHub (owned package `openclaw-zalo-connect`) at LATEST, like zalo-mod, so the
50
- // dashboard "Update" button + first-boot always fetch the newest published version no tag pin to
50
+ // dashboard "Update" button + first-boot always fetch the newest published version - no tag pin to
51
51
  // bump each release. (Was a pinned git tag; switched once the fork was published to ClawHub.)
52
52
  const ZALO_CHANNEL_ID = 'zalo-connect';
53
53
  const ZALO_PLUGIN_ID = 'zalo-connect';
@@ -73,7 +73,7 @@
73
73
  const botList = bots.map((bot, idx) => {
74
74
  const name = bot?.name || `Bot ${idx + 1}`;
75
75
  if (includeTokenPreview) {
76
- return `- **${name}** token: ${String(bot?.token || '').slice(0, 10)}...`;
76
+ return `- **${name}** - token: ${String(bot?.token || '').slice(0, 10)}...`;
77
77
  }
78
78
  return `- **${name}**`;
79
79
  }).join('\n');
@@ -273,12 +273,12 @@ If setup reported a plugin install error, run this after the bot is running:
273
273
  {
274
274
  id: 'smart-route',
275
275
  name: 'Smart Proxy (Auto Route)',
276
- // 1M (Kent chot 01/09/2026) dao lai quyet dinh 131072 cua 5.16.0. Boi canh de doc
276
+ // 1M (Kent chot 01/09/2026) - dao lai quyet dinh 131072 cua 5.16.0. Boi canh de doc
277
277
  // lai sau: 131072 sinh ra vi smart-route fan-out sang upstream free ma model nho nhat
278
278
  // trong pool tran ~128k; khai 200k lam phien day den muc chinh loi goi compaction cung
279
279
  // overflow ("auto-compaction could not recover" cho den /new). Gio pool upstream da la
280
280
  // cac model cua so lon nen khai 1M de phien dai khong bi compaction som. TRADE-OFF: neu
281
- // mot combo van con model 128k thi phien vuot 128k se chet dung nhu hoi 5.15.x do la
281
+ // mot combo van con model 128k thi phien vuot 128k se chet dung nhu hoi 5.15.x - do la
282
282
  // van de cua combo, sua bang cach chon model, khong sua bang cach ha window o day nua.
283
283
  contextWindow: 1048576,
284
284
  maxTokens: 8192,