설치
npx -y @deepseek-ai/dsh plugin --profile web add github:leozou320-ai/dsh-macos-vision-ocr이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.
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
VNRecognizeTextRequestat 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
swiftcavailable onPATH. - DeepSeek Harness
0.1.0-rc.5or 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
swiftconce 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
프로젝트 파일 및 신호
표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.
저장소 정보
- 언어
- JavaScript
- 라이선스
- MIT
- 마지막 업데이트
- 2026. 8. 16. 오전 2:21
신중하게 설치하기
소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.