@yeyuan98/opencode-bioresearcher-plugin 1.5.1 → 1.5.2-alpha.2

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.
Files changed (53) hide show
  1. package/dist/agents/bioresearcher/prompt.d.ts +1 -1
  2. package/dist/agents/bioresearcher/prompt.js +235 -27
  3. package/dist/agents/bioresearcherDR/prompt.d.ts +1 -1
  4. package/dist/agents/bioresearcherDR/prompt.js +8 -8
  5. package/dist/agents/bioresearcherDR_worker/prompt.d.ts +3 -2
  6. package/dist/agents/bioresearcherDR_worker/prompt.js +37 -12
  7. package/dist/shared/tool-restrictions.d.ts +2 -2
  8. package/dist/shared/tool-restrictions.js +4 -3
  9. package/dist/skills/bioresearcher-core/SKILL.md +58 -1
  10. package/dist/skills/bioresearcher-core/patterns/bioresearcher/analysis-methods.md +551 -0
  11. package/dist/skills/bioresearcher-core/patterns/bioresearcher/best-practices.md +647 -0
  12. package/dist/skills/bioresearcher-core/patterns/bioresearcher/python-standards.md +944 -0
  13. package/dist/skills/bioresearcher-core/patterns/bioresearcher/report-template.md +613 -0
  14. package/dist/skills/bioresearcher-core/patterns/bioresearcher/tool-selection.md +481 -0
  15. package/dist/skills/bioresearcher-core/patterns/citations.md +234 -0
  16. package/dist/skills/bioresearcher-core/patterns/rate-limiting.md +167 -0
  17. package/dist/skills/bioresearcher-tests/README.md +90 -90
  18. package/dist/skills/bioresearcher-tests/SKILL.md +255 -255
  19. package/dist/skills/bioresearcher-tests/pyproject.toml +6 -6
  20. package/dist/skills/bioresearcher-tests/test_cases/json_tests.md +137 -137
  21. package/dist/skills/bioresearcher-tests/test_cases/misc_tests.md +141 -141
  22. package/dist/skills/bioresearcher-tests/test_cases/parser_tests.md +80 -80
  23. package/dist/skills/bioresearcher-tests/test_cases/skill_tests.md +59 -59
  24. package/dist/skills/bioresearcher-tests/test_cases/table_tests.md +194 -194
  25. package/dist/skills/bioresearcher-tests/test_runner.py +607 -607
  26. package/dist/skills/long-table-summary/SKILL.md +224 -224
  27. package/dist/tools/sandbox/bash-parser.d.ts +17 -0
  28. package/dist/tools/sandbox/bash-parser.js +166 -0
  29. package/dist/tools/sandbox/escape-scenarios.test.d.ts +7 -0
  30. package/dist/tools/sandbox/escape-scenarios.test.js +182 -0
  31. package/dist/tools/sandbox/expander.d.ts +30 -0
  32. package/dist/tools/sandbox/expander.js +57 -0
  33. package/dist/tools/sandbox/final-verification.test.d.ts +6 -0
  34. package/dist/tools/sandbox/final-verification.test.js +70 -0
  35. package/dist/tools/sandbox/hooks.d.ts +25 -0
  36. package/dist/tools/sandbox/hooks.js +217 -0
  37. package/dist/tools/sandbox/index.d.ts +19 -0
  38. package/dist/tools/sandbox/index.js +24 -0
  39. package/dist/tools/sandbox/manager.d.ts +60 -0
  40. package/dist/tools/sandbox/manager.js +113 -0
  41. package/dist/tools/sandbox/sandbox.integration.test.d.ts +7 -0
  42. package/dist/tools/sandbox/sandbox.integration.test.js +106 -0
  43. package/dist/tools/sandbox/sandbox.test.d.ts +6 -0
  44. package/dist/tools/sandbox/sandbox.test.js +160 -0
  45. package/dist/tools/sandbox/tool.d.ts +66 -0
  46. package/dist/tools/sandbox/tool.js +163 -0
  47. package/dist/tools/sandbox/types.d.ts +38 -0
  48. package/dist/tools/sandbox/types.js +6 -0
  49. package/dist/tools/sandbox/validator.d.ts +33 -0
  50. package/dist/tools/sandbox/validator.js +150 -0
  51. package/dist/tools/skill/registry.js +0 -1
  52. package/dist/tools/table/utils.js +4 -4
  53. package/package.json +1 -1
@@ -1,137 +1,137 @@
1
- # JSON Tool Tests
2
-
3
- ## Test: Extract - Simple Object
4
- - Tool: jsonExtract
5
- - Input:
6
- ```json
7
- {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_object.json", "return_all": false}
8
- ```
9
- - Validators:
10
- - success_is_true
11
- - has data object
12
- - data.name === "test"
13
- - data.value === 42
14
- - Expected: Parsed JSON object with name="test", value=42
15
-
16
- ## Test: Extract - Array
17
- - Tool: jsonExtract
18
- - Input:
19
- ```json
20
- {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_array.json", "return_all": false}
21
- ```
22
- - Validators:
23
- - success_is_true
24
- - isArray(data)
25
- - array_length >= 3
26
- - Expected: Parsed JSON array [1, 2, 3]
27
-
28
- ## Test: Extract - Nested Object
29
- - Tool: jsonExtract
30
- - Input:
31
- ```json
32
- {"file_path": ".bioresearcher-tests/workspace/json_samples/nested_object.json", "return_all": false}
33
- ```
34
- - Validators:
35
- - success_is_true
36
- - has data.nested
37
- - Expected: Nested object parsed with data.nested.deep
38
-
39
- ## Test: Extract - From Markdown
40
- - Tool: jsonExtract
41
- - Input:
42
- ```json
43
- {"file_path": ".bioresearcher-tests/workspace/json_samples/in_markdown.md", "return_all": false}
44
- ```
45
- - Validators:
46
- - success_is_true
47
- - data.embedded === "true"
48
- - method === "json_code_block"
49
- - Expected: JSON extracted from markdown code block
50
-
51
- ## Test: Extract - Return All
52
- - Tool: jsonExtract
53
- - Input:
54
- ```json
55
- {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_array.json", "return_all": true}
56
- ```
57
- - Validators:
58
- - success_is_true
59
- - has count
60
- - Expected: Array with count metadata
61
-
62
- ## Test: Extract - File Not Found
63
- - Tool: jsonExtract
64
- - Input:
65
- ```json
66
- {"file_path": ".bioresearcher-tests/workspace/nonexistent.json", "return_all": false}
67
- ```
68
- - Validators:
69
- - success_is_false
70
- - error.code === "FILE_NOT_FOUND"
71
- - Expected: File not found error
72
-
73
- ## Test: Validate - Valid Data
74
- - Tool: jsonValidate
75
- - Input:
76
- ```json
77
- {"data": "{\"name\": \"test\", \"value\": 42}", "schema": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}, \"value\": {\"type\": \"number\"}}, \"required\": [\"name\"]}"}
78
- ```
79
- - Validators:
80
- - success_is_true
81
- - valid === true OR has data
82
- - Expected: Validation passes
83
-
84
- ## Test: Validate - Invalid Data
85
- - Tool: jsonValidate
86
- - Input:
87
- ```json
88
- {"data": "{\"name\": 123}", "schema": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}}, \"required\": [\"name\"]}"}
89
- ```
90
- - Validators:
91
- - success_is_true
92
- - has errors
93
- - Expected: Validation errors (name should be string)
94
-
95
- ## Test: Validate - From Schema File
96
- - Tool: jsonValidate
97
- - Input:
98
- ```json
99
- {"data": "{\"name\": \"test\", \"value\": 42}", "schema": ".bioresearcher-tests/workspace/json_samples/schema_draft7.json"}
100
- ```
101
- - Validators:
102
- - success_is_true
103
- - Expected: Schema loaded from file and validation passes
104
-
105
- ## Test: Infer - Object
106
- - Tool: jsonInfer
107
- - Input:
108
- ```json
109
- {"data": "{\"name\": \"test\", \"count\": 5, \"active\": true}", "strict": false}
110
- ```
111
- - Validators:
112
- - success_is_true
113
- - has data object
114
- - inferredType === "object"
115
- - Expected: JSON Schema inferred for object
116
-
117
- ## Test: Infer - Array
118
- - Tool: jsonInfer
119
- - Input:
120
- ```json
121
- {"data": "[1, 2, 3, 4, 5]", "strict": false}
122
- ```
123
- - Validators:
124
- - success_is_true
125
- - inferredType === "array"
126
- - Expected: Array schema inferred
127
-
128
- ## Test: Infer - Strict Mode
129
- - Tool: jsonInfer
130
- - Input:
131
- ```json
132
- {"data": "{\"name\": \"test\"}", "strict": true}
133
- ```
134
- - Validators:
135
- - success_is_true
136
- - strictMode === "true"
137
- - Expected: Schema with required fields
1
+ # JSON Tool Tests
2
+
3
+ ## Test: Extract - Simple Object
4
+ - Tool: jsonExtract
5
+ - Input:
6
+ ```json
7
+ {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_object.json", "return_all": false}
8
+ ```
9
+ - Validators:
10
+ - success_is_true
11
+ - has data object
12
+ - data.name === "test"
13
+ - data.value === 42
14
+ - Expected: Parsed JSON object with name="test", value=42
15
+
16
+ ## Test: Extract - Array
17
+ - Tool: jsonExtract
18
+ - Input:
19
+ ```json
20
+ {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_array.json", "return_all": false}
21
+ ```
22
+ - Validators:
23
+ - success_is_true
24
+ - isArray(data)
25
+ - array_length >= 3
26
+ - Expected: Parsed JSON array [1, 2, 3]
27
+
28
+ ## Test: Extract - Nested Object
29
+ - Tool: jsonExtract
30
+ - Input:
31
+ ```json
32
+ {"file_path": ".bioresearcher-tests/workspace/json_samples/nested_object.json", "return_all": false}
33
+ ```
34
+ - Validators:
35
+ - success_is_true
36
+ - has data.nested
37
+ - Expected: Nested object parsed with data.nested.deep
38
+
39
+ ## Test: Extract - From Markdown
40
+ - Tool: jsonExtract
41
+ - Input:
42
+ ```json
43
+ {"file_path": ".bioresearcher-tests/workspace/json_samples/in_markdown.md", "return_all": false}
44
+ ```
45
+ - Validators:
46
+ - success_is_true
47
+ - data.embedded === "true"
48
+ - method === "json_code_block"
49
+ - Expected: JSON extracted from markdown code block
50
+
51
+ ## Test: Extract - Return All
52
+ - Tool: jsonExtract
53
+ - Input:
54
+ ```json
55
+ {"file_path": ".bioresearcher-tests/workspace/json_samples/simple_array.json", "return_all": true}
56
+ ```
57
+ - Validators:
58
+ - success_is_true
59
+ - has count
60
+ - Expected: Array with count metadata
61
+
62
+ ## Test: Extract - File Not Found
63
+ - Tool: jsonExtract
64
+ - Input:
65
+ ```json
66
+ {"file_path": ".bioresearcher-tests/workspace/nonexistent.json", "return_all": false}
67
+ ```
68
+ - Validators:
69
+ - success_is_false
70
+ - error.code === "FILE_NOT_FOUND"
71
+ - Expected: File not found error
72
+
73
+ ## Test: Validate - Valid Data
74
+ - Tool: jsonValidate
75
+ - Input:
76
+ ```json
77
+ {"data": "{\"name\": \"test\", \"value\": 42}", "schema": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}, \"value\": {\"type\": \"number\"}}, \"required\": [\"name\"]}"}
78
+ ```
79
+ - Validators:
80
+ - success_is_true
81
+ - valid === true OR has data
82
+ - Expected: Validation passes
83
+
84
+ ## Test: Validate - Invalid Data
85
+ - Tool: jsonValidate
86
+ - Input:
87
+ ```json
88
+ {"data": "{\"name\": 123}", "schema": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}}, \"required\": [\"name\"]}"}
89
+ ```
90
+ - Validators:
91
+ - success_is_true
92
+ - has errors
93
+ - Expected: Validation errors (name should be string)
94
+
95
+ ## Test: Validate - From Schema File
96
+ - Tool: jsonValidate
97
+ - Input:
98
+ ```json
99
+ {"data": "{\"name\": \"test\", \"value\": 42}", "schema": ".bioresearcher-tests/workspace/json_samples/schema_draft7.json"}
100
+ ```
101
+ - Validators:
102
+ - success_is_true
103
+ - Expected: Schema loaded from file and validation passes
104
+
105
+ ## Test: Infer - Object
106
+ - Tool: jsonInfer
107
+ - Input:
108
+ ```json
109
+ {"data": "{\"name\": \"test\", \"count\": 5, \"active\": true}", "strict": false}
110
+ ```
111
+ - Validators:
112
+ - success_is_true
113
+ - has data object
114
+ - inferredType === "object"
115
+ - Expected: JSON Schema inferred for object
116
+
117
+ ## Test: Infer - Array
118
+ - Tool: jsonInfer
119
+ - Input:
120
+ ```json
121
+ {"data": "[1, 2, 3, 4, 5]", "strict": false}
122
+ ```
123
+ - Validators:
124
+ - success_is_true
125
+ - inferredType === "array"
126
+ - Expected: Array schema inferred
127
+
128
+ ## Test: Infer - Strict Mode
129
+ - Tool: jsonInfer
130
+ - Input:
131
+ ```json
132
+ {"data": "{\"name\": \"test\"}", "strict": true}
133
+ ```
134
+ - Validators:
135
+ - success_is_true
136
+ - strictMode === "true"
137
+ - Expected: Schema with required fields
@@ -1,141 +1,141 @@
1
- # Miscellaneous Tool Tests
2
-
3
- ## Test: Timer - Short Delay
4
- - Tool: blockingTimer
5
- - Input:
6
- ```json
7
- {"delay": 1}
8
- ```
9
- - Validators:
10
- - contains_string("Timer completed")
11
- - contains_string("1 seconds")
12
- - Expected: Timer completed message after 1 second
13
-
14
- ## Test: Timer - Zero Delay
15
- - Tool: blockingTimer
16
- - Input:
17
- ```json
18
- {"delay": 0}
19
- ```
20
- - Validators:
21
- - contains_string("Timer completed")
22
- - Expected: Immediate completion
23
-
24
- ## Test: Timer - Max Exceeded
25
- - Tool: blockingTimer
26
- - Input:
27
- ```json
28
- {"delay": 301}
29
- ```
30
- - Validators:
31
- - contains_string("300")
32
- - contains_string("NOT exceed")
33
- - Expected: Error about max delay exceeded
34
-
35
- ## Test: Calculator - Basic Arithmetic
36
- - Tool: calculator
37
- - Input:
38
- ```json
39
- {"formula": "2 + 3 * 4", "precision": 3}
40
- ```
41
- - Validators:
42
- - has result
43
- - result === 14
44
- - Expected: 14 (order of operations: 3*4=12, 2+12=14)
45
-
46
- ## Test: Calculator - Power
47
- - Tool: calculator
48
- - Input:
49
- ```json
50
- {"formula": "2 ^ 10", "precision": 0}
51
- ```
52
- - Validators:
53
- - has result
54
- - result === 1024
55
- - Expected: 1024 (2 to power of 10)
56
-
57
- ## Test: Calculator - Brackets
58
- - Tool: calculator
59
- - Input:
60
- ```json
61
- {"formula": "(2 + 3) * 4", "precision": 3}
62
- ```
63
- - Validators:
64
- - has result
65
- - result === 20
66
- - Expected: 20 (brackets first: 5*4=20)
67
-
68
- ## Test: Calculator - Scientific Notation
69
- - Tool: calculator
70
- - Input:
71
- ```json
72
- {"formula": "1e3 + 500", "precision": 3}
73
- ```
74
- - Validators:
75
- - has result
76
- - result === 1500
77
- - Expected: 1500 (1000 + 500)
78
-
79
- ## Test: Calculator - Division by Zero
80
- - Tool: calculator
81
- - Input:
82
- ```json
83
- {"formula": "1 / 0", "precision": 3}
84
- ```
85
- - Validators:
86
- - contains_string("CALCULATOR ERROR")
87
- - Expected: Error about division by zero
88
-
89
- ## Test: Calculator - Invalid Syntax
90
- - Tool: calculator
91
- - Input:
92
- ```json
93
- {"formula": "2(3)", "precision": 3}
94
- ```
95
- - Validators:
96
- - contains_string("CALCULATOR ERROR")
97
- - contains_string("parentheses")
98
- - Expected: Error about implicit multiplication not allowed
99
-
100
- ## Test: Calculator - Precision
101
- - Tool: calculator
102
- - Input:
103
- ```json
104
- {"formula": "10 / 3", "precision": 2}
105
- ```
106
- - Validators:
107
- - has result
108
- - result === 3.33
109
- - Expected: 3.33 (2 decimal places)
110
-
111
- ## Test: Timer - Exact Boundary
112
- - Tool: blockingTimer
113
- - Input:
114
- ```json
115
- {"delay": 300}
116
- ```
117
- - Validators:
118
- - contains_string("Timer completed")
119
- - Expected: Timer completes at exact max boundary (300s)
120
-
121
- ## Test: Calculator - Empty Formula
122
- - Tool: calculator
123
- - Input:
124
- ```json
125
- {"formula": "", "precision": 3}
126
- ```
127
- - Validators:
128
- - contains_string("CALCULATOR ERROR")
129
- - contains_string("empty")
130
- - Expected: Error about empty formula
131
-
132
- ## Test: Calculator - Invalid Characters
133
- - Tool: calculator
134
- - Input:
135
- ```json
136
- {"formula": "2 + abc", "precision": 3}
137
- ```
138
- - Validators:
139
- - contains_string("CALCULATOR ERROR")
140
- - contains_string("invalid characters")
141
- - Expected: Error about invalid characters
1
+ # Miscellaneous Tool Tests
2
+
3
+ ## Test: Timer - Short Delay
4
+ - Tool: blockingTimer
5
+ - Input:
6
+ ```json
7
+ {"delay": 1}
8
+ ```
9
+ - Validators:
10
+ - contains_string("Timer completed")
11
+ - contains_string("1 seconds")
12
+ - Expected: Timer completed message after 1 second
13
+
14
+ ## Test: Timer - Zero Delay
15
+ - Tool: blockingTimer
16
+ - Input:
17
+ ```json
18
+ {"delay": 0}
19
+ ```
20
+ - Validators:
21
+ - contains_string("Timer completed")
22
+ - Expected: Immediate completion
23
+
24
+ ## Test: Timer - Max Exceeded
25
+ - Tool: blockingTimer
26
+ - Input:
27
+ ```json
28
+ {"delay": 301}
29
+ ```
30
+ - Validators:
31
+ - contains_string("300")
32
+ - contains_string("NOT exceed")
33
+ - Expected: Error about max delay exceeded
34
+
35
+ ## Test: Calculator - Basic Arithmetic
36
+ - Tool: calculator
37
+ - Input:
38
+ ```json
39
+ {"formula": "2 + 3 * 4", "precision": 3}
40
+ ```
41
+ - Validators:
42
+ - has result
43
+ - result === 14
44
+ - Expected: 14 (order of operations: 3*4=12, 2+12=14)
45
+
46
+ ## Test: Calculator - Power
47
+ - Tool: calculator
48
+ - Input:
49
+ ```json
50
+ {"formula": "2 ^ 10", "precision": 0}
51
+ ```
52
+ - Validators:
53
+ - has result
54
+ - result === 1024
55
+ - Expected: 1024 (2 to power of 10)
56
+
57
+ ## Test: Calculator - Brackets
58
+ - Tool: calculator
59
+ - Input:
60
+ ```json
61
+ {"formula": "(2 + 3) * 4", "precision": 3}
62
+ ```
63
+ - Validators:
64
+ - has result
65
+ - result === 20
66
+ - Expected: 20 (brackets first: 5*4=20)
67
+
68
+ ## Test: Calculator - Scientific Notation
69
+ - Tool: calculator
70
+ - Input:
71
+ ```json
72
+ {"formula": "1e3 + 500", "precision": 3}
73
+ ```
74
+ - Validators:
75
+ - has result
76
+ - result === 1500
77
+ - Expected: 1500 (1000 + 500)
78
+
79
+ ## Test: Calculator - Division by Zero
80
+ - Tool: calculator
81
+ - Input:
82
+ ```json
83
+ {"formula": "1 / 0", "precision": 3}
84
+ ```
85
+ - Validators:
86
+ - contains_string("CALCULATOR ERROR")
87
+ - Expected: Error about division by zero
88
+
89
+ ## Test: Calculator - Invalid Syntax
90
+ - Tool: calculator
91
+ - Input:
92
+ ```json
93
+ {"formula": "2(3)", "precision": 3}
94
+ ```
95
+ - Validators:
96
+ - contains_string("CALCULATOR ERROR")
97
+ - contains_string("parentheses")
98
+ - Expected: Error about implicit multiplication not allowed
99
+
100
+ ## Test: Calculator - Precision
101
+ - Tool: calculator
102
+ - Input:
103
+ ```json
104
+ {"formula": "10 / 3", "precision": 2}
105
+ ```
106
+ - Validators:
107
+ - has result
108
+ - result === 3.33
109
+ - Expected: 3.33 (2 decimal places)
110
+
111
+ ## Test: Timer - Exact Boundary
112
+ - Tool: blockingTimer
113
+ - Input:
114
+ ```json
115
+ {"delay": 300}
116
+ ```
117
+ - Validators:
118
+ - contains_string("Timer completed")
119
+ - Expected: Timer completes at exact max boundary (300s)
120
+
121
+ ## Test: Calculator - Empty Formula
122
+ - Tool: calculator
123
+ - Input:
124
+ ```json
125
+ {"formula": "", "precision": 3}
126
+ ```
127
+ - Validators:
128
+ - contains_string("CALCULATOR ERROR")
129
+ - contains_string("empty")
130
+ - Expected: Error about empty formula
131
+
132
+ ## Test: Calculator - Invalid Characters
133
+ - Tool: calculator
134
+ - Input:
135
+ ```json
136
+ {"formula": "2 + abc", "precision": 3}
137
+ ```
138
+ - Validators:
139
+ - contains_string("CALCULATOR ERROR")
140
+ - contains_string("invalid characters")
141
+ - Expected: Error about invalid characters