clawmoney 0.15.16 → 0.15.18

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.
@@ -224,53 +224,57 @@ export async function relaySetupCommand() {
224
224
  cancel("No models selected — nothing to register");
225
225
  process.exit(0);
226
226
  }
227
- // ── Step 4: daily budget (the only product-level decision) ──
227
+ // ── Step 4: per-provider daily quota share ──
228
228
  //
229
- // Concurrency is silent (5, the "single power user" cap — explained
230
- // in the file header). daily_limit is the one variable that's a
231
- // product decision, not a technical one: it directly controls how
232
- // much you can earn (and how much subscription quota the relay
233
- // burns through per day). We offer three presets calibrated to
234
- // common provider postures, plus the implicit fall-through of
235
- // editing config.yaml after start for advanced overrides.
229
+ // We deliberately don't show USD earnings projections in this prompt
230
+ // because they'd be misleading:
236
231
  //
237
- // Earning math per provider (assuming 100% utilization):
238
- // max_earn_per_day = daily_limit × RELAY_DISCOUNT × (1 - PLATFORM_FEE)
239
- // = daily_limit × 0.20 × 0.90 = daily_limit × 0.18
240
- // max_earn_per_month max_earn_per_day × 30
232
+ // - `daily_limit_usd` is per-provider (per model row), not per-account.
233
+ // If a user registers 4 codex models on one ChatGPT account, total
234
+ // daily cap = 4 × this value, not this value. Showing "$15/day cap"
235
+ // makes them think it's their account-wide total.
236
+ //
237
+ // - Different models have wildly different prices (claude-opus is
238
+ // $5/$25 per Mtok, haiku is $1/$5). A flat USD cap means very
239
+ // different token volumes per model — there's no single "fair
240
+ // share" number we can show.
241
+ //
242
+ // - Multiple CLI families = multiple independent subscriptions. A
243
+ // user with claude + codex + gemini has three separate quota
244
+ // pools. A single "% of subscription" framing per the wizard
245
+ // can't express that cleanly.
246
+ //
247
+ // Solution: ask the user for a percentage (~10/25/50/100) which maps
248
+ // internally to a per-provider USD cap, but only SHOW the percentage
249
+ // in the prompt. Earnings depend on real buyer demand × per-model
250
+ // pricing × number of providers; we can't predict that, so we don't
251
+ // pretend to.
241
252
  const concurrency = 5;
242
- const earnPerMonth = (cap) => Math.round(cap * RELAY_DISCOUNT * (1 - PLATFORM_FEE) * 30);
243
- // Baseline: $60/day API cost ≈ a fully utilized Max-tier subscription's
244
- // daily quota (Claude Max 20x, ChatGPT Pro, etc.). Percentages are
245
- // computed off this baseline so users can intuit "I'm sharing X% of
246
- // a typical subscription's daily capacity". For Pro tier subs the
247
- // real percentage is higher (because their full quota is smaller),
248
- // but the USD cap is what actually matters technically.
249
253
  const dailyLimitChoice = await select({
250
- message: "How much of your subscription's spare capacity do you want to share?",
254
+ message: "Daily quota share per model? (applies independently to each model you register)",
251
255
  options: [
252
- {
253
- value: 6,
254
- label: `~10% · $6/day cap → ~$${earnPerMonth(6)}/month earnings`,
255
- hint: "light sharing — keeps most of your quota for personal use",
256
- },
257
256
  {
258
257
  value: 15,
259
- label: `~25% · $15/day cap → ~$${earnPerMonth(15)}/month earnings`,
260
- hint: "recommended — shares a quarter, leaves 75% for you",
258
+ label: "~25% · Light",
259
+ hint: "share a quarter, leaves 75% for your personal use",
261
260
  },
262
261
  {
263
262
  value: 30,
264
- label: `~50% · $30/day cap → ~$${earnPerMonth(30)}/month earnings`,
265
- hint: "heavy sharing half for you, half for relay",
263
+ label: "~50% · Balanced (recommended)",
264
+ hint: "splits each model's quota evenly between you and the relay",
265
+ },
266
+ {
267
+ value: 45,
268
+ label: "~75% · Heavy",
269
+ hint: "most of your subscription goes to relay, 25% reserved for personal use",
266
270
  },
267
271
  {
268
272
  value: 60,
269
- label: `~100% · $60/day cap → ~$${earnPerMonth(60)}/month earnings`,
270
- hint: "relay-focused — best for accounts dedicated to providing",
273
+ label: "~100% · Full",
274
+ hint: "dedicates your subscription to relay — best for accounts you don't use personally",
271
275
  },
272
276
  ],
273
- initialValue: 15,
277
+ initialValue: 30,
274
278
  });
275
279
  if (isCancel(dailyLimitChoice)) {
276
280
  cancel("Setup cancelled");
@@ -278,13 +282,22 @@ export async function relaySetupCommand() {
278
282
  }
279
283
  const dailyLimit = dailyLimitChoice;
280
284
  // ── Step 5: confirmation summary ──
285
+ // Translate the chosen daily-limit USD value back into the percentage
286
+ // label the user picked, so what they see in the summary matches what
287
+ // they answered in the prompt.
288
+ const limitLabel = {
289
+ 15: "~25% (Light)",
290
+ 30: "~50% (Balanced)",
291
+ 45: "~75% (Heavy)",
292
+ 60: "~100% (Full)",
293
+ };
281
294
  log.step(chalk.bold("Summary"));
282
295
  for (const r of registrations) {
283
296
  log.message(` ${chalk.cyan(r.cli + "/" + r.model).padEnd(50)} ${chalk.dim(formatBuyerPrice(r.input, r.output))}`);
284
297
  }
285
- log.message(chalk.dim(` ${registrations.length} provider(s) · concurrency=${concurrency}/provider · daily_limit=$${dailyLimit}/provider`));
298
+ log.message(chalk.dim(` ${registrations.length} provider(s) · ${limitLabel[dailyLimit] ?? `$${dailyLimit}/day cap`} per model`));
286
299
  log.message(chalk.dim(` You earn ~${Math.round((1 - PLATFORM_FEE) * 100)}% of what buyers pay (after platform fee)`));
287
- log.message(chalk.dim(` To customize: edit ~/.clawmoney/config.yaml after start, or re-register a single model via "clawmoney relay register --cli X --model Y --concurrency N --daily-limit M"`));
300
+ log.message(chalk.dim(` To customize: edit ~/.clawmoney/config.yaml after start`));
288
301
  const proceed = await confirm({
289
302
  message: `Register all ${registrations.length} providers now?`,
290
303
  initialValue: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.15.16",
3
+ "version": "0.15.18",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {