Plugin directory / Automation / dsh-agent-hub
dsh-agent-hub
Verified · install-tested on dsh Luoye-1026
What it does
dsh-agent-hub is a DSH plugin that unifies command of local agents, currently supporting (Codex / Reasonix / Pi / DSH).
Works — verified, early-stage project
dsh-agent-hub is a DSH plugin that unifies command of local agents, currently supporting (Codex / Reasonix / Pi / DSH). It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
dsh-agent-hub
统一观测并指挥本机四个 Agent(Codex / Reasonix / Pi / DSH)的 DSH 插件。
右下角一个 🧭 浮层指挥台,就能看到每个 Agent 的会话、运行状态、活跃会话、最近活动,并且直接发消息指挥它们干活、实时回传进度。
功能特性
观测
- 四张 Agent 卡片:会话数、最近更新时间、运行状态。
- 活跃会话识别:卡片上显示「正在: <会话标题>」(识别当前正在工作的对话)。
- 会话列表 + 搜索(按标题 / cwd / id)。
- 最近活动:tail 最新会话文件,提取纯文本摘要(👤 用户 / 🤖 助手 / 🔧 工具调用)。
- 面板颜色跟随 DSH 浅色 / 深色主题自动切换。
指挥(四个 Agent 各自机制)
| Agent | 机制 |
|---|---|
| Pi | node pi -p --session <id> <消息> |
| Codex | codex exec resume <id> --skip-git-repo-check <消息> |
| DSH | agents.resume + agent.followup(进程内) |
| Reasonix | reasonix -p --output-format text <消息> |
编排(把指挥原语封装成工具,供主 Agent 调度)
agent_hub_overview— 查看各 Agent 概览agent_hub_send— 向某 Agent 会话发指令,返回 jobIdagent_hub_progress— 查询任务进度与增量输出agent_hub_activity— 查看某 Agent 最近活动摘要
安全
- 控制命令默认「发送前确认」,可勾选「本会话自动执行」。
- 审批策略按
agent:sessionId记忆(会话级)。
目录结构
src/
host.js # Host 半区(对应 cordis_define 的 code.host)
client.js # Client 半区(对应 cordis_define 的 code.client)
mcp/
agent-hub-mcp.mjs # 独立 MCP server(供 Codex 等支持 MCP 的主 Agent 调用)
前置依赖
- DSH harness(本插件是 DSH 的动态 Cordis 插件)。
- Pi CLI:
pi(在 PATH 中,headless-p模式)。 - Codex CLI:
/Applications/ChatGPT.app/Contents/Resources/codex。 - Reasonix CLI:
/Applications/Reasonix.app/Contents/MacOS/reasonix。 zstd(读取 DSH 的.jsonl.zstd会话)。
加载方式
本插件是 DSH 动态 Cordis 插件,在 DSH 里用 cordis_define 工具加载:
- 打开 DSH,准备一个会话。
- 调用
cordis_define:kind: "new",idPrefix填一个 3–6 位小写字母(如aghub)。code.host=src/host.js的完整内容。code.client=src/client.js的完整内容。
- 记录返回的
pluginId/packageId,调用cordis_run激活。
⚠️ 动态插件是进程内临时的:不落盘,DSH 进程重启后消失。本仓库把源码固化下来,重启后按上述步骤重新加载即可。
MCP 接入(让 Codex 当主 Agent)
codex mcp add agent-hub "node /绝对路径/agent-hub/mcp/agent-hub-mcp.mjs"
之后 Codex 里就能调用 agent_send / agent_overview 工具指挥 Pi / Codex / Reasonix(DSH 为进程内服务,MCP 侧未覆盖)。
免责声明
控制命令会真实启动对应 Agent 干活:可能读写文件、执行命令、消耗 API。默认有发送前确认,但请自行评估要下发的指令。
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-agent-hub for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:Luoye-1026/dsh-agent-hub Headless (CLI) profile:
dsh plugin --profile headless add github:Luoye-1026/dsh-agent-hub Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.
When to use it
Automate a repetitive job — scheduling, chaining tasks, or reacting to events — so it runs without you starting it.
Who it's for
Users with recurring work who want it cron-style and hands-off rather than manually triggered.
For developers — extending it
Triggers and task templates are the seams — add event-driven or file-watch triggers, and richer workflow composition.