opencode-athena 0.10.0 → 0.10.1
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/index.js +247 -15
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1916,6 +1916,100 @@ async function generateOpencodeConfig(answers, configDir) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
};
|
|
1918
1918
|
}
|
|
1919
|
+
if (answers.subscriptions.hasGoogle && answers.subscriptions.googleAuth === "antigravity") {
|
|
1920
|
+
const existingProvider = config.provider || {};
|
|
1921
|
+
const existingGoogle = existingProvider.google || {};
|
|
1922
|
+
const existingGoogleModels = existingGoogle.models || {};
|
|
1923
|
+
config.provider = {
|
|
1924
|
+
...existingProvider,
|
|
1925
|
+
google: {
|
|
1926
|
+
...existingGoogle,
|
|
1927
|
+
models: {
|
|
1928
|
+
...existingGoogleModels,
|
|
1929
|
+
// Gemini models
|
|
1930
|
+
"gemini-3-pro-high": {
|
|
1931
|
+
name: "Gemini 3 Pro High (Antigravity)",
|
|
1932
|
+
limit: {
|
|
1933
|
+
context: 1048576,
|
|
1934
|
+
output: 65535
|
|
1935
|
+
},
|
|
1936
|
+
modalities: {
|
|
1937
|
+
input: ["text", "image", "pdf"],
|
|
1938
|
+
output: ["text"]
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
"gemini-3-pro-low": {
|
|
1942
|
+
name: "Gemini 3 Pro Low (Antigravity)",
|
|
1943
|
+
limit: {
|
|
1944
|
+
context: 1048576,
|
|
1945
|
+
output: 65535
|
|
1946
|
+
},
|
|
1947
|
+
modalities: {
|
|
1948
|
+
input: ["text", "image", "pdf"],
|
|
1949
|
+
output: ["text"]
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1952
|
+
"gemini-3-flash": {
|
|
1953
|
+
name: "Gemini 3 Flash (Antigravity)",
|
|
1954
|
+
limit: {
|
|
1955
|
+
context: 1048576,
|
|
1956
|
+
output: 65536
|
|
1957
|
+
},
|
|
1958
|
+
modalities: {
|
|
1959
|
+
input: ["text", "image", "pdf"],
|
|
1960
|
+
output: ["text"]
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
// Claude models via Antigravity
|
|
1964
|
+
"claude-sonnet-4-5": {
|
|
1965
|
+
name: "Claude Sonnet 4.5 (Antigravity)",
|
|
1966
|
+
limit: {
|
|
1967
|
+
context: 2e5,
|
|
1968
|
+
output: 64e3
|
|
1969
|
+
},
|
|
1970
|
+
modalities: {
|
|
1971
|
+
input: ["text", "image", "pdf"],
|
|
1972
|
+
output: ["text"]
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
"claude-sonnet-4-5-thinking": {
|
|
1976
|
+
name: "Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
1977
|
+
limit: {
|
|
1978
|
+
context: 2e5,
|
|
1979
|
+
output: 64e3
|
|
1980
|
+
},
|
|
1981
|
+
modalities: {
|
|
1982
|
+
input: ["text", "image", "pdf"],
|
|
1983
|
+
output: ["text"]
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
"claude-opus-4-5-thinking": {
|
|
1987
|
+
name: "Claude Opus 4.5 Thinking (Antigravity)",
|
|
1988
|
+
limit: {
|
|
1989
|
+
context: 2e5,
|
|
1990
|
+
output: 64e3
|
|
1991
|
+
},
|
|
1992
|
+
modalities: {
|
|
1993
|
+
input: ["text", "image", "pdf"],
|
|
1994
|
+
output: ["text"]
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1997
|
+
// GPT models via Antigravity
|
|
1998
|
+
"gpt-oss-120b-medium": {
|
|
1999
|
+
name: "GPT-OSS 120B Medium (Antigravity)",
|
|
2000
|
+
limit: {
|
|
2001
|
+
context: 131072,
|
|
2002
|
+
output: 32768
|
|
2003
|
+
},
|
|
2004
|
+
modalities: {
|
|
2005
|
+
input: ["text", "image", "pdf"],
|
|
2006
|
+
output: ["text"]
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
1919
2013
|
return config;
|
|
1920
2014
|
}
|
|
1921
2015
|
function getRequiredPlugins(answers) {
|
|
@@ -2131,7 +2225,9 @@ function loadExistingConfigs() {
|
|
|
2131
2225
|
athenaValid: false,
|
|
2132
2226
|
athenaVersion: null,
|
|
2133
2227
|
omo: null,
|
|
2134
|
-
omoValid: false
|
|
2228
|
+
omoValid: false,
|
|
2229
|
+
opencode: null,
|
|
2230
|
+
opencodeValid: false
|
|
2135
2231
|
};
|
|
2136
2232
|
if (existsSync(CONFIG_PATHS.globalAthenaConfig)) {
|
|
2137
2233
|
try {
|
|
@@ -2150,6 +2246,14 @@ function loadExistingConfigs() {
|
|
|
2150
2246
|
} catch {
|
|
2151
2247
|
}
|
|
2152
2248
|
}
|
|
2249
|
+
if (existsSync(CONFIG_PATHS.globalOpencodeConfig)) {
|
|
2250
|
+
try {
|
|
2251
|
+
const content = readFileSync(CONFIG_PATHS.globalOpencodeConfig, "utf-8");
|
|
2252
|
+
result.opencode = JSON.parse(content);
|
|
2253
|
+
result.opencodeValid = result.opencode !== null;
|
|
2254
|
+
} catch {
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2153
2257
|
return result;
|
|
2154
2258
|
}
|
|
2155
2259
|
function extractSubscriptions(athena) {
|
|
@@ -2265,16 +2369,20 @@ function deepMerge(baseObj, newObj) {
|
|
|
2265
2369
|
}
|
|
2266
2370
|
return result;
|
|
2267
2371
|
}
|
|
2268
|
-
function mergeConfigs(options) {
|
|
2372
|
+
function mergeConfigs(options, existingOpencode) {
|
|
2269
2373
|
const { existingAthena, fullAnswers } = options;
|
|
2270
2374
|
const freshAthena = generateAthenaConfig(fullAnswers);
|
|
2271
2375
|
const freshOmo = generateOmoConfig(fullAnswers);
|
|
2272
2376
|
const mergedAthena = deepMerge(existingAthena, freshAthena);
|
|
2273
2377
|
mergedAthena.version = VERSION;
|
|
2274
|
-
|
|
2378
|
+
const result = {
|
|
2275
2379
|
athena: mergedAthena,
|
|
2276
2380
|
omo: freshOmo
|
|
2277
2381
|
};
|
|
2382
|
+
if (existingOpencode) {
|
|
2383
|
+
result.opencode = existingOpencode;
|
|
2384
|
+
}
|
|
2385
|
+
return result;
|
|
2278
2386
|
}
|
|
2279
2387
|
function createBackups() {
|
|
2280
2388
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.TZ]/g, "-").replace(/--+/g, "-").replace(/-$/, "");
|
|
@@ -2307,6 +2415,13 @@ function writeMergedConfigs(configs) {
|
|
|
2307
2415
|
}
|
|
2308
2416
|
writeFileSync(CONFIG_PATHS.globalAthenaConfig, JSON.stringify(configs.athena, null, 2), "utf-8");
|
|
2309
2417
|
writeFileSync(CONFIG_PATHS.globalOmoConfig, JSON.stringify(configs.omo, null, 2), "utf-8");
|
|
2418
|
+
if (configs.opencode) {
|
|
2419
|
+
writeFileSync(
|
|
2420
|
+
CONFIG_PATHS.globalOpencodeConfig,
|
|
2421
|
+
JSON.stringify(configs.opencode, null, 2),
|
|
2422
|
+
"utf-8"
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2310
2425
|
}
|
|
2311
2426
|
|
|
2312
2427
|
// src/cli/utils/migrations/index.ts
|
|
@@ -2381,6 +2496,107 @@ var MIGRATIONS = [
|
|
|
2381
2496
|
}
|
|
2382
2497
|
return { ...config, features };
|
|
2383
2498
|
}
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
fromVersion: "0.10.0",
|
|
2502
|
+
toVersion: "0.10.1",
|
|
2503
|
+
description: "Add Google Antigravity provider model configurations to opencode.json",
|
|
2504
|
+
migrateOpencode: (config) => {
|
|
2505
|
+
const provider = config.provider || {};
|
|
2506
|
+
const google = provider.google || {};
|
|
2507
|
+
const models = google.models || {};
|
|
2508
|
+
if (Object.keys(models).length === 0) {
|
|
2509
|
+
return {
|
|
2510
|
+
...config,
|
|
2511
|
+
provider: {
|
|
2512
|
+
...provider,
|
|
2513
|
+
google: {
|
|
2514
|
+
...google,
|
|
2515
|
+
models: {
|
|
2516
|
+
"gemini-3-pro-high": {
|
|
2517
|
+
name: "Gemini 3 Pro High (Antigravity)",
|
|
2518
|
+
limit: {
|
|
2519
|
+
context: 1048576,
|
|
2520
|
+
output: 65535
|
|
2521
|
+
},
|
|
2522
|
+
modalities: {
|
|
2523
|
+
input: ["text", "image", "pdf"],
|
|
2524
|
+
output: ["text"]
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2527
|
+
"gemini-3-pro-low": {
|
|
2528
|
+
name: "Gemini 3 Pro Low (Antigravity)",
|
|
2529
|
+
limit: {
|
|
2530
|
+
context: 1048576,
|
|
2531
|
+
output: 65535
|
|
2532
|
+
},
|
|
2533
|
+
modalities: {
|
|
2534
|
+
input: ["text", "image", "pdf"],
|
|
2535
|
+
output: ["text"]
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
"gemini-3-flash": {
|
|
2539
|
+
name: "Gemini 3 Flash (Antigravity)",
|
|
2540
|
+
limit: {
|
|
2541
|
+
context: 1048576,
|
|
2542
|
+
output: 65536
|
|
2543
|
+
},
|
|
2544
|
+
modalities: {
|
|
2545
|
+
input: ["text", "image", "pdf"],
|
|
2546
|
+
output: ["text"]
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
"claude-sonnet-4-5": {
|
|
2550
|
+
name: "Claude Sonnet 4.5 (Antigravity)",
|
|
2551
|
+
limit: {
|
|
2552
|
+
context: 2e5,
|
|
2553
|
+
output: 64e3
|
|
2554
|
+
},
|
|
2555
|
+
modalities: {
|
|
2556
|
+
input: ["text", "image", "pdf"],
|
|
2557
|
+
output: ["text"]
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
"claude-sonnet-4-5-thinking": {
|
|
2561
|
+
name: "Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
2562
|
+
limit: {
|
|
2563
|
+
context: 2e5,
|
|
2564
|
+
output: 64e3
|
|
2565
|
+
},
|
|
2566
|
+
modalities: {
|
|
2567
|
+
input: ["text", "image", "pdf"],
|
|
2568
|
+
output: ["text"]
|
|
2569
|
+
}
|
|
2570
|
+
},
|
|
2571
|
+
"claude-opus-4-5-thinking": {
|
|
2572
|
+
name: "Claude Opus 4.5 Thinking (Antigravity)",
|
|
2573
|
+
limit: {
|
|
2574
|
+
context: 2e5,
|
|
2575
|
+
output: 64e3
|
|
2576
|
+
},
|
|
2577
|
+
modalities: {
|
|
2578
|
+
input: ["text", "image", "pdf"],
|
|
2579
|
+
output: ["text"]
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
"gpt-oss-120b-medium": {
|
|
2583
|
+
name: "GPT-OSS 120B Medium (Antigravity)",
|
|
2584
|
+
limit: {
|
|
2585
|
+
context: 131072,
|
|
2586
|
+
output: 32768
|
|
2587
|
+
},
|
|
2588
|
+
modalities: {
|
|
2589
|
+
input: ["text", "image", "pdf"],
|
|
2590
|
+
output: ["text"]
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
};
|
|
2597
|
+
}
|
|
2598
|
+
return config;
|
|
2599
|
+
}
|
|
2384
2600
|
}
|
|
2385
2601
|
];
|
|
2386
2602
|
function migrateLegacyFiles() {
|
|
@@ -2423,13 +2639,14 @@ function migrateLegacyFiles() {
|
|
|
2423
2639
|
|
|
2424
2640
|
// src/cli/utils/migrations/runner.ts
|
|
2425
2641
|
init_esm_shims();
|
|
2426
|
-
function migrateConfigs(athenaConfig, omoConfig, fromVersion) {
|
|
2642
|
+
function migrateConfigs(athenaConfig, omoConfig, fromVersion, opencodeConfig = {}) {
|
|
2427
2643
|
const targetVersion = VERSION;
|
|
2428
2644
|
const migrationsApplied = [];
|
|
2429
2645
|
const breakingChangeWarnings = [];
|
|
2430
2646
|
let hasBreakingChanges = false;
|
|
2431
2647
|
let currentAthena = { ...athenaConfig };
|
|
2432
2648
|
let currentOmo = { ...omoConfig };
|
|
2649
|
+
let currentOpencode = { ...opencodeConfig };
|
|
2433
2650
|
const normalizedFrom = semver.valid(semver.coerce(fromVersion)) || "0.0.0";
|
|
2434
2651
|
const normalizedTarget = semver.valid(semver.coerce(targetVersion)) || VERSION;
|
|
2435
2652
|
const sortedMigrations = [...MIGRATIONS].sort((a, b) => {
|
|
@@ -2447,6 +2664,9 @@ function migrateConfigs(athenaConfig, omoConfig, fromVersion) {
|
|
|
2447
2664
|
if (migration.migrateOmo) {
|
|
2448
2665
|
currentOmo = migration.migrateOmo(currentOmo);
|
|
2449
2666
|
}
|
|
2667
|
+
if (migration.migrateOpencode) {
|
|
2668
|
+
currentOpencode = migration.migrateOpencode(currentOpencode);
|
|
2669
|
+
}
|
|
2450
2670
|
migrationsApplied.push(
|
|
2451
2671
|
`${migration.fromVersion} \u2192 ${migration.toVersion}: ${migration.description}`
|
|
2452
2672
|
);
|
|
@@ -2464,6 +2684,7 @@ function migrateConfigs(athenaConfig, omoConfig, fromVersion) {
|
|
|
2464
2684
|
migrationsApplied,
|
|
2465
2685
|
athenaConfig: currentAthena,
|
|
2466
2686
|
omoConfig: currentOmo,
|
|
2687
|
+
opencodeConfig: currentOpencode,
|
|
2467
2688
|
hasBreakingChanges,
|
|
2468
2689
|
breakingChangeWarnings
|
|
2469
2690
|
};
|
|
@@ -2654,7 +2875,7 @@ function detectInstallMode(options, configs) {
|
|
|
2654
2875
|
};
|
|
2655
2876
|
}
|
|
2656
2877
|
async function runUpgradeFlow(configs, existingVersion, options) {
|
|
2657
|
-
const { athena, omo } = configs;
|
|
2878
|
+
const { athena, omo, opencode } = configs;
|
|
2658
2879
|
logger.section("Upgrading Configuration");
|
|
2659
2880
|
console.log(chalk4.cyan(`
|
|
2660
2881
|
Current version: ${existingVersion}`));
|
|
@@ -2685,7 +2906,7 @@ Current version: ${existingVersion}`));
|
|
|
2685
2906
|
console.log(chalk4.gray(` Migrated ${moved.join(", ")} to new athena/ directory`));
|
|
2686
2907
|
}
|
|
2687
2908
|
const migrationSpinner = ora4("Applying migrations...").start();
|
|
2688
|
-
const migrationResult = migrateConfigs(athena || {}, omo || {}, existingVersion);
|
|
2909
|
+
const migrationResult = migrateConfigs(athena || {}, omo || {}, existingVersion, opencode || {});
|
|
2689
2910
|
if (migrationResult.migrationsApplied.length > 0) {
|
|
2690
2911
|
migrationSpinner.succeed(`Applied ${migrationResult.migrationsApplied.length} migration(s)`);
|
|
2691
2912
|
for (const migration of migrationResult.migrationsApplied) {
|
|
@@ -2785,10 +3006,13 @@ Current version: ${existingVersion}`));
|
|
|
2785
3006
|
},
|
|
2786
3007
|
installLocation: options.local ? "local" : "global"
|
|
2787
3008
|
};
|
|
2788
|
-
const merged = mergeConfigs(
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
3009
|
+
const merged = mergeConfigs(
|
|
3010
|
+
{
|
|
3011
|
+
existingAthena: migrationResult.athenaConfig,
|
|
3012
|
+
fullAnswers
|
|
3013
|
+
},
|
|
3014
|
+
migrationResult.opencodeConfig
|
|
3015
|
+
);
|
|
2792
3016
|
const writeSpinner = ora4("Writing configuration...").start();
|
|
2793
3017
|
writeMergedConfigs(merged);
|
|
2794
3018
|
writeSpinner.succeed("Configuration files updated");
|
|
@@ -3260,7 +3484,12 @@ Current version: ${existingVersion}`));
|
|
|
3260
3484
|
console.log(chalk4.gray(` Migrated ${moved.join(", ")} to new athena/ directory`));
|
|
3261
3485
|
}
|
|
3262
3486
|
const migrationSpinner = ora4("Applying migrations...").start();
|
|
3263
|
-
const migrationResult = migrateConfigs(
|
|
3487
|
+
const migrationResult = migrateConfigs(
|
|
3488
|
+
configs.athena || {},
|
|
3489
|
+
configs.omo || {},
|
|
3490
|
+
existingVersion,
|
|
3491
|
+
configs.opencode || {}
|
|
3492
|
+
);
|
|
3264
3493
|
if (migrationResult.migrationsApplied.length > 0) {
|
|
3265
3494
|
migrationSpinner.succeed(`Applied ${migrationResult.migrationsApplied.length} migration(s)`);
|
|
3266
3495
|
for (const migration of migrationResult.migrationsApplied) {
|
|
@@ -3348,10 +3577,13 @@ Current version: ${existingVersion}`));
|
|
|
3348
3577
|
},
|
|
3349
3578
|
installLocation: "global"
|
|
3350
3579
|
};
|
|
3351
|
-
const merged = mergeConfigs(
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3580
|
+
const merged = mergeConfigs(
|
|
3581
|
+
{
|
|
3582
|
+
existingAthena: migrationResult.athenaConfig,
|
|
3583
|
+
fullAnswers
|
|
3584
|
+
},
|
|
3585
|
+
migrationResult.opencodeConfig
|
|
3586
|
+
);
|
|
3355
3587
|
const writeSpinner = ora4("Writing configuration...").start();
|
|
3356
3588
|
writeMergedConfigs(merged);
|
|
3357
3589
|
writeSpinner.succeed("Configuration files updated");
|