clementine-agent 1.18.187 → 1.18.188

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.
@@ -217,7 +217,21 @@ export async function runAgent(prompt, opts) {
217
217
  // 0 (or undefined) means "no cap" — matches the dashboard's
218
218
  // "Remove spend caps" preset contract. We omit `maxBudgetUsd` from
219
219
  // sdkOptions entirely in that case so the SDK runs uncapped.
220
- const requestedBudget = opts.maxBudgetUsd ?? DEFAULT_BUDGETS[source];
220
+ //
221
+ // 1.18.188 — dashboard-is-boss extends to DEFAULT_BUDGETS too. When
222
+ // ALL global BUDGET_*_USD are 0 ("no budget anywhere" mode), the
223
+ // hardcoded DEFAULT_BUDGETS fallback yields. Without this, a bg task
224
+ // spawned from chat overflow (source='cron') still hit the $1.00
225
+ // hardcoded cron default even with every dashboard cap set to 0 —
226
+ // exactly the failure Zach reported on 2026-05-12. Resolution order:
227
+ // 1. Caller's explicit options.maxBudgetUsd wins (explicit > implicit)
228
+ // 2. If global all-zero → undefined (no cap)
229
+ // 3. Otherwise DEFAULT_BUDGETS[source] fires as last resort
230
+ const { BUDGET } = await import('../config.js');
231
+ const globalCapsAllZero = BUDGET.heartbeat === 0 && BUDGET.cronT1 === 0 &&
232
+ BUDGET.cronT2 === 0 && BUDGET.chat === 0;
233
+ const requestedBudget = opts.maxBudgetUsd
234
+ ?? (globalCapsAllZero ? undefined : DEFAULT_BUDGETS[source]);
221
235
  const maxBudgetUsd = typeof requestedBudget === 'number' && requestedBudget > 0
222
236
  ? requestedBudget
223
237
  : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.18.187",
3
+ "version": "1.18.188",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",