@michengai/dsh-im-connect 0.1.21 → 0.1.23
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/CHANGELOG.md +38 -0
- package/CHANGELOG.zh-CN.md +38 -0
- package/README.en.md +10 -5
- package/README.md +10 -5
- package/client.js +1 -2
- package/lib/channels/qr/qq.d.ts +1 -0
- package/lib/channels/qr/qq.d.ts.map +1 -1
- package/lib/channels/qr/qq.js +2 -1
- package/lib/channels/qr/qq.js.map +1 -1
- package/lib/client.js +1 -2
- package/package.json +4 -2
- package/src/channels/qr/qq.ts +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[简体中文](CHANGELOG.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
The five most recent published versions are listed below. This repository did not create Git tags for these releases, so each version links to its release commit.
|
|
6
|
+
|
|
7
|
+
## 0.1.23 — 2026-08-23
|
|
8
|
+
|
|
9
|
+
- Added bilingual changelogs covering the five most recent releases.
|
|
10
|
+
- Linked the release history from both README editions and included it in the npm package.
|
|
11
|
+
|
|
12
|
+
Published package: [`@michengai/dsh-im-connect@0.1.23`](https://www.npmjs.com/package/@michengai/dsh-im-connect/v/0.1.23).
|
|
13
|
+
|
|
14
|
+
## 0.1.22 — 2026-08-23
|
|
15
|
+
|
|
16
|
+
- Refreshed approval state handling.
|
|
17
|
+
- Allowed the QQ connector scanner required by the current login flow.
|
|
18
|
+
|
|
19
|
+
Release commit: [`47d1936`](https://github.com/MichengAI/dsh-im-connect/commit/47d1936).
|
|
20
|
+
|
|
21
|
+
## 0.1.21 — 2026-08-23
|
|
22
|
+
|
|
23
|
+
- Trusted validated WeCom group callbacks.
|
|
24
|
+
- Hardened IM channel runtime behavior.
|
|
25
|
+
|
|
26
|
+
Release commit: [`be07643`](https://github.com/MichengAI/dsh-im-connect/commit/be07643).
|
|
27
|
+
|
|
28
|
+
## 0.1.20 — 2026-08-23
|
|
29
|
+
|
|
30
|
+
- Preserved UTF-8 API request bodies across connector requests.
|
|
31
|
+
|
|
32
|
+
Release commit: [`21e06e6`](https://github.com/MichengAI/dsh-im-connect/commit/21e06e6).
|
|
33
|
+
|
|
34
|
+
## 0.1.19 — 2026-08-23
|
|
35
|
+
|
|
36
|
+
- Hardened IM channel startup and runtime handling.
|
|
37
|
+
|
|
38
|
+
Release commit: [`92743d2`](https://github.com/MichengAI/dsh-im-connect/commit/92743d2).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 更新日志
|
|
2
|
+
|
|
3
|
+
[English](CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
以下记录最近发布的五个版本。仓库没有为这些版本创建 Git 标签,因此每个版本链接到对应的发布提交。
|
|
6
|
+
|
|
7
|
+
## 0.1.23 — 2026-08-23
|
|
8
|
+
|
|
9
|
+
- 新增中英文更新日志,展示最近五个发布版本。
|
|
10
|
+
- 在中英文 README 中加入更新日志入口,并将日志纳入 npm 包。
|
|
11
|
+
|
|
12
|
+
发布包:[`@michengai/dsh-im-connect@0.1.23`](https://www.npmjs.com/package/@michengai/dsh-im-connect/v/0.1.23)。
|
|
13
|
+
|
|
14
|
+
## 0.1.22 — 2026-08-23
|
|
15
|
+
|
|
16
|
+
- 刷新审批状态处理。
|
|
17
|
+
- 放行当前登录流程需要的 QQ 连接器扫码器。
|
|
18
|
+
|
|
19
|
+
发布提交:[`47d1936`](https://github.com/MichengAI/dsh-im-connect/commit/47d1936)。
|
|
20
|
+
|
|
21
|
+
## 0.1.21 — 2026-08-23
|
|
22
|
+
|
|
23
|
+
- 信任已经校验的企业微信群回调。
|
|
24
|
+
- 加强 IM 频道运行时处理。
|
|
25
|
+
|
|
26
|
+
发布提交:[`be07643`](https://github.com/MichengAI/dsh-im-connect/commit/be07643)。
|
|
27
|
+
|
|
28
|
+
## 0.1.20 — 2026-08-23
|
|
29
|
+
|
|
30
|
+
- 在连接器 API 请求中完整保留 UTF-8 请求体。
|
|
31
|
+
|
|
32
|
+
发布提交:[`21e06e6`](https://github.com/MichengAI/dsh-im-connect/commit/21e06e6)。
|
|
33
|
+
|
|
34
|
+
## 0.1.19 — 2026-08-23
|
|
35
|
+
|
|
36
|
+
- 加强 IM 频道启动和运行时处理。
|
|
37
|
+
|
|
38
|
+
发布提交:[`92743d2`](https://github.com/MichengAI/dsh-im-connect/commit/92743d2)。
|
package/README.en.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
- Send work, read replies, and approve tools from the phone; model and permission follow the local DSH profile.
|
|
28
28
|
- Bind by QR code or credentials. Secrets go into DSH `ctx.credentials`, not `channels.json`.
|
|
29
29
|
- Paste one sentence into DSH, Codex, or WorkBuddy and let that agent install the plugin locally.
|
|
30
|
-
- Groups need no binding, only a mention. DMs
|
|
30
|
+
- Groups need no binding, only a mention. In DMs, QR scanners are auto-allowed only when the platform returns their identity; everyone else must be approved on the settings page.
|
|
31
31
|
- After a successful bind, the configure dialog closes by itself and Settings stays open.
|
|
32
32
|
|
|
33
33
|
## Who can drive the assistant
|
|
@@ -38,9 +38,10 @@ Inbound messages are identified before commands, tool approvals, or injection.
|
|
|
38
38
|
|---|---|
|
|
39
39
|
| Group without a mention of this bot | Ignored; mentioning someone else also does not trigger it |
|
|
40
40
|
| Group explicitly mentioning this bot | No binding. Anyone can send work |
|
|
41
|
-
| DM from the QR scanner | WeChat / Feishu / Lark scanners are allowlisted automatically |
|
|
41
|
+
| DM from the QR scanner | WeChat / Feishu / Lark / QQ scanners are allowlisted automatically |
|
|
42
42
|
| DM from anyone else | Appears on the settings pending list until approved |
|
|
43
|
-
| DM
|
|
43
|
+
| DM after identity-less QR binding | DingTalk / WeCom QR setup returns bot credentials only, so the scanner still needs settings approval |
|
|
44
|
+
| DM after manual credentials | Telegram, and DingTalk / WeCom / QQ bound manually, require approval for every DM |
|
|
44
45
|
| DM without a userId | Denied |
|
|
45
46
|
| Tool approval | Only an allowlisted user in a DM can reply `Approve` / `Deny` (or `批准` / `拒绝`); group replies do not grant |
|
|
46
47
|
|
|
@@ -192,7 +193,7 @@ Open **Settings → IM Assistant**, choose the workspace, permission, and model,
|
|
|
192
193
|
| --- | --- | --- |
|
|
193
194
|
| Connect a channel | Select **Configure** on an unconnected card, then scan or enter credentials | Feishu / Lark / WeChat are QR-only; Telegram needs a Bot Token; the dialog closes after success |
|
|
194
195
|
| Pause receiving | Turn off the connected-card toggle | Credentials stay; inbound messages pause |
|
|
195
|
-
| Send work from IM |
|
|
196
|
+
| Send work from IM | WeChat / Feishu / Lark / QQ QR scanners can DM immediately; DingTalk / WeCom scanners and other users need approval. Groups only need a mention | Each chat has its own channel session |
|
|
196
197
|
| Split input | End with `..` to continue, `!!` to flush now | Default merge window is about 5 seconds |
|
|
197
198
|
| Start a new session | Send `/new` or `/clear` | Affects only the current IM chat |
|
|
198
199
|
| Status / help | Send `/status` or `/help` | Scoped to the current channel session |
|
|
@@ -206,7 +207,7 @@ DingTalk replies prefer official AI Card streaming and fall back to plain text.
|
|
|
206
207
|
|
|
207
208
|
| Item | Current behavior |
|
|
208
209
|
| --- | --- |
|
|
209
|
-
| Access | Groups need no binding, only a mention. DMs fail closed:
|
|
210
|
+
| Access | Groups need no binding, only a mention. DMs fail closed: WeChat / Feishu / Lark / QQ QR scanners are auto-allowlisted; DingTalk / WeCom QR APIs do not return user identity, so their scanners still need settings approval |
|
|
210
211
|
| Management API | Enforces both a loopback peer and loopback host (`localhost`, `127.0.0.1`, `[::1]`); mutations require JSON and the plugin client header |
|
|
211
212
|
| Secrets | WeChat tokens and other secrets prefer DSH `ctx.credentials`; otherwise they use plaintext `%DSH_HOME%\dsh-im-connect\secrets.json`, restricted to the current user and never safe to sync or share |
|
|
212
213
|
| Channel state | `channels.json` stores enablement and credential refs, not raw secrets |
|
|
@@ -253,3 +254,7 @@ npm test
|
|
|
253
254
|
Project status, usage boundaries, architecture, and iteration records begin at the [documentation entry point](docs/00-交接入口/00-阅读导航.md). The detailed operational guide is [Usage guide](docs/02-产品与业务/04-使用说明.md). The default security posture is in [SECURITY.md](SECURITY.md).
|
|
254
255
|
|
|
255
256
|
Licensed under [Apache License 2.0](LICENSE).
|
|
257
|
+
|
|
258
|
+
## Changelog
|
|
259
|
+
|
|
260
|
+
See [CHANGELOG.md](CHANGELOG.md) for the five most recent releases.
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
- 手机里直接下任务、看回复、批准工具;模型和权限跟随本机 DSH。
|
|
28
28
|
- 支持扫码绑定或手动填凭据;敏感字段写入 DSH `ctx.credentials`,不会进 `channels.json`。
|
|
29
29
|
- 可把一句话复制到 DSH、Codex 或 WorkBuddy,让对方代装到本机 DSH。
|
|
30
|
-
- 群聊不用绑定,@
|
|
30
|
+
- 群聊不用绑定,@ 即可对话;私聊中,平台能返回身份的扫码用户自动放行,其他人要在设置页批准。
|
|
31
31
|
- 扫码成功后配置弹窗自动关闭,设置页保持打开。
|
|
32
32
|
|
|
33
33
|
## 谁可以驱动助手
|
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
|---|---|
|
|
39
39
|
| 群聊未 @ 当前机器人 | 忽略,不回复、不进待批准;只 @ 其他成员也不触发 |
|
|
40
40
|
| 群聊已准确 @ 当前机器人 | 不用绑定,任何人都可以下任务 |
|
|
41
|
-
| 私聊 · 扫码用户 | 微信 / 飞书 / Lark 扫码者自动进白名单,可直接对话 |
|
|
41
|
+
| 私聊 · 扫码用户 | 微信 / 飞书 / Lark / QQ 扫码者自动进白名单,可直接对话 |
|
|
42
42
|
| 私聊 · 其他人 | 进入设置页待批准;不批准就不能驱动助手 |
|
|
43
|
-
| 私聊 ·
|
|
43
|
+
| 私聊 · 扫码不返回身份 | 钉钉 / 企微的快捷绑定只返回机器人凭据,扫码者仍需在设置页批准 |
|
|
44
|
+
| 私聊 · 手动凭据 | Telegram,以及手动填写凭据的钉钉 / 企微 / QQ,所有私聊都要先批准 |
|
|
44
45
|
| 私聊缺少 userId | 拒绝 |
|
|
45
46
|
| 工具审批 | 仅白名单用户在私聊回复「批准 / 拒绝」有效;群聊里回不算 |
|
|
46
47
|
|
|
@@ -192,7 +193,7 @@ dsh --profile web --dump-config
|
|
|
192
193
|
| --- | --- | --- |
|
|
193
194
|
| 连接渠道 | 未连接卡片点「配置」,扫码或填写凭据 | 飞书 / Lark / 微信仅扫码;Telegram 仅填 Bot Token;成功后配置弹窗自动关闭 |
|
|
194
195
|
| 暂停接收 | 关闭已连接卡片上的开关 | 凭据保留,只是暂时不收消息 |
|
|
195
|
-
| 在 IM 里下任务 |
|
|
196
|
+
| 在 IM 里下任务 | 微信 / 飞书 / Lark / QQ 扫码用户可直接私聊;钉钉 / 企微扫码者和其他用户需先批准。群聊只需 @ | 每个聊天对应一条独立频道会话 |
|
|
196
197
|
| 分段输入 | 结尾加 `..` 表示还有后续,`!!` 表示立即提交 | 默认约 5 秒合并窗口 |
|
|
197
198
|
| 新开会话 | 发送 `/new` 或 `/clear` | 只影响当前 IM 聊天,不影响网页任务 |
|
|
198
199
|
| 查看状态 / 帮助 | 发送 `/status` 或 `/help` | 只作用于当前频道会话 |
|
|
@@ -206,7 +207,7 @@ dsh --profile web --dump-config
|
|
|
206
207
|
|
|
207
208
|
| 项 | 当前行为 |
|
|
208
209
|
| --- | --- |
|
|
209
|
-
| 用户准入 | 群聊不用绑定,只需
|
|
210
|
+
| 用户准入 | 群聊不用绑定,只需 @。私聊默认拒绝:微信 / 飞书 / Lark / QQ 扫码者自动放行;钉钉 / 企微扫码不返回用户身份,仍需设置页批准 |
|
|
210
211
|
| 管理接口 | 强制校验本机回环来源及 Host(`localhost` / `127.0.0.1` / `[::1]`);写接口要求 JSON 和插件客户端请求头 |
|
|
211
212
|
| 敏感字段 | 包括微信 token 在内均优先写入 DSH `ctx.credentials`;没有该服务时落到 `%DSH_HOME%\dsh-im-connect\secrets.json`(明文,仅限当前用户,禁止同步或分享) |
|
|
212
213
|
| 渠道状态 | `channels.json` 只保存启用状态和凭据引用,不保存明文 Secret |
|
|
@@ -253,3 +254,7 @@ npm test
|
|
|
253
254
|
项目状态、使用边界、技术架构和迭代记录从[文档交接入口](docs/00-交接入口/00-阅读导航.md)开始。详细操作说明见 [使用说明](docs/02-产品与业务/04-使用说明.md)。默认安全姿态见 [SECURITY.md](SECURITY.md)。
|
|
254
255
|
|
|
255
256
|
本项目采用 [Apache License 2.0](LICENSE)。
|
|
257
|
+
|
|
258
|
+
## 更新日志
|
|
259
|
+
|
|
260
|
+
最近五个发布版本见 [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md)。
|
package/client.js
CHANGED
|
@@ -923,10 +923,9 @@ window.__ModuleLoader__.load({
|
|
|
923
923
|
|
|
924
924
|
useEffect(() => { ensureStyle(); refresh(); }, [refresh]);
|
|
925
925
|
useEffect(() => {
|
|
926
|
-
if (!(pending || []).length) return;
|
|
927
926
|
const timer = setInterval(refresh, 4000);
|
|
928
927
|
return () => clearInterval(timer);
|
|
929
|
-
}, [
|
|
928
|
+
}, [refresh]);
|
|
930
929
|
|
|
931
930
|
const onAction = (id, action, body) => {
|
|
932
931
|
setBusy((prev) => ({ ...prev, [id]: true }));
|
package/lib/channels/qr/qq.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type QqQrStart = (callbacks: QqQrCallbacks, options: {
|
|
|
13
13
|
export declare function parseQqQrSuccess(raw: unknown): {
|
|
14
14
|
appId: string;
|
|
15
15
|
appSecret: string;
|
|
16
|
+
ownerOpenId?: string;
|
|
16
17
|
} | undefined;
|
|
17
18
|
export declare function beginQqQr(signal?: AbortSignal, start?: QqQrStart, firstQrTimeoutMs?: number): Promise<PairingBegin>;
|
|
18
19
|
//# sourceMappingURL=qq.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qq.d.ts","sourceRoot":"","sources":["../../../src/channels/qr/qq.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAoB,MAAM,aAAa,CAAA;AAE9E,MAAM,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CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAA;AAEvC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CASrH;AAED,wBAAsB,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,SAA0B,EAAE,gBAAgB,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAgEzI"}
|
package/lib/channels/qr/qq.js
CHANGED
|
@@ -10,7 +10,8 @@ export function parseQqQrSuccess(raw) {
|
|
|
10
10
|
const appSecret = cleanString(rec.appSecret);
|
|
11
11
|
if (!appId || !appSecret)
|
|
12
12
|
return undefined;
|
|
13
|
-
|
|
13
|
+
const ownerOpenId = cleanString(rec.userOpenid);
|
|
14
|
+
return ownerOpenId ? { appId, appSecret, ownerOpenId } : { appId, appSecret };
|
|
14
15
|
}
|
|
15
16
|
export async function beginQqQr(signal, start = startQrConnect, firstQrTimeoutMs = 15_000) {
|
|
16
17
|
let status = { status: 'waiting' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qq.js","sourceRoot":"","sources":["../../../src/channels/qr/qq.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,WAAW,EAAuC,MAAM,aAAa,CAAA;AAc9E,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAC/C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAA;IACzD,MAAM,GAAG,GAAG,KAAgC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CAAA;QAC5C,MAAM,KAAK,CAAA;IACb,CAAC;YAAS,CAAC;QACT,IAAI,KAAK;YAAE,YAAY,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;IACD,OAAO;QACL,KAAK,EAAE,KAAK,IAAI,KAAK;QACrB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM;QAClC,cAAc,EAAE,IAAI;QACpB,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC;QAC/D,OAAO,EAAE,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;KAC7D,CAAA;AACH,CAAC"}
|
package/lib/client.js
CHANGED
|
@@ -923,10 +923,9 @@ window.__ModuleLoader__.load({
|
|
|
923
923
|
|
|
924
924
|
useEffect(() => { ensureStyle(); refresh(); }, [refresh]);
|
|
925
925
|
useEffect(() => {
|
|
926
|
-
if (!(pending || []).length) return;
|
|
927
926
|
const timer = setInterval(refresh, 4000);
|
|
928
927
|
return () => clearInterval(timer);
|
|
929
|
-
}, [
|
|
928
|
+
}, [refresh]);
|
|
930
929
|
|
|
931
930
|
const onAction = (id, action, body) => {
|
|
932
931
|
setBusy((prev) => ({ ...prev, [id]: true }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-im-connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "DeepSeek Harness IM 助理:把本机 agent 接到微信、企微、钉钉、飞书、QQ、Telegram,会话与网页任务分列。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"assets",
|
|
23
23
|
"README.md",
|
|
24
24
|
"README.en.md",
|
|
25
|
-
"SECURITY.md"
|
|
25
|
+
"SECURITY.md",
|
|
26
|
+
"CHANGELOG.md",
|
|
27
|
+
"CHANGELOG.zh-CN.md"
|
|
26
28
|
],
|
|
27
29
|
"repository": {
|
|
28
30
|
"type": "git",
|
package/src/channels/qr/qq.ts
CHANGED
|
@@ -14,14 +14,15 @@ export type QqQrStart = (
|
|
|
14
14
|
options: { displayQrCodeToConsole: boolean; source: string; signal?: AbortSignal },
|
|
15
15
|
) => (() => void) | Promise<() => void>
|
|
16
16
|
|
|
17
|
-
export function parseQqQrSuccess(raw: unknown): { appId: string; appSecret: string } | undefined {
|
|
17
|
+
export function parseQqQrSuccess(raw: unknown): { appId: string; appSecret: string; ownerOpenId?: string } | undefined {
|
|
18
18
|
const first = Array.isArray(raw) ? raw[0] : raw
|
|
19
19
|
if (!first || typeof first !== 'object') return undefined
|
|
20
20
|
const rec = first as Record<string, unknown>
|
|
21
21
|
const appId = cleanString(rec.appId)
|
|
22
22
|
const appSecret = cleanString(rec.appSecret)
|
|
23
23
|
if (!appId || !appSecret) return undefined
|
|
24
|
-
|
|
24
|
+
const ownerOpenId = cleanString(rec.userOpenid)
|
|
25
|
+
return ownerOpenId ? { appId, appSecret, ownerOpenId } : { appId, appSecret }
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export async function beginQqQr(signal?: AbortSignal, start: QqQrStart = startQrConnect, firstQrTimeoutMs = 15_000): Promise<PairingBegin> {
|