@yeyuan98/opencode-bioresearcher-plugin 1.6.0 → 1.6.4
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/LICENSE +0 -0
- package/README.md +7 -6
- package/dist/agents/bioresearcher/index.d.ts +0 -0
- package/dist/agents/bioresearcher/index.js +0 -0
- package/dist/agents/bioresearcher/prompt.d.ts +1 -1
- package/dist/agents/bioresearcher/prompt.js +4 -4
- package/dist/agents/bioresearcherDR/index.d.ts +0 -0
- package/dist/agents/bioresearcherDR/index.js +0 -0
- package/dist/agents/bioresearcherDR/prompt.d.ts +1 -1
- package/dist/agents/bioresearcherDR/prompt.js +2 -2
- package/dist/agents/bioresearcherDR_worker/index.d.ts +0 -0
- package/dist/agents/bioresearcherDR_worker/index.js +0 -0
- package/dist/agents/bioresearcherDR_worker/prompt.d.ts +1 -1
- package/dist/agents/bioresearcherDR_worker/prompt.js +2 -2
- package/dist/index.d.ts +0 -0
- package/dist/index.js +16 -3
- package/dist/shared/skill-sync.d.ts +1 -0
- package/dist/shared/skill-sync.js +117 -0
- package/dist/shared/tool-restrictions.d.ts +2 -2
- package/dist/shared/tool-restrictions.js +10 -4
- package/dist/skills/bioresearcher-core/README.md +1 -1
- package/dist/skills/bioresearcher-core/SKILL.md +1 -1
- package/dist/skills/bioresearcher-core/examples/contexts.json +0 -0
- package/dist/skills/bioresearcher-core/examples/data-exchange-example.md +0 -0
- package/dist/skills/bioresearcher-core/examples/template.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/bioresearcher/analysis-methods.md +1 -1
- package/dist/skills/bioresearcher-core/patterns/bioresearcher/best-practices.md +1 -1
- package/dist/skills/bioresearcher-core/patterns/bioresearcher/python-standards.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/bioresearcher/report-template.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/bioresearcher/tool-selection.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/calculator.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/citations.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/data-exchange.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/json-tools.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/progress.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/rate-limiting.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/retry.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/shell-commands.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/subagent-waves.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/table-tools.md +0 -0
- package/dist/skills/bioresearcher-core/patterns/user-confirmation.md +0 -0
- package/dist/skills/bioresearcher-core/python/template.md +0 -0
- package/dist/skills/bioresearcher-core/python/template.py +0 -0
- package/dist/skills/bioresearcher-tests/README.md +1 -1
- package/dist/skills/bioresearcher-tests/SKILL.md +1 -1
- package/dist/skills/bioresearcher-tests/pyproject.toml +0 -0
- package/dist/skills/bioresearcher-tests/resources/json_samples/in_markdown.md.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/json_samples/nested_object.json.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/json_samples/schema_draft7.json.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/json_samples/simple_array.json.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/json_samples/simple_object.json.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/obo_sample.obo.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/pubmed_sample.xml.gz +0 -0
- package/dist/skills/bioresearcher-tests/resources/table_sample.xlsx.gz +0 -0
- package/dist/skills/bioresearcher-tests/test_cases/json_tests.md +0 -0
- package/dist/skills/bioresearcher-tests/test_cases/misc_tests.md +0 -0
- package/dist/skills/bioresearcher-tests/test_cases/parser_tests.md +0 -0
- package/dist/skills/bioresearcher-tests/test_cases/skill_tests.md +3 -3
- package/dist/skills/bioresearcher-tests/test_cases/table_tests.md +0 -0
- package/dist/skills/bioresearcher-tests/test_runner.py +0 -0
- package/dist/skills/demo-skill/SKILL.md +0 -0
- package/dist/skills/demo-skill/demo_script.py +0 -0
- package/dist/skills/env-jsonc-setup/SKILL.md +0 -0
- package/dist/skills/gromacs-guides/SKILL.md +1 -1
- package/dist/skills/gromacs-guides/guides/create_index.md +0 -0
- package/dist/skills/gromacs-guides/guides/inspect_tpr.md +0 -0
- package/dist/skills/long-table-summary/SKILL.md +0 -0
- package/dist/skills/long-table-summary/combine_outputs.py +0 -0
- package/dist/skills/long-table-summary/generate_prompts.py +0 -0
- package/dist/skills/long-table-summary/pyproject.toml +0 -0
- package/dist/skills/pubmed-weekly/SKILL.md +0 -0
- package/dist/skills/pubmed-weekly/pubmed_weekly.py +0 -0
- package/dist/skills/pubmed-weekly/pyproject.toml +0 -0
- package/dist/skills/python-setup-uv/SKILL.md +0 -0
- package/dist/tools/db/backends/index.d.ts +0 -0
- package/dist/tools/db/backends/index.js +0 -0
- package/dist/tools/db/backends/mongodb/backend.d.ts +0 -0
- package/dist/tools/db/backends/mongodb/backend.js +0 -0
- package/dist/tools/db/backends/mongodb/connection.d.ts +0 -0
- package/dist/tools/db/backends/mongodb/connection.js +0 -0
- package/dist/tools/db/backends/mongodb/index.d.ts +0 -0
- package/dist/tools/db/backends/mongodb/index.js +0 -0
- package/dist/tools/db/backends/mongodb/translator.d.ts +0 -0
- package/dist/tools/db/backends/mongodb/translator.js +0 -0
- package/dist/tools/db/backends/mysql/backend.d.ts +0 -0
- package/dist/tools/db/backends/mysql/backend.js +0 -0
- package/dist/tools/db/backends/mysql/connection.d.ts +0 -0
- package/dist/tools/db/backends/mysql/connection.js +0 -0
- package/dist/tools/db/backends/mysql/index.d.ts +0 -0
- package/dist/tools/db/backends/mysql/index.js +0 -0
- package/dist/tools/db/backends/mysql/translator.d.ts +0 -0
- package/dist/tools/db/backends/mysql/translator.js +0 -0
- package/dist/tools/db/core/base.d.ts +0 -0
- package/dist/tools/db/core/base.js +0 -0
- package/dist/tools/db/core/config-loader.d.ts +0 -0
- package/dist/tools/db/core/config-loader.js +0 -0
- package/dist/tools/db/core/index.d.ts +0 -0
- package/dist/tools/db/core/index.js +0 -0
- package/dist/tools/db/core/jsonc-parser.d.ts +0 -0
- package/dist/tools/db/core/jsonc-parser.js +0 -0
- package/dist/tools/db/core/validator.d.ts +0 -0
- package/dist/tools/db/core/validator.js +0 -0
- package/dist/tools/db/index.d.ts +0 -0
- package/dist/tools/db/index.js +0 -0
- package/dist/tools/db/interface/backend.d.ts +0 -0
- package/dist/tools/db/interface/backend.js +0 -0
- package/dist/tools/db/interface/connection.d.ts +0 -0
- package/dist/tools/db/interface/connection.js +0 -0
- package/dist/tools/db/interface/index.d.ts +0 -0
- package/dist/tools/db/interface/index.js +0 -0
- package/dist/tools/db/interface/query.d.ts +0 -0
- package/dist/tools/db/interface/query.js +0 -0
- package/dist/tools/db/interface/schema.d.ts +0 -0
- package/dist/tools/db/interface/schema.js +0 -0
- package/dist/tools/db/tools.d.ts +0 -0
- package/dist/tools/db/tools.js +6 -3
- package/dist/tools/db/utils.d.ts +0 -0
- package/dist/tools/db/utils.js +0 -0
- package/dist/tools/misc/calculator.d.ts +0 -0
- package/dist/tools/misc/calculator.js +1 -0
- package/dist/tools/misc/index.d.ts +0 -0
- package/dist/tools/misc/index.js +0 -0
- package/dist/tools/misc/json-extract.d.ts +0 -0
- package/dist/tools/misc/json-extract.js +1 -0
- package/dist/tools/misc/json-infer.d.ts +0 -0
- package/dist/tools/misc/json-infer.js +1 -0
- package/dist/tools/misc/json-validate.d.ts +0 -0
- package/dist/tools/misc/json-validate.js +1 -0
- package/dist/tools/misc/timer.d.ts +0 -0
- package/dist/tools/misc/timer.js +1 -0
- package/dist/tools/parser/obo/index.d.ts +0 -0
- package/dist/tools/parser/obo/index.js +0 -0
- package/dist/tools/parser/obo/obo.d.ts +0 -0
- package/dist/tools/parser/obo/obo.js +1 -0
- package/dist/tools/parser/obo/types.d.ts +0 -0
- package/dist/tools/parser/obo/types.js +0 -0
- package/dist/tools/parser/obo/utils.d.ts +0 -0
- package/dist/tools/parser/obo/utils.js +0 -0
- package/dist/tools/parser/pubmed/index.d.ts +0 -0
- package/dist/tools/parser/pubmed/index.js +0 -0
- package/dist/tools/parser/pubmed/pubmed.d.ts +0 -0
- package/dist/tools/parser/pubmed/pubmed.js +1 -0
- package/dist/tools/parser/pubmed/types.d.ts +0 -0
- package/dist/tools/parser/pubmed/types.js +0 -0
- package/dist/tools/parser/pubmed/utils.d.ts +0 -0
- package/dist/tools/parser/pubmed/utils.js +0 -0
- package/dist/tools/sandbox/bash-parser.d.ts +0 -0
- package/dist/tools/sandbox/bash-parser.js +0 -0
- package/dist/tools/sandbox/escape-scenarios.test.d.ts +0 -0
- package/dist/tools/sandbox/escape-scenarios.test.js +0 -0
- package/dist/tools/sandbox/expander.d.ts +0 -0
- package/dist/tools/sandbox/expander.js +0 -0
- package/dist/tools/sandbox/final-verification.test.d.ts +0 -0
- package/dist/tools/sandbox/final-verification.test.js +0 -0
- package/dist/tools/sandbox/hooks.d.ts +0 -0
- package/dist/tools/sandbox/hooks.js +0 -0
- package/dist/tools/sandbox/index.d.ts +0 -0
- package/dist/tools/sandbox/index.js +0 -0
- package/dist/tools/sandbox/manager.d.ts +0 -0
- package/dist/tools/sandbox/manager.js +0 -0
- package/dist/tools/sandbox/sandbox.integration.test.d.ts +0 -0
- package/dist/tools/sandbox/sandbox.integration.test.js +0 -0
- package/dist/tools/sandbox/sandbox.test.d.ts +0 -0
- package/dist/tools/sandbox/sandbox.test.js +0 -0
- package/dist/tools/sandbox/tool.d.ts +0 -0
- package/dist/tools/sandbox/tool.js +0 -0
- package/dist/tools/sandbox/types.d.ts +0 -0
- package/dist/tools/sandbox/types.js +0 -0
- package/dist/tools/sandbox/validator.d.ts +0 -0
- package/dist/tools/sandbox/validator.js +0 -0
- package/dist/tools/skill/frontmatter.d.ts +0 -0
- package/dist/tools/skill/frontmatter.js +0 -0
- package/dist/tools/skill/index.d.ts +0 -0
- package/dist/tools/skill/index.js +0 -0
- package/dist/tools/skill/registry.d.ts +0 -0
- package/dist/tools/skill/registry.js +0 -0
- package/dist/tools/skill/tool.d.ts +0 -0
- package/dist/tools/skill/tool.js +0 -0
- package/dist/tools/skill/types.d.ts +0 -0
- package/dist/tools/skill/types.js +0 -0
- package/dist/tools/table/index.d.ts +0 -0
- package/dist/tools/table/index.js +0 -0
- package/dist/tools/table/tools.d.ts +0 -0
- package/dist/tools/table/tools.js +13 -0
- package/dist/tools/table/utils.d.ts +0 -0
- package/dist/tools/table/utils.js +0 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +2 -2
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/db/index.d.ts
CHANGED
|
File without changes
|
package/dist/tools/db/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/db/tools.d.ts
CHANGED
|
File without changes
|
package/dist/tools/db/tools.js
CHANGED
|
@@ -29,7 +29,8 @@ export const dbQuery = tool({
|
|
|
29
29
|
sql: z.string().describe('SELECT SQL query to execute. Use named placeholders like :name for parameters.'),
|
|
30
30
|
params: z.record(z.string(), z.any()).optional().describe('Named parameters as key-value pairs (e.g., { "status": "active", "limit": 10 })'),
|
|
31
31
|
},
|
|
32
|
-
execute: async (args,
|
|
32
|
+
execute: async (args, context) => {
|
|
33
|
+
await context.ask({ permission: "dbQuery", patterns: ["*"], always: ["*"], metadata: {} });
|
|
33
34
|
try {
|
|
34
35
|
const backend = await getOrCreateBackend();
|
|
35
36
|
const validation = validateReadOnlyQuery(args.sql, backend.type);
|
|
@@ -59,7 +60,8 @@ export const dbListTables = tool({
|
|
|
59
60
|
|
|
60
61
|
**Usage:** Call this first to discover what tables are available before using dbDescribeTable or dbQuery.`,
|
|
61
62
|
args: {},
|
|
62
|
-
execute: async (
|
|
63
|
+
execute: async (args, context) => {
|
|
64
|
+
await context.ask({ permission: "dbListTables", patterns: ["*"], always: ["*"], metadata: {} });
|
|
63
65
|
try {
|
|
64
66
|
const backend = await getOrCreateBackend();
|
|
65
67
|
const collections = await backend.listCollections();
|
|
@@ -90,7 +92,8 @@ export const dbDescribeTable = tool({
|
|
|
90
92
|
args: {
|
|
91
93
|
table_name: z.string().describe('Name of the table/collection to describe. Use dbListTables to see available tables.'),
|
|
92
94
|
},
|
|
93
|
-
execute: async (args,
|
|
95
|
+
execute: async (args, context) => {
|
|
96
|
+
await context.ask({ permission: "dbDescribeTable", patterns: ["*"], always: ["*"], metadata: {} });
|
|
94
97
|
try {
|
|
95
98
|
const backend = await getOrCreateBackend();
|
|
96
99
|
const validation = validateCollectionName(args.table_name, backend.type);
|
package/dist/tools/db/utils.d.ts
CHANGED
|
File without changes
|
package/dist/tools/db/utils.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -105,6 +105,7 @@ export const calculator = tool({
|
|
|
105
105
|
.describe("Decimal places for result (0-15, default 3)")
|
|
106
106
|
},
|
|
107
107
|
execute: async (args, context) => {
|
|
108
|
+
await context.ask({ permission: "calculator", patterns: ["*"], always: ["*"], metadata: {} });
|
|
108
109
|
const validation = validateFormula(args.formula);
|
|
109
110
|
if (!validation.valid) {
|
|
110
111
|
return validation.error;
|
|
File without changes
|
package/dist/tools/misc/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -253,6 +253,7 @@ export const jsonExtract = tool({
|
|
|
253
253
|
return_all: z.boolean().default(false).describe("If true, returns all JSON objects found as array; if false (default), returns first only")
|
|
254
254
|
},
|
|
255
255
|
execute: async (args, context) => {
|
|
256
|
+
await context.ask({ permission: "jsonExtract", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
256
257
|
try {
|
|
257
258
|
const resolvedPath = path.isAbsolute(args.file_path)
|
|
258
259
|
? args.file_path
|
|
File without changes
|
|
@@ -145,6 +145,7 @@ export const jsonInfer = tool({
|
|
|
145
145
|
strict: z.boolean().default(false).describe("If true, all fields are required; if false (default), fields are optional")
|
|
146
146
|
},
|
|
147
147
|
execute: async (args, context) => {
|
|
148
|
+
await context.ask({ permission: "jsonInfer", patterns: ["*"], always: ["*"], metadata: {} });
|
|
148
149
|
let parsedData;
|
|
149
150
|
try {
|
|
150
151
|
parsedData = JSON.parse(args.data);
|
|
File without changes
|
|
@@ -200,6 +200,7 @@ export const jsonValidate = tool({
|
|
|
200
200
|
schema: z.string().describe("JSON Schema string or file path (auto-reads from file if path detected)")
|
|
201
201
|
},
|
|
202
202
|
execute: async (args, context) => {
|
|
203
|
+
await context.ask({ permission: "jsonValidate", patterns: ["*"], always: ["*"], metadata: {} });
|
|
203
204
|
let parsedData;
|
|
204
205
|
let parsedSchema;
|
|
205
206
|
let schemaString = args.schema;
|
|
File without changes
|
package/dist/tools/misc/timer.js
CHANGED
|
@@ -8,6 +8,7 @@ export const blockingTimer = tool({
|
|
|
8
8
|
.describe("Delay time in seconds (max 300 seconds)")
|
|
9
9
|
},
|
|
10
10
|
execute: async (args, context) => {
|
|
11
|
+
await context.ask({ permission: "blockingTimer", patterns: ["*"], always: ["*"], metadata: {} });
|
|
11
12
|
const MAX_DELAY = 300;
|
|
12
13
|
if (args.delay > MAX_DELAY) {
|
|
13
14
|
return 'Blocking timer must NOT exceed 300 seconds. DO YOU REALLY NEED THIS LONG WAIT?';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -165,6 +165,7 @@ export const parse_obo_file = tool({
|
|
|
165
165
|
.describe('Enable verbose logging for debugging')
|
|
166
166
|
},
|
|
167
167
|
execute: async (args, context) => {
|
|
168
|
+
await context.ask({ permission: "parse_obo_file", patterns: [args.filePath], always: ["*"], metadata: {} });
|
|
168
169
|
const verbose = args.verbose ?? false;
|
|
169
170
|
try {
|
|
170
171
|
const { filePath, outputFileName = 'obo_output.csv', outputDir } = args;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -174,6 +174,7 @@ export const parse_pubmed_articleSet = tool({
|
|
|
174
174
|
.describe('Enable verbose logging for debugging')
|
|
175
175
|
},
|
|
176
176
|
execute: async (args, context) => {
|
|
177
|
+
await context.ask({ permission: "parse_pubmed_articleSet", patterns: [args.filePath], always: ["*"], metadata: {} });
|
|
177
178
|
try {
|
|
178
179
|
const { filePath, outputMode = 'single', outputFileName, outputDir, verbose = false } = args;
|
|
179
180
|
if (verbose)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/skill/tool.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -9,6 +9,7 @@ export const tableGetSheetPreview = tool({
|
|
|
9
9
|
sheet_name: z.string().optional().describe("Worksheet name (optional, uses first sheet by default)")
|
|
10
10
|
},
|
|
11
11
|
execute: async (args, context) => {
|
|
12
|
+
await context.ask({ permission: "tableGetSheetPreview", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
12
13
|
try {
|
|
13
14
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
14
15
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -32,6 +33,7 @@ export const tableListSheets = tool({
|
|
|
32
33
|
file_path: z.string().describe("Path to table file (supports .xlsx, .ods, .csv formats)")
|
|
33
34
|
},
|
|
34
35
|
execute: async (args, context) => {
|
|
36
|
+
await context.ask({ permission: "tableListSheets", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
35
37
|
try {
|
|
36
38
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
37
39
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -49,6 +51,7 @@ export const tableGetHeaders = tool({
|
|
|
49
51
|
sheet_name: z.string().optional().describe("Worksheet name (optional, uses first sheet by default)")
|
|
50
52
|
},
|
|
51
53
|
execute: async (args, context) => {
|
|
54
|
+
await context.ask({ permission: "tableGetHeaders", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
52
55
|
try {
|
|
53
56
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
54
57
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -74,6 +77,7 @@ export const tableGetCell = tool({
|
|
|
74
77
|
cell_address: z.string().describe("Cell address (e.g., 'A1', 'B5')")
|
|
75
78
|
},
|
|
76
79
|
execute: async (args, context) => {
|
|
80
|
+
await context.ask({ permission: "tableGetCell", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
77
81
|
try {
|
|
78
82
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
79
83
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -103,6 +107,7 @@ export const tableFilterRows = tool({
|
|
|
103
107
|
max_results: z.number().default(100).describe("Maximum number of results to return")
|
|
104
108
|
},
|
|
105
109
|
execute: async (args, context) => {
|
|
110
|
+
await context.ask({ permission: "tableFilterRows", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
106
111
|
try {
|
|
107
112
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
108
113
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -150,6 +155,7 @@ export const tableSearch = tool({
|
|
|
150
155
|
max_results: z.number().default(50).describe("Maximum number of results to return")
|
|
151
156
|
},
|
|
152
157
|
execute: async (args, context) => {
|
|
158
|
+
await context.ask({ permission: "tableSearch", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
153
159
|
try {
|
|
154
160
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
155
161
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -192,6 +198,7 @@ export const tableGetRange = tool({
|
|
|
192
198
|
range: z.string().describe("Cell range (e.g., 'A1:C10', 'A1:B20')")
|
|
193
199
|
},
|
|
194
200
|
execute: async (args, context) => {
|
|
201
|
+
await context.ask({ permission: "tableGetRange", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
195
202
|
try {
|
|
196
203
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
197
204
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -228,6 +235,7 @@ export const tableSummarize = tool({
|
|
|
228
235
|
columns: z.array(z.string()).optional().describe("Specific columns to summarize (empty = all numeric columns)")
|
|
229
236
|
},
|
|
230
237
|
execute: async (args, context) => {
|
|
238
|
+
await context.ask({ permission: "tableSummarize", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
231
239
|
try {
|
|
232
240
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
233
241
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -268,6 +276,7 @@ export const tableGroupBy = tool({
|
|
|
268
276
|
agg_type: z.enum(['sum', 'count', 'avg', 'min', 'max']).default('sum').describe("Aggregation type")
|
|
269
277
|
},
|
|
270
278
|
execute: async (args, context) => {
|
|
279
|
+
await context.ask({ permission: "tableGroupBy", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
271
280
|
try {
|
|
272
281
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
273
282
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -331,6 +340,7 @@ export const tablePivotSummary = tool({
|
|
|
331
340
|
agg: z.enum(['sum', 'count', 'avg', 'min', 'max']).default('sum').describe("Aggregation type")
|
|
332
341
|
},
|
|
333
342
|
execute: async (args, context) => {
|
|
343
|
+
await context.ask({ permission: "tablePivotSummary", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
334
344
|
try {
|
|
335
345
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
336
346
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -411,6 +421,7 @@ export const tableAppendRows = tool({
|
|
|
411
421
|
rows: z.array(z.union([z.array(z.any()), z.record(z.string(), z.any())])).describe("Rows to append (array of arrays or array of objects)")
|
|
412
422
|
},
|
|
413
423
|
execute: async (args, context) => {
|
|
424
|
+
await context.ask({ permission: "tableAppendRows", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
414
425
|
try {
|
|
415
426
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
416
427
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -452,6 +463,7 @@ export const tableUpdateCell = tool({
|
|
|
452
463
|
value: z.any().describe("Value to set")
|
|
453
464
|
},
|
|
454
465
|
execute: async (args, context) => {
|
|
466
|
+
await context.ask({ permission: "tableUpdateCell", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
455
467
|
try {
|
|
456
468
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
457
469
|
const workbook = XLSX.readFile(resolvedPath);
|
|
@@ -516,6 +528,7 @@ export const tableCreateFile = tool({
|
|
|
516
528
|
data: z.any().describe("Data to write (array of arrays or array of objects)")
|
|
517
529
|
},
|
|
518
530
|
execute: async (args, context) => {
|
|
531
|
+
await context.ask({ permission: "tableCreateFile", patterns: [args.file_path], always: ["*"], metadata: {} });
|
|
519
532
|
try {
|
|
520
533
|
const resolvedPath = resolvePath(args.file_path, context.directory);
|
|
521
534
|
const workbook = XLSX.utils.book_new();
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLUGIN_VERSION = "1.6.4";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PLUGIN_VERSION = "1.6.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeyuan98/opencode-bioresearcher-plugin",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "OpenCode plugin that adds a bioresearcher agent",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
+
"prebuild": "node -e \"const p=require('./package.json');require('fs').writeFileSync('src/version.ts','export const PLUGIN_VERSION = \\\"'+p.version+'\\\"\\n')\"",
|
|
15
16
|
"build": "tsc && node -e \"const fs=require('fs');fs.rmSync('dist/skills',{recursive:true,force:true});fs.cpSync('skills','dist/skills',{recursive:true})\"",
|
|
16
17
|
"typecheck": "tsc --noEmit"
|
|
17
18
|
},
|
|
@@ -31,7 +32,6 @@
|
|
|
31
32
|
],
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"@opencode-ai/plugin": "^1.14.0",
|
|
34
|
-
"effect": "4.0.0-beta.48",
|
|
35
35
|
"fast-xml-parser": "^5.3.5",
|
|
36
36
|
"mongodb": "^7.1.0",
|
|
37
37
|
"mysql2": "^3.18.2",
|