Preface¶
In the DSH plugin ecosystem, narrative workflows often need to maintain timelines, canon sources, and character knowledge boundaries. Existing tools such as Novel Director and InkOS can manage writing processes and richer story states; dsh-narrative-ledger addresses a different problem: providing these states with a read-only, verifiable, machine-checkable evidence layer.
It is designed for DeepSeek Harness, providing content-addressed timelines, canon, and character knowledge evidence. Below, we introduce its positioning, capabilities, installation method, and reproducible examples.
What This Is¶
dsh-narrative-ledger is a read-only, verifiable story state ledger for DeepSeek Harness. It is positioned as an evidence layer for machine-checkable continuity, not a fiction generator or a writing prompt wrapper.
Key information:
- Repository owner:
dongsheng123132 - Package name:
dsh-narrative-ledger - Version:
0.2.0 - License: MIT
- Runtime: Node.js >=22
- Module type:
type module - CLI:
dsh-narrative-ledger - Entry points:
.and./ledger
It references external canon sources but does not copy manuscript content into reports; it also does not run shells, make network requests, and only allows writes to an explicit artifactDir.
Core Features¶
Content-Addressed Canon¶
The plugin references external canon sources using content addressing. Reports do not copy manuscript text but instead validate around resolvable sources, events, facts, and character knowledge evidence.
Event Sequence and Story Time¶
The plugin validates a continuous, immutable event sequence and monotonic story time. Event sequences cannot be arbitrarily inserted, deleted, or rolled back; story time must advance in event order.
Fact Assertion and Retraction¶
The plugin supports explicit fact assertion and retraction. Assertions require subject, predicate, value, and source ID to be resolvable. It also discloses invalid retractions.
Conflict and State Disclosure¶
The plugin detects single-value conflicts, such as two locations at the same time or mutually exclusive states. It also discloses outdated canon, missing canon, inactive fact communication, and invalid retractions.
Character Knowledge Boundaries¶
Character knowledge is not globally visible by default. The plugin requires that character knowledge be gained only when a character witnesses an assertion or participates in communicating an active fact. This helps prevent characters from knowing future facts prematurely.
Spoiler-Safe Projection¶
The plugin supports spoiler-safe projection by sequence number, returning only fact IDs and knowledge IDs. This allows checking which facts a character knows at a given point without expanding manuscript content.
Reporting and Publication¶
The plugin generates deterministic content-addressed JSON reports and supports atomic publication with SHA-256 read-back. DSH and CLI serve as explicit filesystem interfaces, and their content-addressed artifact responses include byte length and successful read-back verification.
Input and Path Restrictions¶
The plugin rejects fields of type prose, chapter, draft, prompt, and secret. Paths must remain within workspaceRoot and reject symbolic links.
Installation and Activation¶
The plugin requires Node.js >=22. Installation command:
dsh plugin --profile web add github:dongsheng123132/dsh-narrative-ledger
After installation, the plugin provides DSH tools:
dsh_narrative_ledger_inspectdsh_narrative_ledger_verifydsh_narrative_ledger_query
The plugin also provides a proof-only stdio MCP server with tool names:
narrative_ledger_inspect_inlinenarrative_ledger_verify_inlinenarrative_ledger_query_inline
MCP only accepts bounded inline manifest / event strings, does not accept paths, and performs no filesystem, network, process, or artifact writes. Because MCP does not receive canon source bytes, inline verification only reports verified-structure, with sourceBytesVerified: false. Only DSH/CLI filesystem verification can report canon sources as fully verified.
0.2.0 uses a host-neutral namespace entry with no private DSH runtime dependencies or default exports, facilitating composition with the stock Cordis Web loader.
The plugin runs with the current dsh process permissions. Before installation, it is recommended to review the source code, dependencies, and MIT license, and confirm that its path restrictions, write scope, and tool permissions align with your usage environment.
Typical Usage¶
The examples/basic example illustrates a simple continuity scenario: Bob does not know the key-location fact at sequence 2 and only learns it in the disclosure scenario at sequence 3.
The following verify command validates the example workspace, manifest, and event files, writing results to artifacts:
dsh-narrative-ledger verify --workspace-root examples/basic --manifest narrative.manifest.json --events events.jsonl --artifact-dir artifacts
The following query command queries the state up to sequence 2:
dsh-narrative-ledger query --workspace-root examples/basic --manifest narrative.manifest.json --events events.jsonl --through-seq 2
These two commands demonstrate the basic CLI usage: one for verification and report publication, and one for sequence-number-based querying or projection.
Suitable Scenarios and Considerations¶
Suitable for:
- Checking narrative continuity in DSH beyond just text generation.
- Turning timelines, canon sources, fact assertions, and character knowledge into verifiable evidence.
- Combining with writing or state management tools like Novel Director and InkOS.
- Referencing external canon sources without copying manuscript content.
Considerations:
- The plugin is an evidence layer, not a fiction generator or writing prompt wrapper.
- MCP inline verification only reports structural verification, not that canon source bytes have been verified.
- Filesystem verification must be performed via DSH/CLI.
- Paths must remain within
workspaceRootand reject symbolic links. - The plugin does not run shells or make network requests, but only allows writes to an explicit
artifactDir.
Access¶
Plugin directory page (standalone site):
https://www.skillhub.cn/plugins/dongsheng123132/dsh-narrative-ledger
GitHub repository: