DSH Multi-Agent Pipeline Management Kernel: defines pipelines, submits tasks, auto-routing, ledger three-strike mechanism, inspection self-healing, panel archiving and package reuse. Business-agnostic.
- Language
- TypeScript
- License
- MIT
- Branch
- master
Install
$ dsh plugin --profile web add github:not-big-dog/DSH-pipeline-kernelRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
Install via your agent
Install the DeepSeek Harness plugin not-big-dog/DSH-pipeline-kernel for me: review the repository at https://github.com/not-big-dog/DSH-pipeline-kernel first, then run the install command and verify the plugin loads successfully.
Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.
One-Line Positioning
DSH multi-Agent collaboration "pipeline management kernel" - abstracts unidirectional task chains like supervisor → designer → prompter → reviewer into definable, deployable, inspectable "pipelines" (one row in the pipelines table), providing task board, ledger, registry, auto-routing, inspection self-healing, control panel, and packaging reuse capabilities. The kernel itself does not bind to any specific business.
Core Capabilities
- Pipeline first-class citizen and archiving: define/undeploy/undefine pipelines (
pipeline_define/pipeline_deploy/pipeline_undefine), archive (pipeline_archive/pipeline_unarchive/pipeline_purge) only marks, recoverable - Task board and auto-routing: push/claim/done/cancel/list (
pipeline_push/pipeline_claim/pipeline_done/pipeline_cancel/pipeline_list), auto-route to next step on completion viaroute:<role|UID>tag - Role registration and seeding:
pipeline_seedcreates sessions for unregistered roles and writes to registry, node directory auto-numbers by chain (node 0 = supervisor, node 1..N = business roles) - Ledger and three-strikes:
pipeline_ledger_write/pipeline_ledger_listrecords deliverable changes;pipeline_strikecumulatively counts rework times, auto-marks task as blocked when threshold is reached - Inspection self-healing and Web panel: watchdog scans every 5 minutes by default to wake idle targets and self-heal zombie tasks; Web bottom-right capsule expands to full-height right sidebar (Activity/Pipeline/New/Archive four tabs, 1-second polling snapshot)
- Packaging reuse and slash commands:
pipeline_packpackages entire pipeline as JSON+MD, paired withpipeline-createfromPackto restore definition and seed in one click;/pipeline gate|status|packthree sub-commands
Technical Implementation
- Language: TypeScript (src/) + Node.js ESM (compiled output in lib/)
- Key dependencies:
@deepseek-ai/cordis(4.x plugin framework),@deepseek-ai/dsh-storage-domain(domain table JSON backend),@deepseek-ai/dsh-tools(defineTool tool definition),@deepseek-ai/dsh-agent+@deepseek-ai/dsh-llm(session runtime, encapsulated inlib/agent-runtime.jsthin adapter layer) - Architecture pattern: Cordis dual-side plugin; node side follows standard Cordis spec
name + Config (zod Schemastery) + inject + apply, registers 20pipeline_*tools + 1/pipelineslash command + 6 Web endpoints; client side usesctx.locale.registerto register Chinese-English dictionary and mount React control panel to body portal - Entry files:
lib/index.js(node-side Cordis apply) +src/client/index.tsx(browser-side mount entry)
Use Cases
Scenarios requiring orchestration of multi-Agent unidirectional task chains on DSH (typical: supervisor collects requirements → designer creates solution → prompter writes prompts → reviewer reviews → generates deliverables), unified task progress viewing, deliverable清单 management, cross-session auto-routing and reminders. Ordinary "single-Agent + single Q&A" won't need this plugin; projects with more than two sessions that need role-based handoffs are best suited for this plugin.
Prerequisites & Compatibility
| Dependency | Minimum Version | Description |
|---|---|---|
| DSH (deepseek-harness) | 0.1.0-rc.8 | package.json peerDependencies locks ^0.1.0-rc.8, before rc.8 will fail to install due to @deepseek-ai/cordis 4.x, service name changes like webServer/workspaceRegistry/agentDefaultModel |
| Node.js | ^22.19.0 || >=24.0.0 | package.json#engines.node; below 22.19 will cause tool validation failures due to zod 4 and built-in fetch behavior differences |
| Platform | macOS / Windows / Linux | lib/web.js:317-334 openFolder calls open / explorer / xdg-open on three platforms respectively; rest is pure ESM + node:fs/node:path, no platform-specific code |
| Native modules | None | No node-pty / better-sqlite3 etc.; only uses built-in modules like node:fs node:path node:os node:child_process node:crypto node:url |
Installation
dsh plugin --profile web add github:not-big-dog/DSH-pipeline-kernel
Configuration Options
All config goes through cordis.patch.yml under pipeline-kernel node (default written to ~/.dsh/profiles/web/cordis.patch.yml), restart dsh web to take effect.
| Config | Type | Description | Default |
|---|---|---|---|
projectRoot | String | Global workspace root (pipeline projectRoot falls back here), all inboxDir/artifacts/pack paths must be within it | process.cwd() |
inboxDir | String | Role inbox root directory (relative to workspace), pipeline_push writes task slips here | exchange/收件箱 |
defaultPipeline | String | Default pipeline id for tasks without pipeline:<id> tag (note: just default, no auto-definition creation) | default |
watchdogEnabled | Boolean | Enable unattended inspection (self-healing + wake + stall reporting) | true |
watchdogIntervalMs | Number (ms) | Inspection tick interval | 300000 (5 minutes) |
watchdogStallMs | Number (ms) | How long full chain is idle before considered "stuck" and reports to supervisor | 1800000 (30 minutes) |
watchdogWakeCooldownMs | Number (ms) | Minimum cooldown for same task wake-up | 600000 (10 minutes) |
watchdogReportCooldownMs | Number (ms) | Minimum cooldown for same pipeline supervisor report | 1800000 (30 minutes) |
strikeOut | Number | Rework count threshold; tasks exceeding this get blocked and suggest human intervention | 3 |
FAQ
Q: After installation, why don't existing sessions have pipeline_* tools?
A: Old session tool directory is frozen at session creation time; restarting dsh web only takes effect for new sessions. Need to close existing sessions and open a new one to get the updated tool list from the host.
Q: I got BAD_INPUT for invalid pipeline id with pipeline_define, what's the rule?
A: Pipeline id must match ^[A-Za-z0-9_-]{1,64}$ (see lib/deploy.js:38). Cannot contain /, \, spaces, Chinese characters, or empty strings; dots or .. are also rejected because id is used as both registry key and path segment, path traversal is prohibited.
Q: I see "unregistered" roles in the control panel, can I run tasks directly?
A: No. "Unregistered" means the pipeline/role → sessionId row is missing from the registry table; tasks will be delivered but no one processes the task slips in the inbox, and watchdog cannot wake them. Must first pipeline_seed (with preset in role definition) or manually pipeline_register.
Q: Are role sessions supervisor-resident or created on-demand?
A: Per definition. Each role (including supervisor) is created by pipeline_seed calling host agents.create + agentPresets.mount; not resident, not reused. Seed validates that registered session's cwd matches current pipeline workspace - if not, it's treated as collision residue and cleared/re-seeded.
Q: How does the three-strike mechanism count one "redo"?
A: Based on attempt:<n> in task tags, higher n means more times the task was sent back for rework. pipeline_strike {taskId} reads n ≥ strikeOut (overridable in pipeline definition, falls back to global config) and changes status to blocked with "suggest escalate to human or change direction" message. attempt doesn't need manual maintenance, just add it in route fallback or rework flow.
Q: What are the packaged *.pack.json / *.pack.md for?
A: Output of pipeline_pack - *.pack.json is machine-readable full-node pipeline definition (includes roles/chain/gates/skill list/document template list), *.pack.md is human-readable "green reusable full-node pipeline documentation". Take these two files to another project, use Web route POST /plugins/pipeline-kernel/pipeline-create with body fromPack: "<path>" to restore definition, seed sessions, and create node directories in one click (see lib/web.js:106-173).
Q: "Open Folder" in panel doesn't work?
A: Path whitelist validation. Check if the path given by panel is within the workspace - lib/workspace.js:77-87 uses isWithin to strictly require path within any known pipeline workspace, absolute paths or .. get BAD_INPUT rejected. If folder path is clearly valid but still fails, the explorer/open/xdg-open command may not exist on the system (common on headless Linux servers).
Q: Where is kernel data stored? Can it sync across devices?
A: Data goes through host ctx.storageDomain (JSON backend, 4 tables: pipelines / registry / tasks / ledger). Write path is determined by DSH host; DSH rc.8 typically at ~/.dsh/profiles/web/domains/pipeline_kernel/. Can copy directory to sync across devices, but don't have two devices running the same profile simultaneously - kernel has no cross-process lock.
Learning Curve
Advanced — Users must understand DSH's agent/session model, preset system, and multi-session collaboration semantics, and write their first pipeline definition (roles/chain/gates) using pipeline_define; otherwise, after installation the panel will just show "No pipelines yet".
Known Issues & Limitations
- Path hard constraint:
artifactRootandinboxDirmust be relative paths under workspace and cannot escapeprojectRoot(lib/workspace.js:18-30), otherwisepipeline_definethrowsBAD_INPUT - Pipeline id and role name hard constraint: must match
^[A-Za-z0-9_-]{1,64}$(lib/deploy.js:38,lib/pipeline.js:17-22), ids with Chinese/dots/spaces are rejected - Domain version number fixed:
kernelDomainhardcodesversion: 1(lib/domain.js:90), adding new fields doesn't bump version; if version is bumped in the future, old data will be rejected on open due to JSON backend's unit header validation, migration needed - Web control panel only shows archived pipelines with
?archived=1:lib/web.js:48andlib/snapshot.js:19, main view doesn't include archive box - Inspection doesn't感知 host restart: watchdog runs within DSH process, after process crashes and restarts watchdog state is lost,
pipeline_reconcilecan manually fallback (lib/tools.js:561-584) - Node directories are created all at once during pack reuse, new pipelines only create supervisor directory (nodes 1..N created when supervisor finishes documents and calls
pipeline_mkdirsor triggers on firstpipeline_push), won't actively prompt supervisor to fill in
DeepSeek Harness (DSH) 插件(Cordis)| 多 Agent 管线管理内核:任务板 / 台账 / 部署 / 注册表 / 巡检 / 打包复用 / 控制面板 A DSH (DeepSeek Harness) Cordis plugin — the management kernel for multi-agent pipelines: task board / ledger / deployment / registry / watchdog / packaging & reuse / control panel.
pipeline-kernel 是管线无关的管理内核:管线 = 配置数据(pipelines 表一行,用 pipeline_define 定义),内核不绑定任何具体业务。默认无预置管线,由使用者自行定义与部署。
The kernel is pipeline-agnostic: a pipeline is just a config row (defined via pipeline_define); no business is baked in. There is no preset pipeline — define and deploy your own.
中文
定位
- 内核 = 管线无关的管理能力(通讯 / 台账 / UI 三大职责,见
docs/);管线 = 数据(配置行) - 业务能力(生图、视频等)是管线内部设置,不进内核
- 多语言:UI 与文档自动跟随 DSH 语言设置(中文 / English)
安装
// C:\Users\<you>\.dsh\profiles\web\package.json → dependencies
"dsh-pipeline-kernel": "link:<本包路径>"
// bundles 列表加入 "dsh-pipeline-kernel"
或 dsh plugin --profile web add <本包路径>。重启 dsh web 后,新会话带 pipeline_* 工具(存量会话工具目录固定,需重建会话)。
依赖要求(v0.9+):宿主
deepseek-harness 0.1.0-rc.8及以上(本插件自身锁定^0.1.0-rc.8,cordis 4.x)。开发/CI 用pnpm install --frozen-lockfile。
快速开始
- 定义管线:
pipeline_define {id:"my-pipe", roles:{supervisor:{preset:"pipeline-supervisor"}, ...}, chain:["supervisor",...], gates:{...}} - 起链:
pipeline_deploy {pipelineId:"my-pipe"} - 播种角色会话:
pipeline_seed {pipelineId:"my-pipe"}(按定义给未注册角色创建会话,自动写注册表) - 投任务:
pipeline_push {title, description, tags:["target:<角色>","task:<编号>","attempt:1"]} - 流转:
pipeline_list→pipeline_claim→pipeline_done {result:"done route:<角色|UID> 产物:..."}(内核自动路由下一环) - 看全景:
pipeline_status
控制面板(Web UI)
右下角 pipeline 胶囊按钮 → 展开右侧全高侧栏:
- 活动:各管线运行摘要(角色状态 / 进行中任务 / 最近完成 / 失败置顶)
- 管线:管线一等实体(Graph 缩略图 / KPI / 打包产物);点击任务展开 Task Inspector
- 新建:定义新管线(工作文件夹必选,走系统目录选择器)
- 归档:冷存储——归档不删除数据,可恢复;永久删除仅在归档箱内、需输入管线 id 确认
巡检(watchdog)
v0.8 起 默认开启(无需配置):每 5 分钟扫描 open 任务补唤醒(同任务 10 分钟冷却)、done 但路由未完成(僵尸)自愈补投、全链静止 30 分钟汇报主管。无管线/无任务时零噪音。如需调整或关闭,在 cordis.patch.yml 覆写:
# c:\users\<you>\.dsh\profiles\web\cordis.patch.yml
pipeline-kernel:
watchdogEnabled: false # 关闭巡检(默认 true)
watchdogIntervalMs: 300000 # 巡检周期(默认 5 分钟)
watchdogStallMs: 1800000 # 全链静止判定(默认 30 分钟)
watchdogWakeCooldownMs: 600000 # 同任务补唤醒冷却(默认 10 分钟)
watchdogReportCooldownMs: 1800000
文档索引
| 文档 | 内容 |
|---|---|
docs/管线定义规范.md | 管线定义字段与拓扑规范(roles/chain/gates/entry…) |
docs/内核接口文档.md | 内核工具与端点清单(pipeline_* / HTTP 路由) |
docs/内核设计文档.md | 架构与职责划分 |
docs/UI-方案-K7-边栏设计.md | 控制面板 UI 方案 |
License
MIT
English
Positioning
- Kernel = pipeline-agnostic management (communication / ledger / UI — see
docs/); pipeline = data (a config row) - Business capabilities (image generation, video, …) belong inside the pipeline, not the kernel
- Bilingual: the UI and docs follow the DSH language setting (中文 / English)
Install
// C:\Users\<you>\.dsh\profiles\web\package.json → dependencies
"dsh-pipeline-kernel": "link:<path-to-this-package>"
// add "dsh-pipeline-kernel" to the bundles list
Or dsh plugin --profile web add <path-to-this-package>. After restarting dsh web, new sessions get the pipeline_* tools (existing sessions keep their fixed tool catalog — recreate them).
Dependency requirement (v0.9+): host
deepseek-harness 0.1.0-rc.8or newer (this plugin pins^0.1.0-rc.8itself; cordis 4.x). Dev/CI usepnpm install --frozen-lockfile.
Quick start
- Define a pipeline:
pipeline_define {id:"my-pipe", roles:{supervisor:{preset:"pipeline-supervisor"}, ...}, chain:["supervisor",...], gates:{...}} - Deploy:
pipeline_deploy {pipelineId:"my-pipe"} - Seed role sessions:
pipeline_seed {pipelineId:"my-pipe"}(creates sessions for unregistered roles, writes the registry) - Push a task:
pipeline_push {title, description, tags:["target:<role>","task:<id>","attempt:1"]} - Flow:
pipeline_list→pipeline_claim→pipeline_done {result:"done route:<role|UID> artifacts:..."}(auto-routes to the next link) - Overview:
pipeline_status
Control panel (Web UI)
The pipeline pill at the bottom-right expands into a full-height sidebar:
- Activity: per-pipeline run summary (role states / in-progress tasks / recently completed / failures on top)
- Pipelines: pipelines as first-class entities (graph thumbnail / KPI / packs); clicking a task opens the Task Inspector
- New: define a new pipeline (working folder required, picked via the system directory picker)
- Archive: cold storage — archiving never deletes data and is reversible; permanent deletion lives only in the archive, requiring the pipeline id to confirm
Watchdog
On by default since v0.8 (no config needed): every 5 minutes it re-wakes open tasks (10-minute cooldown per task), self-heals zombie tasks (done but routing never finished), and reports stalled chains to the supervisor after 30 minutes. Zero noise with no pipelines/tasks. Tune or disable in cordis.patch.yml:
# c:\users\<you>\.dsh\profiles\web\cordis.patch.yml
pipeline-kernel:
watchdogEnabled: false # turn watchdog off (default true)
watchdogIntervalMs: 300000 # tick interval (default 5 min)
watchdogStallMs: 1800000 # chain-stall threshold (default 30 min)
watchdogWakeCooldownMs: 600000 # per-task wake cooldown (default 10 min)
watchdogReportCooldownMs: 1800000
Docs
| Doc | Content |
|---|---|
docs/管线定义规范.md | Pipeline definition schema & topology (roles/chain/gates/entry…) |
docs/内核接口文档.md | Kernel tool & endpoint reference (pipeline_* / HTTP routes) |
docs/内核设计文档.md | Architecture & responsibilities |
docs/UI-方案-K7-边栏设计.md | Control panel UI design |
License
MIT
Read the usage guide →
Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.
Listing badge
[](https://deepseek-plugin.org/plugins/not-big-dog/DSH-pipeline-kernel)Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.