@cortexkit/opencode-antigravity-auth 3.0.0 → 3.0.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/README.md +5 -3
- package/dist/cli.js +38 -33
- package/dist/cli.js.map +2 -2
- package/dist/cli.meta.json +33 -12
- package/dist/index.js +339 -67
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +49 -20
- package/dist/server.js +339 -67
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +49 -20
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +39 -5
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +13 -4
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/server.meta.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"format": "esm"
|
|
28
28
|
},
|
|
29
29
|
"../core/dist/account-migration.js": {
|
|
30
|
-
"bytes":
|
|
30
|
+
"bytes": 113389,
|
|
31
31
|
"imports": [
|
|
32
32
|
{
|
|
33
33
|
"path": "node:crypto",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"format": "esm"
|
|
115
115
|
},
|
|
116
116
|
"../core/dist/fingerprint.js": {
|
|
117
|
-
"bytes":
|
|
117
|
+
"bytes": 5094,
|
|
118
118
|
"imports": [
|
|
119
119
|
{
|
|
120
120
|
"path": "node:crypto",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"format": "esm"
|
|
126
126
|
},
|
|
127
127
|
"../core/dist/model-registry.js": {
|
|
128
|
-
"bytes":
|
|
128
|
+
"bytes": 19492,
|
|
129
129
|
"imports": [],
|
|
130
130
|
"format": "esm"
|
|
131
131
|
},
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"format": "esm"
|
|
316
316
|
},
|
|
317
317
|
"../core/dist/agy-request-metadata.js": {
|
|
318
|
-
"bytes":
|
|
318
|
+
"bytes": 6733,
|
|
319
319
|
"imports": [
|
|
320
320
|
{
|
|
321
321
|
"path": "node:buffer",
|
|
@@ -326,6 +326,11 @@
|
|
|
326
326
|
"path": "node:crypto",
|
|
327
327
|
"kind": "import-statement",
|
|
328
328
|
"external": true
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"path": "../core/dist/model-registry.js",
|
|
332
|
+
"kind": "import-statement",
|
|
333
|
+
"original": "./model-registry.js"
|
|
329
334
|
}
|
|
330
335
|
],
|
|
331
336
|
"format": "esm"
|
|
@@ -2383,8 +2388,19 @@
|
|
|
2383
2388
|
],
|
|
2384
2389
|
"format": "esm"
|
|
2385
2390
|
},
|
|
2391
|
+
"../core/dist/transform/agy-generation.js": {
|
|
2392
|
+
"bytes": 1183,
|
|
2393
|
+
"imports": [
|
|
2394
|
+
{
|
|
2395
|
+
"path": "../core/dist/model-registry.js",
|
|
2396
|
+
"kind": "import-statement",
|
|
2397
|
+
"original": "../model-registry.js"
|
|
2398
|
+
}
|
|
2399
|
+
],
|
|
2400
|
+
"format": "esm"
|
|
2401
|
+
},
|
|
2386
2402
|
"../core/dist/transform/claude.js": {
|
|
2387
|
-
"bytes":
|
|
2403
|
+
"bytes": 12294,
|
|
2388
2404
|
"imports": [
|
|
2389
2405
|
{
|
|
2390
2406
|
"path": "../core/dist/constants.js",
|
|
@@ -2416,7 +2432,7 @@
|
|
|
2416
2432
|
"format": "esm"
|
|
2417
2433
|
},
|
|
2418
2434
|
"../core/dist/transform/model-resolver.js": {
|
|
2419
|
-
"bytes":
|
|
2435
|
+
"bytes": 19732,
|
|
2420
2436
|
"imports": [
|
|
2421
2437
|
{
|
|
2422
2438
|
"path": "../core/dist/model-registry.js",
|
|
@@ -2427,8 +2443,13 @@
|
|
|
2427
2443
|
"format": "esm"
|
|
2428
2444
|
},
|
|
2429
2445
|
"../core/dist/transform/index.js": {
|
|
2430
|
-
"bytes":
|
|
2446
|
+
"bytes": 1236,
|
|
2431
2447
|
"imports": [
|
|
2448
|
+
{
|
|
2449
|
+
"path": "../core/dist/transform/agy-generation.js",
|
|
2450
|
+
"kind": "import-statement",
|
|
2451
|
+
"original": "./agy-generation.js"
|
|
2452
|
+
},
|
|
2432
2453
|
{
|
|
2433
2454
|
"path": "../core/dist/transform/claude.js",
|
|
2434
2455
|
"kind": "import-statement",
|
|
@@ -3624,13 +3645,18 @@
|
|
|
3624
3645
|
"format": "esm"
|
|
3625
3646
|
},
|
|
3626
3647
|
"src/plugin/request.ts": {
|
|
3627
|
-
"bytes":
|
|
3648
|
+
"bytes": 106635,
|
|
3628
3649
|
"imports": [
|
|
3629
3650
|
{
|
|
3630
3651
|
"path": "node:crypto",
|
|
3631
3652
|
"kind": "import-statement",
|
|
3632
3653
|
"external": true
|
|
3633
3654
|
},
|
|
3655
|
+
{
|
|
3656
|
+
"path": "../core/dist/index.js",
|
|
3657
|
+
"kind": "import-statement",
|
|
3658
|
+
"original": "@cortexkit/antigravity-auth-core"
|
|
3659
|
+
},
|
|
3634
3660
|
{
|
|
3635
3661
|
"path": "src/constants.ts",
|
|
3636
3662
|
"kind": "import-statement",
|
|
@@ -3810,7 +3836,7 @@
|
|
|
3810
3836
|
"format": "esm"
|
|
3811
3837
|
},
|
|
3812
3838
|
"src/plugin/shared/request-services.ts": {
|
|
3813
|
-
"bytes":
|
|
3839
|
+
"bytes": 111623,
|
|
3814
3840
|
"imports": [
|
|
3815
3841
|
{
|
|
3816
3842
|
"path": "../core/dist/index.js",
|
|
@@ -5650,7 +5676,7 @@
|
|
|
5650
5676
|
"imports": [],
|
|
5651
5677
|
"exports": [],
|
|
5652
5678
|
"inputs": {},
|
|
5653
|
-
"bytes":
|
|
5679
|
+
"bytes": 4292798
|
|
5654
5680
|
},
|
|
5655
5681
|
"dist/server.js": {
|
|
5656
5682
|
"imports": [
|
|
@@ -6819,7 +6845,7 @@
|
|
|
6819
6845
|
"bytesInOutput": 73115
|
|
6820
6846
|
},
|
|
6821
6847
|
"../core/dist/account-migration.js": {
|
|
6822
|
-
"bytesInOutput":
|
|
6848
|
+
"bytesInOutput": 94853
|
|
6823
6849
|
},
|
|
6824
6850
|
"../core/dist/account-repository-types.js": {
|
|
6825
6851
|
"bytesInOutput": 1238
|
|
@@ -6828,10 +6854,10 @@
|
|
|
6828
6854
|
"bytesInOutput": 17047
|
|
6829
6855
|
},
|
|
6830
6856
|
"../core/dist/fingerprint.js": {
|
|
6831
|
-
"bytesInOutput":
|
|
6857
|
+
"bytesInOutput": 2701
|
|
6832
6858
|
},
|
|
6833
6859
|
"../core/dist/model-registry.js": {
|
|
6834
|
-
"bytesInOutput":
|
|
6860
|
+
"bytesInOutput": 17310
|
|
6835
6861
|
},
|
|
6836
6862
|
"../core/dist/rotation.js": {
|
|
6837
6863
|
"bytesInOutput": 9911
|
|
@@ -6858,7 +6884,7 @@
|
|
|
6858
6884
|
"bytesInOutput": 1005
|
|
6859
6885
|
},
|
|
6860
6886
|
"../core/dist/agy-request-metadata.js": {
|
|
6861
|
-
"bytesInOutput":
|
|
6887
|
+
"bytesInOutput": 5900
|
|
6862
6888
|
},
|
|
6863
6889
|
"../core/dist/agy-transport.js": {
|
|
6864
6890
|
"bytesInOutput": 15027
|
|
@@ -6890,12 +6916,15 @@
|
|
|
6890
6916
|
"../core/dist/quota-manager.js": {
|
|
6891
6917
|
"bytesInOutput": 19084
|
|
6892
6918
|
},
|
|
6893
|
-
"../core/dist/transform/
|
|
6894
|
-
"bytesInOutput":
|
|
6919
|
+
"../core/dist/transform/agy-generation.js": {
|
|
6920
|
+
"bytesInOutput": 705
|
|
6895
6921
|
},
|
|
6896
6922
|
"../core/dist/transform/index.js": {
|
|
6897
6923
|
"bytesInOutput": 0
|
|
6898
6924
|
},
|
|
6925
|
+
"../core/dist/transform/claude.js": {
|
|
6926
|
+
"bytesInOutput": 1985
|
|
6927
|
+
},
|
|
6899
6928
|
"../core/dist/transform/gemini.js": {
|
|
6900
6929
|
"bytesInOutput": 11421
|
|
6901
6930
|
},
|
|
@@ -6903,7 +6932,7 @@
|
|
|
6903
6932
|
"bytesInOutput": 3214
|
|
6904
6933
|
},
|
|
6905
6934
|
"../core/dist/transform/model-resolver.js": {
|
|
6906
|
-
"bytesInOutput":
|
|
6935
|
+
"bytesInOutput": 10571
|
|
6907
6936
|
},
|
|
6908
6937
|
"../core/dist/vault-family.js": {
|
|
6909
6938
|
"bytesInOutput": 696
|
|
@@ -7008,7 +7037,7 @@
|
|
|
7008
7037
|
"bytesInOutput": 32189
|
|
7009
7038
|
},
|
|
7010
7039
|
"src/plugin/request.ts": {
|
|
7011
|
-
"bytesInOutput":
|
|
7040
|
+
"bytesInOutput": 73360
|
|
7012
7041
|
},
|
|
7013
7042
|
"src/plugin/cache.ts": {
|
|
7014
7043
|
"bytesInOutput": 9117
|
|
@@ -7083,7 +7112,7 @@
|
|
|
7083
7112
|
"bytesInOutput": 2610
|
|
7084
7113
|
},
|
|
7085
7114
|
"src/plugin/shared/request-services.ts": {
|
|
7086
|
-
"bytesInOutput":
|
|
7115
|
+
"bytesInOutput": 77387
|
|
7087
7116
|
},
|
|
7088
7117
|
"src/plugin/background-quota-refresh.ts": {
|
|
7089
7118
|
"bytesInOutput": 9891
|
|
@@ -7278,7 +7307,7 @@
|
|
|
7278
7307
|
"bytesInOutput": 153
|
|
7279
7308
|
}
|
|
7280
7309
|
},
|
|
7281
|
-
"bytes":
|
|
7310
|
+
"bytes": 1873865
|
|
7282
7311
|
}
|
|
7283
7312
|
}
|
|
7284
7313
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/plugin/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/plugin/request.ts"],"names":[],"mappings":"AAMA,OAAO,EASL,KAAK,WAAW,EAE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AAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,SAAS;IACjE,OAAO;IACP,GAAG,MAAM,IAAI;CACd,GACG,IAAI,GACJ,KAAK,GACR,OAAO,CAAC,QAAQ,CAAC,CAEnB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,GAAG;IAChE,OAAO,EAAE,OAAO,yBAAyB,CAAA;IACzC,iBAAiB,EAAE,OAAO,4BAA4B,CAAA;IACtD,uBAAuB,EAAE,OAAO,uBAAuB,CAAA;IACvD,uBAAuB,EAAE,OAAO,uBAAuB,CAAA;IACvD,iBAAiB,EAAE,OAAO,iBAAiB,CAAA;CAC5C,CASA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;kCAYM,GAAG,cAAc,MAAM;4CAEb,GAAG,EAAE,cAAc,MAAM;4CAEzB,GAAG,EAAE,cAAc,MAAM;;;sDAIf,GAAG,EAAE,OAAO,MAAM;sDAElB,GAAG,EAAE,OAAO,MAAM;;;;;CAMrE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
|
+
import { applyAgyNativeGenerationConfig, getAgyNativeModel, isRetiredAgyModel, } from '@cortexkit/antigravity-auth-core';
|
|
2
3
|
import { ANTIGRAVITY_DEFAULT_PROJECT_ID, ANTIGRAVITY_ENDPOINT, CLAUDE_DESCRIPTION_PROMPT, CLAUDE_TOOL_SYSTEM_INSTRUCTION, EMPTY_SCHEMA_PLACEHOLDER_DESCRIPTION, EMPTY_SCHEMA_PLACEHOLDER_NAME, GEMINI_CLI_ENDPOINT, getRandomizedHeaders, SKIP_THOUGHT_SIGNATURE, } from '../constants';
|
|
3
4
|
import { buildAgyAgentRequestMetadata, createAgyRequestSessionContext, orderAgyRequestPayloadInPlace, } from './agy-request-metadata';
|
|
4
5
|
import { cacheSignature, getCachedSignature, } from './cache';
|
|
@@ -91,6 +92,9 @@ export function getImageModelLocalTitle(input, init) {
|
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
function getAgyMaxOutputTokens(model) {
|
|
95
|
+
const native = getAgyNativeModel(model);
|
|
96
|
+
if (native)
|
|
97
|
+
return native.maxOutputTokens;
|
|
94
98
|
const lower = model.toLowerCase();
|
|
95
99
|
if (lower === 'gemini-3.5-flash-low' ||
|
|
96
100
|
lower === 'gemini-3.5-flash-extra-low' ||
|
|
@@ -121,6 +125,10 @@ function applyAgyGenerationDefaults(model, generationConfig, headerStyle) {
|
|
|
121
125
|
if (headerStyle !== 'antigravity') {
|
|
122
126
|
return;
|
|
123
127
|
}
|
|
128
|
+
if (getAgyNativeModel(model)) {
|
|
129
|
+
applyAgyNativeGenerationConfig(model, generationConfig);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
124
132
|
const maxOutputTokens = getAgyMaxOutputTokens(model);
|
|
125
133
|
if (maxOutputTokens !== undefined) {
|
|
126
134
|
generationConfig.maxOutputTokens = maxOutputTokens;
|
|
@@ -1207,6 +1215,15 @@ function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId,
|
|
|
1207
1215
|
const wireRequest = requestObjects.at(-1);
|
|
1208
1216
|
if (wireRequest) {
|
|
1209
1217
|
if (headerStyle === 'antigravity') {
|
|
1218
|
+
const generationConfig = wireRequest.generationConfig;
|
|
1219
|
+
const config = generationConfig &&
|
|
1220
|
+
typeof generationConfig === 'object' &&
|
|
1221
|
+
!Array.isArray(generationConfig)
|
|
1222
|
+
? generationConfig
|
|
1223
|
+
: {};
|
|
1224
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
1225
|
+
if (Object.keys(config).length > 0)
|
|
1226
|
+
wireRequest.generationConfig = config;
|
|
1210
1227
|
const metadata = buildAgyAgentRequestMetadata(options?.agySession ?? DEFAULT_AGY_REQUEST_SESSION, wireRequest, effectiveModel, options?.agyRequestTimestamp);
|
|
1211
1228
|
wrappedBody.requestId = metadata.requestId;
|
|
1212
1229
|
wireRequest.sessionId = metadata.sessionId;
|
|
@@ -1241,8 +1258,10 @@ function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId,
|
|
|
1241
1258
|
// providerOptions belongs to the host AI SDK and is only used above to
|
|
1242
1259
|
// resolve the requested variant. It is never part of the Google wire schema.
|
|
1243
1260
|
delete requestPayload.providerOptions;
|
|
1244
|
-
if (variantConfig?.thinkingLevel &&
|
|
1245
|
-
|
|
1261
|
+
if (variantConfig?.thinkingLevel &&
|
|
1262
|
+
(isGemini3 ||
|
|
1263
|
+
getAgyNativeModel(effectiveModel)?.supportsAdaptiveThinking)) {
|
|
1264
|
+
// Host effort variants select the corresponding native wire route.
|
|
1246
1265
|
const variantModelBase = rawModel
|
|
1247
1266
|
.replace(/-preview-customtools$/i, '')
|
|
1248
1267
|
.replace(/-preview$/i, '')
|
|
@@ -1776,6 +1795,15 @@ function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId,
|
|
|
1776
1795
|
stripInjectedDebugFromRequestPayload(requestPayload);
|
|
1777
1796
|
sanitizeRequestPayloadForAntigravity(requestPayload);
|
|
1778
1797
|
if (headerStyle === 'antigravity') {
|
|
1798
|
+
const generationConfig = requestPayload.generationConfig;
|
|
1799
|
+
const config = generationConfig &&
|
|
1800
|
+
typeof generationConfig === 'object' &&
|
|
1801
|
+
!Array.isArray(generationConfig)
|
|
1802
|
+
? generationConfig
|
|
1803
|
+
: {};
|
|
1804
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
1805
|
+
if (Object.keys(config).length > 0)
|
|
1806
|
+
requestPayload.generationConfig = config;
|
|
1779
1807
|
stripUnsupportedAntigravityFields(requestPayload);
|
|
1780
1808
|
configureAntigravityToolCalling(requestPayload);
|
|
1781
1809
|
// Function-response roles depend on the signatures settled by the
|
|
@@ -1905,7 +1933,11 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1905
1933
|
return null;
|
|
1906
1934
|
}
|
|
1907
1935
|
const warmupPrompt = 'Warmup request for thinking signature.';
|
|
1908
|
-
const
|
|
1936
|
+
const candidate = typeof parsed.model === 'string' ? parsed.model : '';
|
|
1937
|
+
if (candidate && isRetiredAgyModel(candidate))
|
|
1938
|
+
return null;
|
|
1939
|
+
const wireModel = candidate || 'claude-sonnet-5-5-low';
|
|
1940
|
+
parsed.model = wireModel;
|
|
1909
1941
|
const requestObjects = [];
|
|
1910
1942
|
const updateRequest = (req) => {
|
|
1911
1943
|
req.contents = [{ role: 'user', parts: [{ text: warmupPrompt }] }];
|
|
@@ -1916,9 +1948,11 @@ export function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
1916
1948
|
includeThoughts: true,
|
|
1917
1949
|
thinkingBudget: AGY_CLAUDE_THINKING_BUDGET,
|
|
1918
1950
|
};
|
|
1919
|
-
generationConfig.maxOutputTokens
|
|
1920
|
-
|
|
1951
|
+
generationConfig.maxOutputTokens ??=
|
|
1952
|
+
generationConfig.max_output_tokens ??
|
|
1953
|
+
getAgyMaxOutputTokens(wireModel) ??
|
|
1921
1954
|
computeClaudeMaxOutputTokens(AGY_CLAUDE_THINKING_BUDGET);
|
|
1955
|
+
applyAgyNativeGenerationConfig(wireModel, generationConfig);
|
|
1922
1956
|
req.generationConfig = generationConfig;
|
|
1923
1957
|
requestObjects.push(req);
|
|
1924
1958
|
};
|