@searchfe/openclaw-baiduapp 0.1.12 → 0.1.14
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 +10 -15
- package/dist/index.js +1034 -1033
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +44 -5
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
| :----------------------- | :--: |
|
|
9
9
|
| 文本消息 | ✅ |
|
|
10
10
|
| 主动发送消息 | ✅ |
|
|
11
|
-
|
|
|
12
|
-
| Webhook 回调 | ✅ |
|
|
11
|
+
| 轮询接收消息 | ✅ |
|
|
13
12
|
| 入站文件下载与本地注入 | ✅ |
|
|
14
13
|
| 出站本地文件上传后发送 | ✅ |
|
|
15
14
|
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
|
|
20
19
|
### 入站消息
|
|
21
20
|
|
|
22
|
-
-
|
|
21
|
+
- 入站消息使用轮询模式,插件主动通过 `/channel/msg/poll` 拉取消息。
|
|
23
22
|
- 入站 payload 使用 `{sessionId, msg}` 结构,其中 `msg` 为 `{list:[{type,data}]}`。
|
|
24
23
|
- 纯文本与文件消息都会按 `msg.list` 逐项解析进入 Agent。
|
|
25
24
|
- 插件会下载可访问的入站文件到本机临时目录 `openclaw-baiduapp/media`,并把成功下载的本地路径注入给 Agent。
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
|
|
37
36
|
- 入站文件保留期固定为 **7 天**。
|
|
38
37
|
- 清理逻辑只遍历插件自有目录 `openclaw-baiduapp/media`,不会扫描或删除其他 tmp 路径内容。
|
|
39
|
-
-
|
|
38
|
+
- 清理在两个惰性时机触发:插件启动后、以及每次入站文件处理结束后;失败只记录日志,不阻断主流程。
|
|
40
39
|
|
|
41
40
|
## 已知限制
|
|
42
41
|
|
|
@@ -48,8 +47,7 @@
|
|
|
48
47
|
## 前置条件
|
|
49
48
|
|
|
50
49
|
1. 百度App 开发者账号
|
|
51
|
-
2.
|
|
52
|
-
3. OpenClaw 已安装并运行
|
|
50
|
+
2. OpenClaw 已安装并运行
|
|
53
51
|
|
|
54
52
|
## 步骤一:安装插件
|
|
55
53
|
|
|
@@ -95,9 +93,8 @@ openclaw config set channels.openclaw-baiduapp.appSecret your-app-secret
|
|
|
95
93
|
| 字段 | 必填 | 说明 |
|
|
96
94
|
| :------------ | :--: | :----------------------------------- |
|
|
97
95
|
| `enabled` | ✅ | 是否启用该渠道 |
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `appSecret` | ✅ | 应用 App Secret(回调鉴权与主动发送必需) |
|
|
96
|
+
| `appKey` | ✅ | 应用 App Key(轮询鉴权与主动发送必需) |
|
|
97
|
+
| `appSecret` | ✅ | 应用 App Secret(轮询鉴权与主动发送必需) |
|
|
101
98
|
|
|
102
99
|
### 环境变量支持
|
|
103
100
|
|
|
@@ -116,18 +113,16 @@ openclaw gateway restart
|
|
|
116
113
|
|
|
117
114
|
## 步骤五:验证配置
|
|
118
115
|
|
|
119
|
-
1.
|
|
120
|
-
2.
|
|
121
|
-
3. 查看 OpenClaw
|
|
116
|
+
1. 重启 OpenClaw Gateway 后,插件会自动开始轮询 `/channel/msg/poll` 接收消息
|
|
117
|
+
2. 先发送一条测试文本消息,再发送一条带附件的 V2 `msg.list` 消息
|
|
118
|
+
3. 查看 OpenClaw 日志,确认轮询接收生效;如果是文件消息,还要确认插件完成本地下载并把 `[local files]` / `MediaPaths` 注入给 Agent
|
|
122
119
|
|
|
123
120
|
## 常见问题
|
|
124
121
|
|
|
125
122
|
### Q: 保存配置时提示验证失败?
|
|
126
123
|
|
|
127
124
|
1. 检查 OpenClaw 是否已启动并监听正确端口
|
|
128
|
-
2. 确认 `
|
|
129
|
-
3. 确认 `appKey` 和 `appSecret` 与平台配置完全一致
|
|
130
|
-
4. 确认服务器公网可访问
|
|
125
|
+
2. 确认 `appKey` 和 `appSecret` 与平台配置完全一致
|
|
131
126
|
|
|
132
127
|
### Q: 消息接收成功但发送失败?
|
|
133
128
|
|