ayush-opencode 0.1.1 → 0.2.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 CHANGED
@@ -5,6 +5,7 @@ Custom OpenCode plugin with specialized subagents and orchestration injection.
5
5
  ## Features
6
6
 
7
7
  - **4 Custom Subagents**: Explorer, Librarian, Oracle, UI-Planner
8
+ - **Auto-Loaded MCP Servers**: exa, grep_app, sequential-thinking (no manual config needed!)
8
9
  - **Orchestration Injection**: Automatically teaches Build/Plan agents how to delegate tasks
9
10
  - **Portable**: Install on any machine via opencode.json
10
11
 
@@ -14,7 +15,7 @@ Just add to your `opencode.json` — OpenCode will auto-install the plugin:
14
15
 
15
16
  ```json
16
17
  {
17
- "plugin": ["ayush-opencode@0.1.0"]
18
+ "plugin": ["ayush-opencode@0.2.0"]
18
19
  }
19
20
  ```
20
21
 
@@ -28,7 +29,7 @@ That's it! Restart OpenCode and the plugin is ready to use.
28
29
 
29
30
  ```json
30
31
  {
31
- "plugin": ["ayush-opencode@0.1.0"]
32
+ "plugin": ["ayush-opencode@0.2.0"]
32
33
  }
33
34
  ```
34
35
 
@@ -40,10 +41,10 @@ Simply change the version in your config and restart OpenCode:
40
41
 
41
42
  ```jsonc
42
43
  // Change from:
43
- "plugin": ["ayush-opencode@0.1.0"]
44
+ "plugin": ["ayush-opencode@0.2.0"]
44
45
 
45
46
  // To:
46
- "plugin": ["ayush-opencode@0.2.0"]
47
+ "plugin": ["ayush-opencode@0.3.0"]
47
48
  ```
48
49
 
49
50
  OpenCode will detect the version mismatch and install the new version automatically.
@@ -105,38 +106,91 @@ This plugin automatically injects delegation guidelines into OpenCode's Build an
105
106
  | "Should I use Redux or Zustand?" | @oracle |
106
107
  | "Make this dashboard look better" | @ui-planner |
107
108
 
108
- ## MCP Tools Required
109
+ ## Configuration (Optional)
110
+
111
+ You can customize agent models or disable agents by creating a config file.
109
112
 
110
- This plugin assumes you have the following MCP servers configured:
113
+ ### Config File Locations
111
114
 
112
- - `exa` - For web search and code context
113
- - `grep_app` - For GitHub code search
114
- - `sequential-thinking` - For complex reasoning
115
+ | Location | Priority | Use Case |
116
+ |----------|----------|----------|
117
+ | `~/.config/opencode/ayush-opencode.json` | Base | User-level defaults |
118
+ | `.opencode/ayush-opencode.json` | Override | Project-specific settings |
115
119
 
116
- Configure these in your `opencode.json`:
120
+ Project config overrides user config when both exist.
121
+
122
+ ### Config Options
117
123
 
118
124
  ```json
119
125
  {
120
- "mcp": {
121
- "exa": {
122
- "type": "local",
123
- "command": ["npx", "-y", "mcp-remote", "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa"],
124
- "enabled": true
125
- },
126
- "grep_app": {
127
- "type": "remote",
128
- "url": "https://mcp.grep.app",
129
- "enabled": true
130
- },
131
- "sequential-thinking": {
132
- "type": "local",
133
- "command": ["npx", "@modelcontextprotocol/server-sequential-thinking"],
134
- "enabled": true
135
- }
126
+ "agents": {
127
+ "explorer": { "model": "anthropic/claude-haiku-4-5" },
128
+ "librarian": { "model": "anthropic/claude-sonnet-4-5" },
129
+ "oracle": { "model": "openai/gpt-5.2-high" },
130
+ "ui-planner": { "model": "google/gemini-3-pro-high" }
131
+ },
132
+ "disabled_agents": [],
133
+ "disabled_mcps": []
134
+ }
135
+ ```
136
+
137
+ ### Override Models
138
+
139
+ To use different models for specific agents:
140
+
141
+ ```json
142
+ {
143
+ "agents": {
144
+ "explorer": { "model": "anthropic/claude-sonnet-4" },
145
+ "oracle": { "model": "openai/gpt-4o" }
136
146
  }
137
147
  }
138
148
  ```
139
149
 
150
+ ### Disable Agents
151
+
152
+ To disable specific agents:
153
+
154
+ ```json
155
+ {
156
+ "disabled_agents": ["oracle", "ui-planner"]
157
+ }
158
+ ```
159
+
160
+ Available agent names: `explorer`, `librarian`, `oracle`, `ui-planner`
161
+
162
+ ## Auto-Loaded MCP Servers
163
+
164
+ This plugin **automatically loads** the following MCP servers — no manual configuration needed!
165
+
166
+ | MCP Server | Type | Description |
167
+ |------------|------|-------------|
168
+ | `exa` | HTTP Streamable | Web search, code context, URL crawling (no API key required) |
169
+ | `grep_app` | Remote | GitHub code search across millions of repos |
170
+ | `sequential-thinking` | Local | Structured reasoning for complex problems |
171
+
172
+ ### How It Works
173
+
174
+ When you install this plugin, these MCP servers are automatically injected into OpenCode's config:
175
+
176
+ - **Your other MCPs are preserved** — If you have `supabase`, `memcontext`, or any custom MCPs, they continue to work
177
+ - **Conflicts use our config** — If you have `exa` configured differently, our version takes priority
178
+ - **Disable if needed** — Use `disabled_mcps` config to opt-out (see below)
179
+
180
+ ### Disable Specific MCPs
181
+
182
+ If you want to keep your own MCP config for a server we provide:
183
+
184
+ ```json
185
+ {
186
+ "disabled_mcps": ["exa"]
187
+ }
188
+ ```
189
+
190
+ Available MCP names: `exa`, `grep_app`, `sequential-thinking`
191
+
192
+ This will skip injecting our `exa` config, allowing your custom one to remain.
193
+
140
194
  ## Development
141
195
 
142
196
  ```bash
@@ -0,0 +1,2 @@
1
+ export { AyushOpenCodeConfigSchema, AgentNameSchema, AgentOverrideConfigSchema, AgentOverridesSchema, type AyushOpenCodeConfig, type AgentName, type AgentOverrideConfig, type AgentOverrides, } from "./schema";
2
+ export { loadPluginConfig } from "./loader";
@@ -0,0 +1,6 @@
1
+ import { type AyushOpenCodeConfig } from "./schema";
2
+ /**
3
+ * Load plugin configuration from user and project paths
4
+ * Project config takes priority over user config
5
+ */
6
+ export declare function loadPluginConfig(projectDirectory: string): AyushOpenCodeConfig;
@@ -0,0 +1,179 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Agent names that can be configured
4
+ */
5
+ export declare const AgentNameSchema: z.ZodEnum<["explorer", "librarian", "oracle", "ui-planner"]>;
6
+ export type AgentName = z.infer<typeof AgentNameSchema>;
7
+ /**
8
+ * Configuration for overriding an agent's settings
9
+ * Only model override is supported - keeps it simple
10
+ */
11
+ export declare const AgentOverrideConfigSchema: z.ZodObject<{
12
+ model: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ model?: string | undefined;
15
+ }, {
16
+ model?: string | undefined;
17
+ }>;
18
+ export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
19
+ /**
20
+ * Agent overrides mapping
21
+ */
22
+ export declare const AgentOverridesSchema: z.ZodObject<{
23
+ explorer: z.ZodOptional<z.ZodObject<{
24
+ model: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ model?: string | undefined;
27
+ }, {
28
+ model?: string | undefined;
29
+ }>>;
30
+ librarian: z.ZodOptional<z.ZodObject<{
31
+ model: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ model?: string | undefined;
34
+ }, {
35
+ model?: string | undefined;
36
+ }>>;
37
+ oracle: z.ZodOptional<z.ZodObject<{
38
+ model: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ model?: string | undefined;
41
+ }, {
42
+ model?: string | undefined;
43
+ }>>;
44
+ "ui-planner": z.ZodOptional<z.ZodObject<{
45
+ model: z.ZodOptional<z.ZodString>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ model?: string | undefined;
48
+ }, {
49
+ model?: string | undefined;
50
+ }>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ explorer?: {
53
+ model?: string | undefined;
54
+ } | undefined;
55
+ librarian?: {
56
+ model?: string | undefined;
57
+ } | undefined;
58
+ oracle?: {
59
+ model?: string | undefined;
60
+ } | undefined;
61
+ "ui-planner"?: {
62
+ model?: string | undefined;
63
+ } | undefined;
64
+ }, {
65
+ explorer?: {
66
+ model?: string | undefined;
67
+ } | undefined;
68
+ librarian?: {
69
+ model?: string | undefined;
70
+ } | undefined;
71
+ oracle?: {
72
+ model?: string | undefined;
73
+ } | undefined;
74
+ "ui-planner"?: {
75
+ model?: string | undefined;
76
+ } | undefined;
77
+ }>;
78
+ export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
79
+ /**
80
+ * Main configuration schema for ayush-opencode
81
+ */
82
+ export declare const AyushOpenCodeConfigSchema: z.ZodObject<{
83
+ $schema: z.ZodOptional<z.ZodString>;
84
+ agents: z.ZodOptional<z.ZodObject<{
85
+ explorer: z.ZodOptional<z.ZodObject<{
86
+ model: z.ZodOptional<z.ZodString>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ model?: string | undefined;
89
+ }, {
90
+ model?: string | undefined;
91
+ }>>;
92
+ librarian: z.ZodOptional<z.ZodObject<{
93
+ model: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ model?: string | undefined;
96
+ }, {
97
+ model?: string | undefined;
98
+ }>>;
99
+ oracle: z.ZodOptional<z.ZodObject<{
100
+ model: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ model?: string | undefined;
103
+ }, {
104
+ model?: string | undefined;
105
+ }>>;
106
+ "ui-planner": z.ZodOptional<z.ZodObject<{
107
+ model: z.ZodOptional<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ model?: string | undefined;
110
+ }, {
111
+ model?: string | undefined;
112
+ }>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ explorer?: {
115
+ model?: string | undefined;
116
+ } | undefined;
117
+ librarian?: {
118
+ model?: string | undefined;
119
+ } | undefined;
120
+ oracle?: {
121
+ model?: string | undefined;
122
+ } | undefined;
123
+ "ui-planner"?: {
124
+ model?: string | undefined;
125
+ } | undefined;
126
+ }, {
127
+ explorer?: {
128
+ model?: string | undefined;
129
+ } | undefined;
130
+ librarian?: {
131
+ model?: string | undefined;
132
+ } | undefined;
133
+ oracle?: {
134
+ model?: string | undefined;
135
+ } | undefined;
136
+ "ui-planner"?: {
137
+ model?: string | undefined;
138
+ } | undefined;
139
+ }>>;
140
+ disabled_agents: z.ZodOptional<z.ZodArray<z.ZodEnum<["explorer", "librarian", "oracle", "ui-planner"]>, "many">>;
141
+ disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodEnum<["exa", "grep_app", "sequential-thinking"]>, "many">>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ $schema?: string | undefined;
144
+ agents?: {
145
+ explorer?: {
146
+ model?: string | undefined;
147
+ } | undefined;
148
+ librarian?: {
149
+ model?: string | undefined;
150
+ } | undefined;
151
+ oracle?: {
152
+ model?: string | undefined;
153
+ } | undefined;
154
+ "ui-planner"?: {
155
+ model?: string | undefined;
156
+ } | undefined;
157
+ } | undefined;
158
+ disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
159
+ disabled_mcps?: ("exa" | "grep_app" | "sequential-thinking")[] | undefined;
160
+ }, {
161
+ $schema?: string | undefined;
162
+ agents?: {
163
+ explorer?: {
164
+ model?: string | undefined;
165
+ } | undefined;
166
+ librarian?: {
167
+ model?: string | undefined;
168
+ } | undefined;
169
+ oracle?: {
170
+ model?: string | undefined;
171
+ } | undefined;
172
+ "ui-planner"?: {
173
+ model?: string | undefined;
174
+ } | undefined;
175
+ } | undefined;
176
+ disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
177
+ disabled_mcps?: ("exa" | "grep_app" | "sequential-thinking")[] | undefined;
178
+ }>;
179
+ export type AyushOpenCodeConfig = z.infer<typeof AyushOpenCodeConfigSchema>;
package/dist/index.d.ts CHANGED
@@ -4,8 +4,12 @@
4
4
  * This plugin provides:
5
5
  * 1. Custom subagents: explorer, librarian, oracle, ui-planner
6
6
  * 2. Orchestration injection into Build/Plan agents for better delegation
7
+ * 3. Auto-loaded MCP servers: exa, grep_app, sequential-thinking
8
+ * 4. Optional configuration via ayush-opencode.json for model/MCP overrides
7
9
  */
8
10
  import type { Plugin } from "@opencode-ai/plugin";
9
11
  declare const AyushOpenCodePlugin: Plugin;
10
12
  export default AyushOpenCodePlugin;
11
13
  export type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides, } from "./agents";
14
+ export type { AyushOpenCodeConfig, AgentName, } from "./config";
15
+ export type { McpName } from "./mcp";