Introduction¶
DeepSeek Harness (DSH) offers pluggable extensibility. Targeting OCR scenarios within code review or document processing, the dsh-ocr-review plugin wraps an external CLI tool, transforming it into model tools and settings cards that can be invoked by DSH.
Plugin Role¶
This plugin wraps open-code-review (ocr CLI) into 5 model tools and 1 Web settings card. It is responsible for parameter validation, configuration injection, and returning structured summaries, solving the issue where the host service does not handle parameter shape and type checking.
Core Features¶
- Tool Encapsulation: Registers 5 tools, including
ocr-review-routingandocrReview. - Settings Card: Provides 1 Web settings card for selecting the provider/model from the host settings service.
- Parameter Validation: The plugin handles the validation of tool parameter shapes and types.
- Configuration Management: Declares 6
.volatile()setting fields (namespaceocr-review), reading the provider/model from the host and writing it to the external CLI configuration. - Structured Output: Returns a structured OCR summary.
Dependencies & Installation¶
Before using this plugin, the host environment and external CLI requirements must be met.
Host Environment Requirements¶
- DeepSeek Harness version must be
>= 0.2.1-rc.2. - A version-matched
@jayyuen66/dsh-plugin-sharedneeds to be installed.
External CLI Installation¶
The plugin does not bundle the OCR library; it only invokes the external CLI via process calls. The following version must be installed manually:
# Install using Homebrew (version cannot be specified, uses latest stable release)
brew install open-code-review
# Install using npm (specifies version 1.13.0)
npm i -g @alibaba-group/open-code-review@1.13.0
Usage Instructions¶
- Configure Provider/Model: Select the model from the host service’s provider list via the Web settings card.
- Execute Tasks: Use the encapsulated tools to perform OCR tasks.
- Fetch Results: The plugin returns a structured summary containing OCR findings and run coverage.
Notes¶
- Platform Restrictions: Only supports macOS and Linux.
- Windows Risks: When running on Windows, if the main process exits abnormally, the OCR process may become an orphan process.
- Version Matching: The external CLI must be version 1.13.0; otherwise, the tools will refuse to execute.
- Parameter Merging: The
--excludeand--pathparameters are merged into a comma-separated string. - Format Restrictions: The
--formatparameter only accepts/text/sarif.
Conclusion¶
Through standardized encapsulation, this plugin integrates the existing OCR CLI tool into the DSH ecosystem. Please confirm the host version and CLI version before use, and pay attention to platform compatibility.