@reinamaccredy/oh-my-opencode 3.0.0-beta.15 → 3.0.0-beta.16
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/dist/cli/config-manager.d.ts +3 -3
- package/dist/cli/index.js +156 -349
- package/dist/cli/types.d.ts +0 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema.d.ts +215 -181
- package/dist/features/boulder-state/index.d.ts +1 -0
- package/dist/features/boulder-state/unified-state.d.ts +86 -0
- package/dist/features/workflow-engine/contracts/v1/types.d.ts +9 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/maestro-sisyphus-bridge/constants.d.ts +9 -0
- package/dist/hooks/maestro-sisyphus-bridge/index.d.ts +53 -0
- package/dist/hooks/tdd-enforcement/constants.d.ts +16 -0
- package/dist/hooks/tdd-enforcement/index.d.ts +54 -0
- package/dist/index.js +1578 -4807
- package/package.json +2 -6
- package/dist/auth/antigravity/accounts.d.ts +0 -40
- package/dist/auth/antigravity/accounts.test.d.ts +0 -1
- package/dist/auth/antigravity/browser.d.ts +0 -27
- package/dist/auth/antigravity/browser.test.d.ts +0 -1
- package/dist/auth/antigravity/cli.d.ts +0 -2
- package/dist/auth/antigravity/cli.test.d.ts +0 -1
- package/dist/auth/antigravity/constants.d.ts +0 -98
- package/dist/auth/antigravity/constants.test.d.ts +0 -1
- package/dist/auth/antigravity/fetch.d.ts +0 -69
- package/dist/auth/antigravity/index.d.ts +0 -13
- package/dist/auth/antigravity/integration.test.d.ts +0 -10
- package/dist/auth/antigravity/message-converter.d.ts +0 -54
- package/dist/auth/antigravity/oauth.d.ts +0 -51
- package/dist/auth/antigravity/oauth.test.d.ts +0 -1
- package/dist/auth/antigravity/plugin.d.ts +0 -54
- package/dist/auth/antigravity/project.d.ts +0 -10
- package/dist/auth/antigravity/request.d.ts +0 -116
- package/dist/auth/antigravity/request.test.d.ts +0 -1
- package/dist/auth/antigravity/response.d.ts +0 -137
- package/dist/auth/antigravity/storage.d.ts +0 -5
- package/dist/auth/antigravity/storage.test.d.ts +0 -1
- package/dist/auth/antigravity/thinking.d.ts +0 -278
- package/dist/auth/antigravity/thinking.test.d.ts +0 -10
- package/dist/auth/antigravity/thought-signature-store.d.ts +0 -52
- package/dist/auth/antigravity/token.d.ts +0 -38
- package/dist/auth/antigravity/token.test.d.ts +0 -1
- package/dist/auth/antigravity/tools.d.ts +0 -119
- package/dist/auth/antigravity/types.d.ts +0 -229
- package/dist/cli/commands/auth.d.ts +0 -2
- package/dist/cli/config-manager.test.d.ts +0 -1
- package/dist/google-auth.d.ts +0 -3
- package/dist/google-auth.js +0 -3871
package/dist/cli/index.js
CHANGED
|
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
2253
2253
|
var require_package = __commonJS((exports, module) => {
|
|
2254
2254
|
module.exports = {
|
|
2255
2255
|
name: "@reinamaccredy/oh-my-opencode",
|
|
2256
|
-
version: "3.0.0-beta.
|
|
2256
|
+
version: "3.0.0-beta.16",
|
|
2257
2257
|
description: "Fork of oh-my-opencode with Maestro workflow integration - Multi-Model Orchestration, Parallel Background Agents, Design Phases, and TDD Methodology",
|
|
2258
2258
|
main: "dist/index.js",
|
|
2259
2259
|
types: "dist/index.d.ts",
|
|
@@ -2270,14 +2270,10 @@ var require_package = __commonJS((exports, module) => {
|
|
|
2270
2270
|
types: "./dist/index.d.ts",
|
|
2271
2271
|
import: "./dist/index.js"
|
|
2272
2272
|
},
|
|
2273
|
-
"./google-auth": {
|
|
2274
|
-
types: "./dist/google-auth.d.ts",
|
|
2275
|
-
import: "./dist/google-auth.js"
|
|
2276
|
-
},
|
|
2277
2273
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
2278
2274
|
},
|
|
2279
2275
|
scripts: {
|
|
2280
|
-
build: "bun build src/index.ts
|
|
2276
|
+
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",
|
|
2281
2277
|
"build:schema": "bun run script/build-schema.ts",
|
|
2282
2278
|
clean: "rm -rf dist",
|
|
2283
2279
|
prepublishOnly: "bun run clean && bun run build",
|
|
@@ -5615,12 +5611,6 @@ function log(message, data) {
|
|
|
5615
5611
|
var DANGEROUS_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
5616
5612
|
// src/shared/dynamic-truncator.ts
|
|
5617
5613
|
var ANTHROPIC_ACTUAL_LIMIT = process.env.ANTHROPIC_1M_CONTEXT === "true" || process.env.VERTEX_ANTHROPIC_1M_CONTEXT === "true" ? 1e6 : 200000;
|
|
5618
|
-
// src/shared/data-path.ts
|
|
5619
|
-
import * as path2 from "path";
|
|
5620
|
-
import * as os2 from "os";
|
|
5621
|
-
function getDataDir() {
|
|
5622
|
-
return process.env.XDG_DATA_HOME ?? path2.join(os2.homedir(), ".local", "share");
|
|
5623
|
-
}
|
|
5624
5614
|
// src/shared/jsonc-parser.ts
|
|
5625
5615
|
import { existsSync, readFileSync } from "fs";
|
|
5626
5616
|
|
|
@@ -6491,8 +6481,8 @@ function detectConfigFile(basePath) {
|
|
|
6491
6481
|
}
|
|
6492
6482
|
// src/shared/opencode-config-dir.ts
|
|
6493
6483
|
import { existsSync as existsSync2 } from "fs";
|
|
6494
|
-
import { homedir
|
|
6495
|
-
import { join as
|
|
6484
|
+
import { homedir } from "os";
|
|
6485
|
+
import { join as join2 } from "path";
|
|
6496
6486
|
var TAURI_APP_IDENTIFIER = "ai.opencode.desktop";
|
|
6497
6487
|
var TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
|
|
6498
6488
|
function isDevBuild(version) {
|
|
@@ -6504,35 +6494,35 @@ function getTauriConfigDir(identifier) {
|
|
|
6504
6494
|
const platform = process.platform;
|
|
6505
6495
|
switch (platform) {
|
|
6506
6496
|
case "darwin":
|
|
6507
|
-
return
|
|
6497
|
+
return join2(homedir(), "Library", "Application Support", identifier);
|
|
6508
6498
|
case "win32": {
|
|
6509
|
-
const appData = process.env.APPDATA ||
|
|
6510
|
-
return
|
|
6499
|
+
const appData = process.env.APPDATA || join2(homedir(), "AppData", "Roaming");
|
|
6500
|
+
return join2(appData, identifier);
|
|
6511
6501
|
}
|
|
6512
6502
|
case "linux":
|
|
6513
6503
|
default: {
|
|
6514
|
-
const xdgConfig = process.env.XDG_CONFIG_HOME ||
|
|
6515
|
-
return
|
|
6504
|
+
const xdgConfig = process.env.XDG_CONFIG_HOME || join2(homedir(), ".config");
|
|
6505
|
+
return join2(xdgConfig, identifier);
|
|
6516
6506
|
}
|
|
6517
6507
|
}
|
|
6518
6508
|
}
|
|
6519
6509
|
function getCliConfigDir() {
|
|
6520
6510
|
if (process.platform === "win32") {
|
|
6521
|
-
const crossPlatformDir =
|
|
6522
|
-
const crossPlatformConfig =
|
|
6511
|
+
const crossPlatformDir = join2(homedir(), ".config", "opencode");
|
|
6512
|
+
const crossPlatformConfig = join2(crossPlatformDir, "opencode.json");
|
|
6523
6513
|
if (existsSync2(crossPlatformConfig)) {
|
|
6524
6514
|
return crossPlatformDir;
|
|
6525
6515
|
}
|
|
6526
|
-
const appData = process.env.APPDATA ||
|
|
6527
|
-
const appdataDir =
|
|
6528
|
-
const appdataConfig =
|
|
6516
|
+
const appData = process.env.APPDATA || join2(homedir(), "AppData", "Roaming");
|
|
6517
|
+
const appdataDir = join2(appData, "opencode");
|
|
6518
|
+
const appdataConfig = join2(appdataDir, "opencode.json");
|
|
6529
6519
|
if (existsSync2(appdataConfig)) {
|
|
6530
6520
|
return appdataDir;
|
|
6531
6521
|
}
|
|
6532
6522
|
return crossPlatformDir;
|
|
6533
6523
|
}
|
|
6534
|
-
const xdgConfig = process.env.XDG_CONFIG_HOME ||
|
|
6535
|
-
return
|
|
6524
|
+
const xdgConfig = process.env.XDG_CONFIG_HOME || join2(homedir(), ".config");
|
|
6525
|
+
return join2(xdgConfig, "opencode");
|
|
6536
6526
|
}
|
|
6537
6527
|
function getOpenCodeConfigDir(options) {
|
|
6538
6528
|
const { binary: binary2, version, checkExisting = true } = options;
|
|
@@ -6543,8 +6533,8 @@ function getOpenCodeConfigDir(options) {
|
|
|
6543
6533
|
const tauriDir = getTauriConfigDir(identifier);
|
|
6544
6534
|
if (checkExisting) {
|
|
6545
6535
|
const legacyDir = getCliConfigDir();
|
|
6546
|
-
const legacyConfig =
|
|
6547
|
-
const legacyConfigC =
|
|
6536
|
+
const legacyConfig = join2(legacyDir, "opencode.json");
|
|
6537
|
+
const legacyConfigC = join2(legacyDir, "opencode.jsonc");
|
|
6548
6538
|
if (existsSync2(legacyConfig) || existsSync2(legacyConfigC)) {
|
|
6549
6539
|
return legacyDir;
|
|
6550
6540
|
}
|
|
@@ -6555,10 +6545,10 @@ function getOpenCodeConfigPaths(options) {
|
|
|
6555
6545
|
const configDir = getOpenCodeConfigDir(options);
|
|
6556
6546
|
return {
|
|
6557
6547
|
configDir,
|
|
6558
|
-
configJson:
|
|
6559
|
-
configJsonc:
|
|
6560
|
-
packageJson:
|
|
6561
|
-
omoConfig:
|
|
6548
|
+
configJson: join2(configDir, "opencode.json"),
|
|
6549
|
+
configJsonc: join2(configDir, "opencode.jsonc"),
|
|
6550
|
+
packageJson: join2(configDir, "package.json"),
|
|
6551
|
+
omoConfig: join2(configDir, "oh-my-opencode.json")
|
|
6562
6552
|
};
|
|
6563
6553
|
}
|
|
6564
6554
|
// src/shared/opencode-version.ts
|
|
@@ -6643,26 +6633,26 @@ function detectConfigFormat() {
|
|
|
6643
6633
|
function isEmptyOrWhitespace(content) {
|
|
6644
6634
|
return content.trim().length === 0;
|
|
6645
6635
|
}
|
|
6646
|
-
function parseConfigWithError(
|
|
6636
|
+
function parseConfigWithError(path2) {
|
|
6647
6637
|
try {
|
|
6648
|
-
const stat = statSync(
|
|
6638
|
+
const stat = statSync(path2);
|
|
6649
6639
|
if (stat.size === 0) {
|
|
6650
|
-
return { config: null, error: `Config file is empty: ${
|
|
6640
|
+
return { config: null, error: `Config file is empty: ${path2}. Delete it or add valid JSON content.` };
|
|
6651
6641
|
}
|
|
6652
|
-
const content = readFileSync2(
|
|
6642
|
+
const content = readFileSync2(path2, "utf-8");
|
|
6653
6643
|
if (isEmptyOrWhitespace(content)) {
|
|
6654
|
-
return { config: null, error: `Config file contains only whitespace: ${
|
|
6644
|
+
return { config: null, error: `Config file contains only whitespace: ${path2}. Delete it or add valid JSON content.` };
|
|
6655
6645
|
}
|
|
6656
6646
|
const config = parseJsonc(content);
|
|
6657
6647
|
if (config === null || config === undefined) {
|
|
6658
|
-
return { config: null, error: `Config file parsed to null/undefined: ${
|
|
6648
|
+
return { config: null, error: `Config file parsed to null/undefined: ${path2}. Ensure it contains valid JSON.` };
|
|
6659
6649
|
}
|
|
6660
6650
|
if (typeof config !== "object" || Array.isArray(config)) {
|
|
6661
|
-
return { config: null, error: `Config file must contain a JSON object, not ${Array.isArray(config) ? "an array" : typeof config}: ${
|
|
6651
|
+
return { config: null, error: `Config file must contain a JSON object, not ${Array.isArray(config) ? "an array" : typeof config}: ${path2}` };
|
|
6662
6652
|
}
|
|
6663
6653
|
return { config };
|
|
6664
6654
|
} catch (err) {
|
|
6665
|
-
return { config: null, error: formatErrorWithSuggestion(err, `parse config file ${
|
|
6655
|
+
return { config: null, error: formatErrorWithSuggestion(err, `parse config file ${path2}`) };
|
|
6666
6656
|
}
|
|
6667
6657
|
}
|
|
6668
6658
|
function ensureConfigDir() {
|
|
@@ -6677,27 +6667,27 @@ function addPluginToOpenCodeConfig() {
|
|
|
6677
6667
|
} catch (err) {
|
|
6678
6668
|
return { success: false, configPath: getConfigDir(), error: formatErrorWithSuggestion(err, "create config directory") };
|
|
6679
6669
|
}
|
|
6680
|
-
const { format: format2, path:
|
|
6670
|
+
const { format: format2, path: path2 } = detectConfigFormat();
|
|
6681
6671
|
const pluginName = "oh-my-opencode";
|
|
6682
6672
|
try {
|
|
6683
6673
|
if (format2 === "none") {
|
|
6684
6674
|
const config2 = { plugin: [pluginName] };
|
|
6685
|
-
writeFileSync(
|
|
6675
|
+
writeFileSync(path2, JSON.stringify(config2, null, 2) + `
|
|
6686
6676
|
`);
|
|
6687
|
-
return { success: true, configPath:
|
|
6677
|
+
return { success: true, configPath: path2 };
|
|
6688
6678
|
}
|
|
6689
|
-
const parseResult = parseConfigWithError(
|
|
6679
|
+
const parseResult = parseConfigWithError(path2);
|
|
6690
6680
|
if (!parseResult.config) {
|
|
6691
|
-
return { success: false, configPath:
|
|
6681
|
+
return { success: false, configPath: path2, error: parseResult.error ?? "Failed to parse config file" };
|
|
6692
6682
|
}
|
|
6693
6683
|
const config = parseResult.config;
|
|
6694
6684
|
const plugins = config.plugin ?? [];
|
|
6695
6685
|
if (plugins.some((p2) => p2.startsWith(pluginName))) {
|
|
6696
|
-
return { success: true, configPath:
|
|
6686
|
+
return { success: true, configPath: path2 };
|
|
6697
6687
|
}
|
|
6698
6688
|
config.plugin = [...plugins, pluginName];
|
|
6699
6689
|
if (format2 === "jsonc") {
|
|
6700
|
-
const content = readFileSync2(
|
|
6690
|
+
const content = readFileSync2(path2, "utf-8");
|
|
6701
6691
|
const pluginArrayRegex = /"plugin"\s*:\s*\[([\s\S]*?)\]/;
|
|
6702
6692
|
const match = content.match(pluginArrayRegex);
|
|
6703
6693
|
if (match) {
|
|
@@ -6707,19 +6697,19 @@ function addPluginToOpenCodeConfig() {
|
|
|
6707
6697
|
const newContent = content.replace(pluginArrayRegex, `"plugin": [
|
|
6708
6698
|
${newArrayContent}
|
|
6709
6699
|
]`);
|
|
6710
|
-
writeFileSync(
|
|
6700
|
+
writeFileSync(path2, newContent);
|
|
6711
6701
|
} else {
|
|
6712
6702
|
const newContent = content.replace(/^(\s*\{)/, `$1
|
|
6713
6703
|
"plugin": ["${pluginName}"],`);
|
|
6714
|
-
writeFileSync(
|
|
6704
|
+
writeFileSync(path2, newContent);
|
|
6715
6705
|
}
|
|
6716
6706
|
} else {
|
|
6717
|
-
writeFileSync(
|
|
6707
|
+
writeFileSync(path2, JSON.stringify(config, null, 2) + `
|
|
6718
6708
|
`);
|
|
6719
6709
|
}
|
|
6720
|
-
return { success: true, configPath:
|
|
6710
|
+
return { success: true, configPath: path2 };
|
|
6721
6711
|
} catch (err) {
|
|
6722
|
-
return { success: false, configPath:
|
|
6712
|
+
return { success: false, configPath: path2, error: formatErrorWithSuggestion(err, "update opencode config") };
|
|
6723
6713
|
}
|
|
6724
6714
|
}
|
|
6725
6715
|
function deepMerge(target, source) {
|
|
@@ -6739,9 +6729,7 @@ function generateOmoConfig(installConfig) {
|
|
|
6739
6729
|
const config = {
|
|
6740
6730
|
$schema: "https://raw.githubusercontent.com/ReinaMacCredy/oh-my-opencode/main/assets/oh-my-opencode.schema.json"
|
|
6741
6731
|
};
|
|
6742
|
-
if (installConfig.hasProxyPal || installConfig.hasGemini) {
|
|
6743
|
-
config.google_auth = false;
|
|
6744
|
-
}
|
|
6732
|
+
if (installConfig.hasProxyPal || installConfig.hasGemini) {}
|
|
6745
6733
|
const agents = {};
|
|
6746
6734
|
if (installConfig.hasProxyPal) {
|
|
6747
6735
|
agents["Sisyphus"] = { model: "proxypal/gemini-claude-opus-4-5-thinking" };
|
|
@@ -6900,11 +6888,11 @@ async function addAuthPlugins(config) {
|
|
|
6900
6888
|
} catch (err) {
|
|
6901
6889
|
return { success: false, configPath: getConfigDir(), error: formatErrorWithSuggestion(err, "create config directory") };
|
|
6902
6890
|
}
|
|
6903
|
-
const { format: format2, path:
|
|
6891
|
+
const { format: format2, path: path2 } = detectConfigFormat();
|
|
6904
6892
|
try {
|
|
6905
6893
|
let existingConfig = null;
|
|
6906
6894
|
if (format2 !== "none") {
|
|
6907
|
-
const parseResult = parseConfigWithError(
|
|
6895
|
+
const parseResult = parseConfigWithError(path2);
|
|
6908
6896
|
if (parseResult.error && !parseResult.config) {
|
|
6909
6897
|
existingConfig = {};
|
|
6910
6898
|
} else {
|
|
@@ -6913,9 +6901,9 @@ async function addAuthPlugins(config) {
|
|
|
6913
6901
|
}
|
|
6914
6902
|
const plugins = existingConfig?.plugin ?? [];
|
|
6915
6903
|
if (config.hasGemini) {
|
|
6916
|
-
const version = await fetchLatestVersion("opencode-
|
|
6917
|
-
const pluginEntry = version ? `opencode-
|
|
6918
|
-
if (!plugins.some((p2) => p2.startsWith("opencode-
|
|
6904
|
+
const version = await fetchLatestVersion("opencode-proxypal-auth");
|
|
6905
|
+
const pluginEntry = version ? `opencode-proxypal-auth@${version}` : "opencode-proxypal-auth";
|
|
6906
|
+
if (!plugins.some((p2) => p2.startsWith("opencode-proxypal-auth"))) {
|
|
6919
6907
|
plugins.push(pluginEntry);
|
|
6920
6908
|
}
|
|
6921
6909
|
}
|
|
@@ -6925,11 +6913,11 @@ async function addAuthPlugins(config) {
|
|
|
6925
6913
|
}
|
|
6926
6914
|
}
|
|
6927
6915
|
const newConfig = { ...existingConfig ?? {}, plugin: plugins };
|
|
6928
|
-
writeFileSync(
|
|
6916
|
+
writeFileSync(path2, JSON.stringify(newConfig, null, 2) + `
|
|
6929
6917
|
`);
|
|
6930
|
-
return { success: true, configPath:
|
|
6918
|
+
return { success: true, configPath: path2 };
|
|
6931
6919
|
} catch (err) {
|
|
6932
|
-
return { success: false, configPath:
|
|
6920
|
+
return { success: false, configPath: path2, error: formatErrorWithSuggestion(err, "add auth plugins to config") };
|
|
6933
6921
|
}
|
|
6934
6922
|
}
|
|
6935
6923
|
var PROXYPAL_PROVIDER_CONFIG = {
|
|
@@ -6988,15 +6976,15 @@ var PROXYPAL_PROVIDER_CONFIG = {
|
|
|
6988
6976
|
options: { reasoningEffort: "xhigh" },
|
|
6989
6977
|
reasoning: true
|
|
6990
6978
|
},
|
|
6991
|
-
"
|
|
6992
|
-
name: "Gemini 3 Pro High (
|
|
6979
|
+
"gemini-3-pro-high": {
|
|
6980
|
+
name: "Gemini 3 Pro High (ProxyPal)",
|
|
6993
6981
|
thinking: true,
|
|
6994
6982
|
attachment: true,
|
|
6995
6983
|
limit: { context: 1048576, output: 65535 },
|
|
6996
6984
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] }
|
|
6997
6985
|
},
|
|
6998
|
-
"
|
|
6999
|
-
name: "Gemini 3 Flash (
|
|
6986
|
+
"gemini-3-flash": {
|
|
6987
|
+
name: "Gemini 3 Flash (ProxyPal)",
|
|
7000
6988
|
attachment: true,
|
|
7001
6989
|
limit: { context: 1048576, output: 65536 },
|
|
7002
6990
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] }
|
|
@@ -7008,22 +6996,22 @@ var ANTIGRAVITY_PROVIDER_CONFIG = {
|
|
|
7008
6996
|
google: {
|
|
7009
6997
|
name: "Google",
|
|
7010
6998
|
models: {
|
|
7011
|
-
"
|
|
7012
|
-
name: "Gemini 3 Pro High (
|
|
6999
|
+
"gemini-3-pro-high": {
|
|
7000
|
+
name: "Gemini 3 Pro High (ProxyPal)",
|
|
7013
7001
|
thinking: true,
|
|
7014
7002
|
attachment: true,
|
|
7015
7003
|
limit: { context: 1048576, output: 65535 },
|
|
7016
7004
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] }
|
|
7017
7005
|
},
|
|
7018
|
-
"
|
|
7019
|
-
name: "Gemini 3 Pro Low (
|
|
7006
|
+
"gemini-3-pro-low": {
|
|
7007
|
+
name: "Gemini 3 Pro Low (ProxyPal)",
|
|
7020
7008
|
thinking: true,
|
|
7021
7009
|
attachment: true,
|
|
7022
7010
|
limit: { context: 1048576, output: 65535 },
|
|
7023
7011
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] }
|
|
7024
7012
|
},
|
|
7025
|
-
"
|
|
7026
|
-
name: "Gemini 3 Flash (
|
|
7013
|
+
"gemini-3-flash": {
|
|
7014
|
+
name: "Gemini 3 Flash (ProxyPal)",
|
|
7027
7015
|
attachment: true,
|
|
7028
7016
|
limit: { context: 1048576, output: 65536 },
|
|
7029
7017
|
modalities: { input: ["text", "image", "pdf"], output: ["text"] }
|
|
@@ -7085,11 +7073,11 @@ function addProviderConfig(config) {
|
|
|
7085
7073
|
} catch (err) {
|
|
7086
7074
|
return { success: false, configPath: getConfigDir(), error: formatErrorWithSuggestion(err, "create config directory") };
|
|
7087
7075
|
}
|
|
7088
|
-
const { format: format2, path:
|
|
7076
|
+
const { format: format2, path: path2 } = detectConfigFormat();
|
|
7089
7077
|
try {
|
|
7090
7078
|
let existingConfig = null;
|
|
7091
7079
|
if (format2 !== "none") {
|
|
7092
|
-
const parseResult = parseConfigWithError(
|
|
7080
|
+
const parseResult = parseConfigWithError(path2);
|
|
7093
7081
|
if (parseResult.error && !parseResult.config) {
|
|
7094
7082
|
existingConfig = {};
|
|
7095
7083
|
} else {
|
|
@@ -7110,11 +7098,11 @@ function addProviderConfig(config) {
|
|
|
7110
7098
|
if (Object.keys(providers).length > 0) {
|
|
7111
7099
|
newConfig.provider = providers;
|
|
7112
7100
|
}
|
|
7113
|
-
writeFileSync(
|
|
7101
|
+
writeFileSync(path2, JSON.stringify(newConfig, null, 2) + `
|
|
7114
7102
|
`);
|
|
7115
|
-
return { success: true, configPath:
|
|
7103
|
+
return { success: true, configPath: path2 };
|
|
7116
7104
|
} catch (err) {
|
|
7117
|
-
return { success: false, configPath:
|
|
7105
|
+
return { success: false, configPath: path2, error: formatErrorWithSuggestion(err, "add provider config") };
|
|
7118
7106
|
}
|
|
7119
7107
|
}
|
|
7120
7108
|
function detectCurrentConfig() {
|
|
@@ -7126,11 +7114,11 @@ function detectCurrentConfig() {
|
|
|
7126
7114
|
hasChatGPT: true,
|
|
7127
7115
|
hasGemini: false
|
|
7128
7116
|
};
|
|
7129
|
-
const { format: format2, path:
|
|
7117
|
+
const { format: format2, path: path2 } = detectConfigFormat();
|
|
7130
7118
|
if (format2 === "none") {
|
|
7131
7119
|
return result;
|
|
7132
7120
|
}
|
|
7133
|
-
const parseResult = parseConfigWithError(
|
|
7121
|
+
const parseResult = parseConfigWithError(path2);
|
|
7134
7122
|
if (!parseResult.config) {
|
|
7135
7123
|
return result;
|
|
7136
7124
|
}
|
|
@@ -7140,7 +7128,7 @@ function detectCurrentConfig() {
|
|
|
7140
7128
|
if (!result.isInstalled) {
|
|
7141
7129
|
return result;
|
|
7142
7130
|
}
|
|
7143
|
-
result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-
|
|
7131
|
+
result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-proxypal-auth"));
|
|
7144
7132
|
result.hasChatGPT = plugins.some((p2) => p2.startsWith("opencode-openai-codex-auth"));
|
|
7145
7133
|
const omoConfigPath = getOmoConfig();
|
|
7146
7134
|
if (!existsSync3(omoConfigPath)) {
|
|
@@ -7180,9 +7168,6 @@ function detectCurrentConfig() {
|
|
|
7180
7168
|
} else if (agents["oracle"]?.model === "opencode/glm-4.7-free") {
|
|
7181
7169
|
result.hasChatGPT = false;
|
|
7182
7170
|
}
|
|
7183
|
-
if (omoConfig.google_auth === false) {
|
|
7184
|
-
result.hasGemini = plugins.some((p2) => p2.startsWith("opencode-antigravity-auth"));
|
|
7185
|
-
}
|
|
7186
7171
|
} catch {}
|
|
7187
7172
|
return result;
|
|
7188
7173
|
}
|
|
@@ -7217,7 +7202,6 @@ function formatConfigSummary(config) {
|
|
|
7217
7202
|
const claudeDetail = config.hasClaude ? config.isMax20 ? "max20" : "standard" : undefined;
|
|
7218
7203
|
lines.push(formatProvider("Claude", config.hasClaude, claudeDetail));
|
|
7219
7204
|
lines.push(formatProvider("ChatGPT", config.hasChatGPT));
|
|
7220
|
-
lines.push(formatProvider("Gemini", config.hasGemini));
|
|
7221
7205
|
}
|
|
7222
7206
|
lines.push("");
|
|
7223
7207
|
lines.push(import_picocolors2.default.dim("\u2500".repeat(40)));
|
|
@@ -7233,12 +7217,6 @@ function formatConfigSummary(config) {
|
|
|
7233
7217
|
oracleModel = "gpt-5.2-codex";
|
|
7234
7218
|
librarianModel = "gemini-claude-opus-4-5-thinking";
|
|
7235
7219
|
frontendModel = "gemini-3-pro-preview";
|
|
7236
|
-
} else if (config.hasGemini) {
|
|
7237
|
-
sisyphusModel = "gemini-claude-opus-4-5-thinking";
|
|
7238
|
-
oracleModel = config.hasChatGPT ? "gpt-5.2-codex" : config.hasClaude ? "claude-opus-4-5" : "glm-4.7-free";
|
|
7239
|
-
librarianModel = "gemini-claude-opus-4-5-thinking";
|
|
7240
|
-
frontendModel = "gemini-3-pro-preview";
|
|
7241
|
-
} else if (config.hasClaude) {
|
|
7242
7220
|
sisyphusModel = "claude-opus-4-5";
|
|
7243
7221
|
oracleModel = config.hasChatGPT ? "gpt-5.2-codex" : "claude-opus-4-5";
|
|
7244
7222
|
librarianModel = "claude-sonnet-4-5";
|
|
@@ -7315,11 +7293,6 @@ function validateNonTuiArgs(args) {
|
|
|
7315
7293
|
} else if (!["no", "yes"].includes(args.chatgpt)) {
|
|
7316
7294
|
errors.push(`Invalid --chatgpt value: ${args.chatgpt} (expected: no, yes)`);
|
|
7317
7295
|
}
|
|
7318
|
-
if (args.gemini === undefined) {
|
|
7319
|
-
errors.push("--gemini is required (values: no, yes)");
|
|
7320
|
-
} else if (!["no", "yes"].includes(args.gemini)) {
|
|
7321
|
-
errors.push(`Invalid --gemini value: ${args.gemini} (expected: no, yes)`);
|
|
7322
|
-
}
|
|
7323
7296
|
return { valid: errors.length === 0, errors };
|
|
7324
7297
|
}
|
|
7325
7298
|
function argsToConfig(args) {
|
|
@@ -7337,7 +7310,7 @@ function argsToConfig(args) {
|
|
|
7337
7310
|
hasClaude: args.claude !== "no",
|
|
7338
7311
|
isMax20: args.claude === "max20",
|
|
7339
7312
|
hasChatGPT: args.chatgpt === "yes",
|
|
7340
|
-
hasGemini:
|
|
7313
|
+
hasGemini: false
|
|
7341
7314
|
};
|
|
7342
7315
|
}
|
|
7343
7316
|
function detectedToInitialValues(detected) {
|
|
@@ -7348,8 +7321,7 @@ function detectedToInitialValues(detected) {
|
|
|
7348
7321
|
return {
|
|
7349
7322
|
proxypal: detected.hasProxyPal ? "yes" : "no",
|
|
7350
7323
|
claude,
|
|
7351
|
-
chatgpt: detected.hasChatGPT ? "yes" : "no"
|
|
7352
|
-
gemini: detected.hasGemini ? "yes" : "no"
|
|
7324
|
+
chatgpt: detected.hasChatGPT ? "yes" : "no"
|
|
7353
7325
|
};
|
|
7354
7326
|
}
|
|
7355
7327
|
async function runTuiMode(detected) {
|
|
@@ -7400,24 +7372,12 @@ async function runTuiMode(detected) {
|
|
|
7400
7372
|
xe("Installation cancelled.");
|
|
7401
7373
|
return null;
|
|
7402
7374
|
}
|
|
7403
|
-
const gemini = await ve({
|
|
7404
|
-
message: "Will you integrate Google Gemini?",
|
|
7405
|
-
options: [
|
|
7406
|
-
{ value: "no", label: "No", hint: "Frontend/docs agents will use fallback" },
|
|
7407
|
-
{ value: "yes", label: "Yes", hint: "Beautiful UI generation with Gemini 3 Pro" }
|
|
7408
|
-
],
|
|
7409
|
-
initialValue: initial.gemini
|
|
7410
|
-
});
|
|
7411
|
-
if (pD(gemini)) {
|
|
7412
|
-
xe("Installation cancelled.");
|
|
7413
|
-
return null;
|
|
7414
|
-
}
|
|
7415
7375
|
return {
|
|
7416
7376
|
hasProxyPal: false,
|
|
7417
7377
|
hasClaude: claude !== "no",
|
|
7418
7378
|
isMax20: claude === "max20",
|
|
7419
7379
|
hasChatGPT: chatgpt === "yes",
|
|
7420
|
-
hasGemini:
|
|
7380
|
+
hasGemini: false
|
|
7421
7381
|
};
|
|
7422
7382
|
}
|
|
7423
7383
|
async function runNonTuiInstall(args) {
|
|
@@ -7430,7 +7390,7 @@ async function runNonTuiInstall(args) {
|
|
|
7430
7390
|
}
|
|
7431
7391
|
console.log();
|
|
7432
7392
|
printInfo("Usage: bunx oh-my-opencode install --no-tui --proxypal=yes");
|
|
7433
|
-
printInfo(" or: bunx oh-my-opencode install --no-tui --claude=<no|yes|max20> --chatgpt=<no|yes>
|
|
7393
|
+
printInfo(" or: bunx oh-my-opencode install --no-tui --claude=<no|yes|max20> --chatgpt=<no|yes>");
|
|
7434
7394
|
console.log();
|
|
7435
7395
|
return 1;
|
|
7436
7396
|
}
|
|
@@ -7453,7 +7413,7 @@ async function runNonTuiInstall(args) {
|
|
|
7453
7413
|
if (initial.proxypal === "yes") {
|
|
7454
7414
|
printInfo(`Current config: ProxyPal=yes`);
|
|
7455
7415
|
} else {
|
|
7456
|
-
printInfo(`Current config: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}
|
|
7416
|
+
printInfo(`Current config: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}`);
|
|
7457
7417
|
}
|
|
7458
7418
|
}
|
|
7459
7419
|
const config = argsToConfig(args);
|
|
@@ -7473,7 +7433,7 @@ async function runNonTuiInstall(args) {
|
|
|
7473
7433
|
}
|
|
7474
7434
|
printSuccess(`ProxyPal configured ${SYMBOLS.arrow} ${import_picocolors2.default.dim(providerResult.configPath)}`);
|
|
7475
7435
|
step += 1;
|
|
7476
|
-
} else if (config.
|
|
7436
|
+
} else if (config.hasChatGPT) {
|
|
7477
7437
|
printStep(step++, totalSteps, "Adding auth plugins...");
|
|
7478
7438
|
const authResult = await addAuthPlugins(config);
|
|
7479
7439
|
if (!authResult.success) {
|
|
@@ -7499,7 +7459,7 @@ async function runNonTuiInstall(args) {
|
|
|
7499
7459
|
}
|
|
7500
7460
|
printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors2.default.dim(omoResult.configPath)}`);
|
|
7501
7461
|
printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
7502
|
-
if (!config.hasProxyPal && !config.hasClaude && !config.hasChatGPT
|
|
7462
|
+
if (!config.hasProxyPal && !config.hasClaude && !config.hasChatGPT) {
|
|
7503
7463
|
printWarning("No model providers configured. Using opencode/glm-4.7-free as fallback.");
|
|
7504
7464
|
}
|
|
7505
7465
|
if (config.hasProxyPal && !args.skipAuth) {
|
|
@@ -7508,7 +7468,7 @@ async function runNonTuiInstall(args) {
|
|
|
7508
7468
|
console.log(` ${SYMBOLS.arrow} Start ProxyPal and ensure proxy is running on ${import_picocolors2.default.cyan("http://localhost:8317")}`);
|
|
7509
7469
|
console.log(` ${SYMBOLS.arrow} Authenticate your providers in ProxyPal app`);
|
|
7510
7470
|
console.log();
|
|
7511
|
-
} else if ((config.hasClaude || config.hasChatGPT
|
|
7471
|
+
} else if ((config.hasClaude || config.hasChatGPT) && !args.skipAuth) {
|
|
7512
7472
|
console.log(import_picocolors2.default.bold("Next Steps - Authenticate your providers:"));
|
|
7513
7473
|
console.log();
|
|
7514
7474
|
if (config.hasClaude) {
|
|
@@ -7517,9 +7477,6 @@ async function runNonTuiInstall(args) {
|
|
|
7517
7477
|
if (config.hasChatGPT) {
|
|
7518
7478
|
console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
7519
7479
|
}
|
|
7520
|
-
if (config.hasGemini) {
|
|
7521
|
-
console.log(` ${SYMBOLS.arrow} ${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
7522
|
-
}
|
|
7523
7480
|
console.log();
|
|
7524
7481
|
}
|
|
7525
7482
|
console.log(`${SYMBOLS.star} ${import_picocolors2.default.bold(import_picocolors2.default.green(isUpdate ? "Configuration updated!" : "Installation complete!"))}`);
|
|
@@ -7547,7 +7504,7 @@ async function install(args) {
|
|
|
7547
7504
|
if (initial.proxypal === "yes") {
|
|
7548
7505
|
M2.info(`Existing configuration detected: ProxyPal=yes`);
|
|
7549
7506
|
} else {
|
|
7550
|
-
M2.info(`Existing configuration detected: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}
|
|
7507
|
+
M2.info(`Existing configuration detected: Claude=${initial.claude}, ChatGPT=${initial.chatgpt}`);
|
|
7551
7508
|
}
|
|
7552
7509
|
}
|
|
7553
7510
|
const s = Y2();
|
|
@@ -7582,7 +7539,7 @@ async function install(args) {
|
|
|
7582
7539
|
return 1;
|
|
7583
7540
|
}
|
|
7584
7541
|
s.stop(`ProxyPal configured to ${import_picocolors2.default.cyan(providerResult.configPath)}`);
|
|
7585
|
-
} else if (config.
|
|
7542
|
+
} else if (config.hasChatGPT) {
|
|
7586
7543
|
s.start("Adding auth plugins (fetching latest versions)");
|
|
7587
7544
|
const authResult = await addAuthPlugins(config);
|
|
7588
7545
|
if (!authResult.success) {
|
|
@@ -7608,7 +7565,7 @@ async function install(args) {
|
|
|
7608
7565
|
return 1;
|
|
7609
7566
|
}
|
|
7610
7567
|
s.stop(`Config written to ${import_picocolors2.default.cyan(omoResult.configPath)}`);
|
|
7611
|
-
if (!config.hasProxyPal && !config.hasClaude && !config.hasChatGPT
|
|
7568
|
+
if (!config.hasProxyPal && !config.hasClaude && !config.hasChatGPT) {
|
|
7612
7569
|
M2.warn("No model providers configured. Using opencode/glm-4.7-free as fallback.");
|
|
7613
7570
|
}
|
|
7614
7571
|
Me(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
@@ -7619,7 +7576,7 @@ async function install(args) {
|
|
|
7619
7576
|
];
|
|
7620
7577
|
Me(steps.join(`
|
|
7621
7578
|
`), "Next Steps - Configure ProxyPal");
|
|
7622
|
-
} else if ((config.hasClaude || config.hasChatGPT
|
|
7579
|
+
} else if ((config.hasClaude || config.hasChatGPT) && !args.skipAuth) {
|
|
7623
7580
|
const steps = [];
|
|
7624
7581
|
if (config.hasClaude) {
|
|
7625
7582
|
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Anthropic \u2192 Claude Pro/Max)")}`);
|
|
@@ -7627,9 +7584,6 @@ async function install(args) {
|
|
|
7627
7584
|
if (config.hasChatGPT) {
|
|
7628
7585
|
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select OpenAI \u2192 ChatGPT Plus/Pro)")}`);
|
|
7629
7586
|
}
|
|
7630
|
-
if (config.hasGemini) {
|
|
7631
|
-
steps.push(`${import_picocolors2.default.dim("opencode auth login")} ${import_picocolors2.default.gray("(select Google \u2192 OAuth with Antigravity)")}`);
|
|
7632
|
-
}
|
|
7633
7587
|
Me(steps.join(`
|
|
7634
7588
|
`), "Next Steps - Authenticate your providers");
|
|
7635
7589
|
}
|
|
@@ -7877,7 +7831,7 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
|
|
|
7877
7831
|
|
|
7878
7832
|
// node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
|
|
7879
7833
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
7880
|
-
var defaultPathSerializer = ({ path:
|
|
7834
|
+
var defaultPathSerializer = ({ path: path2, url: _url }) => {
|
|
7881
7835
|
let url = _url;
|
|
7882
7836
|
const matches = _url.match(PATH_PARAM_RE);
|
|
7883
7837
|
if (matches) {
|
|
@@ -7896,7 +7850,7 @@ var defaultPathSerializer = ({ path: path3, url: _url }) => {
|
|
|
7896
7850
|
name = name.substring(1);
|
|
7897
7851
|
style = "matrix";
|
|
7898
7852
|
}
|
|
7899
|
-
const value =
|
|
7853
|
+
const value = path2[name];
|
|
7900
7854
|
if (value === undefined || value === null) {
|
|
7901
7855
|
continue;
|
|
7902
7856
|
}
|
|
@@ -7927,11 +7881,11 @@ var defaultPathSerializer = ({ path: path3, url: _url }) => {
|
|
|
7927
7881
|
}
|
|
7928
7882
|
return url;
|
|
7929
7883
|
};
|
|
7930
|
-
var getUrl = ({ baseUrl, path:
|
|
7884
|
+
var getUrl = ({ baseUrl, path: path2, query, querySerializer, url: _url }) => {
|
|
7931
7885
|
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
7932
7886
|
let url = (baseUrl ?? "") + pathUrl;
|
|
7933
|
-
if (
|
|
7934
|
-
url = defaultPathSerializer({ path:
|
|
7887
|
+
if (path2) {
|
|
7888
|
+
url = defaultPathSerializer({ path: path2, url });
|
|
7935
7889
|
}
|
|
7936
7890
|
let search = query ? querySerializer(query) : "";
|
|
7937
7891
|
if (search.startsWith("?")) {
|
|
@@ -9443,49 +9397,49 @@ All tasks completed.`));
|
|
|
9443
9397
|
}
|
|
9444
9398
|
// src/hooks/auto-update-checker/checker.ts
|
|
9445
9399
|
import * as fs3 from "fs";
|
|
9446
|
-
import * as
|
|
9400
|
+
import * as path3 from "path";
|
|
9447
9401
|
import { fileURLToPath } from "url";
|
|
9448
9402
|
|
|
9449
9403
|
// src/hooks/auto-update-checker/constants.ts
|
|
9450
|
-
import * as
|
|
9451
|
-
import * as
|
|
9404
|
+
import * as path2 from "path";
|
|
9405
|
+
import * as os2 from "os";
|
|
9452
9406
|
import * as fs2 from "fs";
|
|
9453
9407
|
var PACKAGE_NAME = "oh-my-opencode";
|
|
9454
9408
|
var NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME}/dist-tags`;
|
|
9455
9409
|
var NPM_FETCH_TIMEOUT = 5000;
|
|
9456
9410
|
function getCacheDir() {
|
|
9457
9411
|
if (process.platform === "win32") {
|
|
9458
|
-
return
|
|
9412
|
+
return path2.join(process.env.LOCALAPPDATA ?? os2.homedir(), "opencode");
|
|
9459
9413
|
}
|
|
9460
|
-
return
|
|
9414
|
+
return path2.join(os2.homedir(), ".cache", "opencode");
|
|
9461
9415
|
}
|
|
9462
9416
|
var CACHE_DIR = getCacheDir();
|
|
9463
|
-
var VERSION_FILE =
|
|
9464
|
-
var INSTALLED_PACKAGE_JSON =
|
|
9417
|
+
var VERSION_FILE = path2.join(CACHE_DIR, "version");
|
|
9418
|
+
var INSTALLED_PACKAGE_JSON = path2.join(CACHE_DIR, "node_modules", PACKAGE_NAME, "package.json");
|
|
9465
9419
|
function getUserConfigDir() {
|
|
9466
9420
|
if (process.platform === "win32") {
|
|
9467
|
-
const crossPlatformDir =
|
|
9468
|
-
const appdataDir = process.env.APPDATA ??
|
|
9469
|
-
const crossPlatformConfig =
|
|
9470
|
-
const crossPlatformConfigJsonc =
|
|
9421
|
+
const crossPlatformDir = path2.join(os2.homedir(), ".config");
|
|
9422
|
+
const appdataDir = process.env.APPDATA ?? path2.join(os2.homedir(), "AppData", "Roaming");
|
|
9423
|
+
const crossPlatformConfig = path2.join(crossPlatformDir, "opencode", "opencode.json");
|
|
9424
|
+
const crossPlatformConfigJsonc = path2.join(crossPlatformDir, "opencode", "opencode.jsonc");
|
|
9471
9425
|
if (fs2.existsSync(crossPlatformConfig) || fs2.existsSync(crossPlatformConfigJsonc)) {
|
|
9472
9426
|
return crossPlatformDir;
|
|
9473
9427
|
}
|
|
9474
9428
|
return appdataDir;
|
|
9475
9429
|
}
|
|
9476
|
-
return process.env.XDG_CONFIG_HOME ??
|
|
9430
|
+
return process.env.XDG_CONFIG_HOME ?? path2.join(os2.homedir(), ".config");
|
|
9477
9431
|
}
|
|
9478
9432
|
function getWindowsAppdataDir() {
|
|
9479
9433
|
if (process.platform !== "win32")
|
|
9480
9434
|
return null;
|
|
9481
|
-
return process.env.APPDATA ??
|
|
9435
|
+
return process.env.APPDATA ?? path2.join(os2.homedir(), "AppData", "Roaming");
|
|
9482
9436
|
}
|
|
9483
9437
|
var USER_CONFIG_DIR = getUserConfigDir();
|
|
9484
|
-
var USER_OPENCODE_CONFIG =
|
|
9485
|
-
var USER_OPENCODE_CONFIG_JSONC =
|
|
9438
|
+
var USER_OPENCODE_CONFIG = path2.join(USER_CONFIG_DIR, "opencode", "opencode.json");
|
|
9439
|
+
var USER_OPENCODE_CONFIG_JSONC = path2.join(USER_CONFIG_DIR, "opencode", "opencode.jsonc");
|
|
9486
9440
|
|
|
9487
9441
|
// src/hooks/auto-update-checker/checker.ts
|
|
9488
|
-
import * as
|
|
9442
|
+
import * as os3 from "os";
|
|
9489
9443
|
function isLocalDevMode(directory) {
|
|
9490
9444
|
return getLocalDevPath(directory) !== null;
|
|
9491
9445
|
}
|
|
@@ -9494,18 +9448,18 @@ function stripJsonComments(json2) {
|
|
|
9494
9448
|
}
|
|
9495
9449
|
function getConfigPaths(directory) {
|
|
9496
9450
|
const paths = [
|
|
9497
|
-
|
|
9498
|
-
|
|
9451
|
+
path3.join(directory, ".opencode", "opencode.json"),
|
|
9452
|
+
path3.join(directory, ".opencode", "opencode.jsonc"),
|
|
9499
9453
|
USER_OPENCODE_CONFIG,
|
|
9500
9454
|
USER_OPENCODE_CONFIG_JSONC
|
|
9501
9455
|
];
|
|
9502
9456
|
if (process.platform === "win32") {
|
|
9503
|
-
const crossPlatformDir =
|
|
9457
|
+
const crossPlatformDir = path3.join(os3.homedir(), ".config");
|
|
9504
9458
|
const appdataDir = getWindowsAppdataDir();
|
|
9505
9459
|
if (appdataDir) {
|
|
9506
9460
|
const alternateDir = USER_CONFIG_DIR === crossPlatformDir ? appdataDir : crossPlatformDir;
|
|
9507
|
-
const alternateConfig =
|
|
9508
|
-
const alternateConfigJsonc =
|
|
9461
|
+
const alternateConfig = path3.join(alternateDir, "opencode", "opencode.json");
|
|
9462
|
+
const alternateConfigJsonc = path3.join(alternateDir, "opencode", "opencode.jsonc");
|
|
9509
9463
|
if (!paths.includes(alternateConfig)) {
|
|
9510
9464
|
paths.push(alternateConfig);
|
|
9511
9465
|
}
|
|
@@ -9542,9 +9496,9 @@ function getLocalDevPath(directory) {
|
|
|
9542
9496
|
function findPackageJsonUp(startPath) {
|
|
9543
9497
|
try {
|
|
9544
9498
|
const stat = fs3.statSync(startPath);
|
|
9545
|
-
let dir = stat.isDirectory() ? startPath :
|
|
9499
|
+
let dir = stat.isDirectory() ? startPath : path3.dirname(startPath);
|
|
9546
9500
|
for (let i2 = 0;i2 < 10; i2++) {
|
|
9547
|
-
const pkgPath =
|
|
9501
|
+
const pkgPath = path3.join(dir, "package.json");
|
|
9548
9502
|
if (fs3.existsSync(pkgPath)) {
|
|
9549
9503
|
try {
|
|
9550
9504
|
const content = fs3.readFileSync(pkgPath, "utf-8");
|
|
@@ -9553,7 +9507,7 @@ function findPackageJsonUp(startPath) {
|
|
|
9553
9507
|
return pkgPath;
|
|
9554
9508
|
} catch {}
|
|
9555
9509
|
}
|
|
9556
|
-
const parent =
|
|
9510
|
+
const parent = path3.dirname(dir);
|
|
9557
9511
|
if (parent === dir)
|
|
9558
9512
|
break;
|
|
9559
9513
|
dir = parent;
|
|
@@ -9595,7 +9549,7 @@ function getCachedVersion() {
|
|
|
9595
9549
|
}
|
|
9596
9550
|
} catch {}
|
|
9597
9551
|
try {
|
|
9598
|
-
const currentDir =
|
|
9552
|
+
const currentDir = path3.dirname(fileURLToPath(import.meta.url));
|
|
9599
9553
|
const pkgPath = findPackageJsonUp(currentDir);
|
|
9600
9554
|
if (pkgPath) {
|
|
9601
9555
|
const content = fs3.readFileSync(pkgPath, "utf-8");
|
|
@@ -10052,8 +10006,8 @@ function getPluginCheckDefinition() {
|
|
|
10052
10006
|
|
|
10053
10007
|
// src/cli/doctor/checks/config.ts
|
|
10054
10008
|
import { existsSync as existsSync7, readFileSync as readFileSync5 } from "fs";
|
|
10055
|
-
import { homedir as
|
|
10056
|
-
import { join as
|
|
10009
|
+
import { homedir as homedir4 } from "os";
|
|
10010
|
+
import { join as join5 } from "path";
|
|
10057
10011
|
|
|
10058
10012
|
// node_modules/zod/v4/classic/external.js
|
|
10059
10013
|
var exports_external = {};
|
|
@@ -10784,10 +10738,10 @@ function mergeDefs(...defs) {
|
|
|
10784
10738
|
function cloneDef(schema2) {
|
|
10785
10739
|
return mergeDefs(schema2._zod.def);
|
|
10786
10740
|
}
|
|
10787
|
-
function getElementAtPath(obj,
|
|
10788
|
-
if (!
|
|
10741
|
+
function getElementAtPath(obj, path4) {
|
|
10742
|
+
if (!path4)
|
|
10789
10743
|
return obj;
|
|
10790
|
-
return
|
|
10744
|
+
return path4.reduce((acc, key) => acc?.[key], obj);
|
|
10791
10745
|
}
|
|
10792
10746
|
function promiseAllObject(promisesObj) {
|
|
10793
10747
|
const keys = Object.keys(promisesObj);
|
|
@@ -11146,11 +11100,11 @@ function aborted(x2, startIndex = 0) {
|
|
|
11146
11100
|
}
|
|
11147
11101
|
return false;
|
|
11148
11102
|
}
|
|
11149
|
-
function prefixIssues(
|
|
11103
|
+
function prefixIssues(path4, issues) {
|
|
11150
11104
|
return issues.map((iss) => {
|
|
11151
11105
|
var _a;
|
|
11152
11106
|
(_a = iss).path ?? (_a.path = []);
|
|
11153
|
-
iss.path.unshift(
|
|
11107
|
+
iss.path.unshift(path4);
|
|
11154
11108
|
return iss;
|
|
11155
11109
|
});
|
|
11156
11110
|
}
|
|
@@ -11318,7 +11272,7 @@ function treeifyError(error, _mapper) {
|
|
|
11318
11272
|
return issue2.message;
|
|
11319
11273
|
};
|
|
11320
11274
|
const result = { errors: [] };
|
|
11321
|
-
const processError = (error2,
|
|
11275
|
+
const processError = (error2, path4 = []) => {
|
|
11322
11276
|
var _a, _b;
|
|
11323
11277
|
for (const issue2 of error2.issues) {
|
|
11324
11278
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -11328,7 +11282,7 @@ function treeifyError(error, _mapper) {
|
|
|
11328
11282
|
} else if (issue2.code === "invalid_element") {
|
|
11329
11283
|
processError({ issues: issue2.issues }, issue2.path);
|
|
11330
11284
|
} else {
|
|
11331
|
-
const fullpath = [...
|
|
11285
|
+
const fullpath = [...path4, ...issue2.path];
|
|
11332
11286
|
if (fullpath.length === 0) {
|
|
11333
11287
|
result.errors.push(mapper(issue2));
|
|
11334
11288
|
continue;
|
|
@@ -11360,8 +11314,8 @@ function treeifyError(error, _mapper) {
|
|
|
11360
11314
|
}
|
|
11361
11315
|
function toDotPath(_path) {
|
|
11362
11316
|
const segs = [];
|
|
11363
|
-
const
|
|
11364
|
-
for (const seg of
|
|
11317
|
+
const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
11318
|
+
for (const seg of path4) {
|
|
11365
11319
|
if (typeof seg === "number")
|
|
11366
11320
|
segs.push(`[${seg}]`);
|
|
11367
11321
|
else if (typeof seg === "symbol")
|
|
@@ -22451,7 +22405,9 @@ var HookNameSchema = exports_external.enum([
|
|
|
22451
22405
|
"edit-error-recovery",
|
|
22452
22406
|
"prometheus-md-only",
|
|
22453
22407
|
"start-work",
|
|
22454
|
-
"sisyphus-orchestrator"
|
|
22408
|
+
"sisyphus-orchestrator",
|
|
22409
|
+
"maestro-sisyphus-bridge",
|
|
22410
|
+
"tdd-enforcement"
|
|
22455
22411
|
]);
|
|
22456
22412
|
var BuiltinCommandNameSchema = exports_external.enum([
|
|
22457
22413
|
"init-deep",
|
|
@@ -22621,6 +22577,18 @@ var GitMasterConfigSchema = exports_external.object({
|
|
|
22621
22577
|
commit_footer: exports_external.boolean().default(true),
|
|
22622
22578
|
include_co_authored_by: exports_external.boolean().default(true)
|
|
22623
22579
|
});
|
|
22580
|
+
var MaestroConfigSchema = exports_external.object({
|
|
22581
|
+
autoExecute: exports_external.boolean().default(false),
|
|
22582
|
+
useDesignPhases: exports_external.boolean().default(true),
|
|
22583
|
+
useTracking: exports_external.boolean().default(true),
|
|
22584
|
+
preferredExecutionMode: exports_external.enum(["maestro", "sisyphus"]).default("maestro"),
|
|
22585
|
+
enforceTdd: exports_external.boolean().default(false),
|
|
22586
|
+
tddGates: exports_external.object({
|
|
22587
|
+
requireFailingTest: exports_external.boolean().default(true),
|
|
22588
|
+
requirePassingTest: exports_external.boolean().default(true),
|
|
22589
|
+
runFullSuiteAfterRefactor: exports_external.boolean().default(true)
|
|
22590
|
+
}).optional()
|
|
22591
|
+
});
|
|
22624
22592
|
var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
22625
22593
|
$schema: exports_external.string().optional(),
|
|
22626
22594
|
disabled_mcps: exports_external.array(AnyMcpNameSchema).optional(),
|
|
@@ -22631,7 +22599,6 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
22631
22599
|
agents: AgentOverridesSchema.optional(),
|
|
22632
22600
|
categories: CategoriesConfigSchema.optional(),
|
|
22633
22601
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
22634
|
-
google_auth: exports_external.boolean().optional(),
|
|
22635
22602
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
22636
22603
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
22637
22604
|
experimental: ExperimentalConfigSchema.optional(),
|
|
@@ -22640,12 +22607,13 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
22640
22607
|
ralph_loop: RalphLoopConfigSchema.optional(),
|
|
22641
22608
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
22642
22609
|
notification: NotificationConfigSchema.optional(),
|
|
22643
|
-
git_master: GitMasterConfigSchema.optional()
|
|
22610
|
+
git_master: GitMasterConfigSchema.optional(),
|
|
22611
|
+
maestro: MaestroConfigSchema.optional()
|
|
22644
22612
|
});
|
|
22645
22613
|
// src/cli/doctor/checks/config.ts
|
|
22646
|
-
var USER_CONFIG_DIR2 =
|
|
22647
|
-
var USER_CONFIG_BASE =
|
|
22648
|
-
var PROJECT_CONFIG_BASE =
|
|
22614
|
+
var USER_CONFIG_DIR2 = join5(homedir4(), ".config", "opencode");
|
|
22615
|
+
var USER_CONFIG_BASE = join5(USER_CONFIG_DIR2, `${PACKAGE_NAME2}`);
|
|
22616
|
+
var PROJECT_CONFIG_BASE = join5(process.cwd(), ".opencode", PACKAGE_NAME2);
|
|
22649
22617
|
function findConfigPath() {
|
|
22650
22618
|
const projectDetected = detectConfigFile(PROJECT_CONFIG_BASE);
|
|
22651
22619
|
if (projectDetected.format !== "none") {
|
|
@@ -22743,15 +22711,15 @@ function getConfigCheckDefinition() {
|
|
|
22743
22711
|
|
|
22744
22712
|
// src/cli/doctor/checks/auth.ts
|
|
22745
22713
|
import { existsSync as existsSync8, readFileSync as readFileSync6 } from "fs";
|
|
22746
|
-
import { homedir as
|
|
22747
|
-
import { join as
|
|
22748
|
-
var OPENCODE_CONFIG_DIR =
|
|
22749
|
-
var OPENCODE_JSON =
|
|
22750
|
-
var OPENCODE_JSONC =
|
|
22714
|
+
import { homedir as homedir5 } from "os";
|
|
22715
|
+
import { join as join6 } from "path";
|
|
22716
|
+
var OPENCODE_CONFIG_DIR = join6(homedir5(), ".config", "opencode");
|
|
22717
|
+
var OPENCODE_JSON = join6(OPENCODE_CONFIG_DIR, "opencode.json");
|
|
22718
|
+
var OPENCODE_JSONC = join6(OPENCODE_CONFIG_DIR, "opencode.jsonc");
|
|
22751
22719
|
var AUTH_PLUGINS = {
|
|
22752
22720
|
anthropic: { plugin: "builtin", name: "Anthropic (Claude)" },
|
|
22753
22721
|
openai: { plugin: "opencode-openai-codex-auth", name: "OpenAI (ChatGPT)" },
|
|
22754
|
-
google: { plugin: "opencode-
|
|
22722
|
+
google: { plugin: "opencode-proxypal-auth", name: "Google (Gemini)" }
|
|
22755
22723
|
};
|
|
22756
22724
|
function getOpenCodeConfig() {
|
|
22757
22725
|
const configPath = existsSync8(OPENCODE_JSONC) ? OPENCODE_JSONC : OPENCODE_JSON;
|
|
@@ -23188,13 +23156,13 @@ function getLspCheckDefinition() {
|
|
|
23188
23156
|
|
|
23189
23157
|
// src/cli/doctor/checks/mcp.ts
|
|
23190
23158
|
import { existsSync as existsSync9, readFileSync as readFileSync7 } from "fs";
|
|
23191
|
-
import { homedir as
|
|
23192
|
-
import { join as
|
|
23159
|
+
import { homedir as homedir6 } from "os";
|
|
23160
|
+
import { join as join7 } from "path";
|
|
23193
23161
|
var BUILTIN_MCP_SERVERS = ["context7", "grep_app"];
|
|
23194
23162
|
var MCP_CONFIG_PATHS = [
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
|
|
23163
|
+
join7(homedir6(), ".claude", ".mcp.json"),
|
|
23164
|
+
join7(process.cwd(), ".mcp.json"),
|
|
23165
|
+
join7(process.cwd(), ".claude", ".mcp.json")
|
|
23198
23166
|
];
|
|
23199
23167
|
function loadUserMcpConfig() {
|
|
23200
23168
|
const servers = {};
|
|
@@ -23593,151 +23561,17 @@ async function doctor(options = {}) {
|
|
|
23593
23561
|
return result.exitCode;
|
|
23594
23562
|
}
|
|
23595
23563
|
|
|
23596
|
-
// src/auth/antigravity/storage.ts
|
|
23597
|
-
import { promises as fs4 } from "fs";
|
|
23598
|
-
import { join as join9, dirname as dirname2 } from "path";
|
|
23599
|
-
function getDataDir2() {
|
|
23600
|
-
return join9(getDataDir(), "opencode");
|
|
23601
|
-
}
|
|
23602
|
-
function getStoragePath() {
|
|
23603
|
-
return join9(getDataDir2(), "oh-my-opencode-accounts.json");
|
|
23604
|
-
}
|
|
23605
|
-
async function loadAccounts(path5) {
|
|
23606
|
-
const storagePath = path5 ?? getStoragePath();
|
|
23607
|
-
try {
|
|
23608
|
-
const content = await fs4.readFile(storagePath, "utf-8");
|
|
23609
|
-
const data = JSON.parse(content);
|
|
23610
|
-
if (!isValidAccountStorage(data)) {
|
|
23611
|
-
return null;
|
|
23612
|
-
}
|
|
23613
|
-
return data;
|
|
23614
|
-
} catch (error45) {
|
|
23615
|
-
const errorCode = error45.code;
|
|
23616
|
-
if (errorCode === "ENOENT") {
|
|
23617
|
-
return null;
|
|
23618
|
-
}
|
|
23619
|
-
if (error45 instanceof SyntaxError) {
|
|
23620
|
-
return null;
|
|
23621
|
-
}
|
|
23622
|
-
throw error45;
|
|
23623
|
-
}
|
|
23624
|
-
}
|
|
23625
|
-
async function saveAccounts(storage, path5) {
|
|
23626
|
-
const storagePath = path5 ?? getStoragePath();
|
|
23627
|
-
await fs4.mkdir(dirname2(storagePath), { recursive: true });
|
|
23628
|
-
const content = JSON.stringify(storage, null, 2);
|
|
23629
|
-
const tempPath = `${storagePath}.tmp.${process.pid}.${Date.now()}`;
|
|
23630
|
-
await fs4.writeFile(tempPath, content, { encoding: "utf-8", mode: 384 });
|
|
23631
|
-
try {
|
|
23632
|
-
await fs4.rename(tempPath, storagePath);
|
|
23633
|
-
} catch (error45) {
|
|
23634
|
-
await fs4.unlink(tempPath).catch(() => {});
|
|
23635
|
-
throw error45;
|
|
23636
|
-
}
|
|
23637
|
-
}
|
|
23638
|
-
function isValidAccountStorage(data) {
|
|
23639
|
-
if (typeof data !== "object" || data === null) {
|
|
23640
|
-
return false;
|
|
23641
|
-
}
|
|
23642
|
-
const obj = data;
|
|
23643
|
-
if (typeof obj.version !== "number") {
|
|
23644
|
-
return false;
|
|
23645
|
-
}
|
|
23646
|
-
if (!Array.isArray(obj.accounts)) {
|
|
23647
|
-
return false;
|
|
23648
|
-
}
|
|
23649
|
-
if (typeof obj.activeIndex !== "number") {
|
|
23650
|
-
return false;
|
|
23651
|
-
}
|
|
23652
|
-
return true;
|
|
23653
|
-
}
|
|
23654
|
-
|
|
23655
|
-
// src/cli/commands/auth.ts
|
|
23656
|
-
async function listAccounts() {
|
|
23657
|
-
const accounts = await loadAccounts();
|
|
23658
|
-
if (!accounts || accounts.accounts.length === 0) {
|
|
23659
|
-
console.log("No accounts found.");
|
|
23660
|
-
console.log("Run 'opencode auth login' and select Google (Antigravity) to add accounts.");
|
|
23661
|
-
return 0;
|
|
23662
|
-
}
|
|
23663
|
-
console.log(`
|
|
23664
|
-
Google Antigravity Accounts (${accounts.accounts.length}/10):
|
|
23665
|
-
`);
|
|
23666
|
-
for (let i2 = 0;i2 < accounts.accounts.length; i2++) {
|
|
23667
|
-
const acc = accounts.accounts[i2];
|
|
23668
|
-
const isActive = i2 === accounts.activeIndex;
|
|
23669
|
-
const activeMarker = isActive ? "* " : " ";
|
|
23670
|
-
console.log(`${activeMarker}[${i2}] ${acc.email || "Unknown"}`);
|
|
23671
|
-
console.log(` Tier: ${acc.tier || "free"}`);
|
|
23672
|
-
const rateLimits = acc.rateLimits || {};
|
|
23673
|
-
const now = Date.now();
|
|
23674
|
-
const limited = [];
|
|
23675
|
-
if (rateLimits.claude && rateLimits.claude > now) {
|
|
23676
|
-
const mins = Math.ceil((rateLimits.claude - now) / 60000);
|
|
23677
|
-
limited.push(`claude (${mins}m)`);
|
|
23678
|
-
}
|
|
23679
|
-
if (rateLimits["gemini-flash"] && rateLimits["gemini-flash"] > now) {
|
|
23680
|
-
const mins = Math.ceil((rateLimits["gemini-flash"] - now) / 60000);
|
|
23681
|
-
limited.push(`gemini-flash (${mins}m)`);
|
|
23682
|
-
}
|
|
23683
|
-
if (rateLimits["gemini-pro"] && rateLimits["gemini-pro"] > now) {
|
|
23684
|
-
const mins = Math.ceil((rateLimits["gemini-pro"] - now) / 60000);
|
|
23685
|
-
limited.push(`gemini-pro (${mins}m)`);
|
|
23686
|
-
}
|
|
23687
|
-
if (limited.length > 0) {
|
|
23688
|
-
console.log(` Rate limited: ${limited.join(", ")}`);
|
|
23689
|
-
}
|
|
23690
|
-
console.log();
|
|
23691
|
-
}
|
|
23692
|
-
return 0;
|
|
23693
|
-
}
|
|
23694
|
-
async function removeAccount(indexOrEmail) {
|
|
23695
|
-
const accounts = await loadAccounts();
|
|
23696
|
-
if (!accounts || accounts.accounts.length === 0) {
|
|
23697
|
-
console.error("No accounts found.");
|
|
23698
|
-
return 1;
|
|
23699
|
-
}
|
|
23700
|
-
let index;
|
|
23701
|
-
const parsedIndex = Number(indexOrEmail);
|
|
23702
|
-
if (Number.isInteger(parsedIndex) && String(parsedIndex) === indexOrEmail) {
|
|
23703
|
-
index = parsedIndex;
|
|
23704
|
-
} else {
|
|
23705
|
-
index = accounts.accounts.findIndex((acc) => acc.email === indexOrEmail);
|
|
23706
|
-
if (index === -1) {
|
|
23707
|
-
console.error(`Account not found: ${indexOrEmail}`);
|
|
23708
|
-
return 1;
|
|
23709
|
-
}
|
|
23710
|
-
}
|
|
23711
|
-
if (index < 0 || index >= accounts.accounts.length) {
|
|
23712
|
-
console.error(`Invalid index: ${index}. Valid range: 0-${accounts.accounts.length - 1}`);
|
|
23713
|
-
return 1;
|
|
23714
|
-
}
|
|
23715
|
-
const removed = accounts.accounts[index];
|
|
23716
|
-
accounts.accounts.splice(index, 1);
|
|
23717
|
-
if (accounts.accounts.length === 0) {
|
|
23718
|
-
accounts.activeIndex = -1;
|
|
23719
|
-
} else if (accounts.activeIndex >= accounts.accounts.length) {
|
|
23720
|
-
accounts.activeIndex = accounts.accounts.length - 1;
|
|
23721
|
-
} else if (accounts.activeIndex > index) {
|
|
23722
|
-
accounts.activeIndex--;
|
|
23723
|
-
}
|
|
23724
|
-
await saveAccounts(accounts);
|
|
23725
|
-
console.log(`Removed account: ${removed.email || "Unknown"} (index ${index})`);
|
|
23726
|
-
console.log(`Remaining accounts: ${accounts.accounts.length}`);
|
|
23727
|
-
return 0;
|
|
23728
|
-
}
|
|
23729
|
-
|
|
23730
23564
|
// src/cli/index.ts
|
|
23731
23565
|
var packageJson = await Promise.resolve().then(() => __toESM(require_package(), 1));
|
|
23732
23566
|
var VERSION = packageJson.version;
|
|
23733
23567
|
var program2 = new Command;
|
|
23734
23568
|
program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION, "-v, --version", "Show version number");
|
|
23735
|
-
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("--proxypal <value>", "ProxyPal proxy: no, yes (if yes, skips claude/chatgpt
|
|
23569
|
+
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("--proxypal <value>", "ProxyPal proxy: no, yes (if yes, skips claude/chatgpt)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--chatgpt <value>", "ChatGPT subscription: no, yes").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
|
|
23736
23570
|
Examples:
|
|
23737
23571
|
$ bunx oh-my-opencode install
|
|
23738
23572
|
$ bunx oh-my-opencode install --no-tui --proxypal=yes
|
|
23739
|
-
$ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes
|
|
23740
|
-
$ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no
|
|
23573
|
+
$ bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes
|
|
23574
|
+
$ bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no
|
|
23741
23575
|
|
|
23742
23576
|
Model Providers:
|
|
23743
23577
|
ProxyPal Use ProxyPal proxy for all models (github.com/heyhuynhgiabuu/proxypal)
|
|
@@ -23750,7 +23584,6 @@ Model Providers:
|
|
|
23750
23584
|
proxypal: options.proxypal,
|
|
23751
23585
|
claude: options.claude,
|
|
23752
23586
|
chatgpt: options.chatgpt,
|
|
23753
|
-
gemini: options.gemini,
|
|
23754
23587
|
skipAuth: options.skipAuth ?? false
|
|
23755
23588
|
};
|
|
23756
23589
|
const exitCode = await install(args);
|
|
@@ -23817,32 +23650,6 @@ Categories:
|
|
|
23817
23650
|
const exitCode = await doctor(doctorOptions);
|
|
23818
23651
|
process.exit(exitCode);
|
|
23819
23652
|
});
|
|
23820
|
-
var authCommand = program2.command("auth").description("Manage Google Antigravity accounts");
|
|
23821
|
-
authCommand.command("list").description("List all Google Antigravity accounts").addHelpText("after", `
|
|
23822
|
-
Examples:
|
|
23823
|
-
$ bunx oh-my-opencode auth list
|
|
23824
|
-
|
|
23825
|
-
Shows:
|
|
23826
|
-
- Account index and email
|
|
23827
|
-
- Account tier (free/paid)
|
|
23828
|
-
- Active account (marked with *)
|
|
23829
|
-
- Rate limit status per model family
|
|
23830
|
-
`).action(async () => {
|
|
23831
|
-
const exitCode = await listAccounts();
|
|
23832
|
-
process.exit(exitCode);
|
|
23833
|
-
});
|
|
23834
|
-
authCommand.command("remove <index-or-email>").description("Remove an account by index or email").addHelpText("after", `
|
|
23835
|
-
Examples:
|
|
23836
|
-
$ bunx oh-my-opencode auth remove 0
|
|
23837
|
-
$ bunx oh-my-opencode auth remove user@example.com
|
|
23838
|
-
|
|
23839
|
-
Note:
|
|
23840
|
-
- Use 'auth list' to see account indices
|
|
23841
|
-
- Removing the active account will switch to the next available account
|
|
23842
|
-
`).action(async (indexOrEmail) => {
|
|
23843
|
-
const exitCode = await removeAccount(indexOrEmail);
|
|
23844
|
-
process.exit(exitCode);
|
|
23845
|
-
});
|
|
23846
23653
|
program2.command("version").description("Show version information").action(() => {
|
|
23847
23654
|
console.log(`oh-my-opencode v${VERSION}`);
|
|
23848
23655
|
});
|