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 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
 
@@ -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 createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides): Record<string, AgentConfig>;
3
+ export declare function createEnvContext(directory: string): string;
4
+ export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string): Record<string, AgentConfig>;
@@ -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
- "todo-continuation-enforcer": "todo-continuation-enforcer";
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
- "todo-continuation-enforcer": "todo-continuation-enforcer";
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;
@@ -6,3 +6,4 @@ export declare const VERSION_FILE: string;
6
6
  export declare const INSTALLED_PACKAGE_JSON: string;
7
7
  export declare const USER_CONFIG_DIR: string;
8
8
  export declare const USER_OPENCODE_CONFIG: string;
9
+ export declare const USER_OPENCODE_CONFIG_JSONC: string;
@@ -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,4 @@
1
+ export declare const OPENCODE_STORAGE: string;
2
+ export declare const INTERACTIVE_BASH_SESSION_STORAGE: string;
3
+ export declare const OMO_SESSION_PREFIX = "omo-";
4
+ export declare function buildSessionReminderMessage(sessions: string[]): string;
@@ -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,10 @@
1
+ export interface InteractiveBashSessionState {
2
+ sessionID: string;
3
+ tmuxSessions: Set<string>;
4
+ updatedAt: number;
5
+ }
6
+ export interface SerializedInteractiveBashSessionState {
7
+ sessionID: string;
8
+ tmuxSessions: string[];
9
+ updatedAt: number;
10
+ }
@@ -0,0 +1,2 @@
1
+ export declare const HOOK_NAME = "non-interactive-env";
2
+ export declare const NON_INTERACTIVE_ENV: Record<string, string>;
@@ -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
+ };
@@ -0,0 +1,3 @@
1
+ export interface NonInteractiveEnvConfig {
2
+ disabled?: boolean;
3
+ }
@@ -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;