Introduction¶
When developing with DSH (DeepSeek Harness), AI is responsible for generating content, while humans are responsible for managing it. These outputs (plans, analyses, specifications, etc.) can easily become scattered across the workspace and are hard to find a few days later. The dsh-asset-library plugin provides an asset management layer to discover, organize, manage, and reuse these AI-generated artifacts. It does not exist as standalone software; rather, it is integrated into the DSH experience, similar to Finder on macOS.
Core Features¶
Four-Axis Classification and Local Storage¶
The plugin classifies AI outputs as local Markdown files. It supports organizing assets along four dimensions: time, file type, session, and project. The default storage path is <DSH_HOME>/asset-library/.
Asset Discovery and Scoring¶
The plugin scans the workspace, identifies AI output files (rather than dependencies, source code, or scaffolding files), and scores them based on the following criteria (0-100):
- Markdown structure (heading levels, paragraphs): +20
- Title completeness: +10
- Table of contents exists (≥3 subheadings): +10
- AI language patterns (such as “The following is”, “In summary”, “plan”): +20
- From the top level of the workspace: +30
Freshness (time since generation) is only used for sorting and is not included in the recommendation score. Hard exclusions include node_modules, .git, dist, package.json, LICENSE, credentials, images, archives, and source code.
State Management and Sidebar Interaction¶
Asset states flow as follows: Draft -> Confirmed -> Archived.
* Draft: Items brought in by automatic scanning.
* Confirmed: Items actively saved by the user.
* Archived: Items manually toggled on the detail page.
The sidebar (right 25%) scans once every 15 seconds. When new assets are detected, the sidebar automatically expands to allow saving or ignoring them without interrupting the conversation.
Installation and Enabling¶
Install the plugin using the following command:
dsh plugin --profile web add /path/to/dsh-asset-library
After installation, an “Asset Library” entry appears in the sidebar. You can also open the standalone management page by accessing <dsh web address>/ext/asset-library/.
Typical Usage¶
Slash Commands¶
Use them directly in the chat input box; they do not enter the model request:
/save: Save the previous assistant reply./save <title>: Save with a specified title./save note <body>: Save a note directly./save list [keyword]: List assets and filter them.
Model Tools¶
The plugin provides tools for the model to call:
asset_save_file: Save a file (text is inlined; binary or oversized files only register the path).asset_save_snippet: Save a text snippet.asset_list: List assets (supports filtering by axis, project, or keyword).asset_overview: Overview view.asset_read: Read the full text of an asset.
HTTP API¶
Standard HTTP interfaces are provided:
GET /ext/assets/list: List query (supports pagination).POST /ext/assets/register: Register an asset.GET /ext/assets/<id>: Metadata.GET /ext/assets/<id>/content: Metadata + full text.GET /ext/assets/<id>/file: Download the file.PATCH /ext/assets/<id>: Update the asset.DELETE /ext/assets/<id>: Delete the asset.
Note: For security reasons, all write operations and full-text reads are limited to local loopback sources.
Markdown Viewer¶
The asset detail page renders Markdown content directly (headings, lists, code blocks, etc.) and supports automatic table of contents for long documents. A table of contents is automatically generated when there are ≥4 headings.
Configuration¶
Override configuration items via cordis.patch.yml:
- id: asset-library
config:
rootDir: /your/library # 默认 <DSH_HOME>/asset-library
autoCollect: true # 默认 true
maxPerTurn: 20 # 单轮自动采集上限
mutationTools: [write, edit] # 视为文件变更的工具名
maxInlineBytes: 262144 # 正文内联上限(字节)
Technical Details and Limitations¶
Dependency Management¶
The dependencies field of this plugin is empty. This is to avoid conflicts with the host DSH version and prevent pnpm from installing mismatched copies that could cause startup failure.
Implementation Approach¶
- Sidebar: Implemented through DOM injection (DSH has not yet exposed shared module slots).
- Management page: A standalone page, not a native panel.
- File watching: No file system watching. External changes require manual refresh or restart.
Conclusion¶
dsh-asset-library turns AI outputs into searchable and manageable assets. Through four-axis classification and local storage, it solves the problem of scattered content. After installation, it can be used in the DSH sidebar or management page.