feat(panel): add 3-tier weekly quota capacity and token estimates

- Add a 3-tier pool burn-rate estimator (rolling median calibration, Theil-Sen net-burn slope, and solo cycle ratio) with cross-reset priced token density tracking to derive full-pool USD and token capacities plus account-wide weeklyCapacityEstimate
- Render the Est. Weekly Quota summary banner, preliminary/partial badges, full-pool token equivalents, supplementary weekly fallback rows, and pool header capacity tooltips in QuotaPoolsWidget
- Coalesce multi-pool state persistence across 5h/weekly buckets, suppress post-refund idle replica rebounds, and clamp externalUsedPct to physical local-spend bounds
This commit is contained in:
fish
2026-11-24 11:24:45 +09:00
parent 7e6d11d7aa
commit 4fb7ec4958
13 changed files with 2415 additions and 230 deletions
+8 -2
View File
@@ -190,6 +190,7 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'quota.cycle5hTitle': 'Current 5h cycle ({pool}): {tok} Tokens · {cost} · {calls} calls',
'quota.cycleWkCustomTitle': 'Current calendar week: {tok} Tokens · {cost} · {calls} calls',
'quota.cycleWkPoolTitle': 'Current weekly cycle ({pool}): {tok} Tokens · {cost} · {calls} calls',
'quota.cycleFullSuffix': 'Full ~{full}',
'quota.footTokensCustom': 'Week Total: {tok} ({cost})',
'quota.footTokensCycle': 'Cycle Total: {tok} ({cost})',
'quota.footCredits': 'AI Credits: {credits}',
@@ -201,13 +202,18 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'quota.ratePopTitle': 'Estimated Burn Rates',
'quota.ratePopAccountScope': '{account}',
'quota.ratePopAccountCurrent': 'Current account',
'quota.ratePopWkCapTitle': 'Est. Weekly Quota',
'quota.ratePopWkCapPrelim': '· est.',
'quota.ratePopWkCapPartial': '· {ready}/{total} pools',
'quota.ratePopPoolFallback': 'Pool average',
'quota.ratePopEq5hLabel': '5h full',
'quota.ratePopEqWkLabel': 'Weekly full',
'quota.ratePopPerUsd': '{win} {rate}%/$',
'quota.ratePopSamples': '{n} samples',
'quota.ratePopEmpty': 'Not enough clean single-model samples yet (at least 3 clean steps per model). Estimates appear automatically during use.',
'quota.ratePopNote': 'Measured from clean single-model steps; lowest burn in pool = 1x. Account isolated.',
'quota.ratePopPrelimSlope': 'slope est.',
'quota.ratePopPrelimCycle': 'cycle est.',
'quota.ratePopEmpty': 'Not enough clean samples yet (unlocks at 2% weekly burn or 3 clean single-model steps).',
'quota.ratePopNote': 'Measured from net burn & priced steps; lowest in pool = 1x. Account isolated.',
'quota.ratePopSharedBadge': 'Shared active',
'quota.ratePopSharedBadgeTip': 'External pool usage seen within 15 min; new reservations display after verification',
'quota.ratePopExternalDetail': 'Family group / other-device usage detected (~{detail} excluded from reservations)',