oh-my-opencode 2.5.4 → 2.6.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 (45) hide show
  1. package/README.ja.md +13 -5
  2. package/README.ko.md +13 -5
  3. package/README.md +43 -5
  4. package/README.zh-cn.md +13 -5
  5. package/dist/cli/get-local-version/formatter.d.ts +3 -0
  6. package/dist/cli/get-local-version/index.d.ts +3 -0
  7. package/dist/cli/get-local-version/types.d.ts +13 -0
  8. package/dist/cli/index.js +1241 -108
  9. package/dist/config/index.d.ts +1 -1
  10. package/dist/config/schema.d.ts +87 -0
  11. package/dist/features/background-agent/manager.d.ts +1 -0
  12. package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
  13. package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
  14. package/dist/features/claude-code-plugin-loader/types.d.ts +173 -0
  15. package/dist/hooks/anthropic-auto-compact/index.d.ts +1 -1
  16. package/dist/hooks/anthropic-auto-compact/pruning-deduplication.d.ts +7 -0
  17. package/dist/hooks/anthropic-auto-compact/pruning-deduplication.test.d.ts +1 -0
  18. package/dist/hooks/anthropic-auto-compact/pruning-executor.d.ts +3 -0
  19. package/dist/hooks/anthropic-auto-compact/pruning-purge-errors.d.ts +7 -0
  20. package/dist/hooks/anthropic-auto-compact/pruning-storage.d.ts +2 -0
  21. package/dist/hooks/anthropic-auto-compact/pruning-supersede.d.ts +6 -0
  22. package/dist/hooks/anthropic-auto-compact/pruning-types.d.ts +36 -0
  23. package/dist/hooks/anthropic-auto-compact/types.d.ts +5 -0
  24. package/dist/hooks/index.d.ts +1 -0
  25. package/dist/hooks/session-notification-utils.d.ts +9 -0
  26. package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
  27. package/dist/index.js +2723 -644
  28. package/dist/shared/claude-config-dir.d.ts +1 -0
  29. package/dist/shared/claude-config-dir.test.d.ts +1 -0
  30. package/dist/shared/index.d.ts +2 -0
  31. package/dist/shared/jsonc-parser.d.ts +15 -0
  32. package/dist/shared/jsonc-parser.test.d.ts +1 -0
  33. package/dist/tools/ast-grep/index.d.ts +2 -90
  34. package/dist/tools/ast-grep/tools.d.ts +3 -88
  35. package/dist/tools/background-task/tools.d.ts +4 -38
  36. package/dist/tools/call-omo-agent/tools.d.ts +2 -21
  37. package/dist/tools/glob/tools.d.ts +2 -11
  38. package/dist/tools/grep/tools.d.ts +2 -13
  39. package/dist/tools/index.d.ts +3 -367
  40. package/dist/tools/interactive-bash/tools.d.ts +2 -9
  41. package/dist/tools/look-at/tools.d.ts +2 -12
  42. package/dist/tools/lsp/tools.d.ts +12 -152
  43. package/dist/tools/session-manager/tools.d.ts +5 -52
  44. package/dist/tools/slashcommand/tools.d.ts +2 -9
  45. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ export declare function getClaudeConfigDir(): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -13,3 +13,5 @@ export * from "./dynamic-truncator";
13
13
  export * from "./config-path";
14
14
  export * from "./data-path";
15
15
  export * from "./config-errors";
16
+ export * from "./claude-config-dir";
17
+ export * from "./jsonc-parser";
@@ -0,0 +1,15 @@
1
+ export interface JsoncParseResult<T> {
2
+ data: T | null;
3
+ errors: Array<{
4
+ message: string;
5
+ offset: number;
6
+ length: number;
7
+ }>;
8
+ }
9
+ export declare function parseJsonc<T = unknown>(content: string): T;
10
+ export declare function parseJsoncSafe<T = unknown>(content: string): JsoncParseResult<T>;
11
+ export declare function readJsoncFile<T = unknown>(filePath: string): T | null;
12
+ export declare function detectConfigFile(basePath: string): {
13
+ format: "json" | "jsonc" | "none";
14
+ path: string;
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,94 +1,6 @@
1
+ import type { ToolDefinition } from "@opencode-ai/plugin";
1
2
  import { ast_grep_search, ast_grep_replace } from "./tools";
2
- export declare const builtinTools: {
3
- ast_grep_search: {
4
- description: string;
5
- args: {
6
- pattern: import("zod").ZodString;
7
- lang: import("zod").ZodEnum<{
8
- bash: "bash";
9
- typescript: "typescript";
10
- csharp: "csharp";
11
- rust: "rust";
12
- php: "php";
13
- c: "c";
14
- cpp: "cpp";
15
- css: "css";
16
- elixir: "elixir";
17
- go: "go";
18
- haskell: "haskell";
19
- html: "html";
20
- java: "java";
21
- javascript: "javascript";
22
- json: "json";
23
- lua: "lua";
24
- python: "python";
25
- ruby: "ruby";
26
- scala: "scala";
27
- swift: "swift";
28
- yaml: "yaml";
29
- kotlin: "kotlin";
30
- nix: "nix";
31
- solidity: "solidity";
32
- tsx: "tsx";
33
- }>;
34
- paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
35
- globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
36
- context: import("zod").ZodOptional<import("zod").ZodNumber>;
37
- };
38
- execute(args: {
39
- pattern: string;
40
- lang: "bash" | "typescript" | "csharp" | "rust" | "php" | "c" | "cpp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "lua" | "python" | "ruby" | "scala" | "swift" | "yaml" | "kotlin" | "nix" | "solidity" | "tsx";
41
- paths?: string[] | undefined;
42
- globs?: string[] | undefined;
43
- context?: number | undefined;
44
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
45
- };
46
- ast_grep_replace: {
47
- description: string;
48
- args: {
49
- pattern: import("zod").ZodString;
50
- rewrite: import("zod").ZodString;
51
- lang: import("zod").ZodEnum<{
52
- bash: "bash";
53
- typescript: "typescript";
54
- csharp: "csharp";
55
- rust: "rust";
56
- php: "php";
57
- c: "c";
58
- cpp: "cpp";
59
- css: "css";
60
- elixir: "elixir";
61
- go: "go";
62
- haskell: "haskell";
63
- html: "html";
64
- java: "java";
65
- javascript: "javascript";
66
- json: "json";
67
- lua: "lua";
68
- python: "python";
69
- ruby: "ruby";
70
- scala: "scala";
71
- swift: "swift";
72
- yaml: "yaml";
73
- kotlin: "kotlin";
74
- nix: "nix";
75
- solidity: "solidity";
76
- tsx: "tsx";
77
- }>;
78
- paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
79
- globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
80
- dryRun: import("zod").ZodOptional<import("zod").ZodBoolean>;
81
- };
82
- execute(args: {
83
- pattern: string;
84
- rewrite: string;
85
- lang: "bash" | "typescript" | "csharp" | "rust" | "php" | "c" | "cpp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "lua" | "python" | "ruby" | "scala" | "swift" | "yaml" | "kotlin" | "nix" | "solidity" | "tsx";
86
- paths?: string[] | undefined;
87
- globs?: string[] | undefined;
88
- dryRun?: boolean | undefined;
89
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
90
- };
91
- };
3
+ export declare const builtinTools: Record<string, ToolDefinition>;
92
4
  export { ast_grep_search, ast_grep_replace };
93
5
  export { ensureAstGrepBinary, getCachedBinaryPath, getCacheDir } from "./downloader";
94
6
  export { getAstGrepPath, isCliAvailable, ensureCliAvailable, startBackgroundInit } from "./cli";
@@ -1,88 +1,3 @@
1
- export declare const ast_grep_search: {
2
- description: string;
3
- args: {
4
- pattern: import("zod").ZodString;
5
- lang: import("zod").ZodEnum<{
6
- bash: "bash";
7
- typescript: "typescript";
8
- csharp: "csharp";
9
- rust: "rust";
10
- php: "php";
11
- c: "c";
12
- cpp: "cpp";
13
- css: "css";
14
- elixir: "elixir";
15
- go: "go";
16
- haskell: "haskell";
17
- html: "html";
18
- java: "java";
19
- javascript: "javascript";
20
- json: "json";
21
- lua: "lua";
22
- python: "python";
23
- ruby: "ruby";
24
- scala: "scala";
25
- swift: "swift";
26
- yaml: "yaml";
27
- kotlin: "kotlin";
28
- nix: "nix";
29
- solidity: "solidity";
30
- tsx: "tsx";
31
- }>;
32
- paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
33
- globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
34
- context: import("zod").ZodOptional<import("zod").ZodNumber>;
35
- };
36
- execute(args: {
37
- pattern: string;
38
- lang: "bash" | "typescript" | "csharp" | "rust" | "php" | "c" | "cpp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "lua" | "python" | "ruby" | "scala" | "swift" | "yaml" | "kotlin" | "nix" | "solidity" | "tsx";
39
- paths?: string[] | undefined;
40
- globs?: string[] | undefined;
41
- context?: number | undefined;
42
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
43
- };
44
- export declare const ast_grep_replace: {
45
- description: string;
46
- args: {
47
- pattern: import("zod").ZodString;
48
- rewrite: import("zod").ZodString;
49
- lang: import("zod").ZodEnum<{
50
- bash: "bash";
51
- typescript: "typescript";
52
- csharp: "csharp";
53
- rust: "rust";
54
- php: "php";
55
- c: "c";
56
- cpp: "cpp";
57
- css: "css";
58
- elixir: "elixir";
59
- go: "go";
60
- haskell: "haskell";
61
- html: "html";
62
- java: "java";
63
- javascript: "javascript";
64
- json: "json";
65
- lua: "lua";
66
- python: "python";
67
- ruby: "ruby";
68
- scala: "scala";
69
- swift: "swift";
70
- yaml: "yaml";
71
- kotlin: "kotlin";
72
- nix: "nix";
73
- solidity: "solidity";
74
- tsx: "tsx";
75
- }>;
76
- paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
77
- globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
78
- dryRun: import("zod").ZodOptional<import("zod").ZodBoolean>;
79
- };
80
- execute(args: {
81
- pattern: string;
82
- rewrite: string;
83
- lang: "bash" | "typescript" | "csharp" | "rust" | "php" | "c" | "cpp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "lua" | "python" | "ruby" | "scala" | "swift" | "yaml" | "kotlin" | "nix" | "solidity" | "tsx";
84
- paths?: string[] | undefined;
85
- globs?: string[] | undefined;
86
- dryRun?: boolean | undefined;
87
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
88
- };
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export declare const ast_grep_search: ToolDefinition;
3
+ export declare const ast_grep_replace: ToolDefinition;
@@ -1,41 +1,7 @@
1
- import { type PluginInput } from "@opencode-ai/plugin";
1
+ import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
3
  type OpencodeClient = PluginInput["client"];
4
- export declare function createBackgroundTask(manager: BackgroundManager): {
5
- description: string;
6
- args: {
7
- description: import("zod").ZodString;
8
- prompt: import("zod").ZodString;
9
- agent: import("zod").ZodString;
10
- };
11
- execute(args: {
12
- description: string;
13
- prompt: string;
14
- agent: string;
15
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
16
- };
17
- export declare function createBackgroundOutput(manager: BackgroundManager, client: OpencodeClient): {
18
- description: string;
19
- args: {
20
- task_id: import("zod").ZodString;
21
- block: import("zod").ZodOptional<import("zod").ZodBoolean>;
22
- timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
23
- };
24
- execute(args: {
25
- task_id: string;
26
- block?: boolean | undefined;
27
- timeout?: number | undefined;
28
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
29
- };
30
- export declare function createBackgroundCancel(manager: BackgroundManager, client: OpencodeClient): {
31
- description: string;
32
- args: {
33
- taskId: import("zod").ZodOptional<import("zod").ZodString>;
34
- all: import("zod").ZodOptional<import("zod").ZodBoolean>;
35
- };
36
- execute(args: {
37
- taskId?: string | undefined;
38
- all?: boolean | undefined;
39
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
40
- };
4
+ export declare function createBackgroundTask(manager: BackgroundManager): ToolDefinition;
5
+ export declare function createBackgroundOutput(manager: BackgroundManager, client: OpencodeClient): ToolDefinition;
6
+ export declare function createBackgroundCancel(manager: BackgroundManager, client: OpencodeClient): ToolDefinition;
41
7
  export {};
@@ -1,22 +1,3 @@
1
- import { type PluginInput } from "@opencode-ai/plugin";
1
+ import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
- export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager): {
4
- description: string;
5
- args: {
6
- description: import("zod").ZodString;
7
- prompt: import("zod").ZodString;
8
- subagent_type: import("zod").ZodEnum<{
9
- librarian: "librarian";
10
- explore: "explore";
11
- }>;
12
- run_in_background: import("zod").ZodBoolean;
13
- session_id: import("zod").ZodOptional<import("zod").ZodString>;
14
- };
15
- execute(args: {
16
- description: string;
17
- prompt: string;
18
- subagent_type: "librarian" | "explore";
19
- run_in_background: boolean;
20
- session_id?: string | undefined;
21
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
22
- };
3
+ export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager): ToolDefinition;
@@ -1,11 +1,2 @@
1
- export declare const glob: {
2
- description: string;
3
- args: {
4
- pattern: import("zod").ZodString;
5
- path: import("zod").ZodOptional<import("zod").ZodString>;
6
- };
7
- execute(args: {
8
- pattern: string;
9
- path?: string | undefined;
10
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
11
- };
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export declare const glob: ToolDefinition;
@@ -1,13 +1,2 @@
1
- export declare const grep: {
2
- description: string;
3
- args: {
4
- pattern: import("zod").ZodString;
5
- include: import("zod").ZodOptional<import("zod").ZodString>;
6
- path: import("zod").ZodOptional<import("zod").ZodString>;
7
- };
8
- execute(args: {
9
- pattern: string;
10
- include?: string | undefined;
11
- path?: string | undefined;
12
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
13
- };
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export declare const grep: ToolDefinition;