@xmanrui/dsh-im 4.9.0 → 4.10.0
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/PROACTIVE_DELIVERY.en.md +8 -0
- package/PROACTIVE_DELIVERY.md +8 -0
- package/lib/client.js +679 -73
- package/lib/index.js +276 -275
- package/package.json +21 -6
- package/plugin-src/client/channels/dingtalk/api.js +23 -6
- package/plugin-src/client/channels/dingtalk/index.js +33 -6
- package/plugin-src/client/channels/dingtalk/styles.js +2 -0
- package/plugin-src/client/channels/feishu/api.js +2 -0
- package/plugin-src/client/channels/feishu/index.js +54 -0
- package/plugin-src/client/global-settings.js +341 -0
- package/plugin-src/client/i18n.js +33 -0
- package/plugin-src/client/index.js +47 -6
- package/plugin-src/client/styles.js +49 -0
- package/plugin-src/host/channels/dingtalk/production.mjs +12 -0
- package/plugin-src/host/channels/dingtalk/rpc.mjs +24 -0
- package/plugin-src/host/channels/feishu/production.mjs +14 -0
- package/plugin-src/host/channels/feishu/rpc.mjs +16 -0
- package/plugin-src/host/channels/qq/production.mjs +12 -0
- package/plugin-src/host/channels/shared/production.mjs +12 -0
- package/plugin-src/host/channels/slack/production.mjs +12 -0
- package/plugin-src/host/channels/wecom/production.mjs +12 -0
- package/plugin-src/host/channels/weixin/production.mjs +12 -0
- package/plugin-src/host/channels/whatsapp/production.mjs +12 -0
- package/plugin-src/host/delivery-adapter.mjs +1 -0
- package/plugin-src/host/delivery-service.mjs +15 -0
- package/plugin-src/host/harness-session-coordinator.mjs +26 -5
- package/plugin-src/host/inbound-ttl-rpc.mjs +83 -0
- package/plugin-src/host/inbound-ttl-runtime.mjs +85 -0
- package/plugin-src/host/inbound-ttl-service.mjs +179 -0
- package/plugin-src/host/index.mjs +8 -0
- package/plugin-src/host/modern-harness-api.mjs +75 -10
- package/src/channels/dingtalk/connection-error.mjs +299 -0
- package/src/channels/dingtalk/dingtalk-controller.mjs +79 -34
- package/src/channels/dingtalk/dingtalk-runtime.mjs +9 -2
- package/src/channels/feishu/bridge.mjs +164 -4
- package/src/channels/feishu/feishu-channel.mjs +45 -10
- package/src/channels/feishu/feishu-runtime.mjs +9 -0
- package/src/channels/feishu/message-utils.mjs +13 -0
- package/src/channels/feishu/multi-bot-controller.mjs +16 -0
- package/src/channels/feishu/plugin-config-store.mjs +1 -0
- package/src/channels/feishu/state-store.mjs +25 -0
- package/src/channels/shared/bot-workspace-store.mjs +6 -0
- package/src/channels/shared/i18n-en/dingtalk.mjs +23 -0
- package/src/channels/shared/inbound-file.mjs +117 -2
- package/src/channels/shared/inbound-ttl-store.mjs +110 -0
- package/src/channels/shared/inbound-ttl.mjs +22 -0
package/PROACTIVE_DELIVERY.en.md
CHANGED
|
@@ -165,6 +165,14 @@ const targets = await ctx.dshIm.listTargets(botId);
|
|
|
165
165
|
// [{ targetId, name?, kind, route }, ...]
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
+
Companion plugins can discover configured bots through the same Host service:
|
|
169
|
+
|
|
170
|
+
```js
|
|
171
|
+
const bots = await ctx.dshIm.listBots();
|
|
172
|
+
// [{ botId, channel }, ...]
|
|
173
|
+
```
|
|
174
|
+
The result contains stable public metadata only; it never includes credentials, platform routes, or target data.
|
|
175
|
+
|
|
168
176
|
On failure, the Promise rejects with an Error whose `code` is one of the public error codes below.
|
|
169
177
|
|
|
170
178
|
## Send through Connection RPC
|
package/PROACTIVE_DELIVERY.md
CHANGED
|
@@ -165,6 +165,14 @@ const targets = await ctx.dshIm.listTargets(botId);
|
|
|
165
165
|
// [{ targetId, name?, kind, route }, ...]
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
+
同 Host 插件可以通过同一个服务发现已配置机器人:
|
|
169
|
+
|
|
170
|
+
```js
|
|
171
|
+
const bots = await ctx.dshIm.listBots();
|
|
172
|
+
// [{ botId, channel }, ...]
|
|
173
|
+
```
|
|
174
|
+
返回值只包含稳定的公开元数据,不包含凭据、平台路由或目标内容。
|
|
175
|
+
|
|
168
176
|
调用失败时 Promise 会拒绝,`error.code` 使用本文后面的公共错误码。
|
|
169
177
|
|
|
170
178
|
## 通过 Connection RPC 发送
|