oh-my-opencode 3.8.3 → 3.8.5

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 (58) hide show
  1. package/README.ja.md +3 -3
  2. package/README.ko.md +3 -3
  3. package/README.md +3 -3
  4. package/README.zh-cn.md +3 -3
  5. package/dist/agents/atlas/index.d.ts +1 -6
  6. package/dist/agents/index.d.ts +0 -9
  7. package/dist/agents/prometheus/index.d.ts +1 -9
  8. package/dist/agents/sisyphus-gemini-overlays.d.ts +3 -0
  9. package/dist/cli/index.js +13 -8
  10. package/dist/config/index.d.ts +1 -1
  11. package/dist/config/schema/agent-overrides.d.ts +60 -0
  12. package/dist/config/schema/oh-my-opencode-config.d.ts +57 -0
  13. package/dist/features/background-agent/index.d.ts +0 -3
  14. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +3 -1
  15. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +2 -1
  16. package/dist/hooks/anthropic-context-window-limit-recovery/summarize-retry-strategy.d.ts +2 -0
  17. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +17 -0
  18. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +4 -2
  19. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +5 -4
  20. package/dist/hooks/preemptive-compaction.d.ts +2 -1
  21. package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
  22. package/dist/index.js +1536 -1381
  23. package/dist/oh-my-opencode.schema.json +171 -0
  24. package/dist/tools/hashline-edit/constants.d.ts +0 -1
  25. package/dist/tools/hashline-edit/edit-operation-primitives.d.ts +0 -2
  26. package/dist/tools/hashline-edit/edit-operations.d.ts +0 -1
  27. package/dist/tools/hashline-edit/edit-ordering.d.ts +1 -0
  28. package/dist/tools/hashline-edit/hashline-edit-executor.d.ts +2 -2
  29. package/dist/tools/hashline-edit/index.d.ts +2 -2
  30. package/dist/tools/hashline-edit/normalize-edits.d.ts +10 -0
  31. package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
  32. package/dist/tools/hashline-edit/types.d.ts +17 -41
  33. package/package.json +8 -8
  34. package/dist/features/background-agent/background-task-completer.d.ts +0 -3
  35. package/dist/features/background-agent/format-duration.d.ts +0 -1
  36. package/dist/features/background-agent/message-dir.d.ts +0 -1
  37. package/dist/features/background-agent/parent-session-context-resolver.d.ts +0 -15
  38. package/dist/features/background-agent/parent-session-notifier.d.ts +0 -3
  39. package/dist/features/background-agent/result-handler-context.d.ts +0 -8
  40. package/dist/features/background-agent/result-handler.d.ts +0 -7
  41. package/dist/features/background-agent/session-output-validator.d.ts +0 -2
  42. package/dist/features/background-agent/session-task-cleanup.d.ts +0 -10
  43. package/dist/features/background-agent/session-todo-checker.d.ts +0 -2
  44. package/dist/features/background-agent/spawner/background-session-creator.d.ts +0 -10
  45. package/dist/features/background-agent/spawner/concurrency-key-from-launch-input.d.ts +0 -2
  46. package/dist/features/background-agent/spawner/spawner-context.d.ts +0 -11
  47. package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +0 -8
  48. package/dist/features/claude-tasks/index.d.ts +0 -3
  49. package/dist/features/mcp-oauth/index.d.ts +0 -3
  50. package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +0 -1
  51. package/dist/hooks/session-recovery/recover-empty-content-message.d.ts +0 -5
  52. package/dist/shared/models-json-cache-reader.d.ts +0 -1
  53. package/dist/shared/open-code-client-accessors.d.ts +0 -3
  54. package/dist/shared/open-code-client-shapes.d.ts +0 -13
  55. package/dist/shared/provider-models-cache-model-reader.d.ts +0 -1
  56. package/dist/tools/call-omo-agent/session-completion-poller.d.ts +0 -13
  57. package/dist/tools/call-omo-agent/session-message-output-extractor.d.ts +0 -17
  58. 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
@@ -2,4 +2,3 @@ export declare const NIBBLE_STR = "ZPMQVRWSNKTXJBYH";
2
2
  export declare const HASHLINE_DICT: string[];
3
3
  export declare const HASHLINE_REF_PATTERN: RegExp;
4
4
  export declare const HASHLINE_OUTPUT_PATTERN: RegExp;
5
- export declare const HASHLINE_LEGACY_REF_PATTERN: RegExp;
@@ -5,8 +5,6 @@ export declare function applySetLine(lines: string[], anchor: string, newText: s
5
5
  export declare function applyReplaceLines(lines: string[], startAnchor: string, endAnchor: string, newText: string | string[], options?: EditApplyOptions): string[];
6
6
  export declare function applyInsertAfter(lines: string[], anchor: string, text: string | string[], options?: EditApplyOptions): string[];
7
7
  export declare function applyInsertBefore(lines: string[], anchor: string, text: string | string[], options?: EditApplyOptions): string[];
8
- export declare function applyInsertBetween(lines: string[], afterAnchor: string, beforeAnchor: string, text: string | string[], options?: EditApplyOptions): string[];
9
8
  export declare function applyAppend(lines: string[], text: string | string[]): string[];
10
9
  export declare function applyPrepend(lines: string[], text: string | string[]): string[];
11
- export declare function applyReplace(content: string, oldText: string, newText: string | string[]): string;
12
10
  export {};
@@ -6,4 +6,3 @@ export interface HashlineApplyReport {
6
6
  }
7
7
  export declare function applyHashlineEditsWithReport(content: string, edits: HashlineEdit[]): HashlineApplyReport;
8
8
  export declare function applyHashlineEdits(content: string, edits: HashlineEdit[]): string;
9
- export { applySetLine, applyReplaceLines, applyInsertAfter, applyInsertBefore, applyInsertBetween, applyReplace, } from "./edit-operation-primitives";
@@ -1,3 +1,4 @@
1
1
  import type { HashlineEdit } from "./types";
2
2
  export declare function getEditLineNumber(edit: HashlineEdit): number;
3
3
  export declare function collectLineRefs(edits: HashlineEdit[]): string[];
4
+ export declare function detectOverlappingRanges(edits: HashlineEdit[]): string | null;
@@ -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
  }
@@ -1,7 +1,7 @@
1
1
  export { computeLineHash, formatHashLine, formatHashLines, streamHashLinesFromLines, streamHashLinesFromUtf8, } from "./hash-computation";
2
2
  export { parseLineRef, validateLineRef } from "./validation";
3
3
  export type { LineRef } from "./validation";
4
- export type { SetLine, ReplaceLines, InsertAfter, InsertBefore, InsertBetween, Replace, Append, Prepend, HashlineEdit, } from "./types";
4
+ export type { ReplaceEdit, AppendEdit, PrependEdit, HashlineEdit, } from "./types";
5
5
  export { NIBBLE_STR, HASHLINE_DICT, HASHLINE_REF_PATTERN, HASHLINE_OUTPUT_PATTERN } from "./constants";
6
- export { applyHashlineEdits, applyInsertAfter, applyInsertBefore, applyInsertBetween, applyReplace, applyReplaceLines, applySetLine, } from "./edit-operations";
6
+ export { applyHashlineEdits, } from "./edit-operations";
7
7
  export { createHashlineEditTool } from "./tools";
@@ -0,0 +1,10 @@
1
+ import type { HashlineEdit } from "./types";
2
+ type HashlineToolOp = "replace" | "append" | "prepend";
3
+ export interface RawHashlineEdit {
4
+ op?: HashlineToolOp;
5
+ pos?: string;
6
+ end?: string;
7
+ lines?: string | string[] | null;
8
+ }
9
+ export declare function normalizeHashlineEdits(rawEdits: RawHashlineEdit[]): HashlineEdit[];
10
+ export {};
@@ -1 +1 @@
1
- export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \":content\").\n\nVALIDATION:\n Payload shape: { \"filePath\": string, \"edits\": [...], \"delete\"?: boolean, \"rename\"?: string }\n Each edit must be one of: set_line, replace_lines, insert_after, insert_before, insert_between, replace, append, prepend\n text/new_text must contain plain replacement text only (no LINE#ID prefixes, no diff + markers)\n CRITICAL: all operations validate against the same pre-edit file snapshot and apply bottom-up. Refs/tags are interpreted against the last-read version of the file.\n\nLINE#ID FORMAT (CRITICAL):\n Each line reference must be in \"LINE#ID\" format where:\n LINE: 1-based line number\n ID: Two CID letters from the set ZPMQVRWSNKTXJBYH\n\nFILE MODES:\n delete=true deletes file and requires edits=[] with no rename\n rename moves final content to a new path and removes old path\n\nCONTENT FORMAT:\n text/new_text can be a string (single line) or string[] (multi-line, preferred).\n If you pass a multi-line string, it is split by real newline characters.\n Literal \"\\n\" is preserved as text.\n\nFILE CREATION:\n append: adds content at EOF. If file does not exist, creates it.\n prepend: adds content at BOF. If file does not exist, creates it.\n CRITICAL: append/prepend are the only operations that work without an existing file.\n\nOPERATION CHOICE:\n One line wrong -> set_line\n Adjacent block rewrite or swap/move -> replace_lines (prefer one range op over many single-line ops)\n Both boundaries known -> insert_between (ALWAYS prefer over insert_after/insert_before)\n One boundary known -> insert_after or insert_before\n New file or EOF/BOF addition -> append or prepend\n No LINE#ID available -> replace (last resort)\n\nRULES (CRITICAL):\n 1. Minimize scope: one logical mutation site per operation.\n 2. Preserve formatting: keep indentation, punctuation, line breaks, trailing commas, brace style.\n 3. Prefer insertion over neighbor rewrites: anchor to structural boundaries (}, ], },), not interior property lines.\n 4. No no-ops: replacement content must differ from current content.\n 5. Touch only requested code: avoid incidental edits.\n 6. Use exact current tokens: NEVER rewrite approximately.\n 7. For swaps/moves: prefer one range operation over multiple single-line operations.\n 8. Output tool calls only; no prose or commentary between them.\n\nTAG CHOICE (ALWAYS):\n - Copy tags exactly from read output or >>> mismatch output.\n - NEVER guess tags.\n - Prefer insert_between over insert_after/insert_before when both boundaries are known.\n - Anchor to structural lines (function/class/brace), NEVER blank lines.\n - Anti-pattern warning: blank/whitespace anchors are fragile.\n - Re-read after each successful edit call before issuing another on the same file.\n\nAUTOCORRECT (built-in - you do NOT need to handle these):\n Merged lines are auto-expanded back to original line count.\n Indentation is auto-restored from original lines.\n BOM and CRLF line endings are preserved automatically.\n Hashline prefixes and diff markers in text are auto-stripped.\n\nRECOVERY (when >>> mismatch error appears):\n Copy the updated LINE#ID tags shown in the error output directly.\n Re-read only if the needed tags are missing from the error snippet.\n ALWAYS batch all edits for one file in a single call.";
1
+ export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \"|content\").\n\nVALIDATION:\n Payload shape: { \"filePath\": string, \"edits\": [...], \"delete\"?: boolean, \"rename\"?: string }\n Each edit must be one of: replace, append, prepend\n Edit shape: { \"op\": \"replace\"|\"append\"|\"prepend\", \"pos\"?: \"LINE#ID\", \"end\"?: \"LINE#ID\", \"lines\"?: string|string[]|null }\n lines must contain plain replacement text only (no LINE#ID prefixes, no diff + markers)\n CRITICAL: all operations validate against the same pre-edit file snapshot and apply bottom-up. Refs/tags are interpreted against the last-read version of the file.\n\nLINE#ID FORMAT (CRITICAL):\n Each line reference must be in \"{line_number}#{hash_id}\" format where:\n {line_number}: 1-based line number\n {hash_id}: Two CID letters from the set ZPMQVRWSNKTXJBYH\n\nFILE MODES:\n delete=true deletes file and requires edits=[] with no rename\n rename moves final content to a new path and removes old path\n\nCONTENT FORMAT:\n lines can be a string (single line) or string[] (multi-line, preferred).\n If you pass a multi-line string, it is split by real newline characters.\n Literal \"\\n\" is preserved as text.\n\nFILE CREATION:\n append without anchors adds content at EOF. If file does not exist, creates it.\n prepend without anchors adds content at BOF. If file does not exist, creates it.\n CRITICAL: only unanchored append/prepend can create a missing file.\n\nOPERATION CHOICE:\n replace with pos only -> replace one line at pos (MOST COMMON for single-line edits)\n replace with pos+end -> replace ENTIRE range pos..end as a block (ranges MUST NOT overlap across edits)\n append with pos/end anchor -> insert after that anchor\n prepend with pos/end anchor -> insert before that anchor\n append/prepend without anchors -> EOF/BOF insertion\n\nRULES (CRITICAL):\n 1. Minimize scope: one logical mutation site per operation.\n 2. Preserve formatting: keep indentation, punctuation, line breaks, trailing commas, brace style.\n 3. Prefer insertion over neighbor rewrites: anchor to structural boundaries (}, ], },), not interior property lines.\n 4. No no-ops: replacement content must differ from current content.\n 5. Touch only requested code: avoid incidental edits.\n 6. Use exact current tokens: NEVER rewrite approximately.\n 7. For swaps/moves: prefer one range operation over multiple single-line operations.\n 8. Output tool calls only; no prose or commentary between them.\n\nTAG CHOICE (ALWAYS):\n - Copy tags exactly from read output or >>> mismatch output.\n - NEVER guess tags.\n - Anchor to structural lines (function/class/brace), NEVER blank lines.\n - Anti-pattern warning: blank/whitespace anchors are fragile.\n - Re-read after each successful edit call before issuing another on the same file.\n\nAUTOCORRECT (built-in - you do NOT need to handle these):\n Merged lines are auto-expanded back to original line count.\n Indentation is auto-restored from original lines.\n BOM and CRLF line endings are preserved automatically.\n Hashline prefixes and diff markers in text are auto-stripped.\n\nRECOVERY (when >>> mismatch error appears):\n Copy the updated LINE#ID tags shown in the error output directly.\n Re-read only if the needed tags are missing from the error snippet.\n ALWAYS batch all edits for one file in a single call.";
@@ -1,41 +1,17 @@
1
- export interface SetLine {
2
- type: "set_line";
3
- line: string;
4
- text: string | string[];
5
- }
6
- export interface ReplaceLines {
7
- type: "replace_lines";
8
- start_line: string;
9
- end_line: string;
10
- text: string | string[];
11
- }
12
- export interface InsertAfter {
13
- type: "insert_after";
14
- line: string;
15
- text: string | string[];
16
- }
17
- export interface InsertBefore {
18
- type: "insert_before";
19
- line: string;
20
- text: string | string[];
21
- }
22
- export interface InsertBetween {
23
- type: "insert_between";
24
- after_line: string;
25
- before_line: string;
26
- text: string | string[];
27
- }
28
- export interface Replace {
29
- type: "replace";
30
- old_text: string;
31
- new_text: string | string[];
32
- }
33
- export interface Append {
34
- type: "append";
35
- text: string | string[];
36
- }
37
- export interface Prepend {
38
- type: "prepend";
39
- text: string | string[];
40
- }
41
- export type HashlineEdit = SetLine | ReplaceLines | InsertAfter | InsertBefore | InsertBetween | Replace | Append | Prepend;
1
+ export interface ReplaceEdit {
2
+ op: "replace";
3
+ pos: string;
4
+ end?: string;
5
+ lines: string | string[];
6
+ }
7
+ export interface AppendEdit {
8
+ op: "append";
9
+ pos?: string;
10
+ lines: string | string[];
11
+ }
12
+ export interface PrependEdit {
13
+ op: "prepend";
14
+ pos?: string;
15
+ lines: string | string[];
16
+ }
17
+ export type HashlineEdit = ReplaceEdit | AppendEdit | PrependEdit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.8.3",
3
+ "version": "3.8.5",
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.3",
78
- "oh-my-opencode-darwin-x64": "3.8.3",
79
- "oh-my-opencode-linux-arm64": "3.8.3",
80
- "oh-my-opencode-linux-arm64-musl": "3.8.3",
81
- "oh-my-opencode-linux-x64": "3.8.3",
82
- "oh-my-opencode-linux-x64-musl": "3.8.3",
83
- "oh-my-opencode-windows-x64": "3.8.3"
77
+ "oh-my-opencode-darwin-arm64": "3.8.5",
78
+ "oh-my-opencode-darwin-x64": "3.8.5",
79
+ "oh-my-opencode-linux-arm64": "3.8.5",
80
+ "oh-my-opencode-linux-arm64-musl": "3.8.5",
81
+ "oh-my-opencode-linux-x64": "3.8.5",
82
+ "oh-my-opencode-linux-x64-musl": "3.8.5",
83
+ "oh-my-opencode-windows-x64": "3.8.5"
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
- }>;