README
dsh-lineage
Content-addressed data and action lineage evidence for DeepSeek Harness.
The DSH ecosystem already has a security-audit plugin that reports plugin provenance. dsh-lineage addresses a different gap: it builds a local, verifiable object graph for artifacts, verified-fact records, actions, and reports. It never stores chat transcripts or factual prose; a node is only a typed ID plus an explicit workspace-relative object reference and expected SHA-256.
Version 0.2.0 is a formal Codex plugin and standalone proof-only MCP server, and uses the namespace export shape required by the stock DSH Web Loader. A real Cordis boot regression test guards that loader contract.
Adjacent tools track Skill bundle versions, hash-chain agent activity, or register provenance. This project stays at the object-graph evidence layer: typed content-addressed nodes, explicit causal edges, resolvable references, DAG validation, upstream/downstream closure, and missing/stale disclosure.
Graph model
Node types:
artifactfactactionreport
Edge types point from the dependent object toward its provenance:
derived-fromobserved-byproduced-bysupersedes
Every node reference is dereferenced inside workspaceRoot and hashed. The verifier distinguishes:
verified: the object exists and matches its expected hash;missing: the reference cannot be resolved;stale: the object exists but its current hash differs;- dangling graph references, invalid relation types, and cycles.
No missing or stale object is silently promoted into a fact.
Append-only ledger
Input is explicit JSONL. Each event has an idempotencyKey and either put-node or put-edge. The key maps to one immutable event file in ledgerDir:
- validate the complete hypothetical graph before writing;
- write a temporary file inside the explicit ledger directory;
- read it back;
- atomically hard-link it into its final immutable slot;
- read the published file back and verify SHA-256.
Replaying the same key and event is safe. Reusing a key with different content fails closed. Event files are never updated; a new object revision gets a new node ID and a supersedes edge.
Safety model
- All ledger, JSONL, object and report paths are workspace-relative; traversal and symlink components are rejected.
- Writes occur only inside explicit
ledgerDirorartifactDir. - Event schemas allow only structural IDs, types, paths and hashes. Keys for claims, chat, prompts, messages, raw content, text, credentials, tokens, cookies and authorization are rejected.
- Referenced object bytes are hashed but never copied into the ledger or reports.
- Ingest rejects self-edges, graph cycles and invalid producer/observer/supersedes type constraints before publication.
- Closure reports are content addressed and read-back verified.
Run this over evidence objects you created or were authorized to inspect. A hash proves identity, not truth; dsh-lineage reports what is present, missing or changed and does not invent assertions.
Install in DSH
dsh plugin --profile lineage add github:dongsheng123132/dsh-lineage
Registered tools:
dsh_lineage_inspectdsh_lineage_ingestdsh_lineage_querydsh_lineage_verify
MCP
.mcp.json declares a standalone stdio MCP server:
lineage_events_inspectvalidates a bounded inline JSONL graph and reports structural hashes, counts, dangling references, cycles and relation errors.lineage_events_queryreturns deterministic upstream/downstream closure over those inline events.
MCP accepts at most 1 MiB of inline structural events. It never dereferences object paths and never reads or writes the filesystem. Persistent append-only ingestion and object-hash verification remain available only through the workspace-bounded DSH tool and CLI surfaces.
CLI
dsh-lineage ingest --root /workspace --ledger ledger --events lineage.events.jsonl
dsh-lineage inspect --root /workspace --ledger ledger
dsh-lineage query --root /workspace --ledger ledger --node report:proof --direction upstream
dsh-lineage verify --root /workspace --ledger ledger --node report:proof --direction upstream --artifact-dir artifacts
query supports upstream, downstream, and both. verify exits 0 for a fully verified closure, 2 when a report is written but evidence is missing/stale/invalid, and 1 for an operational or schema error.
Example
node bin/dsh-lineage.mjs ingest --root . --ledger ledger --events examples/lineage.events.jsonl
node bin/dsh-lineage.mjs verify --root . --ledger ledger --node fact:normalized-v1 --direction both --artifact-dir artifacts
See examples/lineage.events.jsonl.
Develop
npm test
npm run check
npm run smoke:plugin
npm run smoke:mcp
python C:/Users/ZhuanZ/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
Requires Node.js 22+. There are no runtime dependencies or install lifecycle scripts beyond the optional DSH tools SDK peer.
License
MIT
更多「知识与研究」插件
dsh-browser
作者 lum1104
dsh plugin: Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required. 一款 Chrome 侧边栏扩展程序,可让 DSH 直接操控您的浏览器,无需视觉能力。
modsearch
作者 liustack
The web search plugin for DeepSeek Harness, and the search bridge for every model without native web access. Ask the web or X, get structured JSON evidence. | DeepSeek Harness 的联网搜索插件,为不能联网的模型补上搜索。问网页或 X,拿回结构化 JSON 证据(搜索、抓取、引用)。
argo
作者 taxueseek
专门为 agent 打造的 agent 搜索工具,具备多语言搜索能力,覆盖中文/英文/学术/代码/购物/金融/新闻/百科。
dsh-chat-import
作者 nwflower
Import 14+ external agent chat histories (Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi, Hermes, Kimi CLI, DSH) into DeepSeek Harness as resumable sessions — full-fidelity, reverse export/sync, bundle backup. | 从 Claude Code、Codex、Reasonix 等 Agent 工具导入历史消息到 DeepSeek Harness 并继续对话。
