dsh-email

DSH PLUGIN文档与办公

仓库 xuan25/dsh-email

文档与办公 L4 · 沙盒安装通过 安全审查:低风险 可信度:银 可安装插件
安装这个插件

dsh-email 是 xuan25 维护的 文档与办公 类 DSH 可安装插件, 仓库为 xuan25/dsh-email,许可证 MIT。 下面按「装什么、怎么装、验没验过、跑起来要注意什么」逐项列出。

一句话选型结论

按资料字段整理

dsh-email 是文档与办公类的 DSH 可安装插件,验证等级 L4 · 沙盒安装通过,安全审查为低风险,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类文档与办公 收录类型可安装插件 验证等级L4 · 沙盒安装通过 安全审查低风险
验证等级 L4 L4 · 沙盒安装通过
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-17 创建于 2026-10-02
README 14.6 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:xuan25/dsh-email
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

文档与办公
字段来自项目仓库与公开索引,中文说明由本站标注

适用场景

通知办公自动化

上游标签

dsh-plugin

验证等级与安全审查

L4 · 沙盒安装通过
自动化流程结论,不是人工审核
验证等级L4 · 沙盒安装通过安装命令在隔离沙盒内真实执行成功,无依赖错误
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度银综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L4:在沙盒里真实装过,依赖能装上,不是纸面声明。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在文档与办公场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-email当前 L4 · 沙盒安装通过 低风险 0 未标注 有
reactive-resume L3 · 安装规范通过 低风险 4.4 万 未标注 有
webnovel-writer L4 · 沙盒安装通过 低风险 7,742 未标注 有
baoyu-design L4 · 沙盒安装通过 低风险 6,403 未标注 有
answer-me-with-html L4 · 沙盒安装通过 低风险 4,782 未标注 有
Pagekin L4 · 沙盒安装通过 低风险 2,601 未标注 有

仓库档案

文档与办公
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方xuan25仓库 dsh-email · 默认分支 master
分类文档与办公office
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言未标注仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-02 · 2026-10-17最后推送 2026-10-17
本站收录2026-10-30首次进入本站目录的时间

README 全文

14.6 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-email

dsh-email gives a DSH agent working access to a mailbox: the email tool reads and sends the user's mail over standard IMAP/SMTP, so the agent can check and answer it with only a password or app-specific password.

  • Read and search mail: list, unread view, structured search, read without marking seen
  • Verify account health: verify checks every configured account live (IMAP login + SMTP authentication) with zero side effects
  • Send, reply, forward - with attachments
  • Manage mailboxes: create and delete folders, move messages
  • Multiple accounts in one plugin
  • Deletion is per-account gated: delete and delete_folder run only on accounts that opt in
  • Optional new-mail trigger: a per-account resident watcher dispatches a fresh agent session per new mail, running an operator-defined policy prompt
  • Session offload: a per-minute sweep archives settled trigger sessions that outlived their account's retention window (env-only: EMAIL__SESSION_RETENTION), keeping the framework session store bounded
  • Stateless verbs: one fresh connection per call (the trigger watcher is the only resident connection, only on enabled accounts)

Installation

dsh-email is an out-of-tree plugin for a dsh profile. Install it with the dsh plugin command:

dsh plugin --profile  add dsh-email

Configuration is layered: built-in defaults, the EMAIL_* env block, and a
cordis config layer (see below); the plugin creates no config or state files
in the profile directory (its only on-disk state is the session offload's
retention log and archive under $DSH_HOME/dsh-email/, used only by the
trigger plane, see Session offload).

Configuration

The env block is static per process boot; env changes take effect on a host
restart. One account needs four variables, the rest are optional:

Variable Required Meaning
EMAIL__USER yes login name shared by IMAP and SMTP (usually the mailbox address)
EMAIL__PASS yes password or the provider's app-specific password / auth code
EMAIL__IMAP_HOST yes IMAP server host
EMAIL__IMAP_PORT no IMAP port, default 993
EMAIL__IMAP_SECURE no IMAP TLS mode: tls = implicit TLS / starttls = mandatory STARTTLS upgrade / none = full plaintext, no STARTTLS attempted; default tls
EMAIL__IMAP_ALLOW_INSECURE_TLS no certificate validation: false = strict (default) / true = accept untrusted / self-signed certificates (only meaningful with the tls / starttls modes)
EMAIL__SMTP_HOST yes SMTP server host
EMAIL__SMTP_PORT no SMTP port, default 587
EMAIL__SMTP_SECURE no SMTP TLS mode: the same three values as the IMAP side; default starttls
EMAIL__SMTP_ALLOW_INSECURE_TLS no same as the IMAP side
EMAIL__FROM no sender address, default = EMAIL__USER
EMAIL__FROM_NAME no sender display name
EMAIL__SENT_FOLDER no when set, sends also copy the sent message into this folder
EMAIL__SENT_FOLDER_AUTOCREATE no default true: when the SENT_FOLDER copy fails because the folder is missing, create it (the exact name INBOX is never created) and retry once; false = never create
EMAIL__ALLOW_DELETE no default false (fail-closed): the gate for the delete and delete_folder verbs on this account; true = the agent may delete messages and mailboxes on it
EMAIL__TIMEOUT_MS no per-call timeout budget, default 120000
EMAIL__SESSION_RETENTION no default 0 (no offload): the retention window for trigger sessions on this account (env-only) - a non-negative integer ms or a duration of 1-2 segments in d/h/m/s/ms descending order (e.g. 24h, 4h30m, 90s, 5000ms; a bare numeric string is invalid); invalid values warn at boot and resolve to 0 (see Session offload)
EMAIL__TRIGGER_ENABLE no default false: enable the new-mail trigger watcher on this account (see New mail trigger)
EMAIL__TRIGGER_PROMPT required when TRIGGER_ENABLE=true the operator policy injected verbatim into every trigger session
EMAIL__TRIGGER_FOLDER no the folder the watcher listens on, default INBOX
EMAIL__TRIGGER_IDLE_MS no heartbeat resync period in ms, default 600000 (lower bound 1000, rejected not clamped)
EMAIL__TRIGGER_MAX_CONCURRENT no max concurrent trigger sessions, default 1
EMAIL__TRIGGER_QUEUE_MAX no max queued new mails, default 100 (overflow stays UNSEEN and is retried)
EMAIL__TRIGGER_PRESET no named agent preset for trigger sessions; absent = the deployment default
EMAIL__TRIGGER_REASONING_EFFORT no the reasoning effort of the trigger sessions: a member of the closed set off/minimal/low/medium/high/xhigh/max (validated at load; an invalid value makes the trigger malformed - warned, no watcher, the account stays usable; the framework re-checks the per-model support of the route at first request); absent = the framework provider default
EMAIL_DEFAULT_ACCOUNT no the account used when a call names no account
EMAIL_READ_BODY_LIMIT no read body truncation budget in characters, default 20000
EMAIL_OFFLOAD_BATCH no per-sweep offload budget (max trigger sessions one sweep may move to the archive), default 50; an invalid value warns and falls back to 50, never disables the sweep

The ` segment is the account name uppercased; the account name must match^[a-z][a-z0-9-]{0,31}$`. Accounts missing any required variable are dropped with a boot warning (boot never fails). Multiple accounts are supported.

Example:

EMAIL_DEFAULT_ACCOUNT=local
EMAIL_LOCAL_USER=agent@local.example
EMAIL_LOCAL_PASS=
EMAIL_LOCAL_IMAP_HOST=mail.local.example
EMAIL_LOCAL_SMTP_HOST=mail.local.example
EMAIL_LOCAL_SENT_FOLDER=Sent

Config layer (cordis patch)

An optional config layer sits on top of the env block: a patch entry targeting the plugin id dsh-email (the profile's cordis.patch.yml, the user-global ~/.dsh/cordis.patch.yml, or a --patch overlay) carries a config object whose keys are camelCase mirrors of the env fields - defaultAccount, readBodyLimit, and accounts (a map of account name to user, pass, imapHost, imapPort, imapSecure, imapAllowInsecureTls, smtpHost, smtpPort, smtpSecure, smtpAllowInsecureTls, from, fromName, sentFolder, sentFolderAutocreate, allowDelete, timeoutMs, plus the trigger fields triggerEnable, triggerPrompt, triggerFolder, triggerIdleMs, triggerMaxConcurrent, triggerQueueMax, triggerPreset, triggerReasoningEffort). Every key is optional.

- id: dsh-email
config:
readBodyLimit: 500
accounts:
default:
imapPort: 1043
  • One precedence chain: delivered value > env value > built-in default; keys the layer omits resolve as the env block, so config: {} (or no entry) is exactly the env-only behavior.
  • A patch targets a row by id and replaces its whole config - no deep merge, so a layer that overrides one field restates the fields it keeps (layer order: the plugin's own default entry, the profile patch, the user-global patch, any --patch overlay).
  • The layer is validated before the plugin starts: an unknown key or an out-of-range value fails the plugin entry at load; incomplete account data only warns, as in the env block.
  • With the live patch reload, editing the patch file re-runs the plugin without a restart; otherwise the change applies at the next restart.
  • The agent edits the patch file as a plain file operation under its own permissions; the plugin provides no tool for changing its own configuration. The accounts verb shows values only.

New mail trigger

With EMAIL__TRIGGER_ENABLE=true (plus a TRIGGER_PROMPT), the plugin keeps one resident IMAP connection on that account: it opens TRIGGER_FOLDER read-only (EXAMINE) and listens. New mail reaches it two ways - the server's untagged EXISTS (IDLE, or the library's NOOP polling on servers without IDLE) and a heartbeat resync every TRIGGER_IDLE_MS that recomputes the folder's UNSEEN set (the sole repair for a lost event or count drift, and the probe that detects a half-open connection). Both trigger the same action: dispatch a fresh agent session per new UNSEEN message.

EMAIL_DEFAULT_ACCOUNT=local
EMAIL_LOCAL_USER=agent@local.example
EMAIL_LOCAL_PASS=
EMAIL_LOCAL_IMAP_HOST=mail.local.example
EMAIL_LOCAL_SMTP_HOST=mail.local.example
EMAIL_LOCAL_TRIGGER_ENABLE=true
EMAIL_LOCAL_TRIGGER_PROMPT=Forward security alerts to the on-call list and mark handled in the archive folder.
EMAIL_LOCAL_TRIGGER_FOLDER=INBOX
EMAIL_LOCAL_TRIGGER_MAX_CONCURRENT=1

Each session receives a minimal prompt, laid out static-first: a type label naming account + folder, the TRIGGER_PROMPT verbatim under a Policy: block and the execution-rules pointer line, then the dynamic layer - one envelope line (uid | INTERNALDATE | From: | Subject:) and the message body as a Body: block (the first text part, else the first html part, capped at the read-body budget EMAIL_READ_BODY_LIMIT - omitted when the message has no text / html part or the body fetch degrades, in which case the prompt ends at the envelope line). The session's execution rules (get the body, act on the policy, mark the message seen, summarize) live in the skill's "Trigger session" section.

  • Dispatch state: up to TRIGGER_MAX_CONCURRENT sessions run at once; newer mails wait in a FIFO queue of at most TRIGGER_QUEUE_MAX; beyond that the overflow is a visible log entry and the mail simply stays UNSEEN (retried on a later resync).
  • Session route: each trigger session is created with the deployment's default model route when one resolves; TRIGGER_REASONING_EFFORT sets the session's reasoning effort (closed set, absent = the framework provider default), passed through to the framework's agent options.
  • Mark-seen is the session's job (via the email tool), not the watcher's. A session that settles without marking seen (or whose dispatch failed) is re-dispatched on the next resync - an idempotent replay, the designed behavior.
  • Failure modes all fail visible and self-heal: connect / command failures close the connection and reconnect through an exponential backoff (5s x 2, capped at 60s), then resync on the fresh connection (new mail that arrived in the meantime is picked up); a queue overflow, a failed dispatch (agents service missing, unresolvable preset, turn error) and a missing EXAMINE folder are visible log entries. The only non-self-healing state is the missing watched folder (the watcher stops and waits for the setting or the folder to change).
  • Trigger accounts without the agents service on the host (or with a malformed trigger configuration) start no watcher: the account stays fully usable through every mail verb, zero connections.
  • Division of labor: the trigger handles per-event reactions to new mail; periodic batch work over a mailbox stays with a scheduler (e.g. a dsh-timer cron job) - the two coexist, the watcher only ever reacts to UNSEEN mail.

Session offload

Trigger sessions leave on-disk session logs in the framework session store; at trigger-mail volume the store grows without bound. The per-minute offload sweep archives settled trigger sessions once the account's retention window elapses, so the store stays bounded: the store is never deleted, only moved, a session that is still running is kept until it settles, and a removed account is offloaded immediately regardless of age. The retention window and the per-sweep budget are the SESSION_RETENTION and EMAIL_OFFLOAD_BATCH settings in the table above (window syntax included). An unreachable persistence service, a missing store root, or an archive on a different mount disables the sweep for that round (a visible warning; log lines are never lost); a failed individual move is retried next round.

Usage

The plugin adds the email tool and the dsh-email skill (verb reference, env contract details, limits, troubleshooting). The sixteen verbs, one line each:

email { verb: "accounts" }                                  # configured accounts (local, no network)
email { verb: "verify" }                                    # live connectivity + credentials, zero side effects
email { verb: "folders" }                                    # mailbox names
email { verb: "list", flagged: true }                       # newest-first summaries, flagged only
email { verb: "list_unseen" }                                # the unread view
email { verb: "search", since: "2026-10-01", subject: "ci" } # structured criteria
email { verb: "read", uid: 42 }                              # parts + body (PEEK: does not mark seen)
email { verb: "mark", uids: [42], seen: true }               # set/clear seen and flagged
email { verb: "save_part", uid: 42, part: 1 }                # write one part to disk
email { verb: "send", to: "a@b.c", subject: "hi", text: "..." }  # plus html / attachments / cc / bcc
email { verb: "reply", uid: 42, text: "thanks" }             # quotes the original by default
email { verb: "forward", uid: 42, to: "d@e.f" }              # includes the original by default
email { verb: "create_folder", folder: "Archive" }           # idempotent; INBOX is reserved
email { verb: "move", folder: "INBOX", dest: "Archive", uids: [42] } # dest must exist; not gated
email { verb: "delete", uids: [42] }                         # gated: EMAIL__ALLOW_DELETE
email { verb: "delete_folder", folder: "Archive" }           # gated: EMAIL__ALLOW_DELETE

Reads never change server-side flags; mark is the only way to write flags. Failures carry an error code for transport origins (auth / network / tls / timeout / protocol / server); local validation errors carry none.

Limits and boundaries

  • Stateless verbs: one fresh connection per call; no connection pooling. Per-event push exists only through the new-mail trigger watcher (one resident connection per enabled account; accounts without it keep exactly the stateless footprint).
  • No subscribe/unsubscribe verbs, no folder management beyond create/delete; no XOAUTH2 (password / app-specific password only).
  • delete and delete_folder are fail-closed: they run only on accounts with EMAIL__ALLOW_DELETE=true; move is ungated because a failed source-side deletion leaves the copies in the destination.
  • Read bodies are truncated to the configured budget; save_part retrieves full parts.
  • Sent messages are not recalled; a SENT_FOLDER copy that fails on a missing folder first tries to create it (unless EMAIL__SENT_FOLDER_AUTOCREATE=false or the folder is exactly INBOX), then retries once; a copy failure that survives that is reported without rolling back the delivered message.

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
dsh-email 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:xuan25/dsh-email` 即可。

dsh-email 的验证等级是什么意思?

L4 · 沙盒安装通过。安装命令在隔离沙盒内真实执行成功,无依赖错误

dsh-email 安全吗?

低风险。

dsh-email 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-email 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

同名或近似条目

1 条
不同作者的仓库分开列,请确认你要装的是哪一个
文档与办公
按星标排序,可作替代方案

webnovel-writer

webnovel-writer

基于 Claude Code 的长篇网文辅助创作系统,解决 AI 写作中的「遗忘」和「幻觉」问题,支持 200 万字量级 连载创作。

L4 · 沙盒安装通过 7,742 星

baoyu-design

baoyu-design

L4 · 沙盒安装通过 6,403 星

answer-me-with-html

answer-me-with-html

Answer me with HTML — an agent skill that answers hard questions with

L4 · 沙盒安装通过 4,782 星

Pagekin

Pagekin

Pagekin,免费 AI 小说写作软件,从设定、蓝图到正文、审稿、定稿;支持拆解仿写、续写、改写,可导入写作 Skill(如去 AI 味)

L4 · 沙盒安装通过 2,601 星

xuan25 的其它插件

6 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。