huaxiren6/dsh-email-reader0

dsh-email-reader

OAuth2-capable IMAP email reader for DeepSeek Harness: list/read/search mail for accounts where password auth is disabled (Outlook post-2024), with automatic token refresh, app-password Gmail via optional proxy, and ol_email_* tools that coexist with the market dsh-email plugin.

包名
dsh-email-reader
版本
0.1.2
许可证
MIT
最近更新
2026年8月20日

安装

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

配置

方式一:OAuth2(推荐,Outlook 等强制 OAuth 的邮箱)

- insert:
    - id: email-reader
      name: dsh-email-reader
      config:
        accounts:
          - id: outlook
            host: outlook.office365.com
            port: 993
            user: you@outlook.com
            refreshToken: "从 OAuth 授权流程获取"
            clientId: "你的应用 Client ID"
            tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token"
            mailbox: INBOX

方式二:密码 / 应用专用密码

- insert:
    - id: email-reader
      name: dsh-email-reader
      config:
        host: imap.example.com
        port: 993
        user: you@example.com
        pass: your-app-password
        tls: true
        mailbox: INBOX

方式三:环境变量(凭据不落盘)

环境变量含义默认
DSH_IMAP_HOSTIMAP 服务器(必填)
DSH_IMAP_PORT端口993
DSH_IMAP_USER用户名
DSH_IMAP_PASS密码 / App 专用密码
DSH_IMAP_TLS是否 TLStrue
DSH_IMAP_MAILBOX默认邮箱INBOX
DSH_IMAP_OAUTH_REFRESHOAuth refresh token
DSH_IMAP_CLIENT_IDOAuth client id
DSH_IMAP_TOKEN_URLOAuth token 端点
DSH_IMAP_PROXY代理地址(如 http://127.0.0.1:7892

走代理访问 Gmail 的示例

- insert:
    - id: email-reader
      name: dsh-email-reader
      config:
        accounts:
          - id: gmail
            host: imap.gmail.com
            port: 993
            user: you@gmail.com
            pass: your-app-password
            proxy: "http://127.0.0.1:7892"
            mailbox: INBOX

使用示例

对模型说:

  • 「看下收件箱最近 5 封邮件」→ ol_email_list
  • 「读第 12 封邮件的内容」→ ol_email_read
  • 「搜一下主题里含 'invoice' 的邮件」→ ol_email_search

每个工具都支持可选的 connection 覆盖对象({host, port, user, pass, tls, mailbox}),一个插件可访问多个邮箱。