@blockrun/franklin 3.10.5 → 3.10.6
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/agent/loop.js +6 -2
- package/package.json +1 -1
package/dist/agent/loop.js
CHANGED
|
@@ -1122,10 +1122,14 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
|
|
|
1122
1122
|
// ── Circuit breakers: prevent infinite-loop wallet drain ──
|
|
1123
1123
|
turnSpend += costEstimate;
|
|
1124
1124
|
if (turnSpend > MAX_TURN_SPEND_USD) {
|
|
1125
|
+
const capDisplay = MAX_TURN_SPEND_USD === Infinity ? '∞' : `$${MAX_TURN_SPEND_USD.toFixed(2)}`;
|
|
1125
1126
|
onEvent({
|
|
1126
1127
|
kind: 'text_delta',
|
|
1127
|
-
text: `\n\n⚠️ Turn spend limit reached ($${turnSpend.toFixed(3)} >
|
|
1128
|
-
`
|
|
1128
|
+
text: `\n\n⚠️ Turn spend limit reached ($${turnSpend.toFixed(3)} > ${capDisplay}). Stopping to protect your wallet.\n\n` +
|
|
1129
|
+
`What to do next — pick ONE (do NOT just type a number, that becomes a new prompt):\n` +
|
|
1130
|
+
` • Continue this turn: /retry\n` +
|
|
1131
|
+
` • Raise cap to $4: franklin config set max-turn-spend-usd 4\n` +
|
|
1132
|
+
` • Disable cap entirely: franklin config set max-turn-spend-usd 0 (then /retry)\n`,
|
|
1129
1133
|
});
|
|
1130
1134
|
onEvent({ kind: 'turn_done', reason: 'budget' });
|
|
1131
1135
|
break;
|
package/package.json
CHANGED