create-openclaw-bot 5.13.0 → 5.13.3
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/README.md +2 -2
- package/README.vi.md +2 -2
- package/dist/server/local-server.js +16 -3
- package/dist/setup/data/channels.js +5 -5
- package/dist/setup/shared/bot-config-gen.js +6 -7
- package/dist/setup/shared/common-gen.js +2 -2
- package/dist/setup/shared/docker-gen.js +5 -5
- package/dist/web/app.js +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*Run one command → open the dashboard → your bot is live. Windows · macOS · Linux · VPS — Docker-powered, auto-installed for you.*
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.13.
|
|
10
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.13.3-0EA5E9?style=for-the-badge" alt="Version 5.13.3" /></a>
|
|
11
11
|
<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>
|
|
12
12
|
<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>
|
|
13
13
|
<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>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
- ✨ **A cleaner Zalo control area**: Refresh and Login Again sit together above the bot list, while shared Zalo Connect and Zalo Mod versions move into the main status column.
|
|
45
45
|
|
|
46
46
|
<details>
|
|
47
|
-
<summary><b>Previous: What's new in v5.
|
|
47
|
+
<summary><b>Previous: What's new in v5.12.0</b></summary>
|
|
48
48
|
|
|
49
49
|
- 💬 **OpenClaw Zalo Connect, ready in one click**: create a personal Zalo bot or press **Zalo Login** and Setup prepares the channel automatically, then opens the QR flow in the dashboard.
|
|
50
50
|
- ⚡ **Install once, reconnect faster**: an existing Zalo Connect installation is reused instead of being downloaded again on every login or restart.
|
package/README.vi.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*Chạy một lệnh → mở dashboard → bot lên sóng. Windows · macOS · Linux · VPS — chạy trên Docker, tự cài giúp bạn.*
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.13.
|
|
10
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.13.3-0EA5E9?style=for-the-badge" alt="Version 5.13.3" /></a>
|
|
11
11
|
<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>
|
|
12
12
|
<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>
|
|
13
13
|
<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>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
- ✨ **Khu điều khiển Zalo gọn hơn**: Làm mới và Đăng nhập lại nằm cùng hàng phía trên danh sách bot; phiên bản Zalo Connect và Zalo Mod được đưa sang cột trạng thái chung.
|
|
45
45
|
|
|
46
46
|
<details>
|
|
47
|
-
<summary><b>Trước đó: Có gì mới trong v5.
|
|
47
|
+
<summary><b>Trước đó: Có gì mới trong v5.12.0</b></summary>
|
|
48
48
|
|
|
49
49
|
- 💬 **OpenClaw Zalo Connect, sẵn sàng trong một chạm**: tạo bot Zalo cá nhân hoặc bấm **Đăng nhập Zalo**, Setup tự chuẩn bị channel rồi mở luồng quét QR ngay trên dashboard.
|
|
50
50
|
- ⚡ **Cài một lần, kết nối lại nhanh hơn**: nếu Zalo Connect đã có, Setup dùng lại bản hiện tại thay vì tải lại mỗi lần đăng nhập hay restart.
|
|
@@ -759,6 +759,10 @@ async function detectRuntime(projectDir) {
|
|
|
759
759
|
const _runtimeSynced = new Set();
|
|
760
760
|
async function syncRuntimeState(projectDir, { full = false } = {}) {
|
|
761
761
|
if (!projectDir || !existsSync(join(projectDir, '.openclaw', 'openclaw.json'))) return;
|
|
762
|
+
// New OpenClaw builds may create this directory during probing even when no
|
|
763
|
+
// attestation exists. Remove only the empty directory so it does not clutter
|
|
764
|
+
// the project tree; never touch a real `.attested` file.
|
|
765
|
+
await removeEmptyWorkspaceAttestations(projectDir).catch(() => {});
|
|
762
766
|
const firstSync = full || !_runtimeSynced.has(projectDir);
|
|
763
767
|
if (firstSync) {
|
|
764
768
|
// Auto-migrate legacy /root/project paths → /home/node/project in openclaw.json
|
|
@@ -786,6 +790,15 @@ async function syncRuntimeState(projectDir, { full = false } = {}) {
|
|
|
786
790
|
_runtimeSynced.add(projectDir);
|
|
787
791
|
}
|
|
788
792
|
|
|
793
|
+
async function removeEmptyWorkspaceAttestations(projectDir) {
|
|
794
|
+
const attestDir = join(projectDir, '.openclaw', 'workspace-attestations');
|
|
795
|
+
if (!existsSync(attestDir)) return false;
|
|
796
|
+
const entries = await fsp.readdir(attestDir);
|
|
797
|
+
if (entries.length > 0) return false;
|
|
798
|
+
await fsp.rmdir(attestDir);
|
|
799
|
+
return true;
|
|
800
|
+
}
|
|
801
|
+
|
|
789
802
|
/**
|
|
790
803
|
* Migrate legacy /root/project/ paths to /home/node/project/ in openclaw.json.
|
|
791
804
|
* Old projects may have been created with /root/project/ which doesn't match the
|
|
@@ -3276,7 +3289,7 @@ async function installFeature(projectDir, agentId, kind, id) {
|
|
|
3276
3289
|
const botContainer = getBotContainerName(projectDir);
|
|
3277
3290
|
sendLog(`[skill] Installing/updating clawhub:${slug} inside container ${botContainer} for agent ${agentId}...`);
|
|
3278
3291
|
|
|
3279
|
-
const cmd = `cd /home/node/project && openclaw skills install ${slug} --agent ${agentId} --force`;
|
|
3292
|
+
const cmd = `cd /home/node/project && openclaw skills install ${slug} --agent ${agentId} --force --acknowledge-clawhub-risk`;
|
|
3280
3293
|
const cmdOut = await runCapture('docker', ['exec', botContainer, 'sh', '-lc', cmd], { cwd: projectDir, shell: false });
|
|
3281
3294
|
|
|
3282
3295
|
if (cmdOut) {
|
|
@@ -3298,7 +3311,7 @@ async function installFeature(projectDir, agentId, kind, id) {
|
|
|
3298
3311
|
await run('openclaw', ['doctor', '--fix'], { cwd: projectDir, env: openclawProjectEnv(projectDir) }).catch((err) => sendLog(`[skill] doctor --fix skipped: ${err.message}`));
|
|
3299
3312
|
sendLog(`[skill] Installing clawhub:${slug} for agent ${agentId}...`);
|
|
3300
3313
|
|
|
3301
|
-
await run('openclaw', ['skills', 'install', slug, '--agent', agentId, '--force'], {
|
|
3314
|
+
await run('openclaw', ['skills', 'install', slug, '--agent', agentId, '--force', '--acknowledge-clawhub-risk'], {
|
|
3302
3315
|
cwd: projectDir,
|
|
3303
3316
|
env: openclawProjectEnv(projectDir)
|
|
3304
3317
|
});
|
|
@@ -4210,4 +4223,4 @@ export async function startLocalInstaller({ host = '127.0.0.1', preferredPort =
|
|
|
4210
4223
|
printRemoteAccessHint(port).catch(() => {});
|
|
4211
4224
|
}
|
|
4212
4225
|
|
|
4213
|
-
export { createBotInProject, updateBotInProject, deleteBotInProject, validateOpenclawConfig, startZaloLogin, readBotCredentials, resolveProject9RouterApiKey, installCore, deleteProjectFolder, buildZaloHealthSnapshot };
|
|
4226
|
+
export { createBotInProject, updateBotInProject, deleteBotInProject, validateOpenclawConfig, startZaloLogin, readBotCredentials, resolveProject9RouterApiKey, installCore, deleteProjectFolder, buildZaloHealthSnapshot, removeEmptyWorkspaceAttestations };
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
credSteps: [
|
|
63
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
|
-
{ textVi: '
|
|
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
67
|
// Mirrors buildZaloConnectChannelConfig() in bot-config-gen.js — keys validated
|
|
68
|
-
// against OpenClaw Zalo Connect 3.0.
|
|
68
|
+
// against OpenClaw Zalo Connect 3.0.1's strict channel schema.
|
|
69
69
|
channelConfig: {
|
|
70
70
|
'zalo-connect': {
|
|
71
71
|
enabled: true,
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
accounts: {
|
|
74
74
|
default: { enabled: true },
|
|
75
75
|
},
|
|
76
|
-
dmPolicy: '
|
|
77
|
-
allowFrom: [],
|
|
76
|
+
dmPolicy: 'open',
|
|
77
|
+
allowFrom: ['*'],
|
|
78
78
|
groupPolicy: 'allowlist',
|
|
79
79
|
groups: {
|
|
80
|
-
'*': { enabled:
|
|
80
|
+
'*': { enabled: true, requireMention: false },
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
},
|
|
@@ -310,10 +310,9 @@
|
|
|
310
310
|
channels.telegram = telegramConfig;
|
|
311
311
|
} else if (isZaloPersonal(channelKey)) {
|
|
312
312
|
// Zalo Personal → OpenClaw Zalo Connect, the only personal-Zalo backend.
|
|
313
|
-
//
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
// Every key below is validated against OpenClaw Zalo Connect 3.0.0's schema
|
|
313
|
+
// First-run defaults keep owner confirmation reachable immediately after QR:
|
|
314
|
+
// DMs are open to every sender and groups are enabled without requiring a mention.
|
|
315
|
+
// Every key below is validated against OpenClaw Zalo Connect 3.0.1's schema
|
|
317
316
|
// (`additionalProperties: false`) — do NOT add keys (e.g. historyLimit,
|
|
318
317
|
// groupAllowFrom) without re-checking `openclaw.plugin.json` first, an unknown
|
|
319
318
|
// key crashes the gateway on boot.
|
|
@@ -336,11 +335,11 @@
|
|
|
336
335
|
accounts: {
|
|
337
336
|
default: { enabled: true },
|
|
338
337
|
},
|
|
339
|
-
dmPolicy: '
|
|
340
|
-
allowFrom: [],
|
|
338
|
+
dmPolicy: 'open',
|
|
339
|
+
allowFrom: ['*'],
|
|
341
340
|
groupPolicy: 'allowlist',
|
|
342
341
|
groups: {
|
|
343
|
-
'*': { enabled:
|
|
342
|
+
'*': { enabled: true, requireMention: false },
|
|
344
343
|
},
|
|
345
344
|
};
|
|
346
345
|
}
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
// Pin the maintained fork tag so setup never falls back to upstream/ClawHub.
|
|
45
45
|
const ZALO_CHANNEL_ID = 'zalo-connect';
|
|
46
46
|
const ZALO_PLUGIN_ID = 'zalo-connect';
|
|
47
|
-
const ZALO_CONNECT_VERSION = '3.0.
|
|
48
|
-
const ZALO_CONNECT_PLUGIN_SPEC = 'https://github.com/tuanminhhole/openclaw-zalo-connect.git#v3.0.
|
|
47
|
+
const ZALO_CONNECT_VERSION = '3.0.1';
|
|
48
|
+
const ZALO_CONNECT_PLUGIN_SPEC = 'https://github.com/tuanminhhole/openclaw-zalo-connect.git#v3.0.1';
|
|
49
49
|
|
|
50
50
|
function buildRelayPluginInstallCommand(prefix = 'openclaw') {
|
|
51
51
|
return `if [ ! -d "$OPENCLAW_STATE_DIR/extensions/${TELEGRAM_RELAY_PLUGIN_ID}" ]; then ${prefix} plugins install ${TELEGRAM_RELAY_PLUGIN_SPEC} 2>/dev/null || true; fi`;
|
|
@@ -244,10 +244,10 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
244
244
|
const stateVolDecl = useStateVolume ? '\n openclaw-state:' : '';
|
|
245
245
|
const stateVolBlock = useStateVolume ? '\n\nvolumes:\n openclaw-state:' : '';
|
|
246
246
|
const skillLines = dockerfileSkillInstallMode === 'build' && allSkills.length > 0
|
|
247
|
-
? `\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`
|
|
247
|
+
? `\n# Install skills (ClawHub)\n${allSkills.map((skill) => `RUN openclaw skills install ${skill} --acknowledge-clawhub-risk || echo "Warning: Failed to install ${skill} due to rate limits."`).join('\n')}\n`
|
|
248
248
|
: '';
|
|
249
249
|
const pluginLines = dockerfilePlugins.length > 0
|
|
250
|
-
? `\n# Install plugins (ClawHub)\n${dockerfilePlugins.map((p) => `RUN openclaw plugins install ${p} || echo "Warning: Failed to install plugin ${p}"`).join('\n')}\n`
|
|
250
|
+
? `\n# Install plugins (ClawHub)\n${dockerfilePlugins.map((p) => `RUN openclaw plugins install ${p} --acknowledge-clawhub-risk || echo "Warning: Failed to install plugin ${p}"`).join('\n')}\n`
|
|
251
251
|
: '';
|
|
252
252
|
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);}"`;
|
|
253
253
|
|
|
@@ -295,7 +295,7 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
295
295
|
' echo "[entrypoint] warning: failed to clone plugin $spec"',
|
|
296
296
|
' fi',
|
|
297
297
|
' ;;',
|
|
298
|
-
' *) openclaw plugins install "$spec" 2>/dev/null || echo "[entrypoint] warning: failed to install plugin $spec" ;;',
|
|
298
|
+
' *) openclaw plugins install "$spec" --acknowledge-clawhub-risk 2>/dev/null || echo "[entrypoint] warning: failed to install plugin $spec" ;;',
|
|
299
299
|
' esac',
|
|
300
300
|
'}',
|
|
301
301
|
'ensure_skill() {',
|
|
@@ -305,7 +305,7 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
305
305
|
' return 0',
|
|
306
306
|
' fi',
|
|
307
307
|
' echo "[entrypoint] skill $id missing; installing"',
|
|
308
|
-
' openclaw skills install "$id" 2>/dev/null || echo "[entrypoint] warning: failed to install skill $id"',
|
|
308
|
+
' openclaw skills install "$id" --acknowledge-clawhub-risk 2>/dev/null || echo "[entrypoint] warning: failed to install skill $id"',
|
|
309
309
|
'}',
|
|
310
310
|
'echo "[entrypoint] ensuring runtime assets, then starting gateway"',
|
|
311
311
|
];
|
|
@@ -320,7 +320,7 @@ if(touched){console.log('[patch-9router] Applied Codex compatibility patch.');}e
|
|
|
320
320
|
// install when extensions/zalo-connect already exists, so restarts never re-download
|
|
321
321
|
// and a reconnect never reinstalls. No dist patching, no mentions.js, no watchdog
|
|
322
322
|
// hacks: sticker/mention/reaction are native ZaloConnect actions.
|
|
323
|
-
const zaloConnectSpec = common.ZALO_CONNECT_PLUGIN_SPEC || 'https://github.com/tuanminhhole/openclaw-zalo-connect.git#v3.0.
|
|
323
|
+
const zaloConnectSpec = common.ZALO_CONNECT_PLUGIN_SPEC || 'https://github.com/tuanminhhole/openclaw-zalo-connect.git#v3.0.1';
|
|
324
324
|
runtimeParts.push(`ensure_plugin zalo-connect "${zaloConnectSpec}"`);
|
|
325
325
|
}
|
|
326
326
|
runtimeParts.push('openclaw gateway run');
|
package/dist/web/app.js
CHANGED
|
@@ -899,12 +899,11 @@ function botListPanel(bots) {
|
|
|
899
899
|
const role = (b.role || b.desc || b.description || '').trim() || t('Tr\u1ee3 l\u00fd OpenClaw','OpenClaw assistant');
|
|
900
900
|
const isZalo = b.channel === 'zalo-personal';
|
|
901
901
|
const health = isZalo ? zaloAccountHealth(b) : null;
|
|
902
|
-
const
|
|
903
|
-
const connection = !health ? t('Chưa rõ','Unknown') : health.running ? t('Hoạt động','Active') : health.lastError ? t('Mất kết nối','Disconnected') : t('Đang kết nối','Connecting');
|
|
902
|
+
const connection = !health ? t('Chưa rõ','Unknown') : health.running ? t('Đã kết nối','Connected') : health.lastError ? t('Mất kết nối','Disconnected') : t('Đang kết nối','Connecting');
|
|
904
903
|
const login = !health ? t('Chưa rõ','Unknown') : health.sessionSaved ? t('Đã đăng nhập','Logged in') : t('Chưa đăng nhập','Not logged in');
|
|
905
904
|
const connectionTone = health?.running ? 'ok' : health?.lastError ? 'bad' : 'warn';
|
|
906
905
|
const loginTone = health?.sessionSaved ? 'ok' : health ? 'bad' : 'warn';
|
|
907
|
-
return `<article class="bot-item ${state.activeBotId===b.id?'active':''}" data-bot-id="${escapeHtml(b.id)}"><div class="bot-item-actions"><button class="bot-edit" data-edit-bot="${escapeHtml(b.id)}" title="${t('Sửa bot','Edit bot')}" aria-label="${t('Sửa bot','Edit bot')}">${actionIcon('edit')}</button><button class="bot-delete" data-delete-bot="${escapeHtml(b.id)}" title="${t('X\u00f3a bot','Delete bot')}" aria-label="${t('X\u00f3a bot','Delete bot')}">×</button></div><div class="bot-item-title"><b>${escapeHtml(b.name)}</b
|
|
906
|
+
return `<article class="bot-item ${state.activeBotId===b.id?'active':''}" data-bot-id="${escapeHtml(b.id)}"><div class="bot-item-actions"><button class="bot-edit" data-edit-bot="${escapeHtml(b.id)}" title="${t('Sửa bot','Edit bot')}" aria-label="${t('Sửa bot','Edit bot')}">${actionIcon('edit')}</button><button class="bot-delete" data-delete-bot="${escapeHtml(b.id)}" title="${t('X\u00f3a bot','Delete bot')}" aria-label="${t('X\u00f3a bot','Delete bot')}">×</button></div><div class="bot-item-title"><b>${escapeHtml(b.name)}</b></div><small title="${escapeHtml(role)}">${escapeHtml(role)}</small>${isZalo ? `<div class="zalo-bot-health"><div><span>${t('Kết nối','Connection')}</span><em class="${connectionTone}">${connection}</em></div><div><span>${t('Đăng nhập','Login')}</span><em class="${loginTone}">${login}</em></div></div>` : ''}</article>`;
|
|
908
907
|
});
|
|
909
908
|
listItems.push(`
|
|
910
909
|
<article class="bot-item bot-create-card" data-bot-modal="open">
|