DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Origin Thesis — DSH Plugin for DeepSeek Harness
← Plugins
O

dsh-origin-thesis

Origin Thesis

Format OriginLab Origin figures to a fixed thesis/journal house style inside DeepSeek Harness: per-layer grid layout, unified fonts and sizes, render-measured axis-title placement, overlap resolution, panel labels, and 600-dpi export with corrected dpi metadata. Ships the plotting scripts; no `mcp`

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:xinchun2018/dsh-origin-thesis#d4b2ce03dbaf14f2201086f4305e2247f52ffb40
READMECompatibilityVersions

Description

Format OriginLab Origin figures to a fixed thesis/journal house style inside DeepSeek Harness: per-layer grid layout, unified fonts and sizes, render-measured axis-title placement, overlap resolution, panel labels, and 600-dpi export with corrected dpi metadata. Ships the plotting scripts; no `mcp` package needed.

Compatibility and provenance

Origin Thesis is published as dsh-origin-thesis and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/2/2026

Versions

1.0.0stable
10/2/2026

Related plugins

Loading related plugins…

Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
10/2/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in developer-tools.

Client Ui Git Graph@linxin666/dsh-client-ui-git-graphExternal dsh web GUI plugin: a blank-session git branch selector + Git graph, with real host-side git operations and guards, as a dsh profile bundleSsh@linxin666/dsh-sshRemote SSH operations for the dsh web GUI: host config store (~/.dsh/dsh-ssh.json, import from ~/.ssh/config), a persistent ssh2 connection pool with jump-host support, exec / PTY web terminal / SFTP transfer / local port-forward tunnels / cluster executiUpdate@linxin666/dsh-updateSelf-update plugin for the dsh web GUI: probes npm for newer family releases and runs the owning profile's pnpm update in place, from a sidebar trigger beside the settings seat with a release-notes panelTui@deepseek-harness-tui/dsh-tuiInteractive terminal interface for DeepSeek Harness agents, sessions and tools.

README

dsh-origin-thesis

Format OriginLab Origin figures to a fixed house style from inside DeepSeek Harness. One command turns a whole .opju project into publication-ready figures: per-layer grid layout, unified fonts and sizes, render-measured axis-title placement, overlap resolution, panel labels, and 600-dpi export with corrected dpi metadata.

Built for a PhD-thesis workflow where dozens of Origin graphs must end up looking identical, and rebuilt as a DSH bundle so the formatting runs from chat instead of a command line.

you:  把这份项目按论文格式重排,保留我手摆的图例
      → thesis_format_project(project="...\project.opju",
                              profile="thesis", keep_legend_pos=true)
      → 13 figures reformatted, <name>_thesis.opju + <name>_thesis_figures/*.png

Requirements

OSWindows only. Origin's automation interface is Windows COM; there is no macOS/Linux path.
OriginA locally installed, licensed copy of Origin / OriginPro 2018 or newer. Tested on OriginPro 2026b and Origin 2021. Not bundled with this plugin — you must own an Origin licence.
PythonAn interpreter with originpro, numpy and Pillow installed. ⚠️ originpro currently ships wheels only up to Python 3.9, so this is normally a 3.9 environment (e.g. a conda env named origin).
DSHDeepSeek Harness with the @deepseek-ai/dsh-mcp-client plugin available (any DSH profile that can mount an MCP client).
:: create the interpreter this plugin will drive Origin with
conda create -n origin python=3.9 -y
conda activate origin
pip install originpro numpy Pillow

The plugin itself needs no mcp package: thesis_mcp_server.py implements the MCP stdio JSON-RPC loop directly, so it runs on Python 3.9 or 3.10 alike.

Why there is a .cmd launcher

cordis.patch.yml names start-thesis-mcp.cmd rather than python.exe. That is deliberate, and it is what makes the package location-independent.

DSH evaluates the !!js expressions in its patch files in a sandbox where __dirname, __filename and require do not exist — only process is reliably available. Measured, not assumed:

mcp-origin-thesis (@deepseek-ai/dsh-mcp-client): ReferenceError: __dirname is not defined

So the patch cannot compute its own package directory in JavaScript, and any !!js require('node:path').join(__dirname, …) construction fails at startup. A Windows batch file, by contrast, gets its own directory from the built-in %~dp0 expansion with no JavaScript involved. The launcher therefore:

  1. locates thesis_mcp_server.py next to itself via %~dp0;
  2. picks an interpreter — DSH_THESIS_PYTHON, else a conda env named origin in the usual places, else python on PATH;
  3. forwards all arguments (-u -X utf8 plus anything DSH passes) and runs the server.

The patch only has to name the launcher, so the package can live anywhere — the default ~/dsh-vendor/dsh-origin-thesis is just a convention. If you install it elsewhere, edit the two args/cwd values in cordis.patch.yml accordingly.


Install

1. Get the files

git clone https://github.com/xinchun2018/dsh-origin-thesis.git "%USERPROFILE%\dsh-vendor\dsh-origin-thesis"

Everything needed at runtime — the server, the style profiles, and the plotting scripts — lives in that one directory.

2. Wire it into a DSH profile

Clone into the location DSH expects (or point the profile at wherever you put it), then link it into the profile the way any out-of-tree bundle is linked:

cd "%USERPROFILE%\.dsh\profiles\web"
pnpm add link:%USERPROFILE%\dsh-vendor\dsh-origin-thesis

and make sure the bundle is listed in that profile's package.json:

"dsh": {
  "profile": {
    "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app",
                "dsh-origin-thesis"]
  }
}

The bundle's own cordis.patch.yml then registers the loader entry (mcp-origin-thesis → @deepseek-ai/dsh-mcp-client, stdio) and resolves both the server path and the interpreter automatically — no absolute paths to edit.

3. Restart DSH

The tools appear as mcp__origin_thesis__*. Check the wiring with:

thesis_batch_dir_info()

It reports which interpreter was used, whether originpro imports, and which copy of the plotting scripts is active.


Configuration

Everything is resolved at startup; nothing is hard-coded to a machine.

Environment variableDefaultMeaning
DSH_THESIS_PYTHONauto-detectInterpreter that drives Origin. Detection order: this variable → ~/miniconda3/envs/origin/python.exe → ~/anaconda3/envs/origin/python.exe → C:/ProgramData/miniconda3/envs/origin/python.exe → python on PATH.
DSH_THESIS_BATCH_DIRthe package directoryUse your own origin-batch-style checkout instead of the scripts vendored in this package.
DSH_THESIS_STYLESstyles.json in the package directoryUse your own style profiles file.

Style profiles

styles.json is the single source of truth for the look of the figures. Edit the JSON to change the format — no Python changes needed. Three profiles ship:

ProfileForPageTick / axis-title / legendLine
thesisThesis figures, re-laid-out by layer count1 layer 9.8594×7.3999 cm (4:3); 2 layers 16×7.4; 3–4 16×13.2; 6 16×10.4; 8 16×8.69 / 10.5 bold / 9 pt1.0 pt
compositeHand-assembled multi-panel plates17.5 cm wide, height from the original aspect (or re-gridded)6.5 / 7.5 / 6.5 pt0.75 pt
manuscriptJournal single figures (keeps the author's hand-placed legends)same as thesissame as thesissame as thesis

manuscript is inherits: thesis + one override (move_legend: false), so editing thesis also affects it. Change a value at runtime with thesis_style_set (dry-run first, then dry_run=false; a .bak is written automatically).


Tools

Offline (no Origin needed, instant):

ToolPurpose
thesis_styles_listList profiles and their key values
thesis_style_showShow a full profile (with inheritance resolved)
thesis_style_setEdit styles.json (dry-run by default)
thesis_batch_dir_infoReport resolved interpreter / scripts / styles (troubleshooting)

Formatting and export:

ToolPurpose
thesis_format_projectFormat every graph in a project by layer count; saves *_thesis.opju + *_thesis_figures/*.png
thesis_format_compositeFormat a hand-assembled multi-panel plate; regrid=true re-spaces rows and trims the page
thesis_batchPoint it at many projects / a directory; returns a per-project report
thesis_export_projectExport only, no restyling (multiple formats, unified width, margin cropping)
thesis_verify_projectRead-only check of fonts / sizes / defects

Atomic, for free composition:

ToolPurpose
thesis_format_graphFormat one named graph — the rest of the project is untouched
thesis_apply_style_onlyApply style/layout only: no save, no export
thesis_export_openExport from the already-open session (no file reopen)

These three are what let you interleave with fine-grained editing. The plugin shares the Origin session with any other Origin tooling, so this works:

① thesis_apply_style_only(project=..., graph="Graph20", keep_open=true)   # ~21 s
② origin_edit_plot / origin_edit_axis / origin_edit_legend ...             # ms
③ thesis_export_open(graph="Graph20", out_path="D:\fig\Graph20.png")       # ~0.3 s

Use keep_open=true for chaining: op.exit() closes the project, and the next step would then fail to find the graph.

The original files are never modified — formatting works on a copy in %TEMP%.


Why the exported figures are physically sized correctly

Origin writes 300 dpi into image headers no matter how many pixels you asked for, so a 600-dpi figure dropped into Word is placed at twice its intended size. This plugin patches the header after export (PNG pHYs, TIFF tags 282/283, JPEG JFIF, BMP PelsPerMeter) without re-encoding, so the declared physical size equals the page size set in Origin. Oversized output is also downscaled to the page width you meant (2102 px for 8.9 cm at 600 dpi).


How the formatting works (and what it deliberately preserves)

The heavy lifting lives in the vendored scripts, unchanged:

  • Layout by structure — layers are classified (main / inset / linked_inset / overlay / linked_ext), then either gridded, stacked, or page-scaled. A vertical stack of spectra (XPS peak fits, MS comparisons) counts as one panel.
  • Axis titles are measured, not guessed — fit_axis_titles writes a title, renders, measures the ink with Pillow, derives the anchor offset for that graph, and corrects over several rounds. Fixed offsets do not work: two graphs with the same frame and font size rendered their titles 0.28 cm apart.
  • Overlaps are resolved vertically only — clamp_texts pulls annotations back inside the frame, then separate_texts pushes them apart vertically. Horizontal nudging would move a label off the peak it points at.
  • Inset layers only ever shrink — tick label sizes inside a millimetre-scale inset are left alone; enlarging them fuses 7.2 and 7.0 into 7.27.0.
  • Never rewritten: legend strings (their own |-separated syntax with per-entry escapes — wrapping the whole string bolds entry 1 and appends a stray )), \g() Symbol-font regions (stripping the inner \f: wrapper turns C into Chi), data values, axis ranges, curve colours, and inserted image content.

README-origin-batch-style.md is the original engineers' log — several hundred lines of measured failure modes (LabTalk silently ignoring writes, linked-layer stale frames, expgraph's undocumented argument traps). Read it before changing the scripts.


Limitations

  • Windows + a licensed Origin installation are hard requirements; without Origin the tools have nothing to drive.
  • One graph takes ~20–30 s. Each call starts the Origin COM session and runs the render-measure-correct loop. That step cannot be made fast; the payoff is that everything after it (origin_edit_*, thesis_export_open) is sub-second.
  • Origin is an exclusive resource. Formatting uses the single-instance COM server, so do not edit figures by hand in Origin while a batch is running.
  • Python ≤ 3.9 for the interpreter until OriginLab ships newer wheels.
  • PER_GRAPH_TWEAKS ships empty. Per-figure exceptions are inherently project-specific (which label collided with which curve, how many millimetres a text box had to move), so the table is documented but not populated. Add your own entries in the shape shown next to it in format_thesis_figures.py — the outer key is the project file stem, because Graph8 means different things in different projects. It is applied automatically when a project matches, and no_tweaks=true skips it.

Relationship to the upstream origin-batch-style toolkit

The three vendored scripts come from a private, actively used plotting toolkit of the same author (origin-batch-style/, driven from the command line). This repository ships a curated variant of them:

upstream (private)this repository
Per-figure exception table (PER_GRAPH_TWEAKS)populated for specific manuscriptsempty, scheme documented instead
Comments / docstringsname the real samples, figures and project filesgenericized (technical insights kept verbatim)
Usage examplesmachine-specific interpreter pathspython
Everything else — layout logic, anchor calibration, overlap resolution, export and dpi correctionidenticalidentical

If you maintain your own copy, it will not automatically receive fixes made here, and vice versa. Two ways to keep them apart cleanly:

  • Keep your private toolkit as the source of truth for your figures and point DSH_THESIS_BATCH_DIR at it. This repository's copy is then only the fallback for a fresh install — no sync problem, because you never use it.
  • Or track this repository and re-apply your per-figure tweaks on top, using sync_to_vendor.ps1 to push the result into the DSH runtime directory.

The regression used when this variant was cut: reformat a 13-graph project (0 errors, 0 verify issues) and re-open the saved product to verify it read-only (clean: true).


Repository layout

thesis_mcp_server.py          MCP server (stdlib only; no `mcp` package needed)
start-thesis-mcp.cmd          launcher: self-locates via %~dp0, picks the interpreter
styles.json                   style profiles — the file you edit to change the look
cordis.patch.yml              DSH loader entry (names the launcher; no toolchain paths)
index.js                      bundle entry artifact (no-op apply)
format_thesis_figures.py  ┐
format_composite.py       ├── vendored plotting scripts (replaceable via
export_figures.py         ┘    DSH_THESIS_BATCH_DIR)
README-thesis.md              internal reference: every tool, parameter and pitfall
README-origin-batch-style.md  the original scripts' engineering log
sync_to_vendor.ps1            copy this repo to the DSH runtime directory
THIRD-PARTY-NOTICES.md        Origin / originpro / dependency licensing and runtime needs
CONTRIBUTING.md               how to run the smoke test, what needs discussion first
tests/smoke.py                installation self-check (14 assertions, no DSH needed)

Licence

MIT — see LICENSE. Origin itself is commercial software licensed separately; originpro / OriginExt are BSD-licensed by OriginLab and installed by you, not redistributed here. Full details, including the optional runtime dependencies of the vendored scripts, are in THIRD-PARTY-NOTICES.md.