hongyue0721/dsh-kimicode-swarm 预览 preview

hongyue0721/dsh-kimicode-swarm

DeepSeek Harness 批量并行子Agent调度插件:swarm_batch工具(Kimi Code Swarm模式移植)+ /swarm命令 + 聊天内实时进度条

Project Overview项目介绍

This repository is a native plugin built exclusively for DeepSeek Harness (DSH) that brings Kimi Code Swarm’s master-slave parallel multi-agent scheduling pattern to the DSH platform. You can install it with a single command from npm by running dsh plugin --profile web add dsh-kimicode-swarm in your terminal, or install it directly from the GitHub repository or a local folder via pnpm. Once installed, you just need to restart the dsh web process and create a new chat session to access the swarm_batch tool and /swarm command added by this plugin. The core capability lets the main agent split large tasks into multiple independent subtasks, dispatch them all at once, and run sub-agents in parallel to finish work much faster.

Most of the time, you can just describe your task to the main agent, and it will automatically decide whether to use swarm parallel processing to speed up the work. If you want to explicitly trigger a one-time swarm job, you can just use the /swarm <your task description> command directly in chat. The plugin uses an adaptive scheduling algorithm that starts with 5 concurrent sub-agents, increases concurrency by one every 700 milliseconds, and uses exponential backoff to handle API rate limits while automatically adjusting concurrency capacity. It also supports breakpoint resume and three-level model allocation with sensible defaults.

The plugin requires a working DSH environment and pnpm as the package manager to install and run. There are a few known limitations to note: the graphical settings card is currently unavailable due to DSH host whitelist restrictions, sub-agents do not stream intermediate tokens so the progress bar only shows start and completion status, and there are no file locks to prevent write conflicts. The project is open-source under the MIT license, so it is free to use, modify, and distribute. If you want to contribute, you can run the full test suite of 48 unit tests after installing dependencies.

dsh-kimicode-swarm 是专为 DeepSeek Harness 开发的原生插件,将 Kimi Code Swarm 的主从式多 Agent 并行调度模式引入 DSH。它支持主 Agent 将任务拆分为互不依赖的子任务后,通过 swarm_batch 工具一次性批量派发,让子 Agent 并行执行,完成后汇总结果,官方基准测试显示端到端效率最高可提升 4.5 倍。插件还内置聊天内实时进度条,可展示每个子 Agent 的排队、运行中或完成状态,支持从 npm 一键安装,也可从 GitHub 或本地路径直接安装。

用户既可以让主 Agent 自动判断是否需要启用批量并行,也可以通过 /swarm <任务描述> 快捷指令一键触发批量处理。插件采用自适应调度策略,初始 5 个并发,每 700ms 爬坡增加 1 个并发,遇到限流会自动指数退避并调整并发容量,支持断点续做,还实现了三级模型分配规则,可按子任务、类型指定模型,默认继承调用者模型。适合需要并行处理多个独立子任务来提升大模型工作效率的用户使用。

插件依赖正常的 DeepSeek Harness 环境和 pnpm 包管理器,目前已知几个限制:设置页卡片因宿主白名单限制暂不可用,子 Agent 不返回中间 token 仅展示启停状态,没有文件锁需要通过合理拆分任务避免写入冲突。项目采用 MIT 许可证开源,可免费使用修改,开发阶段可通过 pnpm 安装依赖、运行类型检查和单元测试,之后构建输出产物。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-kimicode-swarm

把 hongyue0721/dsh-kimicode-swarm 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-kimicode-swarm — DeepSeek Harness 批量并行子 Agent 调度

MIT dsh-plugin DeepSeek Harness 48 unit tests awesome · DSH plugin

English · 简体中文

dsh-kimicode-swarm


把 Kimi Code Swarm 模式(主从式多 Agent 并行)搬进 DeepSeek Harness:主 Agent 把任务 拆成互不依赖的子任务,swarm_batch 一次批量派发,子 Agent 并行执行,完成后汇总—— 官方基准下端到端效率最高提升 4.5 倍。聊天内实时进度条:每个子 Agent 一行状态 (排队 / 运行中 / 完成),像 Kimi 的 TUI 一样看着任务逐个点亮。

特性

  • swarm_batch 工具:prompt_template + items 批量生成子任务(最多 128 项), 每项可带 model / type;resume_agent_ids 断点续做。
  • 自适应调度(对齐 Kimi SubagentBatch 调度合约):先 5 个并发 + 每 700ms 爬坡 1 个; 撞限流指数退避(3s/6s/12s…)并自适应收缩/恢复并发容量;用户取消保留已完成结果; 单任务超时只失败该任务。
  • /swarm <任务> 命令:一次性 Swarm 模式——探索边界、拆解子任务、批量派发、 汇总结果、自动退出模式(对齐 Kimi 的 task 触发语义)。
  • 聊天内实时进度条:host 端把全量快照进度帧经 SSE 路由(/swarm-events)广播, 浏览器端用同源 EventSource 订阅写入 progress-store 渲染,运行中蓝点脉冲、排队灰点、 完成绿点。进度仅用于展示,不写入会话日志(rc.8 拒绝词表外会话事件)。
  • 模型三级分配:item 级/整批显式 model > 设置映射表(按 type 命中)> 继承调用者 模型(默认,由 Agent 自由分配)。

架构

┌─ host 半区(node 进程,src/index.ts)─────────────────────────┐
│  swarm_batch 工具(ctx.tools.register)                        │
│    ├─ 参数归一化(core/normalize.ts):模板填充 / 模型解析 / 去重 │
│    ├─ SwarmScheduler(core/scheduler.ts):两阶段自适应并发调度  │
│    │    └─ onProgress 回调:每步状态变化发全量快照              │
│    ├─ ctx.subagents.start():真实子 Agent 启动(继承调用者模型) │
│    └─ progress.ts:createProgressBroadcaster → SSE 帧          │
│        (/swarm-events 路由,SWARM_PROGRESS_ROUTE)              │
│  /swarm 命令(ctx.commands.register):一次性 Swarm 模式指令     │
│  设置命名空间 + 系统提示词公告                                  │
└──────────────────────────────────────────────────────────────┘
                            │ SSE(event: progress,JSON 快照)
┌─ browser 半区(Web GUI,src/client/)─────────────────────────┐
│  index.ts:同源 EventSource 订阅 /swarm-events                  │
│  progress-store.ts:模块级进度存储(按 callId 存最新快照)        │
│  SwarmCard.tsx:tool.call.toolview keyed 视图                   │
│    ├─ 运行中:每子 Agent 一行实时状态(排队/运行中/完成)        │
│    └─ 完成后:结果面板(每行可展开,汇总自 presentationMeta)    │
│  SwarmSettingsCard.tsx:设置卡片(模型映射表,模型目录动态拉取)  │
└──────────────────────────────────────────────────────────────┘

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev godot-asset-planner-public 下一个 Next dsh-plugin-memory →