dsh-feishu-lark-notify 0.25.0 → 0.25.1
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 +24 -3
- package/README.zh.md +24 -3
- package/docs/README.md +1 -0
- package/docs/quickstart.md +3 -3
- package/docs/troubleshooting.md +13 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,8 +47,29 @@ session session-xxxx · D:\projects\日常
|
|
|
47
47
|
- **Signed webhooks**: HMAC-SHA256 signing for bots that enable 签名校验.
|
|
48
48
|
- **No subagent spam**: child-agent turns are skipped by default.
|
|
49
49
|
- **Quiet mode**: `minDurationMs` drops short turns.
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
50
|
+
- **Optional inbound commands, with control** (off by default): a long connection receives messages (no public URL) and understands `列表` + a number, `@title …`, `@最近 …` to target a specific session. `停止` cancels the current turn, `状态` reports which sessions are running. Four gates ship closed — signature, whitelist, prefix, rate limit — plus `dryRun`. See [docs/inbound.md](docs/inbound.md).
|
|
51
|
+
- **Attachments both ways**: images and files sent from Feishu are downloaded and their path handed to the session; `npm run send-file` pushes your artifacts back to Feishu.
|
|
52
|
+
- **One-command check-up**: `npm run doctor` verifies config, scopes, chat reachability and a real send — it tells you what is missing instead of leaving you with an error code.
|
|
53
|
+
- **The link is visible**: the page shows last inbound time, probe status and the last failure text; a probe runs every 3 minutes so a dead connection is no longer silent.
|
|
54
|
+
- **Trim the payload**: reasoning is **not pushed** by default, and prompt / answer / project / tool count / duration / time / session are eight individual toggles.
|
|
55
|
+
- **Resilient by default**: sends retry once, a dropped link surfaces in the probe, and a broken notifier only writes a log line.
|
|
56
|
+
|
|
57
|
+
## Quick start (30 seconds)
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
dsh plugin --profile desktop add dsh-feishu-lark-notify # install (that is the package name)
|
|
61
|
+
npm run doctor --prefix <plugin dir> # check-up: says what is missing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Add a mount entry to the profile (`name` is the package name), then open `/plugins/feishu-notify` and pick a chat:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
- insert:
|
|
68
|
+
- id: feishu-notify
|
|
69
|
+
name: 'dsh-feishu-lark-notify'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Full walkthrough (create the app, scopes, `.env`) in [setup from scratch](docs/quickstart.md).
|
|
52
73
|
|
|
53
74
|
## Install
|
|
54
75
|
|
|
@@ -306,7 +327,7 @@ node scripts/send-file.mjs report.docx --to-last --dry
|
|
|
306
327
|
npm run dist
|
|
307
328
|
```
|
|
308
329
|
|
|
309
|
-
Writes three artifacts into `dist/`: `dsh-feishu-notify-<version>.tgz` (for `dsh plugin add`),
|
|
330
|
+
Writes three artifacts into `dist/`: `dsh-feishu-lark-notify-<version>.tgz` (for `dsh plugin add`),
|
|
310
331
|
`<version>-source.zip` (for people without git), and `SHA256SUMS.txt`.
|
|
311
332
|
|
|
312
333
|
### Approve from Feishu
|
package/README.zh.md
CHANGED
|
@@ -33,6 +33,23 @@ DSH(DeepSeek Harness)每轮对话结束时,向**飞书**推送任务完成
|
|
|
33
33
|
session session-xxxx · D:\projects\日常
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
## 30 秒上手
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
dsh plugin --profile desktop add dsh-feishu-lark-notify # 装(包名就叫这个)
|
|
40
|
+
npm run doctor --prefix <插件目录> # 体检:配错了会直接说缺什么
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
在 profile 里加一条挂载(`name` 写包名),然后打开 `/plugins/feishu-notify` 点选会话即可:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- insert:
|
|
47
|
+
- id: feishu-notify
|
|
48
|
+
name: 'dsh-feishu-lark-notify'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
完整步骤(建应用、勾权限、写 `.env`)见 [从零配置](docs/quickstart.md)。
|
|
52
|
+
|
|
36
53
|
## 特性
|
|
37
54
|
|
|
38
55
|
- **八个渠道,各自独立开关**:飞书、企业微信、钉钉(自动加签)、Slack、Discord、Telegram、邮件(内置 SMTP)、通用 Webhook。开一个不影响另一个,只开开关没填地址只会被跳过。
|
|
@@ -46,8 +63,12 @@ session session-xxxx · D:\projects\日常
|
|
|
46
63
|
- **卡片或纯文本**:项目、任务、耗时、工具调用次数、最终回答摘要、session id。
|
|
47
64
|
- **支持加签**:开了「签名校验」的机器人走 HMAC-SHA256 签名。
|
|
48
65
|
- **不刷屏**:默认不通知子 agent 的轮次;`minDurationMs` 可丢弃过短的轮次。
|
|
49
|
-
-
|
|
50
|
-
-
|
|
66
|
+
- **可选:接收指令,双向控制**(默认关闭):长连接收消息(无需公网),支持 `列表` + 编号、`@标题`、`@最近` 把指令交给指定会话;`停止` 中断当前轮、`状态` 看各会话在跑还是空闲。白名单、前缀、限流、`dryRun` 四道闸默认全关。详见 [docs/inbound.md](docs/inbound.md)。
|
|
67
|
+
- **附件双向**:飞书发来的图片/文件下载到本地并把路径交给会话;反过来 `npm run send-file` 把你的产物推回飞书。
|
|
68
|
+
- **一键体检**:`npm run doctor` 逐项检查配置、权限、会话可达、能否发送,缺什么直接说,不用猜错误码。
|
|
69
|
+
- **链路看得见**:配置页显示「最近收到消息」「探活正常/失败」「最近一次失败原文」;每 3 分钟主动探一次,断线不再静默。
|
|
70
|
+
- **推来的内容可裁剪**:思考过程默认**不推**;任务/回答/项目名/工具次数/耗时/时间/session 八项逐项开关。
|
|
71
|
+
- **坏链路不拖累主流程**:发送失败自动重试一次;长连接断了有探活兜底;通知挂了也只写日志,绝不抛回事件循环。
|
|
51
72
|
|
|
52
73
|
## 安装
|
|
53
74
|
|
|
@@ -318,7 +339,7 @@ node scripts/send-file.mjs 报告.docx --to-last --dry
|
|
|
318
339
|
npm run dist
|
|
319
340
|
```
|
|
320
341
|
|
|
321
|
-
一次产出 `dist/` 下三件套:`dsh-feishu-notify-<版本>.tgz`(`dsh plugin add` 用)、
|
|
342
|
+
一次产出 `dist/` 下三件套:`dsh-feishu-lark-notify-<版本>.tgz`(`dsh plugin add` 用)、
|
|
322
343
|
`<版本>-source.zip`(不想用 git 的人)、`SHA256SUMS.txt`(校验和)。
|
|
323
344
|
|
|
324
345
|
### 在飞书里直接批准
|
package/docs/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| 我想… | 看这篇 |
|
|
6
6
|
|---|---|
|
|
7
7
|
| 第一次装、想尽快收到一条通知 | [从零配置(quickstart)](quickstart.md) |
|
|
8
|
+
| **装完发现没反应,想知道到底缺什么** | 先跑 `npm run doctor`,再查 [排错](troubleshooting.md) |
|
|
8
9
|
| 查某个字段 / 环境变量到底叫什么、默认值多少 | [配置项参考](config-reference.md)(**自动生成**,与代码同步) |
|
|
9
10
|
| 各平台怎么拿 webhook / token | [渠道接入](channels.md) |
|
|
10
11
|
| 在飞书里发指令让 DSH 干活(双向) | [接收指令的设计与安全边界](inbound.md) |
|
package/docs/quickstart.md
CHANGED
|
@@ -201,7 +201,7 @@ npm run doctor # 等价于第一种
|
|
|
201
201
|
| 检查点 | 期望看到 |
|
|
202
202
|
|---|---|
|
|
203
203
|
| 页面「最近发送日志」 | `chat-test 已发送 -> oc_xxx`、`message_id=om_xxx` |
|
|
204
|
-
| `<插件目录>/notify.log`(如果配了 `logFile`) | `feishu-notify 0.
|
|
204
|
+
| `<插件目录>/notify.log`(如果配了 `logFile`) | `feishu-notify 0.25.0 ready`、`配置页: /plugins/feishu-notify`、`长连接:已发起连接`、`限流:每个会话每分钟 6 条` |
|
|
205
205
|
| 飞书 | 收到一张卡片 |
|
|
206
206
|
| 双向模式 | 私聊机器人发一句话 → DSH 会话里出现这条指令,日志有 `ws:已提交指令到会话 session-xxx` |
|
|
207
207
|
| 页面「链路状态」那一行 | `🟢 最近收到消息:刚刚` —— 说明长连接真的在收事件(不是只有「已发起」) |
|
|
@@ -250,8 +250,8 @@ npm run dist
|
|
|
250
250
|
|
|
251
251
|
| 文件 | 给谁 |
|
|
252
252
|
|---|---|
|
|
253
|
-
| `dsh-feishu-notify-<版本>.tgz` | 用 `dsh plugin add <tgz>` 安装的人 |
|
|
254
|
-
| `dsh-feishu-notify-<版本>-source.zip` | 不想用 git 的人 |
|
|
253
|
+
| `dsh-feishu-lark-notify-<版本>.tgz` | 用 `dsh plugin add <tgz>` 安装的人 |
|
|
254
|
+
| `dsh-feishu-lark-notify-<版本>-source.zip` | 不想用 git 的人 |
|
|
255
255
|
| `SHA256SUMS.txt` | 校验下载的文件 |
|
|
256
256
|
|
|
257
257
|
---
|
package/docs/troubleshooting.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# 故障排查 / Troubleshooting
|
|
2
2
|
|
|
3
|
+
## 先跑体检,再来查表
|
|
4
|
+
|
|
5
|
+
```powershell
|
|
6
|
+
npm run doctor # 只读检查
|
|
7
|
+
npm run doctor -- --send # 额外真发一条,确认能发出去
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
它会逐项告诉你:凭据有没有、能不能换 token、机器人是谁、目标会话可达吗、长连接 SDK 装了吗、
|
|
11
|
+
发送能不能成功,并把 `99991672` / `230002` / `200671` 这类码翻译成「去开放平台补什么」。
|
|
12
|
+
**大多数问题看完体检结果就不用往下翻了。**
|
|
13
|
+
|
|
14
|
+
配置页上那行「链路状态」也能直接判断:🟢 最近收到消息 / 🔎 探活正常 / 🔴 探活失败 / ⚠️ 最近一次失败原文。
|
|
15
|
+
|
|
3
16
|
## 收不到消息 / 发不出去
|
|
4
17
|
|
|
5
18
|
| 现象(日志里的原文) | 原因 | 处理 |
|
package/lib/index.js
CHANGED