dsh-governance-kernel
by h565656445
DeepSeek Harness 个人适配声明(Personal Adaptation Notice) 本项目是 DeepSeek Harness 的 个人适配产物(personal adaptation) , 并非 DeepSeek Harness 官方文件(not an official DeepSeek Harness file)…
Personal Adaptation Notice for DeepSeek Harness — a personal adaptation, not an official DeepSeek Harness file.
安装
dsh plugin --profile web add github:h565656445/dsh-governance-kernelGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
DeepSeek Harness 个人适配声明(Personal Adaptation Notice)
本项目是 DeepSeek Harness 的个人适配产物(personal adaptation),并非 DeepSeek Harness 官方文件(not an official DeepSeek Harness file),随附功能、使用说明与个人产物(bundled with features, documentation, and personal artifacts),可与 DeepSeek Harness 搭配使用,也可独立使用。
This project is a personal adaptation for DeepSeek Harness, and is NOT an official DeepSeek Harness file, bundled with features, documentation, and personal artifacts. It can be used alongside DeepSeek Harness or standalone.
作者 / Author: h565656445
合作 / Collaboration: 如有项目可以一起合作,欢迎联系。微信:wohaishihenshuaide。If you have projects, let's collaborate. WeChat: wohaishihenshuaide.
用途 / What this is for
治理内核:Python 实现的哈希链治理引擎,提供 attestation、ledger、packet、状态机与 schema 校验,保证多方协作可审计。
Governance kernel: a Python hash-chained governance engine with attestation, ledger, packets, state machine and schema validation.
Hermes Governance Kernel / Hermes 治理内核
面向「不信任 Agent」的管线的强制内核:模型可以提案、Worker 可以产出、供应商可以成功、审查者可以接受——但只有契约、证据、门禁与账本合在一起才允许完成语义发生。五条纪律:完成权锁定(供应商成功 ≠ 完成)、异议裁决(决策记录必须含结构化异议)、哈希绑定交接(类型化数据包、摘要重算与上游引用核验)、独立核验(审查者必须自己重算变更回执摘要)、负效应证明与保审计迁移。零运行时依赖(仅 Python 标准库),fail-closed 由构造与测试双重保证。
An enforcement kernel for pipelines whose agents you do not trust. Models may propose, workers may produce, providers may succeed, reviewers may accept — but only the contract, the evidence, the gates and the ledger together allow completion semantics. Five disciplines: completion-authority lockdown (provider success is never completion), adjudicated dissent (decision records require structured objections), hash-bound handoff (typed packets, recomputed digests, upstream references re-verified), independent verification (reviewers must recompute change-receipt digests themselves), and negative-effect attestation & audit-preserving relocation. Zero runtime dependencies (Python stdlib only); fail-closed by construction and by proof.
Features / 功能
- 完成权锁定:没有协议合规的 Worker 产物能表达或触发终态;供应商成功只是数据,不是迁移 / Completion-authority lockdown: no protocol-conformant worker output can express or trigger a terminal state; provider "success" is data, never a transition
- 异议裁决:缺结构化异议(claim + disposition + response)的决策记录被拒 / Adjudicated dissent: decision records without structured objections are refused
- 哈希绑定交接与独立核验:数据包摘要重算、上游引用核验、审查者必须自行重算变更回执摘要 / Hash-bound handoff and independent verification with digest recomputation at every boundary
- 追加式哈希链账本:可重建状态与黑板投影,加载 fail-closed(含锚定防整尾截断)/ Append-only hash-chained ledger with state/blackboard rebuild and fail-closed loads (anchor-guarded against tail truncation)
- 负效应证明与保审计迁移:保护计数器必须显式证明,非零需要结构化人审绑定 / Negative-effect attestation and audit-preserving relocation with single-use structured human approvals
- 零运行时依赖、类型化异常与全状态快照不变式测试 / Zero runtime deps, typed exceptions, snapshot-invariant tests
What's inside / 目录结构
hermes_governance/ 内核(engine、packets、ledger、persistence、attestation、state_machine、schemas/)
docs/ 为什么“供应商成功”不等于“任务完成”
examples/ 演示:完整生命周期 + 13 种违规逐项拒绝、编排器接线示例
tests/ 完成权、异议、交接、核验、负效应、持久化测试
Quick start / 快速开始
# 演示:一个合法生命周期走到 CLOSED,再逐项拒绝 13 种违规
python examples/run_cycle.py
# 接线既有编排器:供应商说 SUCCEEDED,账本说 VERIFICATION
python examples/orchestrator_adapter.py
# 全量测试
python -m unittest discover -s tests -v
DeepSeek Harness 衍生 / DSH Derivative
本项目附带 DeepSeek Harness 衍生包,位于 .dsh/ 目录:
preset.yml— Agent 预设元数据agent.cordis.yml— Cordis 组装(基于 standard 预设,persona 已定制)skills/dsh-governance-kernel/SKILL.md— 项目专属技能(skill)
安装与接入方式见 .dsh/README.md(双语)。
License / 许可证
相关项目 / Related Projects
这是 DeepSeek Harness 个人适配系列(共 31 个仓库)的完整导航。 / This is the complete navigation for the DeepSeek Harness personal-adaptation series (31 repos).
Agent OS 内核 / Kernel
dsh-agent-os-runtime · dsh-agent-os-planning · dsh-agent-os-scheduler · dsh-agent-os-worker-protocol · dsh-agent-os-observability · dsh-agent-os-specs
Harness 基础设施 / Infrastructure
dsh-harness-core · dsh-graph-entry · dsh-async-job · dsh-file-identity · dsh-json-projection · dsh-manual-approval · dsh-observation-writer · dsh-provider-control · dsh-schema-negotiator · dsh-upgrade-governance
规格与文档 / Specs & Docs
dsh-harness-specs · dsh-novel-specs · dsh-architecture-guide · dsh-powershell-patterns · dsh-json-schema-driven-dev · dsh-llm-agent-harness-guide
适配器 / Adapters
dsh-short-story-engine · dsh-tutorial-video-state-machine · dsh-governance-kernel(本仓库 / this repo) · dsh-sports-pipeline · dsh-motion-grammar
DSH 总集成 / Integration
dsh-integration · dsh-presets-pack · dsh-skills-pack · dsh-starter-kit
原始 README: https://github.com/h565656445/dsh-governance-kernel/blob/main/README.md ↗
同类插件
查看全部 →
deepseek-harness
从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。

dsh-plugin
通过 DSH MCP 客户端挂载 Ouroboros 的纯配置包,在 DSH 中提供 36 个涵盖需求访谈、Seed、执行、评估与演化流程的工具。

dsh-tongflow
基于 TongFlow 的“片场”插件,用于图片、配音、音乐与视频制作:agent 为每个资产生成 TongFlow 工作流文件(.tongflow.json)并通过 TongFlow 插件执行,内嵌工作流画布,按镜头/角色/take 组织项目,附漫剧模板;以 @tongflow 开头的会话进入 Studio 界面。

helloagents
AI 编码 CLI 的工作流层:技能、项目知识、交付检查、更安全的配置写入与可恢复执行

dsh-ai-novel-writer
安装专用 AI 小说创作预设与工作台:提供带修订号的本地项目资产、紧凑侧边工作台,以及需要原生审批的逐文件变更。

rea
用 agent 逆向任何东西:从应用行为到原生二进制