- Home
- Plugin
- Flussi e automazione
- dsh-mailbox-local
dsh-mailbox-local
heiyedehen/dsh-mailbox-local
Same-machine Mailbox (dsh-mailbox-local) — two agents on one machine leave each other letters. mailbox_send drops a markdown note into ~/.dsh/mailbox/inbox, the recipient gets one quiet notice in its own conversation, and mailbox_done moves the file to done/ with a rename, so whoever grabs it first owns the reply and nobody relays through the human. Undeliverable mail is retried every minute and expires after 24 hours by default. Ships five mailbox_* tools plus a read-only work-order board in the settings panel: which task is moving, what it cost, and any work order in full at one click.
Installazione
dsh plugin --profile web add github:heiyedehen/dsh-mailbox-localREADME
同机信箱 · dsh-mailbox-local
同一台机器上的两只 agent 互相留信、派活、回执——不靠人转手,也不靠复制粘贴。
一只鱼把活写成一封信,另一只在它自己的对话里收到一句提醒,点开就是全文;干完把信搬进
done,回执写回去。人是旁观者,不是中间人。
它做的事

- 发信:
mailbox_send给某条会话留一封(派活 / 留言 / 问一句),落成inbox/下的一个.md - 收信:收件方在它自己的会话里收到一条 notice,正文是「谁给你留了一封信(派活):前 60 字」
- 抢锁:处理前先
mailbox_done——用rename把信搬进done/,两只同时点只有一个成功,谁搬走谁处理 - 过期:超过
expireHours(默认 24)没人收,自动挪进expired/ - 送达:投不出去标
undeliverable并每分钟重试,等那条会话开起来自动补投;投到了标delivered - 看板:设置页里附一个只读的工单看板,把同一台机器上的活看见走到哪了
装
dsh plugin add dsh-mailbox-local
装完在 设置 → 信箱 里能看到「工单看板」一页;五个工具在工具列表里。
五个工具
| 工具 | 干什么 |
|---|---|
mailbox_who | 这台机器上还活着的会话(收件人按这些名字找) |
mailbox_send | 给某条会话留一封信:to(会话名或 id)、text、kind(派活 / 留言 / 问一句)、ref(可选,附一个文件路径) |
mailbox_list | 看信箱:默认只看发给我的,box 可看 done / expired,all 看全部 |
mailbox_read | 读一封(id 可以只给前缀) |
mailbox_done | 收下这封:搬进 done/,写 status: done 与 doneAt |
配置
cordis.patch.yml 里这几项都能改,写空了就用默认值:
dir: "" # 信箱目录,默认 ~/.dsh/mailbox
ordersFile: "" # 工单看板那个 .md;不填就用 <dir>/工单看板.md
expireHours: 24 # 多久没人收就挪进 expired
scanSeconds: 20 # 多久扫一遍 inbox
notify: true # 收到新信要不要在对方会话里说一句
换机器不用改代码:所有路径都在配置里。Windows / macOS / Linux 都能用,只依赖 Node 与 DSH 插件接口,不调 PowerShell、不写注册表。
工单看板
设置页那一页只读一个 markdown:表格里「状态」列是 进行中 / 待办 / 搁置 / 已完成,第一列后面跟回执、最近改动、文件名。每行末尾的「原文」按钮会打开那份 .md 的全文(只认同一目录下的文件,越界会被挡)。
看板是谁生成都行:自己手写、脚本生成、或者抄一份模板。默认位置是 <信箱目录>/工单看板.md;想放别处就把 ordersFile 指过去。文件不存在时面板不会崩,只会告诉你它期望的位置。
落盘长什么样
~/.dsh/mailbox/
inbox/
20261127-062836-工作的鹿野__鹿野(主对话)-1941.md
done/
expired/
logs/ # 手动跑脚本时的输出(如果有)
一封信就是一个 markdown,头部是 front-matter:
---
from: 工作的鹿野
to: 鹿野(主对话)
at: 2026-11-27T06:28:36+08:00
kind: note
ref: D:\dsh work\self\工作记录\工单-同机信箱.md
status: delivered
---
正文……
status 会从 delivered → done 走;投不出去时是 undeliverable,并带一行 note 说明原因。
和别的方案差在哪
- 不靠人转手:不像复制粘贴,也不需要人在两个窗口之间搬。
- 会唤醒对方:信投进去,对方那一轮就会被触发;邮件类插件不会。
- 谁先搬谁处理:文件系统当锁,不需要额外的服务或数据库。
- 只管同机:不做跨机器、不做群聊、不做实时。
开发
node --check index.js
node --check client.js
ELECTRON_RUN_AS_NODE=1 "D:\deepseek\DeepSeek Harness.exe" --test test/store.test.mjs
客户端改完要按界面的刷新按钮(或重启 DSH);宿主侧改完 disable → enable 一次。
MIT · 作者:鹿野
Plugin correlati
ds-bot
fei-craft/ds-bot
webnovel-writer
lingfengqaq/webnovel-writer
loopx (dsh-loopx-plugin)
loopx-project/loopx
ouroboros (dsh-plugin)
q00/ouroboros