oh-my-opencode 3.7.4 → 3.8.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 +206 -243
- package/README.ko.md +205 -244
- package/README.md +176 -174
- package/README.zh-cn.md +211 -255
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/atlas/prompt-section-builder.d.ts +1 -1
- package/dist/agents/builtin-agents/environment-context.d.ts +5 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/builtin-agents/hephaestus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +0 -5
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/prometheus/gpt.d.ts +24 -0
- package/dist/agents/prometheus/index.d.ts +3 -1
- package/dist/agents/prometheus/system-prompt.d.ts +12 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/cli/fallback-chain-resolution.d.ts +1 -1
- package/dist/cli/index.js +366 -118
- package/dist/cli/model-fallback-requirements.d.ts +3 -0
- package/dist/cli/model-fallback-types.d.ts +0 -5
- package/dist/cli/provider-model-id-transform.d.ts +1 -1
- package/dist/cli/run/timestamp-output.d.ts +5 -0
- package/dist/cli/run/types.d.ts +1 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema/agent-overrides.d.ts +75 -60
- package/dist/config/schema/categories.d.ts +2 -0
- package/dist/config/schema/experimental.d.ts +2 -0
- package/dist/config/schema/fallback-models.d.ts +3 -0
- package/dist/config/schema/hooks.d.ts +3 -3
- package/dist/config/schema/oh-my-opencode-config.d.ts +87 -104
- package/dist/config/schema/ralph-loop.d.ts +4 -0
- package/dist/config/schema/runtime-fallback.d.ts +10 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/create-hooks.d.ts +7 -5
- package/dist/features/background-agent/manager.d.ts +3 -0
- package/dist/features/background-agent/types.d.ts +7 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/task-toast-manager/manager.d.ts +5 -0
- package/dist/features/task-toast-manager/types.d.ts +2 -1
- package/dist/features/tmux-subagent/action-executor.d.ts +10 -3
- package/dist/features/tmux-subagent/grid-planning.d.ts +5 -3
- package/dist/features/tmux-subagent/manager.d.ts +12 -0
- package/dist/features/tmux-subagent/pane-split-availability.d.ts +0 -1
- package/dist/features/tmux-subagent/spawn-target-finder.d.ts +2 -2
- package/dist/features/tmux-subagent/tmux-grid-constants.d.ts +4 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +28 -0
- package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/model-fallback/hook.d.ts +60 -0
- package/dist/hooks/no-hephaestus-non-gpt/hook.d.ts +16 -0
- package/dist/hooks/no-hephaestus-non-gpt/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/command-arguments.d.ts +8 -0
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +1 -0
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +12 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +2 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +1 -0
- package/dist/hooks/ralph-loop/ralph-loop-hook.d.ts +1 -0
- package/dist/hooks/ralph-loop/session-reset-strategy.d.ts +3 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/runtime-fallback/agent-resolver.d.ts +5 -0
- package/dist/hooks/runtime-fallback/auto-retry.d.ts +10 -0
- package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +20 -0
- package/dist/hooks/runtime-fallback/constants.d.ts +19 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +17 -0
- package/dist/hooks/runtime-fallback/event-handler.d.ts +8 -0
- package/dist/hooks/runtime-fallback/fallback-models.d.ts +2 -0
- package/dist/hooks/runtime-fallback/fallback-state.d.ts +6 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +3 -0
- package/dist/hooks/runtime-fallback/index.d.ts +2 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +5 -0
- package/dist/hooks/runtime-fallback/types.d.ts +59 -0
- package/dist/hooks/session-recovery/detect-error-type.d.ts +2 -1
- package/dist/hooks/session-recovery/recover-unavailable-tool.d.ts +5 -0
- package/dist/hooks/todo-continuation-enforcer/continuation-injection.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/countdown.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/hook.d.ts +1 -0
- package/dist/index.js +6179 -2820
- package/dist/oh-my-opencode.schema.json +3681 -0
- package/dist/plugin/chat-headers.d.ts +4 -0
- package/dist/plugin/chat-message.d.ts +9 -8
- package/dist/plugin/chat-params.d.ts +2 -3
- package/dist/plugin/event.d.ts +2 -6
- package/dist/plugin/hooks/create-core-hooks.d.ts +7 -5
- package/dist/plugin/hooks/create-session-hooks.d.ts +6 -6
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +1 -1
- package/dist/plugin/system-transform.d.ts +5 -0
- package/dist/plugin/types.d.ts +7 -1
- package/dist/plugin/ultrawork-db-model-override.d.ts +11 -0
- package/dist/plugin/ultrawork-model-override.d.ts +37 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/internal-initiator-marker.d.ts +5 -0
- package/dist/shared/model-error-classifier.d.ts +31 -0
- package/dist/shared/model-resolution-pipeline.d.ts +1 -0
- package/dist/shared/model-resolver.d.ts +6 -0
- package/dist/shared/provider-model-id-transform.d.ts +1 -0
- package/dist/shared/session-category-registry.d.ts +32 -0
- package/dist/shared/session-model-state.d.ts +7 -0
- package/dist/shared/tmux/tmux-utils/layout.d.ts +17 -2
- package/dist/tools/delegate-task/background-task.d.ts +2 -1
- package/dist/tools/delegate-task/category-resolver.d.ts +2 -0
- package/dist/tools/delegate-task/skill-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +2 -0
- package/dist/tools/delegate-task/sync-task.d.ts +1 -1
- package/dist/tools/hashline-edit/constants.d.ts +5 -2
- package/dist/tools/hashline-edit/diff-utils.d.ts +6 -0
- package/dist/tools/hashline-edit/edit-operations.d.ts +4 -4
- package/dist/tools/hashline-edit/hash-computation.d.ts +1 -1
- package/dist/tools/hashline-edit/index.d.ts +1 -1
- package/dist/tools/hashline-edit/types.d.ts +4 -4
- package/dist/tools/hashline-edit/validation.d.ts +1 -0
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/skill/constants.d.ts +2 -2
- package/dist/tools/skill/types.d.ts +4 -0
- package/dist/tools/slashcommand/index.d.ts +1 -1
- package/dist/tools/slashcommand/types.d.ts +1 -7
- package/package.json +10 -10
- package/dist/hooks/ultrawork-model-override/hook.d.ts +0 -6
- package/dist/hooks/ultrawork-model-override/index.d.ts +0 -1
- package/dist/tools/slashcommand/skill-command-converter.d.ts +0 -3
- package/dist/tools/slashcommand/slashcommand-description.d.ts +0 -3
- package/dist/tools/slashcommand/slashcommand-tool.d.ts +0 -4
- package/dist/tools/slashcommand/tools.d.ts +0 -2
package/dist/cli/index.js
CHANGED
|
@@ -6550,7 +6550,6 @@ function migrateModelVersions(configs, appliedMigrations) {
|
|
|
6550
6550
|
var MODEL_VERSION_MAP;
|
|
6551
6551
|
var init_model_versions = __esm(() => {
|
|
6552
6552
|
MODEL_VERSION_MAP = {
|
|
6553
|
-
"openai/gpt-5.2-codex": "openai/gpt-5.3-codex",
|
|
6554
6553
|
"anthropic/claude-opus-4-5": "anthropic/claude-opus-4-6",
|
|
6555
6554
|
"anthropic/claude-sonnet-4-5": "anthropic/claude-sonnet-4-6"
|
|
6556
6555
|
};
|
|
@@ -6602,6 +6601,19 @@ function migrateConfigFile(configPath, rawConfig) {
|
|
|
6602
6601
|
delete copy.omo_agent;
|
|
6603
6602
|
needsWrite = true;
|
|
6604
6603
|
}
|
|
6604
|
+
if (copy.experimental && typeof copy.experimental === "object") {
|
|
6605
|
+
const experimental = copy.experimental;
|
|
6606
|
+
if ("hashline_edit" in experimental) {
|
|
6607
|
+
if (copy.hashline_edit === undefined) {
|
|
6608
|
+
copy.hashline_edit = experimental.hashline_edit;
|
|
6609
|
+
}
|
|
6610
|
+
delete experimental.hashline_edit;
|
|
6611
|
+
if (Object.keys(experimental).length === 0) {
|
|
6612
|
+
delete copy.experimental;
|
|
6613
|
+
}
|
|
6614
|
+
needsWrite = true;
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6605
6617
|
if (copy.disabled_agents && Array.isArray(copy.disabled_agents)) {
|
|
6606
6618
|
const migrated = [];
|
|
6607
6619
|
let changed = false;
|
|
@@ -6785,9 +6797,8 @@ var init_model_requirements = __esm(() => {
|
|
|
6785
6797
|
sisyphus: {
|
|
6786
6798
|
fallbackChain: [
|
|
6787
6799
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
6788
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6789
6800
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6790
|
-
{ providers: ["zai-coding-plan"], model: "glm-
|
|
6801
|
+
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
|
6791
6802
|
{ providers: ["opencode"], model: "big-pickle" }
|
|
6792
6803
|
],
|
|
6793
6804
|
requiresAnyModel: true
|
|
@@ -6807,42 +6818,39 @@ var init_model_requirements = __esm(() => {
|
|
|
6807
6818
|
},
|
|
6808
6819
|
librarian: {
|
|
6809
6820
|
fallbackChain: [
|
|
6810
|
-
{ providers: ["
|
|
6811
|
-
{ providers: ["opencode"], model: "
|
|
6812
|
-
{ providers: ["
|
|
6821
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
6822
|
+
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
|
6823
|
+
{ providers: ["opencode"], model: "big-pickle" }
|
|
6813
6824
|
]
|
|
6814
6825
|
},
|
|
6815
6826
|
explore: {
|
|
6816
6827
|
fallbackChain: [
|
|
6817
6828
|
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
|
6829
|
+
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
|
6818
6830
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
6819
6831
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6820
6832
|
]
|
|
6821
6833
|
},
|
|
6822
6834
|
"multimodal-looker": {
|
|
6823
6835
|
fallbackChain: [
|
|
6836
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6824
6837
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
6825
6838
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
|
|
6826
6839
|
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
6827
|
-
{ providers: ["
|
|
6828
|
-
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6829
|
-
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
|
|
6830
|
-
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6840
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5-nano" }
|
|
6831
6841
|
]
|
|
6832
6842
|
},
|
|
6833
6843
|
prometheus: {
|
|
6834
6844
|
fallbackChain: [
|
|
6835
6845
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
6836
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6837
|
-
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6838
6846
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
6847
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6839
6848
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
6840
6849
|
]
|
|
6841
6850
|
},
|
|
6842
6851
|
metis: {
|
|
6843
6852
|
fallbackChain: [
|
|
6844
6853
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
6845
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6846
6854
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6847
6855
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
6848
6856
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
@@ -6857,11 +6865,9 @@ var init_model_requirements = __esm(() => {
|
|
|
6857
6865
|
},
|
|
6858
6866
|
atlas: {
|
|
6859
6867
|
fallbackChain: [
|
|
6860
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6861
6868
|
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
6862
6869
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
|
6863
|
-
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
|
|
6864
|
-
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
6870
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
|
|
6865
6871
|
]
|
|
6866
6872
|
}
|
|
6867
6873
|
};
|
|
@@ -6869,9 +6875,8 @@ var init_model_requirements = __esm(() => {
|
|
|
6869
6875
|
"visual-engineering": {
|
|
6870
6876
|
fallbackChain: [
|
|
6871
6877
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
6872
|
-
{ providers: ["zai-coding-plan"], model: "glm-5" },
|
|
6873
|
-
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
6874
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
6878
|
+
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
|
6879
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
6875
6880
|
]
|
|
6876
6881
|
},
|
|
6877
6882
|
ultrabrain: {
|
|
@@ -6920,7 +6925,6 @@ var init_model_requirements = __esm(() => {
|
|
|
6920
6925
|
},
|
|
6921
6926
|
writing: {
|
|
6922
6927
|
fallbackChain: [
|
|
6923
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6924
6928
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
6925
6929
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
|
|
6926
6930
|
]
|
|
@@ -6956,10 +6960,6 @@ function ensureCacheDir() {
|
|
|
6956
6960
|
mkdirSync(cacheDir, { recursive: true });
|
|
6957
6961
|
}
|
|
6958
6962
|
}
|
|
6959
|
-
function hasConnectedProvidersCache() {
|
|
6960
|
-
const cacheFile = getCacheFilePath(CONNECTED_PROVIDERS_CACHE_FILE);
|
|
6961
|
-
return existsSync3(cacheFile);
|
|
6962
|
-
}
|
|
6963
6963
|
function writeConnectedProvidersCache(connected) {
|
|
6964
6964
|
ensureCacheDir();
|
|
6965
6965
|
const cacheFile = getCacheFilePath(CONNECTED_PROVIDERS_CACHE_FILE);
|
|
@@ -7048,6 +7048,17 @@ var init_model_availability = __esm(() => {
|
|
|
7048
7048
|
init_connected_providers_cache();
|
|
7049
7049
|
});
|
|
7050
7050
|
|
|
7051
|
+
// src/shared/provider-model-id-transform.ts
|
|
7052
|
+
function transformModelForProvider(provider, model) {
|
|
7053
|
+
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");
|
|
7055
|
+
}
|
|
7056
|
+
if (provider === "google") {
|
|
7057
|
+
return model.replace(/gemini-3-pro(?!-)/g, "gemini-3-pro-preview").replace(/gemini-3-flash(?!-)/g, "gemini-3-flash-preview");
|
|
7058
|
+
}
|
|
7059
|
+
return model;
|
|
7060
|
+
}
|
|
7061
|
+
|
|
7051
7062
|
// src/shared/model-resolution-pipeline.ts
|
|
7052
7063
|
var init_model_resolution_pipeline = __esm(() => {
|
|
7053
7064
|
init_logger();
|
|
@@ -7280,10 +7291,17 @@ var init_session_tools_store = __esm(() => {
|
|
|
7280
7291
|
var init_prompt_tools = __esm(() => {
|
|
7281
7292
|
init_session_tools_store();
|
|
7282
7293
|
});
|
|
7294
|
+
// src/shared/session-category-registry.ts
|
|
7295
|
+
var sessionCategoryMap;
|
|
7296
|
+
var init_session_category_registry = __esm(() => {
|
|
7297
|
+
sessionCategoryMap = new Map;
|
|
7298
|
+
});
|
|
7283
7299
|
|
|
7284
7300
|
// src/shared/index.ts
|
|
7285
7301
|
var init_shared = __esm(() => {
|
|
7302
|
+
init_model_resolver();
|
|
7286
7303
|
init_model_resolution_pipeline();
|
|
7304
|
+
init_session_category_registry();
|
|
7287
7305
|
init_frontmatter();
|
|
7288
7306
|
init_command_executor();
|
|
7289
7307
|
init_file_reference_resolver();
|
|
@@ -7376,6 +7394,13 @@ async function fetchNpmDistTags(packageName) {
|
|
|
7376
7394
|
var NPM_FETCH_TIMEOUT_MS = 5000;
|
|
7377
7395
|
|
|
7378
7396
|
// src/cli/config-manager/plugin-name-with-version.ts
|
|
7397
|
+
function getFallbackEntry(version) {
|
|
7398
|
+
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9-]*)(?:\.|$)/);
|
|
7399
|
+
if (prereleaseMatch) {
|
|
7400
|
+
return `${PACKAGE_NAME}@${prereleaseMatch[1]}`;
|
|
7401
|
+
}
|
|
7402
|
+
return PACKAGE_NAME;
|
|
7403
|
+
}
|
|
7379
7404
|
async function getPluginNameWithVersion(currentVersion) {
|
|
7380
7405
|
const distTags = await fetchNpmDistTags(PACKAGE_NAME);
|
|
7381
7406
|
if (distTags) {
|
|
@@ -7386,7 +7411,7 @@ async function getPluginNameWithVersion(currentVersion) {
|
|
|
7386
7411
|
}
|
|
7387
7412
|
}
|
|
7388
7413
|
}
|
|
7389
|
-
return
|
|
7414
|
+
return getFallbackEntry(currentVersion);
|
|
7390
7415
|
}
|
|
7391
7416
|
var PACKAGE_NAME = "oh-my-opencode", PRIORITIZED_TAGS;
|
|
7392
7417
|
var init_plugin_name_with_version = __esm(() => {
|
|
@@ -7564,6 +7589,156 @@ var init_add_plugin_to_opencode_config = __esm(() => {
|
|
|
7564
7589
|
init_plugin_name_with_version();
|
|
7565
7590
|
});
|
|
7566
7591
|
|
|
7592
|
+
// src/cli/model-fallback-requirements.ts
|
|
7593
|
+
var CLI_AGENT_MODEL_REQUIREMENTS, CLI_CATEGORY_MODEL_REQUIREMENTS;
|
|
7594
|
+
var init_model_fallback_requirements = __esm(() => {
|
|
7595
|
+
CLI_AGENT_MODEL_REQUIREMENTS = {
|
|
7596
|
+
sisyphus: {
|
|
7597
|
+
fallbackChain: [
|
|
7598
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7599
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7600
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7601
|
+
{ providers: ["zai-coding-plan"], model: "glm-4.7" },
|
|
7602
|
+
{ providers: ["opencode"], model: "glm-4.7-free" }
|
|
7603
|
+
],
|
|
7604
|
+
requiresAnyModel: true
|
|
7605
|
+
},
|
|
7606
|
+
hephaestus: {
|
|
7607
|
+
fallbackChain: [
|
|
7608
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" }
|
|
7609
|
+
],
|
|
7610
|
+
requiresProvider: ["openai", "github-copilot", "opencode"]
|
|
7611
|
+
},
|
|
7612
|
+
oracle: {
|
|
7613
|
+
fallbackChain: [
|
|
7614
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7615
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7616
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
7617
|
+
]
|
|
7618
|
+
},
|
|
7619
|
+
librarian: {
|
|
7620
|
+
fallbackChain: [
|
|
7621
|
+
{ providers: ["zai-coding-plan"], model: "glm-4.7" },
|
|
7622
|
+
{ providers: ["opencode"], model: "glm-4.7-free" },
|
|
7623
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" }
|
|
7624
|
+
]
|
|
7625
|
+
},
|
|
7626
|
+
explore: {
|
|
7627
|
+
fallbackChain: [
|
|
7628
|
+
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
|
7629
|
+
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
7630
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7631
|
+
]
|
|
7632
|
+
},
|
|
7633
|
+
"multimodal-looker": {
|
|
7634
|
+
fallbackChain: [
|
|
7635
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
7636
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
|
|
7637
|
+
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
7638
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7639
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7640
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
|
|
7641
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7642
|
+
]
|
|
7643
|
+
},
|
|
7644
|
+
prometheus: {
|
|
7645
|
+
fallbackChain: [
|
|
7646
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7647
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7648
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7649
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7650
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7651
|
+
]
|
|
7652
|
+
},
|
|
7653
|
+
metis: {
|
|
7654
|
+
fallbackChain: [
|
|
7655
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7656
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7657
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7658
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7659
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7660
|
+
]
|
|
7661
|
+
},
|
|
7662
|
+
momus: {
|
|
7663
|
+
fallbackChain: [
|
|
7664
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" },
|
|
7665
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7666
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7667
|
+
]
|
|
7668
|
+
},
|
|
7669
|
+
atlas: {
|
|
7670
|
+
fallbackChain: [
|
|
7671
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7672
|
+
{ providers: ["opencode"], model: "kimi-k2.5-free" },
|
|
7673
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
|
7674
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
|
|
7675
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7676
|
+
]
|
|
7677
|
+
}
|
|
7678
|
+
};
|
|
7679
|
+
CLI_CATEGORY_MODEL_REQUIREMENTS = {
|
|
7680
|
+
"visual-engineering": {
|
|
7681
|
+
fallbackChain: [
|
|
7682
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7683
|
+
{ providers: ["zai-coding-plan"], model: "glm-5" },
|
|
7684
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7685
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
7686
|
+
]
|
|
7687
|
+
},
|
|
7688
|
+
ultrabrain: {
|
|
7689
|
+
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" },
|
|
7692
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
|
|
7693
|
+
]
|
|
7694
|
+
},
|
|
7695
|
+
deep: {
|
|
7696
|
+
fallbackChain: [
|
|
7697
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
|
|
7698
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7699
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" }
|
|
7700
|
+
],
|
|
7701
|
+
requiresModel: "gpt-5.3-codex"
|
|
7702
|
+
},
|
|
7703
|
+
artistry: {
|
|
7704
|
+
fallbackChain: [
|
|
7705
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "high" },
|
|
7706
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7707
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
|
|
7708
|
+
],
|
|
7709
|
+
requiresModel: "gemini-3-pro"
|
|
7710
|
+
},
|
|
7711
|
+
quick: {
|
|
7712
|
+
fallbackChain: [
|
|
7713
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
|
|
7714
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
7715
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7716
|
+
]
|
|
7717
|
+
},
|
|
7718
|
+
"unspecified-low": {
|
|
7719
|
+
fallbackChain: [
|
|
7720
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
|
7721
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
|
|
7722
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" }
|
|
7723
|
+
]
|
|
7724
|
+
},
|
|
7725
|
+
"unspecified-high": {
|
|
7726
|
+
fallbackChain: [
|
|
7727
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
|
|
7728
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
|
|
7729
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro" }
|
|
7730
|
+
]
|
|
7731
|
+
},
|
|
7732
|
+
writing: {
|
|
7733
|
+
fallbackChain: [
|
|
7734
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7735
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
|
|
7736
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" }
|
|
7737
|
+
]
|
|
7738
|
+
}
|
|
7739
|
+
};
|
|
7740
|
+
});
|
|
7741
|
+
|
|
7567
7742
|
// src/cli/provider-availability.ts
|
|
7568
7743
|
function toProviderAvailability(config) {
|
|
7569
7744
|
return {
|
|
@@ -7593,12 +7768,7 @@ function isProviderAvailable(provider, availability) {
|
|
|
7593
7768
|
}
|
|
7594
7769
|
|
|
7595
7770
|
// src/cli/provider-model-id-transform.ts
|
|
7596
|
-
|
|
7597
|
-
if (provider === "github-copilot") {
|
|
7598
|
-
return model.replace("claude-opus-4-6", "claude-opus-4.6").replace("claude-sonnet-4-6", "claude-sonnet-4.6").replace("claude-haiku-4-5", "claude-haiku-4.5").replace("claude-sonnet-4", "claude-sonnet-4").replace("gemini-3-pro", "gemini-3-pro-preview").replace("gemini-3-flash", "gemini-3-flash-preview");
|
|
7599
|
-
}
|
|
7600
|
-
return model;
|
|
7601
|
-
}
|
|
7771
|
+
var init_provider_model_id_transform = () => {};
|
|
7602
7772
|
|
|
7603
7773
|
// src/cli/fallback-chain-resolution.ts
|
|
7604
7774
|
function resolveModelFromChain(fallbackChain, availability) {
|
|
@@ -7616,7 +7786,7 @@ function resolveModelFromChain(fallbackChain, availability) {
|
|
|
7616
7786
|
return null;
|
|
7617
7787
|
}
|
|
7618
7788
|
function getSisyphusFallbackChain() {
|
|
7619
|
-
return
|
|
7789
|
+
return CLI_AGENT_MODEL_REQUIREMENTS.sisyphus.fallbackChain;
|
|
7620
7790
|
}
|
|
7621
7791
|
function isAnyFallbackEntryAvailable(fallbackChain, availability) {
|
|
7622
7792
|
return fallbackChain.some((entry) => entry.providers.some((provider) => isProviderAvailable(provider, availability)));
|
|
@@ -7631,7 +7801,8 @@ function isRequiredProviderAvailable(requiredProviders, availability) {
|
|
|
7631
7801
|
return requiredProviders.some((provider) => isProviderAvailable(provider, availability));
|
|
7632
7802
|
}
|
|
7633
7803
|
var init_fallback_chain_resolution = __esm(() => {
|
|
7634
|
-
|
|
7804
|
+
init_model_fallback_requirements();
|
|
7805
|
+
init_provider_model_id_transform();
|
|
7635
7806
|
});
|
|
7636
7807
|
|
|
7637
7808
|
// src/cli/model-fallback.ts
|
|
@@ -7641,13 +7812,13 @@ function generateModelConfig(config) {
|
|
|
7641
7812
|
if (!hasAnyProvider) {
|
|
7642
7813
|
return {
|
|
7643
7814
|
$schema: SCHEMA_URL,
|
|
7644
|
-
agents: Object.fromEntries(Object.entries(
|
|
7645
|
-
categories: Object.fromEntries(Object.keys(
|
|
7815
|
+
agents: Object.fromEntries(Object.entries(CLI_AGENT_MODEL_REQUIREMENTS).filter(([role, req]) => !(role === "sisyphus" && req.requiresAnyModel)).map(([role]) => [role, { model: ULTIMATE_FALLBACK }])),
|
|
7816
|
+
categories: Object.fromEntries(Object.keys(CLI_CATEGORY_MODEL_REQUIREMENTS).map((cat) => [cat, { model: ULTIMATE_FALLBACK }]))
|
|
7646
7817
|
};
|
|
7647
7818
|
}
|
|
7648
7819
|
const agents = {};
|
|
7649
7820
|
const categories = {};
|
|
7650
|
-
for (const [role, req] of Object.entries(
|
|
7821
|
+
for (const [role, req] of Object.entries(CLI_AGENT_MODEL_REQUIREMENTS)) {
|
|
7651
7822
|
if (role === "librarian" && avail.zai) {
|
|
7652
7823
|
agents[role] = { model: ZAI_MODEL };
|
|
7653
7824
|
continue;
|
|
@@ -7669,14 +7840,6 @@ function generateModelConfig(config) {
|
|
|
7669
7840
|
if (req.requiresAnyModel && !isAnyFallbackEntryAvailable(fallbackChain, avail)) {
|
|
7670
7841
|
continue;
|
|
7671
7842
|
}
|
|
7672
|
-
if (avail.native.claude && !avail.isMaxPlan) {
|
|
7673
|
-
agents[role] = {
|
|
7674
|
-
model: "anthropic/claude-sonnet-4-6",
|
|
7675
|
-
variant: "max",
|
|
7676
|
-
ultrawork: { model: "anthropic/claude-opus-4-6", variant: "max" }
|
|
7677
|
-
};
|
|
7678
|
-
continue;
|
|
7679
|
-
}
|
|
7680
7843
|
const resolved2 = resolveModelFromChain(fallbackChain, avail);
|
|
7681
7844
|
if (resolved2) {
|
|
7682
7845
|
const variant = resolved2.variant ?? req.variant;
|
|
@@ -7698,8 +7861,8 @@ function generateModelConfig(config) {
|
|
|
7698
7861
|
agents[role] = { model: ULTIMATE_FALLBACK };
|
|
7699
7862
|
}
|
|
7700
7863
|
}
|
|
7701
|
-
for (const [cat, req] of Object.entries(
|
|
7702
|
-
const fallbackChain = cat === "unspecified-high" && !avail.isMaxPlan ?
|
|
7864
|
+
for (const [cat, req] of Object.entries(CLI_CATEGORY_MODEL_REQUIREMENTS)) {
|
|
7865
|
+
const fallbackChain = cat === "unspecified-high" && !avail.isMaxPlan ? CLI_CATEGORY_MODEL_REQUIREMENTS["unspecified-low"].fallbackChain : req.fallbackChain;
|
|
7703
7866
|
if (req.requiresModel && !isRequiredModelAvailable(req.requiresModel, req.fallbackChain, avail)) {
|
|
7704
7867
|
continue;
|
|
7705
7868
|
}
|
|
@@ -7720,9 +7883,9 @@ function generateModelConfig(config) {
|
|
|
7720
7883
|
categories
|
|
7721
7884
|
};
|
|
7722
7885
|
}
|
|
7723
|
-
var ZAI_MODEL = "zai-coding-plan/glm-4.7", ULTIMATE_FALLBACK = "opencode/
|
|
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";
|
|
7724
7887
|
var init_model_fallback = __esm(() => {
|
|
7725
|
-
|
|
7888
|
+
init_model_fallback_requirements();
|
|
7726
7889
|
init_fallback_chain_resolution();
|
|
7727
7890
|
});
|
|
7728
7891
|
|
|
@@ -7852,17 +8015,6 @@ var init_opencode_binary = __esm(() => {
|
|
|
7852
8015
|
|
|
7853
8016
|
// src/cli/config-manager/auth-plugins.ts
|
|
7854
8017
|
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, copyFileSync as copyFileSync2, existsSync as existsSync8 } from "fs";
|
|
7855
|
-
async function fetchLatestVersion(packageName) {
|
|
7856
|
-
try {
|
|
7857
|
-
const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`);
|
|
7858
|
-
if (!res.ok)
|
|
7859
|
-
return null;
|
|
7860
|
-
const data = await res.json();
|
|
7861
|
-
return data.version;
|
|
7862
|
-
} catch {
|
|
7863
|
-
return null;
|
|
7864
|
-
}
|
|
7865
|
-
}
|
|
7866
8018
|
async function addAuthPlugins(config) {
|
|
7867
8019
|
try {
|
|
7868
8020
|
ensureConfigDirectoryExists();
|
|
@@ -7890,13 +8042,6 @@ async function addAuthPlugins(config) {
|
|
|
7890
8042
|
}
|
|
7891
8043
|
const rawPlugins = existingConfig?.plugin;
|
|
7892
8044
|
const plugins = Array.isArray(rawPlugins) ? rawPlugins : [];
|
|
7893
|
-
if (config.hasGemini) {
|
|
7894
|
-
const version = await fetchLatestVersion("opencode-antigravity-auth");
|
|
7895
|
-
const pluginEntry = version ? `opencode-antigravity-auth@${version}` : "opencode-antigravity-auth";
|
|
7896
|
-
if (!plugins.some((p) => p.startsWith("opencode-antigravity-auth"))) {
|
|
7897
|
-
plugins.push(pluginEntry);
|
|
7898
|
-
}
|
|
7899
|
-
}
|
|
7900
8045
|
const newConfig = { ...existingConfig ?? {}, plugin: plugins };
|
|
7901
8046
|
if (format2 !== "none" && existsSync8(path3)) {
|
|
7902
8047
|
copyFileSync2(path3, backupPath);
|
|
@@ -8452,6 +8597,9 @@ var init_local_dev_version = __esm(() => {
|
|
|
8452
8597
|
|
|
8453
8598
|
// src/hooks/auto-update-checker/checker/plugin-entry.ts
|
|
8454
8599
|
import * as fs7 from "fs";
|
|
8600
|
+
function isExplicitVersionPin(pinnedVersion) {
|
|
8601
|
+
return /^\d+\.\d+\.\d+/.test(pinnedVersion);
|
|
8602
|
+
}
|
|
8455
8603
|
function findPluginEntry(directory) {
|
|
8456
8604
|
for (const configPath of getConfigPaths(directory)) {
|
|
8457
8605
|
try {
|
|
@@ -8466,8 +8614,8 @@ function findPluginEntry(directory) {
|
|
|
8466
8614
|
}
|
|
8467
8615
|
if (entry.startsWith(`${PACKAGE_NAME3}@`)) {
|
|
8468
8616
|
const pinnedVersion = entry.slice(PACKAGE_NAME3.length + 1);
|
|
8469
|
-
const isPinned = pinnedVersion
|
|
8470
|
-
return { entry, isPinned, pinnedVersion
|
|
8617
|
+
const isPinned = isExplicitVersionPin(pinnedVersion);
|
|
8618
|
+
return { entry, isPinned, pinnedVersion, configPath };
|
|
8471
8619
|
}
|
|
8472
8620
|
}
|
|
8473
8621
|
} catch {
|
|
@@ -8809,6 +8957,9 @@ var init_update_toasts = __esm(() => {
|
|
|
8809
8957
|
});
|
|
8810
8958
|
|
|
8811
8959
|
// src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
8960
|
+
function getPinnedVersionToastMessage(latestVersion) {
|
|
8961
|
+
return `Update available: ${latestVersion} (version pinned, update manually)`;
|
|
8962
|
+
}
|
|
8812
8963
|
async function runBunInstallSafe() {
|
|
8813
8964
|
try {
|
|
8814
8965
|
return await runBunInstall();
|
|
@@ -8847,7 +8998,7 @@ async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
|
|
|
8847
8998
|
return;
|
|
8848
8999
|
}
|
|
8849
9000
|
if (pluginInfo.isPinned) {
|
|
8850
|
-
await showUpdateAvailableToast(ctx, latestVersion,
|
|
9001
|
+
await showUpdateAvailableToast(ctx, latestVersion, () => getPinnedVersionToastMessage(latestVersion));
|
|
8851
9002
|
log(`[auto-update-checker] User-pinned version detected (${pluginInfo.entry}), skipping auto-update. Notification only.`);
|
|
8852
9003
|
return;
|
|
8853
9004
|
}
|
|
@@ -8900,24 +9051,46 @@ var init_config_errors_toast = __esm(() => {
|
|
|
8900
9051
|
|
|
8901
9052
|
// src/hooks/auto-update-checker/hook/connected-providers-status.ts
|
|
8902
9053
|
async function updateAndShowConnectedProvidersCacheStatus(ctx) {
|
|
8903
|
-
const hadCache =
|
|
8904
|
-
updateConnectedProvidersCache(ctx.client).catch(() => {});
|
|
9054
|
+
const hadCache = isModelCacheAvailable();
|
|
8905
9055
|
if (!hadCache) {
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
9056
|
+
let timeoutId;
|
|
9057
|
+
try {
|
|
9058
|
+
await Promise.race([
|
|
9059
|
+
updateConnectedProvidersCache(ctx.client),
|
|
9060
|
+
new Promise((_3, reject) => {
|
|
9061
|
+
timeoutId = setTimeout(() => reject(new Error("Cache update timed out")), CACHE_UPDATE_TIMEOUT_MS);
|
|
9062
|
+
})
|
|
9063
|
+
]);
|
|
9064
|
+
} catch (err) {
|
|
9065
|
+
log("[auto-update-checker] Connected providers cache creation failed", { error: String(err) });
|
|
9066
|
+
} finally {
|
|
9067
|
+
if (timeoutId)
|
|
9068
|
+
clearTimeout(timeoutId);
|
|
9069
|
+
}
|
|
9070
|
+
if (!isModelCacheAvailable()) {
|
|
9071
|
+
await ctx.client.tui.showToast({
|
|
9072
|
+
body: {
|
|
9073
|
+
title: "Connected Providers Cache",
|
|
9074
|
+
message: "Failed to build provider cache. Restart OpenCode to retry.",
|
|
9075
|
+
variant: "warning",
|
|
9076
|
+
duration: 8000
|
|
9077
|
+
}
|
|
9078
|
+
}).catch(() => {});
|
|
9079
|
+
log("[auto-update-checker] Connected providers cache toast shown (creation failed)");
|
|
9080
|
+
} else {
|
|
9081
|
+
log("[auto-update-checker] Connected providers cache created on first run");
|
|
9082
|
+
}
|
|
8915
9083
|
} else {
|
|
9084
|
+
updateConnectedProvidersCache(ctx.client).catch((err) => {
|
|
9085
|
+
log("[auto-update-checker] Background cache update failed", { error: String(err) });
|
|
9086
|
+
});
|
|
8916
9087
|
log("[auto-update-checker] Connected providers cache exists, updating in background");
|
|
8917
9088
|
}
|
|
8918
9089
|
}
|
|
9090
|
+
var CACHE_UPDATE_TIMEOUT_MS = 1e4;
|
|
8919
9091
|
var init_connected_providers_status = __esm(() => {
|
|
8920
9092
|
init_connected_providers_cache();
|
|
9093
|
+
init_model_availability();
|
|
8921
9094
|
init_logger();
|
|
8922
9095
|
});
|
|
8923
9096
|
|
|
@@ -9010,8 +9183,8 @@ v${latestVersion} available. Restart OpenCode to apply.` : "OpenCode is now on S
|
|
|
9010
9183
|
const localDevVersion = getLocalDevVersion(ctx.directory);
|
|
9011
9184
|
const displayVersion = localDevVersion ?? cachedVersion;
|
|
9012
9185
|
await showConfigErrorsIfAny(ctx);
|
|
9013
|
-
await showModelCacheWarningIfNeeded(ctx);
|
|
9014
9186
|
await updateAndShowConnectedProvidersCacheStatus(ctx);
|
|
9187
|
+
await showModelCacheWarningIfNeeded(ctx);
|
|
9015
9188
|
if (localDevVersion) {
|
|
9016
9189
|
if (showStartupToast) {
|
|
9017
9190
|
showLocalDevToast(ctx, displayVersion, isSisyphusEnabled).catch(() => {});
|
|
@@ -9075,13 +9248,13 @@ var {
|
|
|
9075
9248
|
// package.json
|
|
9076
9249
|
var package_default = {
|
|
9077
9250
|
name: "oh-my-opencode",
|
|
9078
|
-
version: "3.
|
|
9251
|
+
version: "3.8.0",
|
|
9079
9252
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
9080
9253
|
main: "dist/index.js",
|
|
9081
9254
|
types: "dist/index.d.ts",
|
|
9082
9255
|
type: "module",
|
|
9083
9256
|
bin: {
|
|
9084
|
-
"oh-my-opencode": "
|
|
9257
|
+
"oh-my-opencode": "bin/oh-my-opencode.js"
|
|
9085
9258
|
},
|
|
9086
9259
|
files: [
|
|
9087
9260
|
"dist",
|
|
@@ -9130,7 +9303,7 @@ var package_default = {
|
|
|
9130
9303
|
"@ast-grep/napi": "^0.40.0",
|
|
9131
9304
|
"@clack/prompts": "^0.11.0",
|
|
9132
9305
|
"@code-yeongyu/comment-checker": "^0.6.1",
|
|
9133
|
-
"@modelcontextprotocol/sdk": "^1.25.
|
|
9306
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
9134
9307
|
"@opencode-ai/plugin": "^1.1.19",
|
|
9135
9308
|
"@opencode-ai/sdk": "^1.1.19",
|
|
9136
9309
|
commander: "^14.0.2",
|
|
@@ -9149,13 +9322,13 @@ var package_default = {
|
|
|
9149
9322
|
typescript: "^5.7.3"
|
|
9150
9323
|
},
|
|
9151
9324
|
optionalDependencies: {
|
|
9152
|
-
"oh-my-opencode-darwin-arm64": "3.
|
|
9153
|
-
"oh-my-opencode-darwin-x64": "3.
|
|
9154
|
-
"oh-my-opencode-linux-arm64": "3.
|
|
9155
|
-
"oh-my-opencode-linux-arm64-musl": "3.
|
|
9156
|
-
"oh-my-opencode-linux-x64": "3.
|
|
9157
|
-
"oh-my-opencode-linux-x64-musl": "3.
|
|
9158
|
-
"oh-my-opencode-windows-x64": "3.
|
|
9325
|
+
"oh-my-opencode-darwin-arm64": "3.8.0",
|
|
9326
|
+
"oh-my-opencode-darwin-x64": "3.8.0",
|
|
9327
|
+
"oh-my-opencode-linux-arm64": "3.8.0",
|
|
9328
|
+
"oh-my-opencode-linux-arm64-musl": "3.8.0",
|
|
9329
|
+
"oh-my-opencode-linux-x64": "3.8.0",
|
|
9330
|
+
"oh-my-opencode-linux-x64-musl": "3.8.0",
|
|
9331
|
+
"oh-my-opencode-windows-x64": "3.8.0"
|
|
9159
9332
|
},
|
|
9160
9333
|
trustedDependencies: [
|
|
9161
9334
|
"@ast-grep/cli",
|
|
@@ -23255,6 +23428,9 @@ var OverridableAgentNameSchema = exports_external.enum([
|
|
|
23255
23428
|
"multimodal-looker",
|
|
23256
23429
|
"atlas"
|
|
23257
23430
|
]);
|
|
23431
|
+
// src/config/schema/fallback-models.ts
|
|
23432
|
+
var FallbackModelsSchema = exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]);
|
|
23433
|
+
|
|
23258
23434
|
// src/config/schema/internal/permission.ts
|
|
23259
23435
|
var PermissionValueSchema = exports_external.enum(["ask", "allow", "deny"]);
|
|
23260
23436
|
var BashPermissionSchema = exports_external.union([
|
|
@@ -23273,6 +23449,7 @@ var AgentPermissionSchema = exports_external.object({
|
|
|
23273
23449
|
// src/config/schema/agent-overrides.ts
|
|
23274
23450
|
var AgentOverrideConfigSchema = exports_external.object({
|
|
23275
23451
|
model: exports_external.string().optional(),
|
|
23452
|
+
fallback_models: FallbackModelsSchema.optional(),
|
|
23276
23453
|
variant: exports_external.string().optional(),
|
|
23277
23454
|
category: exports_external.string().optional(),
|
|
23278
23455
|
skills: exports_external.array(exports_external.string()).optional(),
|
|
@@ -23291,13 +23468,13 @@ var AgentOverrideConfigSchema = exports_external.object({
|
|
|
23291
23468
|
type: exports_external.enum(["enabled", "disabled"]),
|
|
23292
23469
|
budgetTokens: exports_external.number().optional()
|
|
23293
23470
|
}).optional(),
|
|
23294
|
-
ultrawork: exports_external.object({
|
|
23295
|
-
model: exports_external.string(),
|
|
23296
|
-
variant: exports_external.string().optional()
|
|
23297
|
-
}).optional(),
|
|
23298
23471
|
reasoningEffort: exports_external.enum(["low", "medium", "high", "xhigh"]).optional(),
|
|
23299
23472
|
textVerbosity: exports_external.enum(["low", "medium", "high"]).optional(),
|
|
23300
|
-
providerOptions: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
23473
|
+
providerOptions: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
23474
|
+
ultrawork: exports_external.object({
|
|
23475
|
+
model: exports_external.string().optional(),
|
|
23476
|
+
variant: exports_external.string().optional()
|
|
23477
|
+
}).optional()
|
|
23301
23478
|
});
|
|
23302
23479
|
var AgentOverridesSchema = exports_external.object({
|
|
23303
23480
|
build: AgentOverrideConfigSchema.optional(),
|
|
@@ -23341,6 +23518,7 @@ var BrowserAutomationConfigSchema = exports_external.object({
|
|
|
23341
23518
|
var CategoryConfigSchema = exports_external.object({
|
|
23342
23519
|
description: exports_external.string().optional(),
|
|
23343
23520
|
model: exports_external.string().optional(),
|
|
23521
|
+
fallback_models: FallbackModelsSchema.optional(),
|
|
23344
23522
|
variant: exports_external.string().optional(),
|
|
23345
23523
|
temperature: exports_external.number().min(0).max(2).optional(),
|
|
23346
23524
|
top_p: exports_external.number().min(0).max(1).optional(),
|
|
@@ -23432,7 +23610,9 @@ var ExperimentalConfigSchema = exports_external.object({
|
|
|
23432
23610
|
task_system: exports_external.boolean().optional(),
|
|
23433
23611
|
plugin_load_timeout_ms: exports_external.number().min(1000).optional(),
|
|
23434
23612
|
safe_hook_creation: exports_external.boolean().optional(),
|
|
23435
|
-
|
|
23613
|
+
disable_omo_env: exports_external.boolean().optional(),
|
|
23614
|
+
hashline_edit: exports_external.boolean().optional(),
|
|
23615
|
+
model_fallback_title: exports_external.boolean().optional()
|
|
23436
23616
|
});
|
|
23437
23617
|
// src/config/schema/git-master.ts
|
|
23438
23618
|
var GitMasterConfigSchema = exports_external.object({
|
|
@@ -23446,13 +23626,13 @@ var HookNameSchema = exports_external.enum([
|
|
|
23446
23626
|
"session-recovery",
|
|
23447
23627
|
"session-notification",
|
|
23448
23628
|
"comment-checker",
|
|
23449
|
-
"grep-output-truncator",
|
|
23450
23629
|
"tool-output-truncator",
|
|
23451
23630
|
"question-label-truncator",
|
|
23452
23631
|
"directory-agents-injector",
|
|
23453
23632
|
"directory-readme-injector",
|
|
23454
23633
|
"empty-task-response-detector",
|
|
23455
23634
|
"think-mode",
|
|
23635
|
+
"model-fallback",
|
|
23456
23636
|
"anthropic-context-window-limit-recovery",
|
|
23457
23637
|
"preemptive-compaction",
|
|
23458
23638
|
"rules-injector",
|
|
@@ -23464,7 +23644,6 @@ var HookNameSchema = exports_external.enum([
|
|
|
23464
23644
|
"non-interactive-env",
|
|
23465
23645
|
"interactive-bash-session",
|
|
23466
23646
|
"thinking-block-validator",
|
|
23467
|
-
"ultrawork-model-override",
|
|
23468
23647
|
"ralph-loop",
|
|
23469
23648
|
"category-skill-reminder",
|
|
23470
23649
|
"compaction-context-injector",
|
|
@@ -23477,13 +23656,14 @@ var HookNameSchema = exports_external.enum([
|
|
|
23477
23656
|
"prometheus-md-only",
|
|
23478
23657
|
"sisyphus-junior-notepad",
|
|
23479
23658
|
"no-sisyphus-gpt",
|
|
23659
|
+
"no-hephaestus-non-gpt",
|
|
23480
23660
|
"start-work",
|
|
23481
23661
|
"atlas",
|
|
23482
23662
|
"unstable-agent-babysitter",
|
|
23483
|
-
"task-reminder",
|
|
23484
23663
|
"task-resume-info",
|
|
23485
23664
|
"stop-continuation-guard",
|
|
23486
23665
|
"tasks-todowrite-disabler",
|
|
23666
|
+
"runtime-fallback",
|
|
23487
23667
|
"write-existing-file-guard",
|
|
23488
23668
|
"anthropic-effort",
|
|
23489
23669
|
"hashline-read-enhancer"
|
|
@@ -23500,7 +23680,18 @@ var AnyMcpNameSchema = exports_external.string().min(1);
|
|
|
23500
23680
|
var RalphLoopConfigSchema = exports_external.object({
|
|
23501
23681
|
enabled: exports_external.boolean().default(false),
|
|
23502
23682
|
default_max_iterations: exports_external.number().min(1).max(1000).default(100),
|
|
23503
|
-
state_dir: exports_external.string().optional()
|
|
23683
|
+
state_dir: exports_external.string().optional(),
|
|
23684
|
+
default_strategy: exports_external.enum(["reset", "continue"]).default("continue")
|
|
23685
|
+
});
|
|
23686
|
+
|
|
23687
|
+
// src/config/schema/runtime-fallback.ts
|
|
23688
|
+
var RuntimeFallbackConfigSchema = exports_external.object({
|
|
23689
|
+
enabled: exports_external.boolean().optional(),
|
|
23690
|
+
retry_on_errors: exports_external.array(exports_external.number()).optional(),
|
|
23691
|
+
max_fallback_attempts: exports_external.number().min(1).max(20).optional(),
|
|
23692
|
+
cooldown_seconds: exports_external.number().min(0).optional(),
|
|
23693
|
+
timeout_seconds: exports_external.number().min(0).optional(),
|
|
23694
|
+
notify_on_fallback: exports_external.boolean().optional()
|
|
23504
23695
|
});
|
|
23505
23696
|
|
|
23506
23697
|
// src/config/schema/skills.ts
|
|
@@ -23584,9 +23775,10 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
23584
23775
|
disabled_mcps: exports_external.array(AnyMcpNameSchema).optional(),
|
|
23585
23776
|
disabled_agents: exports_external.array(BuiltinAgentNameSchema).optional(),
|
|
23586
23777
|
disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
|
|
23587
|
-
disabled_hooks: exports_external.array(
|
|
23778
|
+
disabled_hooks: exports_external.array(exports_external.string()).optional(),
|
|
23588
23779
|
disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
|
|
23589
23780
|
disabled_tools: exports_external.array(exports_external.string()).optional(),
|
|
23781
|
+
hashline_edit: exports_external.boolean().optional(),
|
|
23590
23782
|
agents: AgentOverridesSchema.optional(),
|
|
23591
23783
|
categories: CategoriesConfigSchema.optional(),
|
|
23592
23784
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
@@ -23596,6 +23788,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
23596
23788
|
auto_update: exports_external.boolean().optional(),
|
|
23597
23789
|
skills: SkillsConfigSchema.optional(),
|
|
23598
23790
|
ralph_loop: RalphLoopConfigSchema.optional(),
|
|
23791
|
+
runtime_fallback: exports_external.union([exports_external.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
23599
23792
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
23600
23793
|
notification: NotificationConfigSchema.optional(),
|
|
23601
23794
|
babysitting: BabysittingConfigSchema.optional(),
|
|
@@ -25633,7 +25826,8 @@ function readState(directory, customPath) {
|
|
|
25633
25826
|
started_at: stripQuotes(data.started_at) || new Date().toISOString(),
|
|
25634
25827
|
prompt: body.trim(),
|
|
25635
25828
|
session_id: data.session_id ? stripQuotes(data.session_id) : undefined,
|
|
25636
|
-
ultrawork: data.ultrawork === true || data.ultrawork === "true" ? true : undefined
|
|
25829
|
+
ultrawork: data.ultrawork === true || data.ultrawork === "true" ? true : undefined,
|
|
25830
|
+
strategy: data.strategy === "reset" || data.strategy === "continue" ? data.strategy : undefined
|
|
25637
25831
|
};
|
|
25638
25832
|
} catch {
|
|
25639
25833
|
return null;
|
|
@@ -25760,11 +25954,12 @@ init_shared();
|
|
|
25760
25954
|
var DEFAULT_POLL_INTERVAL_MS = 500;
|
|
25761
25955
|
var DEFAULT_REQUIRED_CONSECUTIVE = 1;
|
|
25762
25956
|
var ERROR_GRACE_CYCLES = 3;
|
|
25763
|
-
var MIN_STABILIZATION_MS =
|
|
25957
|
+
var MIN_STABILIZATION_MS = 1000;
|
|
25764
25958
|
async function pollForCompletion(ctx, eventState, abortController, options = {}) {
|
|
25765
25959
|
const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
25766
25960
|
const requiredConsecutive = options.requiredConsecutive ?? DEFAULT_REQUIRED_CONSECUTIVE;
|
|
25767
|
-
const
|
|
25961
|
+
const rawMinStabilizationMs = options.minStabilizationMs ?? MIN_STABILIZATION_MS;
|
|
25962
|
+
const minStabilizationMs = rawMinStabilizationMs > 0 ? rawMinStabilizationMs : MIN_STABILIZATION_MS;
|
|
25768
25963
|
let consecutiveCompleteChecks = 0;
|
|
25769
25964
|
let errorCycleCount = 0;
|
|
25770
25965
|
let firstWorkTimestamp = null;
|
|
@@ -25802,22 +25997,18 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
25802
25997
|
continue;
|
|
25803
25998
|
}
|
|
25804
25999
|
if (!eventState.hasReceivedMeaningfulWork) {
|
|
25805
|
-
if (
|
|
26000
|
+
if (Date.now() - pollStartTimestamp < minStabilizationMs) {
|
|
25806
26001
|
consecutiveCompleteChecks = 0;
|
|
25807
26002
|
continue;
|
|
25808
26003
|
}
|
|
25809
|
-
|
|
26004
|
+
} else {
|
|
26005
|
+
if (firstWorkTimestamp === null) {
|
|
26006
|
+
firstWorkTimestamp = Date.now();
|
|
26007
|
+
}
|
|
26008
|
+
if (Date.now() - firstWorkTimestamp < minStabilizationMs) {
|
|
25810
26009
|
consecutiveCompleteChecks = 0;
|
|
25811
26010
|
continue;
|
|
25812
26011
|
}
|
|
25813
|
-
consecutiveCompleteChecks = 0;
|
|
25814
|
-
}
|
|
25815
|
-
if (firstWorkTimestamp === null) {
|
|
25816
|
-
firstWorkTimestamp = Date.now();
|
|
25817
|
-
}
|
|
25818
|
-
if (Date.now() - firstWorkTimestamp < minStabilizationMs) {
|
|
25819
|
-
consecutiveCompleteChecks = 0;
|
|
25820
|
-
continue;
|
|
25821
26012
|
}
|
|
25822
26013
|
const shouldExit = await checkCompletionConditions(ctx);
|
|
25823
26014
|
if (shouldExit) {
|
|
@@ -25908,6 +26099,57 @@ function suppressRunInput(stdin = process.stdin, onInterrupt = () => {
|
|
|
25908
26099
|
};
|
|
25909
26100
|
}
|
|
25910
26101
|
|
|
26102
|
+
// src/cli/run/timestamp-output.ts
|
|
26103
|
+
function formatTimestamp(date5) {
|
|
26104
|
+
const hh = String(date5.getHours()).padStart(2, "0");
|
|
26105
|
+
const mm = String(date5.getMinutes()).padStart(2, "0");
|
|
26106
|
+
const ss = String(date5.getSeconds()).padStart(2, "0");
|
|
26107
|
+
return `${hh}:${mm}:${ss}`;
|
|
26108
|
+
}
|
|
26109
|
+
function createTimestampTransformer(now = () => new Date) {
|
|
26110
|
+
let atLineStart = true;
|
|
26111
|
+
return (chunk) => {
|
|
26112
|
+
if (!chunk)
|
|
26113
|
+
return "";
|
|
26114
|
+
let output = "";
|
|
26115
|
+
for (let i2 = 0;i2 < chunk.length; i2++) {
|
|
26116
|
+
const ch = chunk[i2];
|
|
26117
|
+
if (atLineStart) {
|
|
26118
|
+
output += `[${formatTimestamp(now())}] `;
|
|
26119
|
+
atLineStart = false;
|
|
26120
|
+
}
|
|
26121
|
+
output += ch;
|
|
26122
|
+
if (ch === `
|
|
26123
|
+
`) {
|
|
26124
|
+
atLineStart = true;
|
|
26125
|
+
}
|
|
26126
|
+
}
|
|
26127
|
+
return output;
|
|
26128
|
+
};
|
|
26129
|
+
}
|
|
26130
|
+
function createTimestampedStdoutController(stdout = process.stdout) {
|
|
26131
|
+
const originalWrite = stdout.write.bind(stdout);
|
|
26132
|
+
const transform2 = createTimestampTransformer();
|
|
26133
|
+
function enable() {
|
|
26134
|
+
const write = (chunk, encodingOrCallback, callback) => {
|
|
26135
|
+
const text = typeof chunk === "string" ? chunk : Buffer.from(chunk).toString(typeof encodingOrCallback === "string" ? encodingOrCallback : undefined);
|
|
26136
|
+
const stamped = transform2(text);
|
|
26137
|
+
if (typeof encodingOrCallback === "function") {
|
|
26138
|
+
return originalWrite(stamped, encodingOrCallback);
|
|
26139
|
+
}
|
|
26140
|
+
if (encodingOrCallback !== undefined) {
|
|
26141
|
+
return originalWrite(stamped, encodingOrCallback, callback);
|
|
26142
|
+
}
|
|
26143
|
+
return originalWrite(stamped);
|
|
26144
|
+
};
|
|
26145
|
+
stdout.write = write;
|
|
26146
|
+
}
|
|
26147
|
+
function restore() {
|
|
26148
|
+
stdout.write = originalWrite;
|
|
26149
|
+
}
|
|
26150
|
+
return { enable, restore };
|
|
26151
|
+
}
|
|
26152
|
+
|
|
25911
26153
|
// src/cli/run/runner.ts
|
|
25912
26154
|
var EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS = 2000;
|
|
25913
26155
|
async function waitForEventProcessorShutdown(eventProcessor, timeoutMs = EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS) {
|
|
@@ -25926,6 +26168,8 @@ async function run(options) {
|
|
|
25926
26168
|
const jsonManager = options.json ? createJsonOutputManager() : null;
|
|
25927
26169
|
if (jsonManager)
|
|
25928
26170
|
jsonManager.redirectToStderr();
|
|
26171
|
+
const timestampOutput = options.json || options.timestamp === false ? null : createTimestampedStdoutController();
|
|
26172
|
+
timestampOutput?.enable();
|
|
25929
26173
|
const pluginConfig = loadPluginConfig(directory, { command: "run" });
|
|
25930
26174
|
const resolvedAgent = resolveRunAgent(options, pluginConfig);
|
|
25931
26175
|
const abortController = new AbortController;
|
|
@@ -26010,11 +26254,14 @@ Interrupted. Shutting down...`));
|
|
|
26010
26254
|
} catch (err) {
|
|
26011
26255
|
if (jsonManager)
|
|
26012
26256
|
jsonManager.restore();
|
|
26257
|
+
timestampOutput?.restore();
|
|
26013
26258
|
if (err instanceof Error && err.name === "AbortError") {
|
|
26014
26259
|
return 130;
|
|
26015
26260
|
}
|
|
26016
26261
|
console.error(import_picocolors15.default.red(`Error: ${serializeError(err)}`));
|
|
26017
26262
|
return 1;
|
|
26263
|
+
} finally {
|
|
26264
|
+
timestampOutput?.restore();
|
|
26018
26265
|
}
|
|
26019
26266
|
}
|
|
26020
26267
|
// src/cli/get-local-version/get-local-version.ts
|
|
@@ -26354,7 +26601,7 @@ function getPluginInfo() {
|
|
|
26354
26601
|
registered: true,
|
|
26355
26602
|
configPath,
|
|
26356
26603
|
entry: pluginEntry.entry,
|
|
26357
|
-
isPinned: pinnedVersion !== null,
|
|
26604
|
+
isPinned: pinnedVersion !== null && /^\d+\.\d+\.\d+/.test(pinnedVersion),
|
|
26358
26605
|
pinnedVersion,
|
|
26359
26606
|
isLocalDev: pluginEntry.isLocalDev
|
|
26360
26607
|
};
|
|
@@ -28227,7 +28474,7 @@ Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi):
|
|
|
28227
28474
|
Gemini Native google/ models (Gemini 3 Pro, Flash)
|
|
28228
28475
|
Copilot github-copilot/ models (fallback)
|
|
28229
28476
|
OpenCode Zen opencode/ models (opencode/claude-opus-4-6, etc.)
|
|
28230
|
-
|
|
28477
|
+
Z.ai zai-coding-plan/glm-5 (visual-engineering fallback)
|
|
28231
28478
|
Kimi kimi-for-coding/k2p5 (Sisyphus/Prometheus fallback)
|
|
28232
28479
|
`).action(async (options) => {
|
|
28233
28480
|
const args = {
|
|
@@ -28244,7 +28491,7 @@ Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi):
|
|
|
28244
28491
|
const exitCode = await install(args);
|
|
28245
28492
|
process.exit(exitCode);
|
|
28246
28493
|
});
|
|
28247
|
-
program2.command("run <message>").allowUnknownOption().passThroughOptions().description("Run opencode with todo/background task completion enforcement").option("-a, --agent <name>", "Agent to use (default: from CLI/env/config, fallback: Sisyphus)").option("-d, --directory <path>", "Working directory").option("-p, --port <port>", "Server port (attaches if port already in use)", parseInt).option("--attach <url>", "Attach to existing opencode server URL").option("--on-complete <command>", "Shell command to run after completion").option("--json", "Output structured JSON result to stdout").option("--verbose", "Show full event stream (default: messages/tools only)").option("--session-id <id>", "Resume existing session instead of creating new one").addHelpText("after", `
|
|
28494
|
+
program2.command("run <message>").allowUnknownOption().passThroughOptions().description("Run opencode with todo/background task completion enforcement").option("-a, --agent <name>", "Agent to use (default: from CLI/env/config, fallback: Sisyphus)").option("-d, --directory <path>", "Working directory").option("-p, --port <port>", "Server port (attaches if port already in use)", parseInt).option("--attach <url>", "Attach to existing opencode server URL").option("--on-complete <command>", "Shell command to run after completion").option("--json", "Output structured JSON result to stdout").option("--no-timestamp", "Disable timestamp prefix in run output").option("--verbose", "Show full event stream (default: messages/tools only)").option("--session-id <id>", "Resume existing session instead of creating new one").addHelpText("after", `
|
|
28248
28495
|
Examples:
|
|
28249
28496
|
$ bunx oh-my-opencode run "Fix the bug in index.ts"
|
|
28250
28497
|
$ bunx oh-my-opencode run --agent Sisyphus "Implement feature X"
|
|
@@ -28279,6 +28526,7 @@ Unlike 'opencode run', this command waits until:
|
|
|
28279
28526
|
attach: options.attach,
|
|
28280
28527
|
onComplete: options.onComplete,
|
|
28281
28528
|
json: options.json ?? false,
|
|
28529
|
+
timestamp: options.timestamp ?? true,
|
|
28282
28530
|
verbose: options.verbose ?? false,
|
|
28283
28531
|
sessionId: options.sessionId
|
|
28284
28532
|
};
|