oh-my-opencode 3.8.4 → 3.9.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.
- package/README.ja.md +3 -3
- package/README.ko.md +3 -3
- package/README.md +3 -3
- package/README.zh-cn.md +3 -3
- package/bin/oh-my-opencode.js +96 -34
- package/bin/platform.d.ts +14 -0
- package/bin/platform.js +44 -0
- package/bin/platform.test.ts +56 -1
- package/dist/agents/atlas/agent.d.ts +1 -1
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/hephaestus.d.ts +1 -1
- package/dist/agents/sisyphus.d.ts +1 -1
- package/dist/cli/config-manager/antigravity-provider-configuration.d.ts +3 -3
- package/dist/cli/index.js +199 -59
- package/dist/cli/run/event-state.d.ts +2 -0
- package/dist/cli/run/poll-for-completion.d.ts +2 -0
- package/dist/config/schema/agent-overrides.d.ts +1 -0
- package/dist/config/schema/categories.d.ts +2 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +3 -12
- package/dist/features/background-agent/manager.d.ts +9 -0
- package/dist/features/boulder-state/storage.d.ts +1 -1
- package/dist/features/boulder-state/types.d.ts +2 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -0
- package/dist/hooks/atlas/types.d.ts +1 -0
- package/dist/hooks/background-notification/hook.d.ts +11 -0
- package/dist/hooks/no-hephaestus-non-gpt/hook.d.ts +5 -1
- package/dist/hooks/ralph-loop/completion-promise-detector.d.ts +1 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +2 -0
- package/dist/hooks/ralph-loop/ralph-loop-hook.d.ts +1 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/session-notification.d.ts +1 -0
- package/dist/hooks/start-work/index.d.ts +3 -0
- package/dist/hooks/start-work/parse-user-request.d.ts +5 -0
- package/dist/hooks/start-work/worktree-detector.d.ts +1 -0
- package/dist/hooks/stop-continuation-guard/hook.d.ts +6 -1
- package/dist/hooks/think-mode/hook.d.ts +14 -2
- package/dist/hooks/think-mode/switcher.d.ts +0 -56
- package/dist/hooks/think-mode/types.d.ts +1 -15
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +14 -0
- package/dist/index.js +1626 -898
- package/dist/oh-my-opencode.schema.json +9 -13
- package/dist/shared/model-suggestion-retry.d.ts +4 -2
- package/dist/shared/prompt-timeout-context.d.ts +12 -0
- package/dist/shared/spawn-with-windows-hide.d.ts +15 -0
- package/dist/tools/delegate-task/category-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/skill-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/token-limiter.d.ts +4 -0
- package/dist/tools/delegate-task/types.d.ts +9 -0
- package/dist/tools/hashline-edit/constants.d.ts +0 -1
- package/dist/tools/hashline-edit/edit-operation-primitives.d.ts +0 -2
- package/dist/tools/hashline-edit/edit-operations.d.ts +0 -1
- package/dist/tools/hashline-edit/edit-ordering.d.ts +1 -0
- package/dist/tools/hashline-edit/index.d.ts +2 -2
- package/dist/tools/hashline-edit/normalize-edits.d.ts +6 -9
- package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
- package/dist/tools/hashline-edit/types.d.ts +17 -41
- package/dist/tools/hashline-edit/validation.d.ts +1 -0
- package/package.json +13 -8
- 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: (
|
|
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: (
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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
|
}
|
|
@@ -7214,7 +7234,6 @@ var init_tmux = __esm(() => {
|
|
|
7214
7234
|
init_constants2();
|
|
7215
7235
|
init_tmux_utils();
|
|
7216
7236
|
});
|
|
7217
|
-
|
|
7218
7237
|
// src/shared/model-suggestion-retry.ts
|
|
7219
7238
|
var init_model_suggestion_retry = __esm(() => {
|
|
7220
7239
|
init_logger();
|
|
@@ -7605,14 +7624,14 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7605
7624
|
},
|
|
7606
7625
|
hephaestus: {
|
|
7607
7626
|
fallbackChain: [
|
|
7608
|
-
{ providers: ["openai", "
|
|
7627
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" }
|
|
7609
7628
|
],
|
|
7610
|
-
requiresProvider: ["openai", "
|
|
7629
|
+
requiresProvider: ["openai", "opencode"]
|
|
7611
7630
|
},
|
|
7612
7631
|
oracle: {
|
|
7613
7632
|
fallbackChain: [
|
|
7614
7633
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7615
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7634
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
|
|
7616
7635
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
7617
7636
|
]
|
|
7618
7637
|
},
|
|
@@ -7647,7 +7666,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7647
7666
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7648
7667
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7649
7668
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7650
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7669
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
|
|
7651
7670
|
]
|
|
7652
7671
|
},
|
|
7653
7672
|
metis: {
|
|
@@ -7656,14 +7675,14 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7656
7675
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7657
7676
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7658
7677
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7659
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7678
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
|
|
7660
7679
|
]
|
|
7661
7680
|
},
|
|
7662
7681
|
momus: {
|
|
7663
7682
|
fallbackChain: [
|
|
7664
7683
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" },
|
|
7665
7684
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7666
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7685
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
|
|
7667
7686
|
]
|
|
7668
7687
|
},
|
|
7669
7688
|
atlas: {
|
|
@@ -7672,14 +7691,14 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7672
7691
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7673
7692
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
|
7674
7693
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
|
|
7675
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7694
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
|
|
7676
7695
|
]
|
|
7677
7696
|
}
|
|
7678
7697
|
};
|
|
7679
7698
|
CLI_CATEGORY_MODEL_REQUIREMENTS = {
|
|
7680
7699
|
"visual-engineering": {
|
|
7681
7700
|
fallbackChain: [
|
|
7682
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7701
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
|
|
7683
7702
|
{ providers: ["zai-coding-plan"], model: "glm-5" },
|
|
7684
7703
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7685
7704
|
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
@@ -7687,26 +7706,26 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7687
7706
|
},
|
|
7688
7707
|
ultrabrain: {
|
|
7689
7708
|
fallbackChain: [
|
|
7690
|
-
{ providers: ["openai", "
|
|
7691
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7709
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
|
|
7710
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
|
|
7692
7711
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
7693
7712
|
]
|
|
7694
7713
|
},
|
|
7695
7714
|
deep: {
|
|
7696
7715
|
fallbackChain: [
|
|
7697
|
-
{ providers: ["openai", "
|
|
7716
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
|
|
7698
7717
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7699
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7718
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
|
|
7700
7719
|
],
|
|
7701
7720
|
requiresModel: "gpt-5.3-codex"
|
|
7702
7721
|
},
|
|
7703
7722
|
artistry: {
|
|
7704
7723
|
fallbackChain: [
|
|
7705
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7724
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
|
|
7706
7725
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7707
7726
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
|
|
7708
7727
|
],
|
|
7709
|
-
requiresModel: "gemini-3-pro"
|
|
7728
|
+
requiresModel: "gemini-3.1-pro"
|
|
7710
7729
|
},
|
|
7711
7730
|
quick: {
|
|
7712
7731
|
fallbackChain: [
|
|
@@ -7718,7 +7737,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7718
7737
|
"unspecified-low": {
|
|
7719
7738
|
fallbackChain: [
|
|
7720
7739
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
|
7721
|
-
{ providers: ["openai", "
|
|
7740
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
|
|
7722
7741
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" }
|
|
7723
7742
|
]
|
|
7724
7743
|
},
|
|
@@ -7726,7 +7745,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7726
7745
|
fallbackChain: [
|
|
7727
7746
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7728
7747
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7729
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7748
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
|
|
7730
7749
|
]
|
|
7731
7750
|
},
|
|
7732
7751
|
writing: {
|
|
@@ -7947,7 +7966,7 @@ function writeOmoConfig(installConfig) {
|
|
|
7947
7966
|
`);
|
|
7948
7967
|
return { success: true, configPath: omoConfigPath };
|
|
7949
7968
|
}
|
|
7950
|
-
const merged = deepMergeRecord(
|
|
7969
|
+
const merged = deepMergeRecord(newConfig, existing);
|
|
7951
7970
|
writeFileSync4(omoConfigPath, JSON.stringify(merged, null, 2) + `
|
|
7952
7971
|
`);
|
|
7953
7972
|
} catch (parseErr) {
|
|
@@ -7978,11 +7997,71 @@ var init_write_omo_config = __esm(() => {
|
|
|
7978
7997
|
init_generate_omo_config();
|
|
7979
7998
|
});
|
|
7980
7999
|
|
|
8000
|
+
// src/shared/spawn-with-windows-hide.ts
|
|
8001
|
+
var {spawn: bunSpawn } = globalThis.Bun;
|
|
8002
|
+
import { spawn as nodeSpawn } from "child_process";
|
|
8003
|
+
import { Readable } from "stream";
|
|
8004
|
+
function toReadableStream(stream) {
|
|
8005
|
+
if (!stream) {
|
|
8006
|
+
return;
|
|
8007
|
+
}
|
|
8008
|
+
return Readable.toWeb(stream);
|
|
8009
|
+
}
|
|
8010
|
+
function wrapNodeProcess(proc) {
|
|
8011
|
+
let resolveExited;
|
|
8012
|
+
let exitCode = null;
|
|
8013
|
+
const exited = new Promise((resolve2) => {
|
|
8014
|
+
resolveExited = resolve2;
|
|
8015
|
+
});
|
|
8016
|
+
proc.on("exit", (code) => {
|
|
8017
|
+
exitCode = code ?? 1;
|
|
8018
|
+
resolveExited(exitCode);
|
|
8019
|
+
});
|
|
8020
|
+
proc.on("error", () => {
|
|
8021
|
+
if (exitCode === null) {
|
|
8022
|
+
exitCode = 1;
|
|
8023
|
+
resolveExited(1);
|
|
8024
|
+
}
|
|
8025
|
+
});
|
|
8026
|
+
return {
|
|
8027
|
+
get exitCode() {
|
|
8028
|
+
return exitCode;
|
|
8029
|
+
},
|
|
8030
|
+
exited,
|
|
8031
|
+
stdout: toReadableStream(proc.stdout),
|
|
8032
|
+
stderr: toReadableStream(proc.stderr),
|
|
8033
|
+
kill(signal) {
|
|
8034
|
+
try {
|
|
8035
|
+
if (!signal) {
|
|
8036
|
+
proc.kill();
|
|
8037
|
+
return;
|
|
8038
|
+
}
|
|
8039
|
+
proc.kill(signal);
|
|
8040
|
+
} catch {}
|
|
8041
|
+
}
|
|
8042
|
+
};
|
|
8043
|
+
}
|
|
8044
|
+
function spawnWithWindowsHide(command, options) {
|
|
8045
|
+
if (process.platform !== "win32") {
|
|
8046
|
+
return bunSpawn(command, options);
|
|
8047
|
+
}
|
|
8048
|
+
const [cmd, ...args] = command;
|
|
8049
|
+
const proc = nodeSpawn(cmd, args, {
|
|
8050
|
+
cwd: options.cwd,
|
|
8051
|
+
env: options.env,
|
|
8052
|
+
stdio: [options.stdin ?? "pipe", options.stdout ?? "pipe", options.stderr ?? "pipe"],
|
|
8053
|
+
windowsHide: true,
|
|
8054
|
+
shell: true
|
|
8055
|
+
});
|
|
8056
|
+
return wrapNodeProcess(proc);
|
|
8057
|
+
}
|
|
8058
|
+
var init_spawn_with_windows_hide = () => {};
|
|
8059
|
+
|
|
7981
8060
|
// src/cli/config-manager/opencode-binary.ts
|
|
7982
8061
|
async function findOpenCodeBinaryWithVersion() {
|
|
7983
8062
|
for (const binary2 of OPENCODE_BINARIES) {
|
|
7984
8063
|
try {
|
|
7985
|
-
const proc =
|
|
8064
|
+
const proc = spawnWithWindowsHide([binary2, "--version"], {
|
|
7986
8065
|
stdout: "pipe",
|
|
7987
8066
|
stderr: "pipe"
|
|
7988
8067
|
});
|
|
@@ -8009,6 +8088,7 @@ async function getOpenCodeVersion() {
|
|
|
8009
8088
|
}
|
|
8010
8089
|
var OPENCODE_BINARIES;
|
|
8011
8090
|
var init_opencode_binary = __esm(() => {
|
|
8091
|
+
init_spawn_with_windows_hide();
|
|
8012
8092
|
init_config_context();
|
|
8013
8093
|
OPENCODE_BINARIES = ["opencode", "opencode-desktop"];
|
|
8014
8094
|
});
|
|
@@ -8130,7 +8210,7 @@ var init_antigravity_provider_configuration = __esm(() => {
|
|
|
8130
8210
|
google: {
|
|
8131
8211
|
name: "Google",
|
|
8132
8212
|
models: {
|
|
8133
|
-
"antigravity-gemini-3-pro": {
|
|
8213
|
+
"antigravity-gemini-3.1-pro": {
|
|
8134
8214
|
name: "Gemini 3 Pro (Antigravity)",
|
|
8135
8215
|
limit: { context: 1048576, output: 65535 },
|
|
8136
8216
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] },
|
|
@@ -8332,7 +8412,7 @@ async function runBunInstall() {
|
|
|
8332
8412
|
}
|
|
8333
8413
|
async function runBunInstallWithDetails() {
|
|
8334
8414
|
try {
|
|
8335
|
-
const proc =
|
|
8415
|
+
const proc = spawnWithWindowsHide(["bun", "install"], {
|
|
8336
8416
|
cwd: getConfigDir(),
|
|
8337
8417
|
stdout: "inherit",
|
|
8338
8418
|
stderr: "inherit"
|
|
@@ -8372,6 +8452,7 @@ async function runBunInstallWithDetails() {
|
|
|
8372
8452
|
var BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS;
|
|
8373
8453
|
var init_bun_install = __esm(() => {
|
|
8374
8454
|
init_config_context();
|
|
8455
|
+
init_spawn_with_windows_hide();
|
|
8375
8456
|
BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000;
|
|
8376
8457
|
});
|
|
8377
8458
|
|
|
@@ -9248,7 +9329,7 @@ var {
|
|
|
9248
9329
|
// package.json
|
|
9249
9330
|
var package_default = {
|
|
9250
9331
|
name: "oh-my-opencode",
|
|
9251
|
-
version: "3.
|
|
9332
|
+
version: "3.9.0",
|
|
9252
9333
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
9253
9334
|
main: "dist/index.js",
|
|
9254
9335
|
types: "dist/index.d.ts",
|
|
@@ -9308,6 +9389,7 @@ var package_default = {
|
|
|
9308
9389
|
"@opencode-ai/sdk": "^1.1.19",
|
|
9309
9390
|
commander: "^14.0.2",
|
|
9310
9391
|
"detect-libc": "^2.0.0",
|
|
9392
|
+
diff: "^8.0.3",
|
|
9311
9393
|
"js-yaml": "^4.1.1",
|
|
9312
9394
|
"jsonc-parser": "^3.3.1",
|
|
9313
9395
|
picocolors: "^1.1.1",
|
|
@@ -9322,13 +9404,17 @@ var package_default = {
|
|
|
9322
9404
|
typescript: "^5.7.3"
|
|
9323
9405
|
},
|
|
9324
9406
|
optionalDependencies: {
|
|
9325
|
-
"oh-my-opencode-darwin-arm64": "3.
|
|
9326
|
-
"oh-my-opencode-darwin-x64": "3.
|
|
9327
|
-
"oh-my-opencode-
|
|
9328
|
-
"oh-my-opencode-linux-arm64
|
|
9329
|
-
"oh-my-opencode-linux-
|
|
9330
|
-
"oh-my-opencode-linux-x64
|
|
9331
|
-
"oh-my-opencode-
|
|
9407
|
+
"oh-my-opencode-darwin-arm64": "3.9.0",
|
|
9408
|
+
"oh-my-opencode-darwin-x64": "3.9.0",
|
|
9409
|
+
"oh-my-opencode-darwin-x64-baseline": "3.9.0",
|
|
9410
|
+
"oh-my-opencode-linux-arm64": "3.9.0",
|
|
9411
|
+
"oh-my-opencode-linux-arm64-musl": "3.9.0",
|
|
9412
|
+
"oh-my-opencode-linux-x64": "3.9.0",
|
|
9413
|
+
"oh-my-opencode-linux-x64-baseline": "3.9.0",
|
|
9414
|
+
"oh-my-opencode-linux-x64-musl": "3.9.0",
|
|
9415
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.9.0",
|
|
9416
|
+
"oh-my-opencode-windows-x64": "3.9.0",
|
|
9417
|
+
"oh-my-opencode-windows-x64-baseline": "3.9.0"
|
|
9332
9418
|
},
|
|
9333
9419
|
trustedDependencies: [
|
|
9334
9420
|
"@ast-grep/cli",
|
|
@@ -10392,6 +10478,7 @@ function createEventState() {
|
|
|
10392
10478
|
lastPartText: "",
|
|
10393
10479
|
currentTool: null,
|
|
10394
10480
|
hasReceivedMeaningfulWork: false,
|
|
10481
|
+
lastEventTimestamp: Date.now(),
|
|
10395
10482
|
messageCount: 0,
|
|
10396
10483
|
currentAgent: null,
|
|
10397
10484
|
currentModel: null,
|
|
@@ -11059,6 +11146,7 @@ async function processEvents(ctx, stream, state) {
|
|
|
11059
11146
|
if (ctx.verbose) {
|
|
11060
11147
|
logEventVerbose(ctx, payload);
|
|
11061
11148
|
}
|
|
11149
|
+
state.lastEventTimestamp = Date.now();
|
|
11062
11150
|
handleSessionError(ctx, payload, state);
|
|
11063
11151
|
handleSessionIdle(ctx, payload, state);
|
|
11064
11152
|
handleSessionStatus(ctx, payload, state);
|
|
@@ -23484,7 +23572,9 @@ var AgentOverridesSchema = exports_external.object({
|
|
|
23484
23572
|
build: AgentOverrideConfigSchema.optional(),
|
|
23485
23573
|
plan: AgentOverrideConfigSchema.optional(),
|
|
23486
23574
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
23487
|
-
hephaestus: AgentOverrideConfigSchema.
|
|
23575
|
+
hephaestus: AgentOverrideConfigSchema.extend({
|
|
23576
|
+
allow_non_gpt_model: exports_external.boolean().optional()
|
|
23577
|
+
}).optional(),
|
|
23488
23578
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
23489
23579
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
23490
23580
|
prometheus: AgentOverrideConfigSchema.optional(),
|
|
@@ -23535,6 +23625,7 @@ var CategoryConfigSchema = exports_external.object({
|
|
|
23535
23625
|
textVerbosity: exports_external.enum(["low", "medium", "high"]).optional(),
|
|
23536
23626
|
tools: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
23537
23627
|
prompt_append: exports_external.string().optional(),
|
|
23628
|
+
max_prompt_tokens: exports_external.number().int().positive().optional(),
|
|
23538
23629
|
is_unstable_agent: exports_external.boolean().optional(),
|
|
23539
23630
|
disable: exports_external.boolean().optional()
|
|
23540
23631
|
});
|
|
@@ -23777,7 +23868,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
23777
23868
|
new_task_system_enabled: exports_external.boolean().optional(),
|
|
23778
23869
|
default_run_agent: exports_external.string().optional(),
|
|
23779
23870
|
disabled_mcps: exports_external.array(AnyMcpNameSchema).optional(),
|
|
23780
|
-
disabled_agents: exports_external.array(
|
|
23871
|
+
disabled_agents: exports_external.array(exports_external.string()).optional(),
|
|
23781
23872
|
disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
|
|
23782
23873
|
disabled_hooks: exports_external.array(exports_external.string()).optional(),
|
|
23783
23874
|
disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
|
|
@@ -25374,6 +25465,7 @@ init_port_utils();
|
|
|
25374
25465
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
25375
25466
|
|
|
25376
25467
|
// src/cli/run/opencode-binary-resolver.ts
|
|
25468
|
+
init_spawn_with_windows_hide();
|
|
25377
25469
|
import { delimiter, dirname, join as join8 } from "path";
|
|
25378
25470
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
25379
25471
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
@@ -25404,7 +25496,7 @@ function collectCandidateBinaryPaths(pathEnv, which = Bun.which, platform = proc
|
|
|
25404
25496
|
}
|
|
25405
25497
|
async function canExecuteBinary(binaryPath) {
|
|
25406
25498
|
try {
|
|
25407
|
-
const proc =
|
|
25499
|
+
const proc = spawnWithWindowsHide([binaryPath, "--version"], {
|
|
25408
25500
|
stdout: "pipe",
|
|
25409
25501
|
stderr: "pipe"
|
|
25410
25502
|
});
|
|
@@ -25610,6 +25702,7 @@ function createJsonOutputManager(options = {}) {
|
|
|
25610
25702
|
}
|
|
25611
25703
|
|
|
25612
25704
|
// src/cli/run/on-complete-hook.ts
|
|
25705
|
+
init_spawn_with_windows_hide();
|
|
25613
25706
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
25614
25707
|
async function executeOnCompleteHook(options) {
|
|
25615
25708
|
const { command, sessionId, exitCode, durationMs, messageCount } = options;
|
|
@@ -25619,7 +25712,7 @@ async function executeOnCompleteHook(options) {
|
|
|
25619
25712
|
}
|
|
25620
25713
|
console.error(import_picocolors11.default.dim(`Running on-complete hook: ${trimmedCommand}`));
|
|
25621
25714
|
try {
|
|
25622
|
-
const proc =
|
|
25715
|
+
const proc = spawnWithWindowsHide(["sh", "-c", trimmedCommand], {
|
|
25623
25716
|
env: {
|
|
25624
25717
|
...process.env,
|
|
25625
25718
|
SESSION_ID: sessionId,
|
|
@@ -25738,8 +25831,8 @@ function getPlanProgress(planPath) {
|
|
|
25738
25831
|
}
|
|
25739
25832
|
try {
|
|
25740
25833
|
const content = readFileSync11(planPath, "utf-8");
|
|
25741
|
-
const uncheckedMatches = content.match(
|
|
25742
|
-
const checkedMatches = content.match(
|
|
25834
|
+
const uncheckedMatches = content.match(/^\s*[-*]\s*\[\s*\]/gm) || [];
|
|
25835
|
+
const checkedMatches = content.match(/^\s*[-*]\s*\[[xX]\]/gm) || [];
|
|
25743
25836
|
const total = uncheckedMatches.length + checkedMatches.length;
|
|
25744
25837
|
const completed = checkedMatches.length;
|
|
25745
25838
|
return {
|
|
@@ -25827,6 +25920,7 @@ function readState(directory, customPath) {
|
|
|
25827
25920
|
active: isActive,
|
|
25828
25921
|
iteration: iterationNum,
|
|
25829
25922
|
max_iterations: Number(data.max_iterations) || DEFAULT_MAX_ITERATIONS,
|
|
25923
|
+
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
25924
|
completion_promise: stripQuotes(data.completion_promise) || DEFAULT_COMPLETION_PROMISE,
|
|
25831
25925
|
started_at: stripQuotes(data.started_at) || new Date().toISOString(),
|
|
25832
25926
|
prompt: body.trim(),
|
|
@@ -25960,14 +26054,19 @@ var DEFAULT_POLL_INTERVAL_MS = 500;
|
|
|
25960
26054
|
var DEFAULT_REQUIRED_CONSECUTIVE = 1;
|
|
25961
26055
|
var ERROR_GRACE_CYCLES = 3;
|
|
25962
26056
|
var MIN_STABILIZATION_MS = 1000;
|
|
26057
|
+
var DEFAULT_EVENT_WATCHDOG_MS = 30000;
|
|
26058
|
+
var DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS = 60000;
|
|
25963
26059
|
async function pollForCompletion(ctx, eventState, abortController, options = {}) {
|
|
25964
26060
|
const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
25965
26061
|
const requiredConsecutive = options.requiredConsecutive ?? DEFAULT_REQUIRED_CONSECUTIVE;
|
|
25966
26062
|
const rawMinStabilizationMs = options.minStabilizationMs ?? MIN_STABILIZATION_MS;
|
|
25967
26063
|
const minStabilizationMs = rawMinStabilizationMs > 0 ? rawMinStabilizationMs : MIN_STABILIZATION_MS;
|
|
26064
|
+
const eventWatchdogMs = options.eventWatchdogMs ?? DEFAULT_EVENT_WATCHDOG_MS;
|
|
26065
|
+
const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
|
|
25968
26066
|
let consecutiveCompleteChecks = 0;
|
|
25969
26067
|
let errorCycleCount = 0;
|
|
25970
26068
|
let firstWorkTimestamp = null;
|
|
26069
|
+
let secondaryTimeoutChecked = false;
|
|
25971
26070
|
const pollStartTimestamp = Date.now();
|
|
25972
26071
|
while (!abortController.signal.aborted) {
|
|
25973
26072
|
await new Promise((resolve2) => setTimeout(resolve2, pollIntervalMs));
|
|
@@ -25987,7 +26086,24 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
25987
26086
|
} else {
|
|
25988
26087
|
errorCycleCount = 0;
|
|
25989
26088
|
}
|
|
25990
|
-
|
|
26089
|
+
let mainSessionStatus = null;
|
|
26090
|
+
if (eventState.lastEventTimestamp !== null) {
|
|
26091
|
+
const timeSinceLastEvent = Date.now() - eventState.lastEventTimestamp;
|
|
26092
|
+
if (timeSinceLastEvent > eventWatchdogMs) {
|
|
26093
|
+
console.log(import_picocolors14.default.yellow(`
|
|
26094
|
+
No events for ${Math.round(timeSinceLastEvent / 1000)}s, verifying session status...`));
|
|
26095
|
+
mainSessionStatus = await getMainSessionStatus(ctx);
|
|
26096
|
+
if (mainSessionStatus === "idle") {
|
|
26097
|
+
eventState.mainSessionIdle = true;
|
|
26098
|
+
} else if (mainSessionStatus === "busy" || mainSessionStatus === "retry") {
|
|
26099
|
+
eventState.mainSessionIdle = false;
|
|
26100
|
+
}
|
|
26101
|
+
eventState.lastEventTimestamp = Date.now();
|
|
26102
|
+
}
|
|
26103
|
+
}
|
|
26104
|
+
if (mainSessionStatus === null) {
|
|
26105
|
+
mainSessionStatus = await getMainSessionStatus(ctx);
|
|
26106
|
+
}
|
|
25991
26107
|
if (mainSessionStatus === "busy" || mainSessionStatus === "retry") {
|
|
25992
26108
|
eventState.mainSessionIdle = false;
|
|
25993
26109
|
} else if (mainSessionStatus === "idle") {
|
|
@@ -26006,6 +26122,27 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
26006
26122
|
consecutiveCompleteChecks = 0;
|
|
26007
26123
|
continue;
|
|
26008
26124
|
}
|
|
26125
|
+
if (Date.now() - pollStartTimestamp > secondaryMeaningfulWorkTimeoutMs && !secondaryTimeoutChecked) {
|
|
26126
|
+
secondaryTimeoutChecked = true;
|
|
26127
|
+
const childrenRes = await ctx.client.session.children({
|
|
26128
|
+
path: { id: ctx.sessionID },
|
|
26129
|
+
query: { directory: ctx.directory }
|
|
26130
|
+
});
|
|
26131
|
+
const children = normalizeSDKResponse(childrenRes, []);
|
|
26132
|
+
const todosRes = await ctx.client.session.todo({
|
|
26133
|
+
path: { id: ctx.sessionID },
|
|
26134
|
+
query: { directory: ctx.directory }
|
|
26135
|
+
});
|
|
26136
|
+
const todos = normalizeSDKResponse(todosRes, []);
|
|
26137
|
+
const hasActiveChildren = Array.isArray(children) && children.length > 0;
|
|
26138
|
+
const hasActiveTodos = Array.isArray(todos) && todos.some((t) => t?.status !== "completed" && t?.status !== "cancelled");
|
|
26139
|
+
const hasActiveWork = hasActiveChildren || hasActiveTodos;
|
|
26140
|
+
if (hasActiveWork) {
|
|
26141
|
+
eventState.hasReceivedMeaningfulWork = true;
|
|
26142
|
+
console.log(import_picocolors14.default.yellow(`
|
|
26143
|
+
No meaningful work events for ${Math.round(secondaryMeaningfulWorkTimeoutMs / 1000)}s but session has active work - assuming in progress`));
|
|
26144
|
+
}
|
|
26145
|
+
}
|
|
26009
26146
|
} else {
|
|
26010
26147
|
if (firstWorkTimestamp === null) {
|
|
26011
26148
|
firstWorkTimestamp = Date.now();
|
|
@@ -26459,6 +26596,7 @@ var OPENCODE_BINARIES2 = ["opencode", "opencode-desktop"];
|
|
|
26459
26596
|
import { existsSync as existsSync22, readFileSync as readFileSync23 } from "fs";
|
|
26460
26597
|
|
|
26461
26598
|
// src/cli/doctor/checks/system-binary.ts
|
|
26599
|
+
init_spawn_with_windows_hide();
|
|
26462
26600
|
import { existsSync as existsSync19 } from "fs";
|
|
26463
26601
|
import { homedir as homedir5 } from "os";
|
|
26464
26602
|
import { join as join16 } from "path";
|
|
@@ -26519,7 +26657,7 @@ async function findOpenCodeBinary() {
|
|
|
26519
26657
|
async function getOpenCodeVersion2(binaryPath, platform = process.platform) {
|
|
26520
26658
|
try {
|
|
26521
26659
|
const command = buildVersionCommand(binaryPath, platform);
|
|
26522
|
-
const processResult =
|
|
26660
|
+
const processResult = spawnWithWindowsHide(command, { stdout: "pipe", stderr: "pipe" });
|
|
26523
26661
|
const output = await new Response(processResult.stdout).text();
|
|
26524
26662
|
await processResult.exited;
|
|
26525
26663
|
if (processResult.exitCode !== 0)
|
|
@@ -27135,6 +27273,7 @@ async function checkConfig() {
|
|
|
27135
27273
|
}
|
|
27136
27274
|
|
|
27137
27275
|
// src/cli/doctor/checks/dependencies.ts
|
|
27276
|
+
init_spawn_with_windows_hide();
|
|
27138
27277
|
import { existsSync as existsSync24 } from "fs";
|
|
27139
27278
|
import { createRequire } from "module";
|
|
27140
27279
|
import { dirname as dirname6, join as join22 } from "path";
|
|
@@ -27149,7 +27288,7 @@ async function checkBinaryExists(binary2) {
|
|
|
27149
27288
|
}
|
|
27150
27289
|
async function getBinaryVersion(binary2) {
|
|
27151
27290
|
try {
|
|
27152
|
-
const proc =
|
|
27291
|
+
const proc = spawnWithWindowsHide([binary2, "--version"], { stdout: "pipe", stderr: "pipe" });
|
|
27153
27292
|
const output = await new Response(proc.stdout).text();
|
|
27154
27293
|
await proc.exited;
|
|
27155
27294
|
if (proc.exitCode === 0) {
|
|
@@ -27256,6 +27395,7 @@ async function checkCommentChecker() {
|
|
|
27256
27395
|
}
|
|
27257
27396
|
|
|
27258
27397
|
// src/cli/doctor/checks/tools-gh.ts
|
|
27398
|
+
init_spawn_with_windows_hide();
|
|
27259
27399
|
async function checkBinaryExists2(binary2) {
|
|
27260
27400
|
try {
|
|
27261
27401
|
const binaryPath = Bun.which(binary2);
|
|
@@ -27266,7 +27406,7 @@ async function checkBinaryExists2(binary2) {
|
|
|
27266
27406
|
}
|
|
27267
27407
|
async function getGhVersion() {
|
|
27268
27408
|
try {
|
|
27269
|
-
const processResult =
|
|
27409
|
+
const processResult = spawnWithWindowsHide(["gh", "--version"], { stdout: "pipe", stderr: "pipe" });
|
|
27270
27410
|
const output = await new Response(processResult.stdout).text();
|
|
27271
27411
|
await processResult.exited;
|
|
27272
27412
|
if (processResult.exitCode !== 0)
|
|
@@ -27280,7 +27420,7 @@ async function getGhVersion() {
|
|
|
27280
27420
|
}
|
|
27281
27421
|
async function getGhAuthStatus() {
|
|
27282
27422
|
try {
|
|
27283
|
-
const processResult =
|
|
27423
|
+
const processResult = spawnWithWindowsHide(["gh", "auth", "status"], {
|
|
27284
27424
|
stdout: "pipe",
|
|
27285
27425
|
stderr: "pipe",
|
|
27286
27426
|
env: { ...process.env, GH_NO_UPDATE_NOTIFIER: "1" }
|