clawmoney 0.15.53 → 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,26 +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
- // Append-only progress: print the line once, then append a
225
- // single "." every 600ms until the bootstrap finishes. This
226
- // avoids the `\r`-based spinner that stacks frames in Jack's
227
- // terminal (see earlier iteration history), while still giving
228
- // visible "working…" feedback.
229
- process.stdout.write(`${chalk.gray("◇")} Capturing Claude fingerprint ${chalk.dim("(runs `claude -p hi` once, ~5-15s)")}`);
230
- const ticker = setInterval(() => {
231
- process.stdout.write(chalk.dim("."));
232
- }, 600);
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);
240
+ }
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");
245
+ }
246
+ };
233
247
  try {
234
248
  const fp = await bootstrapClaudeFingerprint({ timeoutMs: 45_000 });
235
- clearInterval(ticker);
236
- process.stdout.write("\n");
237
- log.success(`Claude fingerprint captured ` +
238
- chalk.dim(`(device=${fp.device_id.slice(0, 8)}… cc_version=${fp.cc_version || "?"})`));
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");
239
253
  }
240
254
  catch (err) {
241
- clearInterval(ticker);
242
- process.stdout.write("\n");
243
- log.warn(`Claude fingerprint capture failed: ${err.message}`);
255
+ clearStartLine();
256
+ process.stdout.write(`${chalk.yellow("⚠")} Claude fingerprint capture failed: ${err.message}\n`);
244
257
  log.message(chalk.dim("Claude providers will be registered but the daemon won't be able " +
245
258
  "to serve them until you bootstrap the fingerprint. " +
246
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.53",
3
+ "version": "0.15.54",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {