read-paper
已验证 · 实测可装 louwenbo580
功能简介
Paper review panel for the DeepSeek Harness: PDF to selectable text with figures, equations, and an ask-the-paper dialog
可用 — 实测通过,早期项目
Paper review panel for the DeepSeek Harness: PDF to selectable text with figures, equations, and an ask-the-paper dialog 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
paper-review
A paper-review panel for the DeepSeek Harness: upload a PDF paper and read
it as structured, selectable text beside the conversation, with figures and
display equations rendered visually.
Features
- PDF → structured text (runs on the Harness host, via poppler):
- two-column layout reconstruction (gutter detection + full-width line reassembly)
- headings (size + all-caps normalization) and run-in heading splitting
- tables (geometric column detection, wrapped-cell continuation)
- sub/superscripts, dot-leader table of contents
- scanned-PDF fallback to page images
- Figures and display equations rendered as images (
pdftoppmcrops +pdfimagesraster extraction), with equation text kept as hidden spans so it
stays searchable. - Right-side reader panel: real third column when space allows (the harness
detailscolumn), auto sidebar-collapse to make room, floating fallback for
narrow windows, slim tab when collapsed. - Ask dialog: select text → a small dialog appears → type a question
("explain this", "how does this relate to…") → the question plus the
selection, its surrounding context, and the abstract are sent to the model. - Projects: Create project materializes the paper (
paper.pdf,paper.md,paper.html, figures, README with title/abstract) into a
Paper workspace, opens a session there, and asks the agent to load the
paper — each project keeps its own paper, so multiple papers coexist.
Requirements
- DeepSeek Harness (dsh) installed.
- poppler CLI tools on PATH:
pdftotext,pdftoppm,pdfimages.- macOS:
brew install poppler - Debian/Ubuntu:
sudo apt-get install poppler-utils
- macOS:
Install
From npm (recommended)
dsh plugin --profile readPaper add @deepseek-ai/dsh-web-app paper-review
# then start the harness:
dsh --profile readPaper
dsh plugin installs the packages, then reconciles dsh.profile.bundles —
packages that declare dsh.bundle join the profile's layer stack
automatically.
Why
@deepseek-ai/dsh-web-appis included: a profile created on a
machine that has never used it before is seeded with only@deepseek-ai/dsh-base(the web surface bundle is not a default for
unknown profile names). Adding@deepseek-ai/dsh-web-appexplicitly is what
gives the profile the browser GUI this plugin's panel renders into. On a
machine where areadPaperprofile already exists with the web app, plaindsh plugin --profile readPaper add paper-reviewis enough.
Prerequisites
- poppler CLI tools on PATH (
pdftotext,pdftoppm,pdfimages) —
see Requirements. - pnpm for the
dsh plugincommand (it forwards to pnpm). If pnpm is
missing:corepack enable pnpmornpm i -g pnpm.
Manual install (no npm)
- Copy this directory into
~/.dsh/profiles/readPaper/packages/paper-review. - Make it resolvable (no pnpm needed):
mkdir -p ~/.dsh/profiles/readPaper/node_modules ln -s ../packages/paper-review ~/.dsh/profiles/readPaper/node_modules/paper-review - Add
"paper-review"todsh.profile.bundlesin~/.dsh/profiles/readPaper/package.json. dsh --profile readPaper
Usage
- Paper tab on the right edge opens the reader column.
- Load PDF… uploads (drag-and-drop onto the reader also works).
- Select text → the ask dialog appears → type a question, press Enter.
- Create project writes the paper into the
Paperworkspace and opens a
session with the paper loaded as context. - The converted documents are stored under
~/.dsh/paper-review/and survive
restarts.
How it works
lib/index.js(host half): HTTP routes (/paper-review/…) for upload,
conversion, documents, figures, projects, and per-session stores. The
converter extracts word geometry withpdftotext -bbox, rebuilds columns
and lines, classifies blocks (headings, tables, ToC, math), and rasterizes
figure/equation regions withpdftoppm.lib/client.js(client half): the panel, tab, ask dialog, and project
flow. Ships as a hand-written__ModuleLoader__CJS bundle — no build step.cordis.patch.yml: the bundle patch that inserts the plugin row.
Development
npm run check— syntax checks.npm run eval— downloads 10 recent astro-ph papers with their arXiv HTML
versions, converts them, and scores text coverage against the references
(PAPERS=2 npm run evalfor a quick run). The corpus lands ineval/run/
(gitignored).
Limitations
- Conversion fidelity depends on the PDF's text layer (scanned papers render
as page images). - Display equations are images (their text is preserved as hidden spans);
inline math is reconstructed as sub/superscript text. - Content that exists only as PDF annotations (e.g., giant author lists in
some journals) cannot be extracted. - The plugin's HTTP routes follow the harness's localhost trust model.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 read-paper」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:louwenbo580/read-paper Headless(CLI)profile:
dsh plugin --profile headless add github:louwenbo580/read-paper 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。