polymath-society 0.2.14 → 0.2.16

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.
Files changed (2) hide show
  1. package/dist/cli.js +21 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2220,7 +2220,7 @@ async function sayExportLinks(say, haveKinds) {
2220
2220
  say(` ${bold(l.label)}${have ? green(" \u2713 already have one") : ""} ${osc82(l.requestUrl, l.requestUrl)}`);
2221
2221
  say(` ${l.buttonPath} \xB7 ${l.eta}`);
2222
2222
  }
2223
- say(` ${dim("Run polymath-society again once a download lands \u2014 it finds the zip on its own.")}`);
2223
+ say(` Run polymath-society again once a download lands \u2014 it finds the zip on its own.`);
2224
2224
  say();
2225
2225
  }
2226
2226
  function describeExport(f, i, included, hadPrevious) {
@@ -2259,31 +2259,39 @@ async function runWizard() {
2259
2259
  }
2260
2260
  });
2261
2261
  const ask = async (q) => {
2262
- process.stderr.write(q);
2262
+ say(q);
2263
2263
  if (lineQueue.length) {
2264
2264
  const l = lineQueue.shift();
2265
- process.stderr.write(l + "\n");
2265
+ process.stderr.write(`> ${l}
2266
+ `);
2266
2267
  return l.trim();
2267
2268
  }
2268
2269
  if (ended) {
2269
- process.stderr.write("\n");
2270
+ process.stderr.write("> \n");
2270
2271
  return "";
2271
2272
  }
2273
+ rl.setPrompt("> ");
2274
+ rl.prompt();
2272
2275
  return (await new Promise((res) => {
2273
2276
  waiting = res;
2274
2277
  })).trim();
2275
2278
  };
2276
2279
  const yes = async (q, def = true) => {
2277
- const a = (await ask(`${q} ${dim(def ? "(Y/n)" : "(y/N)")} `)).toLowerCase();
2278
- return a === "" ? def : a.startsWith("y");
2280
+ for (; ; ) {
2281
+ const a = (await ask(`${q} (y/n)`)).toLowerCase();
2282
+ if (a.startsWith("y")) return true;
2283
+ if (a.startsWith("n")) return false;
2284
+ if (ended) return def;
2285
+ say(` Type y or n (Enter does nothing here).`);
2286
+ }
2279
2287
  };
2280
2288
  const pick2 = async (defaults, hadPrevious) => {
2281
2289
  const hint = "(Enter = take everything into account \xB7 numbers to exclude, e.g. '2 4' \xB7 'all' = exclude everything)";
2282
2290
  for (; ; ) {
2283
- const a = await ask(` Exclude any? ${dim(hint)} `);
2291
+ const a = await ask(` Exclude any? ${hint}`);
2284
2292
  const r = parsePicker(a, defaults);
2285
2293
  if (r) return r;
2286
- say(dim(` Didn't understand "${a}" \u2014 numbers between 1 and ${defaults.length}, or all/none.`));
2294
+ say(` Didn't understand "${a}" \u2014 numbers between 1 and ${defaults.length}, or all/none.`);
2287
2295
  }
2288
2296
  };
2289
2297
  try {
@@ -2532,7 +2540,8 @@ function makeMultiBar(out = process.stderr) {
2532
2540
  };
2533
2541
  const paint = () => {
2534
2542
  if (!tty) return;
2535
- const r = rows();
2543
+ const width = Math.max(20, out.columns || 80);
2544
+ const r = rows().map((row) => row.length >= width ? row.slice(0, width - 2) + "\u2026" : row);
2536
2545
  out.write(r.join("\n"));
2537
2546
  paintedRows = r.length;
2538
2547
  };
@@ -2596,7 +2605,9 @@ function makeProgressBar(out = process.stderr) {
2596
2605
  };
2597
2606
  const paint = () => {
2598
2607
  if (!tty) return;
2599
- out.write(CLEAR + bar());
2608
+ const width = Math.max(20, out.columns || 80);
2609
+ const b = bar();
2610
+ out.write(CLEAR + (b.length >= width ? b.slice(0, width - 2) + "\u2026" : b));
2600
2611
  painted = true;
2601
2612
  };
2602
2613
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polymath-society",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Deterministic metrics from your local Claude Code / Codex agent logs — parallelism, flow, throughput, projects. Zero LLM, zero server, on-device.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",