@yeyuan98/opencode-bioresearcher-plugin 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,12 +1,19 @@
1
1
  # BioResearcher Plugin
2
2
 
3
- OpenCode plugin that adds a `Bioresearcher` agent.
3
+ OpenCode plugin that adds agents and tools for biomedical and pharmaceutical research.
4
4
 
5
5
  ## Overview
6
6
 
7
- No nonsense and powerful. An agent that just works for your typical biomedical and pharmaceutical research needs.
7
+ No nonsense and powerful. Agents and tools that just work for your typical biomedical and pharmaceutical research needs.
8
8
 
9
- Tab to activate the Bioresearcher Agent and starting asking right away.
9
+ Tab to activate and start asking right away:
10
+
11
+ - The **Bioresearcher Agent** is jack-of-all-trades.
12
+ - The **BioresearcherDR Agent** is a specialist for biomed/pharma deep research (DR).
13
+
14
+ ## Agents
15
+
16
+ ### BioresearcherDR
10
17
 
11
18
  By default, it will conduct **highly detailed and in-depth** research, easily surpassing all general purpose LLM applications.
12
19
 
@@ -16,7 +23,57 @@ To reduce research depth and make research process faster, start your question w
16
23
  light-research Significance of KRAS for cancer?
17
24
  ```
18
25
 
19
- Based on fantastic work of the [BioMCP Team](https://biomcp.org/blog/ai-assisted-clinical-trial-search-analysis/).
26
+ To skip the Question-Clarification cycle, prompt your question with `no-interview`:
27
+
28
+ ```text
29
+ no-interview light-research Significance of KRAS for cancer?
30
+ ```
31
+
32
+ ## Tools
33
+
34
+ ### Table Tools
35
+
36
+ Manipulate Excel, CSV, and ODS files with precision and smart parsing for dates, numbers, and data types.
37
+
38
+ **Enable LLMs to wrangle huge tables WITHOUT overwhelming model context.**
39
+
40
+ ```text
41
+ What are tools for table processing?
42
+ What are column names in XXX.xlsx?
43
+ Analyze XXX.xlsx - group by Y column, and report unique values of Z column.
44
+ ```
45
+
46
+ ### Calculator
47
+
48
+ Evaluate mathematical expressions with full support for brackets, powers, and scientific notation.
49
+
50
+ **Make your model accurate with numbers. No more 3.11 > 3.9 nor 1+2=5.**
51
+
52
+ ```text
53
+ Use the calculator tool: (3+1.5*6-1/2)^3
54
+ ```
55
+
56
+ ### Blocking Timer
57
+
58
+ Pause execution for testing or pacing operations.
59
+
60
+ **Respect API rate limits. No more IP bans/blocks.**
61
+
62
+ ```text
63
+ Query XXX API. You MUST include a 0.5 second delay between two API calls with the blockingTimer tool.
64
+ ```
65
+
66
+ ### PubMed Parser
67
+
68
+ Parse PubMed XML files to markdown or Excel format. Supports `.xml` and `.xml.gz` files.
69
+
70
+ **Analyze years of publication articles in one go. Simple and powerful.**
71
+
72
+ ```text
73
+ Download pubmed article data from https://ftp.ncbi.nlm.nih.gov/pubmed/updatefiles/pubmed26n1340.xml.gz and parse to Excel format.
74
+ ```
75
+
76
+ Reference: [PubMed Download Data](https://pubmed.ncbi.nlm.nih.gov/download/).
20
77
 
21
78
  ## Installation
22
79
 
@@ -52,4 +109,3 @@ BioMCP is absolutely required and might take time to load. You will need to have
52
109
  ## License
53
110
 
54
111
  CC BY-NC-ND 4.0
55
-
@@ -93,7 +93,6 @@ export interface ParsedArticle {
93
93
  doi: string | null;
94
94
  abstract: string | null;
95
95
  keywords: string[];
96
- publicationDate?: string;
97
96
  error?: string;
98
97
  }
99
98
  export interface ProcessingStats {
@@ -104,7 +103,6 @@ export interface ProcessingStats {
104
103
  export interface ExcelRow {
105
104
  PMID: string;
106
105
  Title: string;
107
- PublicationDate: string;
108
106
  Authors: string;
109
107
  Journal: string;
110
108
  DOI: string;
@@ -8,7 +8,6 @@ export declare function extractJournalInfo(article: PubmedArticle): string;
8
8
  export declare function extractDOI(article: PubmedArticle): string | null;
9
9
  export declare function extractAbstract(article: PubmedArticle): string | null;
10
10
  export declare function extractKeywords(article: PubmedArticle): string[];
11
- export declare function extractPublicationDate(article: PubmedArticle): string | undefined;
12
11
  export declare function extractAllFields(article: PubmedArticle): ParsedArticle;
13
12
  export declare function generateArticleMarkdown(data: ParsedArticle): string;
14
13
  export declare function generateExcelFile(articles: ParsedArticle[], outputFilePath: string): void;
@@ -53,7 +53,6 @@ export function extractJournalInfo(article) {
53
53
  const year = getText(pubDate?.Year) || '';
54
54
  const volume = getText(journalIssue?.Volume) || '';
55
55
  const issue = getText(journalIssue?.Issue) || '';
56
- const pages = getText(article.MedlineCitation?.Article?.Pagination?.MedlinePgn) || '';
57
56
  let info = title;
58
57
  if (year)
59
58
  info += `, ${year}`;
@@ -64,8 +63,6 @@ export function extractJournalInfo(article) {
64
63
  if (issue)
65
64
  info += `(${issue})`;
66
65
  }
67
- if (pages)
68
- info += `:${pages}`;
69
66
  return info;
70
67
  }
71
68
  export function extractDOI(article) {
@@ -98,26 +95,6 @@ export function extractKeywords(article) {
98
95
  .map(kw => getText(kw))
99
96
  .filter((kw) => kw !== null && kw.length > 0);
100
97
  }
101
- export function extractPublicationDate(article) {
102
- const history = article.PubmedData?.History;
103
- if (!history)
104
- return undefined;
105
- const pubDates = toArray(history.PubMedPubDate);
106
- const pubDate = pubDates.find(p => p['@_PubStatus'] === 'pubmed' || p['@_PubStatus'] === 'medline');
107
- if (!pubDate)
108
- return undefined;
109
- const year = getText(pubDate.Year) || '';
110
- const month = getText(pubDate.Month) || '';
111
- const day = getText(pubDate.Day) || '';
112
- let date;
113
- if (year)
114
- date = year;
115
- if (month)
116
- date = `${date || ''} ${month}`;
117
- if (day)
118
- date = `${date || ''} ${day}`;
119
- return date || undefined;
120
- }
121
98
  export function extractAllFields(article) {
122
99
  return {
123
100
  PMID: extractPMID(article),
@@ -126,8 +103,7 @@ export function extractAllFields(article) {
126
103
  journal: extractJournalInfo(article),
127
104
  doi: extractDOI(article),
128
105
  abstract: extractAbstract(article),
129
- keywords: extractKeywords(article),
130
- publicationDate: extractPublicationDate(article)
106
+ keywords: extractKeywords(article)
131
107
  };
132
108
  }
133
109
  export function generateArticleMarkdown(data) {
@@ -137,9 +113,6 @@ export function generateArticleMarkdown(data) {
137
113
  }
138
114
  markdown += `## PMID\n${data.PMID}\n\n`;
139
115
  markdown += `## Title\n${data.title}\n\n`;
140
- if (data.publicationDate) {
141
- markdown += `## Publication Date\n${data.publicationDate}\n\n`;
142
- }
143
116
  markdown += `## Authors\n`;
144
117
  data.authors.forEach(author => {
145
118
  markdown += `- ${author}\n`;
@@ -161,7 +134,6 @@ export function generateExcelFile(articles, outputFilePath) {
161
134
  const excelRows = articles.map(article => ({
162
135
  PMID: article.error ? `[ERROR] ${article.PMID}` : article.PMID,
163
136
  Title: article.title,
164
- PublicationDate: article.publicationDate || '',
165
137
  Authors: article.authors.join(', '),
166
138
  Journal: article.journal,
167
139
  DOI: article.doi || '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeyuan98/opencode-bioresearcher-plugin",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "OpenCode plugin that adds a bioresearcher agent",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",