create-openclaw-bot 4.1.1 → 4.1.4
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/CHANGELOG.md +28 -1
- package/CHANGELOG.vi.md +28 -1
- package/README.md +2 -2
- package/README.vi.md +2 -2
- package/cli.js +275 -58
- package/package.json +29 -28
- package/setup.js +47 -10
- package/tele_docs.md +0 -0
- package/tele_docs_utf8.md +987 -0
- package/zalo_doc_tmp.md +0 -0
- package/zalo_docs.md +0 -0
- package/zalo_docs_utf8.md +243 -0
package/package.json
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-openclaw-bot",
|
|
3
|
-
"version": "4.1.
|
|
4
|
-
"description": "Interactive CLI installer for OpenClaw Bot",
|
|
5
|
-
"main": "cli.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"create-openclaw-bot": "./cli.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "create-openclaw-bot",
|
|
3
|
+
"version": "4.1.4",
|
|
4
|
+
"description": "Interactive CLI installer for OpenClaw Bot",
|
|
5
|
+
"main": "cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-openclaw-bot": "./cli.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"bump": "node bump-version.mjs"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"openclaw",
|
|
15
|
+
"cli",
|
|
16
|
+
"bot",
|
|
17
|
+
"zalo",
|
|
18
|
+
"telegram",
|
|
19
|
+
"ai"
|
|
20
|
+
],
|
|
21
|
+
"author": "tuanminhhole",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@inquirer/prompts": "^4.3.1",
|
|
25
|
+
"chalk": "^5.3.0",
|
|
26
|
+
"fs-extra": "^11.2.0"
|
|
27
|
+
},
|
|
28
|
+
"type": "module"
|
|
29
|
+
}
|
package/setup.js
CHANGED
|
@@ -1020,7 +1020,7 @@ Write-Host "Chrome se tu dong bat Debug Mode moi khi ban dang nhap Windows (dela
|
|
|
1020
1020
|
},
|
|
1021
1021
|
commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' },
|
|
1022
1022
|
channels: ch.channelConfig,
|
|
1023
|
-
tools: { profile: 'full' },
|
|
1023
|
+
tools: { profile: 'full', exec: { host: 'gateway', security: 'full', ask: 'off' } },
|
|
1024
1024
|
gateway: {
|
|
1025
1025
|
port: 18791,
|
|
1026
1026
|
mode: 'local',
|
|
@@ -1091,6 +1091,21 @@ Write-Host "Chrome se tu dong bat Debug Mode moi khi ban dang nhap Windows (dela
|
|
|
1091
1091
|
|
|
1092
1092
|
setOutput('out-openclaw-json', JSON.stringify(clawConfig, null, 2));
|
|
1093
1093
|
|
|
1094
|
+
// exec-approvals.json — 2-layer fix for OpenClaw exec approval gate
|
|
1095
|
+
const execApprovalsConfig = {
|
|
1096
|
+
version: 1,
|
|
1097
|
+
defaults: {
|
|
1098
|
+
security: 'full',
|
|
1099
|
+
ask: 'off',
|
|
1100
|
+
askFallback: 'full'
|
|
1101
|
+
},
|
|
1102
|
+
agents: {
|
|
1103
|
+
main: { security: 'full', ask: 'off', askFallback: 'full', autoAllowSkills: true },
|
|
1104
|
+
[agentId]: { security: 'full', ask: 'off', askFallback: 'full', autoAllowSkills: true }
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
setOutput('out-exec-approvals-json', JSON.stringify(execApprovalsConfig, null, 2));
|
|
1108
|
+
|
|
1094
1109
|
// 2. Agent YAML (no system_prompt — OpenClaw reads from workspace/*.md files)
|
|
1095
1110
|
const agentYaml = `name: ${agentId}
|
|
1096
1111
|
description: "${state.config.description}"
|
|
@@ -1125,7 +1140,15 @@ model:
|
|
|
1125
1140
|
// Browser Automation: extra Docker deps
|
|
1126
1141
|
const browserAptExtra = hasBrowser ? ' socat' : '';
|
|
1127
1142
|
const browserInstallLines = hasBrowser
|
|
1128
|
-
?
|
|
1143
|
+
? [
|
|
1144
|
+
'',
|
|
1145
|
+
'# Browser Automation: Playwright engine (needed for native CDP)',
|
|
1146
|
+
'RUN npm install -g agent-browser playwright \\',
|
|
1147
|
+
' && npx playwright install chromium --with-deps \\',
|
|
1148
|
+
' && ln -f -s /root/.cache/ms-playwright/chromium-*/chrome-linux*/chrome /usr/bin/google-chrome',
|
|
1149
|
+
'',
|
|
1150
|
+
''
|
|
1151
|
+
].join('\n')
|
|
1129
1152
|
: '';
|
|
1130
1153
|
|
|
1131
1154
|
// Plugins install at runtime (avoids ClawHub rate limit during build)
|
|
@@ -1137,17 +1160,18 @@ model:
|
|
|
1137
1160
|
? 'socat TCP-LISTEN:9222,fork,reuseaddr TCP:host.docker.internal:9222 & '
|
|
1138
1161
|
: '';
|
|
1139
1162
|
// Patch config on every startup to survive openclaw onboard overwrites
|
|
1140
|
-
const patchCmd = `node -e \\"const fs=require('fs'),p='/root/.openclaw/openclaw.json';if(fs.existsSync(p)){const c=JSON.parse(fs.readFileSync(p,'utf8'));c.tools=Object.assign({},c.tools,{profile:'full'});c.gateway=Object.assign({},c.gateway,{port:18791,bind:'0.0.0.0'});fs.writeFileSync(p,JSON.stringify(c,null,2));}\\" && `;
|
|
1163
|
+
const patchCmd = `node -e \\"const fs=require('fs'),p='/root/.openclaw/openclaw.json';if(fs.existsSync(p)){const c=JSON.parse(fs.readFileSync(p,'utf8'));c.tools=Object.assign({},c.tools,{profile:'full',exec:{host:'gateway',security:'full',ask:'off'}});c.gateway=Object.assign({},c.gateway,{port:18791,bind:'custom',customBindHost:'0.0.0.0'});fs.writeFileSync(p,JSON.stringify(c,null,2));}\\" && `;
|
|
1141
1164
|
// Auto-approve device pairing after gateway starts (required since v2026.3.x)
|
|
1142
|
-
const autoApproveCmd = '(sleep 5
|
|
1165
|
+
const autoApproveCmd = '(while true; do sleep 5; openclaw devices approve --latest 2>/dev/null || true; done) & ';
|
|
1143
1166
|
const finalCmd = `CMD sh -c "${pluginInstallCmd}${patchCmd}${browserPrefix}${autoApproveCmd}${gatewayCmd}"`;
|
|
1144
1167
|
|
|
1145
1168
|
const dockerfile = `FROM node:22-slim
|
|
1146
1169
|
|
|
1147
1170
|
RUN apt-get update && apt-get install -y git curl${browserAptExtra} && rm -rf /var/lib/apt/lists/*
|
|
1148
1171
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1172
|
+
|
|
1173
|
+
ARG CACHEBUST=${Date.now()}
|
|
1174
|
+
RUN npm install -g openclaw@latest${skillLines}${browserInstallLines}
|
|
1151
1175
|
WORKDIR /root/.openclaw
|
|
1152
1176
|
|
|
1153
1177
|
EXPOSE 18791
|
|
@@ -1202,7 +1226,8 @@ setInterval(sync, INTERVAL);`;
|
|
|
1202
1226
|
|
|
1203
1227
|
let compose;
|
|
1204
1228
|
if (is9Router) {
|
|
1205
|
-
compose = `
|
|
1229
|
+
compose = `name: oc-bot
|
|
1230
|
+
services:
|
|
1206
1231
|
ai-bot:
|
|
1207
1232
|
build: .
|
|
1208
1233
|
container_name: openclaw-bot
|
|
@@ -1215,7 +1240,7 @@ ${extraHostsBlock}
|
|
|
1215
1240
|
volumes:
|
|
1216
1241
|
- ../../.openclaw:/root/.openclaw
|
|
1217
1242
|
ports:
|
|
1218
|
-
- "
|
|
1243
|
+
- "18791:18791"
|
|
1219
1244
|
|
|
1220
1245
|
9router:
|
|
1221
1246
|
image: node:22-slim
|
|
@@ -1243,7 +1268,8 @@ ${extraHostsBlock}
|
|
|
1243
1268
|
volumes:
|
|
1244
1269
|
9router-data:`;
|
|
1245
1270
|
} else {
|
|
1246
|
-
compose = `
|
|
1271
|
+
compose = `name: oc-bot
|
|
1272
|
+
services:
|
|
1247
1273
|
ai-bot:
|
|
1248
1274
|
build: .
|
|
1249
1275
|
container_name: openclaw-bot
|
|
@@ -1254,7 +1280,7 @@ ${extraHostsBlock}
|
|
|
1254
1280
|
volumes:
|
|
1255
1281
|
- ../../.openclaw:/root/.openclaw
|
|
1256
1282
|
ports:
|
|
1257
|
-
- "
|
|
1283
|
+
- "18791:18791"`;
|
|
1258
1284
|
}
|
|
1259
1285
|
|
|
1260
1286
|
setOutput('out-compose', compose);
|
|
@@ -1531,6 +1557,11 @@ ${selectedSkillNames.length > 0 ? selectedSkillNames.join('\n') : '- _(Chưa có
|
|
|
1531
1557
|
- Browser: chỉ mở trang khi user yêu cầu cụ thể
|
|
1532
1558
|
- Memory: tự ghi nhớ thông tin quan trọng, không cần user nhắc
|
|
1533
1559
|
|
|
1560
|
+
## ⏰ Cron / Lên lịch nhắc nhở
|
|
1561
|
+
- OpenClaw CÓ hỗ trợ tool hệ thống để chạy Cron Job.
|
|
1562
|
+
- Khi user yêu cầu tạo nhắc nhở / lệnh tự động định kỳ, bạn hãy TỰ ĐỘNG dùng tool hệ thống để tạo. **Tuyệt đối không** bắt user dùng crontab hay Task Scheduler chạy tay trên host.
|
|
1563
|
+
- Ghi chú lỗi: Không điền "current" vào thư mục Session khi thao tác tool. Bỏ qua việc tra cứu file docs nội bộ ('cron-jobs.mdx') — hãy tin tưởng khả năng sử dụng tool của bạn.
|
|
1564
|
+
|
|
1534
1565
|
---
|
|
1535
1566
|
|
|
1536
1567
|
_Thêm ghi chú về cách dùng tool cụ thể tại đây._
|
|
@@ -1551,6 +1582,11 @@ ${selectedSkillNames.length > 0 ? selectedSkillNames.join('\n') : '- _(No skills
|
|
|
1551
1582
|
- Browser: only open pages when user specifically requests
|
|
1552
1583
|
- Memory: proactively remember important info without user prompting
|
|
1553
1584
|
|
|
1585
|
+
## ⏰ Cron / Scheduled Tasks
|
|
1586
|
+
- OpenClaw natively supports system tools for Cron Jobs.
|
|
1587
|
+
- When the user asks to schedule tasks or reminders, use your built-in tools to create them automatically. Do NOT ask the user to run manual crontab tasks on their host.
|
|
1588
|
+
- Error "sessionKey: current": Do NOT use "current" as a sessionKey for session tools. Ignore old internal docs ('cron-jobs.mdx') and rely on your native tool skills.
|
|
1589
|
+
|
|
1554
1590
|
---
|
|
1555
1591
|
|
|
1556
1592
|
_Add notes about specific tool usage here._
|
|
@@ -1743,6 +1779,7 @@ fi
|
|
|
1743
1779
|
// Store generated files for download
|
|
1744
1780
|
state._generatedFiles = {
|
|
1745
1781
|
'.openclaw/openclaw.json': JSON.stringify(clawConfig, null, 2),
|
|
1782
|
+
'.openclaw/exec-approvals.json': JSON.stringify(execApprovalsConfig, null, 2),
|
|
1746
1783
|
'.openclaw/auth-profiles.json': authProfilesStr,
|
|
1747
1784
|
[`.openclaw/agents/${agentId}.yaml`]: agentYaml,
|
|
1748
1785
|
[`.openclaw/agents/${agentId}/agent/auth-profiles.json`]: authProfilesStr,
|
package/tele_docs.md
ADDED
|
Binary file
|