opencode-toolbox 0.8.0 → 0.9.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.
- package/README.md +3 -0
- package/package.json +3 -2
- package/toolbox.schema.json +125 -0
package/README.md
CHANGED
|
@@ -46,6 +46,7 @@ Create `~/.config/opencode/toolbox.jsonc`:
|
|
|
46
46
|
|
|
47
47
|
```jsonc
|
|
48
48
|
{
|
|
49
|
+
"$schema": "https://unpkg.com/opencode-toolbox@latest/toolbox.schema.json",
|
|
49
50
|
"mcp": {
|
|
50
51
|
"time": {
|
|
51
52
|
"type": "local",
|
|
@@ -72,6 +73,8 @@ Create `~/.config/opencode/toolbox.jsonc`:
|
|
|
72
73
|
}
|
|
73
74
|
```
|
|
74
75
|
|
|
76
|
+
> **Note:** The config file is auto-created with default settings if it doesn't exist.
|
|
77
|
+
|
|
75
78
|
### Environment Variables
|
|
76
79
|
|
|
77
80
|
- `OPENCODE_TOOLBOX_CONFIG`: Path to config file (default: `~/.config/opencode/toolbox.jsonc`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-toolbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Tool Search Tool Plugin for OpenCode - search and execute tools from MCP servers on-demand",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
-
"README.md"
|
|
27
|
+
"README.md",
|
|
28
|
+
"toolbox.schema.json"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
30
31
|
"opencode",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/opencode-toolbox@latest/toolbox.schema.json",
|
|
4
|
+
"title": "OpenCode Toolbox Configuration",
|
|
5
|
+
"description": "Configuration schema for opencode-toolbox plugin",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "JSON Schema reference for editor support"
|
|
11
|
+
},
|
|
12
|
+
"mcp": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "MCP servers to connect to",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"oneOf": [
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"description": "Local MCP server (stdio)",
|
|
20
|
+
"properties": {
|
|
21
|
+
"type": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "local",
|
|
24
|
+
"description": "Server type: local process via stdio"
|
|
25
|
+
},
|
|
26
|
+
"command": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "type": "string" },
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"description": "Command and arguments to spawn the MCP server"
|
|
31
|
+
},
|
|
32
|
+
"environment": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": { "type": "string" },
|
|
35
|
+
"description": "Environment variables for the process. Use {env:VAR_NAME} for interpolation."
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": ["type", "command"],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "Remote MCP server (HTTP/SSE)",
|
|
44
|
+
"properties": {
|
|
45
|
+
"type": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"const": "remote",
|
|
48
|
+
"description": "Server type: remote HTTP/SSE endpoint"
|
|
49
|
+
},
|
|
50
|
+
"url": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "uri",
|
|
53
|
+
"description": "Remote MCP endpoint URL"
|
|
54
|
+
},
|
|
55
|
+
"headers": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": { "type": "string" },
|
|
58
|
+
"description": "HTTP headers for authentication. Use {env:VAR_NAME} for interpolation."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": ["type", "url"],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"settings": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "Plugin settings",
|
|
70
|
+
"properties": {
|
|
71
|
+
"defaultLimit": {
|
|
72
|
+
"type": "integer",
|
|
73
|
+
"minimum": 1,
|
|
74
|
+
"maximum": 20,
|
|
75
|
+
"default": 5,
|
|
76
|
+
"description": "Default number of search results to return"
|
|
77
|
+
},
|
|
78
|
+
"initMode": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["eager", "lazy"],
|
|
81
|
+
"default": "eager",
|
|
82
|
+
"description": "Initialization mode: 'eager' connects on plugin load, 'lazy' connects on first use"
|
|
83
|
+
},
|
|
84
|
+
"connection": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"description": "Connection settings for MCP servers",
|
|
87
|
+
"properties": {
|
|
88
|
+
"connectTimeout": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 100,
|
|
91
|
+
"maximum": 60000,
|
|
92
|
+
"default": 5000,
|
|
93
|
+
"description": "Connection timeout in milliseconds"
|
|
94
|
+
},
|
|
95
|
+
"requestTimeout": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 100,
|
|
98
|
+
"maximum": 300000,
|
|
99
|
+
"default": 30000,
|
|
100
|
+
"description": "Request timeout in milliseconds"
|
|
101
|
+
},
|
|
102
|
+
"retryAttempts": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 0,
|
|
105
|
+
"maximum": 10,
|
|
106
|
+
"default": 2,
|
|
107
|
+
"description": "Number of retry attempts on connection failure"
|
|
108
|
+
},
|
|
109
|
+
"retryDelay": {
|
|
110
|
+
"type": "integer",
|
|
111
|
+
"minimum": 0,
|
|
112
|
+
"maximum": 30000,
|
|
113
|
+
"default": 1000,
|
|
114
|
+
"description": "Delay between retries in milliseconds"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": ["mcp"],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|