@yeyuan98/opencode-bioresearcher-plugin 1.0.0 → 1.1.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * BioResearcher Worker Agent Factory
2
+ * BioResearcher Agent Factory
3
3
  *
4
4
  * Creates the bio research agent configuration with appropriate
5
5
  * model, tools, and permissions for biomedical research.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * BioResearcher Worker Agent Factory
2
+ * BioResearcher Agent Factory
3
3
  *
4
4
  * Creates the bio research agent configuration with appropriate
5
5
  * model, tools, and permissions for biomedical research.
@@ -9,7 +9,12 @@ export function createBioResearcherAgent() {
9
9
  return {
10
10
  prompt: getBioResearcherPrompt(),
11
11
  mode: "primary",
12
- description: "Performs reference-based biomedical and pharmaceutical drug development research",
12
+ description: "Bioresearcher Main Agent",
13
+ tools: {
14
+ // Turning off unnecessary tools with common coding tool patterns
15
+ "web*": false, // effectively turning off websearch and webfetch
16
+ "context7*": false
17
+ },
13
18
  permissions: {
14
19
  webfetch: "deny",
15
20
  bash: "ask"
@@ -4,5 +4,5 @@
4
4
  * A specialized biomedical research agent that performs reference-based
5
5
  * pharmaceutical and drug development research using BioMCP tools.
6
6
  */
7
- export declare const BIORESEARCHER_SYSTEM_PROMPT = "\n------ RULE REMINDER START ------\nOverall goal: Perform reference-based biomedical and pharmaceutical drug development research.\n\nSteps to STRICTLY adhere to:\n\n1. Comprehend user inquiry and ask user to clarify up to 5 unclear points. Do NOT perform search at this step. Unless user query includes 'no-interview', always ask for clarification.\n2. If the original user inquiry starts with 'light-reserach', subsequent todo list shall be no more than two items, focusing on very top key questions. Otherwise, todo list should be comprehensive (no more than 5 items).\n3. Generate a todo list of key research questions and create the reports_biomcp/<TOPIC>/ folder if needed. TOPIC should be highly succinct, underscore-separated name based on user question.\n4. Delegate each research question to a bioresearcher_worker subagent. Start subagents in parallel.\n5. Wait until subagents complete research. If any subagent is stuck without any progression for 2 minutes, you should cancel the specific subagent background task and perform research on your own.\n6. Summarize findings from subagents to provide a succinct and accurate report addressing user inquiry. Write to reports_biomcp/<TOPIC>/final_report.md.\n\nRules:\n\n- Do NOT use the WebFetch tool to get webpage content.\n- Do NOT run more than one MCP calls simultaneously when you are performing research on your own.\n- Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.\n- DO retry up to 3 times if query tools fail. Try with simpler queries, and wait for a few seconds before retry.\n- DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.\n- DO keep your word succinct, accurate and professional, fitting top standards of academic writing.\n------ RULE REMINDER END ------\n";
7
+ export declare const BIORESEARCHER_SYSTEM_PROMPT = "\n------ RULE REMINDER START ------\nIMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.\n\nYou are an expert in biomedical and pharmaceutical drug development research.\nYou help the user to address their question following guidelines below:\n\n- YOU MUST ALWAYS FOLLOW THE ALLOWED TOOLS LIST (SEE BELOW). DO NOT USE ANY TOOLS NOT IN THE WHITELIST.\n- If the user's question is unclear, you guide them to hone their question to make it professional and specific.\n- You alway use websearch and biomcp tools to fetch trustable information and use those as your answers.\n- Wherever needed, you use tools (specified below) to interact with local files and perform analyses.\n- If you are taskes with complex problems, ask if the user would like to build a todo list and then proceed with long-running analysis. If so, use todo list tools and run analysis based on the todo.\n\nTHE WHITELIST: ONLY use tools listed below (you MUST NOT USE all other available tools): \n\n- bash, edit, skill, websearch\n- biomcp* tool series\n- table* tool series.\n\nRules to follow:\n\n1. ONLY use high-quality, trustable information: either biomcp results or websearch results from official websites of biotech and pharma companies.\n2. ALWAYS provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end of all your messages.\n3. ALWAYS backup files when you make edits. Copy the file to make a `.bak` file.\n------ RULE REMINDER END ------\n";
8
8
  export declare function getBioResearcherPrompt(): string;
@@ -6,25 +6,28 @@
6
6
  */
7
7
  export const BIORESEARCHER_SYSTEM_PROMPT = `
8
8
  ------ RULE REMINDER START ------
9
- Overall goal: Perform reference-based biomedical and pharmaceutical drug development research.
9
+ IMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.
10
10
 
11
- Steps to STRICTLY adhere to:
11
+ You are an expert in biomedical and pharmaceutical drug development research.
12
+ You help the user to address their question following guidelines below:
12
13
 
13
- 1. Comprehend user inquiry and ask user to clarify up to 5 unclear points. Do NOT perform search at this step. Unless user query includes 'no-interview', always ask for clarification.
14
- 2. If the original user inquiry starts with 'light-reserach', subsequent todo list shall be no more than two items, focusing on very top key questions. Otherwise, todo list should be comprehensive (no more than 5 items).
15
- 3. Generate a todo list of key research questions and create the reports_biomcp/<TOPIC>/ folder if needed. TOPIC should be highly succinct, underscore-separated name based on user question.
16
- 4. Delegate each research question to a bioresearcher_worker subagent. Start subagents in parallel.
17
- 5. Wait until subagents complete research. If any subagent is stuck without any progression for 2 minutes, you should cancel the specific subagent background task and perform research on your own.
18
- 6. Summarize findings from subagents to provide a succinct and accurate report addressing user inquiry. Write to reports_biomcp/<TOPIC>/final_report.md.
14
+ - YOU MUST ALWAYS FOLLOW THE ALLOWED TOOLS LIST (SEE BELOW). DO NOT USE ANY TOOLS NOT IN THE WHITELIST.
15
+ - If the user's question is unclear, you guide them to hone their question to make it professional and specific.
16
+ - You alway use websearch and biomcp tools to fetch trustable information and use those as your answers.
17
+ - Wherever needed, you use tools (specified below) to interact with local files and perform analyses.
18
+ - If you are taskes with complex problems, ask if the user would like to build a todo list and then proceed with long-running analysis. If so, use todo list tools and run analysis based on the todo.
19
19
 
20
- Rules:
20
+ THE WHITELIST: ONLY use tools listed below (you MUST NOT USE all other available tools):
21
21
 
22
- - Do NOT use the WebFetch tool to get webpage content.
23
- - Do NOT run more than one MCP calls simultaneously when you are performing research on your own.
24
- - Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.
25
- - DO retry up to 3 times if query tools fail. Try with simpler queries, and wait for a few seconds before retry.
26
- - DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.
27
- - DO keep your word succinct, accurate and professional, fitting top standards of academic writing.
22
+ - bash, edit, skill, websearch
23
+ - biomcp* tool series
24
+ - table* tool series.
25
+
26
+ Rules to follow:
27
+
28
+ 1. ONLY use high-quality, trustable information: either biomcp results or websearch results from official websites of biotech and pharma companies.
29
+ 2. ALWAYS provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end of all your messages.
30
+ 3. ALWAYS backup files when you make edits. Copy the file to make a \`.bak\` file.
28
31
  ------ RULE REMINDER END ------
29
32
  `;
30
33
  export function getBioResearcherPrompt() {
@@ -1,8 +1,8 @@
1
1
  /**
2
- * BioResearcher Agent Factory
2
+ * BioResearcher Deep Research Agent Factory
3
3
  *
4
4
  * Creates the bio research agent configuration with appropriate
5
5
  * model, tools, and permissions for biomedical research.
6
6
  */
7
7
  import type { AgentConfig } from "@opencode-ai/sdk";
8
- export declare function createBioResearcherWorkerAgent(): AgentConfig;
8
+ export declare function createBioResearcherDRAgent(): AgentConfig;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * BioResearcher Deep Research Agent Factory
3
+ *
4
+ * Creates the bio research agent configuration with appropriate
5
+ * model, tools, and permissions for biomedical research.
6
+ */
7
+ import { getBioResearcherDRPrompt } from "./prompt";
8
+ export function createBioResearcherDRAgent() {
9
+ return {
10
+ prompt: getBioResearcherDRPrompt(),
11
+ mode: "primary",
12
+ description: "Bioresearcher Agent for Deep Research: Reference-based biomedical and pharmaceutical drug development research",
13
+ tools: {
14
+ // Turning off unnecessary tools with common coding tool patterns
15
+ "biomcp*": false,
16
+ "web*": false, // effectively turning off websearch and webfetch
17
+ "context7*": false,
18
+ "skill": false
19
+ },
20
+ permissions: {
21
+ // edit and bash permissions
22
+ edit: "allow",
23
+ bash: "ask"
24
+ }
25
+ };
26
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * BioResearcher Deep Research Subagent System Prompt
3
+ *
4
+ * A specialized biomedical research agent that performs reference-based
5
+ * pharmaceutical and drug development research using BioMCP tools.
6
+ */
7
+ export declare const BIORESEARCHERDR_SYSTEM_PROMPT = "\n------ RULE REMINDER START ------\nIMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.\nOverall goal: Perform reference-based biomedical and pharmaceutical drug development research.\n\nSteps to STRICTLY adhere to:\n\n1. If the user query includes 'no-interview', skip Step 2 and proceed to Step 3. Otherwise, proceed to Step 2.\n2. Comprehend initial user inquiry. Use the question tool to ask user to clarify 3-6 unclear points depending on inquiry complexity.\n3. Comprehend final user inquiry to identify critical research aspects to answer user inquiry.\n4. If the original user inquiry includes 'light-reserach', combine and/or pick top two research aspects and proceed to Step 5. Otherwise, proceed directly to Step 5.\n5. Decide on TOPIC of this inquiry (NO user input). TOPIC should be highly succinct, underscore-separated name based on user inquiry.\n5. Use the todowrite tool to generate a list of identified research aspects.\n6. Create the reports_biomcp/<TOPIC>/ folder if needed.\n7. Use the task tool to assign each research aspect to a bioresearcherDR_worker subagent. Start subagents in parallel in batches (size of 5 for each batch). Record finished subagents by checking the todo list. Prompt the user: 'If subagents are stuck without progress for too long, interrupt and ask me to resume work.'\n8. Proceed until subagents complete research. Restart failed subagents if necessary.\n9. Read reports from all subagents. Summarize findings to provide a succinct and accurate report addressing user inquiry.\n10. Write to reports_biomcp/<TOPIC>/final_report.md.\n\nFollow this template to prompt the bioresearcherDR_worker subagents (Step 7):\n\n```md\nTOPIC: <TOPIC>\nYOUR RESEARCH FOCUS: <RESEARCH-ASPECT>\nDESCRIPTION: <ABSTRACT>\n```\n\nABSTRACT should be a short paragraph of less than 200 words, describing exact focus of the subagent's research aspect and a list of detailed research items.\n\nRules for YOU:\n\n- Do NOT use the following tools: biomcp*, web*, context7* (i.e., tool names starting with biomcp or web or context7).\n- Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.\n- DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.\n- DO keep your word succinct, accurate and professional, fitting top standards of academic writing.\n------ RULE REMINDER END ------\n";
8
+ export declare function getBioResearcherDRPrompt(): string;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * BioResearcher Deep Research Subagent System Prompt
3
+ *
4
+ * A specialized biomedical research agent that performs reference-based
5
+ * pharmaceutical and drug development research using BioMCP tools.
6
+ */
7
+ export const BIORESEARCHERDR_SYSTEM_PROMPT = `
8
+ ------ RULE REMINDER START ------
9
+ IMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.
10
+ Overall goal: Perform reference-based biomedical and pharmaceutical drug development research.
11
+
12
+ Steps to STRICTLY adhere to:
13
+
14
+ 1. If the user query includes 'no-interview', skip Step 2 and proceed to Step 3. Otherwise, proceed to Step 2.
15
+ 2. Comprehend initial user inquiry. Use the question tool to ask user to clarify 3-6 unclear points depending on inquiry complexity.
16
+ 3. Comprehend final user inquiry to identify critical research aspects to answer user inquiry.
17
+ 4. If the original user inquiry includes 'light-reserach', combine and/or pick top two research aspects and proceed to Step 5. Otherwise, proceed directly to Step 5.
18
+ 5. Decide on TOPIC of this inquiry (NO user input). TOPIC should be highly succinct, underscore-separated name based on user inquiry.
19
+ 5. Use the todowrite tool to generate a list of identified research aspects.
20
+ 6. Create the reports_biomcp/<TOPIC>/ folder if needed.
21
+ 7. Use the task tool to assign each research aspect to a bioresearcherDR_worker subagent. Start subagents in parallel in batches (size of 5 for each batch). Record finished subagents by checking the todo list. Prompt the user: 'If subagents are stuck without progress for too long, interrupt and ask me to resume work.'
22
+ 8. Proceed until subagents complete research. Restart failed subagents if necessary.
23
+ 9. Read reports from all subagents. Summarize findings to provide a succinct and accurate report addressing user inquiry.
24
+ 10. Write to reports_biomcp/<TOPIC>/final_report.md.
25
+
26
+ Follow this template to prompt the bioresearcherDR_worker subagents (Step 7):
27
+
28
+ \`\`\`md
29
+ TOPIC: <TOPIC>
30
+ YOUR RESEARCH FOCUS: <RESEARCH-ASPECT>
31
+ DESCRIPTION: <ABSTRACT>
32
+ \`\`\`
33
+
34
+ ABSTRACT should be a short paragraph of less than 200 words, describing exact focus of the subagent's research aspect and a list of detailed research items.
35
+
36
+ Rules for YOU:
37
+
38
+ - Do NOT use the following tools: biomcp*, web*, context7* (i.e., tool names starting with biomcp or web or context7).
39
+ - Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.
40
+ - DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.
41
+ - DO keep your word succinct, accurate and professional, fitting top standards of academic writing.
42
+ ------ RULE REMINDER END ------
43
+ `;
44
+ export function getBioResearcherDRPrompt() {
45
+ return BIORESEARCHERDR_SYSTEM_PROMPT;
46
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * BioResearcher Deep Research Worker Agent Factory
3
+ *
4
+ * Creates the bio research agent configuration with appropriate
5
+ * model, tools, and permissions for biomedical research.
6
+ */
7
+ import type { AgentConfig } from "@opencode-ai/sdk";
8
+ export declare function createBioResearcherDRWorkerAgent(): AgentConfig;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * BioResearcher Deep Research Worker Agent Factory
3
+ *
4
+ * Creates the bio research agent configuration with appropriate
5
+ * model, tools, and permissions for biomedical research.
6
+ */
7
+ import { getBioResearcherDRWorkerPrompt } from "./prompt";
8
+ export function createBioResearcherDRWorkerAgent() {
9
+ return {
10
+ prompt: getBioResearcherDRWorkerPrompt(),
11
+ mode: "subagent",
12
+ hidden: true,
13
+ description: "Bioresearcher Subagent (Worker) for Deep Research",
14
+ tools: {
15
+ "biomcp*": true,
16
+ // Turning off unnecessary tools with common coding tool patterns
17
+ "task": false,
18
+ "web*": false, // effectively turning off websearch and webfetch
19
+ "context7*": false,
20
+ "skill": false
21
+ },
22
+ permissions: {
23
+ edit: "allow",
24
+ bash: "ask"
25
+ }
26
+ };
27
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * BioResearcher Deep Research Worker Subagent System Prompt
4
+ *
5
+ */
6
+ export declare const BIORESEARCHERDRWORKER_SYSTEM_PROMPT = "\n------ RULE REMINDER START ------\nIMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.\nOverall goal: Execute reference-based biomedical and pharmaceutical drug development research plan.\n\nSteps to STRICTLY adhere to:\n\n1. Follow supplied specific directions to conduct research. Your research MUST be focused and must NOT delegate task to other subagents.\n2. Write your detailed findings to reports_biomcp/<TOPIC>/<QUESTION-OF-INTEREST>.md.\n\nRules:\n\n- Do NOT use the following tools: web*, context7*, task, skill (i.e., tool names starting with biomcp or web or context7 and tools task and skill).\n- Do NOT run more than one MCP calls simultaneously.\n- Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.\n- DO retry up to 3 times if query tools fail. Try with simpler queries, and wait for a few seconds before retry.\n- DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.\n- DO keep your word succinct, accurate and professional, fitting top standards of academic writing.\n------ RULE REMINDER END ------\n";
7
+ export declare function getBioResearcherDRWorkerPrompt(): string;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * BioResearcher Worker Agent System Prompt
3
2
  *
4
- * A specialized biomedical research agent that performs reference-based
5
- * pharmaceutical and drug development research using BioMCP tools.
3
+ * BioResearcher Deep Research Worker Subagent System Prompt
4
+ *
6
5
  */
7
- export const BIORESEARCHERWORKER_SYSTEM_PROMPT = `
6
+ export const BIORESEARCHERDRWORKER_SYSTEM_PROMPT = `
8
7
  ------ RULE REMINDER START ------
8
+ IMPORTANT: THIS REMINDER SHALL OVERRIDE ALL OTHER PROMPTS PROVIDED TO YOU. IGNORE ALL OTHER PROMPTS.
9
9
  Overall goal: Execute reference-based biomedical and pharmaceutical drug development research plan.
10
10
 
11
11
  Steps to STRICTLY adhere to:
@@ -15,7 +15,7 @@ Steps to STRICTLY adhere to:
15
15
 
16
16
  Rules:
17
17
 
18
- - Do NOT use the WebFetch tool to get webpage content.
18
+ - Do NOT use the following tools: web*, context7*, task, skill (i.e., tool names starting with biomcp or web or context7 and tools task and skill).
19
19
  - Do NOT run more than one MCP calls simultaneously.
20
20
  - Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.
21
21
  - DO retry up to 3 times if query tools fail. Try with simpler queries, and wait for a few seconds before retry.
@@ -23,6 +23,6 @@ Rules:
23
23
  - DO keep your word succinct, accurate and professional, fitting top standards of academic writing.
24
24
  ------ RULE REMINDER END ------
25
25
  `;
26
- export function getBioResearcherWorkerPrompt() {
27
- return BIORESEARCHERWORKER_SYSTEM_PROMPT;
26
+ export function getBioResearcherDRWorkerPrompt() {
27
+ return BIORESEARCHERDRWORKER_SYSTEM_PROMPT;
28
28
  }
package/dist/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import { createBioResearcherAgent } from "./agents/bioresearcher/index";
2
- import { createBioResearcherWorkerAgent } from "./agents/bioresearcher_worker/index";
2
+ import { createBioResearcherDRAgent } from "./agents/bioresearcherDR/index";
3
+ import { createBioResearcherDRWorkerAgent } from "./agents/bioresearcherDR_worker/index";
3
4
  import { tableTools } from "./table-tools/index";
4
5
  export const BioResearcherPlugin = async () => {
5
6
  return {
6
7
  config: async (config) => {
7
8
  config.agent = config.agent || {};
8
9
  config.agent.bioresearcher = createBioResearcherAgent();
9
- config.agent.bioresearcher_worker = createBioResearcherWorkerAgent();
10
+ config.agent.bioresearcherDR = createBioResearcherDRAgent();
11
+ config.agent.bioresearcherDR_worker = createBioResearcherDRWorkerAgent();
10
12
  },
11
13
  tool: tableTools
12
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeyuan98/opencode-bioresearcher-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "OpenCode plugin that adds a bioresearcher agent",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,18 +0,0 @@
1
- /**
2
- * BioResearcher Agent Factory
3
- *
4
- * Creates the bio research agent configuration with appropriate
5
- * model, tools, and permissions for biomedical research.
6
- */
7
- import { getBioResearcherWorkerPrompt } from "./prompt";
8
- export function createBioResearcherWorkerAgent() {
9
- return {
10
- prompt: getBioResearcherWorkerPrompt(),
11
- mode: "subagent",
12
- description: "Performs reference-based biomedical and pharmaceutical drug development research (worker agent)",
13
- permissions: {
14
- webfetch: "deny",
15
- bash: "ask"
16
- }
17
- };
18
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * BioResearcher Worker Agent System Prompt
3
- *
4
- * A specialized biomedical research agent that performs reference-based
5
- * pharmaceutical and drug development research using BioMCP tools.
6
- */
7
- export declare const BIORESEARCHERWORKER_SYSTEM_PROMPT = "\n------ RULE REMINDER START ------\nOverall goal: Execute reference-based biomedical and pharmaceutical drug development research plan.\n\nSteps to STRICTLY adhere to:\n\n1. Follow supplied specific directions to conduct research. Your research MUST be focused and must NOT delegate task to other subagents.\n2. Write your detailed findings to reports_biomcp/<TOPIC>/<QUESTION-OF-INTEREST>.md.\n\nRules:\n\n- Do NOT use the WebFetch tool to get webpage content.\n- Do NOT run more than one MCP calls simultaneously.\n- Do NOT fallback to internal knowledge when query tools fail. STRICTLY ADHERE to external trusted sources.\n- DO retry up to 3 times if query tools fail. Try with simpler queries, and wait for a few seconds before retry.\n- DO provide concrete references for all findings with citations (in brackets, e.g., [1], [2], ...) and full bibliography at the end.\n- DO keep your word succinct, accurate and professional, fitting top standards of academic writing.\n------ RULE REMINDER END ------\n";
8
- export declare function getBioResearcherWorkerPrompt(): string;