Preface¶
When collaborating with models in DeepSeek Harness (DSH), the output is often long conversations, requirement specifications, or research conclusions. If these contents remain only in the session, retrieving and consolidating them afterwards is troublesome. Common practices include manually copying them to note-taking software or adding an extra layer of MCP for bridging—the former is manual labor, while the latter introduces an additional layer of runtime and configuration.
Below is an introduction to the community plugin dsh-siyuan-archive (display name “SiYuan Archive”), released by maintainer YYK0402. It connects directly to the SiYuan Note HTTP API, has zero runtime dependencies, does not wrap MCP, and provides a settings page for connection, token, archive path, and permissions. It is suitable for users who wish to structure and land DSH conversation results into SiYuan.
What is this¶
dsh-siyuan-archive is a web profile plugin for DSH: it archives content produced by DSH conversations into SiYuan Note, stores the token in the host credential store; permissions are inherited based on “Notebook → Document”, and unconfigured notebooks default to denying all read/write/delete access.
- Repository: YYK0402/dsh-siyuan-archive
- Community Directory: SkillHub Plugin Page
- License: MIT (see repository README)
- Current package version: 0.1.1
- Categories (dshhub): Knowledge Base, Web UI
The DSH ecosystem philosophy is “Everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / Highflyer.
Core Features¶
Archive with a single command¶
During archiving, titles and directories are generated according to path rules and written to SiYuan:
<Archive Path>/<Year-Month>/<Type>/<Date>_<Time>_<Topic>_<Content>
A metadata table is automatically appended at the top of the body. If the path already exists, content is appended.
Index and Specifications¶
The first archive creates an “Index and Specifications” document at the notebook root; subsequent archives rebuild the index table (Title, Type, Archive Time; the title column is clickable for jumping).
Settings Page (Five Cards)¶
In DSH Web → Settings → Left side “SiYuan Archive”:
- Connection: SiYuan Address, Save, Test Connection (Displaying the version number indicates success).
- API token: Paste and save; written to the host credential store, never echoed back.
- Archive: Load Notebooks, Select Target Notebook, Archive Path, Default Type, Title Template.
- Permissions: Grant Read/Write at the notebook level (Archiving requires “Write”); expand documents to tighten permissions for sub-paths; unchecked defaults to deny all.
- Tool Switches:
siyuan_archiveis enabled by default; deletion tools are disabled by default.
Six Tools¶
| Tool | Group | Permission | Description |
|---|---|---|---|
siyuan_list_notebooks |
Read-only | None | Lists notebook names and IDs |
siyuan_search |
Read-only | Read | Full-text search; unauthorized hits are filtered and the count is indicated |
siyuan_read_doc |
Read-only | Read | Read document (text / markdown) |
siyuan_archive |
Archive | Write | Archive content (with metadata table); update “Index and Specifications” |
siyuan_delete_block |
Dangerous | Delete | Delete content block (requires confirm=true) |
siyuan_remove_doc |
Dangerous | Delete | Delete entire document (requires confirm=true) |
Permission Model¶
- Notebooks not explicitly configured: Read/Write/Delete all denied.
- Notebook-level check = Grant, automatically inherited to all its sub-documents.
- Document-level switch = Explicit Deny (Tighten): Can only turn off inherited permissions, cannot grant permissions out of thin air.
- Judgment is executed before every tool call request is sent;
siyuan_list_notebooksonly exposes names/IDs and has no permission settings.
Prerequisites¶
- Node ≥ 22, dsh (web profile); the plugin requires dsh version
>=0.1.5-rc.1 || >=0.1.6-0 || >=0.1.7-0. - SiYuan Note has API token enabled (SiYuan → Settings → About → API token).
baseUrlaccesses SiYuan from the perspective of the machine where the dsh process is located (defaulthttp://127.0.0.1:6806).
Installation and Enablement¶
First, install from GitHub (Recommended; pure JS with no build steps):
dsh plugin --profile web add github:YYK0402/dsh-siyuan-archive#main
For local development, you can use link:
dsh plugin --profile web add /path/to/dsh-siyuan
Once published to npm, you can use:
dsh plugin --profile web add dsh-siyuan-archive
After installation, you need to restart the dsh web process (Changes to the host half lib/index.js must be restarted; the client half will hot-update).
The plugin runs with the permissions of the current dsh process. Before installation, you should review the repository source code and the MIT license yourself to confirm that the connection address, token, and permission scope comply with your environment.
Configuration Steps¶
After the installation and restart above, complete the following in order on the settings page:
- Connection: Fill in SiYuan Address → Save Address → Test Connection.
- API token: Paste token → Save.
- Archive: Load Notebooks → Select Target Notebook, Archive Path, Default Type, Title Template → Save.
- Permissions: Check Read/Write for the target notebook; tighten at the document level if necessary → Save.
- Tool Switches: Enable read-only, archive, or deletion tools as needed.
The footer displays the “Host Interface Prefix”. If DSH is mounted under a path prefix (e.g., https://example.com/dsh/), the settings page usually locates the prefix automatically; reverse proxies need to preserve the Host and correctly strip the prefix, otherwise DSH itself may return 403/404. If the prefix cannot be located automatically, you can execute the following once in the browser console:
localStorage.setItem('dsh-siyuan-archive.apiBase', '/dsh')
For nginx reverse proxy examples, see the repository README (location /dsh/, proxy_pass trailing slash, Host and X-Forwarded-Proto).
Typical Usage¶
State your intention directly in the conversation, and the model will call tools like siyuan_archive. Example from the README:
Archive the following requirement to SiYuan, topic “Contract System Phase II”, type “Requirement”
This will generate a document similar to /<Archive Path>/2026-09/Requirement/2026-09-26_xxxx_Contract System Phase II_xxx, with the body being a metadata table plus content, and will update the “Index and Specifications” index table at the notebook root.
For read-only scenarios, you can grant only “Read” in permissions and enable siyuan_search, siyuan_read_doc; deletion tools are disabled by default. Before enabling them, you should clarify the scope of “Delete” grants under the permission model.
Suitable Scenarios and Notes¶
Who it is for
- Users who are already using SiYuan Note and want DSH conversation outputs to be saved by year-month, type, and topic.
- Scenarios requiring notebook/document-level read/write/delete control, where you do not want the API to be open to all notebooks by default.
- DSH web deployments that want to connect directly to the SiYuan API without introducing MCP runtime dependencies.
Notes
- Token and network reachability are based on the machine where the dsh host resides; remote SiYuan requires filling in a
baseUrlaccessible from the host. - Deletion tools require
confirm=trueand must be explicitly granted “Delete” in permissions; the default off for tools and default deny all for permissions are designed to reduce the risk of accidental deletion. - Statistics such as community directory stars are subject to the site display; functional details are subject to the GitHub README and the repository
CHANGELOG.
Conclusion¶
dsh-siyuan-archive consolidates “Conversation → Structured Archive → SiYuan Index” into a single chain, and pairs it with connection, credential, and permission settings pages. If your knowledge base is in SiYuan and your conversations are in DSH, you can integrate it following the installation commands and configuration order in this article.
- Community Directory: https://www.skillhub.cn/plugins/YYK0402/dsh-siyuan-archive
- Source Code and Documentation: https://github.com/YYK0402/dsh-siyuan-archive