feat(pubmed): add workflow presets and richer article metadata#1778
Open
pi-dal wants to merge 1 commit into
Open
feat(pubmed): add workflow presets and richer article metadata#1778pi-dal wants to merge 1 commit into
pi-dal wants to merge 1 commit into
Conversation
Expand the built-in PubMed adapter from basic retrieval into a more useful research workflow surface. Why: - The existing adapter already covered the core retrieval chain, but it still required agents to handcraft common high-frequency PubMed queries. - Single-article output was also still too thin for downstream summarization and evidence triage. - The goal of this change is to improve agent-facing research ergonomics without introducing a separate duplicate plugin. What changed: - add `pubmed mesh <term>` for MeSH-term driven search - add `pubmed journal <journal>` for journal-scoped search - add `pubmed clinical-trial <query>` as a preset over Clinical Trial + humans filters - add `pubmed review <query>` as a preset over Review article filtering - reshape `pubmed article <pmid>` into a single structured record instead of field/value rows - extend article detail output with `affiliations` and `grants` - update PubMed adapter docs and adapter index - regenerate `cli-manifest.json` Verification: - npm test -- clis/pubmed/pubmed.test.js - npm run build-manifest - npm run typecheck - npm run check:silent-column-drop - npm run check:typed-error-lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands the built-in PubMed adapter from basic retrieval into a more useful research workflow surface for both humans and agents.
The built-in adapter already covered the core retrieval chain, but it still had two practical gaps:
This change improves the built-in adapter directly instead of creating a separate duplicate PubMed plugin.
Why we should do this
1. Preserve one canonical PubMed entrypoint
OpenCLI already ships a built-in
pubmedadapter. Extending that adapter is better than creating a parallel plugin with overlapping commands, because it keeps discovery, maintenance, and user expectations simple.2. Turn common PubMed workflows into stable commands
clinical-trialandrevieware not cosmetic aliases forsearch. They encode high-frequency research presets that agents would otherwise have to reconstruct by manually composing PubMed query syntax every time.3. Make article detail output more useful for downstream automation
A single structured record is easier to consume than
field/valuerows in JSON, plain, table, and markdown flows. Addingaffiliationsandgrantsalso exposes higher-value research context without requiring another follow-up command.What changed
New PubMed workflow presets
opencli pubmed mesh <term>for MeSH-term driven search.opencli pubmed journal <journal>for journal-scoped search.opencli pubmed clinical-trial <query>as a preset over:Clinical Trial[PT]humans[mesh]opencli pubmed review <query>as a preset over:Review[PT]Richer single-article output
opencli pubmed article <pmid>fromfield/valuerows into one structured record.affiliationsgrants--full-abstractso callers can choose between truncated and full abstract output.Docs and registry updates
cli-manifest.json.Files changed
clis/pubmed/article.jsclis/pubmed/clinical-trial.jsclis/pubmed/journal.jsclis/pubmed/mesh.jsclis/pubmed/pubmed.test.jsclis/pubmed/review.jsclis/pubmed/utils.jsdocs/adapters/browser/pubmed.mddocs/adapters/index.mdcli-manifest.jsonTest Plan
I ran the following verification commands locally:
npm test -- clis/pubmed/pubmed.test.jsnpm run build-manifestnpm run typechecknpm run check:silent-column-dropnpm run check:typed-error-lintObserved results:
26 passedManifest compiled: 904 entriesNotes
429on the first attempt and succeeded on retry. This appears to be public API rate limiting behavior rather than a regression introduced by this PR.