maxpool 1.24.0 → 1.24.1
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/package.json +1 -1
- package/src/tui.js +22 -16
package/package.json
CHANGED
package/src/tui.js
CHANGED
|
@@ -32,6 +32,8 @@ const vw = s => strip(s).length;
|
|
|
32
32
|
const NAME_W = 20; // a.name.slice(0, NAME_W).padEnd(NAME_W) — fits a full email like 2solarmax@gmail.com (19)
|
|
33
33
|
const PROVIDER_W = 9; // providerLabel(a).padEnd(PROVIDER_W) — fits "Anthropic"
|
|
34
34
|
const STATUS_W = 13; // rpad(status, STATUS_W) — fits "throttled 59s"
|
|
35
|
+
const RESETS_W = 3; // 'Rst' column — banked limit resets (cards/grants) the
|
|
36
|
+
// pool can auto-redeem; '0' when none, count when some.
|
|
35
37
|
const ROW_PREFIX = ' '; // ' ' + sel(1) + cur(1) + ' ' — 4 cols before the name
|
|
36
38
|
|
|
37
39
|
// Human provider name for the accounts-table "Provider" column. account.provider
|
|
@@ -60,6 +62,7 @@ function acctHeader(W) {
|
|
|
60
62
|
+ 'Account'.padEnd(NAME_W) + ' '
|
|
61
63
|
+ 'Provider'.padEnd(PROVIDER_W) + ' '
|
|
62
64
|
+ 'Status'.padEnd(STATUS_W) + ' '
|
|
65
|
+
+ 'Rst'.padEnd(RESETS_W) + ' '
|
|
63
66
|
+ quota;
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -265,20 +268,6 @@ function settingsTags(am, a) {
|
|
|
265
268
|
else if (a.subscriptionGone) tags.push(red('no sub'));
|
|
266
269
|
return tags; // disabled: never show card inventory either (owner gate)
|
|
267
270
|
}
|
|
268
|
-
// Available limit resets — the pool redeems these automatically per policy
|
|
269
|
-
// (reset-policy.js). Shown so the owner can see banked value before it expires.
|
|
270
|
-
const rc = a?.resetCards;
|
|
271
|
-
if (rc) {
|
|
272
|
-
const live5 = (rc.fiveHour || []).filter(c => !c.expired).length;
|
|
273
|
-
const liveW = (rc.weekly || []).filter(c => !c.expired).length;
|
|
274
|
-
if (liveW) tags.push(green(`reset wk×${liveW}`));
|
|
275
|
-
if (live5) tags.push(green(`reset 5h×${live5}`));
|
|
276
|
-
}
|
|
277
|
-
const rg = a?.resetGrants;
|
|
278
|
-
if (rg?.eligible) {
|
|
279
|
-
const live = (rg.grants || []).filter(g => g.usableNow && !g.expired).length;
|
|
280
|
-
if (live) tags.push(green(`reset×${live}`));
|
|
281
|
-
}
|
|
282
271
|
return tags;
|
|
283
272
|
}
|
|
284
273
|
|
|
@@ -2147,8 +2136,25 @@ export class TUI {
|
|
|
2147
2136
|
// Widened from 10 to fit "throttled 59s" so the quota bars stay column-aligned.
|
|
2148
2137
|
status = rpad(status, STATUS_W);
|
|
2149
2138
|
|
|
2139
|
+
// Rst column — banked limit resets (owner request 2026-09-30: a separate
|
|
2140
|
+
// column showing 0 or the count). z.ai cards + Claude cedar_ember grants,
|
|
2141
|
+
// not-yet-expired, on ENABLED accounts only: a disabled account's resets are
|
|
2142
|
+
// not ours to spend, and showing a count there would imply otherwise.
|
|
2143
|
+
let resetsCell;
|
|
2144
|
+
{
|
|
2145
|
+
let n = 0;
|
|
2146
|
+
if (a.enabled !== false) {
|
|
2147
|
+
const rc = a.resetCards;
|
|
2148
|
+
if (rc) n += (rc.fiveHour || []).filter(c => !c.expired).length
|
|
2149
|
+
+ (rc.weekly || []).filter(c => !c.expired).length;
|
|
2150
|
+
const rg = a.resetGrants;
|
|
2151
|
+
if (rg?.eligible) n += (rg.grants || []).filter(g => g.usableNow && !g.expired).length;
|
|
2152
|
+
}
|
|
2153
|
+
resetsCell = rpad(n > 0 ? green(String(n)) : gray('0'), RESETS_W);
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2150
2156
|
if (a.type === 'provider') {
|
|
2151
|
-
return this._renderProviderAcct(sel, cur, name, type, status, a, bw, showBoth);
|
|
2157
|
+
return this._renderProviderAcct(sel, cur, name, type, status + ' ' + resetsCell, a, bw, showBoth);
|
|
2152
2158
|
}
|
|
2153
2159
|
|
|
2154
2160
|
// Quota ratios — prefer unified (Claude Max), fall back to standard (API key)
|
|
@@ -2171,7 +2177,7 @@ export class TUI {
|
|
|
2171
2177
|
t2 = t1;
|
|
2172
2178
|
}
|
|
2173
2179
|
|
|
2174
|
-
let line = ` ${sel}${cur} ${name} ${type} ${status} ${l1} ${bar(r1, bw, t1)}`;
|
|
2180
|
+
let line = ` ${sel}${cur} ${name} ${type} ${status} ${resetsCell} ${l1} ${bar(r1, bw, t1)}`;
|
|
2175
2181
|
if (showBoth) {
|
|
2176
2182
|
// "no weekly cap on this plan" is a DIFFERENT state from "not read yet", and
|
|
2177
2183
|
// both render as an empty bar. Say which, so a healthy uncapped account
|