lusblead/dsh-Kingdom 预览 preview

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 操作步骤,通过内置本地控制台完成初始配置。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 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

🏰 dsh-Kingdom

在 DeepSeek Harness 里,装一个插件,拥有一个自己的 Agent 王国。

CI Version License DSH Node


这是什么?

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 →

← 上一个 Prev dsh-ui 下一个 Next dsh-ontology →