oh-my-opencode 0.1.26 → 0.1.27
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 +11 -5
- package/README.md +11 -5
- package/dist/hooks/directory-agents-injector/constants.d.ts +3 -0
- package/dist/hooks/directory-agents-injector/index.d.ts +22 -0
- package/dist/hooks/directory-agents-injector/storage.d.ts +3 -0
- package/dist/hooks/directory-agents-injector/types.d.ts +5 -0
- package/dist/hooks/empty-task-response-detector.d.ts +12 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/session-recovery/constants.d.ts +6 -0
- package/dist/hooks/session-recovery/index.d.ts +14 -0
- package/dist/hooks/session-recovery/storage.d.ts +14 -0
- package/dist/hooks/session-recovery/types.d.ts +75 -0
- package/dist/index.js +635 -278
- package/dist/tools/glob/cli.d.ts +2 -0
- package/dist/tools/glob/constants.d.ts +6 -0
- package/dist/tools/glob/index.d.ts +2 -0
- package/dist/tools/glob/tools.d.ts +11 -0
- package/dist/tools/glob/types.d.ts +19 -0
- package/dist/tools/glob/utils.d.ts +2 -0
- package/dist/tools/grep/index.d.ts +2 -0
- package/dist/tools/{safe-grep → grep}/tools.d.ts +1 -1
- package/dist/tools/index.d.ts +12 -1
- package/package.json +1 -1
- package/dist/hooks/grep-blocker.d.ts +0 -10
- package/dist/hooks/session-recovery.d.ts +0 -30
- package/dist/tools/safe-grep/index.d.ts +0 -2
- /package/dist/tools/{safe-grep → grep}/cli.d.ts +0 -0
- /package/dist/tools/{safe-grep → grep}/constants.d.ts +0 -0
- /package/dist/tools/{safe-grep → grep}/types.d.ts +0 -0
- /package/dist/tools/{safe-grep → grep}/utils.d.ts +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { resolveGrepCli, type GrepBackend } from "../grep/constants";
|
|
2
|
+
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
3
|
+
export declare const DEFAULT_LIMIT = 100;
|
|
4
|
+
export declare const DEFAULT_MAX_DEPTH = 20;
|
|
5
|
+
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
6
|
+
export declare const RG_FILES_FLAGS: readonly ["--files", "--color=never", "--glob=!.git/*"];
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface FileMatch {
|
|
2
|
+
path: string;
|
|
3
|
+
mtime: number;
|
|
4
|
+
}
|
|
5
|
+
export interface GlobResult {
|
|
6
|
+
files: FileMatch[];
|
|
7
|
+
totalFiles: number;
|
|
8
|
+
truncated: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GlobOptions {
|
|
12
|
+
pattern: string;
|
|
13
|
+
paths?: string[];
|
|
14
|
+
hidden?: boolean;
|
|
15
|
+
noIgnore?: boolean;
|
|
16
|
+
maxDepth?: number;
|
|
17
|
+
timeout?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -239,7 +239,7 @@ export declare const builtinTools: {
|
|
|
239
239
|
dryRun?: boolean | undefined;
|
|
240
240
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
241
241
|
};
|
|
242
|
-
|
|
242
|
+
grep: {
|
|
243
243
|
description: string;
|
|
244
244
|
args: {
|
|
245
245
|
pattern: import("zod").ZodString;
|
|
@@ -252,4 +252,15 @@ export declare const builtinTools: {
|
|
|
252
252
|
path?: string | undefined;
|
|
253
253
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
254
254
|
};
|
|
255
|
+
glob: {
|
|
256
|
+
description: string;
|
|
257
|
+
args: {
|
|
258
|
+
pattern: import("zod").ZodString;
|
|
259
|
+
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
260
|
+
};
|
|
261
|
+
execute(args: {
|
|
262
|
+
pattern: string;
|
|
263
|
+
path?: string | undefined;
|
|
264
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
265
|
+
};
|
|
255
266
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export declare function createGrepBlocker(_ctx: PluginInput): {
|
|
3
|
-
"tool.execute.before": (input: {
|
|
4
|
-
tool: string;
|
|
5
|
-
sessionID: string;
|
|
6
|
-
callID: string;
|
|
7
|
-
}, _output: {
|
|
8
|
-
args: unknown;
|
|
9
|
-
}) => Promise<void>;
|
|
10
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session Recovery - Message State Error Recovery
|
|
3
|
-
*
|
|
4
|
-
* Handles FOUR specific scenarios:
|
|
5
|
-
* 1. tool_use block exists without tool_result
|
|
6
|
-
* - Recovery: inject tool_result with "cancelled" content
|
|
7
|
-
*
|
|
8
|
-
* 2. Thinking block order violation (first block must be thinking)
|
|
9
|
-
* - Recovery: prepend empty thinking block
|
|
10
|
-
*
|
|
11
|
-
* 3. Thinking disabled but message contains thinking blocks
|
|
12
|
-
* - Recovery: strip thinking/redacted_thinking blocks
|
|
13
|
-
*
|
|
14
|
-
* 4. Empty content message (non-empty content required)
|
|
15
|
-
* - Recovery: inject text part directly via filesystem
|
|
16
|
-
*/
|
|
17
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
18
|
-
interface MessageInfo {
|
|
19
|
-
id?: string;
|
|
20
|
-
role?: string;
|
|
21
|
-
sessionID?: string;
|
|
22
|
-
parentID?: string;
|
|
23
|
-
error?: unknown;
|
|
24
|
-
}
|
|
25
|
-
export declare function createSessionRecoveryHook(ctx: PluginInput): {
|
|
26
|
-
handleSessionRecovery: (info: MessageInfo) => Promise<boolean>;
|
|
27
|
-
isRecoverableError: (error: unknown) => boolean;
|
|
28
|
-
setOnAbortCallback: (callback: (sessionID: string) => void) => void;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|