@blockrun/franklin 3.15.95 → 3.15.96
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/commands/doctor.js +19 -5
- package/package.json +1 -1
package/dist/commands/doctor.js
CHANGED
|
@@ -108,13 +108,27 @@ async function runChecks() {
|
|
|
108
108
|
status: 'ok',
|
|
109
109
|
detail: `${walletAddress.slice(0, 10)}…${walletAddress.slice(-6)}`,
|
|
110
110
|
});
|
|
111
|
+
// Tiered balance status. Binary `> 0` was misleading — verified
|
|
112
|
+
// 2026-05-11 from a real run: doctor printed `✓ USDC balance
|
|
113
|
+
// $0.37` (green) on a wallet that couldn't fund a single Opus
|
|
114
|
+
// call ($0.50+ each). Threshold of $1.00 covers ~10 cheap-model
|
|
115
|
+
// calls or ~2 mid-tier calls — anything below that is
|
|
116
|
+
// operationally empty for paid workflows. Free models still work.
|
|
117
|
+
const LOW_BALANCE_THRESHOLD = 1.00;
|
|
118
|
+
const balanceStatus = walletBalance >= LOW_BALANCE_THRESHOLD ? 'ok' : 'warn';
|
|
119
|
+
const balanceDetail = walletBalance === 0
|
|
120
|
+
? '$0.00 — free-tier models only (no paid calls possible)'
|
|
121
|
+
: walletBalance < LOW_BALANCE_THRESHOLD
|
|
122
|
+
? `$${walletBalance.toFixed(2)} — low; paid calls likely to fail mid-stream`
|
|
123
|
+
: `$${walletBalance.toFixed(2)}`;
|
|
124
|
+
const balanceRemedy = walletBalance < LOW_BALANCE_THRESHOLD
|
|
125
|
+
? `Send USDC on ${chain} to ${walletAddress} (or open http://localhost:3100/#wallet)`
|
|
126
|
+
: undefined;
|
|
111
127
|
out.push({
|
|
112
128
|
name: 'USDC balance',
|
|
113
|
-
status:
|
|
114
|
-
detail:
|
|
115
|
-
remedy:
|
|
116
|
-
? `Send USDC on ${chain} to ${walletAddress} to unlock paid models`
|
|
117
|
-
: undefined,
|
|
129
|
+
status: balanceStatus,
|
|
130
|
+
detail: balanceDetail,
|
|
131
|
+
remedy: balanceRemedy,
|
|
118
132
|
});
|
|
119
133
|
}
|
|
120
134
|
catch (err) {
|
package/package.json
CHANGED