create-openclaw-bot 5.10.0 → 5.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/README.vi.md +14 -2
- package/dist/server/local-server.js +68 -4
- 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, on Docker or native.*
|
|
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.10.
|
|
10
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.10.1-0EA5E9?style=for-the-badge" alt="Version 5.10.1" /></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>
|
|
@@ -27,7 +27,17 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## 🆕 What's New in v5.10.
|
|
30
|
+
## 🆕 What's New in v5.10.1
|
|
31
|
+
|
|
32
|
+
- 🔧 **Docker fixes**: plugin updates keep the zalo-mod dashboard port, and granted disk/folder mounts (including whole Windows drives like `D:\`) now survive a rebuild instead of being dropped.
|
|
33
|
+
- 🔄 **Native auto-restart (process supervision)**: native installs now register the gateway + 9router as OS services (macOS launchd, Linux systemd, Windows detached) that restart on crash/reboot — mirroring Docker's `restart: always`. Best-effort, falls back to a plain detached process.
|
|
34
|
+
- 🔐 **9router first-install sync — fixed**: no longer permanently disables "Require login". The generated `sync.js` logs in with 9router's default password `123456`, builds the `smart-route` combo from active providers **once**, then stops. Require login stays ON (change the password later); `/v1` model calls are unaffected.
|
|
35
|
+
- 📁 **Native workspace path — fixed**: agent `workspace` is now relative, so persona/memory/skills resolve correctly on native installs (previously a container-absolute path pointing nowhere on the host).
|
|
36
|
+
- 🧩 **Config `meta` no longer clobbered**: the generator stops seeding `meta`, so OpenClaw owns it — prevents config parse failures from a version-range `lastTouchedVersion`.
|
|
37
|
+
- 💅 **Dashboard UI polish**: Bot/Setup hero shortcuts, plugin version badges, cleaner feature-toggle layout, responsive/mobile fixes, and no more duplicate page title on the dashboard tab.
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary><b>Previous: What's new in v5.9.0</b></summary>
|
|
31
41
|
|
|
32
42
|
- 🧠 **TencentDB Agent Memory — 1-click install**: New memory plugin in the UI. A 4-tier (L0–L3) layered-memory + context-compression engine that keeps long sessions coherent and **cuts token usage by up to ~61%**. Fully local (SQLite), no API key, Docker-ready.
|
|
33
43
|
- ⚡ **Token-lean defaults for every new bot**: Ships with context pruning (cache-TTL) + `safeguard` compaction — **cheaper & sharper long conversations** with zero tuning.
|
|
@@ -36,6 +46,8 @@
|
|
|
36
46
|
- 🐳 **One-click Docker controls**: Restart / Rebuild the bot container and grant it disk access (mount any host folder at `/mnt/<name>`, cross-OS) right from the dashboard — restart your bot without touching the command line.
|
|
37
47
|
- ⚡ **Faster Dashboard & Bot pages**: Runtime/version detection now probes **once** and is cached instead of re-running on every page load — bot status dropped from ~4s to ~3ms on repeat loads. Cache auto-invalidates on update/rebuild/restart/install.
|
|
38
48
|
|
|
49
|
+
</details>
|
|
50
|
+
|
|
39
51
|
<details>
|
|
40
52
|
<summary><b>Previous: What's new in v5.8.24 (Launcher Auto-Update)</b></summary>
|
|
41
53
|
|
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 Docker hoặc native.*
|
|
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.10.
|
|
10
|
+
<a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.10.1-0EA5E9?style=for-the-badge" alt="Version 5.10.1" /></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>
|
|
@@ -27,7 +27,17 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## 🆕 Có gì mới trong v5.10.
|
|
30
|
+
## 🆕 Có gì mới trong v5.10.1
|
|
31
|
+
|
|
32
|
+
- 🔧 **Sửa lỗi Docker**: update plugin giữ nguyên port dashboard zalo-mod, và ổ đĩa/thư mục đã cấp quyền (kể cả nguyên ổ Windows như `D:\`) không còn bị mất sau khi rebuild.
|
|
33
|
+
- 🔄 **Tự khởi động lại tiến trình (native)**: cài native giờ đăng ký gateway + 9router thành service hệ điều hành (macOS launchd, Linux systemd, Windows detached), tự chạy lại khi crash/reboot — như `restart: always` của Docker. Best-effort, lỗi thì fallback chạy detached.
|
|
34
|
+
- 🔐 **Sync 9router lần đầu — đã sửa**: không còn tắt vĩnh viễn "Require login". `sync.js` đăng nhập bằng mật khẩu mặc định `123456`, tạo combo `smart-route` từ provider đang active **một lần** rồi dừng. Require login giữ ON (đổi mật khẩu sau); model-call `/v1` không bị ảnh hưởng.
|
|
35
|
+
- 📁 **Đường dẫn workspace native — đã sửa**: `workspace` của agent giờ là tương đối, persona/memory/skills nằm đúng chỗ khi cài native (trước là đường dẫn tuyệt đối kiểu container → trỏ sai trên host).
|
|
36
|
+
- 🧩 **Không ghi đè khối `meta` trong config**: generator ngừng seed `meta` để OpenClaw tự quản — tránh lỗi parse config do `lastTouchedVersion` là dải version.
|
|
37
|
+
- 💅 **UI dashboard gọn hơn**: nút tắt Bot/Cài đặt ở hero, badge version plugin, layout toggle tính năng, responsive/mobile, bỏ tiêu đề trùng ở tab dashboard.
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary><b>Trước đó: Có gì mới trong v5.9.0</b></summary>
|
|
31
41
|
|
|
32
42
|
- 🧠 **TencentDB Agent Memory — cài 1 chạm**: Plugin bộ nhớ mới ngay trên UI. Bộ nhớ phân tầng 4 lớp (L0–L3) + nén ngữ cảnh, giữ session dài mạch lạc và **tiết kiệm tới ~61% token**. Chạy local hoàn toàn (SQLite), không cần API key, sẵn sàng cho Docker.
|
|
33
43
|
- ⚡ **Cấu hình tiết kiệm token mặc định cho mọi bot mới**: Tự có context pruning (cache-TTL) + compaction `safeguard` — **hội thoại dài rẻ hơn & sắc nét hơn**, không cần chỉnh tay.
|
|
@@ -36,6 +46,8 @@
|
|
|
36
46
|
- 🐳 **Nút điều khiển Docker 1 chạm**: Restart / Rebuild container bot và cấp quyền ổ đĩa (mount thư mục host bất kỳ vào `/mnt/<tên>`, đa OS) ngay trên dashboard — khởi động lại bot mà không cần gõ lệnh.
|
|
37
47
|
- ⚡ **Trang Dashboard & Bot load nhanh hơn**: Việc dò runtime/version giờ chỉ chạy **một lần** rồi cache thay vì lặp lại mỗi lần tải trang — bot status giảm từ ~4s xuống ~3ms ở các lần tải sau. Cache tự xoá khi update/rebuild/restart/cài đặt.
|
|
38
48
|
|
|
49
|
+
</details>
|
|
50
|
+
|
|
39
51
|
<details>
|
|
40
52
|
<summary><b>Trước đó: Có gì mới trong v5.8.24 (Tự động cập nhật Launcher)</b></summary>
|
|
41
53
|
|
|
@@ -2277,6 +2277,13 @@ async function syncDockerInfra(projectDir, force = false) {
|
|
|
2277
2277
|
|
|
2278
2278
|
sendLog(`[sync] Updating Docker infrastructure files (v${existingVersion} \u2192 v${SETUP_VERSION})`);
|
|
2279
2279
|
await fsp.writeFile(join(dockerDir, 'Dockerfile'), docker.dockerfile, 'utf8');
|
|
2280
|
+
// Capture the user's custom disk/folder mounts from the OLD compose before we overwrite it — a
|
|
2281
|
+
// full regen only re-emits the default volumes, so without this the bot loses granted drives.
|
|
2282
|
+
let carriedMounts = [];
|
|
2283
|
+
try {
|
|
2284
|
+
const prevCompose = join(dockerDir, 'docker-compose.yml');
|
|
2285
|
+
if (existsSync(prevCompose)) carriedMounts = parseComposeMounts(await fsp.readFile(prevCompose, 'utf8'));
|
|
2286
|
+
} catch {}
|
|
2280
2287
|
await fsp.writeFile(join(dockerDir, 'docker-compose.yml'), newCompose, 'utf8');
|
|
2281
2288
|
// Preserve zalo-mod dashboard port if plugin is active
|
|
2282
2289
|
try {
|
|
@@ -2287,14 +2294,29 @@ async function syncDockerInfra(projectDir, force = false) {
|
|
|
2287
2294
|
let cc = await fsp.readFile(join(dockerDir, 'docker-compose.yml'), 'utf8');
|
|
2288
2295
|
if (!cc.includes(`:${dp}`)) {
|
|
2289
2296
|
const gpStr = String(gatewayPort);
|
|
2297
|
+
// Match the gateway published-port line whatever the host prefix is — the generated form is
|
|
2298
|
+
// "127.0.0.1:<gw>:<gw>", so keying off the container port (":<gw>" before the quote) is the
|
|
2299
|
+
// only reliable anchor. The old `(?:\d+:)?` variant never matched the "127.0.0.1:" prefix.
|
|
2290
2300
|
cc = cc.replace(
|
|
2291
|
-
new RegExp(`^(\\s*-\\s*"
|
|
2301
|
+
new RegExp(`^(\\s*-\\s*"[^"\\n]*:${gpStr}")\\s*$`, 'm'),
|
|
2292
2302
|
`$1\n - "127.0.0.1:${dp}:${dp}" # zalo-mod dashboard`
|
|
2293
2303
|
);
|
|
2294
2304
|
await fsp.writeFile(join(dockerDir, 'docker-compose.yml'), cc, 'utf8');
|
|
2295
2305
|
}
|
|
2296
2306
|
}
|
|
2297
2307
|
} catch {}
|
|
2308
|
+
// Re-inject the user's custom mounts carried over from the old compose.
|
|
2309
|
+
if (carriedMounts.length) {
|
|
2310
|
+
try {
|
|
2311
|
+
const cpath = join(dockerDir, 'docker-compose.yml');
|
|
2312
|
+
const cur = await fsp.readFile(cpath, 'utf8');
|
|
2313
|
+
const merged = injectMountsIntoCompose(cur, carriedMounts);
|
|
2314
|
+
if (merged !== cur) {
|
|
2315
|
+
await fsp.writeFile(cpath, merged, 'utf8');
|
|
2316
|
+
sendLog(`[sync] Preserved ${carriedMounts.length} granted mount(s) across the compose regen`);
|
|
2317
|
+
}
|
|
2318
|
+
} catch (e) { sendLog(`[sync] Warning: could not re-apply granted mounts: ${e.message}`); }
|
|
2319
|
+
}
|
|
2298
2320
|
await fsp.writeFile(entrypointPath, entryScript, 'utf8');
|
|
2299
2321
|
if (docker.syncScript) await fsp.writeFile(join(dockerDir, 'sync.js'), docker.syncScript, 'utf8');
|
|
2300
2322
|
if (docker.patchScript) await fsp.writeFile(join(dockerDir, 'patch-9router.js'), docker.patchScript, 'utf8');
|
|
@@ -2392,6 +2414,45 @@ async function restartDockerBotContainer(projectDir = state.projectDir) {
|
|
|
2392
2414
|
return true;
|
|
2393
2415
|
}
|
|
2394
2416
|
|
|
2417
|
+
// Parse user-granted disk/folder mounts (/mnt/<name>, excluding the always-present /mnt/project)
|
|
2418
|
+
// from a docker-compose.yml string. Handles both the long-form bind (type/source/target) and the
|
|
2419
|
+
// legacy short form `- "<host>:/mnt/<name>"`.
|
|
2420
|
+
function parseComposeMounts(compose) {
|
|
2421
|
+
const mounts = [];
|
|
2422
|
+
const lines = String(compose || '').split('\n');
|
|
2423
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2424
|
+
const tm = lines[i].match(/^\s*target:\s*['"]?(\/mnt\/[A-Za-z0-9._-]+)['"]?\s*$/);
|
|
2425
|
+
if (tm && tm[1] !== '/mnt/project') {
|
|
2426
|
+
let host = '';
|
|
2427
|
+
for (let j = i - 1; j >= Math.max(0, i - 3); j--) {
|
|
2428
|
+
const sm = lines[j].match(/^\s*source:\s*['"]?(.+?)['"]?\s*$/);
|
|
2429
|
+
if (sm) { host = sm[1].replace(/''/g, "'"); break; }
|
|
2430
|
+
}
|
|
2431
|
+
if (host) mounts.push({ host, target: tm[1] });
|
|
2432
|
+
continue;
|
|
2433
|
+
}
|
|
2434
|
+
const ssm = lines[i].match(/^\s*-\s*"?([^":\n]+):(\/mnt\/[A-Za-z0-9._-]+)"?\s*$/);
|
|
2435
|
+
if (ssm && ssm[2] !== '/mnt/project') mounts.push({ host: ssm[1].trim(), target: ssm[2] });
|
|
2436
|
+
}
|
|
2437
|
+
return mounts;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
// Insert long-form bind mounts (idempotent) after the project's .openclaw volume line. Returns the
|
|
2441
|
+
// original string unchanged if the anchor is missing or a mount is already present.
|
|
2442
|
+
function injectMountsIntoCompose(compose, mounts) {
|
|
2443
|
+
const anchor = /^(\s*-\s*\.\.\/\.\.\/\.openclaw:\/home\/node\/project\/\.openclaw)\s*$/m;
|
|
2444
|
+
if (!Array.isArray(mounts) || !mounts.length || !anchor.test(compose)) return compose;
|
|
2445
|
+
let out = compose;
|
|
2446
|
+
for (const m of mounts) {
|
|
2447
|
+
if (!m || !m.host || !m.target) continue;
|
|
2448
|
+
if (out.includes(`target: ${m.target}`) || out.includes(`:${m.target}"`) || out.includes(`:${m.target}\n`) || out.includes(m.host)) continue;
|
|
2449
|
+
const src = `'${String(m.host).replace(/'/g, "''")}'`;
|
|
2450
|
+
const block = ` - type: bind\n source: ${src}\n target: ${m.target}`;
|
|
2451
|
+
out = out.replace(anchor, `$1\n${block}`);
|
|
2452
|
+
}
|
|
2453
|
+
return out;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2395
2456
|
// Grant the bot access to a host disk/folder by mounting it into the container at /mnt/<name>.
|
|
2396
2457
|
// Project-scoped: all bots in this project share the container, so all of them can use it.
|
|
2397
2458
|
// Per-bot limits are described in AGENTS.md (not enforced at the mount layer).
|
|
@@ -2399,7 +2460,10 @@ async function addBotMount(projectDir, hostPath, mountName = '') {
|
|
|
2399
2460
|
// Cross-OS normalize: trim, convert Windows backslashes → forward slashes (Docker accepts
|
|
2400
2461
|
// forward slashes on every OS, incl. `C:/Users/...`), drop trailing separators. This avoids
|
|
2401
2462
|
// YAML backslash issues and keeps the path uniform.
|
|
2402
|
-
|
|
2463
|
+
let cleanPath = String(hostPath || '').trim().replace(/\\+/g, '/').replace(/\/+$/, '');
|
|
2464
|
+
// A bare Windows drive letter ("D:") is an INVALID Docker bind source — the trailing-slash strip
|
|
2465
|
+
// above turns "D:/" into "D:". Restore the slash so mounting a whole drive (e.g. D:\) works.
|
|
2466
|
+
if (/^[a-zA-Z]:$/.test(cleanPath)) cleanPath += '/';
|
|
2403
2467
|
if (!cleanPath) throw httpError(400, 'Đường dẫn ổ đĩa/thư mục đang trống');
|
|
2404
2468
|
const composeFile = join(projectDir, 'docker', 'openclaw', 'docker-compose.yml');
|
|
2405
2469
|
if (!existsSync(composeFile)) throw httpError(400, 'Không tìm thấy docker-compose.yml (project có thể không chạy ở chế độ Docker)');
|
|
@@ -3260,7 +3324,7 @@ async function applyFeatureToggle(projectDir, agentId, kind, id, enabled) {
|
|
|
3260
3324
|
if (dashPort && !composeContent.includes(`:${dashPort}`)) {
|
|
3261
3325
|
const gwPortStr = String(Number(cfg.gateway?.port) || state.gatewayPort || 18789);
|
|
3262
3326
|
composeContent = composeContent.replace(
|
|
3263
|
-
new RegExp(`^(\\s*-\\s*"
|
|
3327
|
+
new RegExp(`^(\\s*-\\s*"[^"\\n]*:${gwPortStr}")\\s*$`, 'm'),
|
|
3264
3328
|
`$1\n - "127.0.0.1:${dashPort}:${dashPort}" # zalo-mod dashboard`
|
|
3265
3329
|
);
|
|
3266
3330
|
await fsp.writeFile(composeFile, composeContent, 'utf8');
|
|
@@ -3459,7 +3523,7 @@ async function installFeature(projectDir, agentId, kind, id) {
|
|
|
3459
3523
|
// Insert dashboard port after the gateway port line
|
|
3460
3524
|
const gwPortStr = String(gwPort);
|
|
3461
3525
|
composeContent = composeContent.replace(
|
|
3462
|
-
new RegExp(`^(\\s*-\\s*"
|
|
3526
|
+
new RegExp(`^(\\s*-\\s*"[^"\\n]*:${gwPortStr}")\\s*$`, 'm'),
|
|
3463
3527
|
`$1\n - ${dashPortMapping} # zalo-mod dashboard`
|
|
3464
3528
|
);
|
|
3465
3529
|
await fsp.writeFile(composeFile, composeContent, 'utf8');
|