dsh-docchain
DSH knowledge base and document conversion plugin: filename/content/metadata search, topic listing, bulk document upload, document-to-Markdown conversion, plus a deep-research workflow 需要配合docchain服务使用,适合有大批量文档检索与格式转换需求的用户。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wct-lab/dsh-docchainREADME
Read the full README ↗Configuration (required)
No credentials ship in this package. Every script except doc2markdown (Node.js) needs a docchain service endpoint and an API key before it can run; doc2markdown (Node.js) works with neither — it defaults to the public parsing service and uploads anonymously, while the same config chain can point it at a custom endpoint/key.
| Field | Meaning | Required |
|---|---|---|
docchain_url | docchain service address, e.g. http://:7100/llmdoc | Yes |
docchain_api_key | API authentication key | Yes |
Four ways to provide them, in priority order (higher wins):
- Environment variables
DOCCHAIN_URLandDOCCHAIN_API_KEY; - per-skill config file
/scripts/config.json; - the plugin state file
~/.dsh/storages/docchain-config.json(written by the plugin config — see below); - package-level
skills/docchain_config.json(file-drop distribution fallback; the package ships onlydocchain_config.example.jsonas a template).
Config file format (all JSON-based):
{
"docchain_url": "http://:7100/llmdoc",
"docchain_api_key": "your-api-key-here"
}
All scripts need only Node.js. Invoke them from the skill's base directory as node scripts/.js … (see each SKILL.md for parameters).
Plugin configuration (recommended)
The plugin ships a configuration page in the web client: in dsh web, open Plugins in the sidebar, find the dsh-docchain plugin, and use the configure control on its row. The page edits the service URL (saved to the row config and hot-reloaded through the host settings service) and writes the API key to the credential store. The key is write-only: the page never echoes a stored value, only whether one is set.
The plugin follows the official credential pattern. Its Config schema declares:
| Field | Meaning |
|---|---|
docchain_url | Service endpoint; volatile, editable on the configuration page |
docchain_api_key_ref | Credential reference name for the key; default DOCCHAIN_API_KEY |
docchain_api_key | Fallback literal key (not recommended; the store wins over it) |
The key's value lives in the credential store ~/.dsh/.credentials.yaml (refs: section, owner-only permissions) — save it through the configuration page or edit the file directly; changes hot-reload. It can also come from the launch environment under the same variable name. On activation, whenever a stored credential changes, and whenever this row's settings are saved, the resolved values are mirrored into ~/.dsh/storages/docchain-config.json (permissions 0600): the file is a pure projection of the current resolution, so a cleared config entry disappears from it; the scripts read it on every run.
Key resolution order: credential store (launch env > stored file) > docchain_api_key row literal.
To change values, either:
- use the configuration page on the Plugins page — edit the service URL and save/update the API key, or
- save/update
DOCCHAIN_API_KEYin the credential store — takes effect without touching this plugin, or - edit
~/.dsh/storages/docchain-config.jsondirectly (takes effect on the next script run; the plugin rewrites it from the resolved config on activation and config changes — for durable overrides use env vars or a per-skill config.json), or - set
docchain_url/docchain_api_key_ref/docchain_api_keyin the plugin's config row (patchconfig/ preset override) and re-activate the plugin.