clawmoney 0.15.52 → 0.15.54

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.
@@ -2,6 +2,7 @@ import { execSync } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
+ import * as readline from "node:readline";
5
6
  import { intro, outro, multiselect, select, spinner, isCancel, cancel, log, } from "@clack/prompts";
6
7
  import chalk from "chalk";
7
8
  import { apiPost } from "../utils/api.js";
@@ -221,38 +222,38 @@ export async function relaySetupCommand() {
221
222
  // Only claude is wired up for now; codex/gemini will follow the
222
223
  // same pattern.
223
224
  if (selectedClis.includes("claude") && !hasClaudeFingerprint()) {
224
- // Spinner animation only works cleanly on real TTYs where `\r`
225
- // cursor-return is honored. Claude Code's bash tool, CI pipes,
226
- // and `script`-style wrappers render each spinner frame as a
227
- // new line, which stacks 100+ frames over a 10-15s bootstrap.
228
- // Fall back to static log steps in those contexts.
229
- const isTty = Boolean(process.stdout.isTTY);
230
- const bootSpin = isTty ? spinner() : null;
231
- if (bootSpin) {
232
- bootSpin.start("Capturing Claude fingerprint (runs `claude -p hi` once, ~5-15s)");
233
- }
234
- else {
235
- log.step("Capturing Claude fingerprint (runs `claude -p hi` once, ~5-15s)...");
236
- }
237
- try {
238
- const fp = await bootstrapClaudeFingerprint({ timeoutMs: 45_000 });
239
- const successMsg = `Claude fingerprint captured ` +
240
- chalk.dim(`(device=${fp.device_id.slice(0, 8)}… cc_version=${fp.cc_version || "?"})`);
241
- if (bootSpin) {
242
- bootSpin.stop(`${chalk.green("✓")} ${successMsg}`);
225
+ // In-place line replacement: write a "Capturing…" start line
226
+ // without a trailing newline, then on completion clear that
227
+ // line and write the final success / failure line over it.
228
+ // Uses readline.cursorTo/clearLine rather than raw \r because
229
+ // some terminal environments don't process \r as cursor-return
230
+ // (see earlier iteration history — the clack spinner accumulated
231
+ // frames in Jack's terminal). Falls back cleanly: if the clear
232
+ // fails, the worst case is two lines instead of one.
233
+ const startLine = `${chalk.gray("◇")} Capturing Claude fingerprint ` +
234
+ chalk.dim("(runs `claude -p hi` once, ~5-15s)");
235
+ process.stdout.write(startLine);
236
+ const clearStartLine = () => {
237
+ try {
238
+ readline.cursorTo(process.stdout, 0);
239
+ readline.clearLine(process.stdout, 0);
243
240
  }
244
- else {
245
- log.success(successMsg);
241
+ catch {
242
+ // non-TTY — just move to a new line and let the result
243
+ // print underneath the start line.
244
+ process.stdout.write("\n");
246
245
  }
246
+ };
247
+ try {
248
+ const fp = await bootstrapClaudeFingerprint({ timeoutMs: 45_000 });
249
+ clearStartLine();
250
+ process.stdout.write(`${chalk.green("◆")} Claude fingerprint captured ` +
251
+ chalk.dim(`(device=${fp.device_id.slice(0, 8)}… cc_version=${fp.cc_version || "?"})`) +
252
+ "\n");
247
253
  }
248
254
  catch (err) {
249
- const errMsg = `Claude fingerprint capture failed: ${err.message}`;
250
- if (bootSpin) {
251
- bootSpin.stop(chalk.yellow(`⚠ ${errMsg}`));
252
- }
253
- else {
254
- log.warn(errMsg);
255
- }
255
+ clearStartLine();
256
+ process.stdout.write(`${chalk.yellow("⚠")} Claude fingerprint capture failed: ${err.message}\n`);
256
257
  log.message(chalk.dim("Claude providers will be registered but the daemon won't be able " +
257
258
  "to serve them until you bootstrap the fingerprint. " +
258
259
  "Make sure `claude` is installed and logged in, then re-run setup."));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.15.52",
3
+ "version": "0.15.54",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {