create-openclaw-bot 5.7.10 → 5.8.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.
- package/README.md +159 -315
- package/README.vi.md +164 -315
- package/dist/cli.js +111 -2809
- package/dist/legacy-cli.js +2812 -0
- package/dist/server/local-server.js +2372 -0
- package/dist/setup/data/header.js +80 -80
- 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 +574 -500
- package/dist/setup/shared/install-gen.js +566 -566
- package/dist/setup/shared/workspace-gen.js +2 -1
- package/dist/setup.js +396 -204
- package/dist/web/app.js +1106 -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 +607 -0
- package/package.json +3 -2
|
@@ -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
|
+
}
|