paper2agent-dsh
Turn research papers and source repositories into installable, native Cordis bundles for DeepSeek Harness.
paper2agent-dsh inventories research inputs, examines source code, detects runtimes, proposes callable capabilities, and generates a DeepSeek Harness plugin package with native ctx.tools registrations. The pipeline itself is composed from 17 small Cordis plugins, so each stage can be replaced or configured independently.
中文简介:将科研论文和代码仓库分析、整理并生成为可直接安装到 DeepSeek Harness 的 Cordis 插件包。
Why use it?
- Convert research repositories into model-callable DeepSeek Harness tools.
- Keep scientific computation in the original repository instead of reimplementing algorithms.
- Detect Node.js, Python, R, Rust, and Go projects.
- Discover exported functions and classes as capability candidates.
- Generate package metadata, Cordis configuration, runtime adapters, and tool registrations.
- Verify generated bundles before installation.
- Inspect workflow progress and failures through a dedicated state service.
Installation
Install the tagged public repository into the Web profile:
dsh plugin --profile web add github:elio040208/paper2agent-dsh#v0.2.0
Or install a local checkout while developing:
git clone https://github.com/elio040208/paper2agent-dsh.git
cd paper2agent-dsh
dsh plugin --profile web add .
Confirm that the bundle was composed:
dsh --profile web --dump-config
Model-facing tools
| Tool | Purpose |
|---|
paper2agent_inspect | Inventory inputs, scan repositories, detect runtimes, and propose capabilities. |
paper2agent_generate | Generate a native Cordis bundle from reviewed command-backed capabilities. |
paper2agent_verify | Validate the generated files and bundle declaration. |
paper2agent_status | Inspect one workflow run or list all runs in the current process. |
Example request after installation:
Inspect /absolute/path/to/research-repository and propose native Cordis tools.
Show me the command bindings for review before generating the bundle.
Generation is deliberately review-gated: every proposed capability must receive a concrete command binding before paper2agent_generate writes the output project.
Architecture
The bundle mounts these single-purpose Cordis plugins:
| Area | Plugins |
|---|
| Input | source intake, paper extraction, asset indexing |
| Review | paper review, repository scanning, runtime detection, capability design |
| Generation | runtime generator, tool generator, manifest generator, bundle generator |
| Quality | bundle verifier, artifact packager |
| Coordination | workflow state, orchestrator, model tool API, system guidance |
See cordis.patch.yml for the complete composition.
Generated tools accept a JSON object from the model, pass it to the reviewed command on standard input, observe Harness cancellation, and return captured standard output, standard error, and the exit code.
Requirements
- DeepSeek Harness
- Node.js 22.19 or newer
pnpm, as required by dsh plugin
pdftotext when extracting PDF files
- The language runtimes required by the research repository being converted
Current scope
- Repository scanning identifies common top-level function and class declarations. It does not infer complete input schemas from arbitrary source code.
- Generated capabilities require explicit command bindings. The generator refuses unresolved bindings.
- Scientific correctness still requires running the original code on representative inputs and reviewing its output.
- Paper extraction currently supports Markdown, plain text, and PDF through
pdftotext.
Development
npm test
npm run pack:check
The test suite covers repository inspection, runtime detection, capability discovery, bundle generation, and generated-bundle verification.
License
MIT