Introduction¶
When building agents or workflows based on DeepSeek Harness (DSH) that need to process generated documents and annotate their AI-generated attributes, a standardized method for writing metadata into files is required. GB 45438-2025 Appendix E specifies the requirements for implicit labeling, mandating the inclusion of AIGC keywords and a five-element JSON object within documents. This article introduces a DSH plugin specifically designed to accomplish this task.
What is it¶
dsh-ai-label-stamp is a DSH plugin that writes GB 45438-2025 Appendix E implicit labeling metadata—including AIGC keywords and the five-element JSON—into files in docx, png, txt, and md formats. It serves as the execution endpoint for the dsh-ai-label-verify verification plugin, forming a “stamp-verify” closed loop.
The plugin is maintained by feely0208, categorized under admin-security, currently at version 0.1.0, and licensed under the MIT License.
Core Features¶
- Supported formats: docx, png, txt, md
- Content written: GB 45438-2025 Appendix E implicit labeling, including AIGC keywords and the five-element JSON
- Operation mode: Generates a copy file by default; the original file remains unmodified
- Working mode: Acts as the execution endpoint for dsh-ai-label-verify to complete the stamping action
Installation & Activation¶
Install the plugin in your DSH environment:
dsh plugin --profile web add @deepwhale-cn/dsh-ai-label-stamp
You can also install it via npm:
npm i @deepwhale-cn/dsh-ai-label-stamp
Or install directly from a local repository:
dsh plugin install ./
Typical Usage¶
Once installed, you can use it directly from the command line:
npx @deepwhale-cn/dsh-ai-label-stamp --dir <directory> --out ./stamped
The command above scans docx/png/txt/md files in the specified directory, writes implicit labeling metadata into copy files, and outputs the copies to the ./stamped directory.
After stamping, you can verify the labels using the verification plugin:
npx @deepwhale-cn/dsh-ai-label-verify --dir ./stamped
Use Cases & Notes¶
This plugin is well-suited for scenarios requiring batch document processing and ensuring AI-generated content complies with GB 45438 labeling requirements, such as enterprise internal document workflows and compliance checking pipelines.
Note: This plugin runs under DSH process permissions. Before installation, review the source code and license to ensure it meets your usage requirements. The plugin depends on @deepwhale-cn/dsh-guard-core (version ^0.10.1) and DSH version >=0.1.0-rc.6 <0.3.0. Node.js version must be >=18.
Summary¶
dsh-ai-label-stamp provides a standardized approach within the DSH plugin ecosystem for writing GB 45438 implicit labeling metadata into documents. Paired with the verification plugin, it enables a complete closed loop from stamping to verification, making it easier for agents to handle compliance labeling tasks within workflows.
- Plugin directory: https://www.skillhub.cn/plugins/feely0208/dsh-ai-label-stamp
- GitHub repository: https://github.com/feely0208/dsh-ai-label-stamp