oh-my-opencode 2.2.1 → 2.3.1

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,2 +1,2 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
- export declare const omoAgent: AgentConfig;
2
+ export declare const sisyphusAgent: AgentConfig;
@@ -1,5 +1,5 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
- export type BuiltinAgentName = "OmO" | "oracle" | "librarian" | "explore" | "frontend-ui-ux-engineer" | "document-writer" | "multimodal-looker";
2
+ export type BuiltinAgentName = "Sisyphus" | "oracle" | "librarian" | "explore" | "frontend-ui-ux-engineer" | "document-writer" | "multimodal-looker";
3
3
  export type OverridableAgentName = "build" | BuiltinAgentName;
4
4
  export type AgentName = BuiltinAgentName;
5
5
  export type AgentOverrideConfig = Partial<AgentConfig>;
@@ -1,2 +1,2 @@
1
- export { OhMyOpenCodeConfigSchema, AgentOverrideConfigSchema, AgentOverridesSchema, McpNameSchema, AgentNameSchema, HookNameSchema, OmoAgentConfigSchema, } from "./schema";
2
- export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, McpName, AgentName, HookName, OmoAgentConfig, } from "./schema";
1
+ export { OhMyOpenCodeConfigSchema, AgentOverrideConfigSchema, AgentOverridesSchema, McpNameSchema, AgentNameSchema, HookNameSchema, SisyphusAgentConfigSchema, ExperimentalConfigSchema, } from "./schema";
2
+ export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, McpName, AgentName, HookName, SisyphusAgentConfig, ExperimentalConfig, } from "./schema";
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const BuiltinAgentNameSchema: z.ZodEnum<{
3
- OmO: "OmO";
3
+ Sisyphus: "Sisyphus";
4
4
  oracle: "oracle";
5
5
  librarian: "librarian";
6
6
  explore: "explore";
@@ -9,7 +9,7 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
9
9
  "multimodal-looker": "multimodal-looker";
10
10
  }>;
11
11
  export declare const OverridableAgentNameSchema: z.ZodEnum<{
12
- OmO: "OmO";
12
+ Sisyphus: "Sisyphus";
13
13
  oracle: "oracle";
14
14
  librarian: "librarian";
15
15
  explore: "explore";
@@ -18,10 +18,10 @@ export declare const OverridableAgentNameSchema: z.ZodEnum<{
18
18
  "multimodal-looker": "multimodal-looker";
19
19
  build: "build";
20
20
  plan: "plan";
21
- "OmO-Plan": "OmO-Plan";
21
+ "Planner-Sisyphus": "Planner-Sisyphus";
22
22
  }>;
23
23
  export declare const AgentNameSchema: z.ZodEnum<{
24
- OmO: "OmO";
24
+ Sisyphus: "Sisyphus";
25
25
  oracle: "oracle";
26
26
  librarian: "librarian";
27
27
  explore: "explore";
@@ -31,14 +31,10 @@ export declare const AgentNameSchema: z.ZodEnum<{
31
31
  }>;
32
32
  export declare const HookNameSchema: z.ZodEnum<{
33
33
  "todo-continuation-enforcer": "todo-continuation-enforcer";
34
- "comment-checker": "comment-checker";
35
- "rules-injector": "rules-injector";
36
- "agent-usage-reminder": "agent-usage-reminder";
37
- "non-interactive-env": "non-interactive-env";
38
- "interactive-bash-session": "interactive-bash-session";
39
34
  "context-window-monitor": "context-window-monitor";
40
35
  "session-recovery": "session-recovery";
41
36
  "session-notification": "session-notification";
37
+ "comment-checker": "comment-checker";
42
38
  "grep-output-truncator": "grep-output-truncator";
43
39
  "tool-output-truncator": "tool-output-truncator";
44
40
  "directory-agents-injector": "directory-agents-injector";
@@ -46,10 +42,14 @@ export declare const HookNameSchema: z.ZodEnum<{
46
42
  "empty-task-response-detector": "empty-task-response-detector";
47
43
  "think-mode": "think-mode";
48
44
  "anthropic-auto-compact": "anthropic-auto-compact";
45
+ "rules-injector": "rules-injector";
49
46
  "background-notification": "background-notification";
50
47
  "auto-update-checker": "auto-update-checker";
51
48
  "startup-toast": "startup-toast";
52
49
  "keyword-detector": "keyword-detector";
50
+ "agent-usage-reminder": "agent-usage-reminder";
51
+ "non-interactive-env": "non-interactive-env";
52
+ "interactive-bash-session": "interactive-bash-session";
53
53
  "empty-message-sanitizer": "empty-message-sanitizer";
54
54
  }>;
55
55
  export declare const AgentOverrideConfigSchema: z.ZodObject<{
@@ -191,7 +191,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
191
191
  }>>;
192
192
  }, z.core.$strip>>;
193
193
  }, z.core.$strip>>;
194
- OmO: z.ZodOptional<z.ZodObject<{
194
+ Sisyphus: z.ZodOptional<z.ZodObject<{
195
195
  model: z.ZodOptional<z.ZodString>;
196
196
  temperature: z.ZodOptional<z.ZodNumber>;
197
197
  top_p: z.ZodOptional<z.ZodNumber>;
@@ -237,7 +237,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
237
237
  }>>;
238
238
  }, z.core.$strip>>;
239
239
  }, z.core.$strip>>;
240
- "OmO-Plan": z.ZodOptional<z.ZodObject<{
240
+ "Planner-Sisyphus": z.ZodOptional<z.ZodObject<{
241
241
  model: z.ZodOptional<z.ZodString>;
242
242
  temperature: z.ZodOptional<z.ZodNumber>;
243
243
  top_p: z.ZodOptional<z.ZodNumber>;
@@ -567,9 +567,14 @@ export declare const ClaudeCodeConfigSchema: z.ZodObject<{
567
567
  agents: z.ZodOptional<z.ZodBoolean>;
568
568
  hooks: z.ZodOptional<z.ZodBoolean>;
569
569
  }, z.core.$strip>;
570
- export declare const OmoAgentConfigSchema: z.ZodObject<{
570
+ export declare const SisyphusAgentConfigSchema: z.ZodObject<{
571
571
  disabled: z.ZodOptional<z.ZodBoolean>;
572
572
  }, z.core.$strip>;
573
+ export declare const ExperimentalConfigSchema: z.ZodObject<{
574
+ aggressive_truncation: z.ZodOptional<z.ZodBoolean>;
575
+ empty_message_recovery: z.ZodOptional<z.ZodBoolean>;
576
+ auto_resume: z.ZodOptional<z.ZodBoolean>;
577
+ }, z.core.$strip>;
573
578
  export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
574
579
  $schema: z.ZodOptional<z.ZodString>;
575
580
  disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -578,7 +583,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
578
583
  grep_app: "grep_app";
579
584
  }>>>;
580
585
  disabled_agents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
581
- OmO: "OmO";
586
+ Sisyphus: "Sisyphus";
582
587
  oracle: "oracle";
583
588
  librarian: "librarian";
584
589
  explore: "explore";
@@ -588,14 +593,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
588
593
  }>>>;
589
594
  disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
590
595
  "todo-continuation-enforcer": "todo-continuation-enforcer";
591
- "comment-checker": "comment-checker";
592
- "rules-injector": "rules-injector";
593
- "agent-usage-reminder": "agent-usage-reminder";
594
- "non-interactive-env": "non-interactive-env";
595
- "interactive-bash-session": "interactive-bash-session";
596
596
  "context-window-monitor": "context-window-monitor";
597
597
  "session-recovery": "session-recovery";
598
598
  "session-notification": "session-notification";
599
+ "comment-checker": "comment-checker";
599
600
  "grep-output-truncator": "grep-output-truncator";
600
601
  "tool-output-truncator": "tool-output-truncator";
601
602
  "directory-agents-injector": "directory-agents-injector";
@@ -603,10 +604,14 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
603
604
  "empty-task-response-detector": "empty-task-response-detector";
604
605
  "think-mode": "think-mode";
605
606
  "anthropic-auto-compact": "anthropic-auto-compact";
607
+ "rules-injector": "rules-injector";
606
608
  "background-notification": "background-notification";
607
609
  "auto-update-checker": "auto-update-checker";
608
610
  "startup-toast": "startup-toast";
609
611
  "keyword-detector": "keyword-detector";
612
+ "agent-usage-reminder": "agent-usage-reminder";
613
+ "non-interactive-env": "non-interactive-env";
614
+ "interactive-bash-session": "interactive-bash-session";
610
615
  "empty-message-sanitizer": "empty-message-sanitizer";
611
616
  }>>>;
612
617
  agents: z.ZodOptional<z.ZodObject<{
@@ -702,7 +707,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
702
707
  }>>;
703
708
  }, z.core.$strip>>;
704
709
  }, z.core.$strip>>;
705
- OmO: z.ZodOptional<z.ZodObject<{
710
+ Sisyphus: z.ZodOptional<z.ZodObject<{
706
711
  model: z.ZodOptional<z.ZodString>;
707
712
  temperature: z.ZodOptional<z.ZodNumber>;
708
713
  top_p: z.ZodOptional<z.ZodNumber>;
@@ -748,7 +753,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
748
753
  }>>;
749
754
  }, z.core.$strip>>;
750
755
  }, z.core.$strip>>;
751
- "OmO-Plan": z.ZodOptional<z.ZodObject<{
756
+ "Planner-Sisyphus": z.ZodOptional<z.ZodObject<{
752
757
  model: z.ZodOptional<z.ZodString>;
753
758
  temperature: z.ZodOptional<z.ZodNumber>;
754
759
  top_p: z.ZodOptional<z.ZodNumber>;
@@ -1079,14 +1084,20 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
1079
1084
  hooks: z.ZodOptional<z.ZodBoolean>;
1080
1085
  }, z.core.$strip>>;
1081
1086
  google_auth: z.ZodOptional<z.ZodBoolean>;
1082
- omo_agent: z.ZodOptional<z.ZodObject<{
1087
+ sisyphus_agent: z.ZodOptional<z.ZodObject<{
1083
1088
  disabled: z.ZodOptional<z.ZodBoolean>;
1084
1089
  }, z.core.$strip>>;
1090
+ experimental: z.ZodOptional<z.ZodObject<{
1091
+ aggressive_truncation: z.ZodOptional<z.ZodBoolean>;
1092
+ empty_message_recovery: z.ZodOptional<z.ZodBoolean>;
1093
+ auto_resume: z.ZodOptional<z.ZodBoolean>;
1094
+ }, z.core.$strip>>;
1085
1095
  }, z.core.$strip>;
1086
1096
  export type OhMyOpenCodeConfig = z.infer<typeof OhMyOpenCodeConfigSchema>;
1087
1097
  export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
1088
1098
  export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
1089
1099
  export type AgentName = z.infer<typeof AgentNameSchema>;
1090
1100
  export type HookName = z.infer<typeof HookNameSchema>;
1091
- export type OmoAgentConfig = z.infer<typeof OmoAgentConfigSchema>;
1101
+ export type SisyphusAgentConfig = z.infer<typeof SisyphusAgentConfigSchema>;
1102
+ export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;
1092
1103
  export { McpNameSchema, type McpName } from "../mcp/types";
@@ -21,6 +21,7 @@ export declare class BackgroundManager {
21
21
  launch(input: LaunchInput): Promise<BackgroundTask>;
22
22
  getTask(id: string): BackgroundTask | undefined;
23
23
  getTasksByParentSession(sessionID: string): BackgroundTask[];
24
+ getAllDescendantTasks(sessionID: string): BackgroundTask[];
24
25
  findBySession(sessionID: string): BackgroundTask | undefined;
25
26
  private checkSessionTodos;
26
27
  handleEvent(event: Event): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
1
  import type { AutoCompactState } from "./types";
2
+ import type { ExperimentalConfig } from "../../config";
2
3
  export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<Record<string, unknown> | null>;
3
- export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string): Promise<void>;
4
+ export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig): Promise<void>;
@@ -1,5 +1,9 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare function createAnthropicAutoCompactHook(ctx: PluginInput): {
2
+ import type { ExperimentalConfig } from "../../config";
3
+ export interface AnthropicAutoCompactOptions {
4
+ experimental?: ExperimentalConfig;
5
+ }
6
+ export declare function createAnthropicAutoCompactHook(ctx: PluginInput, options?: AnthropicAutoCompactOptions): {
3
7
  event: ({ event }: {
4
8
  event: {
5
9
  type: string;
@@ -14,3 +14,15 @@ export declare function truncateToolResult(partPath: string): {
14
14
  };
15
15
  export declare function getTotalToolOutputSize(sessionID: string): number;
16
16
  export declare function countTruncatedResults(sessionID: string): number;
17
+ export interface AggressiveTruncateResult {
18
+ success: boolean;
19
+ sufficient: boolean;
20
+ truncatedCount: number;
21
+ totalBytesRemoved: number;
22
+ targetBytesToRemove: number;
23
+ truncatedTools: Array<{
24
+ toolName: string;
25
+ originalSize: number;
26
+ }>;
27
+ }
28
+ export declare function truncateUntilTargetTokens(sessionID: string, currentTokens: number, maxTokens: number, targetRatio?: number, charsPerToken?: number): AggressiveTruncateResult;
@@ -24,6 +24,7 @@ export interface AutoCompactState {
24
24
  retryStateBySession: Map<string, RetryState>;
25
25
  fallbackStateBySession: Map<string, FallbackState>;
26
26
  truncateStateBySession: Map<string, TruncateState>;
27
+ emptyContentAttemptBySession: Map<string, number>;
27
28
  compactionInProgress: Set<string>;
28
29
  }
29
30
  export declare const RETRY_CONFIG: {
@@ -37,6 +38,8 @@ export declare const FALLBACK_CONFIG: {
37
38
  readonly minMessagesRequired: 2;
38
39
  };
39
40
  export declare const TRUNCATE_CONFIG: {
40
- readonly maxTruncateAttempts: 10;
41
- readonly minOutputSizeToTruncate: 1000;
41
+ readonly maxTruncateAttempts: 20;
42
+ readonly minOutputSizeToTruncate: 500;
43
+ readonly targetTokenRatio: 0.5;
44
+ readonly charsPerToken: 4;
42
45
  };
@@ -20,4 +20,5 @@ export interface UpdateCheckResult {
20
20
  }
21
21
  export interface AutoUpdateCheckerOptions {
22
22
  showStartupToast?: boolean;
23
+ isSisyphusEnabled?: boolean;
23
24
  }
@@ -1,14 +1,13 @@
1
1
  export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
2
2
  export { createContextWindowMonitorHook } from "./context-window-monitor";
3
3
  export { createSessionNotification } from "./session-notification";
4
- export { createSessionRecoveryHook, type SessionRecoveryHook } from "./session-recovery";
4
+ export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
5
5
  export { createCommentCheckerHooks } from "./comment-checker";
6
- export { createGrepOutputTruncatorHook } from "./grep-output-truncator";
7
6
  export { createToolOutputTruncatorHook } from "./tool-output-truncator";
8
7
  export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
9
8
  export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
10
9
  export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
11
- export { createAnthropicAutoCompactHook } from "./anthropic-auto-compact";
10
+ export { createAnthropicAutoCompactHook, type AnthropicAutoCompactOptions } from "./anthropic-auto-compact";
12
11
  export { createThinkModeHook } from "./think-mode";
13
12
  export { createClaudeCodeHooksHook } from "./claude-code-hooks";
14
13
  export { createRulesInjectorHook } from "./rules-injector";
@@ -1,4 +1,8 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { ExperimentalConfig } from "../../config";
3
+ export interface SessionRecoveryOptions {
4
+ experimental?: ExperimentalConfig;
5
+ }
2
6
  interface MessageInfo {
3
7
  id?: string;
4
8
  role?: string;
@@ -12,5 +16,5 @@ export interface SessionRecoveryHook {
12
16
  setOnAbortCallback: (callback: (sessionID: string) => void) => void;
13
17
  setOnRecoveryCompleteCallback: (callback: (sessionID: string) => void) => void;
14
18
  }
15
- export declare function createSessionRecoveryHook(ctx: PluginInput): SessionRecoveryHook;
19
+ export declare function createSessionRecoveryHook(ctx: PluginInput, options?: SessionRecoveryOptions): SessionRecoveryHook;
16
20
  export {};
@@ -62,6 +62,13 @@ export interface MessageData {
62
62
  sessionID?: string;
63
63
  parentID?: string;
64
64
  error?: unknown;
65
+ agent?: string;
66
+ model?: {
67
+ providerID: string;
68
+ modelID: string;
69
+ };
70
+ system?: string;
71
+ tools?: Record<string, boolean>;
65
72
  };
66
73
  parts?: Array<{
67
74
  type: string;
@@ -73,3 +80,11 @@ export interface MessageData {
73
80
  callID?: string;
74
81
  }>;
75
82
  }
83
+ export interface ResumeConfig {
84
+ sessionID: string;
85
+ agent?: string;
86
+ model?: {
87
+ providerID: string;
88
+ modelID: string;
89
+ };
90
+ }
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ import type { Plugin } from "@opencode-ai/plugin";
2
2
  declare const OhMyOpenCodePlugin: Plugin;
3
3
  export default OhMyOpenCodePlugin;
4
4
  export type { OhMyOpenCodeConfig, AgentName, AgentOverrideConfig, AgentOverrides, McpName, HookName, } from "./config";
5
+ export type { ConfigLoadError } from "./shared/config-errors";