oh-my-opencode 2.0.3 → 2.1.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 +1 -1
- package/README.md +1 -1
- package/dist/agents/utils.d.ts +2 -1
- package/dist/config/schema.d.ts +6 -2
- package/dist/features/hook-message-injector/index.d.ts +3 -1
- package/dist/features/hook-message-injector/injector.d.ts +9 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/interactive-bash-session/constants.d.ts +4 -0
- package/dist/hooks/interactive-bash-session/index.d.ts +23 -0
- package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
- package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
- package/dist/hooks/non-interactive-env/constants.d.ts +2 -0
- package/dist/hooks/non-interactive-env/index.d.ts +12 -0
- package/dist/hooks/non-interactive-env/types.d.ts +3 -0
- package/dist/hooks/session-recovery/storage.d.ts +1 -0
- package/dist/index.js +1834 -970
- package/dist/tools/background-task/constants.d.ts +2 -2
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/interactive-bash/constants.d.ts +2 -0
- package/dist/tools/interactive-bash/index.d.ts +3 -0
- package/dist/tools/interactive-bash/tools.d.ts +14 -0
- package/dist/tools/interactive-bash/types.d.ts +3 -0
- package/dist/tools/interactive-bash/utils.d.ts +3 -0
- package/dist/tools/look-at/constants.d.ts +1 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -608,7 +608,7 @@ OmO를 비활성화하고 원래 build/plan 에이전트를 복원하려면:
|
|
|
608
608
|
}
|
|
609
609
|
```
|
|
610
610
|
|
|
611
|
-
사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`
|
|
611
|
+
사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`
|
|
612
612
|
|
|
613
613
|
### MCPs
|
|
614
614
|
|
package/README.md
CHANGED
|
@@ -609,7 +609,7 @@ Disable specific built-in hooks via `disabled_hooks` in `~/.config/opencode/oh-m
|
|
|
609
609
|
}
|
|
610
610
|
```
|
|
611
611
|
|
|
612
|
-
Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`
|
|
612
|
+
Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `tool-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`
|
|
613
613
|
|
|
614
614
|
### MCPs
|
|
615
615
|
|
package/dist/agents/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
2
|
import type { BuiltinAgentName, AgentOverrides } from "./types";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function createEnvContext(directory: string): string;
|
|
4
|
+
export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string): Record<string, AgentConfig>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -30,10 +30,12 @@ export declare const AgentNameSchema: z.ZodEnum<{
|
|
|
30
30
|
"multimodal-looker": "multimodal-looker";
|
|
31
31
|
}>;
|
|
32
32
|
export declare const HookNameSchema: z.ZodEnum<{
|
|
33
|
+
"todo-continuation-enforcer": "todo-continuation-enforcer";
|
|
33
34
|
"comment-checker": "comment-checker";
|
|
34
35
|
"rules-injector": "rules-injector";
|
|
35
36
|
"agent-usage-reminder": "agent-usage-reminder";
|
|
36
|
-
"
|
|
37
|
+
"non-interactive-env": "non-interactive-env";
|
|
38
|
+
"interactive-bash-session": "interactive-bash-session";
|
|
37
39
|
"context-window-monitor": "context-window-monitor";
|
|
38
40
|
"session-recovery": "session-recovery";
|
|
39
41
|
"session-notification": "session-notification";
|
|
@@ -584,10 +586,12 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
584
586
|
"multimodal-looker": "multimodal-looker";
|
|
585
587
|
}>>>;
|
|
586
588
|
disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
589
|
+
"todo-continuation-enforcer": "todo-continuation-enforcer";
|
|
587
590
|
"comment-checker": "comment-checker";
|
|
588
591
|
"rules-injector": "rules-injector";
|
|
589
592
|
"agent-usage-reminder": "agent-usage-reminder";
|
|
590
|
-
"
|
|
593
|
+
"non-interactive-env": "non-interactive-env";
|
|
594
|
+
"interactive-bash-session": "interactive-bash-session";
|
|
591
595
|
"context-window-monitor": "context-window-monitor";
|
|
592
596
|
"session-recovery": "session-recovery";
|
|
593
597
|
"session-notification": "session-notification";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { injectHookMessage } from "./injector";
|
|
1
|
+
export { injectHookMessage, findNearestMessageWithFields } from "./injector";
|
|
2
|
+
export type { StoredMessage } from "./injector";
|
|
2
3
|
export type { MessageMeta, OriginalMessageContext, TextPart } from "./types";
|
|
4
|
+
export { MESSAGE_STORAGE } from "./constants";
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import type { OriginalMessageContext } from "./types";
|
|
2
|
+
export interface StoredMessage {
|
|
3
|
+
agent?: string;
|
|
4
|
+
model?: {
|
|
5
|
+
providerID?: string;
|
|
6
|
+
modelID?: string;
|
|
7
|
+
};
|
|
8
|
+
tools?: Record<string, boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare function findNearestMessageWithFields(messageDir: string): StoredMessage | null;
|
|
2
11
|
export declare function injectHookMessage(sessionID: string, hookContent: string, originalMessage: OriginalMessageContext): boolean;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -16,3 +16,5 @@ export { createBackgroundNotificationHook } from "./background-notification";
|
|
|
16
16
|
export { createAutoUpdateCheckerHook } from "./auto-update-checker";
|
|
17
17
|
export { createAgentUsageReminderHook } from "./agent-usage-reminder";
|
|
18
18
|
export { createKeywordDetectorHook } from "./keyword-detector";
|
|
19
|
+
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
20
|
+
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
interface ToolExecuteInput {
|
|
3
|
+
tool: string;
|
|
4
|
+
sessionID: string;
|
|
5
|
+
callID: string;
|
|
6
|
+
args?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
interface ToolExecuteOutput {
|
|
9
|
+
title: string;
|
|
10
|
+
output: string;
|
|
11
|
+
metadata: unknown;
|
|
12
|
+
}
|
|
13
|
+
interface EventInput {
|
|
14
|
+
event: {
|
|
15
|
+
type: string;
|
|
16
|
+
properties?: unknown;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare function createInteractiveBashSessionHook(_ctx: PluginInput): {
|
|
20
|
+
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
21
|
+
event: ({ event }: EventInput) => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InteractiveBashSessionState } from "./types";
|
|
2
|
+
export declare function loadInteractiveBashSessionState(sessionID: string): InteractiveBashSessionState | null;
|
|
3
|
+
export declare function saveInteractiveBashSessionState(state: InteractiveBashSessionState): void;
|
|
4
|
+
export declare function clearInteractiveBashSessionState(sessionID: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export * from "./constants";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export declare function createNonInteractiveEnvHook(_ctx: PluginInput): {
|
|
5
|
+
"tool.execute.before": (input: {
|
|
6
|
+
tool: string;
|
|
7
|
+
sessionID: string;
|
|
8
|
+
callID: string;
|
|
9
|
+
}, output: {
|
|
10
|
+
args: Record<string, unknown>;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -10,6 +10,7 @@ export declare function findEmptyMessages(sessionID: string): string[];
|
|
|
10
10
|
export declare function findEmptyMessageByIndex(sessionID: string, targetIndex: number): string | null;
|
|
11
11
|
export declare function findFirstEmptyMessage(sessionID: string): string | null;
|
|
12
12
|
export declare function findMessagesWithThinkingBlocks(sessionID: string): string[];
|
|
13
|
+
export declare function findMessagesWithThinkingOnly(sessionID: string): string[];
|
|
13
14
|
export declare function findMessagesWithOrphanThinking(sessionID: string): string[];
|
|
14
15
|
export declare function prependThinkingPart(sessionID: string, messageID: string): boolean;
|
|
15
16
|
export declare function stripThinkingParts(messageID: string): boolean;
|