@feihan-im/openclaw-plugin 0.1.0 → 0.1.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.en.md +6 -4
- package/README.md +6 -4
- package/openclaw.plugin.json +60 -0
- package/package.json +3 -2
- package/src/config.test.ts +5 -5
- package/src/messaging/inbound.test.ts +1 -1
package/README.en.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
[中文](./README.md) | English
|
|
10
10
|
|
|
11
|
-
Feihan
|
|
11
|
+
Feihan is a secure, self-hosted productivity platform for teams, integrating instant messaging, organizational structures, video conferencing, and file storage.
|
|
12
|
+
|
|
13
|
+
Feihan IM channel plugin for OpenClaw. Connects a Feihan bot to OpenClaw's AI agent pipeline so you can chat with your agent through Feihan. See the [Setup Tutorial](https://feihanim.cn/docs/admin/bots/openclaw) for how to connect Feihan to OpenClaw.
|
|
12
14
|
|
|
13
15
|
## Features
|
|
14
16
|
|
|
@@ -50,7 +52,7 @@ Or manually edit `~/.openclaw/openclaw.json`:
|
|
|
50
52
|
"feihan": {
|
|
51
53
|
"appId": "your_app_id",
|
|
52
54
|
"appSecret": "your_app_secret",
|
|
53
|
-
"backendUrl": "
|
|
55
|
+
"backendUrl": "https://your-backend-url.com"
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -70,13 +72,13 @@ openclaw gateway restart
|
|
|
70
72
|
"feihan": {
|
|
71
73
|
"appId": "111111",
|
|
72
74
|
"appSecret": "secret-1",
|
|
73
|
-
"backendUrl": "
|
|
75
|
+
"backendUrl": "https://your-backend-url.com",
|
|
74
76
|
"accounts": {
|
|
75
77
|
"bot2": {
|
|
76
78
|
"enabled": true,
|
|
77
79
|
"appId": "222222",
|
|
78
80
|
"appSecret": "secret-2",
|
|
79
|
-
"backendUrl": "
|
|
81
|
+
"backendUrl": "https://your-backend-url.com"
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
}
|
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
中文 | [English](./README.en.md)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
飞函,是安全稳定的私有化一站式办公平台,功能包括即时通讯、组织架构、音视频会议、网盘等。
|
|
12
|
+
|
|
13
|
+
飞函 IM 频道插件,用于 OpenClaw。将飞函机器人接入 OpenClaw 的 AI Agent 管线,通过飞函与 Agent 对话。请参阅[配置教程](https://feihanim.cn/docs/admin/bots/openclaw)了解如何将飞函连接到 OpenClaw。
|
|
12
14
|
|
|
13
15
|
## 功能
|
|
14
16
|
|
|
@@ -50,7 +52,7 @@ openclaw channels add --channel feihan
|
|
|
50
52
|
"feihan": {
|
|
51
53
|
"appId": "your_app_id",
|
|
52
54
|
"appSecret": "your_app_secret",
|
|
53
|
-
"backendUrl": "
|
|
55
|
+
"backendUrl": "https://your-backend-url.com"
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -70,13 +72,13 @@ openclaw gateway restart
|
|
|
70
72
|
"feihan": {
|
|
71
73
|
"appId": "111111",
|
|
72
74
|
"appSecret": "secret-1",
|
|
73
|
-
"backendUrl": "
|
|
75
|
+
"backendUrl": "https://your-backend-url.com",
|
|
74
76
|
"accounts": {
|
|
75
77
|
"bot2": {
|
|
76
78
|
"enabled": true,
|
|
77
79
|
"appId": "222222",
|
|
78
80
|
"appSecret": "secret-2",
|
|
79
|
-
"backendUrl": "
|
|
81
|
+
"backendUrl": "https://your-backend-url.com"
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-feihan",
|
|
3
|
+
"name": "Feihan Channel",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"channels": ["feihan"],
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"appId": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Feihan application ID"
|
|
12
|
+
},
|
|
13
|
+
"appSecret": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Feihan application secret"
|
|
16
|
+
},
|
|
17
|
+
"backendUrl": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Feihan backend URL (e.g., https://your-backend-url.com)"
|
|
20
|
+
},
|
|
21
|
+
"enableEncryption": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Enable message encryption",
|
|
24
|
+
"default": true
|
|
25
|
+
},
|
|
26
|
+
"requestTimeout": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"description": "Request timeout in milliseconds",
|
|
29
|
+
"default": 30000
|
|
30
|
+
},
|
|
31
|
+
"requireMention": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Require @mention in group chats before responding",
|
|
34
|
+
"default": true
|
|
35
|
+
},
|
|
36
|
+
"accounts": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"description": "Multi-account configuration",
|
|
39
|
+
"additionalProperties": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"appId": { "type": "string" },
|
|
43
|
+
"appSecret": { "type": "string" },
|
|
44
|
+
"backendUrl": { "type": "string" },
|
|
45
|
+
"enableEncryption": { "type": "boolean" },
|
|
46
|
+
"requestTimeout": { "type": "number" },
|
|
47
|
+
"requireMention": { "type": "boolean" },
|
|
48
|
+
"enabled": { "type": "boolean", "default": true }
|
|
49
|
+
},
|
|
50
|
+
"required": ["appId", "appSecret", "backendUrl"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"uiHints": {
|
|
56
|
+
"appId": { "label": "App ID" },
|
|
57
|
+
"appSecret": { "label": "App Secret", "sensitive": true },
|
|
58
|
+
"backendUrl": { "label": "Backend URL", "placeholder": "https://your-backend-url.com" }
|
|
59
|
+
}
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feihan-im/openclaw-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "飞函 IM OpenClaw 频道插件",
|
|
5
5
|
"author": "上海飞函安全科技有限公司",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
-
"src"
|
|
25
|
+
"src",
|
|
26
|
+
"openclaw.plugin.json"
|
|
26
27
|
],
|
|
27
28
|
"openclaw": {
|
|
28
29
|
"extensions": [
|
package/src/config.test.ts
CHANGED
|
@@ -54,7 +54,7 @@ describe("resolveAccountConfig", () => {
|
|
|
54
54
|
feihan: {
|
|
55
55
|
appId: "app_1",
|
|
56
56
|
appSecret: "secret_1",
|
|
57
|
-
backendUrl: "https://
|
|
57
|
+
backendUrl: "https://your-backend-url.com",
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
};
|
|
@@ -64,7 +64,7 @@ describe("resolveAccountConfig", () => {
|
|
|
64
64
|
enabled: true,
|
|
65
65
|
appId: "app_1",
|
|
66
66
|
appSecret: "secret_1",
|
|
67
|
-
backendUrl: "https://
|
|
67
|
+
backendUrl: "https://your-backend-url.com",
|
|
68
68
|
enableEncryption: true,
|
|
69
69
|
requestTimeout: 30_000,
|
|
70
70
|
requireMention: true,
|
|
@@ -102,13 +102,13 @@ describe("resolveAccountConfig", () => {
|
|
|
102
102
|
|
|
103
103
|
process.env.FEIHAN_APP_ID = "env_app";
|
|
104
104
|
process.env.FEIHAN_APP_SECRET = "env_secret";
|
|
105
|
-
process.env.FEIHAN_BACKEND_URL = "
|
|
105
|
+
process.env.FEIHAN_BACKEND_URL = "https://your-backend-url.com";
|
|
106
106
|
|
|
107
107
|
try {
|
|
108
108
|
const account = resolveAccountConfig({});
|
|
109
109
|
expect(account.appId).toBe("env_app");
|
|
110
110
|
expect(account.appSecret).toBe("env_secret");
|
|
111
|
-
expect(account.backendUrl).toBe("
|
|
111
|
+
expect(account.backendUrl).toBe("https://your-backend-url.com");
|
|
112
112
|
} finally {
|
|
113
113
|
if (origId === undefined) delete process.env.FEIHAN_APP_ID;
|
|
114
114
|
else process.env.FEIHAN_APP_ID = origId;
|
|
@@ -213,7 +213,7 @@ describe("resolveAndValidateAccountConfig", () => {
|
|
|
213
213
|
feihan: {
|
|
214
214
|
appId: "app_1",
|
|
215
215
|
appSecret: "secret_1",
|
|
216
|
-
backendUrl: "https://
|
|
216
|
+
backendUrl: "https://your-backend-url.com",
|
|
217
217
|
},
|
|
218
218
|
},
|
|
219
219
|
};
|