oh-my-opencode 2.9.1 → 2.11.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 (55) hide show
  1. package/README.ja.md +10 -0
  2. package/README.ko.md +10 -0
  3. package/README.md +46 -0
  4. package/README.zh-cn.md +10 -0
  5. package/dist/agents/utils.d.ts +7 -1
  6. package/dist/cli/doctor/checks/gh.d.ts +13 -0
  7. package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
  8. package/dist/cli/doctor/checks/index.d.ts +1 -0
  9. package/dist/cli/doctor/constants.d.ts +1 -0
  10. package/dist/cli/index.js +3192 -360
  11. package/dist/config/schema.d.ts +174 -165
  12. package/dist/features/builtin-skills/types.d.ts +2 -0
  13. package/dist/features/claude-code-command-loader/types.d.ts +19 -0
  14. package/dist/features/claude-code-mcp-loader/loader.d.ts +1 -0
  15. package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
  16. package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
  17. package/dist/features/opencode-skill-loader/types.d.ts +3 -0
  18. package/dist/features/skill-mcp-manager/index.d.ts +2 -0
  19. package/dist/features/skill-mcp-manager/manager.d.ts +21 -0
  20. package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
  21. package/dist/features/skill-mcp-manager/types.d.ts +11 -0
  22. package/dist/google-auth.js +3 -3
  23. package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
  24. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  25. package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
  26. package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
  27. package/dist/hooks/auto-slash-command/executor.d.ts +7 -0
  28. package/dist/hooks/auto-slash-command/index.d.ts +8 -0
  29. package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
  30. package/dist/hooks/auto-slash-command/types.d.ts +27 -0
  31. package/dist/hooks/auto-update-checker/constants.d.ts +4 -0
  32. package/dist/hooks/index.d.ts +1 -0
  33. package/dist/hooks/keyword-detector/detector.d.ts +5 -0
  34. package/dist/hooks/keyword-detector/index.d.ts +2 -1
  35. package/dist/hooks/rules-injector/constants.d.ts +2 -0
  36. package/dist/hooks/rules-injector/finder.d.ts +1 -13
  37. package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
  38. package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
  39. package/dist/hooks/rules-injector/types.d.ts +13 -0
  40. package/dist/index.js +30596 -17457
  41. package/dist/plugin-config.d.ts +4 -0
  42. package/dist/plugin-handlers/config-handler.d.ts +10 -0
  43. package/dist/plugin-handlers/index.d.ts +1 -0
  44. package/dist/plugin-state.d.ts +6 -0
  45. package/dist/shared/frontmatter.d.ts +2 -2
  46. package/dist/shared/frontmatter.test.d.ts +1 -0
  47. package/dist/tools/index.d.ts +1 -0
  48. package/dist/tools/skill/tools.test.d.ts +1 -0
  49. package/dist/tools/skill/types.d.ts +5 -0
  50. package/dist/tools/skill-mcp/constants.d.ts +2 -0
  51. package/dist/tools/skill-mcp/index.d.ts +3 -0
  52. package/dist/tools/skill-mcp/tools.d.ts +11 -0
  53. package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
  54. package/dist/tools/skill-mcp/types.d.ts +8 -0
  55. package/package.json +4 -1
@@ -0,0 +1,4 @@
1
+ import { type OhMyOpenCodeConfig } from "./config";
2
+ export declare function loadConfigFromPath(configPath: string, ctx: unknown): OhMyOpenCodeConfig | null;
3
+ export declare function mergeConfigs(base: OhMyOpenCodeConfig, override: OhMyOpenCodeConfig): OhMyOpenCodeConfig;
4
+ export declare function loadPluginConfig(directory: string, ctx: unknown): OhMyOpenCodeConfig;
@@ -0,0 +1,10 @@
1
+ import type { OhMyOpenCodeConfig } from "../config";
2
+ import type { ModelCacheState } from "../plugin-state";
3
+ export interface ConfigHandlerDeps {
4
+ ctx: {
5
+ directory: string;
6
+ };
7
+ pluginConfig: OhMyOpenCodeConfig;
8
+ modelCacheState: ModelCacheState;
9
+ }
10
+ export declare function createConfigHandler(deps: ConfigHandlerDeps): (config: Record<string, unknown>) => Promise<void>;
@@ -0,0 +1 @@
1
+ export { createConfigHandler, type ConfigHandlerDeps } from "./config-handler";
@@ -0,0 +1,6 @@
1
+ export interface ModelCacheState {
2
+ modelContextLimitsCache: Map<string, number>;
3
+ anthropicContext1MEnabled: boolean;
4
+ }
5
+ export declare function createModelCacheState(): ModelCacheState;
6
+ export declare function getModelLimit(state: ModelCacheState, providerID: string, modelID: string): number | undefined;
@@ -1,5 +1,5 @@
1
- export interface FrontmatterResult<T = Record<string, string>> {
1
+ export interface FrontmatterResult<T = Record<string, unknown>> {
2
2
  data: T;
3
3
  body: string;
4
4
  }
5
- export declare function parseFrontmatter<T = Record<string, string>>(content: string): FrontmatterResult<T>;
5
+ export declare function parseFrontmatter<T = Record<string, unknown>>(content: string): FrontmatterResult<T>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash";
2
2
  export { createSkillTool } from "./skill";
3
3
  export { getTmuxPath } from "./interactive-bash/utils";
4
+ export { createSkillMcpTool } from "./skill-mcp";
4
5
  import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
5
6
  import type { BackgroundManager } from "../features/background-agent";
6
7
  type OpencodeClient = PluginInput["client"];
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { SkillScope, LoadedSkill } from "../../features/opencode-skill-loader/types";
2
+ import type { SkillMcpManager } from "../../features/skill-mcp-manager";
2
3
  export interface SkillArgs {
3
4
  name: string;
4
5
  }
@@ -17,4 +18,8 @@ export interface SkillLoadOptions {
17
18
  opencodeOnly?: boolean;
18
19
  /** Pre-merged skills to use instead of discovering */
19
20
  skills?: LoadedSkill[];
21
+ /** MCP manager for querying skill-embedded MCP servers */
22
+ mcpManager?: SkillMcpManager;
23
+ /** Session ID getter for MCP client identification */
24
+ getSessionID?: () => string;
20
25
  }
@@ -0,0 +1,2 @@
1
+ export declare const SKILL_MCP_TOOL_NAME = "skill_mcp";
2
+ export declare const SKILL_MCP_DESCRIPTION = "Invoke MCP server operations from skill-embedded MCPs. Requires mcp_name plus exactly one of: tool_name, resource_name, or prompt_name.";
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./types";
3
+ export { createSkillMcpTool } from "./tools";
@@ -0,0 +1,11 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { SkillMcpManager } from "../../features/skill-mcp-manager";
3
+ import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
4
+ interface SkillMcpToolOptions {
5
+ manager: SkillMcpManager;
6
+ getLoadedSkills: () => LoadedSkill[];
7
+ getSessionID: () => string;
8
+ }
9
+ export declare function applyGrepFilter(output: string, pattern: string | undefined): string;
10
+ export declare function createSkillMcpTool(options: SkillMcpToolOptions): ToolDefinition;
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface SkillMcpArgs {
2
+ mcp_name: string;
3
+ tool_name?: string;
4
+ resource_name?: string;
5
+ prompt_name?: string;
6
+ arguments?: string;
7
+ grep?: string;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "2.9.1",
3
+ "version": "2.11.0",
4
4
  "description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,11 +54,13 @@
54
54
  "@ast-grep/napi": "^0.40.0",
55
55
  "@clack/prompts": "^0.11.0",
56
56
  "@code-yeongyu/comment-checker": "^0.6.1",
57
+ "@modelcontextprotocol/sdk": "^1.25.1",
57
58
  "@openauthjs/openauth": "^0.4.3",
58
59
  "@opencode-ai/plugin": "^1.0.162",
59
60
  "@opencode-ai/sdk": "^1.0.162",
60
61
  "commander": "^14.0.2",
61
62
  "hono": "^4.10.4",
63
+ "js-yaml": "^4.1.1",
62
64
  "jsonc-parser": "^3.3.1",
63
65
  "picocolors": "^1.1.1",
64
66
  "picomatch": "^4.0.2",
@@ -66,6 +68,7 @@
66
68
  "zod": "^4.1.8"
67
69
  },
68
70
  "devDependencies": {
71
+ "@types/js-yaml": "^4.0.9",
69
72
  "@types/picomatch": "^3.0.2",
70
73
  "bun-types": "latest",
71
74
  "typescript": "^5.7.3"