create-openclaw-bot 5.8.3 → 5.8.5

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.
@@ -53,7 +53,7 @@
53
53
  userInfo: '',
54
54
  securityRules: '',
55
55
  plugins: [],
56
- skills: ['memory'],
56
+ skills: ['memory', 'image-gen', 'web-search'],
57
57
  // Persisted credential inputs (Bug 1+2 fix)
58
58
  botToken: '',
59
59
  apiKey: '',
@@ -43,12 +43,10 @@
43
43
  },
44
44
  {
45
45
  id: 'image-gen',
46
- name: 'Image Generation',
46
+ name: 'Tạo ảnh Infographic',
47
47
  icon: '🎨',
48
- descVi: 'Tạo ảnh bằng AI (DALL·E, Flux, Midjourney...)', descEn: 'Generate images via AI (DALL-E, Flux, Midjourney...)',
48
+ descVi: 'Tạo ảnh infographic, poster tự động qua 9Router', descEn: 'Generate infographic & poster images via 9Router',
49
49
  slug: 'image-gen',
50
- noteVi: 'Dùng chung OPENAI_API_KEY (DALL-E) hoặc thêm FLUX_API_KEY', noteEn: 'Uses OPENAI_API_KEY (DALL-E) or FLUX_API_KEY',
51
- envVars: ['# FLUX_API_KEY=<your_flux_key> # chỉ cần nếu dùng Flux'],
52
50
  },
53
51
  {
54
52
  id: 'code-interpreter',
@@ -140,18 +140,24 @@
140
140
  }
141
141
 
142
142
  // ── bindings (multi-bot or Zalo) ─────────────────────────────────────────
143
- if (isMultiBot && channelKey === 'telegram') {
143
+ if (agentMetas.length > 0 && isMultiBot && channelKey === 'telegram') {
144
144
  cfg.bindings = agentMetas.map((meta) => ({
145
145
  agentId: meta.agentId,
146
146
  match: { channel: 'telegram', accountId: meta.accountId || 'default' },
147
147
  }));
148
+ } else {
149
+ cfg.bindings = [];
148
150
  }
149
151
 
150
152
  // ── channels ─────────────────────────────────────────────────────────────
151
- cfg.channels = buildChannelConfig({
152
- channelKey, isMultiBot, groupId, agentMetas, botName: agentMetas[0]?.name || 'Bot',
153
- agentId: agentMetas[0]?.agentId || 'bot',
154
- });
153
+ if (agentMetas.length > 0) {
154
+ cfg.channels = buildChannelConfig({
155
+ channelKey, isMultiBot, groupId, agentMetas, botName: agentMetas[0]?.name || 'Bot',
156
+ agentId: agentMetas[0]?.agentId || 'bot',
157
+ });
158
+ } else {
159
+ cfg.channels = {};
160
+ }
155
161
 
156
162
  // ── tools ────────────────────────────────────────────────────────────────
157
163
  cfg.tools = { profile: 'full', exec: { host: 'gateway', security: 'full', ask: 'off' } };
@@ -179,16 +185,7 @@
179
185
  auth: { mode: 'token', token: generateToken() },
180
186
  };
181
187
 
182
- // ── browser ──────────────────────────────────────────────────────────────
183
- if (hasBrowserDesktop) {
184
- cfg.browser = {
185
- enabled: true,
186
- defaultProfile: 'host-chrome',
187
- profiles: { 'host-chrome': { cdpUrl: 'http://127.0.0.1:9222', color: '#4285F4' } },
188
- };
189
- } else if (hasBrowserServer) {
190
- cfg.browser = { enabled: true };
191
- }
188
+ // ── browser (delegated to browser-automation plugin) ────────────────────
192
189
 
193
190
  // ── skills ───────────────────────────────────────────────────────────────
194
191
  const skillEntries = buildSkillsEntries(skills, selectedSkills);
@@ -206,7 +203,7 @@
206
203
  cfg.plugins = pluginsConfig.plugins;
207
204
 
208
205
  // ── bindings for zalouser ────────────────────────────────────────────────
209
- if (isZaloPersonal(channelKey)) {
206
+ if (agentMetas.length > 0 && isZaloPersonal(channelKey)) {
210
207
  cfg.bindings = cfg.bindings || [];
211
208
  const firstAgentId = agentMetas[0]?.agentId || 'bot';
212
209
  if (!cfg.bindings.some(b => b.match && b.match.channel === 'zalouser')) {
@@ -317,6 +314,14 @@
317
314
  allow.push('zalouser');
318
315
  }
319
316
 
317
+ // DuckDuckGo search plugin for web-search
318
+ if (selectedSkills.includes('web-search') || selectedSkills.includes('web_search')) {
319
+ entries['duckduckgo'] = { enabled: true };
320
+ if (!allow.includes('duckduckgo')) {
321
+ allow.push('duckduckgo');
322
+ }
323
+ }
324
+
320
325
  const plugins = { entries };
321
326
  plugins.allow = allow;
322
327