feishu-openclaw 0.3.0 → 0.4.0
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 +57 -44
- package/clawdbot.plugin.json +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,47 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/feishu-openclaw)
|
|
4
4
|
|
|
5
|
-
> **🆕 2025.1.31
|
|
5
|
+
> **🆕 2025.1.31**:v0.3.0 多版本兼容,支持 Clawdbot / OpenClaw
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
飞书 × AI 助手插件 — 无需服务器
|
|
8
|
+
Feishu × AI Assistant plugin — no server required
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 🤖 一键安装 / One-Click Install
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| **① Clawdbot 一键** | 告诉 Clawdbot:`帮我安装飞书插件` | 新手首选 | — |
|
|
17
|
-
| **② npm 插件** ⬅️ | `clawdbot plugins install feishu-openclaw` | 开发者 | [npm](https://www.npmjs.com/package/feishu-openclaw) |
|
|
18
|
-
| **③ 独立桥接** | `git clone` + 手动启动 | 生产/隔离 | [GitHub](https://github.com/AlexAnys/feishu-openclaw) |
|
|
14
|
+
**复制以下内容发给你的 Clawdbot:**
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
```
|
|
17
|
+
帮我安装飞书插件,参考这个页面:https://github.com/AlexAnys/openclaw-feishu
|
|
18
|
+
```
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| 配置方式 | `clawdbot config` | 环境变量 |
|
|
27
|
-
| 适合场景 | 日常使用 | 生产/隔离部署 |
|
|
20
|
+
Clawdbot 会自动:
|
|
21
|
+
1. 安装插件
|
|
22
|
+
2. 引导你配置 App ID / App Secret
|
|
23
|
+
3. 重启 Gateway
|
|
28
24
|
|
|
29
25
|
---
|
|
30
26
|
|
|
31
|
-
##
|
|
27
|
+
## ⚠️ 安装前必做 / Before Installing
|
|
32
28
|
|
|
33
|
-
###
|
|
29
|
+
### 创建飞书机器人(约 5 分钟)
|
|
34
30
|
|
|
35
|
-
1. [飞书开放平台](https://open.feishu.cn/app) →
|
|
36
|
-
2.
|
|
37
|
-
3. **权限配置**
|
|
31
|
+
1. [飞书开放平台](https://open.feishu.cn/app) → **创建企业自建应用**
|
|
32
|
+
2. 添加「**机器人**」能力
|
|
33
|
+
3. **权限配置** → 开启:
|
|
38
34
|
- `im:message`
|
|
39
35
|
- `im:message.group_at_msg`
|
|
40
36
|
- `im:message.p2p_msg`
|
|
41
|
-
4. **事件订阅** → `im.message.receive_v1` → ⚠️
|
|
42
|
-
5.
|
|
37
|
+
4. **事件订阅** → 添加 `im.message.receive_v1` → ⚠️ **必须选「长连接」**(不是 webhook)
|
|
38
|
+
5. **版本管理** → 创建版本 → 发布上线
|
|
43
39
|
6. 记下 **App ID** (`cli_xxx`) 和 **App Secret**
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 📦 安装方式 / Install Methods
|
|
44
|
+
|
|
45
|
+
| 方式 | 说明 | 链接 |
|
|
46
|
+
|------|------|------|
|
|
47
|
+
| **① 一键安装** | 复制上方内容给 Clawdbot | 本页 ⬆️ |
|
|
48
|
+
| **② npm 命令** | `clawdbot plugins install feishu-openclaw` | [npm](https://www.npmjs.com/package/feishu-openclaw) |
|
|
49
|
+
| **③ 独立桥接** | 独立进程,生产/隔离部署 | [feishu-openclaw](https://github.com/AlexAnys/feishu-openclaw) |
|
|
50
|
+
|
|
51
|
+
### 插件 vs 桥接
|
|
52
|
+
|
|
53
|
+
| | 插件 (①②) | 桥接 (③) |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| 进程 | 1 个(内置 Gateway) | 2 个(独立) |
|
|
56
|
+
| 崩溃 | 影响 Gateway | 互不影响 |
|
|
57
|
+
| 适合 | 日常使用 | 生产环境 |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 🔧 手动配置 / Manual Config
|
|
62
|
+
|
|
63
|
+
如果没用一键安装,手动配置:
|
|
46
64
|
|
|
47
65
|
```bash
|
|
48
66
|
clawdbot config set channels.feishu.enabled true --json
|
|
@@ -51,35 +69,31 @@ clawdbot config set channels.feishu.appSecret "你的AppSecret"
|
|
|
51
69
|
clawdbot gateway restart
|
|
52
70
|
```
|
|
53
71
|
|
|
54
|
-
### 3. 测试 / Test
|
|
55
|
-
|
|
56
|
-
去飞书私聊或群里 @机器人 🎉
|
|
57
|
-
|
|
58
72
|
---
|
|
59
73
|
|
|
60
|
-
##
|
|
74
|
+
## ❗ 常见问题 / Troubleshooting
|
|
61
75
|
|
|
62
|
-
### 收不到消息?
|
|
76
|
+
### 收不到消息?
|
|
63
77
|
|
|
64
|
-
| 检查项 |
|
|
65
|
-
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
78
|
+
| 检查项 | 说明 |
|
|
79
|
+
|--------|------|
|
|
80
|
+
| 应用已发布 | 不是草稿状态 |
|
|
81
|
+
| 用「长连接」 | **不是 webhook** |
|
|
82
|
+
| 权限已开启 | 三个 im 权限 |
|
|
69
83
|
|
|
70
84
|
### 报错 `not configured`?
|
|
71
85
|
|
|
72
|
-
**必须用 `appSecret
|
|
86
|
+
**必须用 `appSecret`,不支持 `appSecretPath`**:
|
|
73
87
|
|
|
74
88
|
```bash
|
|
75
89
|
# ✅ 正确
|
|
76
90
|
clawdbot config set channels.feishu.appSecret "你的secret"
|
|
77
91
|
|
|
78
|
-
# ❌ 错误
|
|
92
|
+
# ❌ 错误
|
|
79
93
|
clawdbot config set channels.feishu.appSecretPath "/path/to/file"
|
|
80
94
|
```
|
|
81
95
|
|
|
82
|
-
### 群聊不回复?
|
|
96
|
+
### 群聊不回复?
|
|
83
97
|
|
|
84
98
|
@机器人,或消息末尾加问号。
|
|
85
99
|
|
|
@@ -87,20 +101,19 @@ clawdbot config set channels.feishu.appSecretPath "/path/to/file"
|
|
|
87
101
|
|
|
88
102
|
## 特点 / Features
|
|
89
103
|
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
104
|
+
- ✅ 无需服务器 — WebSocket 长连接
|
|
105
|
+
- ✅ 私聊 + 群聊
|
|
106
|
+
- ✅ 图片文件收发
|
|
107
|
+
- ✅ 多账号支持
|
|
94
108
|
|
|
95
109
|
---
|
|
96
110
|
|
|
97
111
|
## 链接 / Links
|
|
98
112
|
|
|
99
113
|
- 📦 [npm: feishu-openclaw](https://www.npmjs.com/package/feishu-openclaw)
|
|
100
|
-
- 🔌 [GitHub: feishu
|
|
114
|
+
- 🔌 [GitHub: openclaw-feishu](https://github.com/AlexAnys/openclaw-feishu) (本项目)
|
|
101
115
|
- 🌉 [GitHub: feishu-openclaw](https://github.com/AlexAnys/feishu-openclaw) (桥接)
|
|
102
116
|
- 📖 [Clawdbot 文档](https://docs.clawd.bot)
|
|
103
|
-
- 🐛 [问题反馈](https://github.com/AlexAnys/feishu-openclaw/issues)
|
|
104
117
|
|
|
105
118
|
## License
|
|
106
119
|
|
package/clawdbot.plugin.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
|
|
7
7
|
import { feishuDock, feishuPlugin } from "./src/channel.js";
|
|
8
8
|
import { setFeishuRuntime } from "./src/runtime.js";
|
|
9
9
|
const plugin = {
|
|
10
|
-
id: "
|
|
10
|
+
id: "feishu-openclaw",
|
|
11
11
|
name: "Feishu",
|
|
12
12
|
description: "Feishu (Lark) channel plugin — WebSocket long-connection bot",
|
|
13
13
|
// This plugin registers a channel whose config lives under channels.feishu.*.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG;IACb,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG;IACb,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,8DAA8D;IAE3E,8EAA8E;IAC9E,yEAAyE;IACzE,YAAY,EAAE,uBAAuB,EAAE;IAEvC,QAAQ,CAAC,GAAsB;QAC7B,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC9B,GAAG,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAClE,CAAC;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "feishu-openclaw",
|
|
3
3
|
"name": "Feishu",
|
|
4
4
|
"description": "Feishu (飞书/Lark) channel plugin — WebSocket long-connection bot",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"channels": ["feishu"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
package/package.json
CHANGED