rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
liuchang0812/dsh-pdf-paper-reader
PDF paper reader plugin for the DeepSeek Harness Web UI: rendered papers with selectable text, AI translation and explanation, structured reading notes, and agent tools that read and search papers.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:liuchang0812/dsh-pdf-paper-reader
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Read English computer-science papers inside the Harness Web UI: rendered PDF pages with selectable text, one-click AI translation/explanation, structured reading notes that are grounded in the paper, and agent tools that let the chat model read, search and summarise papers for you.
The reader is a real page in the app (not an iframe), so it follows your theme, locale and layout, and every AI call uses the model configured in your profile.
| Bundle package | @local/pdf-paper-reader (installed from a directory) |
| Host + Client | plain ESM / plain browser JS, no build step |
| PDF engine | PDF.js 3.11.174, vendored (Apache-2.0) |
| Tested against | @deepseek-ai/dsh 0.2.2-rc.1, Node 20+ |
paper-notes/ in the workspace. Existing notes
load automatically; the agent can append to the same file.paper_list, paper_read, paper_search,
paper_save_note are available to the chat agent in every session after
installation.plugin_manager plugin enabled
(it is part of the standard dsh-base / dsh-web-app bundles).ctx.llm + the profile's default model selection).git clone https://github.com/liuchang0812/dsh-pdf-paper-reader.git
The repository root is the plugin bundle: package.json carries the
dsh.bundle.patch and dsh.client declarations, and the plugin installs
straight from that directory. No build step is needed.
In the Harness Web UI, ask the agent to install the bundle from the cloned
directory (this calls the plugin_manager tool):
Install the plugin bundle at
/absolute/path/to/dsh-pdf-paper-reader.
Or use plugin_manager yourself with
action: install_bundle, target: "/absolute/path/to/dsh-pdf-paper-reader".
The install links the directory into your profile and inserts one Loader row;
it survives restarts and can be toggled from Settings → Plugins.
Refresh the Web UI once. A PDF papers icon appears in the sidebar panel list; clicking it opens the reader in the central panel.
Remove the @local/pdf-paper-reader bundle from Settings → Plugins, or use
plugin_manager with action: remove_bundle. Reading notes stay in your
workspace under paper-notes/.
<workspace>/papers/. Any PDF already under the workspace root is
listed automatically.Keyboard: ←/→ previous/next page, Shift+←/→ previous/next section,
Esc closes the selection toolbar.
| Tool | What it does |
|---|---|
paper_list |
Lists workspace PDFs with detected title and page count. |
paper_read |
Reads a paper: overview (outline + abstract + important sections), a section (section: "method"), or a page range (pages: "4-6"). |
paper_search |
Finds a word/phrase with page-numbered snippets. |
paper_save_note |
Saves or appends Markdown reading notes under paper-notes/. |
Example prompts:
List the papers in my workspace and give me a 5-line summary of the BERT paper. Search the Transformer paper for the BLEU scores and quote them with page numbers. Append a "limitations" section to the notes of
papers/resnet.pdf.
The installed Loader row accepts two optional fields (edit the row's config in
Settings → Plugins → the bundle, or in the profile's cordis.patch.yml):
- id: pdf-paper-reader
name: '@local/pdf-paper-reader'
config:
rootDir: '/absolute/path/to/papers' # default: the calling session's workspace
notesDir: 'paper-notes' # relative to rootDir
Notes: the default library follows each session's working directory, so
switching workspaces switches the library. Paths outside rootDir are
rejected, including via symlinks.
llm service.| Part | Files | Responsibility |
|---|---|---|
| Host | index.js |
Authenticated /api/pdf.reader.* routes (library, vendor PDF.js, file, open, upload, explain, summarize, ask, page brief, notes) and the four agent tools. |
| Host | lib/store.js |
Workspace scanning, path containment, parse cache, search, notes persistence. |
| Host | lib/pdf.js |
PDF.js ingestion: text, outline, title/authors/abstract, section model. |
| Host | lib/text.js |
Text reconstruction: lines, document-wide column gutter detection, running-header removal, paragraphs, heading classification. |
| Host | lib/prompts.js |
Section-aware digest and all model prompts. |
| Host | lib/llm.js |
Default-model resolution, streaming, truncation reporting. |
| Client | client.js |
Sidebar entry, main-panel page, PDF viewer + text layer, selection toolbar, notes/explain/ask panes, Markdown renderer. |
| Bundle | package.json, cordis.patch.yml |
dsh.bundle.patch row and the dsh.client web module. |
| Vendored | vendor/ |
PDF.js browser + legacy builds and their Apache-2.0 license. |
The bundle registers:
main slot key pdf-paper-reader — the reader page;sidebar.panellist id pdf-paper-reader — the sidebar icon;cd dev
npm install # react, react-dom, jsdom (dev-only)
npm run check # route + SSR + jsdom integration checks
node dev/route-check.mjs — drives the real HTTP handlers and tools with a
fake Cordis context and a fake model, against a generated fixture PDF
(no fixtures checked in, no network). No dependencies needed.node dev/ssr-check.mjs — evaluates the real client bundle in a sandbox and
server-renders the library page, reader page, assistant panes and Markdown
renderer.node dev/dom-check.mjs — mounts the client half in jsdom with a stubbed
PDF.js engine and an authenticated fetch stub; exercises library → open →
page rendering → streamed notes → save → ask.Manual smoke test: node dev/route-check.mjs prints the parsed fixture title,
page count and the registered tool names.
MIT — see LICENSE. The vendored PDF.js build is Apache-2.0; see
vendor/LICENSE and the notice in README/vendor.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。