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.
Files changed (40) hide show
  1. package/README.ko.md +13 -0
  2. package/README.md +24 -0
  3. package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
  4. package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
  5. package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
  6. package/dist/features/claude-code-command-loader/index.d.ts +2 -0
  7. package/dist/features/claude-code-command-loader/loader.d.ts +5 -0
  8. package/dist/features/claude-code-command-loader/types.d.ts +23 -0
  9. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
  10. package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
  11. package/dist/features/claude-code-mcp-loader/loader.d.ts +3 -0
  12. package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
  13. package/dist/features/claude-code-mcp-loader/types.d.ts +35 -0
  14. package/dist/features/claude-code-session-state/detector.d.ts +1 -0
  15. package/dist/features/claude-code-session-state/index.d.ts +3 -0
  16. package/dist/features/claude-code-session-state/state.d.ts +13 -0
  17. package/dist/features/claude-code-session-state/types.d.ts +7 -0
  18. package/dist/features/claude-code-skill-loader/index.d.ts +2 -0
  19. package/dist/features/claude-code-skill-loader/loader.d.ts +3 -0
  20. package/dist/features/claude-code-skill-loader/types.d.ts +13 -0
  21. package/dist/hooks/index.d.ts +1 -0
  22. package/dist/hooks/think-mode/detector.d.ts +5 -0
  23. package/dist/hooks/think-mode/index.d.ts +14 -0
  24. package/dist/hooks/think-mode/switcher.d.ts +4 -0
  25. package/dist/hooks/think-mode/types.d.ts +20 -0
  26. package/dist/index.js +1293 -125
  27. package/dist/shared/command-executor.d.ts +21 -0
  28. package/dist/shared/file-reference-resolver.d.ts +1 -0
  29. package/dist/shared/frontmatter.d.ts +5 -0
  30. package/dist/shared/index.d.ts +5 -0
  31. package/dist/shared/logger.d.ts +2 -0
  32. package/dist/shared/model-sanitizer.d.ts +11 -0
  33. package/dist/tools/index.d.ts +18 -0
  34. package/dist/tools/skill/index.d.ts +2 -0
  35. package/dist/tools/skill/tools.d.ts +9 -0
  36. package/dist/tools/skill/types.d.ts +24 -0
  37. package/dist/tools/slashcommand/index.d.ts +2 -0
  38. package/dist/tools/slashcommand/tools.d.ts +9 -0
  39. package/dist/tools/slashcommand/types.d.ts +16 -0
  40. 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,5 @@
1
+ export interface FrontmatterResult<T = Record<string, string>> {
2
+ data: T;
3
+ body: string;
4
+ }
5
+ export declare function parseFrontmatter<T = Record<string, string>>(content: string): FrontmatterResult<T>;
@@ -0,0 +1,5 @@
1
+ export * from "./frontmatter";
2
+ export * from "./command-executor";
3
+ export * from "./file-reference-resolver";
4
+ export * from "./model-sanitizer";
5
+ export * from "./logger";
@@ -0,0 +1,2 @@
1
+ export declare function log(message: string, data?: unknown): void;
2
+ export declare function getLogFilePath(): 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;
@@ -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,2 @@
1
+ export * from "./types";
2
+ export { skill } from "./tools";
@@ -0,0 +1,9 @@
1
+ export declare const skill: {
2
+ description: string;
3
+ args: {
4
+ skill: import("zod").ZodString;
5
+ };
6
+ execute(args: {
7
+ skill: string;
8
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
9
+ };
@@ -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,2 @@
1
+ export * from "./types";
2
+ export { slashcommand } from "./tools";
@@ -0,0 +1,9 @@
1
+ export declare const slashcommand: {
2
+ description: string;
3
+ args: {
4
+ command: import("zod").ZodString;
5
+ };
6
+ execute(args: {
7
+ command: string;
8
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
9
+ };
@@ -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.1.31",
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.4.4",
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"