mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(account): add multi-account switcher and passphrase vault
- Enable Windows multi-account sign-in via loopback PKCE OAuth and unified borderless quota cards with Ultra 5x/20x tier detection and instant cached-list preloading - Keep active-account quota strictly on live host telemetry while supporting configurable background OAuth refresh intervals (10m-24h, default 1h) for saved backup accounts - Add optional scrypt + AES-256-GCM secondary passphrase encryption with per-email AAD binding, unlock backoff, key zeroing, at-rest token minimization, and OAuth client_id allowlisting - Harden account mutations with inline two-step switch/remove confirmations, HMAC action nonces, Webview context checks, standalone web 403 isolation, and user-only vault directory ACLs
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
|
||||
import { isContextWindowSettingId, isContextWindowOption } from './context-windows.mjs';
|
||||
import {
|
||||
ACCOUNT_QUOTA_REFRESH_MINUTES,
|
||||
CLI_STATUSLINE_PRESETS,
|
||||
CONTEXT_AGENT_MODES,
|
||||
DEFAULT_ACCOUNT_QUOTA_REFRESH_MINUTES,
|
||||
DEFAULT_CLI_STATUSLINE_SLOTS,
|
||||
DEFAULT_CONTEXT_AGENT_MODE,
|
||||
DEFAULT_HOVER_MODULES,
|
||||
@@ -32,6 +34,7 @@ import {
|
||||
SUPPORTED_LANGUAGES,
|
||||
THEME_ACCENT_KEYS,
|
||||
TOPBAR_SLOT_KEYS,
|
||||
normalizeAccountQuotaRefreshMinutes,
|
||||
normalizeCliStatusLineSlots,
|
||||
normalizeContextAgentMode,
|
||||
normalizeExperimentalModernUi,
|
||||
@@ -59,8 +62,10 @@ import {
|
||||
} from '../shared/settings-normalization.mjs';
|
||||
|
||||
export {
|
||||
ACCOUNT_QUOTA_REFRESH_MINUTES,
|
||||
CLI_STATUSLINE_PRESETS,
|
||||
CONTEXT_AGENT_MODES,
|
||||
DEFAULT_ACCOUNT_QUOTA_REFRESH_MINUTES,
|
||||
DEFAULT_CLI_STATUSLINE_SLOTS,
|
||||
DEFAULT_CONTEXT_AGENT_MODE,
|
||||
DEFAULT_HOVER_MODULES,
|
||||
@@ -85,6 +90,7 @@ export {
|
||||
SUPPORTED_LANGUAGES,
|
||||
THEME_ACCENT_KEYS,
|
||||
TOPBAR_SLOT_KEYS,
|
||||
normalizeAccountQuotaRefreshMinutes,
|
||||
normalizeCliStatusLineSlots,
|
||||
normalizeContextAgentMode,
|
||||
normalizeExperimentalModernUi,
|
||||
@@ -162,6 +168,7 @@ export const DEFAULT_SETTINGS_SCHEMA = Object.freeze({
|
||||
stepTokenComboFormat: DEFAULT_STEP_TOKEN_COMBO_FORMAT,
|
||||
stepTableColumns: DEFAULT_STEP_TABLE_COLUMNS,
|
||||
experimentalQuotaReservation: true,
|
||||
accountQuotaRefreshMinutes: DEFAULT_ACCOUNT_QUOTA_REFRESH_MINUTES,
|
||||
contextWindowRiskAccepted: false,
|
||||
contextWindowMainEnabled: true,
|
||||
contextWindowSwarmEnabled: false,
|
||||
@@ -246,6 +253,9 @@ export function normalizeFullSettings(rawInput) {
|
||||
experimentalQuotaReservation: normalizeExperimentalQuotaReservation(
|
||||
safeRaw.experimentalQuotaReservation
|
||||
),
|
||||
accountQuotaRefreshMinutes: normalizeAccountQuotaRefreshMinutes(
|
||||
safeRaw.accountQuotaRefreshMinutes
|
||||
),
|
||||
contextWindowRiskAccepted: safeRaw.contextWindowRiskAccepted === true,
|
||||
contextWindowMainEnabled: safeRaw.contextWindowMainEnabled !== false,
|
||||
contextWindowSwarmEnabled: safeRaw.contextWindowSwarmEnabled === true,
|
||||
|
||||
Reference in New Issue
Block a user