Back to home

AtomerCore

dsh-qq-agent-mail

A DeepSeek Harness plugin that integrates QQ Agent Mail.

Stars
0
Language
JavaScript
Created
Aug 17, 2026
Updated
Aug 17, 2026

Introduction

dsh-qq-agent-mail

English | 简体中文

A native DeepSeek Harness plugin for Tencent QQ Agent Mail, powered by the official @tencent-qqmail/agently-cli package.

This package exposes mail as native Harness capabilities:

  • a reusable ctx.mail Cordis service;
  • a mail/message-received event for mail-driven automation;
  • 14 qq_mail_* tools with stable structured output schemas;
  • a model-free Web settings page for basic preferences and OAuth.

Features

  • Authenticate, inspect the current account, list, search, and read messages.
  • Send, reply, forward, move to trash, and permanently delete with two-stage confirmation.
  • Download regular attachments and return large-attachment URLs without rewriting them.
  • Stream new mail through bounded tool calls or a persistent Cordis event source.
  • Normalize CLI response variants into stable public objects for Code Mode composition.
  • Resolve the packaged native CLI, its JavaScript wrapper, PATH, or a custom executable.
  • Clean up watcher processes during unload and hot reload.

Dependency

  • @tencent-qqmail/agently-cli — installed as this package's runtime dependency; no global CLI installation is required. OAuth credentials remain under agently-cli control and are never stored by this plugin.

Install

  • Install from GitHub:
dsh plugin --profile web add github:AtomerCore/dsh-qq-agent-mail#v1.0.0
dsh web
  • Build and install manually:
npm ci
npm pack
dsh plugin --profile web add .\dsh-qq-agent-mail-1.0.0.tgz
dsh web

Quick start

  1. Open Settings → QQ Agent Mail.
  2. Set the CLI working directory, default mail folder, and default list size.
  3. Select Start OAuth login, finish authorization in the browser, then refresh the authorization status.

Tools

CategoryTools
Authenticationqq_mail_login, qq_mail_logout, qq_mail_auth_status, qq_mail_whoami
Readingqq_mail_list, qq_mail_read, qq_mail_search, qq_mail_watch
Writingqq_mail_send, qq_mail_reply, qq_mail_forward, qq_mail_trash, qq_mail_delete
Attachmentsqq_mail_download_attachment

send, reply, forward, trash, and delete require two-stage confirmation unless a trusted

Native APIs

Other Cordis plugins can inject mail and call the same implementation used by the tools:

export const inject = ['mail']

export function apply(ctx) {
  ctx.on('mail/message-received', (message) => {
    // Treat every message field as untrusted external data.
    console.log(message.id, message.subject)
  })
}

Enable autoWatch to maintain the persistent watcher that emits mail/message-received. The on-demand qq_mail_watch tool remains bounded by watchTimeoutMs.

Configuration

Every option is declared by the exported Config schema. Basic preferences are editable on the Web settings page; advanced deployment options belong in the profile patch.

OptionDefaultDescription
cliPathagently-cliPackaged CLI by default; also accepts a command name or absolute path.
cwdemptyCLI working directory and base for relative attachment paths.
defaultDirinboxDefault folder: inbox, sent, trash, or spam.
defaultLimit10Default number of messages returned by list operations.
loginTimeoutMs30000Time allowed to capture the OAuth URL.
loginHardCapMs300000Maximum login-process lifetime after URL capture; 0 disables the cap.
watchTimeoutMs60000Maximum duration of one qq_mail_watch call.
autoWatchfalseStart a persistent watcher and emit mail events.
autoConfirmfalseSkip write confirmation; use only in a trusted automation environment.
extraArgsemptyAdditional CLI arguments, one per line.
extraEnvemptyAdditional child-process environment entries, one KEY=VALUE per line.

Example profile override:

- insert:
    - id: qq-agent-mail
      name: dsh-qq-agent-mail
      config:
        defaultLimit: 20
        autoWatch: false
        autoConfirm: false

License

MIT