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)

FamilyTools
Literaturemedhub_pubmed_search · medhub_pubmed_verify (PMID verification) · medhub_journal_tier (SCI/北大核心/CSSCI/统计源) · medhub_wangfang_query · medhub_wangfang_parse
Evidencemedhub_evidence_search (30+ read-only sources) · medhub_evidence_ledger (claims ⇄ verified sources)
Statistics & bioinformaticsmedhub_stats_analyze · medhub_bioinfo_deg · medhub_bioinfo_enrich · medhub_bioinfo_immune · medhub_bioinfo_ppi · medhub_bioinfo_netpharm · medhub_quality_audit
Projects & deliverymedhub_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):

FieldDefaultMeaning
gatewayUrlMEDHUB_GATEWAY_URL ?? http://127.0.0.1:15722MedHub gateway base URL (local or https://jl-medhub.com)
portalUrlMEDHUB_PORTAL_URL ?? ''Optional cloud gateway for medhub_delegate; empty runs delegate on gatewayUrl.
apiKeyEnvMEDHUB_API_KEY_ENV ?? MEDHUB_API_KEYenv var holding the gateway API key (never a literal in config)
apiKeyoptional direct override, stored via the settings secret role
timeoutMs90000per-request budget
pollIntervalMs / pollTimeoutMs3000 / 1800000async job polling
export MEDHUB_API_KEY=mh_...   # issued at the gateway: POST /api/v1/keys

Integrity contract (enforced by tool descriptions + skill shells)

  1. Numbers, statistics, and citations come only from tool results — anything unverified is marked 待核实, never invented.
  2. Citations must pass medhub_pubmed_verify before entering medhub_evidence_ledger; deliverable citations are a subset of the ledger.
  3. Async jobs are polled to a terminal state before their results are used.
  4. Analyses pass medhub_quality_audit before delivery; failed checks are disclosed, never hidden.
  5. 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.