Dsh Any Agent

io.github.xmtlzzz由 GitHub 帳號 xmtlzzz 發布v0.6.3更新於 Nov 8, 2026

Drive DeepSeek Harness (DSH) as a long-lived, resumable coding agent from any MCP client.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

一個 MCP 伺服器,把目標派發給 DeepSeek Harness,作為可長期執行、可恢復的編碼代理,並讓你監督與收取結果。

可以做什麼
  • 建立、送出任務並列出 DSH 工作階段,可設定工作區、權限層級、審批策略與模型
  • 增量讀取執行中的輸出,取得已完成執行的結果及其複核單,並記錄通過、部分通過或失敗
  • 在執行中介入改向、排隊留言、中斷目前輪次,或釋放與搶占寫入鎖
  • 從跨工作階段收件匣裁決待審批請求,並檢視或修改工作階段佇列
  • 執行唯讀健康檢查,並透過終端機檢視或本機唯讀面板觀察派發的工作
適用情境
適合把耗時的編碼任務交給另一個代理、在編輯器或機器重新啟動後仍保持任務存活、之後再收取結果的情境。也適合同時執行多個代理工作階段,並查看它們呼叫了什麼、消耗了多少。
執行需求
需要 Node.js 22.15 或更新版本,並已安裝 DeepSeek Harness 且模型路由與憑證可用。以 npm 套件 dsh-any-agent 安裝,用 dsh-any-agent-setup 完成設定,然後讓用戶端透過 stdio 重新連線。清單中未宣告任何環境變數或標頭。
安裝前請注意
此代理會寫程式碼並執行 shell 指令,因此審批與權限層級很重要;掛載到 DSH 的外部 MCP 工具會繞過其沙箱。搶占寫入鎖可能終止持有鎖的其他行程。面板為本機唯讀,但會顯示活動資料;推理內容依設計不寫入日誌。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Dsh Any Agent,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🧪 0.6.2 offline suite green · 👀 new live call-chain view (watch / dashboard, with token usage) · 🔌 MCP over stdio · 📦 Zero dependencies · 📜 MIT

An MCP server that drives DeepSeek Harness as a long-lived coding agent. Hand it a goal, let it write code and run scripts, steer it mid-flight, and collect the result when you are ready.

Claude Code · Claude Desktop · Codex · Cursor · Windsurf · Zed · Gemini CLI · opencode · VS Code — or any client that speaks MCP over stdio.

🎯 The problem this solves

You already have a coding agent in your editor. What you do not have is one that can:

  • hand a multi-hour job to another agent and walk away — then collect the result when it's done;
  • keep the job alive across restarts of your editor, your session, your machine's idle reap;
  • cut in mid-flight when it's going the wrong way, without destroying the work;
  • run several of them at once and switch between them;
  • see what it is doing without asking the agent — which tools it called, which approvals went through, how many tokens it spent.

DSH (DeepSeek Harness) can do all of that — it has file/shell tools, skills, subagents and workflows — but it is a GUI-first application. Its own sdk profile exposes only 3 requests and can't resume, cancel, or answer approvals.

This server is the missing adapter: it makes DSH into a well-behaved background agent that any MCP client can hire, supervise and collect from.

Think of it as &job — like & in a shell, but for an agent.

✨ Why it's different

CapabilityWhat you get
🔄 A dead process never kills a conversationThe identity lives on disk. A crash, an idle reap, even restarting this whole server costs you nothing — the next call transparently resumes it, memory intact (verified across processes).
🗣️ You are never stuck waitingSteer a conversation mid-flight — interject to stop and redirect (~100 ms to reach idle, measured over four cancelled turns), or queue a remark for after the current turn. Interrupting never damages the conversation.
📡 Completion notification, not pollingLong tasks return instantly with a run_id; when the turn ends, a sentinel file is written atomically so a background task in your host wakes you. No polling, no occupied turn.
🪟 Many conversations at oncedsh_list(only_running) shows what's live; dsh_read gives cursor-based incremental output. Cycle between them like windows.
👀 You can see it yourselfdsh-any-agent watch (terminal) or dsh-any-agent dashboard (local read-only web page) lays dispatched work out as a call chain — client → conversation → run → tool calls / approvals — with per-run tokens and context-window use, updating while the run is going. Separate processes, never touch the write lock, and show work from every client together.
🧠 Reasoning hidden by defaultYou get "thought for N chars / M seconds" statistics instead of context-burning prose — and it is never logged, never written to disk.
🤫 Silent by defaultNot one byte on stderr, so nothing pollutes your host's logs. stdout carries the protocol and nothing else.
🧩 Capabilities composeDSH can mount its own MCP servers (IDA Pro, browsers, your internal tooling), so this is a bridge to a whole toolbox.
🛡️ Read-only that really is read-onlyread-only sandbox plus auto-denied approvals, for working on untrusted samples.
🔎 Caller review, not blind relayEvery result carries a review ticket (checklist + evidence + dsh_review entry). The caller verifies with its own tools, then records pass / partial / fail. Advisory by default — it never blocks the next dispatch, and a failed review is not silently fed back to DSH.

🧭 Positioning: a dispatcher, not a capability aggregator

This server dispatches; it does not re-implement what DSH already does. The caller gives a goal, and DSH decides which tools, skills, subagents or team to use. Nothing from DSH's tool surface is proxied, duplicated or preloaded.

Owned by DSH (this server stays out)Owned by this server (dispatch semantics)
File I/O, shell, search, editingSession identity and cross-crash resume
Skills, subagents, Agent Teams, task boardAsync dispatch, receipts, completion sentinels
Model routing, sandbox, approval policyIncremental read, interject, interrupt, live call-chain view
Memory/context/compactionApproval bridge, write-lock governance, queue, inbox
worktrees (the agent creates them with git)Setup, status, doctor, audit

Dispatch on demand: dsh_send passes a goal, not a tool manifest, and the caller does not need to know DSH's tool list. The DSH agent picks what it needs — including capabilities added after this server was built (for example the experimental Agent Teams). This server does not grow one MCP tool per DSH feature.

Team mode (opt-in since 0.5.0): off by default. Run dsh-any-agent team on and reconnect; the profile switches to dsh-team (the experimental Agent Teams packages), and dsh_send then adds a short "form a team if this needs parallel or multi-role work" line; simple tasks are not forced into a team. Turn it off with dsh-any-agent team off, or for one call with dsh_send(team=false). The team profile disables the legacy subagent tools and replaces them with nine team tools; teammates share one workspace.

Only dispatch semantics become tools: start, send, read, get, review, interject, interrupt, approve, queue, inbox, status, release, takeover, doctor. No file I/O, no shell, no editor, no task board.

When to add something outside DSH: only when you need a guarantee rather than a behavior — for example, several top-level sessions editing the same repository need outer worktree isolation. For collaboration, prefer letting DSH run the team itself (mount the experimental team packages into the profile; teammates share one workspace).

Quick start

Requires Node.js ≥ 22.15 and DSH installed with a working model route and credentials. See Requirements for details.

bash
npm install -g dsh-any-agentdsh-any-agent-setupdsh-any-agent-setup --yes

The second command previews the changes; --yes applies them. Reconnect your client's MCP server, then ask your agent to start a DSH conversation in your project, dispatch a task, and collect the result. The dispatch workflow shows the tool sequence.

Want to see it first? Watch the 54-second promo — dispatch, interject, the sentinel landing and the caller's review, with the terminal replayed from a real run:

[▶ Play the dsh-any-agent promo (54 seconds)]

Before your first task: read the Usage Notes, especially the model-config and external-MCP permission boundaries. External MCP tools bypass DSH's sandbox. For a fresh machine, follow the migration guide.

Full contents

🧰 Tools

ToolWhat it does
dsh_startCreate a conversation: workspace, permission tier, approval policy, reasoning effort (default max), model
dsh_sendHand it a task. Defaults to wait=false: returns a run_id + sentinel_file immediately, the turn runs in the background and the sentinel file notifies you when it's done (recommended). wait=true blocks until the turn ends; hitting timeout_ms (default 0 = wait forever) only downgrades to background — the turn is never cancelled and the result is never lost
dsh_listAll conversations with live state: running / idle / detached, elapsed time, current tool, output so far. only_running=true for active ones
dsh_readCursor-based incremental read of what a running conversation is producing right now. The cursor is a revision number: an entry whose text grew since your last read reappears — match it by seq and replace its text, don't append again
dsh_getConversation details; with run_id, the final result of that dispatch (the "collect the result later" entry point) plus its review ticket. Run records live in memory (last 20) — use the sentinel file after a restart
dsh_reviewCaller review. Submit pass / partial / fail for a completed run, with notes and optional findings. The verdict is written to <state dir>/reviews/<conversation_id>/<run_id>.review.json and back into the in-memory run and sentinel. Advisory by default: it never blocks the next dsh_send
dsh_interjectInterject while it's busy: interject = stop and redirect, queue = wait for the current turn, then speak. This round writes a sentinel too, and the reply carries its sentinel_file. On an idle conversation it behaves like wait=true and blocks until the turn ends
dsh_takeoverPreempt the write lock. The only way out when another DSH process holds it (DSH has no steal API — preempting means killing the holder). It classifies the holder first: our own orphaned child → taken automatically; another live instance → needs force; GUI/unknown → never killed, reported instead
dsh_interruptStop the current turn (the conversation stays healthy)
dsh_releaseHand the conversation back (frees the write lock so you can open it in your own DSH GUI). Still resumable; forget=true writes a tombstone — by-id lookups are refused until you delete $DSH_HOME/.dsh-any-agent-forgotten/<id>.json
dsh_approval_decideAdjudicate a pending approval (only when on_approval=ask)
dsh_statusLightweight status check (single conversation)
dsh_inboxCross-conversation approval inbox: every pending approval with reason, input and age; decide with dsh_approval_decide
dsh_queueInspect/modify the session queue: list / remove / update / promote (created by dsh_send(queue=true), memory only)
dsh_doctorRead-only health check: DSH version, profile, state/dir writability, orphan locks, sessions and RSS, effective config

👀 Live view: see what the dispatched work is doing

The tools above are for the calling agent. You, sitting at the client, usually see one dsh_send and nothing else. Since 0.6.1 the server writes each conversation's activity to a local event stream, so you can watch the call chain without going through the agent:

text
claude-code  pid 8328└─ e896d16a  temperature module  running · total 278k/17k · context 3%   ├─ ✓ run-…-1  [send] · done · 1m24s · 8 tools · 69k↑ 4.1k↓ tok   └─ ▶ run-…-2  [queue] · running · 156k↑ 12k↓ tok         ✓ read   temp.js                  13ms         ✓ edit   temp.js                  18ms         ◆ approval auto-allow ⚠ danger-full-access  node --test         ▶ pwsh   node --test
bash
dsh-any-agent watch
bash
dsh-any-agent dashboard --open
[dsh-any-agent dashboard: conversations grouped by client on the left, the run timeline with a timing bar per tool call in the middle, overview, token usage, tools and files on the right (sample data)]
  • watch: the call chain in your terminal, redrawn in place like top (no scrolling spam). watch <conversation id prefix> follows one conversation; --once prints once and exits.
  • dashboard: a local read-only web page; --open launches it in your default browser. Left: conversations grouped by client. Middle: the run timeline, with a timing bar per tool call and approvals/escalations highlighted. Right: overview, tool breakdown, files touched, approvals, and token usage (input / output / cache hit, context window, per-turn chart).
  • English / 中文: follows your system language by default; pass --lang en|zh to choose, or switch from the page's top-right corner.
  • Doesn't disturb running work: both are separate processes that only read event files — they never touch the write lock or DSH. Use them to watch progress, and don't open MCP-driven conversations in the DSH GUI (that takes the write lock; see usage notes 3.10).
  • Safety and privacy: the dashboard binds 127.0.0.1 only, its URL carries a one-time token, it checks the Host header, and it has no control that changes state. Command, path and prompt previews are redacted first; reasoning is never written at any level. DSH_MCP_LIVE=meta keeps only tool names and status; off disables it.

Details in Usage · side view; event format and design trade-offs in the live view design.

📚 Documentation map

DocumentContents
SetupRequirements, profile bootstrap, 9 MCP clients
UsageDispatch/collect, sentinels, many conversations, live view, reasoning
Live view designEvent stream format, watch / dashboard, token source, privacy trade-offs
Team modeDefault behavior, how to disable (per client), verify and revert
Permissions & privacyTiers, approvals, GUI visibility, logging
Write lockFour holder classes, takeover, GUI contention
Environment variablesEvery switch and its default
TestsOffline/integration suites and coverage
Known limitationsLimits, profile naming
CompatibilityDSH version matrix, team-package requirements, upgrade checks
ArchitectureWhy ACP, sdk/plugin comparison
Release processRelease checklist

🧑‍🤝‍🧑 Team mode (opt-in)

Off by default. Run dsh-any-agent team on and reconnect; the profile switches to dsh-team (the experimental Agent Teams packages) and dsh_send adds a short "form a team when this needs parallel or multi-role work" line. Simple tasks are not forced into a team. Turn it off with dsh-any-agent team off, or for one call with dsh_send(team=false).

Full steps (commands, verification, rollback) are in Team mode.

Star History

[Star History Chart]

來源:README.md,提交 467dc6f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.6.3最新Nov 8, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分