oh-my-opencode 3.8.5 → 3.10.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.
Files changed (74) 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.ru.md +367 -0
  5. package/README.zh-cn.md +3 -3
  6. package/bin/oh-my-opencode.js +96 -34
  7. package/bin/platform.d.ts +14 -0
  8. package/bin/platform.js +44 -0
  9. package/bin/platform.test.ts +56 -1
  10. package/dist/agents/atlas/agent.d.ts +1 -1
  11. package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -0
  12. package/dist/agents/env-context.d.ts +1 -1
  13. package/dist/agents/hephaestus.d.ts +1 -1
  14. package/dist/agents/sisyphus-gemini-overlays.d.ts +2 -0
  15. package/dist/agents/sisyphus.d.ts +1 -1
  16. package/dist/cli/config-manager/antigravity-provider-configuration.d.ts +3 -3
  17. package/dist/cli/index.js +208 -64
  18. package/dist/cli/run/event-state.d.ts +2 -0
  19. package/dist/cli/run/poll-for-completion.d.ts +2 -0
  20. package/dist/config/schema/agent-overrides.d.ts +1 -0
  21. package/dist/config/schema/categories.d.ts +2 -0
  22. package/dist/config/schema/hooks.d.ts +1 -0
  23. package/dist/config/schema/oh-my-opencode-config.d.ts +3 -12
  24. package/dist/create-hooks.d.ts +1 -0
  25. package/dist/features/background-agent/manager.d.ts +9 -0
  26. package/dist/features/boulder-state/storage.d.ts +1 -1
  27. package/dist/features/boulder-state/types.d.ts +2 -0
  28. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  29. package/dist/features/claude-code-plugin-loader/types.d.ts +13 -3
  30. package/dist/features/context-injector/types.d.ts +2 -2
  31. package/dist/features/hook-message-injector/injector.d.ts +2 -0
  32. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -0
  33. package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -0
  34. package/dist/hooks/atlas/types.d.ts +1 -0
  35. package/dist/hooks/background-notification/hook.d.ts +11 -0
  36. package/dist/hooks/claude-code-hooks/dispatch-hook.d.ts +4 -0
  37. package/dist/hooks/claude-code-hooks/execute-http-hook.d.ts +4 -0
  38. package/dist/hooks/claude-code-hooks/types.d.ts +9 -1
  39. package/dist/hooks/index.d.ts +1 -0
  40. package/dist/hooks/no-hephaestus-non-gpt/hook.d.ts +5 -1
  41. package/dist/hooks/ralph-loop/completion-promise-detector.d.ts +1 -0
  42. package/dist/hooks/ralph-loop/loop-state-controller.d.ts +2 -0
  43. package/dist/hooks/ralph-loop/ralph-loop-hook.d.ts +1 -0
  44. package/dist/hooks/ralph-loop/types.d.ts +1 -0
  45. package/dist/hooks/read-image-resizer/hook.d.ts +12 -0
  46. package/dist/hooks/read-image-resizer/image-dimensions.d.ts +2 -0
  47. package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -0
  48. package/dist/hooks/read-image-resizer/index.d.ts +1 -0
  49. package/dist/hooks/read-image-resizer/types.d.ts +14 -0
  50. package/dist/hooks/session-notification.d.ts +1 -0
  51. package/dist/hooks/start-work/index.d.ts +3 -0
  52. package/dist/hooks/start-work/parse-user-request.d.ts +5 -0
  53. package/dist/hooks/start-work/worktree-detector.d.ts +1 -0
  54. package/dist/hooks/stop-continuation-guard/hook.d.ts +6 -1
  55. package/dist/hooks/think-mode/hook.d.ts +14 -2
  56. package/dist/hooks/think-mode/switcher.d.ts +0 -56
  57. package/dist/hooks/think-mode/types.d.ts +1 -15
  58. package/dist/hooks/todo-continuation-enforcer/constants.d.ts +1 -1
  59. package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +14 -0
  60. package/dist/index.js +2203 -704
  61. package/dist/oh-my-opencode.schema.json +10 -14
  62. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  63. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  64. package/dist/shared/model-suggestion-retry.d.ts +4 -2
  65. package/dist/shared/prompt-timeout-context.d.ts +12 -0
  66. package/dist/shared/spawn-with-windows-hide.d.ts +15 -0
  67. package/dist/tools/delegate-task/category-resolver.d.ts +1 -0
  68. package/dist/tools/delegate-task/skill-resolver.d.ts +1 -0
  69. package/dist/tools/delegate-task/token-limiter.d.ts +4 -0
  70. package/dist/tools/delegate-task/types.d.ts +9 -0
  71. package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
  72. package/dist/tools/hashline-edit/validation.d.ts +1 -0
  73. package/package.json +13 -8
  74. package/postinstall.mjs +23 -7
package/dist/cli/index.js CHANGED
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ function __accessProp(key) {
9
+ return this[key];
10
+ }
11
+ var __toESMCache_node;
12
+ var __toESMCache_esm;
8
13
  var __toESM = (mod, isNodeMode, target) => {
14
+ var canCache = mod != null && typeof mod === "object";
15
+ if (canCache) {
16
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
17
+ var cached = cache.get(mod);
18
+ if (cached)
19
+ return cached;
20
+ }
9
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
10
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
23
  for (let key of __getOwnPropNames(mod))
12
24
  if (!__hasOwnProp.call(to, key))
13
25
  __defProp(to, key, {
14
- get: () => mod[key],
26
+ get: __accessProp.bind(mod, key),
15
27
  enumerable: true
16
28
  });
29
+ if (canCache)
30
+ cache.set(mod, to);
17
31
  return to;
18
32
  };
19
33
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
34
+ var __returnValue = (v) => v;
35
+ function __exportSetter(name, newValue) {
36
+ this[name] = __returnValue.bind(null, newValue);
37
+ }
20
38
  var __export = (target, all) => {
21
39
  for (var name in all)
22
40
  __defProp(target, name, {
23
41
  get: all[name],
24
42
  enumerable: true,
25
43
  configurable: true,
26
- set: (newValue) => all[name] = () => newValue
44
+ set: __exportSetter.bind(all, name)
27
45
  });
28
46
  };
29
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -6805,14 +6823,15 @@ var init_model_requirements = __esm(() => {
6805
6823
  },
6806
6824
  hephaestus: {
6807
6825
  fallbackChain: [
6808
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" }
6826
+ { providers: ["openai", "venice", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6827
+ { providers: ["github-copilot"], model: "gpt-5.2", variant: "medium" }
6809
6828
  ],
6810
- requiresProvider: ["openai", "github-copilot", "opencode"]
6829
+ requiresProvider: ["openai", "github-copilot", "venice", "opencode"]
6811
6830
  },
6812
6831
  oracle: {
6813
6832
  fallbackChain: [
6814
6833
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6815
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
6834
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6816
6835
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6817
6836
  ]
6818
6837
  },
@@ -6845,7 +6864,7 @@ var init_model_requirements = __esm(() => {
6845
6864
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6846
6865
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6847
6866
  { providers: ["opencode"], model: "kimi-k2.5-free" },
6848
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
6867
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6849
6868
  ]
6850
6869
  },
6851
6870
  metis: {
@@ -6853,14 +6872,14 @@ var init_model_requirements = __esm(() => {
6853
6872
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6854
6873
  { providers: ["opencode"], model: "kimi-k2.5-free" },
6855
6874
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6856
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
6875
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6857
6876
  ]
6858
6877
  },
6859
6878
  momus: {
6860
6879
  fallbackChain: [
6861
6880
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" },
6862
6881
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6863
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
6882
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6864
6883
  ]
6865
6884
  },
6866
6885
  atlas: {
@@ -6874,33 +6893,33 @@ var init_model_requirements = __esm(() => {
6874
6893
  CATEGORY_MODEL_REQUIREMENTS = {
6875
6894
  "visual-engineering": {
6876
6895
  fallbackChain: [
6877
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
6896
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6878
6897
  { providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
6879
6898
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6880
6899
  ]
6881
6900
  },
6882
6901
  ultrabrain: {
6883
6902
  fallbackChain: [
6884
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
6885
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
6903
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
6904
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6886
6905
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6887
6906
  ]
6888
6907
  },
6889
6908
  deep: {
6890
6909
  fallbackChain: [
6891
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6910
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6892
6911
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6893
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
6912
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6894
6913
  ],
6895
6914
  requiresModel: "gpt-5.3-codex"
6896
6915
  },
6897
6916
  artistry: {
6898
6917
  fallbackChain: [
6899
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
6918
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6900
6919
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6901
6920
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
6902
6921
  ],
6903
- requiresModel: "gemini-3-pro"
6922
+ requiresModel: "gemini-3.1-pro"
6904
6923
  },
6905
6924
  quick: {
6906
6925
  fallbackChain: [
@@ -6912,7 +6931,7 @@ var init_model_requirements = __esm(() => {
6912
6931
  "unspecified-low": {
6913
6932
  fallbackChain: [
6914
6933
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6915
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6934
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6916
6935
  { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" }
6917
6936
  ]
6918
6937
  },
@@ -6920,11 +6939,12 @@ var init_model_requirements = __esm(() => {
6920
6939
  fallbackChain: [
6921
6940
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6922
6941
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6923
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
6942
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6924
6943
  ]
6925
6944
  },
6926
6945
  writing: {
6927
6946
  fallbackChain: [
6947
+ { providers: ["opencode"], model: "kimi-k2.5-free" },
6928
6948
  { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
6929
6949
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6930
6950
  ]
@@ -7051,10 +7071,10 @@ var init_model_availability = __esm(() => {
7051
7071
  // src/shared/provider-model-id-transform.ts
7052
7072
  function transformModelForProvider(provider, model) {
7053
7073
  if (provider === "github-copilot") {
7054
- return model.replace("claude-opus-4-6", "claude-opus-4.6").replace("claude-sonnet-4-6", "claude-sonnet-4.6").replace("claude-sonnet-4-5", "claude-sonnet-4.5").replace("claude-haiku-4-5", "claude-haiku-4.5").replace("claude-sonnet-4", "claude-sonnet-4").replace(/gemini-3-pro(?!-)/g, "gemini-3-pro-preview").replace(/gemini-3-flash(?!-)/g, "gemini-3-flash-preview");
7074
+ return model.replace("claude-opus-4-6", "claude-opus-4.6").replace("claude-sonnet-4-6", "claude-sonnet-4.6").replace("claude-sonnet-4-5", "claude-sonnet-4.5").replace("claude-haiku-4-5", "claude-haiku-4.5").replace("claude-sonnet-4", "claude-sonnet-4").replace(/gemini-3\.1-pro(?!-)/g, "gemini-3.1-pro-preview").replace(/gemini-3-flash(?!-)/g, "gemini-3-flash-preview");
7055
7075
  }
7056
7076
  if (provider === "google") {
7057
- return model.replace(/gemini-3-pro(?!-)/g, "gemini-3-pro-preview").replace(/gemini-3-flash(?!-)/g, "gemini-3-flash-preview");
7077
+ return model.replace(/gemini-3\.1-pro(?!-)/g, "gemini-3.1-pro-preview").replace(/gemini-3-flash(?!-)/g, "gemini-3-flash-preview");
7058
7078
  }
7059
7079
  return model;
7060
7080
  }
@@ -7089,11 +7109,14 @@ var init_constants = __esm(() => {
7089
7109
  });
7090
7110
 
7091
7111
  // src/features/hook-message-injector/injector.ts
7112
+ import { randomBytes } from "crypto";
7113
+ var processPrefix;
7092
7114
  var init_injector = __esm(() => {
7093
7115
  init_constants();
7094
7116
  init_logger();
7095
7117
  init_opencode_storage_detection();
7096
7118
  init_shared();
7119
+ processPrefix = randomBytes(4).toString("hex");
7097
7120
  });
7098
7121
 
7099
7122
  // src/features/hook-message-injector/index.ts
@@ -7214,7 +7237,6 @@ var init_tmux = __esm(() => {
7214
7237
  init_constants2();
7215
7238
  init_tmux_utils();
7216
7239
  });
7217
-
7218
7240
  // src/shared/model-suggestion-retry.ts
7219
7241
  var init_model_suggestion_retry = __esm(() => {
7220
7242
  init_logger();
@@ -7605,14 +7627,14 @@ var init_model_fallback_requirements = __esm(() => {
7605
7627
  },
7606
7628
  hephaestus: {
7607
7629
  fallbackChain: [
7608
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" }
7630
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" }
7609
7631
  ],
7610
- requiresProvider: ["openai", "github-copilot", "opencode"]
7632
+ requiresProvider: ["openai", "opencode"]
7611
7633
  },
7612
7634
  oracle: {
7613
7635
  fallbackChain: [
7614
7636
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
7615
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
7637
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
7616
7638
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
7617
7639
  ]
7618
7640
  },
@@ -7647,7 +7669,7 @@ var init_model_fallback_requirements = __esm(() => {
7647
7669
  { providers: ["kimi-for-coding"], model: "k2p5" },
7648
7670
  { providers: ["opencode"], model: "kimi-k2.5-free" },
7649
7671
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
7650
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
7672
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
7651
7673
  ]
7652
7674
  },
7653
7675
  metis: {
@@ -7656,14 +7678,14 @@ var init_model_fallback_requirements = __esm(() => {
7656
7678
  { providers: ["kimi-for-coding"], model: "k2p5" },
7657
7679
  { providers: ["opencode"], model: "kimi-k2.5-free" },
7658
7680
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
7659
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
7681
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
7660
7682
  ]
7661
7683
  },
7662
7684
  momus: {
7663
7685
  fallbackChain: [
7664
7686
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" },
7665
7687
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
7666
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
7688
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
7667
7689
  ]
7668
7690
  },
7669
7691
  atlas: {
@@ -7672,14 +7694,14 @@ var init_model_fallback_requirements = __esm(() => {
7672
7694
  { providers: ["opencode"], model: "kimi-k2.5-free" },
7673
7695
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
7674
7696
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
7675
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
7697
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
7676
7698
  ]
7677
7699
  }
7678
7700
  };
7679
7701
  CLI_CATEGORY_MODEL_REQUIREMENTS = {
7680
7702
  "visual-engineering": {
7681
7703
  fallbackChain: [
7682
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
7704
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
7683
7705
  { providers: ["zai-coding-plan"], model: "glm-5" },
7684
7706
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
7685
7707
  { providers: ["kimi-for-coding"], model: "k2p5" }
@@ -7687,26 +7709,26 @@ var init_model_fallback_requirements = __esm(() => {
7687
7709
  },
7688
7710
  ultrabrain: {
7689
7711
  fallbackChain: [
7690
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
7691
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
7712
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
7713
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
7692
7714
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
7693
7715
  ]
7694
7716
  },
7695
7717
  deep: {
7696
7718
  fallbackChain: [
7697
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
7719
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
7698
7720
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
7699
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
7721
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
7700
7722
  ],
7701
7723
  requiresModel: "gpt-5.3-codex"
7702
7724
  },
7703
7725
  artistry: {
7704
7726
  fallbackChain: [
7705
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
7727
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
7706
7728
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
7707
7729
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
7708
7730
  ],
7709
- requiresModel: "gemini-3-pro"
7731
+ requiresModel: "gemini-3.1-pro"
7710
7732
  },
7711
7733
  quick: {
7712
7734
  fallbackChain: [
@@ -7718,7 +7740,7 @@ var init_model_fallback_requirements = __esm(() => {
7718
7740
  "unspecified-low": {
7719
7741
  fallbackChain: [
7720
7742
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
7721
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
7743
+ { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
7722
7744
  { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" }
7723
7745
  ]
7724
7746
  },
@@ -7726,7 +7748,7 @@ var init_model_fallback_requirements = __esm(() => {
7726
7748
  fallbackChain: [
7727
7749
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
7728
7750
  { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
7729
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
7751
+ { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
7730
7752
  ]
7731
7753
  },
7732
7754
  writing: {
@@ -7883,7 +7905,7 @@ function generateModelConfig(config) {
7883
7905
  categories
7884
7906
  };
7885
7907
  }
7886
- var ZAI_MODEL = "zai-coding-plan/glm-4.7", ULTIMATE_FALLBACK = "opencode/glm-4.7-free", SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json";
7908
+ var ZAI_MODEL = "zai-coding-plan/glm-4.7", ULTIMATE_FALLBACK = "opencode/glm-4.7-free", SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/assets/oh-my-opencode.schema.json";
7887
7909
  var init_model_fallback = __esm(() => {
7888
7910
  init_model_fallback_requirements();
7889
7911
  init_fallback_chain_resolution();
@@ -7947,7 +7969,7 @@ function writeOmoConfig(installConfig) {
7947
7969
  `);
7948
7970
  return { success: true, configPath: omoConfigPath };
7949
7971
  }
7950
- const merged = deepMergeRecord(existing, newConfig);
7972
+ const merged = deepMergeRecord(newConfig, existing);
7951
7973
  writeFileSync4(omoConfigPath, JSON.stringify(merged, null, 2) + `
7952
7974
  `);
7953
7975
  } catch (parseErr) {
@@ -7978,11 +8000,71 @@ var init_write_omo_config = __esm(() => {
7978
8000
  init_generate_omo_config();
7979
8001
  });
7980
8002
 
8003
+ // src/shared/spawn-with-windows-hide.ts
8004
+ var {spawn: bunSpawn } = globalThis.Bun;
8005
+ import { spawn as nodeSpawn } from "child_process";
8006
+ import { Readable } from "stream";
8007
+ function toReadableStream(stream) {
8008
+ if (!stream) {
8009
+ return;
8010
+ }
8011
+ return Readable.toWeb(stream);
8012
+ }
8013
+ function wrapNodeProcess(proc) {
8014
+ let resolveExited;
8015
+ let exitCode = null;
8016
+ const exited = new Promise((resolve2) => {
8017
+ resolveExited = resolve2;
8018
+ });
8019
+ proc.on("exit", (code) => {
8020
+ exitCode = code ?? 1;
8021
+ resolveExited(exitCode);
8022
+ });
8023
+ proc.on("error", () => {
8024
+ if (exitCode === null) {
8025
+ exitCode = 1;
8026
+ resolveExited(1);
8027
+ }
8028
+ });
8029
+ return {
8030
+ get exitCode() {
8031
+ return exitCode;
8032
+ },
8033
+ exited,
8034
+ stdout: toReadableStream(proc.stdout),
8035
+ stderr: toReadableStream(proc.stderr),
8036
+ kill(signal) {
8037
+ try {
8038
+ if (!signal) {
8039
+ proc.kill();
8040
+ return;
8041
+ }
8042
+ proc.kill(signal);
8043
+ } catch {}
8044
+ }
8045
+ };
8046
+ }
8047
+ function spawnWithWindowsHide(command, options) {
8048
+ if (process.platform !== "win32") {
8049
+ return bunSpawn(command, options);
8050
+ }
8051
+ const [cmd, ...args] = command;
8052
+ const proc = nodeSpawn(cmd, args, {
8053
+ cwd: options.cwd,
8054
+ env: options.env,
8055
+ stdio: [options.stdin ?? "pipe", options.stdout ?? "pipe", options.stderr ?? "pipe"],
8056
+ windowsHide: true,
8057
+ shell: true
8058
+ });
8059
+ return wrapNodeProcess(proc);
8060
+ }
8061
+ var init_spawn_with_windows_hide = () => {};
8062
+
7981
8063
  // src/cli/config-manager/opencode-binary.ts
7982
8064
  async function findOpenCodeBinaryWithVersion() {
7983
8065
  for (const binary2 of OPENCODE_BINARIES) {
7984
8066
  try {
7985
- const proc = Bun.spawn([binary2, "--version"], {
8067
+ const proc = spawnWithWindowsHide([binary2, "--version"], {
7986
8068
  stdout: "pipe",
7987
8069
  stderr: "pipe"
7988
8070
  });
@@ -8009,6 +8091,7 @@ async function getOpenCodeVersion() {
8009
8091
  }
8010
8092
  var OPENCODE_BINARIES;
8011
8093
  var init_opencode_binary = __esm(() => {
8094
+ init_spawn_with_windows_hide();
8012
8095
  init_config_context();
8013
8096
  OPENCODE_BINARIES = ["opencode", "opencode-desktop"];
8014
8097
  });
@@ -8130,7 +8213,7 @@ var init_antigravity_provider_configuration = __esm(() => {
8130
8213
  google: {
8131
8214
  name: "Google",
8132
8215
  models: {
8133
- "antigravity-gemini-3-pro": {
8216
+ "antigravity-gemini-3.1-pro": {
8134
8217
  name: "Gemini 3 Pro (Antigravity)",
8135
8218
  limit: { context: 1048576, output: 65535 },
8136
8219
  modalities: { input: ["text", "image", "pdf"], output: ["text"] },
@@ -8332,7 +8415,7 @@ async function runBunInstall() {
8332
8415
  }
8333
8416
  async function runBunInstallWithDetails() {
8334
8417
  try {
8335
- const proc = Bun.spawn(["bun", "install"], {
8418
+ const proc = spawnWithWindowsHide(["bun", "install"], {
8336
8419
  cwd: getConfigDir(),
8337
8420
  stdout: "inherit",
8338
8421
  stderr: "inherit"
@@ -8372,6 +8455,7 @@ async function runBunInstallWithDetails() {
8372
8455
  var BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS;
8373
8456
  var init_bun_install = __esm(() => {
8374
8457
  init_config_context();
8458
+ init_spawn_with_windows_hide();
8375
8459
  BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000;
8376
8460
  });
8377
8461
 
@@ -9248,7 +9332,7 @@ var {
9248
9332
  // package.json
9249
9333
  var package_default = {
9250
9334
  name: "oh-my-opencode",
9251
- version: "3.8.5",
9335
+ version: "3.10.0",
9252
9336
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
9253
9337
  main: "dist/index.js",
9254
9338
  types: "dist/index.d.ts",
@@ -9308,6 +9392,7 @@ var package_default = {
9308
9392
  "@opencode-ai/sdk": "^1.1.19",
9309
9393
  commander: "^14.0.2",
9310
9394
  "detect-libc": "^2.0.0",
9395
+ diff: "^8.0.3",
9311
9396
  "js-yaml": "^4.1.1",
9312
9397
  "jsonc-parser": "^3.3.1",
9313
9398
  picocolors: "^1.1.1",
@@ -9322,13 +9407,17 @@ var package_default = {
9322
9407
  typescript: "^5.7.3"
9323
9408
  },
9324
9409
  optionalDependencies: {
9325
- "oh-my-opencode-darwin-arm64": "3.8.5",
9326
- "oh-my-opencode-darwin-x64": "3.8.5",
9327
- "oh-my-opencode-linux-arm64": "3.8.5",
9328
- "oh-my-opencode-linux-arm64-musl": "3.8.5",
9329
- "oh-my-opencode-linux-x64": "3.8.5",
9330
- "oh-my-opencode-linux-x64-musl": "3.8.5",
9331
- "oh-my-opencode-windows-x64": "3.8.5"
9410
+ "oh-my-opencode-darwin-arm64": "3.10.0",
9411
+ "oh-my-opencode-darwin-x64": "3.10.0",
9412
+ "oh-my-opencode-darwin-x64-baseline": "3.10.0",
9413
+ "oh-my-opencode-linux-arm64": "3.10.0",
9414
+ "oh-my-opencode-linux-arm64-musl": "3.10.0",
9415
+ "oh-my-opencode-linux-x64": "3.10.0",
9416
+ "oh-my-opencode-linux-x64-baseline": "3.10.0",
9417
+ "oh-my-opencode-linux-x64-musl": "3.10.0",
9418
+ "oh-my-opencode-linux-x64-musl-baseline": "3.10.0",
9419
+ "oh-my-opencode-windows-x64": "3.10.0",
9420
+ "oh-my-opencode-windows-x64-baseline": "3.10.0"
9332
9421
  },
9333
9422
  trustedDependencies: [
9334
9423
  "@ast-grep/cli",
@@ -10392,6 +10481,7 @@ function createEventState() {
10392
10481
  lastPartText: "",
10393
10482
  currentTool: null,
10394
10483
  hasReceivedMeaningfulWork: false,
10484
+ lastEventTimestamp: Date.now(),
10395
10485
  messageCount: 0,
10396
10486
  currentAgent: null,
10397
10487
  currentModel: null,
@@ -11059,6 +11149,7 @@ async function processEvents(ctx, stream, state) {
11059
11149
  if (ctx.verbose) {
11060
11150
  logEventVerbose(ctx, payload);
11061
11151
  }
11152
+ state.lastEventTimestamp = Date.now();
11062
11153
  handleSessionError(ctx, payload, state);
11063
11154
  handleSessionIdle(ctx, payload, state);
11064
11155
  handleSessionStatus(ctx, payload, state);
@@ -23484,7 +23575,9 @@ var AgentOverridesSchema = exports_external.object({
23484
23575
  build: AgentOverrideConfigSchema.optional(),
23485
23576
  plan: AgentOverrideConfigSchema.optional(),
23486
23577
  sisyphus: AgentOverrideConfigSchema.optional(),
23487
- hephaestus: AgentOverrideConfigSchema.optional(),
23578
+ hephaestus: AgentOverrideConfigSchema.extend({
23579
+ allow_non_gpt_model: exports_external.boolean().optional()
23580
+ }).optional(),
23488
23581
  "sisyphus-junior": AgentOverrideConfigSchema.optional(),
23489
23582
  "OpenCode-Builder": AgentOverrideConfigSchema.optional(),
23490
23583
  prometheus: AgentOverrideConfigSchema.optional(),
@@ -23535,6 +23628,7 @@ var CategoryConfigSchema = exports_external.object({
23535
23628
  textVerbosity: exports_external.enum(["low", "medium", "high"]).optional(),
23536
23629
  tools: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
23537
23630
  prompt_append: exports_external.string().optional(),
23631
+ max_prompt_tokens: exports_external.number().int().positive().optional(),
23538
23632
  is_unstable_agent: exports_external.boolean().optional(),
23539
23633
  disable: exports_external.boolean().optional()
23540
23634
  });
@@ -23670,7 +23764,8 @@ var HookNameSchema = exports_external.enum([
23670
23764
  "runtime-fallback",
23671
23765
  "write-existing-file-guard",
23672
23766
  "anthropic-effort",
23673
- "hashline-read-enhancer"
23767
+ "hashline-read-enhancer",
23768
+ "read-image-resizer"
23674
23769
  ]);
23675
23770
  // src/config/schema/notification.ts
23676
23771
  var NotificationConfigSchema = exports_external.object({
@@ -23777,7 +23872,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
23777
23872
  new_task_system_enabled: exports_external.boolean().optional(),
23778
23873
  default_run_agent: exports_external.string().optional(),
23779
23874
  disabled_mcps: exports_external.array(AnyMcpNameSchema).optional(),
23780
- disabled_agents: exports_external.array(BuiltinAgentNameSchema).optional(),
23875
+ disabled_agents: exports_external.array(exports_external.string()).optional(),
23781
23876
  disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
23782
23877
  disabled_hooks: exports_external.array(exports_external.string()).optional(),
23783
23878
  disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
@@ -25374,6 +25469,7 @@ init_port_utils();
25374
25469
  var import_picocolors9 = __toESM(require_picocolors(), 1);
25375
25470
 
25376
25471
  // src/cli/run/opencode-binary-resolver.ts
25472
+ init_spawn_with_windows_hide();
25377
25473
  import { delimiter, dirname, join as join8 } from "path";
25378
25474
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
25379
25475
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
@@ -25404,7 +25500,7 @@ function collectCandidateBinaryPaths(pathEnv, which = Bun.which, platform = proc
25404
25500
  }
25405
25501
  async function canExecuteBinary(binaryPath) {
25406
25502
  try {
25407
- const proc = Bun.spawn([binaryPath, "--version"], {
25503
+ const proc = spawnWithWindowsHide([binaryPath, "--version"], {
25408
25504
  stdout: "pipe",
25409
25505
  stderr: "pipe"
25410
25506
  });
@@ -25610,6 +25706,7 @@ function createJsonOutputManager(options = {}) {
25610
25706
  }
25611
25707
 
25612
25708
  // src/cli/run/on-complete-hook.ts
25709
+ init_spawn_with_windows_hide();
25613
25710
  var import_picocolors11 = __toESM(require_picocolors(), 1);
25614
25711
  async function executeOnCompleteHook(options) {
25615
25712
  const { command, sessionId, exitCode, durationMs, messageCount } = options;
@@ -25619,7 +25716,7 @@ async function executeOnCompleteHook(options) {
25619
25716
  }
25620
25717
  console.error(import_picocolors11.default.dim(`Running on-complete hook: ${trimmedCommand}`));
25621
25718
  try {
25622
- const proc = Bun.spawn(["sh", "-c", trimmedCommand], {
25719
+ const proc = spawnWithWindowsHide(["sh", "-c", trimmedCommand], {
25623
25720
  env: {
25624
25721
  ...process.env,
25625
25722
  SESSION_ID: sessionId,
@@ -25738,8 +25835,8 @@ function getPlanProgress(planPath) {
25738
25835
  }
25739
25836
  try {
25740
25837
  const content = readFileSync11(planPath, "utf-8");
25741
- const uncheckedMatches = content.match(/^[-*]\s*\[\s*\]/gm) || [];
25742
- const checkedMatches = content.match(/^[-*]\s*\[[xX]\]/gm) || [];
25838
+ const uncheckedMatches = content.match(/^\s*[-*]\s*\[\s*\]/gm) || [];
25839
+ const checkedMatches = content.match(/^\s*[-*]\s*\[[xX]\]/gm) || [];
25743
25840
  const total = uncheckedMatches.length + checkedMatches.length;
25744
25841
  const completed = checkedMatches.length;
25745
25842
  return {
@@ -25827,6 +25924,7 @@ function readState(directory, customPath) {
25827
25924
  active: isActive,
25828
25925
  iteration: iterationNum,
25829
25926
  max_iterations: Number(data.max_iterations) || DEFAULT_MAX_ITERATIONS,
25927
+ message_count_at_start: typeof data.message_count_at_start === "number" ? data.message_count_at_start : typeof data.message_count_at_start === "string" && data.message_count_at_start.trim() !== "" ? Number(data.message_count_at_start) : undefined,
25830
25928
  completion_promise: stripQuotes(data.completion_promise) || DEFAULT_COMPLETION_PROMISE,
25831
25929
  started_at: stripQuotes(data.started_at) || new Date().toISOString(),
25832
25930
  prompt: body.trim(),
@@ -25960,14 +26058,19 @@ var DEFAULT_POLL_INTERVAL_MS = 500;
25960
26058
  var DEFAULT_REQUIRED_CONSECUTIVE = 1;
25961
26059
  var ERROR_GRACE_CYCLES = 3;
25962
26060
  var MIN_STABILIZATION_MS = 1000;
26061
+ var DEFAULT_EVENT_WATCHDOG_MS = 30000;
26062
+ var DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS = 60000;
25963
26063
  async function pollForCompletion(ctx, eventState, abortController, options = {}) {
25964
26064
  const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
25965
26065
  const requiredConsecutive = options.requiredConsecutive ?? DEFAULT_REQUIRED_CONSECUTIVE;
25966
26066
  const rawMinStabilizationMs = options.minStabilizationMs ?? MIN_STABILIZATION_MS;
25967
26067
  const minStabilizationMs = rawMinStabilizationMs > 0 ? rawMinStabilizationMs : MIN_STABILIZATION_MS;
26068
+ const eventWatchdogMs = options.eventWatchdogMs ?? DEFAULT_EVENT_WATCHDOG_MS;
26069
+ const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
25968
26070
  let consecutiveCompleteChecks = 0;
25969
26071
  let errorCycleCount = 0;
25970
26072
  let firstWorkTimestamp = null;
26073
+ let secondaryTimeoutChecked = false;
25971
26074
  const pollStartTimestamp = Date.now();
25972
26075
  while (!abortController.signal.aborted) {
25973
26076
  await new Promise((resolve2) => setTimeout(resolve2, pollIntervalMs));
@@ -25987,7 +26090,24 @@ Session ended with error: ${eventState.lastError}`));
25987
26090
  } else {
25988
26091
  errorCycleCount = 0;
25989
26092
  }
25990
- const mainSessionStatus = await getMainSessionStatus(ctx);
26093
+ let mainSessionStatus = null;
26094
+ if (eventState.lastEventTimestamp !== null) {
26095
+ const timeSinceLastEvent = Date.now() - eventState.lastEventTimestamp;
26096
+ if (timeSinceLastEvent > eventWatchdogMs) {
26097
+ console.log(import_picocolors14.default.yellow(`
26098
+ No events for ${Math.round(timeSinceLastEvent / 1000)}s, verifying session status...`));
26099
+ mainSessionStatus = await getMainSessionStatus(ctx);
26100
+ if (mainSessionStatus === "idle") {
26101
+ eventState.mainSessionIdle = true;
26102
+ } else if (mainSessionStatus === "busy" || mainSessionStatus === "retry") {
26103
+ eventState.mainSessionIdle = false;
26104
+ }
26105
+ eventState.lastEventTimestamp = Date.now();
26106
+ }
26107
+ }
26108
+ if (mainSessionStatus === null) {
26109
+ mainSessionStatus = await getMainSessionStatus(ctx);
26110
+ }
25991
26111
  if (mainSessionStatus === "busy" || mainSessionStatus === "retry") {
25992
26112
  eventState.mainSessionIdle = false;
25993
26113
  } else if (mainSessionStatus === "idle") {
@@ -26006,6 +26126,27 @@ Session ended with error: ${eventState.lastError}`));
26006
26126
  consecutiveCompleteChecks = 0;
26007
26127
  continue;
26008
26128
  }
26129
+ if (Date.now() - pollStartTimestamp > secondaryMeaningfulWorkTimeoutMs && !secondaryTimeoutChecked) {
26130
+ secondaryTimeoutChecked = true;
26131
+ const childrenRes = await ctx.client.session.children({
26132
+ path: { id: ctx.sessionID },
26133
+ query: { directory: ctx.directory }
26134
+ });
26135
+ const children = normalizeSDKResponse(childrenRes, []);
26136
+ const todosRes = await ctx.client.session.todo({
26137
+ path: { id: ctx.sessionID },
26138
+ query: { directory: ctx.directory }
26139
+ });
26140
+ const todos = normalizeSDKResponse(todosRes, []);
26141
+ const hasActiveChildren = Array.isArray(children) && children.length > 0;
26142
+ const hasActiveTodos = Array.isArray(todos) && todos.some((t) => t?.status !== "completed" && t?.status !== "cancelled");
26143
+ const hasActiveWork = hasActiveChildren || hasActiveTodos;
26144
+ if (hasActiveWork) {
26145
+ eventState.hasReceivedMeaningfulWork = true;
26146
+ console.log(import_picocolors14.default.yellow(`
26147
+ No meaningful work events for ${Math.round(secondaryMeaningfulWorkTimeoutMs / 1000)}s but session has active work - assuming in progress`));
26148
+ }
26149
+ }
26009
26150
  } else {
26010
26151
  if (firstWorkTimestamp === null) {
26011
26152
  firstWorkTimestamp = Date.now();
@@ -26459,6 +26600,7 @@ var OPENCODE_BINARIES2 = ["opencode", "opencode-desktop"];
26459
26600
  import { existsSync as existsSync22, readFileSync as readFileSync23 } from "fs";
26460
26601
 
26461
26602
  // src/cli/doctor/checks/system-binary.ts
26603
+ init_spawn_with_windows_hide();
26462
26604
  import { existsSync as existsSync19 } from "fs";
26463
26605
  import { homedir as homedir5 } from "os";
26464
26606
  import { join as join16 } from "path";
@@ -26519,7 +26661,7 @@ async function findOpenCodeBinary() {
26519
26661
  async function getOpenCodeVersion2(binaryPath, platform = process.platform) {
26520
26662
  try {
26521
26663
  const command = buildVersionCommand(binaryPath, platform);
26522
- const processResult = Bun.spawn(command, { stdout: "pipe", stderr: "pipe" });
26664
+ const processResult = spawnWithWindowsHide(command, { stdout: "pipe", stderr: "pipe" });
26523
26665
  const output = await new Response(processResult.stdout).text();
26524
26666
  await processResult.exited;
26525
26667
  if (processResult.exitCode !== 0)
@@ -27135,6 +27277,7 @@ async function checkConfig() {
27135
27277
  }
27136
27278
 
27137
27279
  // src/cli/doctor/checks/dependencies.ts
27280
+ init_spawn_with_windows_hide();
27138
27281
  import { existsSync as existsSync24 } from "fs";
27139
27282
  import { createRequire } from "module";
27140
27283
  import { dirname as dirname6, join as join22 } from "path";
@@ -27149,7 +27292,7 @@ async function checkBinaryExists(binary2) {
27149
27292
  }
27150
27293
  async function getBinaryVersion(binary2) {
27151
27294
  try {
27152
- const proc = Bun.spawn([binary2, "--version"], { stdout: "pipe", stderr: "pipe" });
27295
+ const proc = spawnWithWindowsHide([binary2, "--version"], { stdout: "pipe", stderr: "pipe" });
27153
27296
  const output = await new Response(proc.stdout).text();
27154
27297
  await proc.exited;
27155
27298
  if (proc.exitCode === 0) {
@@ -27256,6 +27399,7 @@ async function checkCommentChecker() {
27256
27399
  }
27257
27400
 
27258
27401
  // src/cli/doctor/checks/tools-gh.ts
27402
+ init_spawn_with_windows_hide();
27259
27403
  async function checkBinaryExists2(binary2) {
27260
27404
  try {
27261
27405
  const binaryPath = Bun.which(binary2);
@@ -27266,7 +27410,7 @@ async function checkBinaryExists2(binary2) {
27266
27410
  }
27267
27411
  async function getGhVersion() {
27268
27412
  try {
27269
- const processResult = Bun.spawn(["gh", "--version"], { stdout: "pipe", stderr: "pipe" });
27413
+ const processResult = spawnWithWindowsHide(["gh", "--version"], { stdout: "pipe", stderr: "pipe" });
27270
27414
  const output = await new Response(processResult.stdout).text();
27271
27415
  await processResult.exited;
27272
27416
  if (processResult.exitCode !== 0)
@@ -27280,7 +27424,7 @@ async function getGhVersion() {
27280
27424
  }
27281
27425
  async function getGhAuthStatus() {
27282
27426
  try {
27283
- const processResult = Bun.spawn(["gh", "auth", "status"], {
27427
+ const processResult = spawnWithWindowsHide(["gh", "auth", "status"], {
27284
27428
  stdout: "pipe",
27285
27429
  stderr: "pipe",
27286
27430
  env: { ...process.env, GH_NO_UPDATE_NOTIFIER: "1" }
@@ -28114,10 +28258,10 @@ async function findAvailablePort2(startPort = DEFAULT_PORT) {
28114
28258
 
28115
28259
  // src/features/mcp-oauth/oauth-authorization-flow.ts
28116
28260
  import { spawn as spawn2 } from "child_process";
28117
- import { createHash, randomBytes } from "crypto";
28261
+ import { createHash, randomBytes as randomBytes2 } from "crypto";
28118
28262
  import { createServer } from "http";
28119
28263
  function generateCodeVerifier() {
28120
- return randomBytes(32).toString("base64url");
28264
+ return randomBytes2(32).toString("base64url");
28121
28265
  }
28122
28266
  function generateCodeChallenge(verifier) {
28123
28267
  return createHash("sha256").update(verifier).digest("base64url");
@@ -28202,7 +28346,7 @@ function openBrowser(url2) {
28202
28346
  async function runAuthorizationCodeRedirect(options) {
28203
28347
  const verifier = generateCodeVerifier();
28204
28348
  const challenge = generateCodeChallenge(verifier);
28205
- const state = randomBytes(16).toString("hex");
28349
+ const state = randomBytes2(16).toString("hex");
28206
28350
  const authorizationUrl = buildAuthorizationUrl(options.authorizationEndpoint, {
28207
28351
  clientId: options.clientId,
28208
28352
  redirectUri: options.redirectUri,