@cortexkit/opencode-antigravity-auth 3.0.11 → 3.0.13
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.js +5120 -2863
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +581 -211
- package/dist/index.js +4806 -2343
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +618 -244
- package/dist/server.js +14300 -11649
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/cli.d.ts +15 -0
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +27 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +83 -2
- package/dist/src/common-auth-embedded/claustrum/consumer.js +337 -37
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/dist/src/common-auth-embedded/claustrum/custody.js +95 -11
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +37 -12
- package/dist/src/common-auth-embedded/claustrum/errors.d.ts +1 -1
- package/dist/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/dist/src/common-auth-embedded/claustrum/hub.js +988 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/dist/src/common-auth-embedded/claustrum/index.js +37 -4
- package/dist/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/dist/src/common-auth-embedded/claustrum/quota-writer.js +38 -66
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +80 -1
- package/dist/src/common-auth-embedded/claustrum/roster.js +259 -12
- package/dist/src/common-auth-embedded/claustrum/shutdown.js +42 -0
- package/dist/src/common-auth-embedded/commands/builtins.d.ts +37 -0
- package/dist/src/common-auth-embedded/commands/builtins.js +95 -13
- package/dist/src/common-auth-embedded/commands/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/fs/file-read-cache.js +57 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/dist/src/common-auth-embedded/opencode2/index.js +1 -1
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +10 -7
- package/dist/src/common-auth-embedded/opencode2/install.js +318 -71
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +78 -9
- package/dist/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/dist/src/common-auth-embedded/quota/commit-interval.js +18 -0
- package/dist/src/common-auth-embedded/quota/pending.js +48 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +29 -19
- package/dist/src/common-auth-embedded/setup/command.js +52 -14
- package/dist/src/common-auth-embedded/setup/enroll.d.ts +1 -1
- package/dist/src/common-auth-embedded/setup/enroll.js +1 -1
- package/dist/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/dist/src/common-auth-embedded/setup/register.js +90 -11
- package/dist/src/common-auth-embedded/source-output.json +188 -124
- package/dist/src/common-auth-embedded/store/attribution.d.ts +5 -0
- package/dist/src/common-auth-embedded/store/attribution.js +39 -25
- package/dist/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/dist/src/common-auth-embedded/store/mutate.js +4 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +22 -0
- package/dist/src/common-auth-embedded/store/pool.js +18 -3
- package/dist/src/common-auth-embedded/store/pull.js +3 -1
- package/dist/src/common-auth-embedded/store/quota-writer.js +312 -0
- package/dist/src/common-auth-embedded/store/runtime.d.ts +2 -0
- package/dist/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/dist/src/common-auth-embedded/store/settings.js +16 -6
- package/dist/src/ga/rpc/protocol.d.ts +2 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/src/ga/rpc/protocol.js +2 -2
- package/dist/src/ga/rpc/protocol.js.map +1 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +11 -0
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +2 -1
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.d.ts +10 -0
- package/dist/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.js +33 -5
- package/dist/src/plugin/background-vault-quota-refresh.js.map +1 -1
- package/dist/src/plugin/command-data.d.ts +2 -2
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +1 -1
- package/dist/src/plugin/config/schema.d.ts +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +28 -2
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +80 -16
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/ga-shared-vault-custody.d.ts +64 -0
- package/dist/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/ga-shared-vault-custody.js +169 -0
- package/dist/src/plugin/ga-shared-vault-custody.js.map +1 -0
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +11 -1
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/killswitch.js +13 -7
- package/dist/src/plugin/killswitch.js.map +1 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +3 -0
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +3 -3
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +8 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.js +38 -5
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
- package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.js +3 -0
- package/dist/src/plugin/ui/auth-menu.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +4 -2
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-custody.d.ts +28 -7
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +200 -37
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/plugin/vault-insula-quota.d.ts.map +1 -1
- package/dist/src/plugin/vault-insula-quota.js +4 -0
- package/dist/src/plugin/vault-insula-quota.js.map +1 -1
- package/dist/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/src/process-heartbeat.d.ts +76 -0
- package/dist/src/process-heartbeat.d.ts.map +1 -0
- package/dist/src/process-heartbeat.js +248 -0
- package/dist/src/process-heartbeat.js.map +1 -0
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +3 -0
- package/dist/src/setup.js.map +1 -1
- package/dist/src/sidebar-projection.d.ts +3 -1
- package/dist/src/sidebar-projection.d.ts.map +1 -1
- package/dist/src/sidebar-projection.js +10 -1
- package/dist/src/sidebar-projection.js.map +1 -1
- package/dist/src/sidebar-state.d.ts +10 -1
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +12 -2
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/quota-layout.d.ts +3 -1
- package/dist/src/tui/quota-layout.d.ts.map +1 -1
- package/dist/src/tui/quota-layout.js +6 -1
- package/dist/src/tui/quota-layout.js.map +1 -1
- package/dist/tui-build-map.json +9 -9
- package/dist/tui-ga-build-map.json +13 -13
- package/dist/types/src/cli.d.ts +15 -0
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +83 -2
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/dist/types/src/common-auth-embedded/claustrum/errors.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/dist/types/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/dist/types/src/common-auth-embedded/claustrum/roster.d.ts +80 -1
- package/dist/types/src/common-auth-embedded/commands/builtins.d.ts +37 -0
- package/dist/types/src/common-auth-embedded/commands/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +10 -7
- package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +78 -9
- package/dist/types/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/dist/types/src/common-auth-embedded/setup/enroll.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/store/attribution.d.ts +5 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +22 -0
- package/dist/types/src/common-auth-embedded/store/runtime.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/dist/types/src/ga/rpc/protocol.d.ts +2 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts +10 -0
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/types/src/plugin/command-data.d.ts +2 -2
- package/dist/types/src/plugin/command-data.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts +28 -2
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-shared-vault-custody.d.ts +64 -0
- package/dist/types/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +8 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-custody.d.ts +28 -7
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-insula-quota.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/types/src/process-heartbeat.d.ts +76 -0
- package/dist/types/src/process-heartbeat.d.ts.map +1 -0
- package/dist/types/src/setup.d.ts.map +1 -1
- package/dist/types/src/sidebar-state.d.ts +10 -1
- package/dist/types/src/sidebar-state.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common-auth-embedded/claustrum/consumer.d.ts +83 -2
- package/src/common-auth-embedded/claustrum/consumer.js +337 -37
- package/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/src/common-auth-embedded/claustrum/custody.js +95 -11
- package/src/common-auth-embedded/claustrum/enrollment.js +37 -12
- package/src/common-auth-embedded/claustrum/errors.d.ts +1 -1
- package/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/src/common-auth-embedded/claustrum/hub.js +988 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/src/common-auth-embedded/claustrum/index.js +37 -4
- package/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/src/common-auth-embedded/claustrum/quota-writer.js +38 -66
- package/src/common-auth-embedded/claustrum/roster.d.ts +80 -1
- package/src/common-auth-embedded/claustrum/roster.js +259 -12
- package/src/common-auth-embedded/claustrum/shutdown.js +42 -0
- package/src/common-auth-embedded/commands/builtins.d.ts +37 -0
- package/src/common-auth-embedded/commands/builtins.js +95 -13
- package/src/common-auth-embedded/commands/index.d.ts +1 -1
- package/src/common-auth-embedded/fs/file-read-cache.js +57 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/src/common-auth-embedded/opencode2/index.js +1 -1
- package/src/common-auth-embedded/opencode2/install.d.ts +10 -7
- package/src/common-auth-embedded/opencode2/install.js +318 -71
- package/src/common-auth-embedded/opencode2/types.d.ts +78 -9
- package/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/src/common-auth-embedded/quota/commit-interval.js +18 -0
- package/src/common-auth-embedded/quota/pending.js +48 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +29 -19
- package/src/common-auth-embedded/setup/command.js +52 -14
- package/src/common-auth-embedded/setup/enroll.d.ts +1 -1
- package/src/common-auth-embedded/setup/enroll.js +1 -1
- package/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/src/common-auth-embedded/setup/register.js +90 -11
- package/src/common-auth-embedded/source-output.json +188 -124
- package/src/common-auth-embedded/store/attribution.d.ts +5 -0
- package/src/common-auth-embedded/store/attribution.js +39 -25
- package/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/src/common-auth-embedded/store/mutate.js +4 -0
- package/src/common-auth-embedded/store/pool.d.ts +22 -0
- package/src/common-auth-embedded/store/pool.js +18 -3
- package/src/common-auth-embedded/store/pull.js +3 -1
- package/src/common-auth-embedded/store/quota-writer.js +312 -0
- package/src/common-auth-embedded/store/runtime.d.ts +2 -0
- package/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/src/common-auth-embedded/store/settings.js +16 -6
- package/src/plugin/command-data.ts +4 -2
- package/src/sidebar-state.ts +23 -3
- package/src/tui-compiled/sidebar-state.js +4 -3
- package/src/tui-compiled/tui/quota-layout.js +3 -2
- package/src/tui-ga-compiled/host-ga.js +2 -1
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
- package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +3 -2
- package/src/tui-ga-raw/host-ga.tsx +12 -1
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
- package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +9 -2
- package/src/tui-raw/sidebar-state.js +4 -3
- package/src/tui-raw/tui/quota-layout.tsx +9 -2
package/src/sidebar-state.ts
CHANGED
|
@@ -54,7 +54,7 @@ import { xdgState } from 'xdg-basedir'
|
|
|
54
54
|
|
|
55
55
|
export const SIDEBAR_STATE_VERSION = 2 as const
|
|
56
56
|
|
|
57
|
-
export type SidebarQuotaKey = 'gemini' | 'non-gemini'
|
|
57
|
+
export type SidebarQuotaKey = 'gemini' | 'non-gemini' | 'gemini-argon'
|
|
58
58
|
|
|
59
59
|
export interface SidebarQuotaWindowEntry {
|
|
60
60
|
window: 'weekly' | '5h'
|
|
@@ -328,7 +328,10 @@ function normalizeAccount(input: unknown): SidebarAccountState | null {
|
|
|
328
328
|
const quotaRaw = record.quota
|
|
329
329
|
const quota: SidebarAccountState['quota'] = {}
|
|
330
330
|
if (isObject(quotaRaw)) {
|
|
331
|
-
|
|
331
|
+
// The Argon pool exists only on accounts that report it: readers carry
|
|
332
|
+
// any stored Argon reading, and accounts without one read exactly the
|
|
333
|
+
// two canonical pools, as before.
|
|
334
|
+
for (const key of ['gemini', 'non-gemini', 'gemini-argon'] as const) {
|
|
332
335
|
const entry = (quotaRaw as Record<string, unknown>)[key]
|
|
333
336
|
const normalized = normalizeQuota(entry)
|
|
334
337
|
if (normalized) quota[key] = normalized
|
|
@@ -545,6 +548,16 @@ export interface SidebarAccountRedactionInput {
|
|
|
545
548
|
resetTime: string
|
|
546
549
|
}>
|
|
547
550
|
}
|
|
551
|
+
// Reported only by paid Pro accounts with the Argon weekly allowance.
|
|
552
|
+
'gemini-argon'?: {
|
|
553
|
+
remainingFraction?: number
|
|
554
|
+
resetTime?: string
|
|
555
|
+
windows?: Array<{
|
|
556
|
+
window: 'weekly' | '5h'
|
|
557
|
+
remainingFraction: number
|
|
558
|
+
resetTime: string
|
|
559
|
+
}>
|
|
560
|
+
}
|
|
548
561
|
// Legacy per-pool keys written by older versions of the plugin.
|
|
549
562
|
// Accepted here so the normalizer can map them to the current pool
|
|
550
563
|
// keys at read time without requiring a disk migration.
|
|
@@ -685,6 +698,11 @@ export function normalizeLegacyCachedQuota(
|
|
|
685
698
|
return {
|
|
686
699
|
...(gemini !== undefined ? { gemini } : {}),
|
|
687
700
|
...(nonGemini !== undefined ? { 'non-gemini': nonGemini } : {}),
|
|
701
|
+
// The Argon pool postdates the legacy pool keys, so a snapshot that
|
|
702
|
+
// carries both keeps its Argon pool untouched by the migration.
|
|
703
|
+
...(raw['gemini-argon'] !== undefined
|
|
704
|
+
? { 'gemini-argon': raw['gemini-argon'] }
|
|
705
|
+
: {}),
|
|
688
706
|
}
|
|
689
707
|
}
|
|
690
708
|
|
|
@@ -811,7 +829,9 @@ export function redactAccountForSidebar(
|
|
|
811
829
|
? undefined
|
|
812
830
|
: normalizeLegacyCachedQuota(source.cachedQuota)
|
|
813
831
|
if (cached) {
|
|
814
|
-
|
|
832
|
+
// The Argon pool is projected only when the account reports it, so an
|
|
833
|
+
// account without it serializes byte-identical to before.
|
|
834
|
+
for (const key of ['gemini', 'non-gemini', 'gemini-argon'] as const) {
|
|
815
835
|
const entry = cached[key]
|
|
816
836
|
if (!entry) continue
|
|
817
837
|
const projected = projectQuotaPoolForSidebar(
|
|
@@ -98,7 +98,7 @@ function normalizeAccount(input) {
|
|
|
98
98
|
return null;
|
|
99
99
|
const enabled = record.enabled !== !1, health = clampNumber(toFiniteNumber(record.health), 0, 100), current = record.current === !0, cooldownUntil = toFiniteNumber(record.cooldownUntil) ?? void 0, quotaRaw = record.quota, quota = {};
|
|
100
100
|
if (isObject(quotaRaw))
|
|
101
|
-
for (const key of ["gemini", "non-gemini"]) {
|
|
101
|
+
for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
|
|
102
102
|
const entry = quotaRaw[key], normalized = normalizeQuota(entry);
|
|
103
103
|
if (normalized)
|
|
104
104
|
quota[key] = normalized;
|
|
@@ -246,7 +246,8 @@ export function normalizeLegacyCachedQuota(raw) {
|
|
|
246
246
|
}, gemini = minFraction(raw.gemini, minFraction(raw["gemini-pro"], raw["gemini-flash"])) ?? raw.gemini, nonGemini = minFraction(raw["non-gemini"], minFraction(raw.claude, raw["gpt-oss"])) ?? raw["non-gemini"];
|
|
247
247
|
return {
|
|
248
248
|
...gemini !== void 0 ? { gemini } : {},
|
|
249
|
-
...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {}
|
|
249
|
+
...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {},
|
|
250
|
+
...raw["gemini-argon"] !== void 0 ? { "gemini-argon": raw["gemini-argon"] } : {}
|
|
250
251
|
};
|
|
251
252
|
}
|
|
252
253
|
export function projectQuotaPoolForSidebar(source, checkedAt) {
|
|
@@ -284,7 +285,7 @@ export function isAccountCurrent(index, activeIndexByFamily) {
|
|
|
284
285
|
export function redactAccountForSidebar(source) {
|
|
285
286
|
const id = `acct-${source.index}`, label = `Account ${source.index + 1}`, enabled = source.enabled !== !1, current = source.current === !0, cooldownUntil = typeof source.coolingDownUntil === "number" && Number.isFinite(source.coolingDownUntil) ? source.coolingDownUntil : void 0, health = clampNumber(typeof source.healthScore === "number" ? source.healthScore : 100, 0, 100), quota = {}, cached = typeof source.cachedQuotaAccountId === "string" && typeof source.currentQuotaAccountId === "string" && source.cachedQuotaAccountId !== source.currentQuotaAccountId ? void 0 : normalizeLegacyCachedQuota(source.cachedQuota);
|
|
286
287
|
if (cached)
|
|
287
|
-
for (const key of ["gemini", "non-gemini"]) {
|
|
288
|
+
for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
|
|
288
289
|
const entry = cached[key];
|
|
289
290
|
if (!entry)
|
|
290
291
|
continue;
|
|
@@ -48,9 +48,10 @@ export const DEFAULT_QUOTA_APPEARANCE = {
|
|
|
48
48
|
// Group headers name each quota pool in plain words.
|
|
49
49
|
export const GROUP_NAMES = {
|
|
50
50
|
gemini: 'Gemini',
|
|
51
|
-
'non-gemini': 'Other models'
|
|
51
|
+
'non-gemini': 'Other models',
|
|
52
|
+
'gemini-argon': 'Argon'
|
|
52
53
|
};
|
|
53
|
-
export const QUOTA_ORDER = ['gemini', 'non-gemini'];
|
|
54
|
+
export const QUOTA_ORDER = ['gemini', 'non-gemini', 'gemini-argon'];
|
|
54
55
|
|
|
55
56
|
// Shown instead of a stored figure once the window has reset since it was
|
|
56
57
|
// read: the stored figure describes the window before the reset.
|
|
@@ -209,9 +209,10 @@ function checkAccount(value, path, issues) {
|
|
|
209
209
|
if (!isRecord(value.quota)) {
|
|
210
210
|
issues.push(`${path}.quota: expected quota readings`);
|
|
211
211
|
} else {
|
|
212
|
-
keys(value.quota, [], ['gemini', 'non-gemini'], `${path}.quota`, issues);
|
|
212
|
+
keys(value.quota, [], ['gemini', 'non-gemini', 'gemini-argon'], `${path}.quota`, issues);
|
|
213
213
|
checkQuotaEntry(value.quota.gemini, `${path}.quota.gemini`, issues);
|
|
214
214
|
checkQuotaEntry(value.quota['non-gemini'], `${path}.quota.non-gemini`, issues);
|
|
215
|
+
checkQuotaEntry(value.quota['gemini-argon'], `${path}.quota.gemini-argon`, issues);
|
|
215
216
|
}
|
|
216
217
|
if (value.tier !== undefined) {
|
|
217
218
|
const tier = value.tier;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { quotaReadingParts } from "./98cc0c186c46c42d-quota-presentation.js";
|
|
2
2
|
export const QUOTA_POOL_LABELS = {
|
|
3
3
|
gemini: "Gemini",
|
|
4
|
-
"non-gemini": "Other models"
|
|
4
|
+
"non-gemini": "Other models",
|
|
5
|
+
"gemini-argon": "Argon"
|
|
5
6
|
};
|
|
6
|
-
const POOL_ORDER = [
|
|
7
|
+
const POOL_ORDER = [
|
|
8
|
+
"gemini",
|
|
9
|
+
"non-gemini",
|
|
10
|
+
"gemini-argon"
|
|
11
|
+
];
|
|
7
12
|
function clamp(value) {
|
|
8
13
|
if (!Number.isFinite(value))
|
|
9
14
|
return 0;
|
|
@@ -47,6 +52,8 @@ function quotaRows(account, now) {
|
|
|
47
52
|
for (const key of POOL_ORDER) {
|
|
48
53
|
const entry = account.quota[key], label = QUOTA_POOL_LABELS[key];
|
|
49
54
|
if (!entry) {
|
|
55
|
+
if (key === "gemini-argon")
|
|
56
|
+
continue;
|
|
50
57
|
rows.push({
|
|
51
58
|
label,
|
|
52
59
|
remaining: null,
|
|
@@ -48,9 +48,10 @@ export const DEFAULT_QUOTA_APPEARANCE = {
|
|
|
48
48
|
// Group headers name each quota pool in plain words.
|
|
49
49
|
export const GROUP_NAMES = {
|
|
50
50
|
gemini: 'Gemini',
|
|
51
|
-
'non-gemini': 'Other models'
|
|
51
|
+
'non-gemini': 'Other models',
|
|
52
|
+
'gemini-argon': 'Argon'
|
|
52
53
|
};
|
|
53
|
-
export const QUOTA_ORDER = ['gemini', 'non-gemini'];
|
|
54
|
+
export const QUOTA_ORDER = ['gemini', 'non-gemini', 'gemini-argon'];
|
|
54
55
|
|
|
55
56
|
// Shown instead of a stored figure once the window has reset since it was
|
|
56
57
|
// read: the stored figure describes the window before the reset.
|
|
@@ -472,13 +472,24 @@ function checkAccount(value: unknown, path: string, issues: Issues) {
|
|
|
472
472
|
if (!isRecord(value.quota)) {
|
|
473
473
|
issues.push(`${path}.quota: expected quota readings`)
|
|
474
474
|
} else {
|
|
475
|
-
keys(
|
|
475
|
+
keys(
|
|
476
|
+
value.quota,
|
|
477
|
+
[],
|
|
478
|
+
['gemini', 'non-gemini', 'gemini-argon'],
|
|
479
|
+
`${path}.quota`,
|
|
480
|
+
issues,
|
|
481
|
+
)
|
|
476
482
|
checkQuotaEntry(value.quota.gemini, `${path}.quota.gemini`, issues)
|
|
477
483
|
checkQuotaEntry(
|
|
478
484
|
value.quota['non-gemini'],
|
|
479
485
|
`${path}.quota.non-gemini`,
|
|
480
486
|
issues,
|
|
481
487
|
)
|
|
488
|
+
checkQuotaEntry(
|
|
489
|
+
value.quota['gemini-argon'],
|
|
490
|
+
`${path}.quota.gemini-argon`,
|
|
491
|
+
issues,
|
|
492
|
+
)
|
|
482
493
|
}
|
|
483
494
|
if (value.tier !== undefined) {
|
|
484
495
|
const tier = value.tier
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { quotaReadingParts } from "./98cc0c186c46c42d-quota-presentation.js";
|
|
2
2
|
export const QUOTA_POOL_LABELS = {
|
|
3
3
|
gemini: "Gemini",
|
|
4
|
-
"non-gemini": "Other models"
|
|
4
|
+
"non-gemini": "Other models",
|
|
5
|
+
"gemini-argon": "Argon"
|
|
5
6
|
};
|
|
6
|
-
const POOL_ORDER = [
|
|
7
|
+
const POOL_ORDER = [
|
|
8
|
+
"gemini",
|
|
9
|
+
"non-gemini",
|
|
10
|
+
"gemini-argon"
|
|
11
|
+
];
|
|
7
12
|
function clamp(value) {
|
|
8
13
|
if (!Number.isFinite(value))
|
|
9
14
|
return 0;
|
|
@@ -47,6 +52,8 @@ function quotaRows(account, now) {
|
|
|
47
52
|
for (const key of POOL_ORDER) {
|
|
48
53
|
const entry = account.quota[key], label = QUOTA_POOL_LABELS[key];
|
|
49
54
|
if (!entry) {
|
|
55
|
+
if (key === "gemini-argon")
|
|
56
|
+
continue;
|
|
50
57
|
rows.push({
|
|
51
58
|
label,
|
|
52
59
|
remaining: null,
|
|
@@ -58,7 +58,7 @@ export const DEFAULT_QUOTA_APPEARANCE: QuotaAppearance = {
|
|
|
58
58
|
errorThreshold: 80,
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type QuotaGroupKey = 'gemini' | 'non-gemini'
|
|
61
|
+
export type QuotaGroupKey = 'gemini' | 'non-gemini' | 'gemini-argon'
|
|
62
62
|
|
|
63
63
|
export interface QuotaLayoutWindow {
|
|
64
64
|
readonly window: 'weekly' | '5h'
|
|
@@ -80,6 +80,8 @@ export interface QuotaLayoutAccount {
|
|
|
80
80
|
readonly quota: {
|
|
81
81
|
readonly gemini?: QuotaLayoutEntry
|
|
82
82
|
readonly 'non-gemini'?: QuotaLayoutEntry
|
|
83
|
+
/** Present only on accounts whose reading reports the Argon pool. */
|
|
84
|
+
readonly 'gemini-argon'?: QuotaLayoutEntry
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
|
|
@@ -87,9 +89,14 @@ export interface QuotaLayoutAccount {
|
|
|
87
89
|
export const GROUP_NAMES: Record<QuotaGroupKey, string> = {
|
|
88
90
|
gemini: 'Gemini',
|
|
89
91
|
'non-gemini': 'Other models',
|
|
92
|
+
'gemini-argon': 'Argon',
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
|
|
95
|
+
export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
|
|
96
|
+
'gemini',
|
|
97
|
+
'non-gemini',
|
|
98
|
+
'gemini-argon',
|
|
99
|
+
]
|
|
93
100
|
|
|
94
101
|
// Shown instead of a stored figure once the window has reset since it was
|
|
95
102
|
// read: the stored figure describes the window before the reset.
|
|
@@ -98,7 +98,7 @@ function normalizeAccount(input) {
|
|
|
98
98
|
return null;
|
|
99
99
|
const enabled = record.enabled !== !1, health = clampNumber(toFiniteNumber(record.health), 0, 100), current = record.current === !0, cooldownUntil = toFiniteNumber(record.cooldownUntil) ?? void 0, quotaRaw = record.quota, quota = {};
|
|
100
100
|
if (isObject(quotaRaw))
|
|
101
|
-
for (const key of ["gemini", "non-gemini"]) {
|
|
101
|
+
for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
|
|
102
102
|
const entry = quotaRaw[key], normalized = normalizeQuota(entry);
|
|
103
103
|
if (normalized)
|
|
104
104
|
quota[key] = normalized;
|
|
@@ -246,7 +246,8 @@ export function normalizeLegacyCachedQuota(raw) {
|
|
|
246
246
|
}, gemini = minFraction(raw.gemini, minFraction(raw["gemini-pro"], raw["gemini-flash"])) ?? raw.gemini, nonGemini = minFraction(raw["non-gemini"], minFraction(raw.claude, raw["gpt-oss"])) ?? raw["non-gemini"];
|
|
247
247
|
return {
|
|
248
248
|
...gemini !== void 0 ? { gemini } : {},
|
|
249
|
-
...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {}
|
|
249
|
+
...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {},
|
|
250
|
+
...raw["gemini-argon"] !== void 0 ? { "gemini-argon": raw["gemini-argon"] } : {}
|
|
250
251
|
};
|
|
251
252
|
}
|
|
252
253
|
export function projectQuotaPoolForSidebar(source, checkedAt) {
|
|
@@ -284,7 +285,7 @@ export function isAccountCurrent(index, activeIndexByFamily) {
|
|
|
284
285
|
export function redactAccountForSidebar(source) {
|
|
285
286
|
const id = `acct-${source.index}`, label = `Account ${source.index + 1}`, enabled = source.enabled !== !1, current = source.current === !0, cooldownUntil = typeof source.coolingDownUntil === "number" && Number.isFinite(source.coolingDownUntil) ? source.coolingDownUntil : void 0, health = clampNumber(typeof source.healthScore === "number" ? source.healthScore : 100, 0, 100), quota = {}, cached = typeof source.cachedQuotaAccountId === "string" && typeof source.currentQuotaAccountId === "string" && source.cachedQuotaAccountId !== source.currentQuotaAccountId ? void 0 : normalizeLegacyCachedQuota(source.cachedQuota);
|
|
286
287
|
if (cached)
|
|
287
|
-
for (const key of ["gemini", "non-gemini"]) {
|
|
288
|
+
for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
|
|
288
289
|
const entry = cached[key];
|
|
289
290
|
if (!entry)
|
|
290
291
|
continue;
|
|
@@ -58,7 +58,7 @@ export const DEFAULT_QUOTA_APPEARANCE: QuotaAppearance = {
|
|
|
58
58
|
errorThreshold: 80,
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type QuotaGroupKey = 'gemini' | 'non-gemini'
|
|
61
|
+
export type QuotaGroupKey = 'gemini' | 'non-gemini' | 'gemini-argon'
|
|
62
62
|
|
|
63
63
|
export interface QuotaLayoutWindow {
|
|
64
64
|
readonly window: 'weekly' | '5h'
|
|
@@ -80,6 +80,8 @@ export interface QuotaLayoutAccount {
|
|
|
80
80
|
readonly quota: {
|
|
81
81
|
readonly gemini?: QuotaLayoutEntry
|
|
82
82
|
readonly 'non-gemini'?: QuotaLayoutEntry
|
|
83
|
+
/** Present only on accounts whose reading reports the Argon pool. */
|
|
84
|
+
readonly 'gemini-argon'?: QuotaLayoutEntry
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
|
|
@@ -87,9 +89,14 @@ export interface QuotaLayoutAccount {
|
|
|
87
89
|
export const GROUP_NAMES: Record<QuotaGroupKey, string> = {
|
|
88
90
|
gemini: 'Gemini',
|
|
89
91
|
'non-gemini': 'Other models',
|
|
92
|
+
'gemini-argon': 'Argon',
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
|
|
95
|
+
export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
|
|
96
|
+
'gemini',
|
|
97
|
+
'non-gemini',
|
|
98
|
+
'gemini-argon',
|
|
99
|
+
]
|
|
93
100
|
|
|
94
101
|
// Shown instead of a stored figure once the window has reset since it was
|
|
95
102
|
// read: the stored figure describes the window before the reset.
|