@art_style666/hi-light 1.0.0 → 1.0.1
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 +19 -31
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# HiLight 安装说明
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OpenClaw 安装:<https://github.com/openclaw/openclaw#install-recommended>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
插件安装:https://my.feishu.cn/wiki/CO5Vw6cG9iZUpckIvJoc279VnFc
|
|
5
|
+
npm 包地址:<https://www.npmjs.com/package/@art_style666/hi-light>
|
|
8
6
|
|
|
9
7
|
## 安装前准备
|
|
10
8
|
|
|
11
9
|
先确认电脑里有这两个工具:
|
|
12
10
|
|
|
13
|
-
- `Node.js`(建议
|
|
11
|
+
- `Node.js`(建议 22 或更高)
|
|
14
12
|
- `OpenClaw`
|
|
15
13
|
|
|
16
14
|
在终端里输入下面两行,能看到版本号就说明已经装好:
|
|
@@ -20,33 +18,26 @@ node -v
|
|
|
20
18
|
openclaw --version
|
|
21
19
|
```
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## 安装方式
|
|
24
22
|
|
|
25
|
-
### 1.
|
|
23
|
+
### 1. npm 安装(推荐)
|
|
26
24
|
|
|
27
25
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
npm i @art_style666/hi-light
|
|
27
|
+
openclaw plugins install @art_style666/hi-light
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### 2. 安装依赖并打包
|
|
30
|
+
### 2. 源码安装(开发调试)
|
|
35
31
|
|
|
36
32
|
```bash
|
|
33
|
+
git clone git@github.com:Gongcong/hi-light-plugin.git
|
|
34
|
+
cd hi-light-plugin
|
|
37
35
|
npm install
|
|
38
36
|
npm run build
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 3. 用本地源码安装到 OpenClaw
|
|
42
|
-
|
|
43
|
-
把下面命令里的路径改成你电脑上的插件目录绝对路径:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
37
|
openclaw plugins install --link /绝对路径/hi-light-plugin
|
|
47
38
|
```
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
## 通用配置(两种安装方式都一样)
|
|
50
41
|
|
|
51
42
|
编辑文件:`~/.openclaw/openclaw.json`
|
|
52
43
|
|
|
@@ -54,23 +45,20 @@ openclaw plugins install --link /绝对路径/hi-light-plugin
|
|
|
54
45
|
|
|
55
46
|
```json
|
|
56
47
|
"channels": {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
"hi-light": {
|
|
49
|
+
"enabled": true,
|
|
50
|
+
"wsUrl": "wss://open.guangfan.com/open-apis/device-agent/v1/websocket",
|
|
51
|
+
"authToken": "你的API KEY"
|
|
52
|
+
}
|
|
62
53
|
}
|
|
63
54
|
```
|
|
64
55
|
|
|
65
56
|
API KEY 获取方式:
|
|
66
|
-
|
|
67
|
-
各大应用商店,下载 HiLight APP,点击设置 -> 帐号管理 -> 获取 API KEY
|
|
68
|
-
|
|
57
|
+
各大应用商店下载 HiLight App,点击设置 -> 帐号管理 -> 获取 API KEY。
|
|
69
58
|
|
|
70
59
|
<img src="https://github.com/user-attachments/assets/6b55651c-ac08-432f-948b-3f82902839c4" alt="API KEY 获取示意图" width="420" />
|
|
71
60
|
|
|
72
|
-
|
|
73
|
-
### 5. 重启网关让配置生效
|
|
61
|
+
## 让配置生效
|
|
74
62
|
|
|
75
63
|
```bash
|
|
76
64
|
openclaw gateway restart
|
|
@@ -78,5 +66,5 @@ openclaw gateway restart
|
|
|
78
66
|
|
|
79
67
|
## 安装完成怎么检查
|
|
80
68
|
|
|
81
|
-
重启后如果没有报错,基本就安装成功了。
|
|
69
|
+
重启后如果没有报错,基本就安装成功了。
|
|
82
70
|
如果想更稳妥,可以看网关日志里是否出现 `hi-light` 连接成功的信息。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@art_style666/hi-light",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "HiLight WebSocket bridge channel plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "esbuild index.ts --bundle --format=esm --platform=node --target=node18 --packages=external --outfile=dist/index.js",
|
|
17
|
+
"test": "vitest run",
|
|
17
18
|
"prepublishOnly": "npm run build"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
"zod": "^3.23.8"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"esbuild": "^0.25.0"
|
|
25
|
+
"esbuild": "^0.25.0",
|
|
26
|
+
"vitest": "^4.0.18"
|
|
25
27
|
},
|
|
26
28
|
"openclaw": {
|
|
27
29
|
"extensions": [
|