jiayan-xu/dsh-ocr-review

Local AI code-review gate: review a workspace/branch/commit diff via the managed ocr.js, returning structured findings with token stats; gate mode fails on findings.

Bundle verified Unknown JavaScript Unknown
Bundle verified

Listed

0

Git

Bundle verified

VersionUnknown
LanguageJavaScript
LicenseUnknown
View on GitHub

What it does

Local AI code-review gate: review a workspace/branch/commit diff via the managed ocr.js, returning structured findings with token stats; gate mode fails on findings.

Best for

  • Developers reviewing uncommitted workspace changes before committing.
  • Teams applying structured AI review to a branch merge-base range or a single commit.
  • Local or CI gates that should fail whenever review findings are returned.
  • Users who want normalized findings plus review-session and token statistics.

Not ideal for

  • Whole-repository audits without a workspace, branch-range, or commit diff to review.
  • Environments without the managed `ocr.js`, a Node.js executable, or configured LLM provider access.
  • Reviews whose important files match the default exclusion globs unless those exclusions are overridden.
  • Workflows that need a gate to distinguish severity levels, since gate mode fails on any returned comment.

README

dsh-ocr-review

dsh-ocr-review is a local OpenCodeReview gate for DSH. It runs the managed ocr.js executable against repository changes and returns structured review findings and summary information, including token statistics.

Capabilities

The plugin registers two tools:

  • ocr_review reviews uncommitted workspace changes, a merge-base range, or a single commit.
  • ocr_llm_test runs ocr llm test to check the configured provider and LLM connection.

Review findings are normalized to include path, line, severity, category, and message fields. The result also includes the review status, message, session ID, and summary.

When gate is enabled, ocr_review throws an error if the review returns one or more comments.

Review Options

ocr_review accepts:

  • repo: Absolute repository working directory. Defaults to the current working directory.
  • from: Base ref for a merge-base review. When omitted, workspace changes are reviewed.
  • to: Target ref used with from. Defaults to HEAD.
  • commit: A single commit to review; mutually exclusive with from and to.
  • exclude: Comma-separated exclusion globs.
  • gate: Fail when findings are present.
  • provider: Override the configured provider.
  • model: Override the configured model.

The default exclusions are:

.github/**,.githooks/**,scripts/ocr-review.sh,**/__pycache__/**,**/*.bak,**/*.exe,**/*.csv,**/target/**

ocr_llm_test accepts an optional repo working directory.

Configuration

By default, provider configuration is read from:

~/.opencodereview/config.json

The managed executable paths and default exclusions can be overridden with these environment variables:

  • OCR_NODE_BIN: Node.js executable path.
  • OCR_OCR_BIN: OpenCodeReview ocr.js path.
  • OCR_DEFAULT_EXCLUDE: Default comma-separated exclusion globs.

The package includes a Cordis bundle patch that registers @jhp830901/dsh-ocr-review. It declares DSH >=0.0.1, depends on @deepseek-ai/dsh-tools, and has a peer dependency on @deepseek-ai/cordis.

License

MIT

Frequently Asked QuestionsFAQ

Use the verified command dsh plugin --profile default add github:jiayan-xu/dsh-ocr-review in a DSH-enabled shell. The command resolves the public package metadata and keeps the plugin attached to the catalog identity shown on this page.