codewave-openclaw-installer 1.0.0 → 1.0.2
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 +6 -6
- package/bin/install.mjs +12 -8
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 🦀 网易智企寄居蟹 Skill 包 — 一键安装器
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
一条命令完成网易智企寄居蟹智能客服的飞书部署。
|
|
4
4
|
|
|
5
5
|
## 功能
|
|
6
6
|
|
|
7
|
+
- 🤖 **寄居蟹智能客服 Skill 安装** — 自动将智能客服 Skill 部署到 `~/.openclaw/skills/`
|
|
7
8
|
- 🔗 **飞书机器人绑定** — 自动调用 `@larksuite/openclaw-lark` 安装飞书 OpenClaw 插件,扫码即可绑定机器人
|
|
8
|
-
- 🤖 **智能客服 Skill 安装** — 自动将 CodeWave 智能客服 Skill 部署到 `~/.openclaw/skills/`
|
|
9
9
|
|
|
10
10
|
## 使用方法
|
|
11
11
|
|
|
@@ -26,10 +26,10 @@ codewave-install
|
|
|
26
26
|
|
|
27
27
|
运行后会依次执行:
|
|
28
28
|
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
29
|
+
1. **安装寄居蟹智能客服 Skill** — 自动复制到 `~/.openclaw/skills/smart-customer-service/`
|
|
30
|
+
2. **安装飞书插件** — 弹出二维码,用飞书扫码绑定机器人
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
安装完成后,即可在飞书中与机器人对话,体验寄居蟹智能客服。
|
|
33
33
|
|
|
34
34
|
## 系统要求
|
|
35
35
|
|
package/bin/install.mjs
CHANGED
|
@@ -16,6 +16,10 @@ const yellow = (s) => `\x1b[33m${s}\x1b[0m`;
|
|
|
16
16
|
const red = (s) => `\x1b[31m${s}\x1b[0m`;
|
|
17
17
|
const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
|
|
18
18
|
|
|
19
|
+
// ─── 跨平台 npx 路径 ───
|
|
20
|
+
const isWin = process.platform === 'win32';
|
|
21
|
+
const NPX = isWin ? 'npx.cmd' : 'npx';
|
|
22
|
+
|
|
19
23
|
// ─── 等待子进程结束的 Promise 包装 ───
|
|
20
24
|
function runCommand(cmd, args) {
|
|
21
25
|
return new Promise((resolve) => {
|
|
@@ -30,17 +34,17 @@ function runCommand(cmd, args) {
|
|
|
30
34
|
|
|
31
35
|
// ─── 步骤 1: 欢迎信息 ───
|
|
32
36
|
console.log('');
|
|
33
|
-
console.log(bold('
|
|
37
|
+
console.log(bold('🦀 网易智企寄居蟹 Skill 包 — 一键安装器'));
|
|
34
38
|
console.log('');
|
|
35
39
|
console.log('将自动完成以下步骤:');
|
|
36
|
-
console.log(cyan(' 1.
|
|
40
|
+
console.log(cyan(' 1. 安装寄居蟹智能客服 Skill'));
|
|
37
41
|
console.log(cyan(' 2. 安装飞书 OpenClaw 插件并绑定机器人(二维码)'));
|
|
38
42
|
console.log('');
|
|
39
43
|
console.log('─'.repeat(50));
|
|
40
44
|
console.log('');
|
|
41
45
|
|
|
42
|
-
// ─── 步骤 2:
|
|
43
|
-
console.log(bold('📂 步骤 1/2:
|
|
46
|
+
// ─── 步骤 2: 安装 smart-customer-service Skill ───
|
|
47
|
+
console.log(bold('📂 步骤 1/2: 安装寄居蟹智能客服 Skill...'));
|
|
44
48
|
console.log('');
|
|
45
49
|
|
|
46
50
|
const skillName = 'smart-customer-service';
|
|
@@ -89,7 +93,7 @@ console.log('');
|
|
|
89
93
|
console.log(bold('📦 步骤 2/2: 安装飞书 OpenClaw 插件...'));
|
|
90
94
|
console.log('');
|
|
91
95
|
|
|
92
|
-
const exitCode = await runCommand(
|
|
96
|
+
const exitCode = await runCommand(NPX, ['-y', '@larksuite/openclaw-lark', 'install']);
|
|
93
97
|
const larkInstallSuccess = exitCode === 0;
|
|
94
98
|
|
|
95
99
|
if (larkInstallSuccess) {
|
|
@@ -104,10 +108,10 @@ if (larkInstallSuccess) {
|
|
|
104
108
|
console.log('');
|
|
105
109
|
console.log('─'.repeat(50));
|
|
106
110
|
console.log('');
|
|
107
|
-
console.log(bold(green('
|
|
111
|
+
console.log(bold(green('🦀 安装完成!')));
|
|
108
112
|
console.log('');
|
|
109
|
-
console.log(` -
|
|
110
|
-
console.log(` - 飞书插件:
|
|
113
|
+
console.log(` - 寄居蟹智能客服 Skill: ${skillInstallSuccess ? green('已安装到 ~/.openclaw/skills/smart-customer-service/') : red('安装失败')}`);
|
|
114
|
+
console.log(` - 飞书插件: ${larkInstallSuccess ? green('已安装') : yellow('跳过(请手动安装)')}`);
|
|
111
115
|
console.log('');
|
|
112
116
|
console.log(' 请在飞书中与机器人对话测试!');
|
|
113
117
|
console.log('');
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codewave-openclaw-installer",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "网易智企寄居蟹 Skill 包 — 一键安装器:飞书绑定 + 智能客服 Skill",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codewave-install": "bin/install.mjs"
|
|
7
7
|
},
|
|
8
|
-
"files": [
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"skills/"
|
|
11
|
+
],
|
|
9
12
|
"type": "module"
|
|
10
13
|
}
|