oh-my-opencode 2.0.4 → 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.
@@ -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,11 +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";
37
- "todo-continuation-enforcer": "todo-continuation-enforcer";
38
+ "interactive-bash-session": "interactive-bash-session";
38
39
  "context-window-monitor": "context-window-monitor";
39
40
  "session-recovery": "session-recovery";
40
41
  "session-notification": "session-notification";
@@ -585,11 +586,12 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
585
586
  "multimodal-looker": "multimodal-looker";
586
587
  }>>>;
587
588
  disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
589
+ "todo-continuation-enforcer": "todo-continuation-enforcer";
588
590
  "comment-checker": "comment-checker";
589
591
  "rules-injector": "rules-injector";
590
592
  "agent-usage-reminder": "agent-usage-reminder";
591
593
  "non-interactive-env": "non-interactive-env";
592
- "todo-continuation-enforcer": "todo-continuation-enforcer";
594
+ "interactive-bash-session": "interactive-bash-session";
593
595
  "context-window-monitor": "context-window-monitor";
594
596
  "session-recovery": "session-recovery";
595
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;
@@ -17,3 +17,4 @@ export { createAutoUpdateCheckerHook } from "./auto-update-checker";
17
17
  export { createAgentUsageReminderHook } from "./agent-usage-reminder";
18
18
  export { createKeywordDetectorHook } from "./keyword-detector";
19
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
+ }