ayush-opencode 0.1.2 → 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.
@@ -128,7 +129,8 @@ Project config overrides user config when both exist.
128
129
  "oracle": { "model": "openai/gpt-5.2-high" },
129
130
  "ui-planner": { "model": "google/gemini-3-pro-high" }
130
131
  },
131
- "disabled_agents": []
132
+ "disabled_agents": [],
133
+ "disabled_mcps": []
132
134
  }
133
135
  ```
134
136
 
@@ -157,38 +159,38 @@ To disable specific agents:
157
159
 
158
160
  Available agent names: `explorer`, `librarian`, `oracle`, `ui-planner`
159
161
 
160
- ## MCP Tools Required
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
161
173
 
162
- This plugin assumes you have the following MCP servers configured:
174
+ When you install this plugin, these MCP servers are automatically injected into OpenCode's config:
163
175
 
164
- - `exa` - For web search and code context
165
- - `grep_app` - For GitHub code search
166
- - `sequential-thinking` - For complex reasoning
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)
167
179
 
168
- Configure these in your `opencode.json`:
180
+ ### Disable Specific MCPs
181
+
182
+ If you want to keep your own MCP config for a server we provide:
169
183
 
170
184
  ```json
171
185
  {
172
- "mcp": {
173
- "exa": {
174
- "type": "local",
175
- "command": ["npx", "-y", "mcp-remote", "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa"],
176
- "enabled": true
177
- },
178
- "grep_app": {
179
- "type": "remote",
180
- "url": "https://mcp.grep.app",
181
- "enabled": true
182
- },
183
- "sequential-thinking": {
184
- "type": "local",
185
- "command": ["npx", "@modelcontextprotocol/server-sequential-thinking"],
186
- "enabled": true
187
- }
188
- }
186
+ "disabled_mcps": ["exa"]
189
187
  }
190
188
  ```
191
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
+
192
194
  ## Development
193
195
 
194
196
  ```bash
@@ -138,6 +138,7 @@ export declare const AyushOpenCodeConfigSchema: z.ZodObject<{
138
138
  } | undefined;
139
139
  }>>;
140
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">>;
141
142
  }, "strip", z.ZodTypeAny, {
142
143
  $schema?: string | undefined;
143
144
  agents?: {
@@ -155,6 +156,7 @@ export declare const AyushOpenCodeConfigSchema: z.ZodObject<{
155
156
  } | undefined;
156
157
  } | undefined;
157
158
  disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
159
+ disabled_mcps?: ("exa" | "grep_app" | "sequential-thinking")[] | undefined;
158
160
  }, {
159
161
  $schema?: string | undefined;
160
162
  agents?: {
@@ -172,5 +174,6 @@ export declare const AyushOpenCodeConfigSchema: z.ZodObject<{
172
174
  } | undefined;
173
175
  } | undefined;
174
176
  disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
177
+ disabled_mcps?: ("exa" | "grep_app" | "sequential-thinking")[] | undefined;
175
178
  }>;
176
179
  export type AyushOpenCodeConfig = z.infer<typeof AyushOpenCodeConfigSchema>;
package/dist/index.d.ts CHANGED
@@ -4,10 +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. Optional configuration via ayush-opencode.json for model overrides
7
+ * 3. Auto-loaded MCP servers: exa, grep_app, sequential-thinking
8
+ * 4. Optional configuration via ayush-opencode.json for model/MCP overrides
8
9
  */
9
10
  import type { Plugin } from "@opencode-ai/plugin";
10
11
  declare const AyushOpenCodePlugin: Plugin;
11
12
  export default AyushOpenCodePlugin;
12
13
  export type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides, } from "./agents";
13
14
  export type { AyushOpenCodeConfig, AgentName, } from "./config";
15
+ export type { McpName } from "./mcp";
package/dist/index.js CHANGED
@@ -4618,6 +4618,13 @@ var coerce = {
4618
4618
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
4619
4619
  };
4620
4620
  var NEVER = INVALID;
4621
+ // src/mcp/types.ts
4622
+ var McpNameSchema = exports_external.enum([
4623
+ "exa",
4624
+ "grep_app",
4625
+ "sequential-thinking"
4626
+ ]);
4627
+
4621
4628
  // src/config/schema.ts
4622
4629
  var AgentNameSchema = exports_external.enum([
4623
4630
  "explorer",
@@ -4637,7 +4644,8 @@ var AgentOverridesSchema = exports_external.object({
4637
4644
  var AyushOpenCodeConfigSchema = exports_external.object({
4638
4645
  $schema: exports_external.string().optional(),
4639
4646
  agents: AgentOverridesSchema.optional(),
4640
- disabled_agents: exports_external.array(AgentNameSchema).optional()
4647
+ disabled_agents: exports_external.array(AgentNameSchema).optional(),
4648
+ disabled_mcps: exports_external.array(McpNameSchema).optional()
4641
4649
  });
4642
4650
  // src/config/loader.ts
4643
4651
  import * as fs from "fs";
@@ -4691,10 +4699,53 @@ function loadPluginConfig(projectDirectory) {
4691
4699
  }
4692
4700
  return config;
4693
4701
  }
4702
+ // src/mcp/exa.ts
4703
+ var exa = {
4704
+ type: "local",
4705
+ command: [
4706
+ "npx",
4707
+ "-y",
4708
+ "mcp-remote",
4709
+ "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa"
4710
+ ],
4711
+ enabled: true
4712
+ };
4713
+
4714
+ // src/mcp/grep-app.ts
4715
+ var grep_app = {
4716
+ type: "remote",
4717
+ url: "https://mcp.grep.app",
4718
+ enabled: true
4719
+ };
4720
+
4721
+ // src/mcp/sequential-thinking.ts
4722
+ var sequentialThinking = {
4723
+ type: "local",
4724
+ command: ["npx", "-y", "@modelcontextprotocol/server-sequential-thinking"],
4725
+ enabled: true
4726
+ };
4727
+
4728
+ // src/mcp/index.ts
4729
+ var allBuiltinMcps = {
4730
+ exa,
4731
+ grep_app,
4732
+ "sequential-thinking": sequentialThinking
4733
+ };
4734
+ function createBuiltinMcps(disabledMcps = []) {
4735
+ const mcps = {};
4736
+ for (const [name, config] of Object.entries(allBuiltinMcps)) {
4737
+ if (!disabledMcps.includes(name)) {
4738
+ mcps[name] = config;
4739
+ }
4740
+ }
4741
+ return mcps;
4742
+ }
4743
+
4694
4744
  // src/index.ts
4695
4745
  var AyushOpenCodePlugin = async (ctx) => {
4696
4746
  const pluginConfig = loadPluginConfig(ctx.directory);
4697
4747
  const disabledAgents = new Set(pluginConfig.disabled_agents ?? []);
4748
+ const disabledMcps = pluginConfig.disabled_mcps ?? [];
4698
4749
  const applyModelOverride = (agentName, baseAgent) => {
4699
4750
  const override = pluginConfig.agents?.[agentName];
4700
4751
  if (override?.model) {
@@ -4725,6 +4776,11 @@ var AyushOpenCodePlugin = async (ctx) => {
4725
4776
  const existingPrompt = config.agent.plan.prompt ?? "";
4726
4777
  config.agent.plan.prompt = existingPrompt + ORCHESTRATION_PROMPT;
4727
4778
  }
4779
+ const builtinMcps = createBuiltinMcps(disabledMcps);
4780
+ config.mcp = {
4781
+ ...config.mcp,
4782
+ ...builtinMcps
4783
+ };
4728
4784
  }
4729
4785
  };
4730
4786
  };
@@ -0,0 +1,12 @@
1
+ import type { LocalMcpServerConfig } from "./types";
2
+ /**
3
+ * Exa MCP Server - Web search and code context
4
+ *
5
+ * Provides tools:
6
+ * - exa_web_search_exa: Web search via Exa AI
7
+ * - exa_get_code_context_exa: Code context for APIs/libraries
8
+ * - exa_crawling_exa: URL content extraction
9
+ *
10
+ * HTTP Streamable via mcp-remote - No API key required!
11
+ */
12
+ export declare const exa: LocalMcpServerConfig;
@@ -0,0 +1,10 @@
1
+ import type { RemoteMcpServerConfig } from "./types";
2
+ /**
3
+ * grep.app MCP Server - GitHub code search
4
+ *
5
+ * Provides tools:
6
+ * - grep_app_searchGitHub: Search real-world code examples from GitHub
7
+ *
8
+ * Remote MCP - No API key required!
9
+ */
10
+ export declare const grep_app: RemoteMcpServerConfig;
@@ -0,0 +1,10 @@
1
+ import type { McpName } from "./types";
2
+ export { McpNameSchema, type McpName } from "./types";
3
+ export type { McpServerConfig, LocalMcpServerConfig, RemoteMcpServerConfig } from "./types";
4
+ /**
5
+ * Creates the MCP server configurations, excluding any disabled MCPs
6
+ *
7
+ * @param disabledMcps - Array of MCP names to disable
8
+ * @returns Record of enabled MCP server configurations
9
+ */
10
+ export declare function createBuiltinMcps(disabledMcps?: McpName[]): Record<string, import("./types").LocalMcpServerConfig | import("./types").RemoteMcpServerConfig>;
@@ -0,0 +1,13 @@
1
+ import type { LocalMcpServerConfig } from "./types";
2
+ /**
3
+ * Sequential Thinking MCP Server - Structured reasoning
4
+ *
5
+ * Provides tools:
6
+ * - sequential-thinking_sequentialthinking: Dynamic problem-solving through thoughts
7
+ *
8
+ * Useful for:
9
+ * - Breaking down complex problems
10
+ * - Multi-step planning with revision capability
11
+ * - Architecture decisions and analysis
12
+ */
13
+ export declare const sequentialThinking: LocalMcpServerConfig;
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * MCP Server names that can be configured/disabled
4
+ */
5
+ export declare const McpNameSchema: z.ZodEnum<["exa", "grep_app", "sequential-thinking"]>;
6
+ export type McpName = z.infer<typeof McpNameSchema>;
7
+ /**
8
+ * Local MCP server configuration (spawns a process)
9
+ */
10
+ export interface LocalMcpServerConfig {
11
+ type: "local";
12
+ command: string[];
13
+ enabled: boolean;
14
+ }
15
+ /**
16
+ * Remote MCP server configuration (connects to URL)
17
+ */
18
+ export interface RemoteMcpServerConfig {
19
+ type: "remote";
20
+ url: string;
21
+ enabled: boolean;
22
+ }
23
+ /**
24
+ * Union type for all MCP server configurations
25
+ */
26
+ export type McpServerConfig = LocalMcpServerConfig | RemoteMcpServerConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ayush-opencode",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Custom OpenCode agents (explorer, librarian, oracle, ui-planner) with orchestration injection for Build/Plan agents",
5
5
  "author": "Ayush",
6
6
  "license": "MIT",