dongsheng123132/dsh-narrative-ledger
用于DeepSeek Harness的可验证叙事状态、连续性与角色知识账本
项目介绍Project Overview
DSH Narrative Ledger 是面向 DeepSeek Harness 的只读、可验证故事状态账本,作为写作工作流的证据层。它提供内容寻址外部典籍校验、不可变事件序列与单调时间线、事实断言与撤回、角色知识追踪、序列点无剧透投影以及 SHA-256 确定性报告。适用于需要机器可检连续性的叙事项目。需注意:拒绝散文、章节、提示等字段,路径须位于工作区根内且禁用符号链接,不执行 shell 与网络请求,仅允许写入显式 artifactDir。
DSH Narrative Ledger is a read-only, verifiable story-state ledger for DeepSeek Harness, serving as an evidence layer for writing workflows. It offers content-addressed external canon verification, contiguous immutable event sequences with monotonic time, explicit fact assertion and retraction, character knowledge tracking, spoiler-safe projection at sequence points, and deterministic SHA-256 reports. Use it for narrative projects requiring machine-checkable continuity. Note that it rejects prose, chapter, draft, prompt, and secret-shaped fields; paths must stay within workspaceRoot with symlinks disabled; no shell execution or network requests occur; only explicit artifactDir may be written.
请帮我了解并安装插件:【dsh-narrative-ledger】【https://github.com/dongsheng123132/dsh-narrative-ledger】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:dongsheng123132/dsh-narrative-ledger
把 dongsheng123132/dsh-narrative-ledger 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DSH Narrative Ledger
A read-only, verifiable story-state ledger for DeepSeek Harness. It is not a novel generator or writing-prompt wrapper. Existing tools such as Novel Director and InkOS manage writing workflows and rich story state; this plugin is the complementary evidence layer for machine-checkable continuity.
What it verifies
- content-addressed external canon sources without copying manuscript prose into reports;
- contiguous immutable event sequence and monotonic story time;
- explicit fact assertion and retraction with resolvable subject, predicate, value and source IDs;
- single-value contradictions such as two simultaneous locations or mutually exclusive states;
- character knowledge acquired only by witnessing an assertion or participating in a scene that communicates an active fact;
- spoiler-safe projection at a sequence number, returning only fact IDs and knowledge IDs;
- stale/missing canon, inactive fact communication and invalid retraction disclosure;
- deterministic content-addressed JSON reports with atomic publication and SHA-256 read-back.
The ledger rejects prose-, chapter-, draft-, prompt- and secret-shaped fields. Paths must remain inside workspaceRoot; symlinks are rejected. It runs no shell and makes no network requests. Only an explicit artifactDir may be written.
Install
dsh plugin --profile web add github:dongsheng123132/dsh-narrative-ledger
DSH tools: dsh_narrative_ledger_inspect, dsh_narrative_ledger_verify, dsh_narrative_ledger_query.
The Codex plugin also exposes a proof-only stdio MCP server through .mcp.json: narrative_ledger_inspect_inline, narrative_ledger_verify_inline, and narrative_ledger_query_inline. MCP accepts bounded inline manifest/event strings only, never paths, and performs no filesystem, network, process, or artifact writes. Because canon source bytes are not supplied, inline verification reports verified-structure plus sourceBytesVerified: false; only DSH/CLI filesystem verification may report the canon sources as fully verified.
Version 0.2.0 uses a host-neutral namespace entry with no private DSH runtime dependency or default export, so the stock Cordis Web loader can compose it safely. DSH and CLI remain the explicit filesystem surfaces; their content-addressed artifact response includes byte length and successful read-back verification.
CLI
dsh-narrative-ledger verify --workspace-root examples/basic --manifest narrative.manifest.json --events events.jsonl --artifact-dir artifacts
dsh-narrative-ledger query --workspace-root examples/basic --manifest narrative.manifest.json --events events.jsonl --through-seq 2
See examples/basic: Bob does not know the key-location fact at sequence 2 and learns it only in the disclosure scene at sequence 3.
Development
npm test
npm run check
npm run smoke:plugin
npm run smoke:mcp
DSH_CHECKOUT=/path/to/DeepSeek-Harness npm run smoke:dsh
MIT
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/distilly
titanwings/colleague-skill