npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tyler9061/dsh-email

v0.1.5

Published

dsh web 邮件插件:分栏邮箱客户端(IMAP 接收 + SMTP 回复/快速回复)、设置界面(账号/权限/自动化)、agent 工具与自动处理、HTML 安全渲染

Readme

dsh-email

English | 中文

DeepSeek Harness 电子邮件插件:多邮箱收发(IMAP 接收 + SMTP 发送/回复), 暴露给 agent 的工具,以及自动处理任务(触发 headless agent)。

  • GitHub:https://github.com/optttt/dsh-email
  • npm:https://www.npmjs.com/package/@tyler9061/dsh-email

安装

从 npm 安装(推荐):

dsh plugin --profile web add @tyler9061/dsh-email

从源码安装(开发):

dsh plugin --profile web add link:/path/to/dsh-email

重启 dsh web 生效。

功能

  • 分栏布局:左侧邮件列表、右侧内容预览,页面自适应占满窗口;点击列表项即在 右侧即时阅读(不跳页、不闪动)。
  • 已读 / 未读:未读邮件加粗并带红点,已读变浅;读取即标记已读,红点立即消除。
  • 快速回复:预览区底部有回复输入框,不离开列表即可发送(自动提取收件人、自动 加 Re: 主题与 inReplyTo 引用);一键切换到全屏回复页。
  • 设置界面(工具栏 ⚙ 设置):账号管理(新增 / 编辑 / 删除、账号密码、权限: 允许 agent 读取 / agent 回复 / 发送到外部收件人)与自动化处理(开关 / 间隔 / 提示词)。
  • 账号红点:每个账号卡片显示未读数——开启自动处理后改为显示"尚未被 agent 处理"的邮件数。
  • HTML 安全渲染:邮件 HTML 经严格白名单净化后展示——脚本、事件、javascript: 链接、 <style> 块与危险 CSS 全部清除,保留安全内联样式与图片;纯文本作为回退。
  • 多邮箱 / 文件夹 / 写邮件:账号卡片切换,收件箱/已发送/广告邮件等文件夹自动识别, 写邮件/回复自动带 Re: 主题与 inReplyTo 引用。
  • 已发送去重:163/QQ 的 SMTP 会自动把发出的邮件存入「已发送」,插件按 Message-ID 查重后跳过自己的副本,避免重复存档。
  • 按日期倒序:邮件列表按日期最新在前排列。
  • 本地缓存:切换文件夹/账号秒开(不重复连 IMAP);自动拉取 1/5/30 分钟。
  • Agent 工具email_list / email_read / email_send,带每账号权限校验 (允许 agent 读取 / 允许 agent 回复)。

安全边界

  • HTML 白名单渲染script/style/iframe/object/form 及所有 on* 事件 整体丢弃;链接仅允许 https:/mailto:;图片仅允许 https: 与安全的光栅 data:image(不含 SVG);内联 CSS 经安全属性白名单过滤(不含 url()positionexpression@import
  • 每账号「允许发送到外部收件人」开关(关闭后仅限同域)
  • 发送频率限制(每账号每小时 30 封);主题 ≤200 字符、正文 ≤100KB
  • 发件地址强制 = SMTP 授权账号(163/QQ 要求)
  • 自动处理忽略高危邮件(中奖/转账/验证码/退款/发票/贷款等关键词)

自动处理任务(触发 agent)

  • 设置:启用开关 + 间隔(1H/5H/1D)+ 自定义提示词
  • 流程:拉取新邮件 → 高危过滤 → 生成任务文件(~/.dsh/email-tasks/task-*.md) → 触发 dsh --profile headless 按提示词处理
  • 日志:~/.dsh/email-tasks/log.txt

数据

  • 账号:~/.dsh/email.db(SQLite;密码 AES-256-GCM 加密,主密钥存 ~/.dsh/.email-key
  • 自动处理配置:~/.dsh/email-auto.json;任务:~/.dsh/email-tasks/

依赖

imapflow(IMAP)、nodemailer(SMTP)、mailparser(正文解析)、node:sqlite(内置)