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.
@@ -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;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Orchestration prompt to inject into Build and Plan agents.
3
- * This teaches the primary agents how to delegate to specialized subagents.
3
+ * This teaches the primary agents how to delegate to specialized subagents using the Task tool.
4
4
  */
5
- export declare const ORCHESTRATION_PROMPT = "\n\n---\n\n## Sub-Agent Orchestration\n\nYou have specialized agents available. **Proactively delegate** to maximize efficiency.\n\n### Trigger Patterns (Fire Immediately)\n\n| When You See... | Fire Agent | Why |\n|-----------------|------------|-----|\n| \"Where is X?\", \"Find Y\", locate code | `@explorer` | Codebase search specialist |\n| External library, unfamiliar API, \"how does X work?\" | `@librarian` | Searches docs, GitHub, OSS examples |\n| 2+ modules involved, cross-cutting concerns | `@explorer` | Multi-file pattern discovery |\n| Architecture decision, trade-offs, \"should I use X or Y?\" | `@oracle` | Deep reasoning advisor |\n| Visual/styling work, UI/UX, CSS, animations | `@ui-planner` | Designer-developer hybrid |\n| After 2+ failed fix attempts | `@oracle` | Debugging escalation |\n\n### Parallel Execution (Default Behavior)\n\nFire multiple agents simultaneously for broad tasks. Don't wait sequentially.\n\n```\n// CORRECT: Parallel background execution\n@explorer \u2192 \"Find auth implementations in codebase\"\n@librarian \u2192 \"Find JWT best practices in official docs\"\n// Continue working immediately while they search\n\n// WRONG: Sequential blocking\nWait for @explorer... then @librarian... (wastes time)\n```\n\n### Delegation Priority\n\n1. **@explorer FIRST** \u2014 Always locate code before modifying unfamiliar areas\n2. **@librarian** \u2014 When dealing with external libraries, APIs, or frameworks you don't fully understand\n3. **@oracle** \u2014 For complex decisions, code review, or after repeated failures\n4. **@ui-planner** \u2014 For ANY visual/styling work (never touch CSS/UI yourself)\n\n### Agent Capabilities\n\n| Agent | Strength | Cost |\n|-------|----------|------|\n| `@explorer` | Fast codebase grep, file discovery, pattern matching | Cheap |\n| `@librarian` | External docs, GitHub search, OSS examples, permalinks | Cheap |\n| `@oracle` | Architecture, debugging, trade-offs, code review | Expensive |\n| `@ui-planner` | Visual design, animations, beautiful interfaces | Medium |\n\n### When to Handle Directly\n\n- Single file edits with known location\n- Questions answerable from code already in context\n- Trivial changes requiring no specialist knowledge\n\n### Critical Rules\n\n1. **Never touch frontend visual/styling code yourself** \u2014 Always delegate to `@ui-planner`\n2. **Fire @librarian proactively** when unfamiliar libraries are involved\n3. **Consult @oracle before major architectural decisions**, not after\n4. **Verify delegated work** before marking complete\n";
5
+ export declare const ORCHESTRATION_PROMPT = "\n\n---\n\n## Sub-Agent Delegation\n\nYou have specialized subagents. Use the **Task tool** to delegate work proactively.\n\n### Available Agents\n\n| Agent | Use For | subagent_type |\n|-------|---------|---------------|\n| **Explorer** | Codebase search, \"Where is X?\", file discovery, pattern matching | `explorer` |\n| **Librarian** | External docs, library research, OSS examples, GitHub permalinks | `librarian` |\n| **Oracle** | Architecture decisions, debugging strategy, trade-offs, code review | `oracle` |\n| **UI Planner** | Visual design, CSS, animations, UI/UX, beautiful interfaces | `ui-planner` |\n\n### When to Delegate (Fire Immediately)\n\n| Trigger | subagent_type | Why |\n|---------|---------------|-----|\n| \"Where is X?\", \"Find Y\", locate code | `explorer` | Fast codebase search |\n| External library, \"how does X library work?\" | `librarian` | Searches docs, GitHub, OSS |\n| 2+ modules involved, cross-cutting concerns | `explorer` | Multi-file pattern discovery |\n| Architecture decision, \"should I use X or Y?\" | `oracle` | Deep reasoning advisor |\n| Visual/styling, CSS, animations, UI/UX | `ui-planner` | Designer-developer hybrid |\n| After 2+ failed fix attempts | `oracle` | Debugging escalation |\n\n### How to Delegate\n\nUse the Task tool with these parameters:\n\n```\nTask(\n subagent_type: \"explorer\" | \"librarian\" | \"oracle\" | \"ui-planner\",\n description: \"Short 3-5 word task description\",\n prompt: \"Detailed instructions for the agent\"\n)\n```\n\n**Example delegations:**\n\n```\n// Find code in codebase\nTask(\n subagent_type: \"explorer\",\n description: \"Find auth middleware\",\n prompt: \"Find all authentication middleware implementations in this codebase. Return file paths and explain the auth flow.\"\n)\n\n// Research external library\nTask(\n subagent_type: \"librarian\",\n description: \"React Query caching docs\",\n prompt: \"How does React Query handle caching? Find official documentation and real-world examples with GitHub permalinks.\"\n)\n\n// Architecture decision\nTask(\n subagent_type: \"oracle\",\n description: \"Redux vs Zustand analysis\",\n prompt: \"Analyze trade-offs between Redux and Zustand for this project. Consider bundle size, learning curve, and our existing patterns.\"\n)\n\n// UI/Visual work\nTask(\n subagent_type: \"ui-planner\",\n description: \"Redesign dashboard cards\",\n prompt: \"Redesign the dashboard stat cards to be more visually appealing. Use modern aesthetics, subtle animations, and ensure responsive design.\"\n)\n```\n\n### Parallel Execution\n\nTo run multiple agents in parallel, call multiple Task tools in the **same response message**:\n\n```\n// CORRECT: Multiple Task calls in ONE message = parallel execution\nTask(subagent_type: \"explorer\", description: \"Find auth code\", prompt: \"...\")\nTask(subagent_type: \"librarian\", description: \"JWT best practices\", prompt: \"...\")\n// Both run simultaneously\n\n// WRONG: One Task per message = sequential (slow)\nMessage 1: Task(...) \u2192 wait for result\nMessage 2: Task(...) \u2192 wait for result\n```\n\n### Delegation Priority\n\n1. **Explorer FIRST** \u2014 Always locate code before modifying unfamiliar areas\n2. **Librarian** \u2014 When dealing with external libraries/APIs you don't fully understand\n3. **Oracle** \u2014 For complex decisions or after 2+ failed fix attempts\n4. **UI Planner** \u2014 For ANY visual/styling work (never edit CSS/UI yourself)\n\n### Critical Rules\n\n1. **Never touch frontend visual/styling code yourself** \u2014 Always delegate to `ui-planner`\n2. **Fire librarian proactively** when unfamiliar libraries are involved\n3. **Consult oracle BEFORE major architectural decisions**, not after\n4. **Verify delegated work** before marking task complete\n\n### When to Handle Directly (Don't Delegate)\n\n- Single file edits with known location\n- Questions answerable from code already in context\n- Trivial changes requiring no specialist knowledge\n- Tasks you can complete faster than explaining to an agent\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ayush-opencode",
3
- "version": "0.1.1",
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",
@@ -42,7 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@opencode-ai/plugin": "^1.0.162",
45
- "@opencode-ai/sdk": "^1.0.162"
45
+ "@opencode-ai/sdk": "^1.0.162",
46
+ "zod": "^3.24.1"
46
47
  },
47
48
  "devDependencies": {
48
49
  "bun-types": "latest",