oh-my-opencode 3.7.1 → 3.7.2

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.
@@ -0,0 +1,2 @@
1
+ import type { OpencodeClient } from "@opencode-ai/sdk";
2
+ export declare function loadAgentProfileColors(client: OpencodeClient): Promise<Record<string, string>>;
@@ -0,0 +1,9 @@
1
+ export interface ContinuationState {
2
+ hasActiveBoulder: boolean;
3
+ hasActiveRalphLoop: boolean;
4
+ hasHookMarker: boolean;
5
+ hasTodoHookMarker: boolean;
6
+ hasActiveHookMarker: boolean;
7
+ activeHookMarkerReason: string | null;
8
+ }
9
+ export declare function getContinuationState(directory: string, sessionID: string): ContinuationState;
@@ -0,0 +1,5 @@
1
+ export declare const displayChars: {
2
+ readonly treeEnd: "`-" | "└─";
3
+ readonly treeIndent: " ";
4
+ readonly treeJoin: " " | " ";
5
+ };
@@ -4,6 +4,7 @@ export declare function handleSessionIdle(ctx: RunContext, payload: EventPayload
4
4
  export declare function handleSessionStatus(ctx: RunContext, payload: EventPayload, state: EventState): void;
5
5
  export declare function handleSessionError(ctx: RunContext, payload: EventPayload, state: EventState): void;
6
6
  export declare function handleMessagePartUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
7
+ export declare function handleMessagePartDelta(ctx: RunContext, payload: EventPayload, state: EventState): void;
7
8
  export declare function handleMessageUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
8
9
  export declare function handleToolExecute(ctx: RunContext, payload: EventPayload, state: EventState): void;
9
10
  export declare function handleToolResult(ctx: RunContext, payload: EventPayload, state: EventState): void;
@@ -9,5 +9,35 @@ export interface EventState {
9
9
  hasReceivedMeaningfulWork: boolean;
10
10
  /** Count of assistant messages for the main session */
11
11
  messageCount: number;
12
+ /** Current agent name from the latest assistant message */
13
+ currentAgent: string | null;
14
+ /** Current model ID from the latest assistant message */
15
+ currentModel: string | null;
16
+ /** Current model variant from the latest assistant message */
17
+ currentVariant: string | null;
18
+ /** Current message role (user/assistant) — used to filter user messages from display */
19
+ currentMessageRole: string | null;
20
+ /** Agent profile colors keyed by display name */
21
+ agentColorsByName: Record<string, string>;
22
+ /** Part type registry keyed by partID (text, reasoning, tool, ...) */
23
+ partTypesById: Record<string, string>;
24
+ /** Whether a THINK block is currently open in output */
25
+ inThinkBlock: boolean;
26
+ /** Tracks streamed reasoning text to avoid duplicates */
27
+ lastReasoningText: string;
28
+ /** Whether compact thinking line already printed for current reasoning block */
29
+ hasPrintedThinkingLine: boolean;
30
+ /** Last rendered thinking line width (for in-place padding updates) */
31
+ lastThinkingLineWidth: number;
32
+ /** Message role lookup by message ID to filter user parts */
33
+ messageRoleById: Record<string, string>;
34
+ /** Last rendered thinking summary (to avoid duplicate re-render) */
35
+ lastThinkingSummary: string;
36
+ /** Whether text stream is currently at line start (for padding) */
37
+ textAtLineStart: boolean;
38
+ /** Whether reasoning stream is currently at line start (for padding) */
39
+ thinkingAtLineStart: boolean;
40
+ /** Current assistant message ID — prevents counter resets on repeated message.updated for same message */
41
+ currentMessageId: string | null;
12
42
  }
13
43
  export declare function createEventState(): EventState;
@@ -0,0 +1,7 @@
1
+ export declare function renderAgentHeader(agent: string | null, model: string | null, variant: string | null, agentColorsByName: Record<string, string>): void;
2
+ export declare function openThinkBlock(): void;
3
+ export declare function closeThinkBlock(): void;
4
+ export declare function writePaddedText(text: string, atLineStart: boolean): {
5
+ output: string;
6
+ atLineStart: boolean;
7
+ };
@@ -0,0 +1,6 @@
1
+ export interface ToolHeader {
2
+ icon: string;
3
+ title: string;
4
+ description?: string;
5
+ }
6
+ export declare function formatToolHeader(toolName: string, input: Record<string, unknown>): ToolHeader;
@@ -3,8 +3,8 @@ export type { OpencodeClient };
3
3
  export interface RunOptions {
4
4
  message: string;
5
5
  agent?: string;
6
+ verbose?: boolean;
6
7
  directory?: string;
7
- timeout?: number;
8
8
  port?: number;
9
9
  attach?: string;
10
10
  onComplete?: string;
@@ -27,6 +27,7 @@ export interface RunContext {
27
27
  sessionID: string;
28
28
  directory: string;
29
29
  abortController: AbortController;
30
+ verbose?: boolean;
30
31
  }
31
32
  export interface Todo {
32
33
  id?: string;
@@ -57,12 +58,14 @@ export interface SessionStatusProps {
57
58
  }
58
59
  export interface MessageUpdatedProps {
59
60
  info?: {
61
+ id?: string;
60
62
  sessionID?: string;
61
63
  sessionId?: string;
62
64
  role?: string;
63
65
  modelID?: string;
64
66
  providerID?: string;
65
67
  agent?: string;
68
+ variant?: string;
66
69
  };
67
70
  }
68
71
  export interface MessagePartUpdatedProps {
@@ -95,6 +98,14 @@ export interface MessagePartUpdatedProps {
95
98
  };
96
99
  };
97
100
  }
101
+ export interface MessagePartDeltaProps {
102
+ sessionID?: string;
103
+ sessionId?: string;
104
+ messageID?: string;
105
+ partID?: string;
106
+ field?: string;
107
+ delta?: string;
108
+ }
98
109
  export interface ToolExecuteProps {
99
110
  sessionID?: string;
100
111
  sessionId?: string;
@@ -32,9 +32,11 @@ export declare const HookNameSchema: z.ZodEnum<{
32
32
  "claude-code-hooks": "claude-code-hooks";
33
33
  "auto-slash-command": "auto-slash-command";
34
34
  "edit-error-recovery": "edit-error-recovery";
35
+ "json-error-recovery": "json-error-recovery";
35
36
  "delegate-task-retry": "delegate-task-retry";
36
37
  "prometheus-md-only": "prometheus-md-only";
37
38
  "sisyphus-junior-notepad": "sisyphus-junior-notepad";
39
+ "sisyphus-gpt-hephaestus-reminder": "sisyphus-gpt-hephaestus-reminder";
38
40
  "unstable-agent-babysitter": "unstable-agent-babysitter";
39
41
  "task-reminder": "task-reminder";
40
42
  "task-resume-info": "task-resume-info";
@@ -56,9 +56,11 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
56
56
  "claude-code-hooks": "claude-code-hooks";
57
57
  "auto-slash-command": "auto-slash-command";
58
58
  "edit-error-recovery": "edit-error-recovery";
59
+ "json-error-recovery": "json-error-recovery";
59
60
  "delegate-task-retry": "delegate-task-retry";
60
61
  "prometheus-md-only": "prometheus-md-only";
61
62
  "sisyphus-junior-notepad": "sisyphus-junior-notepad";
63
+ "sisyphus-gpt-hephaestus-reminder": "sisyphus-gpt-hephaestus-reminder";
62
64
  "unstable-agent-babysitter": "unstable-agent-babysitter";
63
65
  "task-reminder": "task-reminder";
64
66
  "task-resume-info": "task-resume-info";
@@ -49,10 +49,12 @@ export declare function createHooks(args: {
49
49
  interactiveBashSession: ReturnType<typeof import("./hooks").createInteractiveBashSessionHook> | null;
50
50
  ralphLoop: ReturnType<typeof import("./hooks").createRalphLoopHook> | null;
51
51
  editErrorRecovery: ReturnType<typeof import("./hooks").createEditErrorRecoveryHook> | null;
52
+ jsonErrorRecovery: ReturnType<typeof import("./hooks").createJsonErrorRecoveryHook> | null;
52
53
  delegateTaskRetry: ReturnType<typeof import("./hooks").createDelegateTaskRetryHook> | null;
53
54
  startWork: ReturnType<typeof import("./hooks").createStartWorkHook> | null;
54
55
  prometheusMdOnly: ReturnType<typeof import("./hooks").createPrometheusMdOnlyHook> | null;
55
56
  sisyphusJuniorNotepad: ReturnType<typeof import("./hooks").createSisyphusJuniorNotepadHook> | null;
57
+ sisyphusGptHephaestusReminder: ReturnType<typeof import("./hooks").createSisyphusGptHephaestusReminderHook> | null;
56
58
  questionLabelTruncator: ReturnType<typeof import("./hooks").createQuestionLabelTruncatorHook>;
57
59
  taskResumeInfo: ReturnType<typeof import("./hooks").createTaskResumeInfoHook>;
58
60
  anthropicEffort: ReturnType<typeof import("./hooks/anthropic-effort").createAnthropicEffortHook> | null;
@@ -0,0 +1 @@
1
+ export declare const CONTINUATION_MARKER_DIR = ".sisyphus/run-continuation";
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./constants";
3
+ export * from "./storage";
@@ -0,0 +1,6 @@
1
+ import type { ContinuationMarker, ContinuationMarkerSource, ContinuationMarkerState } from "./types";
2
+ export declare function readContinuationMarker(directory: string, sessionID: string): ContinuationMarker | null;
3
+ export declare function setContinuationMarkerSource(directory: string, sessionID: string, source: ContinuationMarkerSource, state: ContinuationMarkerState, reason?: string): ContinuationMarker;
4
+ export declare function clearContinuationMarker(directory: string, sessionID: string): void;
5
+ export declare function isContinuationMarkerActive(marker: ContinuationMarker | null): boolean;
6
+ export declare function getActiveContinuationMarkerReason(marker: ContinuationMarker | null): string | null;
@@ -0,0 +1,12 @@
1
+ export type ContinuationMarkerSource = "todo" | "stop";
2
+ export type ContinuationMarkerState = "idle" | "active" | "stopped";
3
+ export interface ContinuationMarkerSourceEntry {
4
+ state: ContinuationMarkerState;
5
+ reason?: string;
6
+ updatedAt: string;
7
+ }
8
+ export interface ContinuationMarker {
9
+ sessionID: string;
10
+ updatedAt: string;
11
+ sources: Partial<Record<ContinuationMarkerSource, ContinuationMarkerSourceEntry>>;
12
+ }
@@ -24,8 +24,10 @@ export { createInteractiveBashSessionHook } from "./interactive-bash-session";
24
24
  export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
25
25
  export { createCategorySkillReminderHook } from "./category-skill-reminder";
26
26
  export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
27
+ export { createSisyphusGptHephaestusReminderHook } from "./sisyphus-gpt-hephaestus-reminder";
27
28
  export { createAutoSlashCommandHook } from "./auto-slash-command";
28
29
  export { createEditErrorRecoveryHook } from "./edit-error-recovery";
30
+ export { createJsonErrorRecoveryHook } from "./json-error-recovery";
29
31
  export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
30
32
  export { createSisyphusJuniorNotepadHook } from "./sisyphus-junior-notepad";
31
33
  export { createTaskResumeInfoHook } from "./task-resume-info";
@@ -0,0 +1,15 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "grep", "webfetch", "look_at", "grep_app_searchgithub", "websearch_web_search_exa"];
3
+ export declare const JSON_ERROR_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
4
+ export declare const JSON_ERROR_REMINDER = "\n[JSON PARSE ERROR - IMMEDIATE ACTION REQUIRED]\n\nYou sent invalid JSON arguments. The system could not parse your tool call.\nSTOP and do this NOW:\n\n1. LOOK at the error message above to see what was expected vs what you sent.\n2. CORRECT your JSON syntax (missing braces, unescaped quotes, trailing commas, etc).\n3. RETRY the tool call with valid JSON.\n\nDO NOT repeat the exact same invalid call.\n";
5
+ export declare function createJsonErrorRecoveryHook(_ctx: PluginInput): {
6
+ "tool.execute.after": (input: {
7
+ tool: string;
8
+ sessionID: string;
9
+ callID: string;
10
+ }, output: {
11
+ title: string;
12
+ output: string;
13
+ metadata: unknown;
14
+ }) => Promise<void>;
15
+ };
@@ -0,0 +1 @@
1
+ export { createJsonErrorRecoveryHook, JSON_ERROR_TOOL_EXCLUDE_LIST, JSON_ERROR_PATTERNS, JSON_ERROR_REMINDER, } from "./hook";
@@ -0,0 +1,11 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createSisyphusGptHephaestusReminderHook(ctx: PluginInput): {
3
+ "chat.message": (input: {
4
+ sessionID: string;
5
+ agent?: string;
6
+ model?: {
7
+ providerID: string;
8
+ modelID: string;
9
+ };
10
+ }) => Promise<void>;
11
+ };
@@ -0,0 +1 @@
1
+ export { createSisyphusGptHephaestusReminderHook } from "./hook";
@@ -13,4 +13,4 @@ export interface StopContinuationGuard {
13
13
  isStopped: (sessionID: string) => boolean;
14
14
  clear: (sessionID: string) => void;
15
15
  }
16
- export declare function createStopContinuationGuardHook(_ctx: PluginInput): StopContinuationGuard;
16
+ export declare function createStopContinuationGuardHook(ctx: PluginInput): StopContinuationGuard;