@searchfe/openclaw-baiduapp 0.1.0-beta.5 → 0.1.0-beta.7

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 CHANGED
@@ -53,12 +53,12 @@ openclaw plugins install @searchfe/openclaw-baiduapp
53
53
  ### 使用命令行配置
54
54
 
55
55
  ```bash
56
- openclaw config set channels.baidu-app.enabled true
57
- openclaw config set channels.baidu-app.webhookPath /baidu-app
58
- openclaw config set channels.baidu-app.token your-token
59
- openclaw config set channels.baidu-app.encodingAESKey your-43-char-encoding-aes-key
60
- openclaw config set channels.baidu-app.appKey your-app-key
61
- openclaw config set channels.baidu-app.appSecret your-app-secret
56
+ openclaw config set channels.openclaw-baiduapp.enabled true
57
+ openclaw config set channels.openclaw-baiduapp.webhookPath /openclaw-baiduapp
58
+ openclaw config set channels.openclaw-baiduapp.token your-token
59
+ openclaw config set channels.openclaw-baiduapp.encodingAESKey your-43-char-encoding-aes-key
60
+ openclaw config set channels.openclaw-baiduapp.appKey your-app-key
61
+ openclaw config set channels.openclaw-baiduapp.appSecret your-app-secret
62
62
  ```
63
63
 
64
64
  ### 或直接编辑配置文件
@@ -68,9 +68,9 @@ openclaw config set channels.baidu-app.appSecret your-app-secret
68
68
  ```json
69
69
  {
70
70
  "channels": {
71
- "baidu-app": {
71
+ "openclaw-baiduapp": {
72
72
  "enabled": true,
73
- "webhookPath": "/baidu-app",
73
+ "webhookPath": "/openclaw-baiduapp",
74
74
  "token": "your-token",
75
75
  "encodingAESKey": "your-43-char-encoding-aes-key",
76
76
  "appKey": "your-app-key",
@@ -130,7 +130,7 @@ openclaw gateway restart
130
130
  ```json
131
131
  {
132
132
  "channels": {
133
- "baidu-app": {
133
+ "openclaw-baiduapp": {
134
134
  "enabled": true,
135
135
  "dmPolicy": "open",
136
136
  "allowFrom": []
@@ -149,18 +149,18 @@ openclaw gateway restart
149
149
  ```json
150
150
  {
151
151
  "channels": {
152
- "baidu-app": {
152
+ "openclaw-baiduapp": {
153
153
  "enabled": true,
154
154
  "accounts": {
155
155
  "bot1": {
156
- "webhookPath": "/baidu-app-1",
156
+ "webhookPath": "/openclaw-baiduapp-1",
157
157
  "token": "token-1",
158
158
  "encodingAESKey": "key-1",
159
159
  "appKey": "app-key-1",
160
160
  "appSecret": "secret-1"
161
161
  },
162
162
  "bot2": {
163
- "webhookPath": "/baidu-app-2",
163
+ "webhookPath": "/openclaw-baiduapp-2",
164
164
  "token": "token-2",
165
165
  "encodingAESKey": "key-2",
166
166
  "appKey": "app-key-2",
@@ -196,8 +196,8 @@ openclaw gateway restart
196
196
  # 使用 user: 前缀
197
197
  send user:userId123 你好
198
198
 
199
- # 使用 baidu-app: 完整前缀
200
- send baidu-app:user:userId123 你好
199
+ # 使用 openclaw-baiduapp: 完整前缀
200
+ send openclaw-baiduapp:user:userId123 你好
201
201
 
202
202
  # 指定账户
203
203
  send user:userId123@bot1 你好
package/dist/index.d.ts CHANGED
@@ -7,7 +7,6 @@ interface BaiduAppAccountConfig {
7
7
  webhookPath?: string;
8
8
  token?: string;
9
9
  encodingAESKey?: string;
10
- receiveId?: string;
11
10
  appKey?: string;
12
11
  appSecret?: string;
13
12
  apiBase?: string;
@@ -26,7 +25,6 @@ interface ResolvedBaiduAppAccount {
26
25
  configured: boolean;
27
26
  token?: string;
28
27
  encodingAESKey?: string;
29
- receiveId: string;
30
28
  appKey?: string;
31
29
  appSecret?: string;
32
30
  apiBase: string;
@@ -36,10 +34,6 @@ interface ResolvedBaiduAppAccount {
36
34
  interface BaiduAppSendTarget {
37
35
  userId: string;
38
36
  }
39
- interface AccessTokenCacheEntry {
40
- token: string;
41
- expiresAt: number;
42
- }
43
37
  interface BaiduAppInboundBase {
44
38
  MsgId?: string;
45
39
  msgid?: string;
@@ -84,18 +78,18 @@ interface PluginConfig {
84
78
  store?: unknown;
85
79
  };
86
80
  channels?: {
87
- 'baidu-app'?: BaiduAppConfig;
81
+ 'openclaw-baiduapp'?: BaiduAppConfig;
88
82
  };
89
83
  }
90
84
 
91
85
  declare const baiduAppPlugin: {
92
86
  id: string;
93
87
  meta: {
94
- id: "baidu-app";
88
+ id: "openclaw-baiduapp";
95
89
  label: "Baidu App";
96
90
  selectionLabel: "Baidu Search AI (百度搜索对话式AI)";
97
- docsPath: "/channels/baidu-app";
98
- docsLabel: "baidu-app";
91
+ docsPath: "/channels/openclaw-baiduapp";
92
+ docsLabel: "openclaw-baiduapp";
99
93
  blurb: "百度搜索对话式AI,支持主动发送消息";
100
94
  aliases: readonly ["baidu-ai", "百度搜索AI"];
101
95
  order: 85;
@@ -130,9 +124,6 @@ declare const baiduAppPlugin: {
130
124
  encodingAESKey: {
131
125
  type: string;
132
126
  };
133
- receiveId: {
134
- type: string;
135
- };
136
127
  appKey: {
137
128
  type: string;
138
129
  };
@@ -179,9 +170,6 @@ declare const baiduAppPlugin: {
179
170
  encodingAESKey: {
180
171
  type: string;
181
172
  };
182
- receiveId: {
183
- type: string;
184
- };
185
173
  appKey: {
186
174
  type: string;
187
175
  };
@@ -393,9 +381,6 @@ interface PluginRuntime {
393
381
  declare function setBaiduAppRuntime(next: PluginRuntime): void;
394
382
  declare function getBaiduAppRuntime(): PluginRuntime;
395
383
 
396
- declare function getAccessToken(account: ResolvedBaiduAppAccount): Promise<string>;
397
- declare function clearAccessTokenCache(account: ResolvedBaiduAppAccount): void;
398
- declare function clearAllAccessTokenCache(): void;
399
384
  interface SendMessageResult {
400
385
  ok: boolean;
401
386
  errcode?: number;
@@ -439,4 +424,4 @@ declare const plugin: {
439
424
  register(api: MoltbotPluginApi): void;
440
425
  };
441
426
 
442
- export { type AccessTokenCacheEntry, type BaiduAppConfig, type BaiduAppDmPolicy, type BaiduAppInboundMessage, type BaiduAppSendTarget, DEFAULT_ACCOUNT_ID, type MoltbotPluginApi, type ResolvedBaiduAppAccount, type SendMessageOptions, type SendResult, baiduAppPlugin, clearAccessTokenCache, clearAllAccessTokenCache, plugin as default, getAccessToken, getBaiduAppRuntime, normalizeTarget, parseTarget, sendBaidu, sendBaiduAppMessage, sendBaiduDM, setBaiduAppRuntime };
427
+ export { type BaiduAppConfig, type BaiduAppDmPolicy, type BaiduAppInboundMessage, type BaiduAppSendTarget, DEFAULT_ACCOUNT_ID, type MoltbotPluginApi, type ResolvedBaiduAppAccount, type SendMessageOptions, type SendResult, baiduAppPlugin, plugin as default, getBaiduAppRuntime, normalizeTarget, parseTarget, sendBaidu, sendBaiduAppMessage, sendBaiduDM, setBaiduAppRuntime };