dsh-plugin-medhub
August 14, 2026 · View on GitHub
MedHub (医知荟) integration for DeepSeek Harness — the medical & biological research plugin: traceable literature, statistics, bioinformatics, network pharmacology, an evidence ledger, and deliverable-grade writing, executed through a MedHub gateway.
Tools (18)
| Family | Tools |
|---|---|
| Literature | medhub_pubmed_search · medhub_pubmed_verify (PMID verification) · medhub_journal_tier (SCI/北大核心/CSSCI/统计源) · medhub_wangfang_query · medhub_wangfang_parse |
| Evidence | medhub_evidence_search (30+ read-only sources) · medhub_evidence_ledger (claims ⇄ verified sources) |
| Statistics & bioinformatics | medhub_stats_analyze · medhub_bioinfo_deg · medhub_bioinfo_enrich · medhub_bioinfo_immune · medhub_bioinfo_ppi · medhub_bioinfo_netpharm · medhub_quality_audit |
| Projects & delivery | medhub_project · medhub_export (docx/PDF) · medhub_delegate (whole-deliverable delegation) · medhub_job (async polling) |
Async tools return a jobId; poll with medhub_job (action: "wait"). Full catalog with JSON Schemas:
docs/contracts/catalog.md · docs/contracts/openapi.json.
Skills (10 shells)
medhub-lit-review · medhub-evidence · medhub-stats · medhub-bioinfo · medhub-netpharm ·
medhub-grant · medhub-thesis · medhub-qc · medhub-delegate · medhub-medical-writing.
Shells route the agent to MedHub tools and enforce the research-integrity contract below.
Install
Prerequisite: dsh CLI and pnpm (the dsh plugin command forwards to pnpm in the profile directory).
# From npm (recommended: prebuilt lib/, no install-time scripts, no build allowlist):
dsh plugin --profile web add dsh-plugin-medhub
# From a tarball (offline distribution):
dsh plugin --profile web add ./dsh-plugin-medhub-0.2.0.tgz
# From git (sources: requires the package `prepare` build AND a pnpm≥10 allowlist
# entry in the profile's pnpm-workspace.yaml — allowBuilds grants install-time
# code execution, so prefer npm; pin a commit if you use this):
dsh plugin --profile web add github:<org>/dsh-plugin-medhub
dsh web
dsh plugin auto-activates this package: it declares the official dsh.bundle.patch
manifest, so the profile's dsh.profile.bundles gains dsh-plugin-medhub automatically —
no manual config edits.
Also works on headless profiles (dsh --profile headless "..."): only the optional /medhub/panel web route is skipped.
Artifact preview (web profiles)
Web profiles get a built-in preview panel at /medhub/panel: paste an async job id to view its figures
(SVG/PNG) and PDF/text artifacts inline, and download everything else (e.g. DOCX exports). All traffic
stays same-origin on the local host — the API key never leaves the host process.
Configure
The bundle patch ships environment-driven defaults (see cordis.patch.yml); override per field in
your profile cordis.patch.yml or in the medhub settings namespace (Web GUI → Settings):
| Field | Default | Meaning |
|---|---|---|
gatewayUrl | MEDHUB_GATEWAY_URL ?? http://127.0.0.1:15722 | MedHub gateway base URL (local or https://jl-medhub.com) |
portalUrl | MEDHUB_PORTAL_URL ?? '' | Optional cloud gateway for medhub_delegate; empty runs delegate on gatewayUrl. |
apiKeyEnv | MEDHUB_API_KEY_ENV ?? MEDHUB_API_KEY | env var holding the gateway API key (never a literal in config) |
apiKey | — | optional direct override, stored via the settings secret role |
timeoutMs | 90000 | per-request budget |
pollIntervalMs / pollTimeoutMs | 3000 / 1800000 | async job polling |
export MEDHUB_API_KEY=mh_... # issued at the gateway: POST /api/v1/keys
Integrity contract (enforced by tool descriptions + skill shells)
- Numbers, statistics, and citations come only from tool results — anything unverified is marked 待核实, never invented.
- Citations must pass
medhub_pubmed_verifybefore enteringmedhub_evidence_ledger; deliverable citations are a subset of the ledger. - Async jobs are polled to a terminal state before their results are used.
- Analyses pass
medhub_quality_auditbefore delivery; failed checks are disclosed, never hidden. - Retrieval results are evidence, never clinical advice.
Development
npm install
npm run check # tsc --noEmit
npm test # vitest (unit + mock-gateway wire contract)
npm run build # tsc → lib/
npm run gen-contracts # docs/contracts/* (JSON Schema + OpenAPI 3.1)
License
Apache-2.0. MedHub, 医知荟, and the gateway are not part of this package; connecting to a MedHub gateway is subject to the MedHub service terms.