@ycodium-ai/plugin-im 0.2.2962 → 0.2.2966

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
@@ -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, who may use it); the
10
- chats it talks in (private chats, groups) are not configured, they pick their own
11
- project:
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
- - **Allowed people** is an allow-list of that platform's user ids. Empty means
20
- nobody can make the agent work. Someone who is not on it gets one reply with
21
- their own user id and where to put it, at most once every ten minutes per
22
- person (the table of who was told is bounded in memory).
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,12 @@ 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 (YCO-235): HTTP callbacks with official encrypt/decrypt, URL verification,
62
+ inbound text, and outbound `cgi-bin/message/send`. It listens on `127.0.0.1:30987`
63
+ by default (path `/wecom-app-callback/<rowId>/<secret>`); put a reverse proxy or
64
+ tunnel in front and paste the public URL into WeCom “Receive messages → API receive”.
65
+ Streaming and media are not in this skeleton yet — final replies go out actively.
53
66
 
54
67
  The default is one message per finished turn. A single turn can produce dozens
55
68
  of assistant messages, mostly commentary between tool calls.
@@ -241,3 +254,11 @@ plugin API version 3.
241
254
  ## License
242
255
 
243
256
  UNLICENSED.
257
+
258
+ ## 主动投递(骨架)
259
+
260
+ 按 botId+targetId 投递(提案 [0068](../../docs/internals/proposals/0068-im-proactive-delivery.md)):
261
+
262
+ - 设置里可配投递目标,并 **opt-in** 开启本机 HTTP(**只听 `127.0.0.1`**,可选 Bearer token)。
263
+ - `POST /v1/delivery/messages` 体为 `{ botId, targetId, text }`;`botId` 是机器人表行 id。
264
+ - **不要**用 `network.serve` 当这条入站口;同 Host 插件互调另走 typed RPC(尚未做)。