oh-my-opencode 3.0.0-beta.8 → 3.0.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.
Files changed (126) hide show
  1. package/README.ja.md +52 -811
  2. package/README.ko.md +377 -0
  3. package/README.md +61 -940
  4. package/README.zh-cn.md +53 -935
  5. package/dist/agents/atlas.d.ts +19 -0
  6. package/dist/agents/{sisyphus-prompt-builder.d.ts → dynamic-agent-prompt-builder.d.ts} +10 -6
  7. package/dist/agents/explore.d.ts +1 -2
  8. package/dist/agents/index.d.ts +9 -3
  9. package/dist/agents/librarian.d.ts +1 -2
  10. package/dist/agents/metis.d.ts +1 -2
  11. package/dist/agents/momus.d.ts +15 -3
  12. package/dist/agents/multimodal-looker.d.ts +1 -2
  13. package/dist/agents/oracle.d.ts +1 -2
  14. package/dist/agents/prometheus-prompt.d.ts +1 -1
  15. package/dist/agents/sisyphus-junior.d.ts +1 -2
  16. package/dist/agents/sisyphus.d.ts +2 -3
  17. package/dist/agents/types.d.ts +2 -2
  18. package/dist/agents/utils.d.ts +5 -4
  19. package/dist/cli/doctor/checks/dependencies.d.ts +1 -1
  20. package/dist/cli/doctor/checks/index.d.ts +1 -0
  21. package/dist/cli/doctor/checks/model-resolution.d.ts +33 -0
  22. package/dist/cli/doctor/checks/opencode.d.ts +5 -1
  23. package/dist/cli/doctor/constants.d.ts +1 -0
  24. package/dist/cli/index.js +988 -420
  25. package/dist/cli/model-fallback.d.ts +18 -0
  26. package/dist/cli/types.d.ts +9 -3
  27. package/dist/config/schema.d.ts +217 -421
  28. package/dist/features/background-agent/concurrency.d.ts +17 -0
  29. package/dist/features/background-agent/manager.d.ts +34 -5
  30. package/dist/features/background-agent/types.d.ts +7 -4
  31. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  32. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
  33. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  34. package/dist/features/builtin-commands/types.d.ts +1 -1
  35. package/dist/features/claude-code-session-state/state.d.ts +2 -1
  36. package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
  37. package/dist/features/context-injector/index.d.ts +1 -1
  38. package/dist/features/opencode-skill-loader/skill-content.d.ts +1 -0
  39. package/dist/features/skill-mcp-manager/manager.d.ts +1 -0
  40. package/dist/features/task-toast-manager/manager.d.ts +1 -0
  41. package/dist/features/task-toast-manager/types.d.ts +3 -0
  42. package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
  43. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
  44. package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +1 -2
  45. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +0 -5
  46. package/dist/hooks/{sisyphus-orchestrator → atlas}/index.d.ts +3 -3
  47. package/dist/hooks/atlas/index.test.d.ts +1 -0
  48. package/dist/hooks/auto-update-checker/constants.d.ts +0 -3
  49. package/dist/hooks/compaction-context-injector/index.d.ts +7 -1
  50. package/dist/hooks/{sisyphus-task-retry → delegate-task-retry}/index.d.ts +4 -4
  51. package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
  52. package/dist/hooks/index.d.ts +3 -5
  53. package/dist/hooks/prometheus-md-only/constants.d.ts +2 -1
  54. package/dist/hooks/question-label-truncator/index.d.ts +7 -0
  55. package/dist/hooks/question-label-truncator/index.test.d.ts +1 -0
  56. package/dist/hooks/ralph-loop/index.d.ts +1 -0
  57. package/dist/hooks/ralph-loop/types.d.ts +1 -0
  58. package/dist/index.js +13920 -14528
  59. package/dist/index.test.d.ts +1 -0
  60. package/dist/mcp/context7.d.ts +1 -0
  61. package/dist/mcp/grep-app.d.ts +1 -0
  62. package/dist/mcp/index.d.ts +1 -0
  63. package/dist/mcp/websearch.d.ts +1 -0
  64. package/dist/plugin-handlers/config-handler.d.ts +1 -0
  65. package/dist/shared/agent-config-integration.test.d.ts +1 -0
  66. package/dist/shared/agent-display-names.d.ts +12 -0
  67. package/dist/shared/agent-display-names.test.d.ts +1 -0
  68. package/dist/shared/agent-tool-restrictions.d.ts +7 -0
  69. package/dist/shared/case-insensitive.d.ts +24 -0
  70. package/dist/shared/case-insensitive.test.d.ts +1 -0
  71. package/dist/shared/config-path.d.ts +1 -5
  72. package/dist/shared/index.d.ts +6 -0
  73. package/dist/shared/migration.d.ts +15 -1
  74. package/dist/shared/model-availability.d.ts +8 -0
  75. package/dist/shared/model-availability.test.d.ts +1 -0
  76. package/dist/shared/model-requirements.d.ts +11 -0
  77. package/dist/shared/model-requirements.test.d.ts +1 -0
  78. package/dist/shared/model-resolver.d.ts +20 -0
  79. package/dist/shared/model-resolver.test.d.ts +1 -0
  80. package/dist/shared/opencode-version.d.ts +6 -3
  81. package/dist/shared/permission-compat.d.ts +22 -9
  82. package/dist/shared/system-directive.d.ts +31 -0
  83. package/dist/tools/delegate-task/constants.d.ts +11 -0
  84. package/dist/tools/{sisyphus-task → delegate-task}/index.d.ts +1 -1
  85. package/dist/tools/{sisyphus-task → delegate-task}/tools.d.ts +13 -3
  86. package/dist/tools/delegate-task/tools.test.d.ts +1 -0
  87. package/dist/tools/{sisyphus-task → delegate-task}/types.d.ts +2 -2
  88. package/dist/tools/index.d.ts +1 -1
  89. package/dist/tools/interactive-bash/constants.d.ts +1 -1
  90. package/dist/tools/lsp/client.d.ts +4 -0
  91. package/dist/tools/lsp/config.test.d.ts +1 -0
  92. package/dist/tools/lsp/constants.d.ts +3 -0
  93. package/dist/tools/lsp/index.d.ts +1 -1
  94. package/dist/tools/lsp/tools.d.ts +3 -1
  95. package/dist/tools/lsp/types.d.ts +23 -0
  96. package/dist/tools/lsp/utils.d.ts +5 -1
  97. package/dist/tools/skill/types.d.ts +4 -1
  98. package/package.json +8 -12
  99. package/dist/agents/build-prompt.d.ts +0 -31
  100. package/dist/agents/document-writer.d.ts +0 -5
  101. package/dist/agents/frontend-ui-ux-engineer.d.ts +0 -5
  102. package/dist/agents/orchestrator-sisyphus.d.ts +0 -20
  103. package/dist/agents/plan-prompt.d.ts +0 -64
  104. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-executor.d.ts +0 -3
  105. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +0 -7
  106. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +0 -2
  107. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +0 -6
  108. package/dist/hooks/comment-checker/constants.d.ts +0 -3
  109. package/dist/hooks/comment-checker/filters/bdd.d.ts +0 -2
  110. package/dist/hooks/comment-checker/filters/directive.d.ts +0 -2
  111. package/dist/hooks/comment-checker/filters/docstring.d.ts +0 -2
  112. package/dist/hooks/comment-checker/filters/index.d.ts +0 -7
  113. package/dist/hooks/comment-checker/filters/shebang.d.ts +0 -2
  114. package/dist/hooks/comment-checker/output/formatter.d.ts +0 -2
  115. package/dist/hooks/comment-checker/output/index.d.ts +0 -2
  116. package/dist/hooks/comment-checker/output/xml-builder.d.ts +0 -2
  117. package/dist/hooks/empty-message-sanitizer/index.d.ts +0 -12
  118. package/dist/hooks/preemptive-compaction/constants.d.ts +0 -3
  119. package/dist/hooks/preemptive-compaction/index.d.ts +0 -24
  120. package/dist/hooks/preemptive-compaction/types.d.ts +0 -17
  121. package/dist/tools/ast-grep/napi.d.ts +0 -13
  122. package/dist/tools/interactive-bash/types.d.ts +0 -3
  123. package/dist/tools/sisyphus-task/constants.d.ts +0 -12
  124. /package/dist/{hooks/sisyphus-orchestrator/index.test.d.ts → cli/doctor/checks/model-resolution.test.d.ts} +0 -0
  125. /package/dist/{hooks/sisyphus-task-retry/index.test.d.ts → cli/install.test.d.ts} +0 -0
  126. /package/dist/{tools/sisyphus-task/tools.test.d.ts → cli/model-fallback.test.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -2,4 +2,5 @@ export declare const context7: {
2
2
  type: "remote";
3
3
  url: string;
4
4
  enabled: boolean;
5
+ oauth: false;
5
6
  };
@@ -2,4 +2,5 @@ export declare const grep_app: {
2
2
  type: "remote";
3
3
  url: string;
4
4
  enabled: boolean;
5
+ oauth: false;
5
6
  };
@@ -4,5 +4,6 @@ type RemoteMcpConfig = {
4
4
  url: string;
5
5
  enabled: boolean;
6
6
  headers?: Record<string, string>;
7
+ oauth?: false;
7
8
  };
8
9
  export declare function createBuiltinMcps(disabledMcps?: string[]): Record<string, RemoteMcpConfig>;
@@ -5,4 +5,5 @@ export declare const websearch: {
5
5
  headers: {
6
6
  "x-api-key": string;
7
7
  } | undefined;
8
+ oauth: false;
8
9
  };
@@ -4,6 +4,7 @@ import type { CategoryConfig } from "../config/schema";
4
4
  export interface ConfigHandlerDeps {
5
5
  ctx: {
6
6
  directory: string;
7
+ client?: any;
7
8
  };
8
9
  pluginConfig: OhMyOpenCodeConfig;
9
10
  modelCacheState: ModelCacheState;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Agent config keys to display names mapping.
3
+ * Config keys are lowercase (e.g., "sisyphus", "atlas").
4
+ * Display names include suffixes for UI/logs (e.g., "Sisyphus (Ultraworker)").
5
+ */
6
+ export declare const AGENT_DISPLAY_NAMES: Record<string, string>;
7
+ /**
8
+ * Get display name for an agent config key.
9
+ * Uses case-insensitive lookup for backward compatibility.
10
+ * Returns original key if not found.
11
+ */
12
+ export declare function getAgentDisplayName(configKey: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Agent tool restrictions for session.prompt calls.
3
+ * OpenCode SDK's session.prompt `tools` parameter expects boolean values.
4
+ * true = tool allowed, false = tool denied.
5
+ */
6
+ export declare function getAgentToolRestrictions(agentName: string): Record<string, boolean>;
7
+ export declare function hasAgentToolRestrictions(agentName: string): boolean;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Case-insensitive lookup and comparison utilities for agent/config names.
3
+ * Used throughout the codebase to allow "Oracle", "oracle", "ORACLE" to work the same.
4
+ */
5
+ /**
6
+ * Find a value in an object using case-insensitive key matching.
7
+ * First tries exact match, then falls back to lowercase comparison.
8
+ */
9
+ export declare function findCaseInsensitive<T>(obj: Record<string, T> | undefined, key: string): T | undefined;
10
+ /**
11
+ * Check if an array includes a value using case-insensitive comparison.
12
+ */
13
+ export declare function includesCaseInsensitive(arr: string[], value: string): boolean;
14
+ /**
15
+ * Find an element in array using case-insensitive name matching.
16
+ * Useful for finding agents/categories by name.
17
+ */
18
+ export declare function findByNameCaseInsensitive<T extends {
19
+ name: string;
20
+ }>(arr: T[], name: string): T | undefined;
21
+ /**
22
+ * Check if two strings are equal (case-insensitive).
23
+ */
24
+ export declare function equalsIgnoreCase(a: string, b: string): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,6 @@
1
1
  /**
2
2
  * Returns the user-level config directory based on the OS.
3
- * - Linux/macOS: XDG_CONFIG_HOME or ~/.config
4
- * - Windows: Checks ~/.config first (cross-platform), then %APPDATA% (fallback)
5
- *
6
- * On Windows, prioritizes ~/.config for cross-platform consistency.
7
- * Falls back to %APPDATA% for backward compatibility with existing installations.
3
+ * @deprecated Use getOpenCodeConfigDir() from opencode-config-dir.ts instead.
8
4
  */
9
5
  export declare function getUserConfigDir(): string;
10
6
  /**
@@ -24,3 +24,9 @@ export * from "./zip-extractor";
24
24
  export * from "./agent-variant";
25
25
  export * from "./session-cursor";
26
26
  export * from "./shell-env";
27
+ export * from "./system-directive";
28
+ export * from "./agent-tool-restrictions";
29
+ export * from "./model-requirements";
30
+ export * from "./model-resolver";
31
+ export * from "./model-availability";
32
+ export * from "./case-insensitive";
@@ -1,6 +1,19 @@
1
1
  export declare const AGENT_NAME_MAP: Record<string, string>;
2
2
  export declare const BUILTIN_AGENT_NAMES: Set<string>;
3
- export declare const HOOK_NAME_MAP: Record<string, string>;
3
+ export declare const HOOK_NAME_MAP: Record<string, string | null>;
4
+ /**
5
+ * @deprecated LEGACY MIGRATION ONLY
6
+ *
7
+ * This map exists solely for migrating old configs that used hardcoded model strings.
8
+ * It maps legacy model strings to semantic category names, allowing users to migrate
9
+ * from explicit model configs to category-based configs.
10
+ *
11
+ * DO NOT add new entries here. New agents should use:
12
+ * - Category-based config (preferred): { category: "unspecified-high" }
13
+ * - Or inherit from OpenCode's config.model
14
+ *
15
+ * This map will be removed in a future major version once migration period ends.
16
+ */
4
17
  export declare const MODEL_TO_CATEGORY_MAP: Record<string, string>;
5
18
  export declare function migrateAgentNames(agents: Record<string, unknown>): {
6
19
  migrated: Record<string, unknown>;
@@ -9,6 +22,7 @@ export declare function migrateAgentNames(agents: Record<string, unknown>): {
9
22
  export declare function migrateHookNames(hooks: string[]): {
10
23
  migrated: string[];
11
24
  changed: boolean;
25
+ removed: string[];
12
26
  };
13
27
  export declare function migrateAgentConfigToCategory(config: Record<string, unknown>): {
14
28
  migrated: Record<string, unknown>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Fuzzy matching utility for model names
3
+ * Supports substring matching with provider filtering and priority-based selection
4
+ */
5
+ export declare function fuzzyMatchModel(target: string, available: Set<string>, providers?: string[]): string | null;
6
+ export declare function fetchAvailableModels(_client?: any): Promise<Set<string>>;
7
+ export declare function __resetModelCache(): void;
8
+ export declare function isModelCacheAvailable(): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export type FallbackEntry = {
2
+ providers: string[];
3
+ model: string;
4
+ variant?: string;
5
+ };
6
+ export type ModelRequirement = {
7
+ fallbackChain: FallbackEntry[];
8
+ variant?: string;
9
+ };
10
+ export declare const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement>;
11
+ export declare const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { FallbackEntry } from "./model-requirements";
2
+ export type ModelResolutionInput = {
3
+ userModel?: string;
4
+ inheritedModel?: string;
5
+ systemDefault: string;
6
+ };
7
+ export type ModelSource = "override" | "provider-fallback" | "system-default";
8
+ export type ModelResolutionResult = {
9
+ model: string;
10
+ source: ModelSource;
11
+ variant?: string;
12
+ };
13
+ export type ExtendedModelResolutionInput = {
14
+ userModel?: string;
15
+ fallbackChain?: FallbackEntry[];
16
+ availableModels: Set<string>;
17
+ systemDefaultModel: string;
18
+ };
19
+ export declare function resolveModel(input: ModelResolutionInput): string;
20
+ export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,13 @@
1
- export declare const PERMISSION_BREAKING_VERSION = "1.1.1";
1
+ /**
2
+ * Minimum OpenCode version required for this plugin.
3
+ * This plugin only supports OpenCode 1.1.1+ which uses the permission system.
4
+ */
5
+ export declare const MINIMUM_OPENCODE_VERSION = "1.1.1";
2
6
  export declare function parseVersion(version: string): number[];
3
7
  export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
4
8
  export declare function isVersionGte(a: string, b: string): boolean;
5
9
  export declare function isVersionLt(a: string, b: string): boolean;
6
10
  export declare function getOpenCodeVersion(): string | null;
7
- export declare function supportsNewPermissionSystem(): boolean;
8
- export declare function usesLegacyToolsSystem(): boolean;
11
+ export declare function isOpenCodeVersionAtLeast(version: string): boolean;
9
12
  export declare function resetVersionCache(): void;
10
13
  export declare function setVersionCache(version: string | null): void;
@@ -1,14 +1,27 @@
1
- import { supportsNewPermissionSystem } from "./opencode-version";
2
- export { supportsNewPermissionSystem };
1
+ /**
2
+ * Permission system utilities for OpenCode 1.1.1+.
3
+ * This module only supports the new permission format.
4
+ */
3
5
  export type PermissionValue = "ask" | "allow" | "deny";
4
- export interface LegacyToolsFormat {
5
- tools: Record<string, boolean>;
6
- }
7
- export interface NewPermissionFormat {
6
+ export interface PermissionFormat {
8
7
  permission: Record<string, PermissionValue>;
9
8
  }
10
- export type VersionAwareRestrictions = LegacyToolsFormat | NewPermissionFormat;
11
- export declare function createAgentToolRestrictions(denyTools: string[]): VersionAwareRestrictions;
9
+ /**
10
+ * Creates tool restrictions that deny specified tools.
11
+ */
12
+ export declare function createAgentToolRestrictions(denyTools: string[]): PermissionFormat;
13
+ /**
14
+ * Creates tool restrictions that ONLY allow specified tools.
15
+ * All other tools are denied by default using `*: deny` pattern.
16
+ */
17
+ export declare function createAgentToolAllowlist(allowTools: string[]): PermissionFormat;
18
+ /**
19
+ * Converts legacy tools format to permission format.
20
+ * For migrating user configs from older versions.
21
+ */
12
22
  export declare function migrateToolsToPermission(tools: Record<string, boolean>): Record<string, PermissionValue>;
13
- export declare function migratePermissionToTools(permission: Record<string, PermissionValue>): Record<string, boolean>;
23
+ /**
24
+ * Migrates agent config from legacy tools format to permission format.
25
+ * If config has `tools`, converts to `permission`.
26
+ */
14
27
  export declare function migrateAgentConfig(config: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Unified system directive prefix for oh-my-opencode internal messages.
3
+ * All system-generated messages should use this prefix for consistent filtering.
4
+ *
5
+ * Format: [SYSTEM DIRECTIVE: OH-MY-OPENCODE - {TYPE}]
6
+ */
7
+ export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCODE";
8
+ /**
9
+ * Creates a system directive header with the given type.
10
+ * @param type - The directive type (e.g., "TODO CONTINUATION", "RALPH LOOP")
11
+ * @returns Formatted directive string like "[SYSTEM DIRECTIVE: OH-MY-OPENCODE - TODO CONTINUATION]"
12
+ */
13
+ export declare function createSystemDirective(type: string): string;
14
+ /**
15
+ * Checks if a message starts with the oh-my-opencode system directive prefix.
16
+ * Used by keyword-detector and other hooks to skip system-generated messages.
17
+ * @param text - The message text to check
18
+ * @returns true if the message is a system directive
19
+ */
20
+ export declare function isSystemDirective(text: string): boolean;
21
+ export declare const SystemDirectiveTypes: {
22
+ readonly TODO_CONTINUATION: "TODO CONTINUATION";
23
+ readonly RALPH_LOOP: "RALPH LOOP";
24
+ readonly BOULDER_CONTINUATION: "BOULDER CONTINUATION";
25
+ readonly DELEGATION_REQUIRED: "DELEGATION REQUIRED";
26
+ readonly SINGLE_TASK_ONLY: "SINGLE TASK ONLY";
27
+ readonly COMPACTION_CONTEXT: "COMPACTION CONTEXT";
28
+ readonly CONTEXT_WINDOW_MONITOR: "CONTEXT WINDOW MONITOR";
29
+ readonly PROMETHEUS_READ_ONLY: "PROMETHEUS READ-ONLY";
30
+ };
31
+ export type SystemDirectiveType = (typeof SystemDirectiveTypes)[keyof typeof SystemDirectiveTypes];
@@ -0,0 +1,11 @@
1
+ import type { CategoryConfig } from "../../config/schema";
2
+ export declare const VISUAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on VISUAL/UI tasks.\n\nDesign-first mindset:\n- Bold aesthetic choices over safe defaults\n- Unexpected layouts, asymmetry, grid-breaking elements\n- Distinctive typography (avoid: Arial, Inter, Roboto, Space Grotesk)\n- Cohesive color palettes with sharp accents\n- High-impact animations with staggered reveals\n- Atmosphere: gradient meshes, noise textures, layered transparencies\n\nAVOID: Generic fonts, purple gradients on white, predictable layouts, cookie-cutter patterns.\n</Category_Context>";
3
+ export declare const STRATEGIC_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on BUSINESS LOGIC / ARCHITECTURE tasks.\n\nStrategic advisor mindset:\n- Bias toward simplicity: least complex solution that fulfills requirements\n- Leverage existing code/patterns over new components\n- Prioritize developer experience and maintainability\n- One clear recommendation with effort estimate (Quick/Short/Medium/Large)\n- Signal when advanced approach warranted\n\nResponse format:\n- Bottom line (2-3 sentences)\n- Action plan (numbered steps)\n- Risks and mitigations (if relevant)\n</Category_Context>";
4
+ export declare const ARTISTRY_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on HIGHLY CREATIVE / ARTISTIC tasks.\n\nArtistic genius mindset:\n- Push far beyond conventional boundaries\n- Explore radical, unconventional directions\n- Surprise and delight: unexpected twists, novel combinations\n- Rich detail and vivid expression\n- Break patterns deliberately when it serves the creative vision\n\nApproach:\n- Generate diverse, bold options first\n- Embrace ambiguity and wild experimentation\n- Balance novelty with coherence\n- This is for tasks requiring exceptional creativity\n</Category_Context>";
5
+ export declare const QUICK_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on SMALL / QUICK tasks.\n\nEfficient execution mindset:\n- Fast, focused, minimal overhead\n- Get to the point immediately\n- No over-engineering\n- Simple solutions for simple problems\n\nApproach:\n- Minimal viable implementation\n- Skip unnecessary abstractions\n- Direct and concise\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A LESS CAPABLE MODEL (claude-haiku-4-5).\n\nThe model executing this task has LIMITED reasoning capacity. Your prompt MUST be:\n\n**EXHAUSTIVELY EXPLICIT** - Leave NOTHING to interpretation:\n1. MUST DO: List every required action as atomic, numbered steps\n2. MUST NOT DO: Explicitly forbid likely mistakes and deviations\n3. EXPECTED OUTPUT: Describe exact success criteria with concrete examples\n\n**WHY THIS MATTERS:**\n- Less capable models WILL deviate without explicit guardrails\n- Vague instructions \u2192 unpredictable results\n- Implicit expectations \u2192 missed requirements\n\n**PROMPT STRUCTURE (MANDATORY):**\n```\nTASK: [One-sentence goal]\n\nMUST DO:\n1. [Specific action with exact details]\n2. [Another specific action]\n...\n\nMUST NOT DO:\n- [Forbidden action + why]\n- [Another forbidden action]\n...\n\nEXPECTED OUTPUT:\n- [Exact deliverable description]\n- [Success criteria / verification method]\n```\n\nIf your prompt lacks this structure, REWRITE IT before delegating.\n</Caller_Warning>";
6
+ export declare const UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on tasks that don't fit specific categories but require moderate effort.\n\n<Selection_Gate>\nBEFORE selecting this category, VERIFY ALL conditions:\n1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)\n2. Task requires more than trivial effort but is NOT system-wide\n3. Scope is contained within a few files/modules\n\nIf task fits ANY other category, DO NOT select unspecified-low.\nThis is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.\n</Selection_Gate>\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-5).\n\n**PROVIDE CLEAR STRUCTURE:**\n1. MUST DO: Enumerate required actions explicitly\n2. MUST NOT DO: State forbidden actions to prevent scope creep\n3. EXPECTED OUTPUT: Define concrete success criteria\n</Caller_Warning>";
7
+ export declare const UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on tasks that don't fit specific categories but require substantial effort.\n\n<Selection_Gate>\nBEFORE selecting this category, VERIFY ALL conditions:\n1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)\n2. Task requires substantial effort across multiple systems/modules\n3. Changes have broad impact or require careful coordination\n4. NOT just \"complex\" - must be genuinely unclassifiable AND high-effort\n\nIf task fits ANY other category, DO NOT select unspecified-high.\nIf task is unclassifiable but moderate-effort, use unspecified-low instead.\n</Selection_Gate>\n</Category_Context>";
8
+ export declare const WRITING_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on WRITING / PROSE tasks.\n\nWordsmith mindset:\n- Clear, flowing prose\n- Appropriate tone and voice\n- Engaging and readable\n- Proper structure and organization\n\nApproach:\n- Understand the audience\n- Draft with care\n- Polish for clarity and impact\n- Documentation, READMEs, articles, technical writing\n</Category_Context>";
9
+ export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
10
+ export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
11
+ export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
@@ -1,3 +1,3 @@
1
- export { createSisyphusTask, type SisyphusTaskToolOptions } from "./tools";
1
+ export { createDelegateTask, type DelegateTaskToolOptions } from "./tools";
2
2
  export type * from "./types";
3
3
  export * from "./constants";
@@ -1,18 +1,28 @@
1
1
  import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
- import type { CategoriesConfig, GitMasterConfig } from "../../config/schema";
3
+ import type { CategoryConfig, CategoriesConfig, GitMasterConfig } from "../../config/schema";
4
4
  type OpencodeClient = PluginInput["client"];
5
- export interface SisyphusTaskToolOptions {
5
+ export declare function resolveCategoryConfig(categoryName: string, options: {
6
+ userCategories?: CategoriesConfig;
7
+ inheritedModel?: string;
8
+ systemDefaultModel: string;
9
+ }): {
10
+ config: CategoryConfig;
11
+ promptAppend: string;
12
+ model: string;
13
+ } | null;
14
+ export interface DelegateTaskToolOptions {
6
15
  manager: BackgroundManager;
7
16
  client: OpencodeClient;
8
17
  directory: string;
9
18
  userCategories?: CategoriesConfig;
10
19
  gitMasterConfig?: GitMasterConfig;
20
+ sisyphusJuniorModel?: string;
11
21
  }
12
22
  export interface BuildSystemContentInput {
13
23
  skillContent?: string;
14
24
  categoryPromptAppend?: string;
15
25
  }
16
26
  export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
17
- export declare function createSisyphusTask(options: SisyphusTaskToolOptions): ToolDefinition;
27
+ export declare function createDelegateTask(options: DelegateTaskToolOptions): ToolDefinition;
18
28
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,9 @@
1
- export interface SisyphusTaskArgs {
1
+ export interface DelegateTaskArgs {
2
2
  description: string;
3
3
  prompt: string;
4
4
  category?: string;
5
5
  subagent_type?: string;
6
6
  run_in_background: boolean;
7
7
  resume?: string;
8
- skills: string[];
8
+ load_skills: string[];
9
9
  }
@@ -11,6 +11,6 @@ import type { BackgroundManager } from "../features/background-agent";
11
11
  type OpencodeClient = PluginInput["client"];
12
12
  export { createCallOmoAgent } from "./call-omo-agent";
13
13
  export { createLookAt } from "./look-at";
14
- export { createSisyphusTask, type SisyphusTaskToolOptions, DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS } from "./sisyphus-task";
14
+ export { createDelegateTask, type DelegateTaskToolOptions, DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS } from "./delegate-task";
15
15
  export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
16
16
  export declare const builtinTools: Record<string, ToolDefinition>;
@@ -1,3 +1,3 @@
1
1
  export declare const DEFAULT_TIMEOUT_MS = 60000;
2
2
  export declare const BLOCKED_TMUX_SUBCOMMANDS: string[];
3
- export declare const INTERACTIVE_BASH_DESCRIPTION = "Execute tmux commands. Use \"omo-{name}\" session pattern.\n\nFor: server processes, long-running tasks, background jobs, interactive CLI tools.\n\nBlocked (use bash instead): capture-pane, save-buffer, show-buffer, pipe-pane.";
3
+ export declare const INTERACTIVE_BASH_DESCRIPTION = "WARNING: This is TMUX ONLY. Pass tmux subcommands directly (without 'tmux' prefix).\n\nExamples: new-session -d -s omo-dev, send-keys -t omo-dev \"vim\" Enter\n\nFor TUI apps needing ongoing interaction (vim, htop, pudb). One-shot commands \u2192 use Bash with &.";
@@ -42,6 +42,10 @@ export declare class LSPClient {
42
42
  private handleServerRequest;
43
43
  initialize(): Promise<void>;
44
44
  openFile(filePath: string): Promise<void>;
45
+ definition(filePath: string, line: number, character: number): Promise<unknown>;
46
+ references(filePath: string, line: number, character: number, includeDeclaration?: boolean): Promise<unknown>;
47
+ documentSymbols(filePath: string): Promise<unknown>;
48
+ workspaceSymbols(query: string): Promise<unknown>;
45
49
  diagnostics(filePath: string): Promise<{
46
50
  items: Diagnostic[];
47
51
  }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,8 @@
1
1
  import type { LSPServerConfig } from "./types";
2
+ export declare const SYMBOL_KIND_MAP: Record<number, string>;
2
3
  export declare const SEVERITY_MAP: Record<number, string>;
4
+ export declare const DEFAULT_MAX_REFERENCES = 200;
5
+ export declare const DEFAULT_MAX_SYMBOLS = 200;
3
6
  export declare const DEFAULT_MAX_DIAGNOSTICS = 200;
4
7
  export declare const LSP_INSTALL_HINTS: Record<string, string>;
5
8
  export declare const BUILTIN_SERVERS: Record<string, Omit<LSPServerConfig, "id">>;
@@ -3,4 +3,4 @@ export * from "./constants";
3
3
  export * from "./config";
4
4
  export * from "./client";
5
5
  export * from "./utils";
6
- export * from "./tools";
6
+ export { lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_diagnostics, lsp_prepare_rename, lsp_rename } from "./tools";
@@ -1,5 +1,7 @@
1
1
  import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export declare const lsp_goto_definition: ToolDefinition;
3
+ export declare const lsp_find_references: ToolDefinition;
4
+ export declare const lsp_symbols: ToolDefinition;
2
5
  export declare const lsp_diagnostics: ToolDefinition;
3
- export declare const lsp_servers: ToolDefinition;
4
6
  export declare const lsp_prepare_rename: ToolDefinition;
5
7
  export declare const lsp_rename: ToolDefinition;
@@ -14,6 +14,29 @@ export interface Range {
14
14
  start: Position;
15
15
  end: Position;
16
16
  }
17
+ export interface Location {
18
+ uri: string;
19
+ range: Range;
20
+ }
21
+ export interface LocationLink {
22
+ targetUri: string;
23
+ targetRange: Range;
24
+ targetSelectionRange: Range;
25
+ originSelectionRange?: Range;
26
+ }
27
+ export interface SymbolInfo {
28
+ name: string;
29
+ kind: number;
30
+ location: Location;
31
+ containerName?: string;
32
+ }
33
+ export interface DocumentSymbol {
34
+ name: string;
35
+ kind: number;
36
+ range: Range;
37
+ selectionRange: Range;
38
+ children?: DocumentSymbol[];
39
+ }
17
40
  export interface Diagnostic {
18
41
  range: Range;
19
42
  severity?: number;
@@ -1,12 +1,16 @@
1
1
  import { LSPClient } from "./client";
2
- import type { Diagnostic, PrepareRenameResult, PrepareRenameDefaultBehavior, Range, WorkspaceEdit, TextEdit, ServerLookupResult } from "./types";
2
+ import type { Location, LocationLink, DocumentSymbol, SymbolInfo, Diagnostic, PrepareRenameResult, PrepareRenameDefaultBehavior, Range, WorkspaceEdit, TextEdit, ServerLookupResult } from "./types";
3
3
  export declare function findWorkspaceRoot(filePath: string): string;
4
4
  export declare function uriToPath(uri: string): string;
5
5
  export declare function formatServerLookupError(result: Exclude<ServerLookupResult, {
6
6
  status: "found";
7
7
  }>): string;
8
8
  export declare function withLspClient<T>(filePath: string, fn: (client: LSPClient) => Promise<T>): Promise<T>;
9
+ export declare function formatLocation(loc: Location | LocationLink): string;
10
+ export declare function formatSymbolKind(kind: number): string;
9
11
  export declare function formatSeverity(severity: number | undefined): string;
12
+ export declare function formatDocumentSymbol(symbol: DocumentSymbol, indent?: number): string;
13
+ export declare function formatSymbolInfo(symbol: SymbolInfo): string;
10
14
  export declare function formatDiagnostic(diag: Diagnostic): string;
11
15
  export declare function filterDiagnosticsBySeverity(diagnostics: Diagnostic[], severityFilter?: "error" | "warning" | "information" | "hint" | "all"): Diagnostic[];
12
16
  export declare function formatPrepareRenameResult(result: PrepareRenameResult | PrepareRenameDefaultBehavior | Range | null): string;
@@ -1,5 +1,6 @@
1
1
  import type { SkillScope, LoadedSkill } from "../../features/opencode-skill-loader/types";
2
2
  import type { SkillMcpManager } from "../../features/skill-mcp-manager";
3
+ import type { GitMasterConfig } from "../../config/schema";
3
4
  export interface SkillArgs {
4
5
  name: string;
5
6
  }
@@ -14,7 +15,7 @@ export interface SkillInfo {
14
15
  allowedTools?: string[];
15
16
  }
16
17
  export interface SkillLoadOptions {
17
- /** When true, only load from OpenCode paths (.opencode/skill/, ~/.config/opencode/skill/) */
18
+ /** When true, only load from OpenCode paths (.opencode/skills/, ~/.config/opencode/skills/) */
18
19
  opencodeOnly?: boolean;
19
20
  /** Pre-merged skills to use instead of discovering */
20
21
  skills?: LoadedSkill[];
@@ -22,4 +23,6 @@ export interface SkillLoadOptions {
22
23
  mcpManager?: SkillMcpManager;
23
24
  /** Session ID getter for MCP client identification */
24
25
  getSessionID?: () => string;
26
+ /** Git master configuration for watermark/co-author settings */
27
+ gitMasterConfig?: GitMasterConfig;
25
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0",
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",
@@ -56,18 +56,14 @@
56
56
  "@clack/prompts": "^0.11.0",
57
57
  "@code-yeongyu/comment-checker": "^0.6.1",
58
58
  "@modelcontextprotocol/sdk": "^1.25.1",
59
- "@openauthjs/openauth": "^0.4.3",
60
59
  "@opencode-ai/plugin": "^1.1.19",
61
60
  "@opencode-ai/sdk": "^1.1.19",
62
61
  "commander": "^14.0.2",
63
62
  "detect-libc": "^2.0.0",
64
- "hono": "^4.10.4",
65
63
  "js-yaml": "^4.1.1",
66
64
  "jsonc-parser": "^3.3.1",
67
- "open": "^11.0.0",
68
65
  "picocolors": "^1.1.1",
69
66
  "picomatch": "^4.0.2",
70
- "xdg-basedir": "^5.1.0",
71
67
  "zod": "^4.1.8"
72
68
  },
73
69
  "devDependencies": {
@@ -77,13 +73,13 @@
77
73
  "typescript": "^5.7.3"
78
74
  },
79
75
  "optionalDependencies": {
80
- "oh-my-opencode-darwin-arm64": "3.0.0-beta.8",
81
- "oh-my-opencode-darwin-x64": "3.0.0-beta.8",
82
- "oh-my-opencode-linux-arm64": "3.0.0-beta.8",
83
- "oh-my-opencode-linux-arm64-musl": "3.0.0-beta.8",
84
- "oh-my-opencode-linux-x64": "3.0.0-beta.8",
85
- "oh-my-opencode-linux-x64-musl": "3.0.0-beta.8",
86
- "oh-my-opencode-windows-x64": "3.0.0-beta.8"
76
+ "oh-my-opencode-darwin-arm64": "3.0.0",
77
+ "oh-my-opencode-darwin-x64": "3.0.0",
78
+ "oh-my-opencode-linux-arm64": "3.0.0",
79
+ "oh-my-opencode-linux-arm64-musl": "3.0.0",
80
+ "oh-my-opencode-linux-x64": "3.0.0",
81
+ "oh-my-opencode-linux-x64-musl": "3.0.0",
82
+ "oh-my-opencode-windows-x64": "3.0.0"
87
83
  },
88
84
  "trustedDependencies": [
89
85
  "@ast-grep/cli",
@@ -1,31 +0,0 @@
1
- /**
2
- * OpenCode's default build agent system prompt.
3
- *
4
- * This prompt enables FULL EXECUTION mode for the build agent, allowing file
5
- * modifications, command execution, and system changes while focusing on
6
- * implementation and execution.
7
- *
8
- * Inspired by OpenCode's build agent behavior.
9
- *
10
- * @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/session/prompt/build-switch.txt
11
- * @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
12
- */
13
- export declare const BUILD_SYSTEM_PROMPT = "<system-reminder>\n# Build Mode - System Reminder\n\nBUILD MODE ACTIVE - you are in EXECUTION phase. Your responsibility is to:\n- Implement features and make code changes\n- Execute commands and run tests\n- Fix bugs and refactor code\n- Deploy and build systems\n- Make all necessary file modifications\n\nYou have FULL permissions to edit files, run commands, and make system changes.\nThis is the implementation phase - execute decisively and thoroughly.\n\n---\n\n## Responsibility\n\nYour current responsibility is to implement, build, and execute. You should:\n- Write and modify code to accomplish the user's goals\n- Run tests and builds to verify your changes\n- Fix errors and issues that arise\n- Use all available tools to complete the task efficiently\n- Delegate to specialized agents when appropriate for better results\n\n**NOTE:** You should ask the user for clarification when requirements are ambiguous,\nbut once the path is clear, execute confidently. The goal is to deliver working,\ntested, production-ready solutions.\n\n---\n\n## Important\n\nThe user wants you to execute and implement. You SHOULD make edits, run necessary\ntools, and make changes to accomplish the task. Use your full capabilities to\ndeliver excellent results.\n</system-reminder>\n";
14
- /**
15
- * OpenCode's default build agent permission configuration.
16
- *
17
- * Allows the build agent full execution permissions:
18
- * - edit: "ask" - Can modify files with confirmation
19
- * - bash: "ask" - Can execute commands with confirmation
20
- * - webfetch: "allow" - Can fetch web content
21
- *
22
- * This provides balanced permissions - powerful but with safety checks.
23
- *
24
- * @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L57-L68
25
- * @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
26
- */
27
- export declare const BUILD_PERMISSION: {
28
- edit: "ask";
29
- bash: "ask";
30
- webfetch: "allow";
31
- };
@@ -1,5 +0,0 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
2
- import type { AgentPromptMetadata } from "./types";
3
- export declare const DOCUMENT_WRITER_PROMPT_METADATA: AgentPromptMetadata;
4
- export declare function createDocumentWriterAgent(model?: string): AgentConfig;
5
- export declare const documentWriterAgent: AgentConfig;
@@ -1,5 +0,0 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
2
- import type { AgentPromptMetadata } from "./types";
3
- export declare const FRONTEND_PROMPT_METADATA: AgentPromptMetadata;
4
- export declare function createFrontendUiUxEngineerAgent(model?: string): AgentConfig;
5
- export declare const frontendUiUxEngineerAgent: AgentConfig;