maxpool 1.24.58 → 1.24.59

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui.js +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.58",
3
+ "version": "1.24.59",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tui.js CHANGED
@@ -2771,9 +2771,16 @@ export class TUI {
2771
2771
  // views — a 5h tank refills ~33.6x per week, so the weekly figure is what a
2772
2772
  // month of subscription actually buys. '--' until a tank reading AND a price exist.
2773
2773
  const sesTankObj = this.am.capacityTank?.(i, 'ses');
2774
+ // Weekly-plan accounts: a measured weekly tank, or the derived form ses × 5.5 —
2775
+ // MEASURED weekly tanks run 5-7× the 5h tank (2026-10-31: glm1 1.27M→8.58M,
2776
+ // glm2 1.26M→6.85M, max+4 1.53M→7.21M): the weekly window holds ~5 full 5h
2777
+ // refills, not 33.6. The owner caught the ×33.6 error here ("your math seems
2778
+ // completely off"). weeklyAbsent plans (no weekly limit at all) keep ×33.6.
2779
+ const WK_PER_SES = 5.5;
2774
2780
  const wkTank = (a.quota?.weeklyAbsent && a.type === 'provider')
2775
2781
  ? (sesTankObj?.avg ? Math.round(sesTankObj.avg * (7 * 24) / 5) : null)
2776
- : (this.am.capacityTank?.(i, 'wk')?.avg ?? null);
2782
+ : (this.am.capacityTank?.(i, 'wk')?.avg
2783
+ ?? (a.type === 'provider' && sesTankObj?.avg ? Math.round(sesTankObj.avg * WK_PER_SES) : null));
2777
2784
  const price = this.am.monthlyPriceFor?.(a);
2778
2785
  const priceCell = (wkTank && price)
2779
2786
  ? '$' + (price / (wkTank / 1e6)).toFixed(2)