oh-my-opencode 3.0.0-beta.6 → 3.0.0-beta.8
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 +55 -29
- package/README.md +66 -34
- package/README.zh-cn.md +59 -29
- package/bin/oh-my-opencode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/prometheus-prompt.d.ts +1 -1
- package/dist/agents/sisyphus-junior.d.ts +1 -1
- package/dist/cli/config-manager.d.ts +9 -1
- package/dist/cli/index.js +272 -224
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +5 -0
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/hook-message-injector/index.d.ts +1 -1
- package/dist/features/opencode-skill-loader/skill-content.d.ts +10 -0
- package/dist/features/skill-mcp-manager/manager.d.ts +10 -0
- package/dist/features/task-toast-manager/index.d.ts +1 -1
- package/dist/features/task-toast-manager/manager.d.ts +2 -1
- package/dist/features/task-toast-manager/types.d.ts +5 -0
- package/dist/hooks/comment-checker/cli.d.ts +0 -1
- package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/sisyphus-task-retry/index.d.ts +24 -0
- package/dist/hooks/sisyphus-task-retry/index.test.d.ts +1 -0
- package/dist/index.js +2794 -1061
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/migration.d.ts +1 -0
- package/dist/shared/session-cursor.d.ts +13 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +41 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/tools/look-at/tools.d.ts +7 -0
- package/dist/tools/look-at/tools.test.d.ts +1 -0
- package/dist/tools/lsp/client.d.ts +0 -7
- package/dist/tools/lsp/constants.d.ts +0 -3
- package/dist/tools/lsp/tools.d.ts +0 -7
- package/dist/tools/lsp/types.d.ts +0 -56
- package/dist/tools/lsp/utils.d.ts +1 -8
- package/package.json +20 -5
- package/postinstall.mjs +43 -0
package/dist/cli/index.js
CHANGED
|
@@ -5828,8 +5828,23 @@ var init_jsonc_parser = __esm(() => {
|
|
|
5828
5828
|
});
|
|
5829
5829
|
|
|
5830
5830
|
// src/shared/migration.ts
|
|
5831
|
+
var BUILTIN_AGENT_NAMES;
|
|
5831
5832
|
var init_migration = __esm(() => {
|
|
5832
5833
|
init_logger();
|
|
5834
|
+
BUILTIN_AGENT_NAMES = new Set([
|
|
5835
|
+
"Sisyphus",
|
|
5836
|
+
"oracle",
|
|
5837
|
+
"librarian",
|
|
5838
|
+
"explore",
|
|
5839
|
+
"frontend-ui-ux-engineer",
|
|
5840
|
+
"document-writer",
|
|
5841
|
+
"multimodal-looker",
|
|
5842
|
+
"Metis (Plan Consultant)",
|
|
5843
|
+
"Momus (Plan Reviewer)",
|
|
5844
|
+
"Prometheus (Planner)",
|
|
5845
|
+
"orchestrator-sisyphus",
|
|
5846
|
+
"build"
|
|
5847
|
+
]);
|
|
5833
5848
|
});
|
|
5834
5849
|
|
|
5835
5850
|
// src/shared/opencode-config-dir.ts
|
|
@@ -5928,6 +5943,11 @@ var init_external_plugin_detector = __esm(() => {
|
|
|
5928
5943
|
|
|
5929
5944
|
// src/shared/zip-extractor.ts
|
|
5930
5945
|
var init_zip_extractor = () => {};
|
|
5946
|
+
// src/shared/session-cursor.ts
|
|
5947
|
+
var sessionCursors;
|
|
5948
|
+
var init_session_cursor = __esm(() => {
|
|
5949
|
+
sessionCursors = new Map;
|
|
5950
|
+
});
|
|
5931
5951
|
// src/shared/index.ts
|
|
5932
5952
|
var init_shared = __esm(() => {
|
|
5933
5953
|
init_frontmatter();
|
|
@@ -5950,6 +5970,7 @@ var init_shared = __esm(() => {
|
|
|
5950
5970
|
init_permission_compat();
|
|
5951
5971
|
init_external_plugin_detector();
|
|
5952
5972
|
init_zip_extractor();
|
|
5973
|
+
init_session_cursor();
|
|
5953
5974
|
});
|
|
5954
5975
|
|
|
5955
5976
|
// src/cli/config-manager.ts
|
|
@@ -6015,6 +6036,31 @@ async function fetchLatestVersion(packageName) {
|
|
|
6015
6036
|
return null;
|
|
6016
6037
|
}
|
|
6017
6038
|
}
|
|
6039
|
+
async function fetchNpmDistTags(packageName) {
|
|
6040
|
+
try {
|
|
6041
|
+
const res = await fetch(`https://registry.npmjs.org/-/package/${packageName}/dist-tags`, {
|
|
6042
|
+
signal: AbortSignal.timeout(NPM_FETCH_TIMEOUT_MS)
|
|
6043
|
+
});
|
|
6044
|
+
if (!res.ok)
|
|
6045
|
+
return null;
|
|
6046
|
+
const data = await res.json();
|
|
6047
|
+
return data;
|
|
6048
|
+
} catch {
|
|
6049
|
+
return null;
|
|
6050
|
+
}
|
|
6051
|
+
}
|
|
6052
|
+
async function getPluginNameWithVersion(currentVersion) {
|
|
6053
|
+
const distTags = await fetchNpmDistTags(PACKAGE_NAME);
|
|
6054
|
+
if (distTags) {
|
|
6055
|
+
const allTags = new Set([...PRIORITIZED_TAGS, ...Object.keys(distTags)]);
|
|
6056
|
+
for (const tag of allTags) {
|
|
6057
|
+
if (distTags[tag] === currentVersion) {
|
|
6058
|
+
return `${PACKAGE_NAME}@${tag}`;
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
}
|
|
6062
|
+
return `${PACKAGE_NAME}@${currentVersion}`;
|
|
6063
|
+
}
|
|
6018
6064
|
function detectConfigFormat() {
|
|
6019
6065
|
const configJsonc = getConfigJsonc();
|
|
6020
6066
|
const configJson = getConfigJson();
|
|
@@ -6057,17 +6103,17 @@ function ensureConfigDir() {
|
|
|
6057
6103
|
mkdirSync(configDir, { recursive: true });
|
|
6058
6104
|
}
|
|
6059
6105
|
}
|
|
6060
|
-
function addPluginToOpenCodeConfig() {
|
|
6106
|
+
async function addPluginToOpenCodeConfig(currentVersion) {
|
|
6061
6107
|
try {
|
|
6062
6108
|
ensureConfigDir();
|
|
6063
6109
|
} catch (err) {
|
|
6064
6110
|
return { success: false, configPath: getConfigDir(), error: formatErrorWithSuggestion(err, "create config directory") };
|
|
6065
6111
|
}
|
|
6066
6112
|
const { format: format2, path: path2 } = detectConfigFormat();
|
|
6067
|
-
const
|
|
6113
|
+
const pluginEntry = await getPluginNameWithVersion(currentVersion);
|
|
6068
6114
|
try {
|
|
6069
6115
|
if (format2 === "none") {
|
|
6070
|
-
const config2 = { plugin: [
|
|
6116
|
+
const config2 = { plugin: [pluginEntry] };
|
|
6071
6117
|
writeFileSync(path2, JSON.stringify(config2, null, 2) + `
|
|
6072
6118
|
`);
|
|
6073
6119
|
return { success: true, configPath: path2 };
|
|
@@ -6078,25 +6124,30 @@ function addPluginToOpenCodeConfig() {
|
|
|
6078
6124
|
}
|
|
6079
6125
|
const config = parseResult.config;
|
|
6080
6126
|
const plugins = config.plugin ?? [];
|
|
6081
|
-
|
|
6082
|
-
|
|
6127
|
+
const existingIndex = plugins.findIndex((p2) => p2 === PACKAGE_NAME || p2.startsWith(`${PACKAGE_NAME}@`));
|
|
6128
|
+
if (existingIndex !== -1) {
|
|
6129
|
+
if (plugins[existingIndex] === pluginEntry) {
|
|
6130
|
+
return { success: true, configPath: path2 };
|
|
6131
|
+
}
|
|
6132
|
+
plugins[existingIndex] = pluginEntry;
|
|
6133
|
+
} else {
|
|
6134
|
+
plugins.push(pluginEntry);
|
|
6083
6135
|
}
|
|
6084
|
-
config.plugin =
|
|
6136
|
+
config.plugin = plugins;
|
|
6085
6137
|
if (format2 === "jsonc") {
|
|
6086
6138
|
const content = readFileSync2(path2, "utf-8");
|
|
6087
6139
|
const pluginArrayRegex = /"plugin"\s*:\s*\[([\s\S]*?)\]/;
|
|
6088
6140
|
const match = content.match(pluginArrayRegex);
|
|
6089
6141
|
if (match) {
|
|
6090
|
-
const
|
|
6091
|
-
|
|
6092
|
-
"${pluginName}"` : `"${pluginName}"`;
|
|
6142
|
+
const formattedPlugins = plugins.map((p2) => `"${p2}"`).join(`,
|
|
6143
|
+
`);
|
|
6093
6144
|
const newContent = content.replace(pluginArrayRegex, `"plugin": [
|
|
6094
|
-
${
|
|
6145
|
+
${formattedPlugins}
|
|
6095
6146
|
]`);
|
|
6096
6147
|
writeFileSync(path2, newContent);
|
|
6097
6148
|
} else {
|
|
6098
6149
|
const newContent = content.replace(/^(\s*\{)/, `$1
|
|
6099
|
-
"plugin": ["${
|
|
6150
|
+
"plugin": ["${pluginEntry}"],`);
|
|
6100
6151
|
writeFileSync(path2, newContent);
|
|
6101
6152
|
}
|
|
6102
6153
|
} else {
|
|
@@ -6127,30 +6178,40 @@ function generateOmoConfig(installConfig) {
|
|
|
6127
6178
|
};
|
|
6128
6179
|
const agents = {};
|
|
6129
6180
|
if (!installConfig.hasClaude) {
|
|
6130
|
-
agents["Sisyphus"] = {
|
|
6181
|
+
agents["Sisyphus"] = {
|
|
6182
|
+
model: installConfig.hasCopilot ? "github-copilot/claude-opus-4.5" : "opencode/glm-4.7-free"
|
|
6183
|
+
};
|
|
6131
6184
|
}
|
|
6132
6185
|
agents["librarian"] = { model: "opencode/glm-4.7-free" };
|
|
6133
6186
|
if (installConfig.hasGemini) {
|
|
6134
6187
|
agents["explore"] = { model: "google/antigravity-gemini-3-flash" };
|
|
6135
6188
|
} else if (installConfig.hasClaude && installConfig.isMax20) {
|
|
6136
6189
|
agents["explore"] = { model: "anthropic/claude-haiku-4-5" };
|
|
6190
|
+
} else if (installConfig.hasCopilot) {
|
|
6191
|
+
agents["explore"] = { model: "github-copilot/grok-code-fast-1" };
|
|
6137
6192
|
} else {
|
|
6138
6193
|
agents["explore"] = { model: "opencode/glm-4.7-free" };
|
|
6139
6194
|
}
|
|
6140
6195
|
if (!installConfig.hasChatGPT) {
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
};
|
|
6196
|
+
const oracleFallback = installConfig.hasCopilot ? "github-copilot/gpt-5.2" : installConfig.hasClaude ? "anthropic/claude-opus-4-5" : "opencode/glm-4.7-free";
|
|
6197
|
+
agents["oracle"] = { model: oracleFallback };
|
|
6144
6198
|
}
|
|
6145
6199
|
if (installConfig.hasGemini) {
|
|
6146
6200
|
agents["frontend-ui-ux-engineer"] = { model: "google/antigravity-gemini-3-pro-high" };
|
|
6147
6201
|
agents["document-writer"] = { model: "google/antigravity-gemini-3-flash" };
|
|
6148
6202
|
agents["multimodal-looker"] = { model: "google/antigravity-gemini-3-flash" };
|
|
6203
|
+
} else if (installConfig.hasClaude) {
|
|
6204
|
+
agents["frontend-ui-ux-engineer"] = { model: "anthropic/claude-opus-4-5" };
|
|
6205
|
+
agents["document-writer"] = { model: "anthropic/claude-opus-4-5" };
|
|
6206
|
+
agents["multimodal-looker"] = { model: "anthropic/claude-opus-4-5" };
|
|
6207
|
+
} else if (installConfig.hasCopilot) {
|
|
6208
|
+
agents["frontend-ui-ux-engineer"] = { model: "github-copilot/gemini-3-pro-preview" };
|
|
6209
|
+
agents["document-writer"] = { model: "github-copilot/gemini-3-flash-preview" };
|
|
6210
|
+
agents["multimodal-looker"] = { model: "github-copilot/gemini-3-flash-preview" };
|
|
6149
6211
|
} else {
|
|
6150
|
-
|
|
6151
|
-
agents["
|
|
6152
|
-
agents["
|
|
6153
|
-
agents["multimodal-looker"] = { model: fallbackModel };
|
|
6212
|
+
agents["frontend-ui-ux-engineer"] = { model: "opencode/glm-4.7-free" };
|
|
6213
|
+
agents["document-writer"] = { model: "opencode/glm-4.7-free" };
|
|
6214
|
+
agents["multimodal-looker"] = { model: "opencode/glm-4.7-free" };
|
|
6154
6215
|
}
|
|
6155
6216
|
if (Object.keys(agents).length > 0) {
|
|
6156
6217
|
config.agents = agents;
|
|
@@ -6161,6 +6222,12 @@ function generateOmoConfig(installConfig) {
|
|
|
6161
6222
|
artistry: { model: "google/gemini-3-pro-high" },
|
|
6162
6223
|
writing: { model: "google/gemini-3-flash-high" }
|
|
6163
6224
|
};
|
|
6225
|
+
} else if (installConfig.hasCopilot) {
|
|
6226
|
+
config.categories = {
|
|
6227
|
+
"visual-engineering": { model: "github-copilot/gemini-3-pro-preview" },
|
|
6228
|
+
artistry: { model: "github-copilot/gemini-3-pro-preview" },
|
|
6229
|
+
writing: { model: "github-copilot/gemini-3-flash-preview" }
|
|
6230
|
+
};
|
|
6164
6231
|
}
|
|
6165
6232
|
return config;
|
|
6166
6233
|
}
|
|
@@ -6261,11 +6328,6 @@ async function addAuthPlugins(config) {
|
|
|
6261
6328
|
plugins.push(pluginEntry);
|
|
6262
6329
|
}
|
|
6263
6330
|
}
|
|
6264
|
-
if (config.hasChatGPT) {
|
|
6265
|
-
if (!plugins.some((p2) => p2.startsWith("opencode-openai-codex-auth"))) {
|
|
6266
|
-
plugins.push("opencode-openai-codex-auth");
|
|
6267
|
-
}
|
|
6268
|
-
}
|
|
6269
6331
|
const newConfig = { ...existingConfig ?? {}, plugin: plugins };
|
|
6270
6332
|
writeFileSync(path2, JSON.stringify(newConfig, null, 2) + `
|
|
6271
6333
|
`);
|
|
@@ -6336,9 +6398,6 @@ function addProviderConfig(config) {
|
|
|
6336
6398
|
if (config.hasGemini) {
|
|
6337
6399
|
providers.google = ANTIGRAVITY_PROVIDER_CONFIG.google;
|
|
6338
6400
|
}
|
|
6339
|
-
if (config.hasChatGPT) {
|
|
6340
|
-
providers.openai = CODEX_PROVIDER_CONFIG.openai;
|
|
6341
|
-
}
|
|
6342
6401
|
if (Object.keys(providers).length > 0) {
|
|
6343
6402
|
newConfig.provider = providers;
|
|
6344
6403
|
}
|
|
@@ -6355,7 +6414,8 @@ function detectCurrentConfig() {
|
|
|
6355
6414
|
hasClaude: true,
|
|
6356
6415
|
isMax20: true,
|
|
6357
6416
|
hasChatGPT: true,
|
|
6358
|
-
hasGemini: false
|
|
6417
|
+
hasGemini: false,
|
|
6418
|
+
hasCopilot: false
|
|
6359
6419
|
};
|
|
6360
6420
|
const { format: format2, path: path2 } = detectConfigFormat();
|
|
6361
6421
|
if (format2 === "none") {
|
|
@@ -6372,7 +6432,6 @@ function detectCurrentConfig() {
|
|
|
6372
6432
|
return result;
|
|
6373
6433
|
}
|
|
6374
6434
|
result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-antigravity-auth"));
|
|
6375
|
-
result.hasChatGPT = plugins.some((p2) => p2.startsWith("opencode-openai-codex-auth"));
|
|
6376
6435
|
const omoConfigPath = getOmoConfig();
|
|
6377
6436
|
if (!existsSync3(omoConfigPath)) {
|
|
6378
6437
|
return result;
|
|
@@ -6403,14 +6462,17 @@ function detectCurrentConfig() {
|
|
|
6403
6462
|
} else if (agents["oracle"]?.model === "opencode/glm-4.7-free") {
|
|
6404
6463
|
result.hasChatGPT = false;
|
|
6405
6464
|
}
|
|
6465
|
+
const hasAnyCopilotModel = Object.values(agents).some((agent) => agent?.model?.startsWith("github-copilot/"));
|
|
6466
|
+
result.hasCopilot = hasAnyCopilotModel;
|
|
6406
6467
|
} catch {}
|
|
6407
6468
|
return result;
|
|
6408
6469
|
}
|
|
6409
|
-
var OPENCODE_BINARIES, configContext = null, BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS,
|
|
6470
|
+
var OPENCODE_BINARIES, configContext = null, BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS, NPM_FETCH_TIMEOUT_MS = 5000, PACKAGE_NAME = "oh-my-opencode", PRIORITIZED_TAGS, ANTIGRAVITY_PROVIDER_CONFIG;
|
|
6410
6471
|
var init_config_manager = __esm(() => {
|
|
6411
6472
|
init_shared();
|
|
6412
6473
|
OPENCODE_BINARIES = ["opencode", "opencode-desktop"];
|
|
6413
6474
|
BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000;
|
|
6475
|
+
PRIORITIZED_TAGS = ["latest", "beta", "next"];
|
|
6414
6476
|
ANTIGRAVITY_PROVIDER_CONFIG = {
|
|
6415
6477
|
google: {
|
|
6416
6478
|
name: "Google",
|
|
@@ -6438,54 +6500,6 @@ var init_config_manager = __esm(() => {
|
|
|
6438
6500
|
}
|
|
6439
6501
|
}
|
|
6440
6502
|
};
|
|
6441
|
-
CODEX_PROVIDER_CONFIG = {
|
|
6442
|
-
openai: {
|
|
6443
|
-
name: "OpenAI",
|
|
6444
|
-
options: {
|
|
6445
|
-
reasoningEffort: "medium",
|
|
6446
|
-
reasoningSummary: "auto",
|
|
6447
|
-
textVerbosity: "medium",
|
|
6448
|
-
include: ["reasoning.encrypted_content"],
|
|
6449
|
-
store: false
|
|
6450
|
-
},
|
|
6451
|
-
models: {
|
|
6452
|
-
"gpt-5.2": {
|
|
6453
|
-
name: "GPT 5.2 (OAuth)",
|
|
6454
|
-
limit: { context: 272000, output: 128000 },
|
|
6455
|
-
modalities: { input: ["text", "image"], output: ["text"] },
|
|
6456
|
-
variants: {
|
|
6457
|
-
none: { reasoningEffort: "none", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
6458
|
-
low: { reasoningEffort: "low", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
6459
|
-
medium: { reasoningEffort: "medium", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
6460
|
-
high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
6461
|
-
xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }
|
|
6462
|
-
}
|
|
6463
|
-
},
|
|
6464
|
-
"gpt-5.2-codex": {
|
|
6465
|
-
name: "GPT 5.2 Codex (OAuth)",
|
|
6466
|
-
limit: { context: 272000, output: 128000 },
|
|
6467
|
-
modalities: { input: ["text", "image"], output: ["text"] },
|
|
6468
|
-
variants: {
|
|
6469
|
-
low: { reasoningEffort: "low", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
6470
|
-
medium: { reasoningEffort: "medium", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
6471
|
-
high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
6472
|
-
xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }
|
|
6473
|
-
}
|
|
6474
|
-
},
|
|
6475
|
-
"gpt-5.1-codex-max": {
|
|
6476
|
-
name: "GPT 5.1 Codex Max (OAuth)",
|
|
6477
|
-
limit: { context: 272000, output: 128000 },
|
|
6478
|
-
modalities: { input: ["text", "image"], output: ["text"] },
|
|
6479
|
-
variants: {
|
|
6480
|
-
low: { reasoningEffort: "low", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
6481
|
-
medium: { reasoningEffort: "medium", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
6482
|
-
high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
6483
|
-
xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }
|
|
6484
|
-
}
|
|
6485
|
-
}
|
|
6486
|
-
}
|
|
6487
|
-
}
|
|
6488
|
-
};
|
|
6489
6503
|
});
|
|
6490
6504
|
|
|
6491
6505
|
// src/hooks/auto-update-checker/constants.ts
|
|
@@ -6516,12 +6530,12 @@ function getWindowsAppdataDir() {
|
|
|
6516
6530
|
return null;
|
|
6517
6531
|
return process.env.APPDATA ?? path2.join(os2.homedir(), "AppData", "Roaming");
|
|
6518
6532
|
}
|
|
6519
|
-
var
|
|
6533
|
+
var PACKAGE_NAME2 = "oh-my-opencode", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_DIR, VERSION_FILE, INSTALLED_PACKAGE_JSON, USER_CONFIG_DIR, USER_OPENCODE_CONFIG, USER_OPENCODE_CONFIG_JSONC;
|
|
6520
6534
|
var init_constants = __esm(() => {
|
|
6521
|
-
NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${
|
|
6535
|
+
NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME2}/dist-tags`;
|
|
6522
6536
|
CACHE_DIR = getCacheDir();
|
|
6523
6537
|
VERSION_FILE = path2.join(CACHE_DIR, "version");
|
|
6524
|
-
INSTALLED_PACKAGE_JSON = path2.join(CACHE_DIR, "node_modules",
|
|
6538
|
+
INSTALLED_PACKAGE_JSON = path2.join(CACHE_DIR, "node_modules", PACKAGE_NAME2, "package.json");
|
|
6525
6539
|
USER_CONFIG_DIR = getUserConfigDir();
|
|
6526
6540
|
USER_OPENCODE_CONFIG = path2.join(USER_CONFIG_DIR, "opencode", "opencode.json");
|
|
6527
6541
|
USER_OPENCODE_CONFIG_JSONC = path2.join(USER_CONFIG_DIR, "opencode", "opencode.jsonc");
|
|
@@ -6558,7 +6572,7 @@ function removeFromBunLock(packageName) {
|
|
|
6558
6572
|
return false;
|
|
6559
6573
|
}
|
|
6560
6574
|
}
|
|
6561
|
-
function invalidatePackage(packageName =
|
|
6575
|
+
function invalidatePackage(packageName = PACKAGE_NAME2) {
|
|
6562
6576
|
try {
|
|
6563
6577
|
const pkgDir = path3.join(CACHE_DIR, "node_modules", packageName);
|
|
6564
6578
|
const pkgJsonPath = path3.join(CACHE_DIR, "package.json");
|
|
@@ -6719,9 +6733,9 @@ async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
|
|
|
6719
6733
|
log("[auto-update-checker] Failed to update pinned version in config");
|
|
6720
6734
|
return;
|
|
6721
6735
|
}
|
|
6722
|
-
log(`[auto-update-checker] Config updated: ${pluginInfo.entry} \u2192 ${
|
|
6736
|
+
log(`[auto-update-checker] Config updated: ${pluginInfo.entry} \u2192 ${PACKAGE_NAME2}@${latestVersion}`);
|
|
6723
6737
|
}
|
|
6724
|
-
invalidatePackage(
|
|
6738
|
+
invalidatePackage(PACKAGE_NAME2);
|
|
6725
6739
|
const installSuccess = await runBunInstallSafe();
|
|
6726
6740
|
if (installSuccess) {
|
|
6727
6741
|
await showAutoUpdatedToast(ctx, currentVersion, latestVersion);
|
|
@@ -6866,7 +6880,7 @@ function getLocalDevPath(directory) {
|
|
|
6866
6880
|
const config = JSON.parse(stripJsonComments(content));
|
|
6867
6881
|
const plugins = config.plugin ?? [];
|
|
6868
6882
|
for (const entry of plugins) {
|
|
6869
|
-
if (entry.startsWith("file://") && entry.includes(
|
|
6883
|
+
if (entry.startsWith("file://") && entry.includes(PACKAGE_NAME2)) {
|
|
6870
6884
|
try {
|
|
6871
6885
|
return fileURLToPath(entry);
|
|
6872
6886
|
} catch {
|
|
@@ -6890,7 +6904,7 @@ function findPackageJsonUp(startPath) {
|
|
|
6890
6904
|
try {
|
|
6891
6905
|
const content = fs4.readFileSync(pkgPath, "utf-8");
|
|
6892
6906
|
const pkg = JSON.parse(content);
|
|
6893
|
-
if (pkg.name ===
|
|
6907
|
+
if (pkg.name === PACKAGE_NAME2)
|
|
6894
6908
|
return pkgPath;
|
|
6895
6909
|
} catch {}
|
|
6896
6910
|
}
|
|
@@ -6926,11 +6940,11 @@ function findPluginEntry(directory) {
|
|
|
6926
6940
|
const config = JSON.parse(stripJsonComments(content));
|
|
6927
6941
|
const plugins = config.plugin ?? [];
|
|
6928
6942
|
for (const entry of plugins) {
|
|
6929
|
-
if (entry ===
|
|
6943
|
+
if (entry === PACKAGE_NAME2) {
|
|
6930
6944
|
return { entry, isPinned: false, pinnedVersion: null, configPath };
|
|
6931
6945
|
}
|
|
6932
|
-
if (entry.startsWith(`${
|
|
6933
|
-
const pinnedVersion = entry.slice(
|
|
6946
|
+
if (entry.startsWith(`${PACKAGE_NAME2}@`)) {
|
|
6947
|
+
const pinnedVersion = entry.slice(PACKAGE_NAME2.length + 1);
|
|
6934
6948
|
const isPinned = pinnedVersion !== "latest";
|
|
6935
6949
|
return { entry, isPinned, pinnedVersion: isPinned ? pinnedVersion : null, configPath };
|
|
6936
6950
|
}
|
|
@@ -6967,7 +6981,7 @@ function getCachedVersion() {
|
|
|
6967
6981
|
function updatePinnedVersion(configPath, oldEntry, newVersion) {
|
|
6968
6982
|
try {
|
|
6969
6983
|
const content = fs4.readFileSync(configPath, "utf-8");
|
|
6970
|
-
const newEntry = `${
|
|
6984
|
+
const newEntry = `${PACKAGE_NAME2}@${newVersion}`;
|
|
6971
6985
|
const pluginMatch = content.match(/"plugin"\s*:\s*\[/);
|
|
6972
6986
|
if (!pluginMatch || pluginMatch.index === undefined) {
|
|
6973
6987
|
log(`[auto-update-checker] No "plugin" array found in ${configPath}`);
|
|
@@ -7055,88 +7069,6 @@ var init_checker = __esm(() => {
|
|
|
7055
7069
|
init_logger();
|
|
7056
7070
|
});
|
|
7057
7071
|
|
|
7058
|
-
// package.json
|
|
7059
|
-
var require_package = __commonJS((exports, module) => {
|
|
7060
|
-
module.exports = {
|
|
7061
|
-
name: "oh-my-opencode",
|
|
7062
|
-
version: "3.0.0-beta.6",
|
|
7063
|
-
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
7064
|
-
main: "dist/index.js",
|
|
7065
|
-
types: "dist/index.d.ts",
|
|
7066
|
-
type: "module",
|
|
7067
|
-
bin: {
|
|
7068
|
-
"oh-my-opencode": "./dist/cli/index.js"
|
|
7069
|
-
},
|
|
7070
|
-
files: [
|
|
7071
|
-
"dist"
|
|
7072
|
-
],
|
|
7073
|
-
exports: {
|
|
7074
|
-
".": {
|
|
7075
|
-
types: "./dist/index.d.ts",
|
|
7076
|
-
import: "./dist/index.js"
|
|
7077
|
-
},
|
|
7078
|
-
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
7079
|
-
},
|
|
7080
|
-
scripts: {
|
|
7081
|
-
build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
7082
|
-
"build:schema": "bun run script/build-schema.ts",
|
|
7083
|
-
clean: "rm -rf dist",
|
|
7084
|
-
prepublishOnly: "bun run clean && bun run build",
|
|
7085
|
-
typecheck: "tsc --noEmit",
|
|
7086
|
-
test: "bun test"
|
|
7087
|
-
},
|
|
7088
|
-
keywords: [
|
|
7089
|
-
"opencode",
|
|
7090
|
-
"plugin",
|
|
7091
|
-
"oracle",
|
|
7092
|
-
"librarian",
|
|
7093
|
-
"agents",
|
|
7094
|
-
"ai",
|
|
7095
|
-
"llm"
|
|
7096
|
-
],
|
|
7097
|
-
author: "YeonGyu-Kim",
|
|
7098
|
-
license: "SUL-1.0",
|
|
7099
|
-
repository: {
|
|
7100
|
-
type: "git",
|
|
7101
|
-
url: "git+https://github.com/code-yeongyu/oh-my-opencode.git"
|
|
7102
|
-
},
|
|
7103
|
-
bugs: {
|
|
7104
|
-
url: "https://github.com/code-yeongyu/oh-my-opencode/issues"
|
|
7105
|
-
},
|
|
7106
|
-
homepage: "https://github.com/code-yeongyu/oh-my-opencode#readme",
|
|
7107
|
-
dependencies: {
|
|
7108
|
-
"@ast-grep/cli": "^0.40.0",
|
|
7109
|
-
"@ast-grep/napi": "^0.40.0",
|
|
7110
|
-
"@clack/prompts": "^0.11.0",
|
|
7111
|
-
"@code-yeongyu/comment-checker": "^0.6.1",
|
|
7112
|
-
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
7113
|
-
"@openauthjs/openauth": "^0.4.3",
|
|
7114
|
-
"@opencode-ai/plugin": "^1.1.1",
|
|
7115
|
-
"@opencode-ai/sdk": "^1.1.1",
|
|
7116
|
-
commander: "^14.0.2",
|
|
7117
|
-
hono: "^4.10.4",
|
|
7118
|
-
"js-yaml": "^4.1.1",
|
|
7119
|
-
"jsonc-parser": "^3.3.1",
|
|
7120
|
-
open: "^11.0.0",
|
|
7121
|
-
picocolors: "^1.1.1",
|
|
7122
|
-
picomatch: "^4.0.2",
|
|
7123
|
-
"xdg-basedir": "^5.1.0",
|
|
7124
|
-
zod: "^4.1.8"
|
|
7125
|
-
},
|
|
7126
|
-
devDependencies: {
|
|
7127
|
-
"@types/js-yaml": "^4.0.9",
|
|
7128
|
-
"@types/picomatch": "^3.0.2",
|
|
7129
|
-
"bun-types": "latest",
|
|
7130
|
-
typescript: "^5.7.3"
|
|
7131
|
-
},
|
|
7132
|
-
trustedDependencies: [
|
|
7133
|
-
"@ast-grep/cli",
|
|
7134
|
-
"@ast-grep/napi",
|
|
7135
|
-
"@code-yeongyu/comment-checker"
|
|
7136
|
-
]
|
|
7137
|
-
};
|
|
7138
|
-
});
|
|
7139
|
-
|
|
7140
7072
|
// node_modules/commander/esm.mjs
|
|
7141
7073
|
var import__ = __toESM(require_commander(), 1);
|
|
7142
7074
|
var {
|
|
@@ -7736,6 +7668,103 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
|
|
|
7736
7668
|
// src/cli/install.ts
|
|
7737
7669
|
init_config_manager();
|
|
7738
7670
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
7671
|
+
// package.json
|
|
7672
|
+
var package_default = {
|
|
7673
|
+
name: "oh-my-opencode",
|
|
7674
|
+
version: "3.0.0-beta.8",
|
|
7675
|
+
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
7676
|
+
main: "dist/index.js",
|
|
7677
|
+
types: "dist/index.d.ts",
|
|
7678
|
+
type: "module",
|
|
7679
|
+
bin: {
|
|
7680
|
+
"oh-my-opencode": "./bin/oh-my-opencode.js"
|
|
7681
|
+
},
|
|
7682
|
+
files: [
|
|
7683
|
+
"dist",
|
|
7684
|
+
"bin",
|
|
7685
|
+
"postinstall.mjs"
|
|
7686
|
+
],
|
|
7687
|
+
exports: {
|
|
7688
|
+
".": {
|
|
7689
|
+
types: "./dist/index.d.ts",
|
|
7690
|
+
import: "./dist/index.js"
|
|
7691
|
+
},
|
|
7692
|
+
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
7693
|
+
},
|
|
7694
|
+
scripts: {
|
|
7695
|
+
build: "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external @ast-grep/napi && bun run build:schema",
|
|
7696
|
+
"build:all": "bun run build && bun run build:binaries",
|
|
7697
|
+
"build:binaries": "bun run script/build-binaries.ts",
|
|
7698
|
+
"build:schema": "bun run script/build-schema.ts",
|
|
7699
|
+
clean: "rm -rf dist",
|
|
7700
|
+
postinstall: "node postinstall.mjs",
|
|
7701
|
+
prepublishOnly: "bun run clean && bun run build",
|
|
7702
|
+
typecheck: "tsc --noEmit",
|
|
7703
|
+
test: "bun test"
|
|
7704
|
+
},
|
|
7705
|
+
keywords: [
|
|
7706
|
+
"opencode",
|
|
7707
|
+
"plugin",
|
|
7708
|
+
"oracle",
|
|
7709
|
+
"librarian",
|
|
7710
|
+
"agents",
|
|
7711
|
+
"ai",
|
|
7712
|
+
"llm"
|
|
7713
|
+
],
|
|
7714
|
+
author: "YeonGyu-Kim",
|
|
7715
|
+
license: "SUL-1.0",
|
|
7716
|
+
repository: {
|
|
7717
|
+
type: "git",
|
|
7718
|
+
url: "git+https://github.com/code-yeongyu/oh-my-opencode.git"
|
|
7719
|
+
},
|
|
7720
|
+
bugs: {
|
|
7721
|
+
url: "https://github.com/code-yeongyu/oh-my-opencode/issues"
|
|
7722
|
+
},
|
|
7723
|
+
homepage: "https://github.com/code-yeongyu/oh-my-opencode#readme",
|
|
7724
|
+
dependencies: {
|
|
7725
|
+
"@ast-grep/cli": "^0.40.0",
|
|
7726
|
+
"@ast-grep/napi": "^0.40.0",
|
|
7727
|
+
"@clack/prompts": "^0.11.0",
|
|
7728
|
+
"@code-yeongyu/comment-checker": "^0.6.1",
|
|
7729
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
7730
|
+
"@openauthjs/openauth": "^0.4.3",
|
|
7731
|
+
"@opencode-ai/plugin": "^1.1.19",
|
|
7732
|
+
"@opencode-ai/sdk": "^1.1.19",
|
|
7733
|
+
commander: "^14.0.2",
|
|
7734
|
+
"detect-libc": "^2.0.0",
|
|
7735
|
+
hono: "^4.10.4",
|
|
7736
|
+
"js-yaml": "^4.1.1",
|
|
7737
|
+
"jsonc-parser": "^3.3.1",
|
|
7738
|
+
open: "^11.0.0",
|
|
7739
|
+
picocolors: "^1.1.1",
|
|
7740
|
+
picomatch: "^4.0.2",
|
|
7741
|
+
"xdg-basedir": "^5.1.0",
|
|
7742
|
+
zod: "^4.1.8"
|
|
7743
|
+
},
|
|
7744
|
+
devDependencies: {
|
|
7745
|
+
"@types/js-yaml": "^4.0.9",
|
|
7746
|
+
"@types/picomatch": "^3.0.2",
|
|
7747
|
+
"bun-types": "latest",
|
|
7748
|
+
typescript: "^5.7.3"
|
|
7749
|
+
},
|
|
7750
|
+
optionalDependencies: {
|
|
7751
|
+
"oh-my-opencode-darwin-arm64": "3.0.0-beta.8",
|
|
7752
|
+
"oh-my-opencode-darwin-x64": "3.0.0-beta.8",
|
|
7753
|
+
"oh-my-opencode-linux-arm64": "3.0.0-beta.8",
|
|
7754
|
+
"oh-my-opencode-linux-arm64-musl": "3.0.0-beta.8",
|
|
7755
|
+
"oh-my-opencode-linux-x64": "3.0.0-beta.8",
|
|
7756
|
+
"oh-my-opencode-linux-x64-musl": "3.0.0-beta.8",
|
|
7757
|
+
"oh-my-opencode-windows-x64": "3.0.0-beta.8"
|
|
7758
|
+
},
|
|
7759
|
+
trustedDependencies: [
|
|
7760
|
+
"@ast-grep/cli",
|
|
7761
|
+
"@ast-grep/napi",
|
|
7762
|
+
"@code-yeongyu/comment-checker"
|
|
7763
|
+
]
|
|
7764
|
+
};
|
|
7765
|
+
|
|
7766
|
+
// src/cli/install.ts
|
|
7767
|
+
var VERSION = package_default.version;
|
|
7739
7768
|
var SYMBOLS = {
|
|
7740
7769
|
check: import_picocolors2.default.green("\u2713"),
|
|
7741
7770
|
cross: import_picocolors2.default.red("\u2717"),
|
|
@@ -7759,13 +7788,14 @@ function formatConfigSummary(config) {
|
|
|
7759
7788
|
lines.push(formatProvider("Claude", config.hasClaude, claudeDetail));
|
|
7760
7789
|
lines.push(formatProvider("ChatGPT", config.hasChatGPT));
|
|
7761
7790
|
lines.push(formatProvider("Gemini", config.hasGemini));
|
|
7791
|
+
lines.push(formatProvider("GitHub Copilot", config.hasCopilot, "fallback provider"));
|
|
7762
7792
|
lines.push("");
|
|
7763
7793
|
lines.push(import_picocolors2.default.dim("\u2500".repeat(40)));
|
|
7764
7794
|
lines.push("");
|
|
7765
7795
|
lines.push(import_picocolors2.default.bold(import_picocolors2.default.white("Agent Configuration")));
|
|
7766
7796
|
lines.push("");
|
|
7767
|
-
const sisyphusModel = config.hasClaude ? "claude-opus-4-5" : "glm-4.7-free";
|
|
7768
|
-
const oracleModel = config.hasChatGPT ? "gpt-5.2" : config.hasClaude ? "claude-opus-4-5" : "glm-4.7-free";
|
|
7797
|
+
const sisyphusModel = config.hasClaude ? "claude-opus-4-5" : config.hasCopilot ? "github-copilot/claude-opus-4.5" : "glm-4.7-free";
|
|
7798
|
+
const oracleModel = config.hasChatGPT ? "gpt-5.2" : config.hasCopilot ? "github-copilot/gpt-5.2" : config.hasClaude ? "claude-opus-4-5" : "glm-4.7-free";
|
|
7769
7799
|
const librarianModel = "glm-4.7-free";
|
|
7770
7800
|
const frontendModel = config.hasGemini ? "antigravity-gemini-3-pro-high" : config.hasClaude ? "claude-opus-4-5" : "glm-4.7-free";
|
|
7771
7801
|
lines.push(` ${SYMBOLS.bullet} Sisyphus ${SYMBOLS.arrow} ${import_picocolors2.default.cyan(sisyphusModel)}`);
|
|
@@ -7833,6 +7863,11 @@ function validateNonTuiArgs(args) {
|
|
|
7833
7863
|
} else if (!["no", "yes"].includes(args.gemini)) {
|
|
7834
7864
|
errors.push(`Invalid --gemini value: ${args.gemini} (expected: no, yes)`);
|
|
7835
7865
|
}
|
|
7866
|
+
if (args.copilot === undefined) {
|
|
7867
|
+
errors.push("--copilot is required (values: no, yes)");
|
|
7868
|
+
} else if (!["no", "yes"].includes(args.copilot)) {
|
|
7869
|
+
errors.push(`Invalid --copilot value: ${args.copilot} (expected: no, yes)`);
|
|
7870
|
+
}
|
|
7836
7871
|
return { valid: errors.length === 0, errors };
|
|
7837
7872
|
}
|
|
7838
7873
|
function argsToConfig(args) {
|
|
@@ -7840,7 +7875,8 @@ function argsToConfig(args) {
|
|
|
7840
7875
|
hasClaude: args.claude !== "no",
|
|
7841
7876
|
isMax20: args.claude === "max20",
|
|
7842
7877
|
hasChatGPT: args.chatgpt === "yes",
|
|
7843
|
-
hasGemini: args.gemini === "yes"
|
|
7878
|
+
hasGemini: args.gemini === "yes",
|
|
7879
|
+
hasCopilot: args.copilot === "yes"
|
|
7844
7880
|
};
|
|
7845
7881
|
}
|
|
7846
7882
|
function detectedToInitialValues(detected) {
|
|
@@ -7851,7 +7887,8 @@ function detectedToInitialValues(detected) {
|
|
|
7851
7887
|
return {
|
|
7852
7888
|
claude,
|
|
7853
7889
|
chatgpt: detected.hasChatGPT ? "yes" : "no",
|
|
7854
|
-
gemini: detected.hasGemini ? "yes" : "no"
|
|
7890
|
+
gemini: detected.hasGemini ? "yes" : "no",
|
|
7891
|
+
copilot: detected.hasCopilot ? "yes" : "no"
|
|
7855
7892
|
};
|
|
7856
7893
|
}
|
|
7857
7894
|
async function runTuiMode(detected) {
|
|
@@ -7893,11 +7930,24 @@ async function runTuiMode(detected) {
|
|
|
7893
7930
|
xe("Installation cancelled.");
|
|
7894
7931
|
return null;
|
|
7895
7932
|
}
|
|
7933
|
+
const copilot = await ve({
|
|
7934
|
+
message: "Do you have a GitHub Copilot subscription?",
|
|
7935
|
+
options: [
|
|
7936
|
+
{ value: "no", label: "No", hint: "Only native providers will be used" },
|
|
7937
|
+
{ value: "yes", label: "Yes", hint: "Fallback option when native providers unavailable" }
|
|
7938
|
+
],
|
|
7939
|
+
initialValue: initial.copilot
|
|
7940
|
+
});
|
|
7941
|
+
if (pD(copilot)) {
|
|
7942
|
+
xe("Installation cancelled.");
|
|
7943
|
+
return null;
|
|
7944
|
+
}
|
|
7896
7945
|
return {
|
|
7897
7946
|
hasClaude: claude !== "no",
|
|
7898
7947
|
isMax20: claude === "max20",
|
|
7899
7948
|
hasChatGPT: chatgpt === "yes",
|
|
7900
|
-
hasGemini: gemini === "yes"
|
|
7949
|
+
hasGemini: gemini === "yes",
|
|
7950
|
+
hasCopilot: copilot === "yes"
|
|
7901
7951
|
};
|
|
7902
7952
|
}
|
|
7903
7953
|
async function runNonTuiInstall(args) {
|
|
@@ -7909,7 +7959,7 @@ async function runNonTuiInstall(args) {
|
|
|
7909
7959
|
console.log(` ${SYMBOLS.bullet} ${err}`);
|
|
7910
7960
|
}
|
|
7911
7961
|
console.log();
|
|
7912
|
-
printInfo("Usage: bunx oh-my-opencode install --no-tui --claude=<no|yes|max20> --chatgpt=<no|yes> --gemini=<no|yes>");
|
|
7962
|
+
printInfo("Usage: bunx oh-my-opencode install --no-tui --claude=<no|yes|max20> --chatgpt=<no|yes> --gemini=<no|yes> --copilot=<no|yes>");
|
|
7913
7963
|
console.log();
|
|
7914
7964
|
return 1;
|
|
7915
7965
|
}
|
|
@@ -7933,13 +7983,13 @@ async function runNonTuiInstall(args) {
|
|
|
7933
7983
|
}
|
|
7934
7984
|
const config = argsToConfig(args);
|
|
7935
7985
|
printStep(step++, totalSteps, "Adding oh-my-opencode plugin...");
|
|
7936
|
-
const pluginResult = addPluginToOpenCodeConfig();
|
|
7986
|
+
const pluginResult = await addPluginToOpenCodeConfig(VERSION);
|
|
7937
7987
|
if (!pluginResult.success) {
|
|
7938
7988
|
printError(`Failed: ${pluginResult.error}`);
|
|
7939
7989
|
return 1;
|
|
7940
7990
|
}
|
|
7941
7991
|
printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors2.default.dim(pluginResult.configPath)}`);
|
|
7942
|
-
if (config.hasGemini
|
|
7992
|
+
if (config.hasGemini) {
|
|
7943
7993
|
printStep(step++, totalSteps, "Adding auth plugins...");
|
|
7944
7994
|
const authResult = await addAuthPlugins(config);
|
|
7945
7995
|
if (!authResult.success) {
|
|
@@ -7965,23 +8015,9 @@ async function runNonTuiInstall(args) {
|
|
|
7965
8015
|
}
|
|
7966
8016
|
printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors2.default.dim(omoResult.configPath)}`);
|
|
7967
8017
|
printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
7968
|
-
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
|
|
8018
|
+
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini && !config.hasCopilot) {
|
|
7969
8019
|
printWarning("No model providers configured. Using opencode/glm-4.7-free as fallback.");
|
|
7970
8020
|
}
|
|
7971
|
-
if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
|
|
7972
|
-
console.log(import_picocolors2.default.bold("Next Steps - Authenticate your providers:"));
|
|
7973
|
-
console.log();
|
|
7974
|
-
if (config.hasClaude) {
|
|
7975
|
-
console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
|
|
7976
|
-
}
|
|
7977
|
-
if (config.hasChatGPT) {
|
|
7978
|
-
console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
7979
|
-
}
|
|
7980
|
-
if (config.hasGemini) {
|
|
7981
|
-
console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
7982
|
-
}
|
|
7983
|
-
console.log();
|
|
7984
|
-
}
|
|
7985
8021
|
console.log(`${SYMBOLS.star} ${import_picocolors2.default.bold(import_picocolors2.default.green(isUpdate ? "Configuration updated!" : "Installation complete!"))}`);
|
|
7986
8022
|
console.log(` Run ${import_picocolors2.default.cyan("opencode")} to start!`);
|
|
7987
8023
|
console.log();
|
|
@@ -7993,6 +8029,13 @@ async function runNonTuiInstall(args) {
|
|
|
7993
8029
|
console.log();
|
|
7994
8030
|
console.log(import_picocolors2.default.dim("oMoMoMoMo... Enjoy!"));
|
|
7995
8031
|
console.log();
|
|
8032
|
+
if ((config.hasClaude || config.hasChatGPT || config.hasGemini || config.hasCopilot) && !args.skipAuth) {
|
|
8033
|
+
printBox(`Run ${import_picocolors2.default.cyan("opencode auth login")} and select your provider:
|
|
8034
|
+
` + (config.hasClaude ? ` ${SYMBOLS.bullet} Anthropic ${import_picocolors2.default.gray("\u2192 Claude Pro/Max")}
|
|
8035
|
+
` : "") + (config.hasChatGPT ? ` ${SYMBOLS.bullet} OpenAI ${import_picocolors2.default.gray("\u2192 ChatGPT Plus/Pro")}
|
|
8036
|
+
` : "") + (config.hasGemini ? ` ${SYMBOLS.bullet} Google ${import_picocolors2.default.gray("\u2192 OAuth with Antigravity")}
|
|
8037
|
+
` : "") + (config.hasCopilot ? ` ${SYMBOLS.bullet} GitHub ${import_picocolors2.default.gray("\u2192 Copilot")}` : ""), "\uD83D\uDD10 Authenticate Your Providers");
|
|
8038
|
+
}
|
|
7996
8039
|
return 0;
|
|
7997
8040
|
}
|
|
7998
8041
|
async function install(args) {
|
|
@@ -8022,14 +8065,14 @@ async function install(args) {
|
|
|
8022
8065
|
if (!config)
|
|
8023
8066
|
return 1;
|
|
8024
8067
|
s.start("Adding oh-my-opencode to OpenCode config");
|
|
8025
|
-
const pluginResult = addPluginToOpenCodeConfig();
|
|
8068
|
+
const pluginResult = await addPluginToOpenCodeConfig(VERSION);
|
|
8026
8069
|
if (!pluginResult.success) {
|
|
8027
8070
|
s.stop(`Failed to add plugin: ${pluginResult.error}`);
|
|
8028
8071
|
Se(import_picocolors2.default.red("Installation failed."));
|
|
8029
8072
|
return 1;
|
|
8030
8073
|
}
|
|
8031
8074
|
s.stop(`Plugin added to ${import_picocolors2.default.cyan(pluginResult.configPath)}`);
|
|
8032
|
-
if (config.hasGemini
|
|
8075
|
+
if (config.hasGemini) {
|
|
8033
8076
|
s.start("Adding auth plugins (fetching latest versions)");
|
|
8034
8077
|
const authResult = await addAuthPlugins(config);
|
|
8035
8078
|
if (!authResult.success) {
|
|
@@ -8055,24 +8098,10 @@ async function install(args) {
|
|
|
8055
8098
|
return 1;
|
|
8056
8099
|
}
|
|
8057
8100
|
s.stop(`Config written to ${import_picocolors2.default.cyan(omoResult.configPath)}`);
|
|
8058
|
-
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini) {
|
|
8101
|
+
if (!config.hasClaude && !config.hasChatGPT && !config.hasGemini && !config.hasCopilot) {
|
|
8059
8102
|
M2.warn("No model providers configured. Using opencode/glm-4.7-free as fallback.");
|
|
8060
8103
|
}
|
|
8061
8104
|
Me(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
8062
|
-
if ((config.hasClaude || config.hasChatGPT || config.hasGemini) && !args.skipAuth) {
|
|
8063
|
-
const steps = [];
|
|
8064
|
-
if (config.hasClaude) {
|
|
8065
|
-
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
|
|
8066
|
-
}
|
|
8067
|
-
if (config.hasChatGPT) {
|
|
8068
|
-
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
8069
|
-
}
|
|
8070
|
-
if (config.hasGemini) {
|
|
8071
|
-
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
8072
|
-
}
|
|
8073
|
-
Me(steps.join(`
|
|
8074
|
-
`), "Next Steps - Authenticate your providers");
|
|
8075
|
-
}
|
|
8076
8105
|
M2.success(import_picocolors2.default.bold(isUpdate ? "Configuration updated!" : "Installation complete!"));
|
|
8077
8106
|
M2.message(`Run ${import_picocolors2.default.cyan("opencode")} to start!`);
|
|
8078
8107
|
Me(`Include ${import_picocolors2.default.cyan("ultrawork")} (or ${import_picocolors2.default.cyan("ulw")}) in your prompt.
|
|
@@ -8081,6 +8110,25 @@ async function install(args) {
|
|
|
8081
8110
|
M2.message(`${import_picocolors2.default.yellow("\u2605")} If you found this helpful, consider starring the repo!`);
|
|
8082
8111
|
M2.message(` ${import_picocolors2.default.dim("gh repo star code-yeongyu/oh-my-opencode")}`);
|
|
8083
8112
|
Se(import_picocolors2.default.green("oMoMoMoMo... Enjoy!"));
|
|
8113
|
+
if ((config.hasClaude || config.hasChatGPT || config.hasGemini || config.hasCopilot) && !args.skipAuth) {
|
|
8114
|
+
const providers = [];
|
|
8115
|
+
if (config.hasClaude)
|
|
8116
|
+
providers.push(`Anthropic ${import_picocolors2.default.gray("\u2192 Claude Pro/Max")}`);
|
|
8117
|
+
if (config.hasChatGPT)
|
|
8118
|
+
providers.push(`OpenAI ${import_picocolors2.default.gray("\u2192 ChatGPT Plus/Pro")}`);
|
|
8119
|
+
if (config.hasGemini)
|
|
8120
|
+
providers.push(`Google ${import_picocolors2.default.gray("\u2192 OAuth with Antigravity")}`);
|
|
8121
|
+
if (config.hasCopilot)
|
|
8122
|
+
providers.push(`GitHub ${import_picocolors2.default.gray("\u2192 Copilot")}`);
|
|
8123
|
+
console.log();
|
|
8124
|
+
console.log(import_picocolors2.default.bold("\uD83D\uDD10 Authenticate Your Providers"));
|
|
8125
|
+
console.log();
|
|
8126
|
+
console.log(` Run ${import_picocolors2.default.cyan("opencode auth login")} and select:`);
|
|
8127
|
+
for (const provider of providers) {
|
|
8128
|
+
console.log(` ${SYMBOLS.bullet} ${provider}`);
|
|
8129
|
+
}
|
|
8130
|
+
console.log();
|
|
8131
|
+
}
|
|
8084
8132
|
return 0;
|
|
8085
8133
|
}
|
|
8086
8134
|
// node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
|
|
@@ -10135,7 +10183,7 @@ var EXIT_CODES = {
|
|
|
10135
10183
|
FAILURE: 1
|
|
10136
10184
|
};
|
|
10137
10185
|
var MIN_OPENCODE_VERSION = "1.0.150";
|
|
10138
|
-
var
|
|
10186
|
+
var PACKAGE_NAME3 = "oh-my-opencode";
|
|
10139
10187
|
var OPENCODE_BINARIES2 = ["opencode", "opencode-desktop"];
|
|
10140
10188
|
|
|
10141
10189
|
// src/cli/doctor/checks/opencode.ts
|
|
@@ -10259,7 +10307,7 @@ function detectConfigPath() {
|
|
|
10259
10307
|
}
|
|
10260
10308
|
function findPluginEntry2(plugins) {
|
|
10261
10309
|
for (const plugin of plugins) {
|
|
10262
|
-
if (plugin ===
|
|
10310
|
+
if (plugin === PACKAGE_NAME3 || plugin.startsWith(`${PACKAGE_NAME3}@`)) {
|
|
10263
10311
|
const isPinned = plugin.includes("@");
|
|
10264
10312
|
const version = isPinned ? plugin.split("@")[1] : null;
|
|
10265
10313
|
return { entry: plugin, isPinned, version };
|
|
@@ -22753,6 +22801,7 @@ var HookNameSchema = exports_external.enum([
|
|
|
22753
22801
|
"claude-code-hooks",
|
|
22754
22802
|
"auto-slash-command",
|
|
22755
22803
|
"edit-error-recovery",
|
|
22804
|
+
"sisyphus-task-retry",
|
|
22756
22805
|
"prometheus-md-only",
|
|
22757
22806
|
"start-work",
|
|
22758
22807
|
"sisyphus-orchestrator"
|
|
@@ -22849,7 +22898,6 @@ var DynamicContextPruningConfigSchema = exports_external.object({
|
|
|
22849
22898
|
"todowrite",
|
|
22850
22899
|
"todoread",
|
|
22851
22900
|
"lsp_rename",
|
|
22852
|
-
"lsp_code_action_resolve",
|
|
22853
22901
|
"session_read",
|
|
22854
22902
|
"session_write",
|
|
22855
22903
|
"session_search"
|
|
@@ -22950,8 +22998,8 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
22950
22998
|
});
|
|
22951
22999
|
// src/cli/doctor/checks/config.ts
|
|
22952
23000
|
var USER_CONFIG_DIR2 = join6(homedir4(), ".config", "opencode");
|
|
22953
|
-
var USER_CONFIG_BASE = join6(USER_CONFIG_DIR2, `${
|
|
22954
|
-
var PROJECT_CONFIG_BASE = join6(process.cwd(), ".opencode",
|
|
23001
|
+
var USER_CONFIG_BASE = join6(USER_CONFIG_DIR2, `${PACKAGE_NAME3}`);
|
|
23002
|
+
var PROJECT_CONFIG_BASE = join6(process.cwd(), ".opencode", PACKAGE_NAME3);
|
|
22955
23003
|
function findConfigPath() {
|
|
22956
23004
|
const projectDetected = detectConfigFile(PROJECT_CONFIG_BASE);
|
|
22957
23005
|
if (projectDetected.format !== "none") {
|
|
@@ -23905,15 +23953,14 @@ async function doctor(options = {}) {
|
|
|
23905
23953
|
}
|
|
23906
23954
|
|
|
23907
23955
|
// src/cli/index.ts
|
|
23908
|
-
var
|
|
23909
|
-
var VERSION = packageJson.version;
|
|
23956
|
+
var VERSION2 = package_default.version;
|
|
23910
23957
|
var program2 = new Command;
|
|
23911
|
-
program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(
|
|
23912
|
-
program2.command("install").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--chatgpt <value>", "ChatGPT subscription: no, yes").option("--gemini <value>", "Gemini integration: no, yes").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
|
|
23958
|
+
program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION2, "-v, --version", "Show version number");
|
|
23959
|
+
program2.command("install").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--chatgpt <value>", "ChatGPT subscription: no, yes").option("--gemini <value>", "Gemini integration: no, yes").option("--copilot <value>", "GitHub Copilot subscription: no, yes").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
|
|
23913
23960
|
Examples:
|
|
23914
23961
|
$ bunx oh-my-opencode install
|
|
23915
|
-
$ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
|
|
23916
|
-
$ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no
|
|
23962
|
+
$ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes --copilot=no
|
|
23963
|
+
$ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --copilot=yes
|
|
23917
23964
|
|
|
23918
23965
|
Model Providers:
|
|
23919
23966
|
Claude Required for Sisyphus (main orchestrator) and Librarian agents
|
|
@@ -23925,6 +23972,7 @@ Model Providers:
|
|
|
23925
23972
|
claude: options.claude,
|
|
23926
23973
|
chatgpt: options.chatgpt,
|
|
23927
23974
|
gemini: options.gemini,
|
|
23975
|
+
copilot: options.copilot,
|
|
23928
23976
|
skipAuth: options.skipAuth ?? false
|
|
23929
23977
|
};
|
|
23930
23978
|
const exitCode = await install(args);
|
|
@@ -23992,6 +24040,6 @@ Categories:
|
|
|
23992
24040
|
process.exit(exitCode);
|
|
23993
24041
|
});
|
|
23994
24042
|
program2.command("version").description("Show version information").action(() => {
|
|
23995
|
-
console.log(`oh-my-opencode v${
|
|
24043
|
+
console.log(`oh-my-opencode v${VERSION2}`);
|
|
23996
24044
|
});
|
|
23997
24045
|
program2.parse();
|