create-openclaw-bot 5.7.10 → 5.8.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 +61 -219
- package/README.vi.md +63 -216
- package/dist/cli.js +92 -2777
- package/dist/legacy-cli.js +2812 -0
- package/dist/server/local-server.js +2568 -0
- package/dist/setup/data/header.js +80 -80
- package/dist/setup/data/index.js +0 -1
- package/dist/setup/data/plugins.js +8 -1
- package/dist/setup/data/skills.js +2 -10
- package/dist/setup/shared/bot-config-gen.js +469 -462
- package/dist/setup/shared/common-gen.js +313 -315
- package/dist/setup/shared/docker-gen.js +193 -124
- package/dist/setup/shared/install-gen.js +566 -566
- package/dist/setup/shared/workspace-gen.js +813 -525
- package/dist/setup.js +729 -499
- package/dist/web/app.js +1247 -0
- package/dist/web/bvvbank.jpg +0 -0
- package/dist/web/index.html +14 -0
- package/dist/web/momo.jpg +0 -0
- package/dist/web/openclaw-logo.png +0 -0
- package/dist/web/openclaw-logo.svg +1 -0
- package/dist/web/styles.css +1375 -0
- package/package.json +40 -39
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/* eslint-disable no-undef, no-unused-vars */
|
|
3
|
-
/**
|
|
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.
|
|
6
|
-
* Do NOT add import/export statements. Edit, then run: node build.mjs
|
|
7
|
-
*
|
|
8
|
-
* @global {object} state - Wizard UI state
|
|
9
|
-
* @global {object} PROVIDERS - AI provider registry
|
|
10
|
-
* @global {Array} SKILLS - Available skills
|
|
11
|
-
* @global {Array} PLUGINS - Available plugins
|
|
12
|
-
* @global {object} CHANNELS - Channel definitions
|
|
13
|
-
* @global {boolean} isVi - Vietnamese language mode
|
|
14
|
-
* @global {object} provider - Current primary provider config
|
|
15
|
-
* @global {boolean} isMultiBot - Multi-bot mode flag
|
|
16
|
-
* @global {boolean} hasBrowser - Browser plugin selected
|
|
17
|
-
* @global {boolean} is9Router - 9Router proxy mode
|
|
18
|
-
* @global {string} projectDir - Output project directory path
|
|
19
|
-
* @global {Function} getGatewayAllowedOrigins
|
|
20
|
-
*/
|
|
21
|
-
// ========== CDN Logo URLs (thesvg.org) ==========
|
|
22
|
-
const SVG_CDN = 'https://thesvg.org/icons';
|
|
23
|
-
const LOGO = {
|
|
24
|
-
gemini: `${SVG_CDN}/google-gemini/default.svg`,
|
|
25
|
-
anthropic: `${SVG_CDN}/anthropic/light.svg`,
|
|
26
|
-
openai: `${SVG_CDN}/openai/light.svg`,
|
|
27
|
-
openrouter: `${SVG_CDN}/openrouter/light.svg`,
|
|
28
|
-
ollama: `${SVG_CDN}/ollama/light.svg`,
|
|
29
|
-
'9router': null, // Uses emoji icon 🔀 instead of SVG
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// Language flag icons (inline SVG circles with flag colors)
|
|
33
|
-
const FLAG_ICONS = {
|
|
34
|
-
vi: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="#DA251D"/><polygon points="10,4 11.5,8.5 16,8.5 12.3,11.2 13.8,15.7 10,13 6.2,15.7 7.7,11.2 4,8.5 8.5,8.5" fill="#FFFF00"/></svg>`,
|
|
35
|
-
en: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="#012169"/><path d="M0 0L20 20M20 0L0 20" stroke="white" stroke-width="3"/><path d="M0 0L20 20M20 0L0 20" stroke="#C8102E" stroke-width="1.5"/><path d="M10 0V20M0 10H20" stroke="white" stroke-width="5"/><path d="M10 0V20M0 10H20" stroke="#C8102E" stroke-width="3"/></svg>`,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// ========== State ==========
|
|
39
|
-
const state = {
|
|
40
|
-
currentStep: 1,
|
|
41
|
-
totalSteps: 5,
|
|
42
|
-
channel: null,
|
|
43
|
-
deployMode: 'docker', // 'docker' | 'native'
|
|
44
|
-
nativeOs: 'win', // 'win' | 'linux' | 'vps' | 'linux-desktop'
|
|
45
|
-
config: {
|
|
46
|
-
botName: '',
|
|
47
|
-
description: '',
|
|
48
|
-
emoji: '🤖',
|
|
49
|
-
provider: '9router',
|
|
50
|
-
model: '9router/smart-route',
|
|
51
|
-
language: 'vi',
|
|
52
|
-
systemPrompt: '',
|
|
53
|
-
userInfo: '',
|
|
54
|
-
securityRules: '',
|
|
55
|
-
plugins: [],
|
|
56
|
-
skills: ['memory'],
|
|
57
|
-
// Persisted credential inputs (Bug 1+2 fix)
|
|
58
|
-
botToken: '',
|
|
59
|
-
apiKey: '',
|
|
60
|
-
projectPath: '',
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// Runtime packages installed alongside openclaw in native and Docker flows.
|
|
65
|
-
const openClawRuntimePackages = globalThis.__openclawCommon?.OPENCLAW_RUNTIME_PACKAGES
|
|
66
|
-
|| 'grammy @grammyjs/runner @grammyjs/transformer-throttler @buape/carbon @larksuiteoapi/node-sdk @slack/web-api';
|
|
67
|
-
|
|
68
|
-
function getGatewayAllowedOrigins(port) {
|
|
69
|
-
const normalizedPort = Number(port) ||
|
|
70
|
-
const origins = new Set([
|
|
71
|
-
`http://localhost:${normalizedPort}`,
|
|
72
|
-
`http://127.0.0.1:${normalizedPort}`,
|
|
73
|
-
`http://0.0.0.0:${normalizedPort}`,
|
|
74
|
-
]);
|
|
75
|
-
const currentHost = (window.location && window.location.hostname) ? window.location.hostname.trim() : '';
|
|
76
|
-
if (currentHost) {
|
|
77
|
-
origins.add(`http://${currentHost}:${normalizedPort}`);
|
|
78
|
-
}
|
|
79
|
-
return Array.from(origins);
|
|
80
|
-
}
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* eslint-disable no-undef, no-unused-vars */
|
|
3
|
+
/**
|
|
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.
|
|
6
|
+
* Do NOT add import/export statements. Edit, then run: node build.mjs
|
|
7
|
+
*
|
|
8
|
+
* @global {object} state - Wizard UI state
|
|
9
|
+
* @global {object} PROVIDERS - AI provider registry
|
|
10
|
+
* @global {Array} SKILLS - Available skills
|
|
11
|
+
* @global {Array} PLUGINS - Available plugins
|
|
12
|
+
* @global {object} CHANNELS - Channel definitions
|
|
13
|
+
* @global {boolean} isVi - Vietnamese language mode
|
|
14
|
+
* @global {object} provider - Current primary provider config
|
|
15
|
+
* @global {boolean} isMultiBot - Multi-bot mode flag
|
|
16
|
+
* @global {boolean} hasBrowser - Browser plugin selected
|
|
17
|
+
* @global {boolean} is9Router - 9Router proxy mode
|
|
18
|
+
* @global {string} projectDir - Output project directory path
|
|
19
|
+
* @global {Function} getGatewayAllowedOrigins
|
|
20
|
+
*/
|
|
21
|
+
// ========== CDN Logo URLs (thesvg.org) ==========
|
|
22
|
+
const SVG_CDN = 'https://thesvg.org/icons';
|
|
23
|
+
const LOGO = {
|
|
24
|
+
gemini: `${SVG_CDN}/google-gemini/default.svg`,
|
|
25
|
+
anthropic: `${SVG_CDN}/anthropic/light.svg`,
|
|
26
|
+
openai: `${SVG_CDN}/openai/light.svg`,
|
|
27
|
+
openrouter: `${SVG_CDN}/openrouter/light.svg`,
|
|
28
|
+
ollama: `${SVG_CDN}/ollama/light.svg`,
|
|
29
|
+
'9router': null, // Uses emoji icon 🔀 instead of SVG
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Language flag icons (inline SVG circles with flag colors)
|
|
33
|
+
const FLAG_ICONS = {
|
|
34
|
+
vi: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="#DA251D"/><polygon points="10,4 11.5,8.5 16,8.5 12.3,11.2 13.8,15.7 10,13 6.2,15.7 7.7,11.2 4,8.5 8.5,8.5" fill="#FFFF00"/></svg>`,
|
|
35
|
+
en: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="#012169"/><path d="M0 0L20 20M20 0L0 20" stroke="white" stroke-width="3"/><path d="M0 0L20 20M20 0L0 20" stroke="#C8102E" stroke-width="1.5"/><path d="M10 0V20M0 10H20" stroke="white" stroke-width="5"/><path d="M10 0V20M0 10H20" stroke="#C8102E" stroke-width="3"/></svg>`,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// ========== State ==========
|
|
39
|
+
const state = {
|
|
40
|
+
currentStep: 1,
|
|
41
|
+
totalSteps: 5,
|
|
42
|
+
channel: null,
|
|
43
|
+
deployMode: 'docker', // 'docker' | 'native'
|
|
44
|
+
nativeOs: 'win', // 'win' | 'linux' | 'vps' | 'linux-desktop'
|
|
45
|
+
config: {
|
|
46
|
+
botName: '',
|
|
47
|
+
description: '',
|
|
48
|
+
emoji: '🤖',
|
|
49
|
+
provider: '9router',
|
|
50
|
+
model: '9router/smart-route',
|
|
51
|
+
language: 'vi',
|
|
52
|
+
systemPrompt: '',
|
|
53
|
+
userInfo: '',
|
|
54
|
+
securityRules: '',
|
|
55
|
+
plugins: [],
|
|
56
|
+
skills: ['memory'],
|
|
57
|
+
// Persisted credential inputs (Bug 1+2 fix)
|
|
58
|
+
botToken: '',
|
|
59
|
+
apiKey: '',
|
|
60
|
+
projectPath: '',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Runtime packages installed alongside openclaw in native and Docker flows.
|
|
65
|
+
const openClawRuntimePackages = globalThis.__openclawCommon?.OPENCLAW_RUNTIME_PACKAGES
|
|
66
|
+
|| 'grammy @grammyjs/runner @grammyjs/transformer-throttler @buape/carbon @larksuiteoapi/node-sdk @slack/web-api';
|
|
67
|
+
|
|
68
|
+
function getGatewayAllowedOrigins(port) {
|
|
69
|
+
const normalizedPort = Number(port) || 18789;
|
|
70
|
+
const origins = new Set([
|
|
71
|
+
`http://localhost:${normalizedPort}`,
|
|
72
|
+
`http://127.0.0.1:${normalizedPort}`,
|
|
73
|
+
`http://0.0.0.0:${normalizedPort}`,
|
|
74
|
+
]);
|
|
75
|
+
const currentHost = (window.location && window.location.hostname) ? window.location.hostname.trim() : '';
|
|
76
|
+
if (currentHost) {
|
|
77
|
+
origins.add(`http://${currentHost}:${normalizedPort}`);
|
|
78
|
+
}
|
|
79
|
+
return Array.from(origins);
|
|
80
|
+
}
|
package/dist/setup/data/index.js
CHANGED
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
// ── CLI-facing SKILLS (value = selection key, slug = ClawHub package name) ────
|
|
30
30
|
// Keep in sync with setup/data/skills.js skill IDs
|
|
31
31
|
const SKILLS = [
|
|
32
|
-
{ value: 'browser', name: '🌐 Browser Automation (Playwright) (⭐ Khuyên dùng)', slug: null },
|
|
33
32
|
{ value: 'memory', name: '🧠 Long-term Memory (⭐ Khuyên dùng)', slug: 'memory' },
|
|
34
33
|
{ value: 'scheduler', name: '⏰ Native Cron Scheduler (⭐ Khuyên dùng)', slug: null },
|
|
35
34
|
{ value: 'rag', name: '📚 RAG / Knowledge Base', slug: 'rag' },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
2
|
/* eslint-disable no-undef, no-unused-vars */
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
*/
|
|
21
21
|
// ========== Available Plugins (npm packages — runtime/channel extensions) ==========
|
|
22
22
|
const PLUGINS = [
|
|
23
|
+
{
|
|
24
|
+
id: 'browser-automation',
|
|
25
|
+
name: 'Browser Automation ⭐',
|
|
26
|
+
icon: '🌐',
|
|
27
|
+
descVi: 'Smart Search + Điều khiển trình duyệt Chrome/Chromium (ẩn & thật)', descEn: 'Smart Search + Chrome/Chromium browser control (headless & real)',
|
|
28
|
+
package: 'openclaw-browser-automation',
|
|
29
|
+
},
|
|
23
30
|
{
|
|
24
31
|
id: 'telegram-multibot-relay',
|
|
25
32
|
name: 'Telegram Multi-Bot Relay',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
2
|
/* eslint-disable no-undef, no-unused-vars */
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Part of the OpenClaw Setup Wizard IIFE bundle.
|
|
@@ -20,14 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
// ========== Available Skills (ClawHub registry — agent capabilities) ==========
|
|
22
22
|
const SKILLS = [
|
|
23
|
-
{
|
|
24
|
-
id: 'browser',
|
|
25
|
-
name: 'Browser Automation ⭐(Khuyên dùng)',
|
|
26
|
-
icon: '🌐',
|
|
27
|
-
descVi: 'Tự động thao tác trình duyệt (Playwright)', descEn: 'Automated browser control (Playwright)',
|
|
28
|
-
slug: 'browser-automation',
|
|
29
|
-
noteVi: 'Cần bật Chrome Debug Mode trên máy host', noteEn: 'Requires Chrome Debug Mode on host',
|
|
30
|
-
},
|
|
31
23
|
{
|
|
32
24
|
id: 'memory',
|
|
33
25
|
name: 'Long-term Memory ⭐(Khuyên dùng)',
|
|
@@ -126,7 +118,7 @@
|
|
|
126
118
|
className: 'plugin-card__badge plugin-card__badge--recommended'
|
|
127
119
|
};
|
|
128
120
|
}
|
|
129
|
-
if (skill.id === '
|
|
121
|
+
if (skill.id === 'scheduler') {
|
|
130
122
|
return {
|
|
131
123
|
text: isVi ? 'Khuyên dùng' : 'Recommended',
|
|
132
124
|
className: 'plugin-card__badge plugin-card__badge--recommended'
|