@hashimkarim/usagestat-linux-x64-gnu 2.0.0 → 2.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/native-manifest.json +15 -15
- package/package.json +1 -1
- package/plugins/antigravity/plugin.js +15 -11
- package/plugins/antigravity-cli/plugin.js +6 -1
- package/usagestat +0 -0
- package/usagestatd +0 -0
package/native-manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"arch": "x64",
|
|
3
3
|
"archive": {
|
|
4
4
|
"name": "usagestat-linux-x86_64.tar.gz",
|
|
5
|
-
"sha256": "
|
|
6
|
-
"size":
|
|
5
|
+
"sha256": "14639690fcba5ed5038628bb6cfd684076e0c494fe6087fd6e01ddbddd299942",
|
|
6
|
+
"size": 13141302
|
|
7
7
|
},
|
|
8
8
|
"buildSystem": "Linux-6.17.0-1022-azure-x86_64-with-glibc2.39",
|
|
9
9
|
"dependencies": [
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"format": "elf",
|
|
50
50
|
"machine": 62,
|
|
51
51
|
"requiredGlibc": "2.39",
|
|
52
|
-
"version": "2.0.
|
|
52
|
+
"version": "2.0.1"
|
|
53
53
|
},
|
|
54
54
|
"usagestatd": {
|
|
55
55
|
"format": "elf",
|
|
56
56
|
"machine": 62,
|
|
57
57
|
"requiredGlibc": "2.39",
|
|
58
|
-
"version": "2.0.
|
|
58
|
+
"version": "2.0.1"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"files": [
|
|
@@ -272,8 +272,8 @@
|
|
|
272
272
|
{
|
|
273
273
|
"executable": false,
|
|
274
274
|
"path": "plugins/antigravity-cli/plugin.js",
|
|
275
|
-
"sha256": "
|
|
276
|
-
"size":
|
|
275
|
+
"sha256": "b67252d7497b34397096929b578aa361ee93b1193c3346549144fa29966bd734",
|
|
276
|
+
"size": 19777
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
279
|
"executable": false,
|
|
@@ -326,8 +326,8 @@
|
|
|
326
326
|
{
|
|
327
327
|
"executable": false,
|
|
328
328
|
"path": "plugins/antigravity/plugin.js",
|
|
329
|
-
"sha256": "
|
|
330
|
-
"size":
|
|
329
|
+
"sha256": "551e478eec0f66e29ec35809e1264c387cad9b7d201d983300b1b07cfdbb1df9",
|
|
330
|
+
"size": 33924
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"executable": false,
|
|
@@ -2342,14 +2342,14 @@
|
|
|
2342
2342
|
{
|
|
2343
2343
|
"executable": true,
|
|
2344
2344
|
"path": "usagestat",
|
|
2345
|
-
"sha256": "
|
|
2346
|
-
"size":
|
|
2345
|
+
"sha256": "bd2368651f3f8f12dd7ac51b30dfb8aa09b83f19e7a584a430334b5b38a3ac30",
|
|
2346
|
+
"size": 15324256
|
|
2347
2347
|
},
|
|
2348
2348
|
{
|
|
2349
2349
|
"executable": true,
|
|
2350
2350
|
"path": "usagestatd",
|
|
2351
|
-
"sha256": "
|
|
2352
|
-
"size":
|
|
2351
|
+
"sha256": "a5e23806972fa7284f3d471880c1ebc1d3254c6c16c28c95f63871a0de8f4542",
|
|
2352
|
+
"size": 15753144
|
|
2353
2353
|
}
|
|
2354
2354
|
],
|
|
2355
2355
|
"libc": "glibc",
|
|
@@ -2357,12 +2357,12 @@
|
|
|
2357
2357
|
"minimumSystemQualified": true,
|
|
2358
2358
|
"os": "linux",
|
|
2359
2359
|
"package": "usagestat",
|
|
2360
|
-
"resourcesSha256": "
|
|
2360
|
+
"resourcesSha256": "b8b57a5c543444d6167e9bfc522e218230be864e94c46948733e01063c98282c",
|
|
2361
2361
|
"schemaVersion": 1,
|
|
2362
2362
|
"signing": "unsigned",
|
|
2363
|
-
"sourceCommit": "
|
|
2363
|
+
"sourceCommit": "84bfa891782e1228dd6d2c179f7108e83c5b5aa7",
|
|
2364
2364
|
"sourceDirty": false,
|
|
2365
2365
|
"target": "x86_64-unknown-linux-gnu",
|
|
2366
2366
|
"toolchain": "rustc 1.89.0 (29483883e 2025-08-04)\nbinary: rustc\ncommit-hash: 29483883eed69d5fb4db01964cdf2af4d86e9cb2\ncommit-date: 2025-08-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.89.0\nLLVM version: 20.1.7",
|
|
2367
|
-
"version": "2.0.
|
|
2367
|
+
"version": "2.0.1"
|
|
2368
2368
|
}
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
var FETCH_MODELS_PATH = "/v1internal:fetchAvailableModels"
|
|
11
11
|
var RETRIEVE_QUOTA_PATH = "/v1internal:retrieveUserQuota"
|
|
12
12
|
var LOGIN_MESSAGE = "Start Antigravity or run `agy` and try again."
|
|
13
|
+
var QUOTA_DENIED_MESSAGE = "Google denied Antigravity quota access for this account. Open the latest Antigravity or agy client and check account access."
|
|
13
14
|
var GOOGLE_OAUTH_URL = "https://oauth2.googleapis.com/token"
|
|
14
15
|
var GOOGLE_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
|
|
15
16
|
var GOOGLE_CLIENT_SECRET = "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"
|
|
@@ -370,17 +371,17 @@
|
|
|
370
371
|
// reports per-model quota, so use it before treating the token as rejected.
|
|
371
372
|
function probeAgyToken(ctx, token) {
|
|
372
373
|
var quota = probeAgyCloudCode(ctx, token)
|
|
373
|
-
if (quota && !quota._authFailed) return quota
|
|
374
|
+
if (quota && !quota._authFailed && !quota._quotaDenied) return quota
|
|
374
375
|
var models = probeCloudCode(ctx, token, "agy", true)
|
|
375
|
-
if (models && !models._authFailed) {
|
|
376
|
+
if (models && !models._authFailed && !models._quotaDenied) {
|
|
376
377
|
if (models._summaryLines) return { plan: null, lines: models._summaryLines }
|
|
377
378
|
var lines = buildModelLines(ctx, parseCloudCodeModels(models))
|
|
378
379
|
if (lines.length > 0) return { plan: null, lines: lines }
|
|
379
|
-
return null
|
|
380
|
+
return quota && quota._quotaDenied ? quota : null
|
|
380
381
|
}
|
|
381
382
|
// A quota 403 can mean "no license", not an invalid bearer. If the model
|
|
382
383
|
// endpoint is temporarily unavailable, don't turn that into a token refresh.
|
|
383
|
-
return models
|
|
384
|
+
return models || (quota && quota._quotaDenied ? quota : null)
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
// --- LS discovery ---
|
|
@@ -568,7 +569,8 @@
|
|
|
568
569
|
ctx.host.log.warn("Cloud Code returned invalid response shape (" + CLOUD_CODE_URLS[i] + ")")
|
|
569
570
|
continue
|
|
570
571
|
}
|
|
571
|
-
if (
|
|
572
|
+
if (resp.status === 401) return { _authFailed: true }
|
|
573
|
+
if (resp.status === 403) return { _quotaDenied: true }
|
|
572
574
|
if (resp.status >= 200 && resp.status < 300) {
|
|
573
575
|
var json = ctx.util.tryParseJson(resp.bodyText)
|
|
574
576
|
if (!json || typeof json !== "object") {
|
|
@@ -654,7 +656,7 @@
|
|
|
654
656
|
|
|
655
657
|
function probeAgyCloudCode(ctx, token) {
|
|
656
658
|
var loadData = requestCloudCodeJson(ctx, LOAD_CODE_ASSIST_PATH, token, "agy", {})
|
|
657
|
-
if (!loadData || loadData._authFailed) return loadData
|
|
659
|
+
if (!loadData || loadData._authFailed || loadData._quotaDenied) return loadData
|
|
658
660
|
|
|
659
661
|
var project =
|
|
660
662
|
typeof loadData.cloudaicompanionProject === "string" && loadData.cloudaicompanionProject.trim()
|
|
@@ -667,10 +669,10 @@
|
|
|
667
669
|
if (project) {
|
|
668
670
|
quotaData = requestCloudCodeJson(ctx, RETRIEVE_QUOTA_PATH, token, "agy", { project: project })
|
|
669
671
|
}
|
|
670
|
-
if (!quotaData || quotaData._authFailed) {
|
|
672
|
+
if (!quotaData || quotaData._authFailed || quotaData._quotaDenied) {
|
|
671
673
|
quotaData = requestCloudCodeJson(ctx, RETRIEVE_QUOTA_PATH, token, "agy", {})
|
|
672
674
|
}
|
|
673
|
-
if (!quotaData || quotaData._authFailed) return quotaData
|
|
675
|
+
if (!quotaData || quotaData._authFailed || quotaData._quotaDenied) return quotaData || (summary && summary._quotaDenied ? summary : null)
|
|
674
676
|
|
|
675
677
|
var lines = buildModelLines(ctx, parseAgyQuotaBuckets(quotaData))
|
|
676
678
|
if (lines.length === 0) return null
|
|
@@ -830,19 +832,21 @@
|
|
|
830
832
|
}
|
|
831
833
|
|
|
832
834
|
// agy's own login also covers users whose IDE database is stale or absent.
|
|
833
|
-
if (!explicitDb && (!ccData || ccData._authFailed)) {
|
|
835
|
+
if (!explicitDb && (!ccData || ccData._authFailed || ccData._quotaDenied)) {
|
|
834
836
|
var agyResult = probeAgyCredentials(ctx)
|
|
835
|
-
if (agyResult && !agyResult._authFailed) return agyResult
|
|
837
|
+
if (agyResult && !agyResult._authFailed && !agyResult._quotaDenied) return agyResult
|
|
838
|
+
if (agyResult && agyResult._quotaDenied) ccData = agyResult
|
|
836
839
|
if (agyResult && agyResult._authFailed) ccData = agyResult
|
|
837
840
|
}
|
|
838
841
|
|
|
839
|
-
if (ccData && !ccData._authFailed) {
|
|
842
|
+
if (ccData && !ccData._authFailed && !ccData._quotaDenied) {
|
|
840
843
|
if (ccData._summaryLines) return { plan: null, lines: ccData._summaryLines }
|
|
841
844
|
var configs = parseCloudCodeModels(ccData)
|
|
842
845
|
var lines = buildModelLines(ctx, configs)
|
|
843
846
|
if (lines.length > 0) return { plan: null, lines: lines }
|
|
844
847
|
}
|
|
845
848
|
|
|
849
|
+
if (ccData && ccData._quotaDenied) throw QUOTA_DENIED_MESSAGE
|
|
846
850
|
throw LOGIN_MESSAGE
|
|
847
851
|
}
|
|
848
852
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
const SESSION_EXPIRED_MESSAGE =
|
|
8
8
|
"Google sign-in expired. Run `agy` and complete Google sign-in again."
|
|
9
9
|
const REQUEST_FAILED_MESSAGE = "Antigravity CLI quota request failed. Check your connection and try again."
|
|
10
|
+
const QUOTA_DENIED_MESSAGE = "Google denied Antigravity quota access for this account. Open the latest Antigravity or agy client and check account access."
|
|
10
11
|
const GOOGLE_OAUTH_URL = "https://oauth2.googleapis.com/token"
|
|
11
12
|
const GOOGLE_CLIENT_ID =
|
|
12
13
|
"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
|
|
@@ -307,7 +308,11 @@
|
|
|
307
308
|
if (opts.optional) return null
|
|
308
309
|
throw REQUEST_FAILED_MESSAGE
|
|
309
310
|
}
|
|
310
|
-
if (
|
|
311
|
+
if (resp.status === 403) {
|
|
312
|
+
if (opts.optional) return null
|
|
313
|
+
throw QUOTA_DENIED_MESSAGE
|
|
314
|
+
}
|
|
315
|
+
if (resp.status === 401) {
|
|
311
316
|
if (opts.optional) {
|
|
312
317
|
ctx.host.log.warn(
|
|
313
318
|
"antigravity-cli optional request HTTP " +
|
package/usagestat
CHANGED
|
Binary file
|
package/usagestatd
CHANGED
|
Binary file
|