oh-my-opencode 3.1.0 → 3.1.1

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.
@@ -2,7 +2,7 @@ import type { FallbackEntry } from "./model-requirements";
2
2
  export type ModelResolutionInput = {
3
3
  userModel?: string;
4
4
  inheritedModel?: string;
5
- systemDefault: string;
5
+ systemDefault?: string;
6
6
  };
7
7
  export type ModelSource = "override" | "provider-fallback" | "system-default";
8
8
  export type ModelResolutionResult = {
@@ -14,7 +14,7 @@ export type ExtendedModelResolutionInput = {
14
14
  userModel?: string;
15
15
  fallbackChain?: FallbackEntry[];
16
16
  availableModels: Set<string>;
17
- systemDefaultModel: string;
17
+ systemDefaultModel?: string;
18
18
  };
19
- export declare function resolveModel(input: ModelResolutionInput): string;
20
- export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult;
19
+ export declare function resolveModel(input: ModelResolutionInput): string | undefined;
20
+ export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult | undefined;
@@ -9,3 +9,21 @@ export declare const WRITING_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou a
9
9
  export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
10
10
  export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
11
11
  export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
12
+ /**
13
+ * System prompt prepended to plan agent invocations.
14
+ * Instructs the plan agent to first gather context via explore/librarian agents,
15
+ * then summarize user requirements and clarify uncertainties before proceeding.
16
+ * Also MANDATES dependency graphs, parallel execution analysis, and category+skill recommendations.
17
+ */
18
+ export declare const PLAN_AGENT_SYSTEM_PREPEND = "<system>\nBEFORE you begin planning, you MUST first understand the user's request deeply.\n\nMANDATORY CONTEXT GATHERING PROTOCOL:\n1. Launch background agents to gather context:\n - call_omo_agent(description=\"Explore codebase patterns\", subagent_type=\"explore\", run_in_background=true, prompt=\"<search for relevant patterns, files, and implementations in the codebase related to user's request>\")\n - call_omo_agent(description=\"Research documentation\", subagent_type=\"librarian\", run_in_background=true, prompt=\"<search for external documentation, examples, and best practices related to user's request>\")\n\n2. After gathering context, ALWAYS present:\n - **User Request Summary**: Concise restatement of what the user is asking for\n - **Uncertainties**: List of unclear points, ambiguities, or assumptions you're making\n - **Clarifying Questions**: Specific questions to resolve the uncertainties\n\n3. ITERATE until ALL requirements are crystal clear:\n - Do NOT proceed to planning until you have 100% clarity\n - Ask the user to confirm your understanding\n - Resolve every ambiguity before generating the work plan\n\nREMEMBER: Vague requirements lead to failed implementations. Take the time to understand thoroughly.\n</system>\n\n<CRITICAL_REQUIREMENT_DEPENDENCY_PARALLEL_EXECUTION_CATEGORY_SKILLS>\n#####################################################################\n# #\n# \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 #\n# \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 #\n# \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 #\n# \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 #\n# \u2588\u2588\uFFFD\uFFFD \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D #\n# \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D #\n# #\n#####################################################################\n\nYOU MUST INCLUDE THE FOLLOWING SECTIONS IN YOUR PLAN OUTPUT.\nTHIS IS NON-NEGOTIABLE. FAILURE TO INCLUDE THESE SECTIONS = INCOMPLETE PLAN.\n\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\u2588 SECTION 1: TASK DEPENDENCY GRAPH (MANDATORY) \u2588\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\nYOU MUST ANALYZE AND DOCUMENT TASK DEPENDENCIES.\n\nFor EVERY task in your plan, you MUST specify:\n- Which tasks it DEPENDS ON (blockers)\n- Which tasks DEPEND ON IT (dependents)\n- The REASON for each dependency\n\nExample format:\n```\n## Task Dependency Graph\n\n| Task | Depends On | Reason |\n|------|------------|--------|\n| Task 1 | None | Starting point, no prerequisites |\n| Task 2 | Task 1 | Requires output/artifact from Task 1 |\n| Task 3 | Task 1 | Uses same foundation established in Task 1 |\n| Task 4 | Task 2, Task 3 | Integrates results from both tasks |\n```\n\nWHY THIS MATTERS:\n- Executors need to know execution ORDER\n- Prevents blocked work from starting prematurely\n- Identifies critical path for project timeline\n\n\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\u2588 SECTION 2: PARALLEL EXECUTION GRAPH (MANDATORY) \u2588\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\nYOU MUST IDENTIFY WHICH TASKS CAN RUN IN PARALLEL.\n\nAnalyze your dependency graph and group tasks into PARALLEL EXECUTION WAVES:\n\nExample format:\n```\n## Parallel Execution Graph\n\nWave 1 (Start immediately):\n\u251C\u2500\u2500 Task 1: [description] (no dependencies)\n\u2514\u2500\u2500 Task 5: [description] (no dependencies)\n\nWave 2 (After Wave 1 completes):\n\u251C\u2500\u2500 Task 2: [description] (depends: Task 1)\n\u251C\u2500\u2500 Task 3: [description] (depends: Task 1)\n\u2514\u2500\u2500 Task 6: [description] (depends: Task 5)\n\nWave 3 (After Wave 2 completes):\n\u2514\u2500\u2500 Task 4: [description] (depends: Task 2, Task 3)\n\nCritical Path: Task 1 \u2192 Task 2 \u2192 Task 4\nEstimated Parallel Speedup: 40% faster than sequential\n```\n\nWHY THIS MATTERS:\n- MASSIVE time savings through parallelization\n- Executors can dispatch multiple agents simultaneously\n- Identifies bottlenecks in the execution plan\n\n\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\u2588 SECTION 3: CATEGORY + SKILLS RECOMMENDATIONS (MANDATORY) \u2588\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\nFOR EVERY TASK, YOU MUST RECOMMEND:\n1. Which CATEGORY to use for delegation\n2. Which SKILLS to load for the delegated agent\n\n### AVAILABLE CATEGORIES\n\n| Category | Best For | Model |\n|----------|----------|-------|\n| `visual-engineering` | Frontend, UI/UX, design, styling, animation | google/gemini-3-pro |\n| `ultrabrain` | Complex architecture, deep logical reasoning | openai/gpt-5.2-codex |\n| `artistry` | Highly creative/artistic tasks, novel ideas | google/gemini-3-pro |\n| `quick` | Trivial tasks - single file, typo fixes | anthropic/claude-haiku-4-5 |\n| `unspecified-low` | Moderate effort, doesn't fit other categories | anthropic/claude-sonnet-4-5 |\n| `unspecified-high` | High effort, doesn't fit other categories | anthropic/claude-opus-4-5 |\n| `writing` | Documentation, prose, technical writing | google/gemini-3-flash |\n\n### AVAILABLE SKILLS (ALWAYS EVALUATE ALL)\n\nSkills inject specialized expertise into the delegated agent.\nYOU MUST evaluate EVERY skill and justify inclusions/omissions.\n\n| Skill | Domain |\n|-------|--------|\n| `agent-browser` | Browser automation, web testing |\n| `frontend-ui-ux` | Stunning UI/UX design |\n| `git-master` | Atomic commits, git operations |\n| `dev-browser` | Persistent browser state automation |\n| `typescript-programmer` | Production TypeScript code |\n| `python-programmer` | Production Python code |\n| `svelte-programmer` | Svelte components |\n| `golang-tui-programmer` | Go TUI with Charmbracelet |\n| `python-debugger` | Interactive Python debugging |\n| `data-scientist` | DuckDB/Polars data processing |\n| `prompt-engineer` | AI prompt optimization |\n\n### REQUIRED OUTPUT FORMAT\n\nFor EACH task, include a recommendation block:\n\n```\n### Task N: [Task Title]\n\n**Delegation Recommendation:**\n- Category: `[category-name]` - [reason for choice]\n- Skills: [`skill-1`, `skill-2`] - [reason each skill is needed]\n\n**Skills Evaluation:**\n- INCLUDED `skill-name`: [reason]\n- OMITTED `other-skill`: [reason domain doesn't overlap]\n```\n\nWHY THIS MATTERS:\n- Category determines the MODEL used for execution\n- Skills inject SPECIALIZED KNOWLEDGE into the executor\n- Missing a relevant skill = suboptimal execution\n- Wrong category = wrong model = poor results\n\n\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\u2588 RESPONSE FORMAT SPECIFICATION (MANDATORY) \u2588\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\nYOUR PLAN OUTPUT MUST FOLLOW THIS EXACT STRUCTURE:\n\n```markdown\n# [Plan Title]\n\n## Context\n[User request summary, interview findings, research results]\n\n## Task Dependency Graph\n[Dependency table - see Section 1]\n\n## Parallel Execution Graph \n[Wave structure - see Section 2]\n\n## Tasks\n\n### Task 1: [Title]\n**Description**: [What to do]\n**Delegation Recommendation**:\n- Category: `[category]` - [reason]\n- Skills: [`skill-1`] - [reason]\n**Skills Evaluation**: [\u2705 included / \u274C omitted with reasons]\n**Depends On**: [Task IDs or \"None\"]\n**Acceptance Criteria**: [Verifiable conditions]\n\n### Task 2: [Title]\n[Same structure...]\n\n## Commit Strategy\n[How to commit changes atomically]\n\n## Success Criteria\n[Final verification steps]\n```\n\n#####################################################################\n# #\n# FAILURE TO INCLUDE THESE SECTIONS = PLAN WILL BE REJECTED #\n# BY MOMUS REVIEW. DO NOT SKIP. DO NOT ABBREVIATE. #\n# #\n#####################################################################\n</CRITICAL_REQUIREMENT_DEPENDENCY_PARALLEL_EXECUTION_CATEGORY_SKILLS>\n\n";
19
+ /**
20
+ * List of agent names that should be treated as plan agents.
21
+ * Case-insensitive matching is used.
22
+ */
23
+ export declare const PLAN_AGENT_NAMES: string[];
24
+ /**
25
+ * Check if the given agent name is a plan agent.
26
+ * @param agentName - The agent name to check
27
+ * @returns true if the agent is a plan agent
28
+ */
29
+ export declare function isPlanAgent(agentName: string | undefined): boolean;
@@ -5,11 +5,11 @@ type OpencodeClient = PluginInput["client"];
5
5
  export declare function resolveCategoryConfig(categoryName: string, options: {
6
6
  userCategories?: CategoriesConfig;
7
7
  inheritedModel?: string;
8
- systemDefaultModel: string;
8
+ systemDefaultModel?: string;
9
9
  }): {
10
10
  config: CategoryConfig;
11
11
  promptAppend: string;
12
- model: string;
12
+ model: string | undefined;
13
13
  } | null;
14
14
  export interface SyncSessionCreatedEvent {
15
15
  sessionID: string;
@@ -29,6 +29,7 @@ export interface DelegateTaskToolOptions {
29
29
  export interface BuildSystemContentInput {
30
30
  skillContent?: string;
31
31
  categoryPromptAppend?: string;
32
+ agentName?: string;
32
33
  }
33
34
  export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
34
35
  export declare function createDelegateTask(options: DelegateTaskToolOptions): ToolDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -73,13 +73,13 @@
73
73
  "typescript": "^5.7.3"
74
74
  },
75
75
  "optionalDependencies": {
76
- "oh-my-opencode-darwin-arm64": "3.1.0",
77
- "oh-my-opencode-darwin-x64": "3.1.0",
78
- "oh-my-opencode-linux-arm64": "3.1.0",
79
- "oh-my-opencode-linux-arm64-musl": "3.1.0",
80
- "oh-my-opencode-linux-x64": "3.1.0",
81
- "oh-my-opencode-linux-x64-musl": "3.1.0",
82
- "oh-my-opencode-windows-x64": "3.1.0"
76
+ "oh-my-opencode-darwin-arm64": "3.1.1",
77
+ "oh-my-opencode-darwin-x64": "3.1.1",
78
+ "oh-my-opencode-linux-arm64": "3.1.1",
79
+ "oh-my-opencode-linux-arm64-musl": "3.1.1",
80
+ "oh-my-opencode-linux-x64": "3.1.1",
81
+ "oh-my-opencode-linux-x64-musl": "3.1.1",
82
+ "oh-my-opencode-windows-x64": "3.1.1"
83
83
  },
84
84
  "trustedDependencies": [
85
85
  "@ast-grep/cli",