clawmoney 0.15.32 → 0.15.33

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.
@@ -346,7 +346,36 @@ export async function relaySetupCommand() {
346
346
  log.warn(`${f.cli}/${f.model}: ${chalk.dim(f.error.slice(0, 120))}`);
347
347
  }
348
348
  }
349
- // ── Step 7: auto-start the daemon ──
349
+ // ── Step 7: prune — implement "pick-what-you-run" semantics ──
350
+ //
351
+ // setup is meant to be declarative: the cli_types the user just picked
352
+ // are the complete set of what the daemon should serve. Earlier test
353
+ // runs that registered different subscriptions (antigravity, gemini,
354
+ // etc.) would otherwise linger in the DB and get preflighted every
355
+ // daemon start, confusing the user who just picked claude+codex.
356
+ //
357
+ // We only prune AFTER registration succeeds, so a failed batch doesn't
358
+ // wipe the user's existing state. And we only send the selected
359
+ // cli_types as keep_cli_types — the backend handles the "delete what's
360
+ // not in the list" part.
361
+ try {
362
+ const pruneResp = await apiPost("/api/v1/relay/providers/prune", { keep_cli_types: Array.from(new Set(selectedClis)) }, config.api_key);
363
+ if (pruneResp.ok &&
364
+ pruneResp.data?.deleted &&
365
+ pruneResp.data.deleted.length > 0) {
366
+ log.success(`Cleaned up ${pruneResp.data.deleted.length} provider(s) from earlier runs ` +
367
+ chalk.dim("(" +
368
+ Array.from(new Set(pruneResp.data.deleted.map((d) => d.cli_type))).join(", ") +
369
+ ")"));
370
+ }
371
+ }
372
+ catch (err) {
373
+ // Non-fatal: worst case is the daemon preflights extra cli_types,
374
+ // which is annoying but doesn't break anything.
375
+ log.warn(`Could not prune old providers: ${err.message} — ` +
376
+ `run \`clawmoney relay status\` and clean manually if needed`);
377
+ }
378
+ // ── Step 8: auto-start the daemon ──
350
379
  //
351
380
  // The daemon now runs in multi-cli auto mode by default: it fetches
352
381
  // every provider this agent has registered, preflights each distinct
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.15.32",
3
+ "version": "0.15.33",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {