oh-my-opencode 3.8.2 → 3.8.4

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.
Files changed (47) hide show
  1. package/dist/agents/atlas/index.d.ts +1 -6
  2. package/dist/agents/index.d.ts +0 -9
  3. package/dist/agents/prometheus/index.d.ts +1 -9
  4. package/dist/agents/sisyphus-gemini-overlays.d.ts +3 -0
  5. package/dist/cli/index.js +13 -8
  6. package/dist/config/index.d.ts +1 -1
  7. package/dist/config/schema/agent-overrides.d.ts +60 -0
  8. package/dist/config/schema/oh-my-opencode-config.d.ts +57 -0
  9. package/dist/features/background-agent/index.d.ts +0 -3
  10. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +3 -1
  11. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +2 -1
  12. package/dist/hooks/anthropic-context-window-limit-recovery/summarize-retry-strategy.d.ts +2 -0
  13. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +17 -0
  14. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +4 -2
  15. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +5 -4
  16. package/dist/hooks/preemptive-compaction.d.ts +2 -1
  17. package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
  18. package/dist/index.js +1190 -966
  19. package/dist/oh-my-opencode.schema.json +171 -0
  20. package/dist/tools/hashline-edit/hashline-edit-executor.d.ts +2 -2
  21. package/dist/tools/hashline-edit/normalize-edits.d.ts +13 -0
  22. package/package.json +8 -8
  23. package/dist/features/background-agent/background-task-completer.d.ts +0 -3
  24. package/dist/features/background-agent/format-duration.d.ts +0 -1
  25. package/dist/features/background-agent/message-dir.d.ts +0 -1
  26. package/dist/features/background-agent/parent-session-context-resolver.d.ts +0 -15
  27. package/dist/features/background-agent/parent-session-notifier.d.ts +0 -3
  28. package/dist/features/background-agent/result-handler-context.d.ts +0 -8
  29. package/dist/features/background-agent/result-handler.d.ts +0 -7
  30. package/dist/features/background-agent/session-output-validator.d.ts +0 -2
  31. package/dist/features/background-agent/session-task-cleanup.d.ts +0 -10
  32. package/dist/features/background-agent/session-todo-checker.d.ts +0 -2
  33. package/dist/features/background-agent/spawner/background-session-creator.d.ts +0 -10
  34. package/dist/features/background-agent/spawner/concurrency-key-from-launch-input.d.ts +0 -2
  35. package/dist/features/background-agent/spawner/spawner-context.d.ts +0 -11
  36. package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +0 -8
  37. package/dist/features/claude-tasks/index.d.ts +0 -3
  38. package/dist/features/mcp-oauth/index.d.ts +0 -3
  39. package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +0 -1
  40. package/dist/hooks/session-recovery/recover-empty-content-message.d.ts +0 -5
  41. package/dist/shared/models-json-cache-reader.d.ts +0 -1
  42. package/dist/shared/open-code-client-accessors.d.ts +0 -3
  43. package/dist/shared/open-code-client-shapes.d.ts +0 -13
  44. package/dist/shared/provider-models-cache-model-reader.d.ts +0 -1
  45. package/dist/tools/call-omo-agent/session-completion-poller.d.ts +0 -13
  46. package/dist/tools/call-omo-agent/session-message-output-extractor.d.ts +0 -17
  47. package/dist/tools/call-omo-agent/subagent-session-prompter.d.ts +0 -11
@@ -82,6 +82,9 @@
82
82
  "hashline_edit": {
83
83
  "type": "boolean"
84
84
  },
85
+ "model_fallback": {
86
+ "type": "boolean"
87
+ },
85
88
  "agents": {
86
89
  "type": "object",
87
90
  "properties": {
@@ -288,6 +291,18 @@
288
291
  }
289
292
  },
290
293
  "additionalProperties": false
294
+ },
295
+ "compaction": {
296
+ "type": "object",
297
+ "properties": {
298
+ "model": {
299
+ "type": "string"
300
+ },
301
+ "variant": {
302
+ "type": "string"
303
+ }
304
+ },
305
+ "additionalProperties": false
291
306
  }
292
307
  },
293
308
  "additionalProperties": false
@@ -495,6 +510,18 @@
495
510
  }
496
511
  },
497
512
  "additionalProperties": false
513
+ },
514
+ "compaction": {
515
+ "type": "object",
516
+ "properties": {
517
+ "model": {
518
+ "type": "string"
519
+ },
520
+ "variant": {
521
+ "type": "string"
522
+ }
523
+ },
524
+ "additionalProperties": false
498
525
  }
499
526
  },
500
527
  "additionalProperties": false
@@ -702,6 +729,18 @@
702
729
  }
703
730
  },
704
731
  "additionalProperties": false
732
+ },
733
+ "compaction": {
734
+ "type": "object",
735
+ "properties": {
736
+ "model": {
737
+ "type": "string"
738
+ },
739
+ "variant": {
740
+ "type": "string"
741
+ }
742
+ },
743
+ "additionalProperties": false
705
744
  }
706
745
  },
707
746
  "additionalProperties": false
@@ -909,6 +948,18 @@
909
948
  }
910
949
  },
911
950
  "additionalProperties": false
951
+ },
952
+ "compaction": {
953
+ "type": "object",
954
+ "properties": {
955
+ "model": {
956
+ "type": "string"
957
+ },
958
+ "variant": {
959
+ "type": "string"
960
+ }
961
+ },
962
+ "additionalProperties": false
912
963
  }
913
964
  },
914
965
  "additionalProperties": false
@@ -1116,6 +1167,18 @@
1116
1167
  }
1117
1168
  },
1118
1169
  "additionalProperties": false
1170
+ },
1171
+ "compaction": {
1172
+ "type": "object",
1173
+ "properties": {
1174
+ "model": {
1175
+ "type": "string"
1176
+ },
1177
+ "variant": {
1178
+ "type": "string"
1179
+ }
1180
+ },
1181
+ "additionalProperties": false
1119
1182
  }
1120
1183
  },
1121
1184
  "additionalProperties": false
@@ -1323,6 +1386,18 @@
1323
1386
  }
1324
1387
  },
1325
1388
  "additionalProperties": false
1389
+ },
1390
+ "compaction": {
1391
+ "type": "object",
1392
+ "properties": {
1393
+ "model": {
1394
+ "type": "string"
1395
+ },
1396
+ "variant": {
1397
+ "type": "string"
1398
+ }
1399
+ },
1400
+ "additionalProperties": false
1326
1401
  }
1327
1402
  },
1328
1403
  "additionalProperties": false
@@ -1530,6 +1605,18 @@
1530
1605
  }
1531
1606
  },
1532
1607
  "additionalProperties": false
1608
+ },
1609
+ "compaction": {
1610
+ "type": "object",
1611
+ "properties": {
1612
+ "model": {
1613
+ "type": "string"
1614
+ },
1615
+ "variant": {
1616
+ "type": "string"
1617
+ }
1618
+ },
1619
+ "additionalProperties": false
1533
1620
  }
1534
1621
  },
1535
1622
  "additionalProperties": false
@@ -1737,6 +1824,18 @@
1737
1824
  }
1738
1825
  },
1739
1826
  "additionalProperties": false
1827
+ },
1828
+ "compaction": {
1829
+ "type": "object",
1830
+ "properties": {
1831
+ "model": {
1832
+ "type": "string"
1833
+ },
1834
+ "variant": {
1835
+ "type": "string"
1836
+ }
1837
+ },
1838
+ "additionalProperties": false
1740
1839
  }
1741
1840
  },
1742
1841
  "additionalProperties": false
@@ -1944,6 +2043,18 @@
1944
2043
  }
1945
2044
  },
1946
2045
  "additionalProperties": false
2046
+ },
2047
+ "compaction": {
2048
+ "type": "object",
2049
+ "properties": {
2050
+ "model": {
2051
+ "type": "string"
2052
+ },
2053
+ "variant": {
2054
+ "type": "string"
2055
+ }
2056
+ },
2057
+ "additionalProperties": false
1947
2058
  }
1948
2059
  },
1949
2060
  "additionalProperties": false
@@ -2151,6 +2262,18 @@
2151
2262
  }
2152
2263
  },
2153
2264
  "additionalProperties": false
2265
+ },
2266
+ "compaction": {
2267
+ "type": "object",
2268
+ "properties": {
2269
+ "model": {
2270
+ "type": "string"
2271
+ },
2272
+ "variant": {
2273
+ "type": "string"
2274
+ }
2275
+ },
2276
+ "additionalProperties": false
2154
2277
  }
2155
2278
  },
2156
2279
  "additionalProperties": false
@@ -2358,6 +2481,18 @@
2358
2481
  }
2359
2482
  },
2360
2483
  "additionalProperties": false
2484
+ },
2485
+ "compaction": {
2486
+ "type": "object",
2487
+ "properties": {
2488
+ "model": {
2489
+ "type": "string"
2490
+ },
2491
+ "variant": {
2492
+ "type": "string"
2493
+ }
2494
+ },
2495
+ "additionalProperties": false
2361
2496
  }
2362
2497
  },
2363
2498
  "additionalProperties": false
@@ -2565,6 +2700,18 @@
2565
2700
  }
2566
2701
  },
2567
2702
  "additionalProperties": false
2703
+ },
2704
+ "compaction": {
2705
+ "type": "object",
2706
+ "properties": {
2707
+ "model": {
2708
+ "type": "string"
2709
+ },
2710
+ "variant": {
2711
+ "type": "string"
2712
+ }
2713
+ },
2714
+ "additionalProperties": false
2568
2715
  }
2569
2716
  },
2570
2717
  "additionalProperties": false
@@ -2772,6 +2919,18 @@
2772
2919
  }
2773
2920
  },
2774
2921
  "additionalProperties": false
2922
+ },
2923
+ "compaction": {
2924
+ "type": "object",
2925
+ "properties": {
2926
+ "model": {
2927
+ "type": "string"
2928
+ },
2929
+ "variant": {
2930
+ "type": "string"
2931
+ }
2932
+ },
2933
+ "additionalProperties": false
2775
2934
  }
2776
2935
  },
2777
2936
  "additionalProperties": false
@@ -2979,6 +3138,18 @@
2979
3138
  }
2980
3139
  },
2981
3140
  "additionalProperties": false
3141
+ },
3142
+ "compaction": {
3143
+ "type": "object",
3144
+ "properties": {
3145
+ "model": {
3146
+ "type": "string"
3147
+ },
3148
+ "variant": {
3149
+ "type": "string"
3150
+ }
3151
+ },
3152
+ "additionalProperties": false
2982
3153
  }
2983
3154
  },
2984
3155
  "additionalProperties": false
@@ -1,8 +1,8 @@
1
1
  import type { ToolContext } from "@opencode-ai/plugin/tool";
2
- import type { HashlineEdit } from "./types";
2
+ import { type RawHashlineEdit } from "./normalize-edits";
3
3
  interface HashlineEditArgs {
4
4
  filePath: string;
5
- edits: HashlineEdit[];
5
+ edits: RawHashlineEdit[];
6
6
  delete?: boolean;
7
7
  rename?: string;
8
8
  }
@@ -0,0 +1,13 @@
1
+ import type { HashlineEdit } from "./types";
2
+ export interface RawHashlineEdit {
3
+ type?: "set_line" | "replace_lines" | "insert_after" | "insert_before" | "insert_between" | "replace" | "append" | "prepend";
4
+ line?: string;
5
+ start_line?: string;
6
+ end_line?: string;
7
+ after_line?: string;
8
+ before_line?: string;
9
+ text?: string | string[];
10
+ old_text?: string;
11
+ new_text?: string | string[];
12
+ }
13
+ export declare function normalizeHashlineEdits(rawEdits: RawHashlineEdit[]): HashlineEdit[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.8.2",
3
+ "version": "3.8.4",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -74,13 +74,13 @@
74
74
  "typescript": "^5.7.3"
75
75
  },
76
76
  "optionalDependencies": {
77
- "oh-my-opencode-darwin-arm64": "3.8.2",
78
- "oh-my-opencode-darwin-x64": "3.8.2",
79
- "oh-my-opencode-linux-arm64": "3.8.2",
80
- "oh-my-opencode-linux-arm64-musl": "3.8.2",
81
- "oh-my-opencode-linux-x64": "3.8.2",
82
- "oh-my-opencode-linux-x64-musl": "3.8.2",
83
- "oh-my-opencode-windows-x64": "3.8.2"
77
+ "oh-my-opencode-darwin-arm64": "3.8.4",
78
+ "oh-my-opencode-darwin-x64": "3.8.4",
79
+ "oh-my-opencode-linux-arm64": "3.8.4",
80
+ "oh-my-opencode-linux-arm64-musl": "3.8.4",
81
+ "oh-my-opencode-linux-x64": "3.8.4",
82
+ "oh-my-opencode-linux-x64-musl": "3.8.4",
83
+ "oh-my-opencode-windows-x64": "3.8.4"
84
84
  },
85
85
  "trustedDependencies": [
86
86
  "@ast-grep/cli",
@@ -1,3 +0,0 @@
1
- import type { BackgroundTask } from "./types";
2
- import type { ResultHandlerContext } from "./result-handler-context";
3
- export declare function tryCompleteTask(task: BackgroundTask, source: string, ctx: ResultHandlerContext): Promise<boolean>;
@@ -1 +0,0 @@
1
- export declare function formatDuration(start: Date, end?: Date): string;
@@ -1 +0,0 @@
1
- export { getMessageDir } from "../../shared";
@@ -1,15 +0,0 @@
1
- import type { OpencodeClient } from "./constants";
2
- import type { BackgroundTask } from "./types";
3
- type AgentModel = {
4
- providerID: string;
5
- modelID: string;
6
- };
7
- export declare function resolveParentSessionAgentAndModel(input: {
8
- client: OpencodeClient;
9
- task: BackgroundTask;
10
- }): Promise<{
11
- agent?: string;
12
- model?: AgentModel;
13
- tools?: Record<string, boolean>;
14
- }>;
15
- export {};
@@ -1,3 +0,0 @@
1
- import type { BackgroundTask } from "./types";
2
- import type { ResultHandlerContext } from "./result-handler-context";
3
- export declare function notifyParentSession(task: BackgroundTask, ctx: ResultHandlerContext): Promise<void>;
@@ -1,8 +0,0 @@
1
- import type { OpencodeClient } from "./constants";
2
- import type { ConcurrencyManager } from "./concurrency";
3
- import type { TaskStateManager } from "./state";
4
- export interface ResultHandlerContext {
5
- client: OpencodeClient;
6
- concurrencyManager: ConcurrencyManager;
7
- state: TaskStateManager;
8
- }
@@ -1,7 +0,0 @@
1
- export type { ResultHandlerContext } from "./result-handler-context";
2
- export { formatDuration } from "./duration-formatter";
3
- export { getMessageDir } from "../../shared";
4
- export { checkSessionTodos } from "./session-todo-checker";
5
- export { validateSessionHasOutput } from "./session-output-validator";
6
- export { tryCompleteTask } from "./background-task-completer";
7
- export { notifyParentSession } from "./parent-session-notifier";
@@ -1,2 +0,0 @@
1
- import type { OpencodeClient } from "./constants";
2
- export declare function validateSessionHasOutput(client: OpencodeClient, sessionID: string): Promise<boolean>;
@@ -1,10 +0,0 @@
1
- import type { BackgroundTask } from "./types";
2
- export declare function cleanupTaskAfterSessionEnds(args: {
3
- task: BackgroundTask;
4
- tasks: Map<string, BackgroundTask>;
5
- idleDeferralTimers: Map<string, ReturnType<typeof setTimeout>>;
6
- completionTimers: Map<string, ReturnType<typeof setTimeout>>;
7
- cleanupPendingByParent: (task: BackgroundTask) => void;
8
- clearNotificationsForTask: (taskId: string) => void;
9
- releaseConcurrencyKey?: (key: string) => void;
10
- }): void;
@@ -1,2 +0,0 @@
1
- import type { OpencodeClient } from "./constants";
2
- export declare function checkSessionTodos(client: OpencodeClient, sessionID: string): Promise<boolean>;
@@ -1,10 +0,0 @@
1
- import type { OpencodeClient } from "../constants";
2
- import type { ConcurrencyManager } from "../concurrency";
3
- import type { LaunchInput } from "../types";
4
- export declare function createBackgroundSession(options: {
5
- client: OpencodeClient;
6
- input: LaunchInput;
7
- parentDirectory: string;
8
- concurrencyManager: ConcurrencyManager;
9
- concurrencyKey: string;
10
- }): Promise<string>;
@@ -1,2 +0,0 @@
1
- import type { LaunchInput } from "../types";
2
- export declare function getConcurrencyKeyFromLaunchInput(input: LaunchInput): string;
@@ -1,11 +0,0 @@
1
- import type { BackgroundTask } from "../types";
2
- import type { ConcurrencyManager } from "../concurrency";
3
- import type { OpencodeClient, OnSubagentSessionCreated } from "../constants";
4
- export interface SpawnerContext {
5
- client: OpencodeClient;
6
- directory: string;
7
- concurrencyManager: ConcurrencyManager;
8
- tmuxEnabled: boolean;
9
- onSubagentSessionCreated?: OnSubagentSessionCreated;
10
- onTaskError: (task: BackgroundTask, error: Error) => void;
11
- }
@@ -1,8 +0,0 @@
1
- import type { OnSubagentSessionCreated } from "../constants";
2
- export declare function maybeInvokeTmuxCallback(options: {
3
- onSubagentSessionCreated?: OnSubagentSessionCreated;
4
- tmuxEnabled: boolean;
5
- sessionID: string;
6
- parentID: string;
7
- title: string;
8
- }): Promise<void>;
@@ -1,3 +0,0 @@
1
- export * from "./types";
2
- export * from "./storage";
3
- export * from "./session-storage";
@@ -1,3 +0,0 @@
1
- export * from "./schema";
2
- export * from "./oauth-authorization-flow";
3
- export * from "./provider";
@@ -1 +0,0 @@
1
- export { createHashlineEditDiffEnhancerHook } from "./hook";
@@ -1,5 +0,0 @@
1
- import type { createOpencodeClient } from "@opencode-ai/sdk";
2
- import type { MessageData } from "./types";
3
- type Client = ReturnType<typeof createOpencodeClient>;
4
- export declare function recoverEmptyContentMessage(client: Client, sessionID: string, failedAssistantMsg: MessageData, _directory: string, error: unknown): Promise<boolean>;
5
- export {};
@@ -1 +0,0 @@
1
- export declare function addModelsFromModelsJsonCache(connectedProviders: Set<string>, modelSet: Set<string>): boolean;
@@ -1,3 +0,0 @@
1
- import type { ModelListFunction, ProviderListFunction } from "./open-code-client-shapes";
2
- export declare function getProviderListFunction(client: unknown): ProviderListFunction | null;
3
- export declare function getModelListFunction(client: unknown): ModelListFunction | null;
@@ -1,13 +0,0 @@
1
- export type ProviderListResponse = {
2
- data?: {
3
- connected?: string[];
4
- };
5
- };
6
- export type ModelListResponse = {
7
- data?: Array<{
8
- id?: string;
9
- provider?: string;
10
- }>;
11
- };
12
- export type ProviderListFunction = () => Promise<ProviderListResponse>;
13
- export type ModelListFunction = () => Promise<ModelListResponse>;
@@ -1 +0,0 @@
1
- export declare function addModelsFromProviderModelsCache(connectedProviders: Set<string>, modelSet: Set<string>): boolean;
@@ -1,13 +0,0 @@
1
- import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare function waitForSessionCompletion(ctx: PluginInput, options: {
3
- sessionID: string;
4
- abortSignal?: AbortSignal;
5
- maxPollTimeMs: number;
6
- pollIntervalMs: number;
7
- stabilityRequired: number;
8
- }): Promise<{
9
- ok: true;
10
- } | {
11
- ok: false;
12
- reason: "aborted" | "timeout";
13
- }>;
@@ -1,17 +0,0 @@
1
- import { type CursorMessage } from "../../shared/session-cursor";
2
- type SessionMessagePart = {
3
- type: string;
4
- text?: string;
5
- content?: unknown;
6
- };
7
- export type SessionMessage = CursorMessage & {
8
- info?: CursorMessage["info"] & {
9
- role?: string;
10
- };
11
- parts?: SessionMessagePart[];
12
- };
13
- export declare function extractNewSessionOutput(sessionID: string, messages: SessionMessage[]): {
14
- output: string;
15
- hasNewOutput: boolean;
16
- };
17
- export {};
@@ -1,11 +0,0 @@
1
- import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare function promptSubagentSession(ctx: PluginInput, options: {
3
- sessionID: string;
4
- agent: string;
5
- prompt: string;
6
- }): Promise<{
7
- ok: true;
8
- } | {
9
- ok: false;
10
- error: string;
11
- }>;