@ycodium-ai/plugin-im 0.2.2962 → 0.2.2968
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 +31 -8
- package/dist/index.js +3647 -1199
- package/locales/en.json +172 -8
- package/locales/zh-CN.json +172 -8
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -6,9 +6,12 @@ to the chat, and anything the agent needs approved lands there too.
|
|
|
6
6
|
|
|
7
7
|
## What it does
|
|
8
8
|
|
|
9
|
-
Each settings-card row is one bot (platform, credentials,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Each settings-card row is one **bot card** (alias, platform, credentials, access
|
|
10
|
+
mode, allow list, queue vs steer, and channel options such as Lark panel mode and
|
|
11
|
+
WeCom numbered-reply hints). Row
|
|
12
|
+
actions check the connection, copy a diagnostic reference (`IM-CONN-…`), and for
|
|
13
|
+
Lark guide scope repair. Chats (private or group) are not configured on the card;
|
|
14
|
+
they pick their own project:
|
|
12
15
|
|
|
13
16
|
- **Connect a Lark bot** (Beta) is a button on top of the card (web and desktop; mobile
|
|
14
17
|
fills rows by hand). One scan, then the plugin creates the Lark app through the developer
|
|
@@ -16,10 +19,15 @@ project:
|
|
|
16
19
|
saved as secrets and the scanner as the only allowed person: no draft, no Save. It relies on
|
|
17
20
|
non-public console interfaces and may break; the dialog then shows the step list with the
|
|
18
21
|
failed step marked. See `src/lark/setup/`.
|
|
19
|
-
- **
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
- **Access mode** (per bot): `allowlist` (default) or `open`. `allowlist` admits only
|
|
23
|
+
the people on the allow list; `open` admits any sender the platform can identify.
|
|
24
|
+
New bots start on `allowlist`.
|
|
25
|
+
- **Allowed people** is an allow-list of that platform's user ids (shown when the
|
|
26
|
+
mode is allowlist). Empty means nobody can make the agent work. Someone who is
|
|
27
|
+
not admitted gets one reply with their own user id and where to put it, at most
|
|
28
|
+
once every ten minutes per person (the table of who was told is bounded in memory).
|
|
29
|
+
In `open` mode any identifiable sender is admitted; the deny hint still applies
|
|
30
|
+
when the platform reports no sender id.
|
|
23
31
|
- A chat with no project starts nothing. The first message from an allowed
|
|
24
32
|
person gets a project picker (a card on Lark, an inline keyboard on Telegram,
|
|
25
33
|
a numbered text list on WeCom, which has no buttons: reply with the number or
|
|
@@ -49,7 +57,14 @@ project:
|
|
|
49
57
|
|
|
50
58
|
Platforms are adapters behind one plugin, not three plugins. Lark uses the
|
|
51
59
|
vendor SDK for its long connection; WeCom speaks JSON over a WebSocket; Telegram
|
|
52
|
-
is HTTP long-polling.
|
|
60
|
+
is HTTP long-polling. **WeCom App** (`wecom-app`) is the self-built application
|
|
61
|
+
channel: HTTP callbacks with official encrypt/decrypt, URL verification, inbound
|
|
62
|
+
text and images (fetched through `media/get`), outbound text, images and files
|
|
63
|
+
(`media/upload` then `message/send`). Private chats only; group messages are ignored.
|
|
64
|
+
It listens on `127.0.0.1:30987` by default (path `/wecom-app-callback/<rowId>/<secret>`);
|
|
65
|
+
put a reverse proxy or tunnel in front and paste the public URL into WeCom “Receive
|
|
66
|
+
messages → API receive”. Each column is validated, and a row with problems does not
|
|
67
|
+
connect. Streaming replies are not done yet — final replies go out actively.
|
|
53
68
|
|
|
54
69
|
The default is one message per finished turn. A single turn can produce dozens
|
|
55
70
|
of assistant messages, mostly commentary between tool calls.
|
|
@@ -241,3 +256,11 @@ plugin API version 3.
|
|
|
241
256
|
## License
|
|
242
257
|
|
|
243
258
|
UNLICENSED.
|
|
259
|
+
|
|
260
|
+
## 主动投递(骨架)
|
|
261
|
+
|
|
262
|
+
按 botId+targetId 投递(提案 [0068](../../docs/internals/proposals/0068-im-proactive-delivery.md)):
|
|
263
|
+
|
|
264
|
+
- 设置里可配投递目标,并 **opt-in** 开启本机 HTTP(**只听 `127.0.0.1`**,可选 Bearer token)。
|
|
265
|
+
- `POST /v1/delivery/messages` 体为 `{ botId, targetId, text }`;`botId` 是机器人表行 id。
|
|
266
|
+
- **不要**用 `network.serve` 当这条入站口;同 Host 插件互调另走 typed RPC(尚未做)。
|