oh-my-opencode 0.1.31 → 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.
- package/README.ko.md +13 -0
- package/README.md +24 -0
- package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
- package/dist/features/claude-code-command-loader/index.d.ts +2 -0
- package/dist/features/claude-code-command-loader/loader.d.ts +5 -0
- package/dist/features/claude-code-command-loader/types.d.ts +23 -0
- package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
- package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
- package/dist/features/claude-code-mcp-loader/loader.d.ts +3 -0
- package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
- package/dist/features/claude-code-mcp-loader/types.d.ts +35 -0
- package/dist/features/claude-code-session-state/detector.d.ts +1 -0
- package/dist/features/claude-code-session-state/index.d.ts +3 -0
- package/dist/features/claude-code-session-state/state.d.ts +13 -0
- package/dist/features/claude-code-session-state/types.d.ts +7 -0
- package/dist/features/claude-code-skill-loader/index.d.ts +2 -0
- package/dist/features/claude-code-skill-loader/loader.d.ts +3 -0
- package/dist/features/claude-code-skill-loader/types.d.ts +13 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/think-mode/detector.d.ts +5 -0
- package/dist/hooks/think-mode/index.d.ts +14 -0
- package/dist/hooks/think-mode/switcher.d.ts +4 -0
- package/dist/hooks/think-mode/types.d.ts +20 -0
- package/dist/index.js +1293 -125
- package/dist/shared/command-executor.d.ts +21 -0
- package/dist/shared/file-reference-resolver.d.ts +1 -0
- package/dist/shared/frontmatter.d.ts +5 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/logger.d.ts +2 -0
- package/dist/shared/model-sanitizer.d.ts +11 -0
- package/dist/tools/index.d.ts +18 -0
- package/dist/tools/skill/index.d.ts +2 -0
- package/dist/tools/skill/tools.d.ts +9 -0
- package/dist/tools/skill/types.d.ts +24 -0
- package/dist/tools/slashcommand/index.d.ts +2 -0
- package/dist/tools/slashcommand/tools.d.ts +9 -0
- package/dist/tools/slashcommand/types.d.ts +16 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface CommandResult {
|
|
2
|
+
exitCode: number;
|
|
3
|
+
stdout?: string;
|
|
4
|
+
stderr?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ExecuteHookOptions {
|
|
7
|
+
forceZsh?: boolean;
|
|
8
|
+
zshPath?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Execute a hook command with stdin input
|
|
12
|
+
*/
|
|
13
|
+
export declare function executeHookCommand(command: string, stdin: string, cwd: string, options?: ExecuteHookOptions): Promise<CommandResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Execute a simple command and return output
|
|
16
|
+
*/
|
|
17
|
+
export declare function executeCommand(command: string): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve embedded commands in text recursively
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveCommandsInText(text: string, depth?: number, maxDepth?: number): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveFileReferencesInText(text: string, cwd?: string, depth?: number, maxDepth?: number): Promise<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes model field from frontmatter.
|
|
3
|
+
* Always returns undefined to let SDK use default model.
|
|
4
|
+
*
|
|
5
|
+
* Claude Code and OpenCode use different model ID formats,
|
|
6
|
+
* so we ignore the model field and let OpenCode use its configured default.
|
|
7
|
+
*
|
|
8
|
+
* @param _model - Raw model value from frontmatter (ignored)
|
|
9
|
+
* @returns Always undefined to inherit default model
|
|
10
|
+
*/
|
|
11
|
+
export declare function sanitizeModelField(_model: unknown): undefined;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -263,4 +263,22 @@ export declare const builtinTools: {
|
|
|
263
263
|
path?: string | undefined;
|
|
264
264
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
265
265
|
};
|
|
266
|
+
slashcommand: {
|
|
267
|
+
description: string;
|
|
268
|
+
args: {
|
|
269
|
+
command: import("zod").ZodString;
|
|
270
|
+
};
|
|
271
|
+
execute(args: {
|
|
272
|
+
command: string;
|
|
273
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
274
|
+
};
|
|
275
|
+
skill: {
|
|
276
|
+
description: string;
|
|
277
|
+
args: {
|
|
278
|
+
skill: import("zod").ZodString;
|
|
279
|
+
};
|
|
280
|
+
execute(args: {
|
|
281
|
+
skill: string;
|
|
282
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
283
|
+
};
|
|
266
284
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type SkillScope = "user" | "project";
|
|
2
|
+
export interface SkillMetadata {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
license?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SkillInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
path: string;
|
|
10
|
+
metadata: SkillMetadata;
|
|
11
|
+
content: string;
|
|
12
|
+
references: string[];
|
|
13
|
+
scripts: string[];
|
|
14
|
+
assets: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface LoadedSkill {
|
|
17
|
+
name: string;
|
|
18
|
+
metadata: SkillMetadata;
|
|
19
|
+
body: string;
|
|
20
|
+
referencesLoaded: Array<{
|
|
21
|
+
path: string;
|
|
22
|
+
content: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type CommandScope = "user" | "project" | "opencode" | "opencode-project";
|
|
2
|
+
export interface CommandMetadata {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
argumentHint?: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
agent?: string;
|
|
8
|
+
subtask?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface CommandInfo {
|
|
11
|
+
name: string;
|
|
12
|
+
path: string;
|
|
13
|
+
metadata: CommandMetadata;
|
|
14
|
+
content: string;
|
|
15
|
+
scope: CommandScope;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ast-grep/cli": "^0.40.0",
|
|
46
46
|
"@ast-grep/napi": "^0.40.0",
|
|
47
|
-
"@code-yeongyu/comment-checker": "^0.
|
|
47
|
+
"@code-yeongyu/comment-checker": "^0.5.0",
|
|
48
48
|
"@opencode-ai/plugin": "^1.0.7",
|
|
49
49
|
"xdg-basedir": "^5.1.0",
|
|
50
50
|
"zod": "^4.1.8"
|