lusblead/dsh-Kingdom
在 DSH 中建立属于你的 Agent 王国——让 Agent 拥有角色、权限、领地与治理秩序,并通过事实验证机制与权威账本,让每一次执行、声明与裁决都可核验、可追溯。
Project Overview项目介绍
dsh-Kingdom is a native plugin built exclusively for DeepSeek Harness (DSH), designed to let users create and manage their own local multi-agent governance system entirely within DSH, no external services, separate databases, or standalone frontends required. To install the plugin, you can either run the DSH plugin command to install it directly from npm, or download the compressed tgz release file from GitHub and install it locally through the DSH CLI. It requires DSH version 0.1.5-rc or newer and Node.js 22.19 or higher, and it uses the built-in SQLite in Node.js so no additional native dependencies are needed for installation.
After initial setup, you as the human Owner can initialize your “kingdom”, create task territories, and assign different roles to separate DSH agent sessions. The four core roles are Owner, Chancellor, Supervisor, and Worker, each with distinct permissions that enforce a full governance cycle from planning and assignment to independent execution and review. All task states and historical records are stored locally in SQLite, so you can restore your full workflow after restarting DSH, and every task attempt gets its own independent record for full traceability.
The plugin is licensed under AGPL-3.0-or-later, with older versions (v0.8.0 and before) available under BSD-3-Clause. You will need to provide your own valid LLM API key to run Worker agent tasks, and database migrations must be done manually before using newer versions with older data. The plugin includes a built-in local GUI that you can launch directly from a DSH session with the /kingdom gui command, and the full user guide is hosted in the repository’s docs folder for first-time users to reference.
dsh-Kingdom 是专为 DeepSeek Harness(DSH)开发的原生多智能体治理插件,可让用户在 DSH 内创建和管理自己的多智能体任务治理系统,无需额外部署外部服务、独立数据库或单独的前端 GUI。它支持通过 npm 或 GitHub 下载 tgz 包一键安装,适配 DSH 0.1.5-rc 版本,要求 Node.js 版本不低于 22.19,内置 SQLite 无需额外原生依赖。
用户完成安装后,可通过 slash 命令初始化自己的“王国”,创建任务领地,分配不同角色给不同的智能体会话,包括 Owner、Chancellor、Supervisor、Worker 四种核心角色,完成从规划、分配、执行到验收的完整任务治理闭环。它还支持任务返工留痕,所有状态都存储在本地 SQLite 中,DSH 重启后可恢复状态,适合需要规范多智能体协作流程的 DSH 用户。
本插件采用 AGPL-3.0 开源协议,v0.8.0 及更早版本为 BSD-3-Clause 协议。用户需要自备可用的大语言模型 API 密钥供 Worker 智能体执行任务,数据库迁移需要手动执行,未迁移前部分功能会默认关闭。首次使用可参考文档中的 GUI 操作步骤,通过内置本地控制台完成初始配置。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-Kingdom(lusblead/dsh-Kingdom)
仓库:https://github.com/lusblead/dsh-Kingdom
本站详情页:https://www.yhbd.top/plugins/lusblead-dsh-kingdom/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 AGPL-3.0 · ⭐ 15 · 最近提交 2026-09-28 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 15 stars - an early-stage project星标 15,属于早期项目
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 github:lusblead/dsh-Kingdom
把 lusblead/dsh-Kingdom 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
这是什么?
3.2.0 把主管与领地完全绑定:任命主管时必须同时指定它的领地,席位与领地主理在同一事务里原子写入(不再可能留下"有主管、没领地"的中间态);一个领地至多一个在任主理,一个主管席位只主理一个领地;退任主管时同时解除其领地主理。同一版还修掉了交付记录区的版面塌陷。查看 3.2 版本说明。
更早的 3.0.0 在 2.0 个人工作台之上加入 Owner 交付清单:逐条查看、知悉、核对主管确认的改动证据,并就具体条目向接受交付的主管提问。交付由 Owner 主动查看,宰相目前不会自动上报。查看 3.0 使用指南、版本说明与验证范围 和 功能介绍——3.0.0 的功能是随 3.1.0 一并发布的。已有任务、协作、用量与软预算能力见 2.0 指南。
dsh-Kingdom 是一个 DeepSeek Harness(DSH)插件:产品目标是在不另行部署外部服务、独立数据库或单独 GUI 前端的前提下,在 DSH 中创建并运行一个属于自己的最小王国——
你:初始化王国
DSH:已创建王国「My Kingdom」,你成为 Owner
你:给当前项目建一个 RAG 研发领
DSH:已创建领地「RAG 研发领」
你:让 Chancellor 把"检查测试情况"规划成任务,Supervisor 派给 Worker,
再通过 `kingdom_start_task_governed` 执行并验收
DSH:任务 CREATED → ASSIGNED → RUNNING → REVIEW → DONE ✅
插件实现本地持久化语义:角色、领地、任务和验收记录写入本地 SQLite;正式数据库迁移仍须按对应版本的迁移边界执行。
✨ 核心特性
| 特性 | 说明 |
|---|---|
| 🚀 零门槛安装 | 发布后的一个 tgz + 一条命令;内置 GUI 随 lib/** 交付,无需独立前端 |
| 🏛 完整角色体系 | Owner / Chancellor / Supervisor / Worker,角色与 Session / 模型解耦 |
| 📋 治理闭环语义 | 规划 → 分配 → 独立执行 → 验收,任务状态全程留痕 |
| ⚖️ Claim ≠ Fact | Worker 说自己完成了 ≠ 任务完成——完成权只在 Supervisor,代码强制,不是口头约定 |
| 🧭 主管与领地完全绑定(3.2) | 任命主管必须同时指定它的领地,席位与领地主理同一事务原子写入;一个领地至多一个在任主理,一个主管只主理一个领地;退任主管时同时解除其领地主理。存量"未隶属领地"的席位不会被自动归属,只在界面上标注待处理 |
| 👁️ Owner 逐条知悉与提问(3.0) | 交付摘要和细项独立呈现;知悉只记录 Owner 声明已知道该内容版本,不代替质量认可或任务完成;问题记在接受该交付的主管名下,待其主动读取并回复 |
| 🧾 改动证据(3.0) | 主管确认属于本交付的文件改动可展开查看,包括有界的未提交差异快照;标明证据级别,不把 Git 时间窗口误称为 Worker 作者证明 |
| 👷 Persistent Governed Worker | 候选源码的 canonical headless 路径使用 kingdom_start_task_governed:Worker 绑定长期 DSH Session,结果结构化返回并经 Capability/Lease 治理 |
| 🔁 返工留痕 | governed REWORK 复用同一 Worker Persistent Session;每次尝试(attempt)都有独立 Lease/Execution 记录 |
| 💾 持久化与恢复语义 | 状态写入本地 SQLite;真实 DSH 重启恢复与正式数据库本轮未验证(NOT_RUN) |
| 🔄 换届与会话归属(v0.4) | kingdom_unbind_role 解绑 / kingdom_bind_session 把角色绑到独立会话;session-bound 模式下只有被绑定会话能行使职权 |
| 🪪 会话身份预留字段(v0.4) | 角色可携带 model_name / agent_name / session_meta(JSON 扩展槽)——现在不必填,未来完整会话逐步填满 |
| 🎛 内置本地 GUI(v1.0) | 直接执行 /kingdom gui 打开操作台,进行会话绑定的任务规划、指派、持久治理执行与审查;Owner 配置仍只走 direct Slash |
| 👑 Persistent Governed Worker(v0.8) | Worker 拥有长期 DSH Session(REWORK 唤醒同一 Worker);Session ↔ Territory Affinity 不可改绑;每次执行经 Capability Gate(仅 GRANTED+ENFORCED 才 dispatch,Runtime 无法 enforce → DENIED + zero execution);Execution Lease 互斥 + Dispatch Intent(crash 可 reconcile,不盲发);terminal 证据来自事件链,Runtime 跑完 ≠ Task DONE(Claim → Supervisor 裁定链不变)。这是 canonical headless 路径 |
| 🛡️ Fail-closed 能力治理(v0.8) | 无自授 / 超 Ceiling / scope 外 / 部分 policy 一律拒绝;approval=never 禁扩权;workspace 外写真实拒绝;RECOVERING 状态如实显示,禁止显示成 Done |
| 🧩 Legacy 兼容(v0.8) | kingdom_start_task 仅在用户明确选择时作为 LEGACY_COMPAT one-shot 入口;不会作为默认路径、错误恢复建议或 persistent 失败 fallback |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Guard42/dsh-humanize
hashgraph-online/hol-guard
SeaOf0/dsh-redteam-model
howmp/dsh-pentest