Local DeepSeek Harness plugin (not published to npm) built from Andrej Karpathy's LLM Wiki gist. Raw sources go into raw/ and are never rewritten. Pages update only from validated patches after user approval, and writes return NOT_APPROVED without hanging if no approval UI is present. Registers only 8 tools: wiki_status, wiki_parsers, wiki_read, wiki_ingest, wiki_query, wiki_graph, wiki_lint, and wiki_llm. Contradictions keep both sides on pages and in query results. wiki_graph walks 0 to 4 hops along page relations (optionally filtered by predicate) without calling a model; both relations and source hashes live on pages. Long sources split by headings and tables up to 8 segments per ingest with no resume parameter: unread text is noted on the source index page, wiki_lint reports PARTIAL, re-ingesting the full text still processes only the first 8 segments, and the unread tail must be ingested as a separate source. Built-in parsers cover images (pixels only, no OCR), Markdown, plain text, JSON, CSV, and HTML. PDF, Office, audio, and video return NEED_EXTERNAL_PARSER and can connect via the llm-wiki.parsers service or wiki_ingest's parsed parameter.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Zbcc0826/dsh-llm-wiki
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
中文说明:README.md
A DeepSeek Harness plugin built from Andrej Karpathy's LLM Wiki gist. It turns scattered materials into a cumulative knowledge wiki instead of re-reading raw files on every question.
Raw files are written to raw/ once and never modified. Pages, index.md, and log.md are updated only from validated patches after user approval. When no approval UI is present, writes return NOT_APPROVED and do not hang.
This is a local plugin and is not published to npm. The package name is dsh-llm-wiki. Clone the repo and install locally; the desktop app and the CLI share one configuration.
Try it, and let your own agent take part: ingest sources, ask questions, improve pages, or bring issues and findings back to Zbcc0826/dsh-llm-wiki.
What the wiki directory looks like
By default the wiki lives at $DSH_HOME/llm-wiki, or at the path set in LLM_WIKI_ROOT:
llm-wiki/
├── raw/
│ ├── <64-char-hex-hash><original-ext> # raw bytes, never rewritten; .bin if the extension is not safe
│ └── <same-hash>.meta.json
├── pages/
│ ├── source/<slug>.md
│ ├── entity/<slug>.md
│ ├── event/<slug>.md
│ ├── concept/<slug>.md
│ └── query/<slug>.md
├── index.md
├── contradictions.md
├── log.md
└── schema.md # generated once, never overwritten
What one page looks like
Below is a sample entity page (for example pages/entity/chen-lin.md) in the exact serializePage format from pages.js, where YAML frontmatter strings and list entries are serialized as JSON strings:
---
kind: "entity"
slug: "chen-lin"
title: "Lin Chen"
summary: "Systems engineer at Acme working on the storage engine."
partial: false
updated: "2026-04-12T08:30:00.000Z"
sources:
- "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
cites:
- "source/acme-team-notes"
contradicts: []
relations:
- "works-for entity/acme"
aliases:
- "L. Chen"
claims:
- "Lin Chen maintains the storage engine at Acme."
---
Lin Chen has worked as a systems engineer at [[entity/acme]] since 2024, maintaining the storage engine.
Requirements
- DeepSeek Harness
0.2.2-rc.3or newer, and below0.3.0 - A working
dshCLI or desktop app - The desktop app already includes the pnpm used to install plugins, so no extra pnpm install is needed
- When a task needs a model, the plugin asks whether to use a model already available in the DSH session (such as
dsv4flash), an API key from environment variables, or to turn off model tasks in the plugin
Install and uninstall
You can install the plugin in any of these three ways:
1. Plugins page
Open Plugins, click the arrow next to Add plugin, and choose Install a third-party plugin. Enter this repo's absolute path for a local clone, or enter:
github:Zbcc0826/dsh-llm-wiki
Choose Enable now when installation finishes. The card appears under Experimental → Installed, titled LLM Wiki, with a switch on the right. Turning the switch off unloads dsh-llm-wiki.
2. CLI
dsh plugin --profile <profile> add github:Zbcc0826/dsh-llm-wiki
Here <profile> is a CLI profile name, not desktop. The desktop profile cannot use dsh plugin --profile desktop; install through the Plugins page or node install.mjs below, then restart the desktop app.
3. Install script in the repo
node install.mjs
The script installs into every existing profile under DSH_HOME (default ~/.dsh) and turns the switch on. Because dsh plugin --profile desktop cannot manage the desktop profile, the script edits that directory directly; restart a running desktop app afterward.
For a local-path install, the script also vendors @deepseek-ai/dsh-tools into .dsh-deps, because linking to a directory outside the repo will not fall back to the copy inside the app. Do not commit .dsh-deps or node_modules.
Uninstall and notes
To remove the plugin, turn the card switch off and uninstall. Never write an absolute path into $DSH_HOME/cordis.patch.yml. A plugin loaded that way does not show up on the Plugins page, and the switch cannot turn it off.
The 8 tools
The plugin registers only these 8 tools: wiki_status, wiki_parsers, wiki_read, wiki_ingest, wiki_query, wiki_graph, wiki_lint, and wiki_llm.
wiki_ingest: Parses one source and updates related pages only after user approval (returnsNOT_APPROVEDwithout hanging if no approval UI is present). Its only parameters arepath,text,title,mediaType,parsed, andllm(pass one ofpath,text, orparsed). There is nooffset,cursor,fromSegment, or resume parameter. Aliases should be terms future readers will search. Long sources are split by headings and tables into segments sharing one raw hash and one index heading; tables stay with their headers, and a locator stays in the same segment as the table that follows it. At most 8 segments are processed per call, and unread text is marked on the source index page.wiki_query: Retrieves evidence first and answers strictly from that evidence without reading raw files inraw/. The answer is saved as a page only whenfileistrue.wiki_graph: Queries alongrelationsfrom an entity, event, title, or alias without calling a model.hopsranges from0to4(default2), andpredicatefilters to one relation type. Relations (predicate kind/slug, such asworks-for entity/acme) and source hashes (sources) are stored directly on pages—not as separate provenance per edge. Traversal works in both directions, including back from a target page to pages that declare the edge. Existingrelationsmust be preserved when a page is updated. Events are written aseventpages.wiki_lint: Reports broken links, orphan pages (source pages with no incoming links are not orphans), missing relations, and incomplete sources (PARTIAL). Settingapply: trueonly edits existing pages; it cannot create pages, drop sources, or pull in unread tails.wiki_read: Read-only. Reads a page bykind/slug.wiki_status: Read-only. Shows page counts, recent log entries, andorphans(raw files not cited by any page).wiki_parsers: Read-only. Lists currently available parsers.wiki_llm: Changes the saved model mode and asks for confirmation before applying.
Handling the tail after 8 segments
wiki_ingest accepts only path, text, title, mediaType, parsed, and llm. There is no offset, cursor, fromSegment, or resume parameter to continue from segment 9. In split.js, MAX_SEGMENTS = 8 with roughly 7500 characters per segment, and the excess character count is returned in omitted:
- The source index page sets
partial: true, writes后面还有未纳入的文字insummary, and writes后面约 N 字这一次没有纳入。in its body (the program writes these exact Chinese strings). wiki_lintreportscode: PARTIALfor pages withpartial: true. Even withapply: true, it only edits existing pages and does not pull in the unread tail.- Calling
wiki_ingestagain on the same full text still starts from the beginning and only expands the first 8 segments. - To ingest the remaining tail, extract the unread portion into a separate new source (
pathortext) and callwiki_ingestagain. The new source gets its own raw hash, and its pages can link to or update existing pages in the wiki.
How retrieval finds evidence
- Retrieval starts at catalog cards: title, aliases, and one claim. An alias match outranks a passing mention in page body text.
- It then opens a few matching pages, follows
[[links]](one hop) andrelations, and keeps both sides of any contradiction. - When words and the catalog do not pull candidates apart, local
multilingual-e5-smallvectors step in (without calling DeepSeek's embedding API). The first query downloads weights into the plugin's.cachedirectory; if that download fails, retrieval falls back to words, the catalog, and links. - When catalog and words still do not pull ahead, it tries headings a reader would look up.
- Evidence sentences are reranked rather than reading blindly from the start of a page.
- At most 10 pieces of evidence are returned, and
wiki_queryanswers only from those pieces.
Parsers
- Built-in types: Images (pixels only; never invent OCR text), Markdown, plain text, JSON, CSV, and HTML.
- Types requiring an external parser: PDF, Word, Excel, PowerPoint (PPT), audio, and video are not parsed here and return
NEED_EXTERNAL_PARSER. - Unknown types: Return
NO_PARSER. - Connecting external parsers: Another plugin can inject the
llm-wiki.parsersservice (registerto add a parser,acceptto preview parsed output), or pass the parsed document directly towiki_ingestviaparsed(mutually exclusive withpathandtext). - Parsed document format:
partscarrytext,table,caption,transcript, orimage, withlocatorfor page, slide, or timestamp; original bytes go insource.base64. Tables stay with their headers, and a locator stays in the same segment as the table that follows it. - Extension and presentation:
createRegistryinparsers.jsaccepts extra parsers ahead of built-in ones, implementingacceptsandparse.presentSourceinpresent.jscontrols what text and images (up to 4 images) the model sees.
Model choice and keys
Before a mode is chosen, wiki_ingest and wiki_query return NEED_LLM_CHOICE, and write neither llm.json nor raw material. The three modes are:
dsh: Uses a model already available in the current DSH session (such asdsv4flash), sending messages as text blocks.key: ReadsDEEPSEEK_API_KEYor the file named byDEEPSEEK_KEY_FILE. Key mode requestsdeepseek-v4-flash(the literaldsv4.1flashis rejected by the API, and responses usually reportdeepseek-flash).off: Skips model tasks in the plugin. Read-only queries andwiki_lintchecks remain available, whilewiki_ingestreturnsLLM_OFFbefore writing to disk.
An explicit llm argument overrides the saved mode and takes effect immediately. Changing the mode with wiki_llm asks for confirmation again. The choice is stored in llm.json inside the wiki directory and contains no key. Do not commit API keys to the repository.
Failures are appended to log.md. wiki_status lists unreferenced raw files in orphans. Write results include approved and outcome.
Links
More in this category
vectorize-io/hindsight#coding-agents★ 63857
Hindsight, agent memory that learns: long-term project memory with auto recall and retain, knowledge pages, deep reflection, and per-repo memory banks.
volcengine/OpenViking#examples/dsh-memory-plugin★ 42946
OpenViking memory and context bundle for DeepSeek Harness: pre-step auto-recall and profile injection, session capture, `viking://` URI guarding, and recall/write memory tools backed by an OpenViking server.
MemTensor/MemOS#memos-local-plugin★ 12527
Local-first memory plugin for DeepSeek Harness: layered L1/L2/L3 memory with automatic capture, manual memos_* retrieval tools, and a built-in memory viewer.
agentscope-ai/ReMe#dsh★ 3860
Connects DeepSeek Harness to ReMe's local-first, self-evolving personal knowledge base: automatically captures completed main-agent conversations as user-owned Markdown memory, searches conversations and source material through reme_search with BM25, optional embeddings, and wikilink expansion, and schedules daily memory consolidation.
zilliztech/memsearch#MemSearch★ 2956
Shared Markdown memory for DSH and other coding agents, with automatic capture, pre-step context injection, searchable recall, and memory-to-skill self-evolution through a review panel.
vshulcz/deja-vu#extensions/dsh★ 1686
Cross-session memory and context recovery across forty-five other coding agents (45+) on this machine, reading session files they already wrote before install (Claude Code, Codex, Cursor, Windsurf, Trae, Antigravity, VS Code Copilot Chat, opencode, OpenClaw, Hermes, Kimi, Qoder, Cline, Zed, Magpie and more): six tools (deja_recall, deja_session, deja_blame, deja_fix, deja_how, deja_remember), a /deja command, and optional automatic recall injected into runtime context. Local BM25 CLI/MCP index, no LLM, no embeddings, no network (dsh plugin --profile web add dsh-deja).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.