dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness 的角色化 AI 蜂群:架构师规划、多个建造者并行执行、评审代理把关、集成代理收尾。按角色钉选模型(含回退链),支持评审循环、证据合约、人工评审门、配额耗尽自动暂停与恢复,Web GUI 内置实时看板与任务流程图。40 个测试用例;支持 GitHub 或 npm 安装。
Role-based AI swarms for DeepSeek Harness. Give it a goal, get a team: an architect breaks the work into a task graph, parallel builders execute it, reviewers hold the line, and an integrator ships the result — while you watch the whole thing move on a live kanban board.
It runs inside your dsh web host. No daemon, no second process, no glue scripts. Task agents are ordinary DSH subagents with your tool access and your models; the orchestrator is just a well-behaved Cordis plugin.
It has already shipped real work: the first production run reverse-engineered a biotech research dashboard and rebuilt it as a six-indication suite (680 curated clinical trials across six cancers) in a single afternoon — five data-curation agents working in parallel, every deliverable machine-verified.
dsh-swarm-orchestrator turns one goal into a supervised agent team inside DeepSeek Harness: an architect reviews your plan into PLAN.md, parallel builders execute it as a task DAG, reviewers gate quality, an integrator ships. Every role runs a model you pin from your live catalog, every deliverable can be machine-verified, and the whole pipeline is visible on a live kanban + flow chart.
you ── "spawn a swarm: ⟨goal⟩"
│
▼
your chat agent (free to plan/research on its own —
│ swarm_dispatch its plan becomes the proposal)
▼
┌─────────────────┐
│ architect-review │ deep-reviews the proposal against the repo,
│ → PLAN.md │ consolidates parallel workstreams (evidence-checked)
└────────┬────────┘
┌──────┼──────┐
▼ ▼ ▼
builder builder builder ▸ parallel wave — one model per role,
│ │ │ fallback chains, exclusive write scopes
▼ ▼ ▼
reviewer reviewer (human) ▸ rejections loop back with feedback;
└──────┼──────┘ `reviewGate: "human"` parks it on you
▼
integrator ▸ merges, verifies, ships
▼
📄 run report ▸ per-task summaries · models used · stats
Because one agent serializes. Long research tasks queue behind quick edits, context fills up, quality drifts, and nothing checks the output but the same model that wrote it.
This plugin takes the coordination seriously so you don't have to:
blockedBy); everything independent runs at once, bounded by a concurrency cap that adapts when the provider struggles.reviewBy are judged by a reviewer agent against the task brief; a rejection loops back to the builder with the feedback attached. Want the last word yourself? Set reviewGate: "human" and approve from the dashboard.maxTotalConcurrentAgents, default 100) shares the budget across runs and counts cancelling holders until cleanup. Choose a much lower cap on memory-constrained hosts; no fixed cap guarantees memory safety.maxSubagentDepth, default 1). Without that bound an agent could delegate to helpers the dispatcher cannot see or account for — not counted by the global cap, not tracked by the watchdog, not shown on the board, yet all sharing the host heap. Measured on a real machine: one task spawned 12 such hidden helpers while the board showed a single task.dispatching forever: spawnTimeoutSeconds arms a sliding no-progress window — it runs from creation, then every heartbeat re-arms it, so a working child is never killed for elapsed time while a child that never starts or goes silent is reclaimed (per-role override in the Roster).max → high → … → no pin) before any model rotation — without spending the task's retry budget. Reviewer pins are validated the same way, and the preflight's once-only log line reports how many models rest on that uncertainty.⚠️ Running multiple swarms from different workspaces in parallel: this is supported and safe with the global cap. However, be mindful that each swarm agent is an in-process session on the host. We recommend max 2 concurrent runs unless your host has headroom for more - the global cap defaults to 100 in-process agents, which suits a large machine. If you experience
ERR_CONNECTION_REFUSED(host crash), lowermaxTotalConcurrentAgentsin the Runtime settings.
Swarm notices — the run result and the "waiting on a human" attention ping — now reach the dispatching chat while its turn is still running, instead of sitting in the input queue until that turn ends.
steer, which the running turn consumes at its next step. A mid-turn followup is claimed only after the running turn fully ends, and a turn that ends by abort replays only a latched wake — production left a completed-run notice parked behind the dispatch turn until a human clicked Steer.steer gets the no-wake inject fallback, and a host that cannot report status keeps followup, so older DSH versions still receive every notice.dsh-swarm-orchestrator row with a one-line summary, and they are no longer mistaken for human authorization by goal, skill-scan or wake-budget policy. Their producer-owned source kind is plugin:dsh-swarm-orchestrator, matching migrated historical notices; the retired { kind: 'plugin', plugin: 'dsh-swarm-orchestrator' } wrapper is rejected by native V4 session persistence.This release adds lifecycle, admission and persistence safeguards, plus a readable, left-aligned Flow view.
Diagnosed from 47 recorded runs / 184 task failures plus the incidents below, then fixed and regression-tested:
evidence.commands schema says so. Previously they were handed to cmd.exe, so a perfectly normal PowerShell gate (if (Test-Path …) { exit 0 }) failed the task — 32% of all recorded task failures. Commands are mandatory gates; evidence.files checks expected artifacts without a shell and produces advisory warnings, not a completion gate.modlens is denied to swarm roles by default in the shipped roster guidance: it is an interactive tool that asks the user a question, and swarm children run non-interactively. Add it back per-role from the Roster if your deployment has a headless vision provider."status": "completed" is never adopted — adoption cannot mask unfinished work.retrying for seven hours. Orphan recovery re-arms stranded retrying tasks, and every fresh attempt starts with a clean silence clock.spawnTimeoutSeconds override in the Roster — a healthy child is never killed for running long./swarm/events connection, reference-counted and shared by the tab, the badge, the header popover and every dispatch card. It previously opened one stream per rendered dispatch card, exhausting the browser's ~6-connections-per-origin budget and freezing the whole UI while the host stayed healthy.blocked + human review). The recorded outcome carries the exit code, the timeout state, the elapsed time and an output tail — a green-but-nonzero suite is diagnosable from the event log.A Swarm tab lives next to Chat in the web GUI, in three views:
swarm_dispatch with a task graph. Runs start gated: planning, zero agents spawned.PLAN.md; then parallel builders start.From this GitHub repo (pnpm will run the package's prepare script to build from source):
dsh plugin --profile web add github:linkbag/dsh-swarm-orchestrator
pnpm ≥ 10 asks you to allow that build first — add the exact key it prints to the profile's pnpm-workspace.yaml:
allowBuilds:
dsh-swarm-orchestrator: true
and re-run the add. (That allowance executes this package's code on your machine at install time — the usual trust rule applies; pin a commit if you prefer: github:linkbag/dsh-swarm-orchestrator#<sha>.)
Or install prebuilt from npm — no build allowance needed:
dsh plugin --profile web add dsh-swarm-orchestrator
Then restart dsh web (or reload the profile). You should see the Swarm tab next to Chat, a 🐝 button in every session header, and Settings → AI Swarm (the title shows the running version — a quick way to confirm the install).
Open the Swarm tab in any chat and switch to Roster — or open Settings → AI Swarm, the same editor reachable from anywhere. The four built-in roles:
| Role | What it does |
|---|---|
| architect | Reviews the proposal, refines it into PLAN.md |
| builder | Implements one task to completion, with verification |
| reviewer | Judges completed work against the task brief |
| integrator | Merges parallel work and ships the result |
For each role, pick a model from the dropdown. It lists every provider configured in DSH (DeepSeek, GLM, Kimi, Claude, …), grouped by provider — the same live catalog as the Models settings page. Leave a role on inherit deployment default to use whatever model the dispatching chat runs on.
Optional, per role (all have sane defaults):
Missing a model? Add the provider in DSH Settings → Models first, then hit refresh catalog in the Roster.
In any chat, just ask:
"Spawn a swarm: audit every package.json in this repo for stale deps, one task per package, then an integrator compiles a summary table. Review the integrator's output."
or the one-shot form:
/swarm build a landing page for this project
Your agent will call swarm_dispatch with a task DAG. (It may plan first itself — that's fine: an architect agent reviews and refines whatever plan it sends.)
reviewGate: "human" park on the board for your Approve/Reject.When the run finishes it folds into a report: per-task summaries, models used, fallback/retry/review stats. The whole history is an append-only event log you can replay.
Defaults worth knowing: every run starts with an architect review of the plan (skip per dispatch with
architectReview: false); dispatching into a workspace that already has an active run raises a warning — parallel workstreams belong in one DAG; the roster, badge, and header button are global across workspaces.
Everything is driven from normal chat — no config files to hand-edit:
"Spawn a swarm: audit every package.json in this repo for stale deps, one task per package, then an integrator compiles a summary table. Review the integrator's output."
or the one-shot form: /swarm build a landing page for this project (plans it, then executes it).
| Tool | What it does |
|---|---|
swarm_dispatch | Submit a run: title, objective, task DAG (id / subject / description / role / blockedBy / reviewBy / reviewGate / model / evidence / writes). |
swarm_status | The board in text: runs, task states, models in use, latest notes. |
swarm_wait | Block until the board changes or a timeout hits — supervision without sleep-polling. |
swarm_retry | Requeue a failed/blocked task after you've fixed the cause (dispatching session only). |
swarm_interrupt | Abort a stalled/running task and requeue it in the same run — no relief sibling needed (dispatching session only). |
swarm_complete | Mark a task completed when its work was finished outside the swarm (dispatching session only) — keeps the run record in sync with reality. |
swarm_report | Task agents post interim notes to the board (authenticated to their own task). |
Tasks also accept an evidence contract — evidence: { files: [...], commands: [...] } — that is machine-checked before a task may close; a write scope — writes: [files] — that keeps concurrent builders out of each other's files (the dispatcher warns on overlap); and a human review gate that parks the verdict on the dashboard. A failing evidence command no longer re-runs the finished work: it gets one command-only recheck, and if the command still fails — non-zero exit or timeout (evidenceTimeoutMs, default 120 s) — the task parks on the board for a human verdict, with the exit code and an output tail recorded in the event log.
Everything has a default; override in your profile's cordis.patch.yml:
- id: swarm
require: dsh-swarm-orchestrator
config:
storageDir: !!js dshHomePath("storages/swarm") # event log + duty table
maxConcurrent: 50 # simultaneous task agents per run
maxTotalConcurrentAgents: 100 # global cap across ALL runs (they share the budget)
adaptiveConcurrency: true # shrink on provider pain, recover on success
spawnStaggerMs: 750 # pace launches within a wave
nudgeAfterMinutes: 20 # board marker for long-silent tasks (0 = off)
workspaceRunPolicy: warn # one-run-per-goal guard: warn | block | off
requireArchitectReview: true # architect reviews the dispatcher's plan into PLAN.md first
staleTimeoutSeconds: 14400 # watchdog: silent agents get reclaimed
maxRetries: 2 # per task
evidenceTimeoutMs: 120000 # per evidence command (1 s – 10 min)
reviewLoops: 3 # review rejections per task
notifyDispatchSession: true # push completion notification to the dispatching chat
retryBackoffBaseMs: 5000 # retry backoff: base × 2^attempt before retrying
circuitBreakerThreshold: 3 # failures in 30s before pausing all retries (0 = off)
circuitBreakerCooldownMs: 60000 # circuit breaker pause duration
spawnTimeoutSeconds: 3600 # sliding no-progress window per child, re-armed by heartbeats (0 = off)
maxSubagentDepth: 1 # delegation-depth cap for task agents (1 = no delegation)
bootGraceSeconds: 3 # wait after plugin load before orphan recovery
All concurrency, hardening, and watchdog parameters are tunable from the dashboard — no YAML editing or restart needed. Open Settings → AI Swarm → Runtime tuning (or the Roster tab → Runtime tuning) and adjust:
| Parameter | Default | What it controls |
|---|---|---|
| Max concurrent agents | 50 | Simultaneously running task agents per run |
| Global agent cap | 100 | Max agents across all runs — concurrent runs share this budget (60+40, not 100+100). These agents run in-process and share the host Node heap: the high default suits a large machine, so lower it on a constrained one |
| Spawn stagger (ms) | 750 | Delay between launches in one wave — softens simultaneous provider load |
| Retry backoff base (ms) | 5000 | Failed tasks wait base × 2^attempt before retrying (5s → 10s → 20s) — prevents synchronized retry cascades when a provider outage kills all tasks at once |
| Circuit breaker threshold | 3 | Failures within 30 seconds before pausing all retries (0 = off) — detects provider-wide outages |
| Circuit breaker cooldown (ms) | 60000 | How long retries pause after the breaker trips |
| Nudge after silence (min) | 20 | Board marker for silent tasks — 0 = off |
| Stale timeout (sec) | 14400 | Last-resort reclaim for agents that go completely |