dshbase

插件目录 / Developer / dsh-macos-vision-ocr

dsh-macos-vision-ocr

已验证 · 实测可装 leozou320-ai

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-16最近推送
跨平台平台

功能简介

Offline macOS Vision OCR for DeepSeek Harness — accurate, local, API-key free. | DeepSeek Harness 本地离线 OCR 插件

✅
我们的评价
可用 — 实测通过,早期项目

Offline macOS Vision OCR for DeepSeek Harness — accurate, local, API-key free. | DeepSeek Harness 本地离线 OCR 插件 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-macos-vision-ocr

English | 简体中文

Offline OCR for DeepSeek Harness, powered by Apple's macOS Vision framework. The plugin adds an ocr_image tool that lets any text model extract text from screenshots, scans, and document images without an API key or network request.

Features

  • Runs locally with VNRecognizeTextRequest at accurate recognition level.
  • Supports PNG, JPEG, WebP, GIF, TIFF, BMP, HEIC, and HEIF.
  • Accepts BCP-47 recognition languages per call.
  • Compiles its small embedded Swift helper on first use, then reuses a content-addressed cache.
  • Returns bounded output and reports whether text was truncated.
  • Uses fixed subprocess argument vectors; image paths are never interpolated into a shell command.

Requirements

  • macOS 13 or later.
  • Xcode Command Line Tools with swiftc available on PATH.
  • DeepSeek Harness 0.1.0-rc.5 or a compatible developer-preview build.

This plugin intentionally fails on Linux and Windows because Apple Vision is not available there.

Install

Install directly from GitHub into any profile that should expose OCR:

dsh plugin --profile web add github:leozou320-ai/dsh-macos-vision-ocr

Restart the profile after installation. To remove it:

dsh plugin --profile web remove dsh-macos-vision-ocr

Usage

Ask the agent to read an image, or call the tool explicitly:

{
  "file_path": "./scan.png",
  "languages": ["zh-Hans", "en-US"]
}

The result contains the canonical image path, recognized text, selected languages, and a truncated flag.

Configuration

Edit this package's row in a later Harness patch layer when you need different defaults:

- id: dsh-macos-vision-ocr
  config:
    cacheDir: /absolute/path/to/cache
    languages: [en-US]
    maxOutputBytes: 2000000
Key Default Description
cacheDir $DSH_HOME/cache/ocr Swift source and compiled helper cache.
languages zh-Hans, zh-Hant, en-US Languages used when a tool call omits them.
maxOutputBytes 1000000 Maximum captured OCR stdout per call.

Permissions, privacy, and security

  • OCR is local and the plugin makes no network requests.
  • Image paths are checked through Harness's filesystem service before the native helper runs, so the active filesystem policy still controls access.
  • The plugin runs swiftc once and then executes the cached native helper through Harness's subprocess service.
  • Recognized text becomes tool output and therefore enters the current session transcript and model context. Do not OCR material you would not send to the configured model provider.
  • Review third-party plugin source before installation and pin a commit for sensitive deployments.

Known limitations

  • Text recognition is not general visual understanding; it does not identify objects, faces, or scenes.
  • Reading order is a geometric approximation and can be imperfect for multi-column or highly stylized layouts.
  • The first call is slower because the Swift helper must compile.
  • Handwriting quality depends on language, image quality, and the macOS Vision version.

Development

node --check host.mjs
node --test
npm pack --dry-run

For a local install test:

dsh plugin --profile web add ./path/to/dsh-macos-vision-ocr

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-macos-vision-ocr」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:leozou320-ai/dsh-macos-vision-ocr

Headless(CLI)profile:

dsh plugin --profile headless add github:leozou320-ai/dsh-macos-vision-ocr

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →