HeIIoAgain/dsh-notify-email ↗★ 1

dsh-notify-email

DeepSeek Harness plugin that emails you when a turn finishes, when the agent waits for an answer or approval, and a send_email tool with attachment support.

パッケージ
dsh-notify-email
互換性
未検証
バージョン
1.0.0
ライセンス
MIT
最終更新
2026/11/03

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HeIIoAgain/dsh-notify-email

ドキュメント

README 全文を読む ↗

配置

配置写在 profile 的 patch 层($DSH_HOME/profiles/ /cordis.patch.yml):

- id: notify-email
  name: 'dsh-notify-email'
  config:
    smtpHost: smtp.qq.com
    smtpPort: 465
    secure: true
    user: you@qq.com          # 发件邮箱(= SMTP 登录账号)
    from: you@qq.com          # 发件人地址,一般与 user 相同
    to: you@qq.com            # 收件邮箱,多个用逗号分隔;可与 user 不同
    subjectPrefix: ''         # 标题前缀,留空则不加
    notifyOnQuestion: true
    notifyOnApproval: true
    notifyOnTurnEnd: false

config 是整体替换:按 id 覆盖时要把需要的字段写全。 发件地址必须与 SMTP 登录账号一致,否则 163/QQ 会拒信;收件地址可以是任意邮箱。

授权码

SMTP 密码不要写进 YAML。放进独立文件(每次发送时实时读取,改完不用重启):

mkdir -p ~/.dsh/notify-email
printf '%s' '你的SMTP授权码' > ~/.dsh/notify-email/password
chmod 600 ~/.dsh/notify-email/password

也可以用 passwordFile 指定其他路径,或用环境变量 DSH_SMTP_PASSWORD(启动 dsh 前 export)。

常见邮箱参数

邮箱smtpHost端口 / secure密码
QQ 邮箱smtp.qq.com465 / true设置 → 账户 → 开启 SMTP 后生成的授权码
163 邮箱smtp.163.com465 / true客户端授权码
126 邮箱smtp.126.com465 / true客户端授权码
Gmailsmtp.gmail.com465 / true(或 587 / false)应用专用密码(需开两步验证)
Outlook / Microsoft 365smtp.office365.com587 / false账户密码或应用密码
阿里云邮箱smtp.aliyun.com465 / true登录密码或授权码

25 端口通常被云厂商封禁,别用;587 端口需要 secure: false,插件会自动 STARTTLS。

使用

  • 直接说:“把刚才的结果发到我邮箱” → agent 调 send_email。
  • 带附件:“把 report.pdf 和 run.log 作为附件发我邮箱” → agent 传 attachments(绝对路径,或相对会话工作目录)。
  • 定时:用 DSH 自带 schedule_create 建提醒,prompt 里写明“把结果发到邮箱”,到点触发的回合里 agent 会调 send_email。
  • 每轮结束都要摘要:把 notifyOnTurnEnd 改成 true。
  • 需要诊断自动通知为什么没触发:把 debugLog 改成 true,日志写入 $DSH_HOME/notify-email/debug.log。

附件

  • 支持中文文件名(RFC 2231 编码),按扩展名自动判断 Content-Type(txt/md/json/csv/pdf/zip/png/jpg 等,其余按 application/octet-stream)
  • 默认限制:单个 ≤ 20MB、每封 ≤ 10 个,可用 maxAttachmentBytes / maxAttachments 调整
  • 文件不存在、不是普通文件、超过限制都会在读文件阶段直接报错,不会建立 SMTP 连接
  • 自动提醒(提问 / 授权 / 回合结束)不带附件

配置项

字段默认值说明
smtpHostsmtp.qq.comSMTP 服务器
smtpPort465端口;465 隐式 TLS,587 STARTTLS
securetruetrue 直接 TLS;587 设为 false
starttlstruesecure: false 时是否升级 STARTTLS
user—SMTP 登录账号(通常是发件邮箱)
from同 user发件人地址,必须与登录账号一致
to—默认收件人,逗号分隔
passwordFile$DSH_HOME/notify-email/password授权码文件
passwordEnvDSH_SMTP_PASSWORD授权码环境变量名
subjectPrefix[DSH]标题前缀,留空不加
notifyOnQuestiontrue等待回答时发提醒
notifyOnApprovaltrue等待授权时发提醒
notifyOnTurnEndfalse每轮结束发摘要
debugLogfalse写诊断日志
timeoutMs15000SMTP 超时
maxAttachmentBytes20971520单个附件上限(字节)
maxAttachments10单封附件数量上限