@searchfe/openclaw-baiduapp 0.1.0-beta.6 → 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
@@ -34,10 +34,6 @@ interface ResolvedBaiduAppAccount {
34
34
  interface BaiduAppSendTarget {
35
35
  userId: string;
36
36
  }
37
- interface AccessTokenCacheEntry {
38
- token: string;
39
- expiresAt: number;
40
- }
41
37
  interface BaiduAppInboundBase {
42
38
  MsgId?: string;
43
39
  msgid?: string;
@@ -82,18 +78,18 @@ interface PluginConfig {
82
78
  store?: unknown;
83
79
  };
84
80
  channels?: {
85
- 'baidu-app'?: BaiduAppConfig;
81
+ 'openclaw-baiduapp'?: BaiduAppConfig;
86
82
  };
87
83
  }
88
84
 
89
85
  declare const baiduAppPlugin: {
90
86
  id: string;
91
87
  meta: {
92
- id: "baidu-app";
88
+ id: "openclaw-baiduapp";
93
89
  label: "Baidu App";
94
90
  selectionLabel: "Baidu Search AI (百度搜索对话式AI)";
95
- docsPath: "/channels/baidu-app";
96
- docsLabel: "baidu-app";
91
+ docsPath: "/channels/openclaw-baiduapp";
92
+ docsLabel: "openclaw-baiduapp";
97
93
  blurb: "百度搜索对话式AI,支持主动发送消息";
98
94
  aliases: readonly ["baidu-ai", "百度搜索AI"];
99
95
  order: 85;
@@ -385,9 +381,6 @@ interface PluginRuntime {
385
381
  declare function setBaiduAppRuntime(next: PluginRuntime): void;
386
382
  declare function getBaiduAppRuntime(): PluginRuntime;
387
383
 
388
- declare function getAccessToken(account: ResolvedBaiduAppAccount): Promise<string>;
389
- declare function clearAccessTokenCache(account: ResolvedBaiduAppAccount): void;
390
- declare function clearAllAccessTokenCache(): void;
391
384
  interface SendMessageResult {
392
385
  ok: boolean;
393
386
  errcode?: number;
@@ -431,4 +424,4 @@ declare const plugin: {
431
424
  register(api: MoltbotPluginApi): void;
432
425
  };
433
426
 
434
- 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 };