openclaw-xiaoyou 1.0.1 → 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/docs/{Xiaoyou-SKILL.md → SKILL.md} +9 -10
- package/docs/install-xiaoyou.sh +9 -5
- package/docs/user-comand.md +16 -0
- package/openclaw.plugin.json +53 -0
- package/package.json +16 -1
|
@@ -8,7 +8,7 @@ description: Use when users want to install, upgrade, uninstall, configure, or t
|
|
|
8
8
|
小优 channel 安装、升级、卸载统一使用远程脚本:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
https://
|
|
11
|
+
https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
不要把 OpenClaw 的底层安装命令拆散执行。除非远程脚本失败且需要排障,否则直接调用 `install-xiaoyou.sh`。
|
|
@@ -28,14 +28,14 @@ https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
28
28
|
优先直接通过 `curl | bash` 执行远程脚本:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
curl -fsSL https://
|
|
31
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- --ws-url ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw --token <AccessToken>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### 参数说明
|
|
35
35
|
|
|
36
36
|
| 参数 | 必填 | 说明 |
|
|
37
37
|
|------|------|------|
|
|
38
|
-
| `--ws-url <url>` | ✅ 首次安装 | 企业 WebSocket
|
|
38
|
+
| `--ws-url <url>` | ✅ 首次安装 | 企业 WebSocket 服务地址,默认 `ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw` |
|
|
39
39
|
| `--token <token>` | ✅ 首次安装 | 企业服务认证 Token |
|
|
40
40
|
| `--version <ver>` | 否 | 指定 openclaw-xiaoyou 版本,默认 latest |
|
|
41
41
|
| `--check-only` | 否 | 只输出计划,不执行真实改动 |
|
|
@@ -46,7 +46,7 @@ curl -fsSL https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
46
46
|
用户必须提供 `--ws-url` 和 `--token`:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
curl -fsSL https://
|
|
49
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- --ws-url ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw --token my-enterprise-token
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### 升级
|
|
@@ -54,7 +54,7 @@ curl -fsSL https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
54
54
|
已安装后的升级可以不传参数,脚本会复用现有配置:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
curl -fsSL https://
|
|
57
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s --
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
如果升级时传入 `--ws-url` 或 `--token`,会覆盖现有配置。
|
|
@@ -62,13 +62,13 @@ curl -fsSL https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
62
62
|
### 指定版本
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
curl -fsSL https://
|
|
65
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- --version 1.0.2 --ws-url ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw --token my-token
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## 卸载
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
curl -fsSL https://
|
|
71
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- uninstall
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
卸载会删除 xiaoyou channel 配置、插件记录和扩展目录。
|
|
@@ -76,8 +76,8 @@ curl -fsSL https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
76
76
|
## 预检
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
curl -fsSL https://
|
|
80
|
-
curl -fsSL https://
|
|
79
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- --check-only
|
|
80
|
+
curl -fsSL https://d10.tfdl.net/public/2026-05-06/e466d49d-4c5c-4fca-88dd-d69a38aec3ba/install-xiaoyou.sh | bash -s -- uninstall --check-only
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
## 失败处理
|
|
@@ -86,7 +86,6 @@ curl -fsSL https://aitest.haiersmarthomes.com/aiservice/claw/install-xiaoyou.sh
|
|
|
86
86
|
|
|
87
87
|
| 日志现象 | 处理 |
|
|
88
88
|
|----------|------|
|
|
89
|
-
| 缺少 `--ws-url` | 要求用户提供企业 WebSocket 服务地址 |
|
|
90
89
|
| 缺少 `--token` | 要求用户提供企业服务认证 Token |
|
|
91
90
|
| 未检测到 OpenClaw | 提示用户先安装并启动 OpenClaw |
|
|
92
91
|
| npm latest 查询失败 | 可让脚本继续幂等安装,或指定 `--version` |
|
package/docs/install-xiaoyou.sh
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
# install-xiayou.sh — OpenClaw xiaoyou channel 一键安装/升级/卸载脚本
|
|
3
3
|
#
|
|
4
4
|
# 用法:
|
|
5
|
+
# install-xiayou.sh --token <token>
|
|
5
6
|
# install-xiayou.sh --ws-url <url> --token <token>
|
|
6
|
-
# install-xiayou.sh --version <ver> --
|
|
7
|
+
# install-xiayou.sh --version <ver> --token <token>
|
|
7
8
|
# install-xiayou.sh uninstall
|
|
8
9
|
# install-xiayou.sh --check-only
|
|
9
10
|
|
|
@@ -18,6 +19,7 @@ fi
|
|
|
18
19
|
set -Eeuo pipefail
|
|
19
20
|
|
|
20
21
|
SCRIPT_NAME="$(basename "$0")"
|
|
22
|
+
DEFAULT_WS_URL="ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw"
|
|
21
23
|
WS_URL=""
|
|
22
24
|
TOKEN=""
|
|
23
25
|
CHECK_ONLY=0
|
|
@@ -89,13 +91,14 @@ capture_timeout_or_empty() {
|
|
|
89
91
|
usage() {
|
|
90
92
|
cat <<'USAGE'
|
|
91
93
|
Usage:
|
|
94
|
+
install-xiayou.sh --token <token>
|
|
92
95
|
install-xiayou.sh --ws-url <url> --token <token>
|
|
93
|
-
install-xiayou.sh --version <ver> --
|
|
96
|
+
install-xiayou.sh --version <ver> --token <token>
|
|
94
97
|
install-xiayou.sh uninstall
|
|
95
98
|
install-xiayou.sh --check-only
|
|
96
99
|
|
|
97
100
|
Options:
|
|
98
|
-
--ws-url <url> 企业 WebSocket 服务地址 (
|
|
101
|
+
--ws-url <url> 企业 WebSocket 服务地址 (默认 ws://aiws-sim.haiersmarthomes.com:11055/xiaoyou/claw)
|
|
99
102
|
--token <token> 企业服务认证 Token
|
|
100
103
|
--version <ver> 指定 openclaw-xiaoyou 版本 (默认 latest)
|
|
101
104
|
--check-only 只输出计划,不执行
|
|
@@ -263,10 +266,11 @@ install_or_upgrade() {
|
|
|
263
266
|
fi
|
|
264
267
|
fi
|
|
265
268
|
|
|
266
|
-
#
|
|
269
|
+
# 首次安装:ws-url 未提供时使用默认值
|
|
267
270
|
if [[ -z "$current" && "$CHECK_ONLY" -eq 0 ]]; then
|
|
268
271
|
if [[ -z "$WS_URL" ]]; then
|
|
269
|
-
|
|
272
|
+
WS_URL="$DEFAULT_WS_URL"
|
|
273
|
+
log "未指定 --ws-url,使用默认地址: $WS_URL"
|
|
270
274
|
fi
|
|
271
275
|
if [[ -z "$TOKEN" ]]; then
|
|
272
276
|
die "首次安装必须提供 --token。请运行: $SCRIPT_NAME --ws-url <url> --token <token>"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
/aiysnfs/nginx/ssl/aiservice/html/
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
https://aitest.haiersmarthomes.com:11001/skills/upload/emotion/robot_emotion_v1.0.tar.gz
|
|
6
|
+
|
|
7
|
+
验收环境位置:
|
|
8
|
+
/aiysnfs/nginx/share/skills/upload/claw
|
|
9
|
+
仿真环境位置:
|
|
10
|
+
/ai-sim/export/nginx/share/skills/upload/claw
|
|
11
|
+
生产环境位置:
|
|
12
|
+
/ai-prod/export/nginx/share/skills/upload/claw
|
|
13
|
+
|
|
14
|
+
/aiysnfs/nginx/ssl/aiservice/html/
|
|
15
|
+
|
|
16
|
+
按照 https://aitest.haiersmarthomes.com/aiservice/html/claw/SKILL.md 文档完成小优channel配置,AccessToken为xiaoyou-025b07e43ae84cd6
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,6 +3,59 @@
|
|
|
3
3
|
"name": "Xiaoyou",
|
|
4
4
|
"description": "Bridge OpenClaw to enterprise services via persistent WebSocket connection",
|
|
5
5
|
"version": "1.0.0",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["wsUrl", "authToken"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"enabled": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"default": false,
|
|
13
|
+
"description": "启用/禁用此 channel"
|
|
14
|
+
},
|
|
15
|
+
"wsUrl": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "企业 WebSocket 服务地址",
|
|
18
|
+
"examples": ["wss://im.corp.example.com/ws", "ws://192.168.1.100:9090"]
|
|
19
|
+
},
|
|
20
|
+
"authToken": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"sensitive": true,
|
|
23
|
+
"description": "连接企业服务的认证 Token"
|
|
24
|
+
},
|
|
25
|
+
"dmSecurity": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["open", "allowlist"],
|
|
28
|
+
"default": "open",
|
|
29
|
+
"description": "DM 安全策略。open=允许所有用户,allowlist=仅白名单用户"
|
|
30
|
+
},
|
|
31
|
+
"allowFrom": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "string" },
|
|
34
|
+
"default": [],
|
|
35
|
+
"description": "白名单用户 ID 列表(dmSecurity=allowlist 时生效)"
|
|
36
|
+
},
|
|
37
|
+
"reconnectIntervalMs": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"default": 3000,
|
|
40
|
+
"description": "重连基础间隔(毫秒),实际按指数退避递增"
|
|
41
|
+
},
|
|
42
|
+
"maxReconnectAttempts": {
|
|
43
|
+
"type": "number",
|
|
44
|
+
"default": 0,
|
|
45
|
+
"description": "最大重连次数,0=无限重试"
|
|
46
|
+
},
|
|
47
|
+
"heartbeatIntervalMs": {
|
|
48
|
+
"type": "number",
|
|
49
|
+
"default": 30000,
|
|
50
|
+
"description": "心跳发送间隔(毫秒)"
|
|
51
|
+
},
|
|
52
|
+
"heartbeatTimeoutMs": {
|
|
53
|
+
"type": "number",
|
|
54
|
+
"default": 10000,
|
|
55
|
+
"description": "心跳超时时间(毫秒),超时则断开重连"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
6
59
|
"channel": {
|
|
7
60
|
"id": "xiaoyou",
|
|
8
61
|
"configSchema": {
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-xiaoyou",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Xiaoyou channel plugin for OpenClaw — connects enterprise services via persistent outbound WebSocket",
|
|
6
6
|
"openclaw": {
|
|
7
7
|
"extensions": ["./index.ts"],
|
|
8
8
|
"setupEntry": "./setup-entry.ts",
|
|
9
|
+
"configSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["wsUrl", "authToken"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"enabled": { "type": "boolean", "default": false },
|
|
14
|
+
"wsUrl": { "type": "string", "description": "企业 WebSocket 服务地址" },
|
|
15
|
+
"authToken": { "type": "string", "sensitive": true, "description": "连接企业服务的认证 Token" },
|
|
16
|
+
"dmSecurity": { "type": "string", "enum": ["open", "allowlist"], "default": "open" },
|
|
17
|
+
"allowFrom": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
18
|
+
"reconnectIntervalMs": { "type": "number", "default": 3000 },
|
|
19
|
+
"maxReconnectAttempts": { "type": "number", "default": 0 },
|
|
20
|
+
"heartbeatIntervalMs": { "type": "number", "default": 30000 },
|
|
21
|
+
"heartbeatTimeoutMs": { "type": "number", "default": 10000 }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
9
24
|
"channel": {
|
|
10
25
|
"id": "xiaoyou",
|
|
11
26
|
"label": "Xiaoyou",
|