openclaw-plugin-yuanbao 2.13.1 → 2.13.3
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 +407 -58
- package/dist/api.d.ts +4 -0
- package/dist/api.js +4 -0
- package/dist/index.js +5 -0
- package/dist/src/access/api.d.ts +8 -0
- package/dist/src/access/api.js +8 -0
- package/dist/src/access/http/bot-id-cache.d.ts +12 -0
- package/dist/src/access/http/bot-id-cache.js +12 -0
- package/dist/src/access/http/main.d.ts +12 -0
- package/dist/src/access/http/main.js +12 -0
- package/dist/src/access/http/request.d.ts +1 -0
- package/dist/src/access/http/request.js +10 -2
- package/dist/src/access/ws/biz-codec.d.ts +25 -0
- package/dist/src/access/ws/biz-codec.js +29 -0
- package/dist/src/access/ws/client.d.ts +31 -0
- package/dist/src/access/ws/client.js +73 -11
- package/dist/src/access/ws/conn-codec.d.ts +42 -0
- package/dist/src/access/ws/conn-codec.js +44 -0
- package/dist/src/access/ws/gateway.d.ts +1 -0
- package/dist/src/access/ws/gateway.js +27 -0
- package/dist/src/access/ws/runtime.d.ts +20 -0
- package/dist/src/access/ws/runtime.js +12 -1
- package/dist/src/access/ws/types.d.ts +33 -0
- package/dist/src/access/ws/types.js +7 -0
- package/dist/src/accounts.d.ts +17 -0
- package/dist/src/accounts.js +41 -1
- package/dist/src/business/actions/deliver.d.ts +14 -0
- package/dist/src/business/actions/deliver.js +12 -0
- package/dist/src/business/actions/handler.d.ts +21 -0
- package/dist/src/business/actions/handler.js +33 -0
- package/dist/src/business/actions/index.d.ts +16 -0
- package/dist/src/business/actions/index.js +24 -0
- package/dist/src/business/actions/media/send.d.ts +14 -0
- package/dist/src/business/actions/media/send.js +14 -0
- package/dist/src/business/actions/resolve-target.d.ts +29 -0
- package/dist/src/business/actions/resolve-target.js +25 -0
- package/dist/src/business/actions/sticker/init-builtin-stickers.d.ts +10 -0
- package/dist/src/business/actions/sticker/init-builtin-stickers.js +10 -0
- package/dist/src/business/actions/sticker/send.d.ts +19 -0
- package/dist/src/business/actions/sticker/send.js +19 -0
- package/dist/src/business/actions/sticker/sticker-cache.d.ts +28 -0
- package/dist/src/business/actions/sticker/sticker-cache.js +43 -2
- package/dist/src/business/actions/sticker/sticker-types.d.ts +8 -0
- package/dist/src/business/actions/sticker/sticker-types.js +3 -0
- package/dist/src/business/actions/text/send.d.ts +11 -0
- package/dist/src/business/actions/text/send.js +11 -0
- package/dist/src/business/commands/command-sync/index.d.ts +1 -0
- package/dist/src/business/commands/command-sync/index.js +3 -0
- package/dist/src/business/commands/log-upload/cos-upload.d.ts +11 -0
- package/dist/src/business/commands/log-upload/cos-upload.js +28 -0
- package/dist/src/business/commands/log-upload/extractor.js +15 -0
- package/dist/src/business/commands/log-upload/index.js +1 -0
- package/dist/src/business/commands/log-upload/perform.d.ts +12 -0
- package/dist/src/business/commands/log-upload/perform.js +18 -0
- package/dist/src/business/commands/upgrade/env.d.ts +15 -0
- package/dist/src/business/commands/upgrade/env.js +17 -0
- package/dist/src/business/commands/upgrade/index.d.ts +9 -0
- package/dist/src/business/commands/upgrade/index.js +13 -0
- package/dist/src/business/commands/upgrade/upgrade.d.ts +3 -0
- package/dist/src/business/commands/upgrade/upgrade.js +47 -0
- package/dist/src/business/commands/upgrade/utils.d.ts +31 -0
- package/dist/src/business/commands/upgrade/utils.js +45 -0
- package/dist/src/business/inbound/index.d.ts +13 -0
- package/dist/src/business/inbound/index.js +15 -0
- package/dist/src/business/messaging/callbacks/recall.d.ts +18 -0
- package/dist/src/business/messaging/callbacks/recall.js +19 -1
- package/dist/src/business/messaging/chat-history.d.ts +16 -0
- package/dist/src/business/messaging/chat-history.js +14 -0
- package/dist/src/business/messaging/chat-history.test.d.ts +3 -0
- package/dist/src/business/messaging/chat-history.test.js +7 -0
- package/dist/src/business/messaging/context.d.ts +5 -0
- package/dist/src/business/messaging/context.js +4 -0
- package/dist/src/business/messaging/directory.d.ts +15 -0
- package/dist/src/business/messaging/directory.js +26 -0
- package/dist/src/business/messaging/extract.d.ts +10 -0
- package/dist/src/business/messaging/extract.js +11 -0
- package/dist/src/business/messaging/extract.test.d.ts +3 -0
- package/dist/src/business/messaging/extract.test.js +3 -0
- package/dist/src/business/messaging/handlers/custom/index.d.ts +11 -0
- package/dist/src/business/messaging/handlers/custom/index.js +24 -0
- package/dist/src/business/messaging/handlers/custom/link-card.d.ts +12 -0
- package/dist/src/business/messaging/handlers/custom/link-card.js +13 -0
- package/dist/src/business/messaging/handlers/custom.d.ts +5 -0
- package/dist/src/business/messaging/handlers/custom.js +5 -0
- package/dist/src/business/messaging/handlers/custom.test.d.ts +5 -0
- package/dist/src/business/messaging/handlers/custom.test.js +8 -3
- package/dist/src/business/messaging/handlers/face.d.ts +1 -0
- package/dist/src/business/messaging/handlers/face.js +2 -0
- package/dist/src/business/messaging/handlers/face.test.d.ts +5 -0
- package/dist/src/business/messaging/handlers/face.test.js +5 -0
- package/dist/src/business/messaging/handlers/file.d.ts +6 -0
- package/dist/src/business/messaging/handlers/file.js +13 -0
- package/dist/src/business/messaging/handlers/image.d.ts +6 -0
- package/dist/src/business/messaging/handlers/image.js +17 -1
- package/dist/src/business/messaging/handlers/image.test.d.ts +5 -0
- package/dist/src/business/messaging/handlers/image.test.js +6 -0
- package/dist/src/business/messaging/handlers/index.d.ts +1 -0
- package/dist/src/business/messaging/handlers/index.js +9 -0
- package/dist/src/business/messaging/handlers/index.test.d.ts +5 -0
- package/dist/src/business/messaging/handlers/index.test.js +5 -0
- package/dist/src/business/messaging/handlers/sound.d.ts +6 -0
- package/dist/src/business/messaging/handlers/sound.js +10 -0
- package/dist/src/business/messaging/handlers/text.d.ts +5 -0
- package/dist/src/business/messaging/handlers/text.js +11 -0
- package/dist/src/business/messaging/handlers/text.test.d.ts +5 -0
- package/dist/src/business/messaging/handlers/text.test.js +6 -0
- package/dist/src/business/messaging/handlers/types.d.ts +35 -0
- package/dist/src/business/messaging/handlers/types.js +6 -0
- package/dist/src/business/messaging/handlers/video.d.ts +5 -0
- package/dist/src/business/messaging/handlers/video.js +12 -0
- package/dist/src/business/messaging/index.d.ts +1 -0
- package/dist/src/business/messaging/index.js +3 -0
- package/dist/src/business/messaging/mention.d.ts +27 -0
- package/dist/src/business/messaging/mention.js +27 -0
- package/dist/src/business/messaging/quote.d.ts +19 -0
- package/dist/src/business/messaging/quote.js +24 -0
- package/dist/src/business/messaging/quote.test.d.ts +3 -0
- package/dist/src/business/messaging/quote.test.js +4 -0
- package/dist/src/business/messaging/system-callbacks.d.ts +21 -0
- package/dist/src/business/messaging/system-callbacks.js +22 -0
- package/dist/src/business/messaging/targets.d.ts +28 -0
- package/dist/src/business/messaging/targets.js +37 -2
- package/dist/src/business/messaging/targets.test.d.ts +5 -0
- package/dist/src/business/messaging/targets.test.js +10 -0
- package/dist/src/business/outbound/create-sender.d.ts +1 -0
- package/dist/src/business/outbound/create-sender.js +4 -0
- package/dist/src/business/outbound/heartbeat.d.ts +3 -0
- package/dist/src/business/outbound/heartbeat.js +3 -0
- package/dist/src/business/outbound/index.d.ts +3 -0
- package/dist/src/business/outbound/index.js +3 -0
- package/dist/src/business/outbound/queue.d.ts +3 -0
- package/dist/src/business/outbound/queue.js +25 -8
- package/dist/src/business/outbound/types.d.ts +11 -0
- package/dist/src/business/outbound/types.js +5 -0
- package/dist/src/business/pipeline/create.d.ts +5 -0
- package/dist/src/business/pipeline/create.js +27 -17
- package/dist/src/business/pipeline/engine.d.ts +10 -0
- package/dist/src/business/pipeline/engine.js +11 -0
- package/dist/src/business/pipeline/engine.test.d.ts +3 -0
- package/dist/src/business/pipeline/engine.test.js +7 -0
- package/dist/src/business/pipeline/index.d.ts +5 -0
- package/dist/src/business/pipeline/index.js +5 -0
- package/dist/src/business/pipeline/middlewares/build-context.d.ts +4 -0
- package/dist/src/business/pipeline/middlewares/build-context.js +8 -0
- package/dist/src/business/pipeline/middlewares/build-context.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/build-context.test.js +4 -0
- package/dist/src/business/pipeline/middlewares/dispatch-reply.d.ts +7 -0
- package/dist/src/business/pipeline/middlewares/dispatch-reply.js +34 -1
- package/dist/src/business/pipeline/middlewares/dispatch-reply.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/dispatch-reply.test.js +12 -0
- package/dist/src/business/pipeline/middlewares/download-media.d.ts +4 -0
- package/dist/src/business/pipeline/middlewares/download-media.js +10 -0
- package/dist/src/business/pipeline/middlewares/download-media.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/download-media.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/extract-content.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/extract-content.js +6 -0
- package/dist/src/business/pipeline/middlewares/extract-content.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/extract-content.test.js +5 -0
- package/dist/src/business/pipeline/middlewares/guard-command.d.ts +4 -0
- package/dist/src/business/pipeline/middlewares/guard-command.js +6 -1
- package/dist/src/business/pipeline/middlewares/guard-command.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/guard-command.test.js +4 -0
- package/dist/src/business/pipeline/middlewares/guard-group-command.d.ts +6 -0
- package/dist/src/business/pipeline/middlewares/guard-group-command.js +8 -1
- package/dist/src/business/pipeline/middlewares/guard-group-command.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/guard-group-command.test.js +4 -0
- package/dist/src/business/pipeline/middlewares/guard-send-access.d.ts +15 -0
- package/dist/src/business/pipeline/middlewares/guard-send-access.js +33 -0
- package/dist/src/business/pipeline/middlewares/guard-send-access.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/guard-send-access.test.js +7 -2
- package/dist/src/business/pipeline/middlewares/guard-special-command.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/guard-special-command.js +19 -3
- package/dist/src/business/pipeline/middlewares/guard-special-command.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/guard-special-command.test.js +4 -0
- package/dist/src/business/pipeline/middlewares/index.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/index.js +3 -0
- package/dist/src/business/pipeline/middlewares/prepare-sender.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/prepare-sender.js +6 -1
- package/dist/src/business/pipeline/middlewares/prepare-sender.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/prepare-sender.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/record-member.d.ts +4 -0
- package/dist/src/business/pipeline/middlewares/record-member.js +4 -0
- package/dist/src/business/pipeline/middlewares/record-member.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/record-member.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-mention.d.ts +6 -0
- package/dist/src/business/pipeline/middlewares/resolve-mention.js +9 -1
- package/dist/src/business/pipeline/middlewares/resolve-mention.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-mention.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-quote.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-quote.js +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-quote.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-quote.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-route.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-route.js +4 -0
- package/dist/src/business/pipeline/middlewares/resolve-route.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-route.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/resolve-trace.d.ts +4 -0
- package/dist/src/business/pipeline/middlewares/resolve-trace.js +5 -0
- package/dist/src/business/pipeline/middlewares/rewrite-body.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/rewrite-body.js +10 -0
- package/dist/src/business/pipeline/middlewares/rewrite-body.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/rewrite-body.test.js +4 -0
- package/dist/src/business/pipeline/middlewares/skip-placeholder.d.ts +6 -0
- package/dist/src/business/pipeline/middlewares/skip-placeholder.js +13 -0
- package/dist/src/business/pipeline/middlewares/skip-placeholder.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/skip-placeholder.test.js +3 -0
- package/dist/src/business/pipeline/middlewares/skip-self.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/skip-self.js +4 -1
- package/dist/src/business/pipeline/middlewares/skip-self.test.d.ts +3 -0
- package/dist/src/business/pipeline/middlewares/skip-self.test.js +3 -0
- package/dist/src/business/pipeline/test-helpers/mock-ctx.d.ts +10 -0
- package/dist/src/business/pipeline/test-helpers/mock-ctx.js +11 -0
- package/dist/src/business/pipeline/types.d.ts +9 -0
- package/dist/src/business/pipeline/types.js +4 -0
- package/dist/src/business/tools/group.d.ts +14 -0
- package/dist/src/business/tools/group.js +31 -0
- package/dist/src/business/tools/index.d.ts +13 -0
- package/dist/src/business/tools/index.js +18 -0
- package/dist/src/business/tools/member.d.ts +15 -0
- package/dist/src/business/tools/member.js +46 -0
- package/dist/src/business/tools/remind.d.ts +7 -0
- package/dist/src/business/tools/remind.js +518 -182
- package/dist/src/business/trace/context.d.ts +18 -1
- package/dist/src/business/trace/context.js +17 -1
- package/dist/src/business/utils/markdown.d.ts +12 -0
- package/dist/src/business/utils/markdown.js +62 -15
- package/dist/src/business/utils/media.d.ts +10 -0
- package/dist/src/business/utils/media.js +43 -1
- package/dist/src/business/utils/utils.d.ts +35 -2
- package/dist/src/business/utils/utils.js +33 -2
- package/dist/src/business/utils/utils.test.d.ts +5 -0
- package/dist/src/business/utils/utils.test.js +6 -0
- package/dist/src/channel-shared.d.ts +18 -1
- package/dist/src/channel-shared.js +18 -1
- package/dist/src/channel.d.ts +7 -0
- package/dist/src/channel.js +16 -0
- package/dist/src/channel.setup.d.ts +8 -0
- package/dist/src/channel.setup.js +8 -0
- package/dist/src/config-schema.d.ts +14 -0
- package/dist/src/config-schema.js +14 -0
- package/dist/src/dispatcher/debouncer/index.d.ts +1 -0
- package/dist/src/dispatcher/debouncer/index.js +13 -0
- package/dist/src/dispatcher/queue/session-abort-manager.d.ts +18 -0
- package/dist/src/dispatcher/queue/session-abort-manager.js +18 -0
- package/dist/src/dispatcher/queue/session-queue.d.ts +19 -0
- package/dist/src/dispatcher/queue/session-queue.js +22 -0
- package/dist/src/infra/cache/member.d.ts +3 -0
- package/dist/src/infra/cache/member.js +18 -0
- package/dist/src/infra/cache/ttl-db.d.ts +5 -0
- package/dist/src/infra/cache/ttl-db.js +6 -1
- package/dist/src/infra/cache/ttl-db.test.d.ts +3 -0
- package/dist/src/infra/cache/ttl-db.test.js +5 -0
- package/dist/src/infra/env.d.ts +12 -0
- package/dist/src/infra/env.js +32 -1
- package/dist/src/infra/transport.d.ts +7 -0
- package/dist/src/infra/transport.js +12 -0
- package/dist/src/logger.d.ts +5 -0
- package/dist/src/logger.js +6 -0
- package/dist/src/runtime.d.ts +6 -0
- package/dist/src/setup-core.d.ts +6 -0
- package/dist/src/setup-core.js +10 -0
- package/dist/src/setup-surface.d.ts +6 -0
- package/dist/src/setup-surface.js +7 -0
- package/dist/src/types.d.ts +16 -0
- package/dist/src/types.js +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +22 -43
package/README.md
CHANGED
|
@@ -1,58 +1,407 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
openclaw
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
1
|
+
---
|
|
2
|
+
summary: "Yuanbao bot overview, features, and configuration"
|
|
3
|
+
read_when:
|
|
4
|
+
- You want to connect a Yuanbao bot
|
|
5
|
+
- You are configuring the Yuanbao channel
|
|
6
|
+
title: Yuanbao
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Yuanbao
|
|
10
|
+
|
|
11
|
+
Tencent Yuanbao is Tencent's AI assistant platform. The OpenClaw channel plugin
|
|
12
|
+
connects Yuanbao bots to OpenClaw over WebSocket so they can interact with users
|
|
13
|
+
through direct messages and group chats.
|
|
14
|
+
|
|
15
|
+
**Status:** production-ready for bot DMs + group chats. WebSocket is the only supported connection mode.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
> **Requires OpenClaw 2026.4.10 or above.** Run `openclaw --version` to check. Upgrade with `openclaw update`.
|
|
22
|
+
|
|
23
|
+
### 1. Add the Yuanbao channel with your credentials
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
openclaw channels add --channel yuanbao --token "appKey:appSecret"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The `--token` value uses colon-separated `appKey:appSecret` format. You can obtain these from the Yuanbao app by creating a robot in your application settings.
|
|
30
|
+
|
|
31
|
+
### 2. Restart the gateway to apply the changes
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
openclaw gateway restart
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Interactive setup (alternative)
|
|
38
|
+
|
|
39
|
+
You can also use the interactive wizard:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
openclaw channels login --channel yuanbao
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Follow the prompts to enter your App ID and App Secret.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Access control
|
|
50
|
+
|
|
51
|
+
### Direct messages
|
|
52
|
+
|
|
53
|
+
Configure `dmPolicy` to control who can DM the bot:
|
|
54
|
+
|
|
55
|
+
- `"pairing"` — unknown users receive a pairing code; approve via CLI
|
|
56
|
+
- `"allowlist"` — only users listed in `allowFrom` can chat
|
|
57
|
+
- `"open"` — allow all users (default)
|
|
58
|
+
- `"disabled"` — disable all DMs
|
|
59
|
+
|
|
60
|
+
**Approve a pairing request:**
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
openclaw pairing list yuanbao
|
|
64
|
+
openclaw pairing approve yuanbao <CODE>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Group chats
|
|
68
|
+
|
|
69
|
+
**Mention requirement** (`channels.yuanbao.requireMention`):
|
|
70
|
+
|
|
71
|
+
- `true` — require @mention (default)
|
|
72
|
+
- `false` — respond without @mention
|
|
73
|
+
|
|
74
|
+
Replying to the bot's message in a group chat is treated as an implicit mention.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Configuration examples
|
|
79
|
+
|
|
80
|
+
### Basic setup with open DM policy
|
|
81
|
+
|
|
82
|
+
```json5
|
|
83
|
+
{
|
|
84
|
+
channels: {
|
|
85
|
+
yuanbao: {
|
|
86
|
+
appKey: "your_app_key",
|
|
87
|
+
appSecret: "your_app_secret",
|
|
88
|
+
dm: {
|
|
89
|
+
policy: "open",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Restrict DMs to specific users
|
|
97
|
+
|
|
98
|
+
```json5
|
|
99
|
+
{
|
|
100
|
+
channels: {
|
|
101
|
+
yuanbao: {
|
|
102
|
+
appKey: "your_app_key",
|
|
103
|
+
appSecret: "your_app_secret",
|
|
104
|
+
dm: {
|
|
105
|
+
policy: "allowlist",
|
|
106
|
+
allowFrom: ["user_id_1", "user_id_2"],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Disable @mention requirement in groups
|
|
114
|
+
|
|
115
|
+
```json5
|
|
116
|
+
{
|
|
117
|
+
channels: {
|
|
118
|
+
yuanbao: {
|
|
119
|
+
requireMention: false,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Optimize outbound message delivery
|
|
126
|
+
|
|
127
|
+
```json5
|
|
128
|
+
{
|
|
129
|
+
channels: {
|
|
130
|
+
yuanbao: {
|
|
131
|
+
// Send each chunk immediately without buffering
|
|
132
|
+
outboundQueueStrategy: "immediate",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Tune merge-text strategy
|
|
139
|
+
|
|
140
|
+
```json5
|
|
141
|
+
{
|
|
142
|
+
channels: {
|
|
143
|
+
yuanbao: {
|
|
144
|
+
outboundQueueStrategy: "merge-text",
|
|
145
|
+
minChars: 2800, // buffer until this many chars
|
|
146
|
+
maxChars: 3000, // force split above this limit
|
|
147
|
+
idleMs: 5000, // auto-flush after idle timeout (ms)
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Common commands
|
|
156
|
+
|
|
157
|
+
| Command | Description |
|
|
158
|
+
| ---------- | --------------------------- |
|
|
159
|
+
| `/help` | Show available commands |
|
|
160
|
+
| `/status` | Show bot status |
|
|
161
|
+
| `/new` | Start a new session |
|
|
162
|
+
| `/stop` | Stop the current run |
|
|
163
|
+
| `/restart` | Restart OpenClaw |
|
|
164
|
+
| `/compact` | Compact the session context |
|
|
165
|
+
|
|
166
|
+
> Yuanbao supports native slash-command menus. Commands are synced to the platform automatically when the gateway starts.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Troubleshooting
|
|
171
|
+
|
|
172
|
+
### Bot does not respond in group chats
|
|
173
|
+
|
|
174
|
+
1. Ensure the bot is added to the group
|
|
175
|
+
2. Ensure you @mention the bot (required by default)
|
|
176
|
+
3. Check logs: `openclaw logs --follow`
|
|
177
|
+
|
|
178
|
+
### Bot does not receive messages
|
|
179
|
+
|
|
180
|
+
1. Ensure the bot is created and approved in the Yuanbao app
|
|
181
|
+
2. Ensure `appKey` and `appSecret` are correctly configured
|
|
182
|
+
3. Ensure the gateway is running: `openclaw gateway status`
|
|
183
|
+
4. Check logs: `openclaw logs --follow`
|
|
184
|
+
|
|
185
|
+
### Bot sends empty or fallback replies
|
|
186
|
+
|
|
187
|
+
1. Check if the AI model is returning valid content
|
|
188
|
+
2. The default fallback reply is: "暂时无法解答,你可以换个问题问问我哦"
|
|
189
|
+
3. Customize it via `channels.yuanbao.fallbackReply`
|
|
190
|
+
|
|
191
|
+
### App Secret leaked
|
|
192
|
+
|
|
193
|
+
1. Reset the App Secret in YuanBao APP
|
|
194
|
+
2. Update the value in your config
|
|
195
|
+
3. Restart the gateway: `openclaw gateway restart`
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Advanced configuration
|
|
200
|
+
|
|
201
|
+
### Multiple accounts
|
|
202
|
+
|
|
203
|
+
```json5
|
|
204
|
+
{
|
|
205
|
+
channels: {
|
|
206
|
+
yuanbao: {
|
|
207
|
+
defaultAccount: "main",
|
|
208
|
+
accounts: {
|
|
209
|
+
main: {
|
|
210
|
+
appKey: "key_xxx",
|
|
211
|
+
appSecret: "secret_xxx",
|
|
212
|
+
name: "Primary bot",
|
|
213
|
+
},
|
|
214
|
+
backup: {
|
|
215
|
+
appKey: "key_yyy",
|
|
216
|
+
appSecret: "secret_yyy",
|
|
217
|
+
name: "Backup bot",
|
|
218
|
+
enabled: false,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`defaultAccount` controls which account is used when outbound APIs do not specify an `accountId`.
|
|
227
|
+
|
|
228
|
+
### Message limits
|
|
229
|
+
|
|
230
|
+
- `maxChars` — single message max character count (default: `3000` chars)
|
|
231
|
+
- `mediaMaxMb` — media upload/download limit (default: `20` MB)
|
|
232
|
+
- `overflowPolicy` — behavior when message exceeds limit: `"split"` (default) or `"stop"`
|
|
233
|
+
|
|
234
|
+
### Streaming
|
|
235
|
+
|
|
236
|
+
Yuanbao supports block-level streaming output. When enabled, the bot sends text in chunks as it generates.
|
|
237
|
+
|
|
238
|
+
```json5
|
|
239
|
+
{
|
|
240
|
+
channels: {
|
|
241
|
+
yuanbao: {
|
|
242
|
+
disableBlockStreaming: false, // block streaming enabled (default)
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Set `disableBlockStreaming: true` to send the complete reply in one message.
|
|
249
|
+
|
|
250
|
+
### Group chat history context
|
|
251
|
+
|
|
252
|
+
Control how many historical messages are included in the AI context for group chats:
|
|
253
|
+
|
|
254
|
+
```json5
|
|
255
|
+
{
|
|
256
|
+
channels: {
|
|
257
|
+
yuanbao: {
|
|
258
|
+
historyLimit: 100, // default: 100, set 0 to disable
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Reply-to mode
|
|
265
|
+
|
|
266
|
+
Control how the bot quotes messages when replying in group chats:
|
|
267
|
+
|
|
268
|
+
```json5
|
|
269
|
+
{
|
|
270
|
+
channels: {
|
|
271
|
+
yuanbao: {
|
|
272
|
+
replyToMode: "first", // "off" | "first" | "all" (default: "first")
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
| Value | Behavior |
|
|
279
|
+
| --------- | -------------------------------------------------------- |
|
|
280
|
+
| `"off"` | No quote reply |
|
|
281
|
+
| `"first"` | Quote only the first reply per inbound message (default) |
|
|
282
|
+
| `"all"` | Quote every reply |
|
|
283
|
+
|
|
284
|
+
### Markdown hint injection
|
|
285
|
+
|
|
286
|
+
By default, the bot injects instructions in the system prompt to prevent the AI model from wrapping the entire reply in markdown code blocks.
|
|
287
|
+
|
|
288
|
+
```json5
|
|
289
|
+
{
|
|
290
|
+
channels: {
|
|
291
|
+
yuanbao: {
|
|
292
|
+
markdownHintEnabled: true, // default: true
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Debug mode
|
|
299
|
+
|
|
300
|
+
Enable unsanitized log output for specific bot IDs:
|
|
301
|
+
|
|
302
|
+
```json5
|
|
303
|
+
{
|
|
304
|
+
channels: {
|
|
305
|
+
yuanbao: {
|
|
306
|
+
debugBotIds: ["bot_user_id_1", "bot_user_id_2"],
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Multi-agent routing
|
|
313
|
+
|
|
314
|
+
Use `bindings` to route Yuanbao DMs or groups to different agents.
|
|
315
|
+
|
|
316
|
+
```json5
|
|
317
|
+
{
|
|
318
|
+
agents: {
|
|
319
|
+
list: [
|
|
320
|
+
{ id: "main" },
|
|
321
|
+
{ id: "agent-a", workspace: "/home/user/agent-a" },
|
|
322
|
+
{ id: "agent-b", workspace: "/home/user/agent-b" },
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
bindings: [
|
|
326
|
+
{
|
|
327
|
+
agentId: "agent-a",
|
|
328
|
+
match: {
|
|
329
|
+
channel: "yuanbao",
|
|
330
|
+
peer: { kind: "direct", id: "user_xxx" },
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
agentId: "agent-b",
|
|
335
|
+
match: {
|
|
336
|
+
channel: "yuanbao",
|
|
337
|
+
peer: { kind: "group", id: "group_zzz" },
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Routing fields:
|
|
345
|
+
|
|
346
|
+
- `match.channel`: `"yuanbao"`
|
|
347
|
+
- `match.peer.kind`: `"direct"` (DM) or `"group"` (group chat)
|
|
348
|
+
- `match.peer.id`: user ID or group code
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Configuration reference
|
|
353
|
+
|
|
354
|
+
Full configuration: [Gateway configuration](/gateway/configuration)
|
|
355
|
+
|
|
356
|
+
| Setting | Description | Default |
|
|
357
|
+
| ------------------------------------------ | ------------------------------------------------- | -------------------------------------- |
|
|
358
|
+
| `channels.yuanbao.enabled` | Enable/disable the channel | `true` |
|
|
359
|
+
| `channels.yuanbao.defaultAccount` | Default account for outbound routing | `default` |
|
|
360
|
+
| `channels.yuanbao.accounts.<id>.appKey` | App Key (used for signing and ticket generation) | — |
|
|
361
|
+
| `channels.yuanbao.accounts.<id>.appSecret` | App Secret (used for signing) | — |
|
|
362
|
+
| `channels.yuanbao.accounts.<id>.token` | Pre-signed token (skips automatic ticket signing) | — |
|
|
363
|
+
| `channels.yuanbao.accounts.<id>.name` | Account display name | — |
|
|
364
|
+
| `channels.yuanbao.accounts.<id>.enabled` | Enable/disable a specific account | `true` |
|
|
365
|
+
| `channels.yuanbao.dm.policy` | DM policy | `open` |
|
|
366
|
+
| `channels.yuanbao.dm.allowFrom` | DM allowlist (user ID list) | — |
|
|
367
|
+
| `channels.yuanbao.requireMention` | Require @mention in groups | `true` |
|
|
368
|
+
| `channels.yuanbao.overflowPolicy` | Long message handling (`split` or `stop`) | `split` |
|
|
369
|
+
| `channels.yuanbao.replyToMode` | Group reply-to strategy (`off`, `first`, `all`) | `first` |
|
|
370
|
+
| `channels.yuanbao.outboundQueueStrategy` | Outbound strategy (`merge-text` or `immediate`) | `merge-text` |
|
|
371
|
+
| `channels.yuanbao.minChars` | Merge-text: min chars to trigger send | `2800` |
|
|
372
|
+
| `channels.yuanbao.maxChars` | Merge-text: max chars per message | `3000` |
|
|
373
|
+
| `channels.yuanbao.idleMs` | Merge-text: idle timeout before auto-flush (ms) | `5000` |
|
|
374
|
+
| `channels.yuanbao.mediaMaxMb` | Media size limit (MB) | `20` |
|
|
375
|
+
| `channels.yuanbao.historyLimit` | Group chat history context entries | `100` |
|
|
376
|
+
| `channels.yuanbao.disableBlockStreaming` | Disable block-level streaming output | `false` |
|
|
377
|
+
| `channels.yuanbao.fallbackReply` | Fallback reply when AI returns no content | `暂时无法解答,你可以换个问题问问我哦` |
|
|
378
|
+
| `channels.yuanbao.markdownHintEnabled` | Inject markdown anti-wrapping instructions | `true` |
|
|
379
|
+
| `channels.yuanbao.debugBotIds` | Debug whitelist bot IDs (unsanitized logs) | `[]` |
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Supported message types
|
|
384
|
+
|
|
385
|
+
### Receive
|
|
386
|
+
|
|
387
|
+
- ✅ Text
|
|
388
|
+
- ✅ Images
|
|
389
|
+
- ✅ Files
|
|
390
|
+
- ✅ Audio / Voice
|
|
391
|
+
- ✅ Video
|
|
392
|
+
- ✅ Stickers / Custom emoji
|
|
393
|
+
- ✅ Custom elements (link cards, etc.)
|
|
394
|
+
|
|
395
|
+
### Send
|
|
396
|
+
|
|
397
|
+
- ✅ Text (with markdown support)
|
|
398
|
+
- ✅ Images
|
|
399
|
+
- ✅ Files
|
|
400
|
+
- ✅ Audio
|
|
401
|
+
- ✅ Video
|
|
402
|
+
- ✅ Stickers
|
|
403
|
+
|
|
404
|
+
### Threads and replies
|
|
405
|
+
|
|
406
|
+
- ✅ Quote replies (configurable via `replyToMode`)
|
|
407
|
+
- ❌ Thread replies (not supported by platform)
|
package/dist/api.d.ts
CHANGED
package/dist/api.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineBundledChannelEntry, loadBundledEntryExportSync, } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { YUANBAO_PLUGIN_ID } from "./src/channel-shared.js";
|
|
3
|
+
/** 懒加载注册工具 */
|
|
3
4
|
function registerTools(api) {
|
|
4
5
|
const register = loadBundledEntryExportSync(import.meta.url, {
|
|
5
6
|
specifier: "./api.js",
|
|
@@ -7,6 +8,7 @@ function registerTools(api) {
|
|
|
7
8
|
});
|
|
8
9
|
register(api);
|
|
9
10
|
}
|
|
11
|
+
/** Lazy-load and register all slash commands */
|
|
10
12
|
function registerCommands(api) {
|
|
11
13
|
const yuanbaoUpgradeCommand = loadBundledEntryExportSync(import.meta.url, { specifier: "./api.js", exportName: "yuanbaoUpgradeCommand" });
|
|
12
14
|
const yuanbaobotUpgradeCommand = loadBundledEntryExportSync(import.meta.url, { specifier: "./api.js", exportName: "yuanbaobotUpgradeCommand" });
|
|
@@ -15,6 +17,7 @@ function registerCommands(api) {
|
|
|
15
17
|
api.registerCommand(yuanbaobotUpgradeCommand);
|
|
16
18
|
api.registerCommand(logUploadCommandDefinition);
|
|
17
19
|
}
|
|
20
|
+
/** 懒加载初始化内置表情缓存 */
|
|
18
21
|
function initBuiltinStickers() {
|
|
19
22
|
const init = loadBundledEntryExportSync(import.meta.url, {
|
|
20
23
|
specifier: "./api.js",
|
|
@@ -22,6 +25,7 @@ function initBuiltinStickers() {
|
|
|
22
25
|
});
|
|
23
26
|
init();
|
|
24
27
|
}
|
|
28
|
+
/** 懒加载初始化环境变量 */
|
|
25
29
|
function initEnv(api) {
|
|
26
30
|
const init = loadBundledEntryExportSync(import.meta.url, {
|
|
27
31
|
specifier: "./api.js",
|
|
@@ -29,6 +33,7 @@ function initEnv(api) {
|
|
|
29
33
|
});
|
|
30
34
|
init(api);
|
|
31
35
|
}
|
|
36
|
+
/** 懒加载初始化日志 */
|
|
32
37
|
function initLogger(api) {
|
|
33
38
|
const init = loadBundledEntryExportSync(import.meta.url, {
|
|
34
39
|
specifier: "./api.js",
|
package/dist/src/access/api.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Yuanbao API client.
|
|
3
|
+
*
|
|
4
|
+
* Backward-compatible re-export entry point.
|
|
5
|
+
* Implementation split into:
|
|
6
|
+
* - http/request.ts — Types, token cache, signing, auth headers, HTTP utilities
|
|
7
|
+
* - http/main.ts — Business APIs (uploadInfo / downloadUrl)
|
|
8
|
+
*/
|
|
1
9
|
export type { SignTokenData, AuthHeaders, CosUploadConfig, Log } from "./http/request.js";
|
|
2
10
|
export { clearSignTokenCache, clearAllSignTokenCache, getTokenStatus, verifySignature, getSignToken, forceRefreshSignToken, getAuthHeaders, yuanbaoPost, yuanbaoGet, } from "./http/request.js";
|
|
3
11
|
export { apiGetUploadInfo, apiGetDownloadUrl } from "./http/main.js";
|
package/dist/src/access/api.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Yuanbao API client.
|
|
3
|
+
*
|
|
4
|
+
* Backward-compatible re-export entry point.
|
|
5
|
+
* Implementation split into:
|
|
6
|
+
* - http/request.ts — Types, token cache, signing, auth headers, HTTP utilities
|
|
7
|
+
* - http/main.ts — Business APIs (uploadInfo / downloadUrl)
|
|
8
|
+
*/
|
|
1
9
|
export { clearSignTokenCache, clearAllSignTokenCache, getTokenStatus, verifySignature, getSignToken, forceRefreshSignToken, getAuthHeaders, yuanbaoPost, yuanbaoGet, } from "./http/request.js";
|
|
2
10
|
export { apiGetUploadInfo, apiGetDownloadUrl } from "./http/main.js";
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight botId cache shared between the HTTP sign-token client and
|
|
3
|
+
* account resolution.
|
|
4
|
+
*
|
|
5
|
+
* Kept in its own module (rather than inlined in `request.ts`) so that
|
|
6
|
+
* `accounts.ts` — which is on the `openclaw setup` / `openclaw configure`
|
|
7
|
+
* code path — can look up a previously-resolved botId without statically
|
|
8
|
+
* pulling in the full HTTP/crypto/env runtime stack.
|
|
9
|
+
*/
|
|
10
|
+
/** Read the last-known botId for an account, if any. */
|
|
1
11
|
export declare function getCachedBotId(accountId: string): string | undefined;
|
|
12
|
+
/** Record a botId obtained during sign-token exchange. */
|
|
2
13
|
export declare function setCachedBotId(accountId: string, botId: string | undefined): void;
|
|
14
|
+
/** Clear the cached botId (e.g. when tearing down an account). */
|
|
3
15
|
export declare function clearCachedBotId(accountId: string): void;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight botId cache shared between the HTTP sign-token client and
|
|
3
|
+
* account resolution.
|
|
4
|
+
*
|
|
5
|
+
* Kept in its own module (rather than inlined in `request.ts`) so that
|
|
6
|
+
* `accounts.ts` — which is on the `openclaw setup` / `openclaw configure`
|
|
7
|
+
* code path — can look up a previously-resolved botId without statically
|
|
8
|
+
* pulling in the full HTTP/crypto/env runtime stack.
|
|
9
|
+
*/
|
|
1
10
|
const botIdCache = new Map();
|
|
11
|
+
/** Read the last-known botId for an account, if any. */
|
|
2
12
|
export function getCachedBotId(accountId) {
|
|
3
13
|
const value = botIdCache.get(accountId);
|
|
4
14
|
return value && value.length > 0 ? value : undefined;
|
|
5
15
|
}
|
|
16
|
+
/** Record a botId obtained during sign-token exchange. */
|
|
6
17
|
export function setCachedBotId(accountId, botId) {
|
|
7
18
|
if (!accountId || !botId) {
|
|
8
19
|
return;
|
|
9
20
|
}
|
|
10
21
|
botIdCache.set(accountId, botId);
|
|
11
22
|
}
|
|
23
|
+
/** Clear the cached botId (e.g. when tearing down an account). */
|
|
12
24
|
export function clearCachedBotId(accountId) {
|
|
13
25
|
botIdCache.delete(accountId);
|
|
14
26
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Yuanbao business API.
|
|
3
|
+
*
|
|
4
|
+
* Upload pre-sign config retrieval, resource download URL retrieval, etc.
|
|
5
|
+
* Auth and HTTP utilities are in request.ts.
|
|
6
|
+
*/
|
|
1
7
|
import type { ResolvedYuanbaoAccount } from "../../types.js";
|
|
2
8
|
import type { Log, CosUploadConfig } from "./request.js";
|
|
9
|
+
/**
|
|
10
|
+
* Get COS upload pre-sign config.
|
|
11
|
+
*/
|
|
3
12
|
export declare function apiGetUploadInfo(account: ResolvedYuanbaoAccount, fileName: string, fileId: string, log?: Log): Promise<CosUploadConfig>;
|
|
13
|
+
/**
|
|
14
|
+
* Get COS download URL for a given resourceId.
|
|
15
|
+
*/
|
|
4
16
|
export declare function apiGetDownloadUrl(account: ResolvedYuanbaoAccount, resourceId: string, log?: Log): Promise<string>;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Yuanbao business API.
|
|
3
|
+
*
|
|
4
|
+
* Upload pre-sign config retrieval, resource download URL retrieval, etc.
|
|
5
|
+
* Auth and HTTP utilities are in request.ts.
|
|
6
|
+
*/
|
|
1
7
|
import { yuanbaoPost, yuanbaoGet } from "./request.js";
|
|
2
8
|
const UPLOAD_INFO_PATH = "/api/resource/genUploadInfo";
|
|
3
9
|
const DOWNLOAD_INFO_PATH = "/api/resource/v1/download";
|
|
10
|
+
/**
|
|
11
|
+
* Get COS upload pre-sign config.
|
|
12
|
+
*/
|
|
4
13
|
export async function apiGetUploadInfo(account, fileName, fileId, log) {
|
|
5
14
|
const data = await yuanbaoPost(account, UPLOAD_INFO_PATH, { fileName, fileId, docFrom: "localDoc", docOpenId: "" }, log);
|
|
6
15
|
if (!data.bucketName || !data.location) {
|
|
@@ -8,6 +17,9 @@ export async function apiGetUploadInfo(account, fileName, fileId, log) {
|
|
|
8
17
|
}
|
|
9
18
|
return data;
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Get COS download URL for a given resourceId.
|
|
22
|
+
*/
|
|
11
23
|
export async function apiGetDownloadUrl(account, resourceId, log) {
|
|
12
24
|
const data = await yuanbaoGet(account, DOWNLOAD_INFO_PATH, { resourceId }, log);
|
|
13
25
|
const downloadUrl = data.url ?? data.realUrl;
|