clawmoney 0.17.10 → 0.17.13

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.
@@ -1,4 +1,4 @@
1
- import { intro, outro, multiselect, text, confirm, spinner, isCancel, cancel, log, note, } from "@clack/prompts";
1
+ import { intro, outro, groupMultiselect, text, confirm, spinner, isCancel, cancel, log, note, } from "@clack/prompts";
2
2
  import chalk from "chalk";
3
3
  import { apiPost } from "../utils/api.js";
4
4
  import { loadConfig } from "../utils/config.js";
@@ -108,25 +108,28 @@ export async function marketSetupCommand(opts = {}) {
108
108
  intro(chalk.cyan(" ClawMoney Market Setup "));
109
109
  }
110
110
  log.message("Register one or more skills on the Market so other agents can call (and pay) you.");
111
- // ── Step 1: multiselect categories. clack's multiselect has no native
112
- // separators / disabled rows, so we don't try to draw section headers —
113
- // any non-selectable row in the option list ends up looking selectable
114
- // (with predictable user confusion). Instead we just sort so that all
115
- // instant skills come first, then the single escrow, then the lone
116
- // "auto" fallback, and embed the routing label directly into each row.
117
- const orderedAll = [
118
- ...CATEGORIES.filter((c) => c.routing === "instant"),
119
- ...CATEGORIES.filter((c) => c.routing === "escrow"),
120
- ...CATEGORIES.filter((c) => c.routing === "auto"),
121
- ];
122
- // Pad the category name column so the routing tag lines up vertically.
123
- const nameColumnWidth = Math.max(...orderedAll.map((c) => c.value.length)) + 2;
124
- const picked = await multiselect({
111
+ // ── Step 1: groupMultiselect renders three native sections
112
+ // "Instant · poll for result", "Escrow · manual approve", "Auto · routed
113
+ // by price" with checkbox rows under each. Section titles are part of
114
+ // clack's group rendering, NOT selectable items, so the earlier confusion
115
+ // (title rows being accidentally tickable) is gone.
116
+ const instantRows = CATEGORIES.filter((c) => c.routing === "instant");
117
+ const escrowRows = CATEGORIES.filter((c) => c.routing === "escrow");
118
+ const autoRows = CATEGORIES.filter((c) => c.routing === "auto");
119
+ // Pad category names to the same width across all groups so the
120
+ // dim-colored timeout column lines up no matter which section it sits in.
121
+ const nameColumnWidth = Math.max(...CATEGORIES.map((c) => c.value.length)) + 2;
122
+ const renderRow = (row) => ({
123
+ value: row.value,
124
+ label: `${row.value.padEnd(nameColumnWidth, " ")}${chalk.dim(formatHint(row))}`,
125
+ });
126
+ const picked = await groupMultiselect({
125
127
  message: "Pick the skill categories to register (space to toggle, enter to confirm):",
126
- options: orderedAll.map((row) => ({
127
- value: row.value,
128
- label: `${row.value.padEnd(nameColumnWidth, " ")}${chalk.dim(formatHint(row))}`,
129
- })),
128
+ options: {
129
+ "Instant · poll for result": instantRows.map(renderRow),
130
+ "Escrow · manual approve": escrowRows.map(renderRow),
131
+ "Auto · routed by price": autoRows.map(renderRow),
132
+ },
130
133
  required: true,
131
134
  });
132
135
  if (isCancel(picked)) {
@@ -29,10 +29,8 @@ export async function providerSetupWizard() {
29
29
  console.log(chalk.red("\n No agent config found. Run `clawmoney setup` first to register.\n"));
30
30
  process.exit(1);
31
31
  }
32
- log.message(chalk.bold("Provider roles") +
33
- chalk.dim(" — pick what you want to earn from. You can re-run this anytime."));
34
32
  const picked = await multiselect({
35
- message: "Provider roles (space to toggle, enter to confirm):",
33
+ message: "Provider roles toggle with SPACE, confirm with ENTER (skip all to register no role):",
36
34
  options: ROLES.map((r) => ({
37
35
  value: r.value,
38
36
  label: r.label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.17.10",
3
+ "version": "0.17.13",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {