DeepSeek Harness Plugin: dsh-ocr-review

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

  1. Tool Encapsulation: Registers 5 tools, including ocr-review-routing and ocrReview.
  2. Settings Card: Provides 1 Web settings card for selecting the provider/model from the host settings service.
  3. Parameter Validation: The plugin handles the validation of tool parameter shapes and types.
  4. Configuration Management: Declares 6 .volatile() setting fields (namespace ocr-review), reading the provider/model from the host and writing it to the external CLI configuration.
  5. 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-shared needs 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

  1. Configure Provider/Model: Select the model from the host service’s provider list via the Web settings card.
  2. Execute Tasks: Use the encapsulated tools to perform OCR tasks.
  3. 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 --exclude and --path parameters are merged into a comma-separated string.
  • Format Restrictions: The --format parameter 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.


羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye