@hashimkarim/usagestat-linux-x64-gnu 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +731 -65
- package/package.json +112 -1
- package/plugins/UPSTREAM-LICENSES.md +6 -2
- package/plugins/_provider-icons/LICENSE +21 -0
- package/plugins/_provider-icons/NOTICE +12 -0
- package/plugins/_provider-icons/licenses/CodexBar-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/LobeHub-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/UsageStat-Bar-MIT.txt +21 -0
- package/plugins/_provider-icons/manifest.json +1219 -0
- package/plugins/_provider-icons/provenance.json +269 -0
- package/plugins/_provider-icons/source.json +4 -0
- package/plugins/abacus-ai/icon-color.svg +18 -0
- package/plugins/aixy/LICENSE +21 -0
- package/plugins/aixy/plugin.js +261 -0
- package/plugins/aixy/plugin.json +24 -0
- package/plugins/antigravity/plugin.js +136 -46
- package/plugins/antigravity-cli/icon-color.svg +1 -0
- package/plugins/antigravity-cli/icon.svg +1 -3
- package/plugins/antigravity-cli/plugin.js +11 -15
- package/plugins/antigravity-ide/icon-color.svg +1 -0
- package/plugins/antigravity-ide/icon.svg +1 -3
- package/plugins/atlascloud/LICENSE +21 -0
- package/plugins/atlascloud/icon-color.svg +1 -0
- package/plugins/atlascloud/icon.svg +1 -0
- package/plugins/atlascloud/plugin.js +49 -0
- package/plugins/atlascloud/plugin.json +23 -0
- package/plugins/augment/icon-color.svg +14 -0
- package/plugins/bifrost/LICENSE +21 -0
- package/plugins/bifrost/plugin.js +361 -0
- package/plugins/bifrost/plugin.json +23 -0
- package/plugins/claude/plugin.js +302 -152
- package/plugins/claude/plugin.json +1 -1
- package/plugins/clinepass/plugin.js +19 -3
- package/plugins/codebuff/icon-color.svg +92 -0
- package/plugins/coderabbit/plugin.js +25 -0
- package/plugins/coderabbit/plugin.json +12 -0
- package/plugins/codex/plugin.js +1 -0
- package/plugins/command-code/icon-color.svg +3 -0
- package/plugins/command-code/plugin.js +7 -3
- package/plugins/copilot/icon.svg +1 -1
- package/plugins/crof/icon-color.svg +3 -0
- package/plugins/crofai/icon-color.svg +3 -0
- package/plugins/crofai/icon.svg +2 -15
- package/plugins/cursor/icon-color.svg +1 -0
- package/plugins/deepinfra/icon-color.svg +1 -0
- package/plugins/deepinfra/icon.svg +1 -4
- package/plugins/deepseek/plugin.js +150 -59
- package/plugins/deepseek/plugin.json +3 -1
- package/plugins/devin/plugin.js +3 -0
- package/plugins/devpass/LICENSE +21 -0
- package/plugins/devpass/plugin.js +115 -0
- package/plugins/devpass/plugin.json +23 -0
- package/plugins/elevenlabs/icon-color.svg +4 -0
- package/plugins/factory/icon-color.svg +1 -0
- package/plugins/fireworks-ai/icon-color.svg +1 -0
- package/plugins/fireworks-ai/icon.svg +1 -6
- package/plugins/gemini-apps/LICENSE +22 -0
- package/plugins/gemini-apps/icon-color.svg +1 -0
- package/plugins/gemini-apps/icon.svg +1 -0
- package/plugins/gemini-apps/plugin.js +470 -0
- package/plugins/gemini-apps/plugin.json +19 -0
- package/plugins/gitkraken/LICENSE +21 -0
- package/plugins/gitkraken/plugin.js +153 -0
- package/plugins/gitkraken/plugin.json +24 -0
- package/plugins/grok/icon-color.svg +1 -0
- package/plugins/groqcloud/icon-color.svg +1 -0
- package/plugins/helmcode/LICENSE +21 -0
- package/plugins/helmcode/plugin.js +188 -0
- package/plugins/helmcode/plugin.json +24 -0
- package/plugins/huggingface/LICENSE +21 -0
- package/plugins/huggingface/icon-color.svg +1 -0
- package/plugins/huggingface/icon.svg +1 -0
- package/plugins/huggingface/plugin.js +293 -0
- package/plugins/huggingface/plugin.json +25 -0
- package/plugins/hyper/LICENSE +21 -0
- package/plugins/hyper/plugin.js +131 -0
- package/plugins/hyper/plugin.json +26 -0
- package/plugins/kilo/icon-color.svg +1 -0
- package/plugins/litellm/plugin.js +54 -3
- package/plugins/llmman/LICENSE +21 -0
- package/plugins/llmman/plugin.js +133 -0
- package/plugins/llmman/plugin.json +23 -0
- package/plugins/longcat/icon-color.svg +1 -0
- package/plugins/longcat/icon.svg +1 -4
- package/plugins/manus/icon-color.svg +6 -0
- package/plugins/mimo/icon-color.svg +4 -0
- package/plugins/mimo/icon.svg +4 -1
- package/plugins/mistral/plugin.js +110 -5
- package/plugins/moonshot/icon-color.svg +1 -0
- package/plugins/muse/LICENSE +21 -0
- package/plugins/muse/plugin.js +319 -0
- package/plugins/muse/plugin.json +26 -0
- package/plugins/nous/LICENSE +21 -0
- package/plugins/nous/icon-color.svg +1 -0
- package/plugins/nous/icon.svg +1 -0
- package/plugins/nous/plugin.js +124 -0
- package/plugins/nous/plugin.json +24 -0
- package/plugins/ollama/icon-color.svg +1 -0
- package/plugins/openai-api/icon-color.svg +1 -0
- package/plugins/opencode/icon-color.svg +1 -0
- package/plugins/opencode-go/icon-color.svg +1 -0
- package/plugins/opencode-go/plugin.js +30 -12
- package/plugins/openrouter/icon-color.svg +1 -0
- package/plugins/pi/plugin.js +113 -0
- package/plugins/pi/plugin.json +11 -0
- package/plugins/qwencloud/icon-color.svg +1 -0
- package/plugins/qwencloud/icon.svg +1 -4
- package/plugins/raycast/LICENSE +21 -0
- package/plugins/raycast/plugin.js +174 -0
- package/plugins/raycast/plugin.json +24 -0
- package/plugins/replicate/LICENSE +21 -0
- package/plugins/replicate/icon-color.svg +1 -0
- package/plugins/replicate/icon.svg +1 -0
- package/plugins/replicate/plugin.js +165 -0
- package/plugins/replicate/plugin.json +24 -0
- package/plugins/synthetic/icon-color.svg +14 -0
- package/plugins/typesafe/LICENSE +21 -0
- package/plugins/typesafe/plugin.js +225 -0
- package/plugins/typesafe/plugin.json +24 -0
- package/plugins/v0/LICENSE +21 -0
- package/plugins/v0/icon-color.svg +1 -0
- package/plugins/v0/icon.svg +1 -0
- package/plugins/v0/plugin.js +214 -0
- package/plugins/v0/plugin.json +24 -0
- package/plugins/venice/plugin.js +50 -1
- package/plugins/venice/plugin.json +2 -1
- package/plugins/vercel/LICENSE +21 -0
- package/plugins/vercel/icon-color.svg +1 -0
- package/plugins/vercel/icon.svg +1 -0
- package/plugins/vercel/plugin.js +55 -0
- package/plugins/vercel/plugin.json +23 -0
- package/plugins/windsurf/icon-color.svg +1 -0
- package/plugins/xai/icon-color.svg +1 -0
- package/plugins/xai/icon.svg +1 -7
- package/plugins/xkiro/LICENSE +21 -0
- package/plugins/xkiro/plugin.js +99 -0
- package/plugins/xkiro/plugin.json +23 -0
- package/plugins/zai/icon-color.svg +1 -0
- package/plugins/zenmux/icon-color.svg +1 -0
- package/plugins/zenmux/icon.svg +1 -3
- package/usagestat +0 -0
- package/usagestatd +0 -0
|
@@ -155,6 +155,13 @@
|
|
|
155
155
|
ctx.host.log.warn("refresh skipped: no refresh token")
|
|
156
156
|
return null
|
|
157
157
|
}
|
|
158
|
+
var retryPath = ctx.app.pluginDataDir + "/oauth-retry-" + ctx.host.crypto.sha256Hex(refreshTokenValue) + ".json"
|
|
159
|
+
try {
|
|
160
|
+
if (ctx.host.fs.exists(retryPath)) {
|
|
161
|
+
var rejection = ctx.util.tryParseJson(ctx.host.fs.readText(retryPath))
|
|
162
|
+
if (rejection && rejection.retryAfterMs > Date.now()) return null
|
|
163
|
+
}
|
|
164
|
+
} catch (_) { /* A missing/corrupt cooldown must not prevent login. */ }
|
|
158
165
|
ctx.host.log.info("attempting Google OAuth token refresh")
|
|
159
166
|
try {
|
|
160
167
|
var resp = ctx.host.http.request({
|
|
@@ -169,6 +176,12 @@
|
|
|
169
176
|
timeoutMs: 15000,
|
|
170
177
|
})
|
|
171
178
|
if (resp.status < 200 || resp.status >= 300) {
|
|
179
|
+
var failure = ctx.util.tryParseJson(resp.bodyText)
|
|
180
|
+
if (resp.status === 400 && failure && failure.error === "invalid_grant") {
|
|
181
|
+
// A revoked token will not recover on the next dashboard poll. Store
|
|
182
|
+
// only a deadline under its hash; a new login bypasses this cooldown.
|
|
183
|
+
try { ctx.host.fs.writeText(retryPath, JSON.stringify({ retryAfterMs: Date.now() + 60 * 60 * 1000 })) } catch (_) {}
|
|
184
|
+
}
|
|
172
185
|
ctx.host.log.warn("Google OAuth refresh returned status: " + resp.status)
|
|
173
186
|
return null
|
|
174
187
|
}
|
|
@@ -188,22 +201,34 @@
|
|
|
188
201
|
|
|
189
202
|
// --- Token cache ---
|
|
190
203
|
|
|
204
|
+
function tokenCachePath(ctx, profileKey) {
|
|
205
|
+
// Include another hash so the filename remains bounded even on older hosts
|
|
206
|
+
// or test callers with an opaque profile key.
|
|
207
|
+
return ctx.app.pluginDataDir + "/auth-" + ctx.host.crypto.sha256Hex(profileKey) + ".json"
|
|
208
|
+
}
|
|
209
|
+
|
|
191
210
|
function loadCachedToken(ctx, profileKey) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
211
|
+
if (!profileKey) return null
|
|
212
|
+
// Read the old single-slot cache for compatibility, but write only the
|
|
213
|
+
// per-profile file so the IDE and agy cannot evict each other's token.
|
|
214
|
+
var paths = [tokenCachePath(ctx, profileKey), ctx.app.pluginDataDir + "/auth.json"]
|
|
215
|
+
for (var i = 0; i < paths.length; i++) {
|
|
216
|
+
try {
|
|
217
|
+
if (!ctx.host.fs.exists(paths[i])) continue
|
|
218
|
+
var data = ctx.util.tryParseJson(ctx.host.fs.readText(paths[i]))
|
|
219
|
+
if (!data || data.profileKey !== profileKey || !data.accessToken || !data.expiresAtMs) continue
|
|
220
|
+
if (data.expiresAtMs <= Date.now()) continue
|
|
221
|
+
return data.accessToken
|
|
222
|
+
} catch (e) {
|
|
223
|
+
ctx.host.log.warn("failed to read cached token: " + String(e))
|
|
224
|
+
}
|
|
202
225
|
}
|
|
226
|
+
return null
|
|
203
227
|
}
|
|
204
228
|
|
|
205
229
|
function cacheToken(ctx, accessToken, expiresInSeconds, profileKey) {
|
|
206
|
-
|
|
230
|
+
if (!profileKey) return
|
|
231
|
+
var path = tokenCachePath(ctx, profileKey)
|
|
207
232
|
try {
|
|
208
233
|
ctx.host.fs.writeText(path, JSON.stringify({
|
|
209
234
|
accessToken: accessToken,
|
|
@@ -238,58 +263,125 @@
|
|
|
238
263
|
return text || null
|
|
239
264
|
}
|
|
240
265
|
|
|
241
|
-
|
|
242
|
-
|
|
266
|
+
// agy stores {"token":{"access_token","refresh_token","expiry"},"id_token":...}.
|
|
267
|
+
// Search the whole payload for a bearer token before falling back to an ID
|
|
268
|
+
// token: Cloud Code rejects ID tokens, so a top-level id_token must not win.
|
|
269
|
+
var ACCESS_KEYS = ["access_token", "accessToken", "bearerToken", "auth_token", "authToken"]
|
|
270
|
+
var NESTED_KEYS = ["token", "tokens", "oauth", "oauth2", "credentials", "auth"]
|
|
243
271
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"id_token",
|
|
249
|
-
"idToken",
|
|
250
|
-
"bearerToken",
|
|
251
|
-
"auth_token",
|
|
252
|
-
"authToken",
|
|
253
|
-
]
|
|
254
|
-
for (var i = 0; i < directKeys.length; i++) {
|
|
255
|
-
var value = obj[directKeys[i]]
|
|
272
|
+
function findStringDeep(obj, keys, depth) {
|
|
273
|
+
if (!obj || typeof obj !== "object" || depth > 4) return null
|
|
274
|
+
for (var i = 0; i < keys.length; i++) {
|
|
275
|
+
var value = obj[keys[i]]
|
|
256
276
|
if (typeof value === "string" && value.trim()) return value.trim()
|
|
257
277
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
for (var j = 0; j < nestedKeys.length; j++) {
|
|
261
|
-
var nested = extractTokenFromObject(obj[nestedKeys[j]])
|
|
278
|
+
for (var j = 0; j < NESTED_KEYS.length; j++) {
|
|
279
|
+
var nested = findStringDeep(obj[NESTED_KEYS[j]], keys, depth + 1)
|
|
262
280
|
if (nested) return nested
|
|
263
281
|
}
|
|
282
|
+
return null
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function extractTokenFromObject(obj) {
|
|
286
|
+
if (!obj || typeof obj !== "object") return null
|
|
287
|
+
return findStringDeep(obj, ACCESS_KEYS, 0) || findStringDeep(obj, ["token"], 0) ||
|
|
288
|
+
findStringDeep(obj, ["id_token", "idToken"], 0)
|
|
289
|
+
}
|
|
264
290
|
|
|
291
|
+
function parseExpiryMs(value) {
|
|
292
|
+
if (typeof value === "number" && isFinite(value)) return value < 1e12 ? value * 1000 : value
|
|
293
|
+
if (typeof value === "string" && value.trim()) {
|
|
294
|
+
var ms = Date.parse(value.trim())
|
|
295
|
+
return isFinite(ms) ? ms : null
|
|
296
|
+
}
|
|
265
297
|
return null
|
|
266
298
|
}
|
|
267
299
|
|
|
268
|
-
|
|
300
|
+
// Returns {accessToken, refreshToken, expiryMs} from agy's keyring payload.
|
|
301
|
+
function parseAgyCredentials(ctx, raw) {
|
|
269
302
|
var text = unwrapAgyKeychainText(ctx, raw)
|
|
270
303
|
if (!text) return null
|
|
271
|
-
|
|
272
304
|
var parsed = ctx.util.tryParseJson(text)
|
|
273
|
-
if (typeof parsed === "string" && parsed.trim()) return parsed.trim()
|
|
274
|
-
if (parsed
|
|
305
|
+
if (typeof parsed === "string" && parsed.trim()) return { accessToken: parsed.trim(), refreshToken: null, expiryMs: null }
|
|
306
|
+
if (parsed && typeof parsed === "object") {
|
|
307
|
+
var expiry = findStringDeep(parsed, ["expiry", "expires_at", "expiresAt"], 0)
|
|
308
|
+
var numericExpiry = parsed.token && typeof parsed.token === "object" ? parsed.token.expiry_date : null
|
|
309
|
+
return {
|
|
310
|
+
accessToken: extractTokenFromObject(parsed),
|
|
311
|
+
refreshToken: findStringDeep(parsed, ["refresh_token", "refreshToken"], 0),
|
|
312
|
+
expiryMs: parseExpiryMs(expiry) || parseExpiryMs(numericExpiry),
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (text.indexOf("Bearer ") === 0) return { accessToken: text.slice("Bearer ".length).trim() || null, refreshToken: null, expiryMs: null }
|
|
316
|
+
return { accessToken: text, refreshToken: null, expiryMs: null }
|
|
317
|
+
}
|
|
275
318
|
|
|
276
|
-
|
|
277
|
-
|
|
319
|
+
function extractAgyAccessToken(ctx, raw) {
|
|
320
|
+
var creds = parseAgyCredentials(ctx, raw)
|
|
321
|
+
return creds ? creds.accessToken : null
|
|
278
322
|
}
|
|
279
323
|
|
|
280
|
-
function
|
|
324
|
+
function loadAgyCredentials(ctx) {
|
|
281
325
|
if (!ctx.host.keychain || typeof ctx.host.keychain.readGenericPassword !== "function") {
|
|
282
326
|
return null
|
|
283
327
|
}
|
|
284
328
|
try {
|
|
285
|
-
|
|
286
|
-
return extractAgyAccessToken(ctx, raw)
|
|
329
|
+
return parseAgyCredentials(ctx, ctx.host.keychain.readGenericPassword(AGY_KEYCHAIN_SERVICE, AGY_KEYCHAIN_ACCOUNT))
|
|
287
330
|
} catch (e) {
|
|
288
331
|
ctx.host.log.info("agy keychain read failed: " + String(e))
|
|
289
332
|
return null
|
|
290
333
|
}
|
|
291
334
|
}
|
|
292
335
|
|
|
336
|
+
function loadAgyKeychainToken(ctx) {
|
|
337
|
+
var creds = loadAgyCredentials(ctx)
|
|
338
|
+
return creds ? creds.accessToken : null
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Probe Cloud Code with agy's credentials, refreshing an expired or rejected
|
|
342
|
+
// access token with agy's refresh token (same Google OAuth client).
|
|
343
|
+
function probeAgyCredentials(ctx) {
|
|
344
|
+
var creds = loadAgyCredentials(ctx)
|
|
345
|
+
if (!creds || (!creds.accessToken && !creds.refreshToken)) return null
|
|
346
|
+
var profileKey = creds.refreshToken ? ctx.host.crypto.sha256Hex("agy\n" + creds.refreshToken) : null
|
|
347
|
+
var candidates = []
|
|
348
|
+
var cached = loadCachedToken(ctx, profileKey)
|
|
349
|
+
if (cached) candidates.push(cached)
|
|
350
|
+
var expired = creds.expiryMs != null && creds.expiryMs <= Date.now() + 60000
|
|
351
|
+
if (creds.accessToken && !expired && candidates.indexOf(creds.accessToken) === -1) candidates.push(creds.accessToken)
|
|
352
|
+
var last = null
|
|
353
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
354
|
+
var result = probeAgyToken(ctx, candidates[i])
|
|
355
|
+
if (result && !result._authFailed) return result
|
|
356
|
+
if (result) last = result
|
|
357
|
+
}
|
|
358
|
+
if (creds.refreshToken && (last || !candidates.length)) {
|
|
359
|
+
var refreshed = refreshAccessToken(ctx, creds.refreshToken, profileKey)
|
|
360
|
+
if (refreshed) {
|
|
361
|
+
var refreshedResult = probeAgyToken(ctx, refreshed)
|
|
362
|
+
if (refreshedResult) return refreshedResult
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return last
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Consumer agy accounts have no Cloud project, so retrieveUserQuota answers
|
|
369
|
+
// 403 "no valid license" even with a valid token. fetchAvailableModels still
|
|
370
|
+
// reports per-model quota, so use it before treating the token as rejected.
|
|
371
|
+
function probeAgyToken(ctx, token) {
|
|
372
|
+
var quota = probeAgyCloudCode(ctx, token)
|
|
373
|
+
if (quota && !quota._authFailed) return quota
|
|
374
|
+
var models = probeCloudCode(ctx, token)
|
|
375
|
+
if (models && !models._authFailed) {
|
|
376
|
+
var lines = buildModelLines(ctx, parseCloudCodeModels(models))
|
|
377
|
+
if (lines.length > 0) return { plan: null, lines: lines }
|
|
378
|
+
return null
|
|
379
|
+
}
|
|
380
|
+
// A quota 403 can mean "no license", not an invalid bearer. If the model
|
|
381
|
+
// endpoint is temporarily unavailable, don't turn that into a token refresh.
|
|
382
|
+
return models
|
|
383
|
+
}
|
|
384
|
+
|
|
293
385
|
// --- LS discovery ---
|
|
294
386
|
|
|
295
387
|
function discoverNative(ctx, options) {
|
|
@@ -682,7 +774,7 @@
|
|
|
682
774
|
|
|
683
775
|
var profileKey = dbTokenCandidates.length ? dbTokenCandidates[0].profileKey : null
|
|
684
776
|
var cached = loadCachedToken(ctx, profileKey)
|
|
685
|
-
if (cached && tokens.indexOf(cached) === -1) tokens.
|
|
777
|
+
if (cached && tokens.indexOf(cached) === -1) tokens.unshift(cached)
|
|
686
778
|
|
|
687
779
|
var ccData = null
|
|
688
780
|
var sawAuthFailure = false
|
|
@@ -717,13 +809,11 @@
|
|
|
717
809
|
}
|
|
718
810
|
}
|
|
719
811
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
if (agyResult && agyResult._authFailed) ccData = agyResult
|
|
726
|
-
}
|
|
812
|
+
// agy's own login also covers users whose IDE database is stale or absent.
|
|
813
|
+
if (!explicitDb && (!ccData || ccData._authFailed)) {
|
|
814
|
+
var agyResult = probeAgyCredentials(ctx)
|
|
815
|
+
if (agyResult && !agyResult._authFailed) return agyResult
|
|
816
|
+
if (agyResult && agyResult._authFailed) ccData = agyResult
|
|
727
817
|
}
|
|
728
818
|
|
|
729
819
|
if (ccData && !ccData._authFailed) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><mask height="23" id="lobe-icons-antigravity-0-_R_0_" maskUnits="userSpaceOnUse" width="24" x="0" y="1"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="#fff"></path></mask><g mask="url(#lobe-icons-antigravity-0-_R_0_)"><g filter="url(#lobe-icons-antigravity-1-_R_0_)"><path d="M-1.018-3.992c-.408 3.591 2.686 6.89 6.91 7.37 4.225.48 7.98-2.043 8.387-5.633.408-3.59-2.686-6.89-6.91-7.37-4.225-.479-7.98 2.043-8.387 5.633z" fill="#FFE432"></path></g><g filter="url(#lobe-icons-antigravity-2-_R_0_)"><path d="M15.269 7.747c1.058 4.557 5.691 7.374 10.348 6.293 4.657-1.082 7.575-5.653 6.516-10.21-1.058-4.556-5.691-7.374-10.348-6.292-4.657 1.082-7.575 5.653-6.516 10.21z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-3-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-4-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-5-_R_0_)"><path d="M-7.608 14.703c3.352 3.424 9.126 3.208 12.896-.483 3.77-3.69 4.108-9.459.756-12.883C2.69-2.087-3.083-1.871-6.853 1.82c-3.77 3.69-4.108 9.458-.755 12.883z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-6-_R_0_)"><path d="M9.932 27.617c1.04 4.482 5.384 7.303 9.7 6.3 4.316-1.002 6.971-5.448 5.93-9.93-1.04-4.483-5.384-7.304-9.7-6.301-4.316 1.002-6.971 5.448-5.93 9.93z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-7-_R_0_)"><path d="M2.572-8.185C.392-3.329 2.778 2.472 7.9 4.771c5.122 2.3 11.042.227 13.222-4.63 2.18-4.855-.205-10.656-5.327-12.955-5.122-2.3-11.042-.227-13.222 4.63z" fill="#FBBC04"></path></g><g filter="url(#lobe-icons-antigravity-8-_R_0_)"><path d="M-3.267 38.686c-5.277-2.072 3.742-19.117 5.984-24.83 2.243-5.712 8.34-8.664 13.616-6.592 5.278 2.071 11.533 13.482 9.29 19.195-2.242 5.713-23.613 14.298-28.89 12.227z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-9-_R_0_)"><path d="M28.71 17.471c-1.413 1.649-5.1.808-8.236-1.878-3.135-2.687-4.531-6.201-3.118-7.85 1.412-1.649 5.1-.808 8.235 1.878s4.532 6.2 3.119 7.85z" fill="#749BFF"></path></g><g filter="url(#lobe-icons-antigravity-10-_R_0_)"><path d="M18.163 9.077c5.81 3.93 12.502 4.19 14.946.577 2.443-3.612-.287-9.727-6.098-13.658-5.81-3.931-12.502-4.19-14.946-.577-2.443 3.612.287 9.727 6.098 13.658z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-11-_R_0_)"><path d="M-.915 2.684c-1.44 3.473-.97 6.967 1.05 7.804 2.02.837 4.824-1.3 6.264-4.772 1.44-3.473.97-6.967-1.05-7.804-2.02-.837-4.824 1.3-6.264 4.772z" fill="#FFEE48"></path></g></g><defs><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="17.587" id="lobe-icons-antigravity-1-_R_0_" width="19.838" x="-3.288" y="-11.917"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="1.117"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="38.565" id="lobe-icons-antigravity-2-_R_0_" width="38.9" x="4.251" y="-13.493"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="5.4"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-3-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-4-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.595" id="lobe-icons-antigravity-5-_R_0_" width="36.632" x="-19.099" y="-10.278"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="34.087" id="lobe-icons-antigravity-6-_R_0_" width="33.533" x=".981" y="8.758"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.363"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="35.276" id="lobe-icons-antigravity-7-_R_0_" width="35.978" x="-6.143" y="-21.659"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.954"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="46.523" id="lobe-icons-antigravity-8-_R_0_" width="45.114" x="-11.96" y="-.46"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.531"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="24.054" id="lobe-icons-antigravity-9-_R_0_" width="25.094" x="10.485" y=".58"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.159"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="30.007" id="lobe-icons-antigravity-10-_R_0_" width="33.508" x="5.833" y="-12.467"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="2.669"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="26.151" id="lobe-icons-antigravity-11-_R_0_" width="22.194" x="-8.355" y="-8.876"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.303"></feGaussianBlur></filter></defs></svg>
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="M85.2843 88.0301C90.1329 91.6664 97.4057 89.2422 90.7389 82.5755C70.7389 63.1816 74.9813 9.84827 50.1329 9.84827C25.2843 9.84827 29.5267 63.1816 9.52673 82.5755C2.25402 89.8483 10.1328 91.6664 14.9813 88.0301C33.7692 75.3028 32.5571 52.8786 50.1329 52.8786C67.7086 52.8786 66.4965 75.3028 85.2843 88.0301Z" fill="currentColor"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z"></path></svg>
|
|
@@ -67,27 +67,23 @@
|
|
|
67
67
|
function extractTokenFromObject(obj) {
|
|
68
68
|
if (!obj || typeof obj !== "object") return null
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"token",
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
for (var i = 0; i < directKeys.length; i += 1) {
|
|
81
|
-
var value = obj[directKeys[i]]
|
|
70
|
+
// Prefer a bearer token anywhere in the payload; an ID token is a last resort
|
|
71
|
+
// (agy stores {"token":{"access_token":...},"id_token":...}).
|
|
72
|
+
return findTokenDeep(obj, ["access_token", "accessToken", "bearerToken", "auth_token", "authToken"], 0) ||
|
|
73
|
+
findTokenDeep(obj, ["token"], 0) || findTokenDeep(obj, ["id_token", "idToken"], 0)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function findTokenDeep(obj, keys, depth) {
|
|
77
|
+
if (!obj || typeof obj !== "object" || depth > 4) return null
|
|
78
|
+
for (var i = 0; i < keys.length; i += 1) {
|
|
79
|
+
var value = obj[keys[i]]
|
|
82
80
|
if (typeof value === "string" && value.trim()) return value.trim()
|
|
83
81
|
}
|
|
84
|
-
|
|
85
82
|
var nestedKeys = ["token", "tokens", "oauth", "oauth2", "credentials", "auth"]
|
|
86
83
|
for (var j = 0; j < nestedKeys.length; j += 1) {
|
|
87
|
-
var nested =
|
|
84
|
+
var nested = findTokenDeep(obj[nestedKeys[j]], keys, depth + 1)
|
|
88
85
|
if (nested) return nested
|
|
89
86
|
}
|
|
90
|
-
|
|
91
87
|
return null
|
|
92
88
|
}
|
|
93
89
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><mask height="23" id="lobe-icons-antigravity-0-_R_0_" maskUnits="userSpaceOnUse" width="24" x="0" y="1"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="#fff"></path></mask><g mask="url(#lobe-icons-antigravity-0-_R_0_)"><g filter="url(#lobe-icons-antigravity-1-_R_0_)"><path d="M-1.018-3.992c-.408 3.591 2.686 6.89 6.91 7.37 4.225.48 7.98-2.043 8.387-5.633.408-3.59-2.686-6.89-6.91-7.37-4.225-.479-7.98 2.043-8.387 5.633z" fill="#FFE432"></path></g><g filter="url(#lobe-icons-antigravity-2-_R_0_)"><path d="M15.269 7.747c1.058 4.557 5.691 7.374 10.348 6.293 4.657-1.082 7.575-5.653 6.516-10.21-1.058-4.556-5.691-7.374-10.348-6.292-4.657 1.082-7.575 5.653-6.516 10.21z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-3-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-4-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-5-_R_0_)"><path d="M-7.608 14.703c3.352 3.424 9.126 3.208 12.896-.483 3.77-3.69 4.108-9.459.756-12.883C2.69-2.087-3.083-1.871-6.853 1.82c-3.77 3.69-4.108 9.458-.755 12.883z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-6-_R_0_)"><path d="M9.932 27.617c1.04 4.482 5.384 7.303 9.7 6.3 4.316-1.002 6.971-5.448 5.93-9.93-1.04-4.483-5.384-7.304-9.7-6.301-4.316 1.002-6.971 5.448-5.93 9.93z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-7-_R_0_)"><path d="M2.572-8.185C.392-3.329 2.778 2.472 7.9 4.771c5.122 2.3 11.042.227 13.222-4.63 2.18-4.855-.205-10.656-5.327-12.955-5.122-2.3-11.042-.227-13.222 4.63z" fill="#FBBC04"></path></g><g filter="url(#lobe-icons-antigravity-8-_R_0_)"><path d="M-3.267 38.686c-5.277-2.072 3.742-19.117 5.984-24.83 2.243-5.712 8.34-8.664 13.616-6.592 5.278 2.071 11.533 13.482 9.29 19.195-2.242 5.713-23.613 14.298-28.89 12.227z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-9-_R_0_)"><path d="M28.71 17.471c-1.413 1.649-5.1.808-8.236-1.878-3.135-2.687-4.531-6.201-3.118-7.85 1.412-1.649 5.1-.808 8.235 1.878s4.532 6.2 3.119 7.85z" fill="#749BFF"></path></g><g filter="url(#lobe-icons-antigravity-10-_R_0_)"><path d="M18.163 9.077c5.81 3.93 12.502 4.19 14.946.577 2.443-3.612-.287-9.727-6.098-13.658-5.81-3.931-12.502-4.19-14.946-.577-2.443 3.612.287 9.727 6.098 13.658z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-11-_R_0_)"><path d="M-.915 2.684c-1.44 3.473-.97 6.967 1.05 7.804 2.02.837 4.824-1.3 6.264-4.772 1.44-3.473.97-6.967-1.05-7.804-2.02-.837-4.824 1.3-6.264 4.772z" fill="#FFEE48"></path></g></g><defs><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="17.587" id="lobe-icons-antigravity-1-_R_0_" width="19.838" x="-3.288" y="-11.917"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="1.117"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="38.565" id="lobe-icons-antigravity-2-_R_0_" width="38.9" x="4.251" y="-13.493"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="5.4"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-3-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-4-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.595" id="lobe-icons-antigravity-5-_R_0_" width="36.632" x="-19.099" y="-10.278"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="34.087" id="lobe-icons-antigravity-6-_R_0_" width="33.533" x=".981" y="8.758"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.363"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="35.276" id="lobe-icons-antigravity-7-_R_0_" width="35.978" x="-6.143" y="-21.659"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.954"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="46.523" id="lobe-icons-antigravity-8-_R_0_" width="45.114" x="-11.96" y="-.46"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.531"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="24.054" id="lobe-icons-antigravity-9-_R_0_" width="25.094" x="10.485" y=".58"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.159"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="30.007" id="lobe-icons-antigravity-10-_R_0_" width="33.508" x="5.833" y="-12.467"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="2.669"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="26.151" id="lobe-icons-antigravity-11-_R_0_" width="22.194" x="-8.355" y="-8.876"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.303"></feGaussianBlur></filter></defs></svg>
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="M85.2843 88.0301C90.1329 91.6664 97.4057 89.2422 90.7389 82.5755C70.7389 63.1816 74.9813 9.84827 50.1329 9.84827C25.2843 9.84827 29.5267 63.1816 9.52673 82.5755C2.25402 89.8483 10.1328 91.6664 14.9813 88.0301C33.7692 75.3028 32.5571 52.8786 50.1329 52.8786C67.7086 52.8786 66.4965 75.3028 85.2843 88.0301Z" fill="currentColor"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z"></path></svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Peter Steinberger
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Atlas Cloud</title><path d="M20.2,18.01L12,0.47,3.8,18.01l-2.58,5.52c1.62,-1.05,3.39,-1.86,5.26,-2.41,1.76,-0.51,3.61,-0.79,5.52,-0.79,0.98,0,1.95,0.08,2.9,0.22l-1.86,-4.3c-0.53,-0.1,-2.87,-0.1,-4.59,0.3l3.56,-8.28,5.52,12.85c0.01,0,0.02,0.01,0.03,0.01,1.86,0.55,3.62,1.36,5.23,2.4l-2.58,-5.52Z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Atlas Cloud</title><path d="M20.2,18.01L12,0.47,3.8,18.01l-2.58,5.52c1.62,-1.05,3.39,-1.86,5.26,-2.41,1.76,-0.51,3.61,-0.79,5.52,-0.79,0.98,0,1.95,0.08,2.9,0.22l-1.86,-4.3c-0.53,-0.1,-2.87,-0.1,-4.59,0.3l3.56,-8.28,5.52,12.85c0.01,0,0.02,0.01,0.03,0.01,1.86,0.55,3.62,1.36,5.23,2.4l-2.58,-5.52Z"></path></svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
|
|
2
|
+
globalThis.__usagestat_bundled_options = {"labels":["Balance","Balance","Additional"],"defaults":{},"autoMode":"api"};
|
|
3
|
+
defineProvider({
|
|
4
|
+
id: "atlascloud",
|
|
5
|
+
name: "Atlas Cloud",
|
|
6
|
+
endpoints: ["https://api.atlascloud.ai"],
|
|
7
|
+
auth: { type: "bearer", secret: "ATLASCLOUD_API_KEY" },
|
|
8
|
+
settings: [{ key: "ATLASCLOUD_API_KEY", title: "Atlas Cloud API key", type: "secure" }],
|
|
9
|
+
capabilities: ["http-status"],
|
|
10
|
+
async fetchUsage(ctx) {
|
|
11
|
+
const response = await ctx.http.get("https://api.atlascloud.ai/public/v1/balance");
|
|
12
|
+
const message = `Atlas Cloud returned HTTP ${response.status}.`;
|
|
13
|
+
if (response.status === 401) throw ctx.fail.authenticationExpired(message);
|
|
14
|
+
if (response.status === 403) throw ctx.fail.permissionDenied(message);
|
|
15
|
+
if (response.status === 429) {
|
|
16
|
+
const delay = Number(response.headers["retry-after"] ?? 1);
|
|
17
|
+
throw ctx.fail.rateLimited(message, {
|
|
18
|
+
retryAfterSeconds: Number.isFinite(delay) && delay >= 0 ? Math.min(delay, 10) : 1,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (response.status >= 500) throw ctx.fail.providerUnavailable(message);
|
|
22
|
+
if (response.status !== 200) throw ctx.fail.apiFailure(message);
|
|
23
|
+
function fail() {
|
|
24
|
+
throw ctx.fail.parseFailure("Atlas Cloud returned an unrecognized USD account balance.");
|
|
25
|
+
}
|
|
26
|
+
let data;
|
|
27
|
+
try {
|
|
28
|
+
data = JSON.parse(response.bodyText);
|
|
29
|
+
} catch {
|
|
30
|
+
return fail();
|
|
31
|
+
}
|
|
32
|
+
const value = data?.available?.value;
|
|
33
|
+
if (
|
|
34
|
+
data?.object !== "balance" ||
|
|
35
|
+
data.scope !== "account" ||
|
|
36
|
+
data.available?.currency !== "usd" ||
|
|
37
|
+
typeof value !== "string" ||
|
|
38
|
+
!/^-?\d+(?:\.\d+)?$/.test(value)
|
|
39
|
+
)
|
|
40
|
+
return fail();
|
|
41
|
+
const balance = Number(value);
|
|
42
|
+
if (!Number.isFinite(balance)) return fail();
|
|
43
|
+
return {
|
|
44
|
+
details: [{ title: "Account balance", rows: [{ label: "Available balance", value: ctx.format.usd(balance) }] }],
|
|
45
|
+
identity: { loginMethod: "API" },
|
|
46
|
+
dataConfidence: "exact",
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "atlascloud",
|
|
4
|
+
"name": "Atlas Cloud",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "api",
|
|
12
|
+
"usageDashboardUrl": "https://www.atlascloud.ai/console",
|
|
13
|
+
"envVars": [
|
|
14
|
+
"ATLASCLOUD_API_KEY"
|
|
15
|
+
],
|
|
16
|
+
"upstream": {
|
|
17
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
18
|
+
"revision": "78ba5a1e65e6859da59a21b799df95ab91bc0b89",
|
|
19
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/atlascloud.js",
|
|
20
|
+
"sha256": "852fb78abaf4fcdbbfbfeac0b60d6b82a9ca9b1d1d2f9014f6e5299b41ac47fa",
|
|
21
|
+
"license": "MIT"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
|
|
2
|
+
<g transform="translate(25 0) scale(8.25)" fill="currentColor" stroke="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M8.64,47.51c-.91,0-1.68-.16-2.3-.47-.62-.31-1.09-.79-1.41-1.41-.32-.63-.48-1.39-.48-2.29v-9.27c0-1.14-.23-1.97-.68-2.49-.46-.52-1.27-.79-2.43-.82-.36,0-.65-.14-.87-.41-.22-.27-.33-.59-.33-.94,0-.38.11-.69.33-.94.22-.25.51-.38.87-.41,1.16-.03,1.97-.3,2.43-.82.46-.52.68-1.34.68-2.45v-9.27c0-1.36.36-2.4,1.08-3.1.72-.71,1.76-1.06,3.12-1.06h11.08c.42,0,.76.12,1.04.37.28.25.42.56.42.94,0,.36-.12.66-.35.92-.23.26-.55.39-.94.39h-10.29c-.58,0-1.03.15-1.33.45-.3.3-.46.76-.46,1.39v9.32c0,.82-.17,1.56-.5,2.22-.33.67-.78,1.19-1.33,1.58-.55.38-1.2.57-1.95.57v-.16c.75,0,1.4.19,1.95.57.55.38,1,.91,1.33,1.58.33.67.5,1.41.5,2.23v9.36c0,.63.15,1.09.46,1.39.3.3.75.45,1.33.45h10.29c.39,0,.7.13.94.39.24.26.35.57.35.92s-.14.66-.42.92c-.28.26-.62.39-1.04.39h-11.08Z" />
|
|
5
|
+
<path
|
|
6
|
+
d="M35.79,47.51c-.42,0-.76-.13-1.04-.39-.28-.26-.42-.57-.42-.92s.12-.66.35-.92c.23-.26.55-.39.94-.39h10.29c.58,0,1.03-.15,1.33-.45.3-.3.46-.76.46-1.39v-9.36c0-.82.17-1.56.5-2.22.33-.67.77-1.19,1.33-1.58.55-.38,1.2-.57,1.95-.57v.16c-.75,0-1.4-.19-1.95-.57-.55-.38-1-.91-1.33-1.58-.33-.67-.5-1.41-.5-2.23v-9.32c0-.63-.15-1.09-.46-1.39-.3-.3-.75-.45-1.33-.45h-10.29c-.39,0-.7-.13-.94-.39-.23-.26-.35-.56-.35-.92,0-.38.14-.69.42-.94.28-.25.62-.37,1.04-.37h11.08c1.36,0,2.39.36,3.11,1.06.72.71,1.08,1.74,1.08,3.1v9.27c0,1.12.23,1.94.68,2.45.46.52,1.27.79,2.43.82.36.03.65.16.87.41.22.25.33.56.33.94,0,.36-.11.67-.33.94-.22.27-.51.41-.87.41-1.16.03-1.97.3-2.43.82-.46.52-.68,1.35-.68,2.49v9.27c0,.9-.16,1.66-.48,2.29-.32.63-.79,1.1-1.41,1.41-.62.31-1.39.47-2.31.47h-11.08Z" />
|
|
7
|
+
<path
|
|
8
|
+
d="M38.64,32.95c2.02,0,3.65-1.61,3.65-3.59s-1.64-3.59-3.65-3.59-3.65,1.61-3.65,3.59,1.64,3.59,3.65,3.59Z" />
|
|
9
|
+
<path
|
|
10
|
+
d="M18.18,32.95c2.02,0,3.65-1.61,3.65-3.59s-1.64-3.59-3.65-3.59-3.65,1.61-3.65,3.59,1.64,3.59,3.65,3.59Z" />
|
|
11
|
+
<path
|
|
12
|
+
d="M26.51.95l-.28,7.34c0,.41-.4.62-1.19.62s-1.18-.21-1.18-.62c-.07-1.83-.13-3.25-.17-4.26-.02-1.03-.05-1.76-.07-2.2-.02-.43-.04-.7-.04-.79v-.14c0-.53.49-.79,1.46-.79s1.46.28,1.46.82ZM32.44.95l-.28,7.34c0,.41-.4.62-1.19.62s-1.19-.21-1.19-.62c-.07-1.83-.13-3.25-.17-4.26-.02-1.03-.05-1.76-.07-2.2-.02-.43-.04-.7-.04-.79v-.14c0-.53.49-.79,1.46-.79s1.46.28,1.46.82Z" />
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Peter Steinberger
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|