conare 0.6.2 → 0.6.4

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/index.js +45 -360
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1023,21 +1023,6 @@ function Y(e, u, t) {
1023
1023
  `).map((F) => lD(F, u, t)).join(`
1024
1024
  `);
1025
1025
  }
1026
- function cD(e) {
1027
- for (const u in e) {
1028
- const t = u;
1029
- if (!Object.hasOwn(e, t))
1030
- continue;
1031
- const F = e[t];
1032
- switch (t) {
1033
- case "aliases": {
1034
- for (const s in F)
1035
- Object.hasOwn(F, s) && (B.aliases.has(s) || B.aliases.set(s, F[s]));
1036
- break;
1037
- }
1038
- }
1039
- }
1040
- }
1041
1026
  function $(e, u) {
1042
1027
  if (typeof e == "string")
1043
1028
  return B.aliases.get(e) === u;
@@ -1245,14 +1230,7 @@ var import_sisteransi, import_picocolors, uD, W, tD, eD, FD = function() {
1245
1230
  ` && (s && o && (F += z(s)), i && (F += K(i)));
1246
1231
  }
1247
1232
  return F;
1248
- }, xD, B, AD, S, gD, vD = (e, u, t) => (u in e) ? gD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, h = (e, u, t) => (vD(e, typeof u != "symbol" ? u + "" : u, t), t), dD, mD, bD = (e, u, t) => (u in e) ? mD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, Z = (e, u, t) => (bD(e, typeof u != "symbol" ? u + "" : u, t), t), q = (e, u, t) => {
1249
- if (!u.has(e))
1250
- throw TypeError("Cannot " + t);
1251
- }, T = (e, u, t) => (q(e, u, "read from private field"), t ? t.call(e) : u.get(e)), wD = (e, u, t) => {
1252
- if (u.has(e))
1253
- throw TypeError("Cannot add the same private member more than once");
1254
- u instanceof WeakSet ? u.add(e) : u.set(e, t);
1255
- }, yD = (e, u, t, F) => (q(e, u, "write to private field"), F ? F.call(e, t) : u.set(e, t), t), A, _D, kD, $D = (e, u, t) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, H = (e, u, t) => ($D(e, typeof u != "symbol" ? u + "" : u, t), t), SD, TD, jD = (e, u, t) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, U = (e, u, t) => (jD(e, typeof u != "symbol" ? u + "" : u, t), t), MD, OD, PD = (e, u, t) => (u in e) ? OD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, J = (e, u, t) => (PD(e, typeof u != "symbol" ? u + "" : u, t), t), LD, WD, ND = (e, u, t) => (u in e) ? WD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, Q = (e, u, t) => (ND(e, typeof u != "symbol" ? u + "" : u, t), t), ID, RD;
1233
+ }, xD, B, AD, S, gD, vD = (e, u, t) => (u in e) ? gD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, h = (e, u, t) => (vD(e, typeof u != "symbol" ? u + "" : u, t), t), A, kD, $D = (e, u, t) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, H = (e, u, t) => ($D(e, typeof u != "symbol" ? u + "" : u, t), t), SD, TD, jD = (e, u, t) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, U = (e, u, t) => (jD(e, typeof u != "symbol" ? u + "" : u, t), t), MD, OD, PD = (e, u, t) => (u in e) ? OD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, J = (e, u, t) => (PD(e, typeof u != "symbol" ? u + "" : u, t), t), LD;
1256
1234
  var init_dist = __esm(() => {
1257
1235
  import_sisteransi = __toESM(require_src(), 1);
1258
1236
  import_picocolors = __toESM(require_picocolors(), 1);
@@ -1304,67 +1282,6 @@ var init_dist = __esm(() => {
1304
1282
  AD = globalThis.process.platform.startsWith("win");
1305
1283
  S = Symbol("clack:cancel");
1306
1284
  gD = Object.defineProperty;
1307
- dD = class dD extends x {
1308
- get cursor() {
1309
- return this.value ? 0 : 1;
1310
- }
1311
- get _value() {
1312
- return this.cursor === 0;
1313
- }
1314
- constructor(u) {
1315
- super(u, false), this.value = !!u.initialValue, this.on("value", () => {
1316
- this.value = this._value;
1317
- }), this.on("confirm", (t) => {
1318
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
1319
- }), this.on("cursor", () => {
1320
- this.value = !this.value;
1321
- });
1322
- }
1323
- };
1324
- mD = Object.defineProperty;
1325
- _D = class extends x {
1326
- constructor(u) {
1327
- super(u, false), Z(this, "options"), Z(this, "cursor", 0), wD(this, A, undefined);
1328
- const { options: t } = u;
1329
- yD(this, A, u.selectableGroups !== false), this.options = Object.entries(t).flatMap(([F, s]) => [{ value: F, group: true, label: F }, ...s.map((i) => ({ ...i, group: F }))]), this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), T(this, A) ? 0 : 1), this.on("cursor", (F) => {
1330
- switch (F) {
1331
- case "left":
1332
- case "up": {
1333
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1334
- const s = this.options[this.cursor]?.group === true;
1335
- !T(this, A) && s && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
1336
- break;
1337
- }
1338
- case "down":
1339
- case "right": {
1340
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1341
- const s = this.options[this.cursor]?.group === true;
1342
- !T(this, A) && s && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
1343
- break;
1344
- }
1345
- case "space":
1346
- this.toggleValue();
1347
- break;
1348
- }
1349
- });
1350
- }
1351
- getGroupItems(u) {
1352
- return this.options.filter((t) => t.group === u);
1353
- }
1354
- isGroupSelected(u) {
1355
- return this.getGroupItems(u).every((t) => this.value.includes(t.value));
1356
- }
1357
- toggleValue() {
1358
- const u = this.options[this.cursor];
1359
- if (u.group === true) {
1360
- const t = u.value, F = this.getGroupItems(t);
1361
- this.isGroupSelected(t) ? this.value = this.value.filter((s) => F.findIndex((i) => i.value === s) === -1) : this.value = [...this.value, ...F.map((s) => s.value)], this.value = Array.from(new Set(this.value));
1362
- } else {
1363
- const t = this.value.includes(u.value);
1364
- this.value = t ? this.value.filter((F) => F !== u.value) : [...this.value, u.value];
1365
- }
1366
- }
1367
- };
1368
1285
  A = new WeakMap;
1369
1286
  kD = Object.defineProperty;
1370
1287
  SD = class extends x {
@@ -1444,67 +1361,15 @@ var init_dist = __esm(() => {
1444
1361
  this.value = this._value.value;
1445
1362
  }
1446
1363
  };
1447
- WD = Object.defineProperty;
1448
- ID = class ID extends x {
1449
- constructor(u) {
1450
- super(u, false), Q(this, "options"), Q(this, "cursor", 0), this.options = u.options;
1451
- const t = this.options.map(({ value: [F] }) => F?.toLowerCase());
1452
- this.cursor = Math.max(t.indexOf(u.initialValue), 0), this.on("key", (F) => {
1453
- if (!t.includes(F))
1454
- return;
1455
- const s = this.options.find(({ value: [i] }) => i?.toLowerCase() === F);
1456
- s && (this.value = s.value, this.state = "submit", this.emit("submit"));
1457
- });
1458
- }
1459
- };
1460
- RD = class RD extends x {
1461
- get valueWithCursor() {
1462
- if (this.state === "submit")
1463
- return this.value;
1464
- if (this.cursor >= this.value.length)
1465
- return `${this.value}█`;
1466
- const u = this.value.slice(0, this.cursor), [t, ...F] = this.value.slice(this.cursor);
1467
- return `${u}${import_picocolors.default.inverse(t)}${F.join("")}`;
1468
- }
1469
- get cursor() {
1470
- return this._cursor;
1471
- }
1472
- constructor(u) {
1473
- super(u), this.on("finalize", () => {
1474
- this.value || (this.value = u.defaultValue);
1475
- });
1476
- }
1477
- };
1478
1364
  });
1479
1365
 
1480
1366
  // node_modules/@clack/prompts/dist/index.mjs
1481
- var exports_dist = {};
1482
- __export(exports_dist, {
1483
- updateSettings: () => cD,
1484
- text: () => he,
1485
- tasks: () => Te,
1486
- stream: () => x2,
1487
- spinner: () => Y2,
1488
- selectKey: () => we,
1489
- select: () => ve,
1490
- password: () => ge,
1491
- outro: () => Se,
1492
- note: () => Me,
1493
- multiselect: () => fe,
1494
- log: () => M2,
1495
- isCancel: () => pD,
1496
- intro: () => Ie,
1497
- groupMultiselect: () => be,
1498
- group: () => Ce,
1499
- confirm: () => ye,
1500
- cancel: () => xe
1501
- });
1502
1367
  import { stripVTControlCharacters as S2 } from "node:util";
1503
1368
  import y2 from "node:process";
1504
1369
  function ce() {
1505
1370
  return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1506
1371
  }
1507
- var import_picocolors2, import_sisteransi2, V2, u = (t, n) => V2 ? t : n, le, L2, W2, C, ue, o, d2, k2, P2, A2, T2, F, $e, _2, me, de, pe, q2, D, U2, K2, b2 = (t) => {
1372
+ var import_picocolors2, import_sisteransi2, V2, u = (t, n) => V2 ? t : n, le, L2, W2, C, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U2, K2, b2 = (t) => {
1508
1373
  switch (t) {
1509
1374
  case "initial":
1510
1375
  case "active":
@@ -1525,27 +1390,7 @@ var import_picocolors2, import_sisteransi2, V2, u = (t, n) => V2 ? t : n, le, L2
1525
1390
  const j2 = v2 === 0 && $2, E = v2 === f.length - 1 && g2;
1526
1391
  return j2 || E ? import_picocolors2.default.dim("...") : i(p2, v2 + l2 === n);
1527
1392
  });
1528
- }, he = (t) => new RD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
1529
- const n = `${import_picocolors2.default.gray(o)}
1530
- ${b2(this.state)} ${t.message}
1531
- `, r2 = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : r2;
1532
- switch (this.state) {
1533
- case "error":
1534
- return `${n.trim()}
1535
- ${import_picocolors2.default.yellow(o)} ${i}
1536
- ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
1537
- `;
1538
- case "submit":
1539
- return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
1540
- case "cancel":
1541
- return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
1542
- ${import_picocolors2.default.gray(o)}` : ""}`;
1543
- default:
1544
- return `${n}${import_picocolors2.default.cyan(o)} ${i}
1545
- ${import_picocolors2.default.cyan(d2)}
1546
- `;
1547
- }
1548
- } }).prompt(), ge = (t) => new MD({ validate: t.validate, mask: t.mask ?? $e, render() {
1393
+ }, ge = (t) => new MD({ validate: t.validate, mask: t.mask ?? $e, render() {
1549
1394
  const n = `${import_picocolors2.default.gray(o)}
1550
1395
  ${b2(this.state)} ${t.message}
1551
1396
  `, r2 = this.valueWithCursor, i = this.masked;
@@ -1565,25 +1410,7 @@ ${import_picocolors2.default.gray(o)}` : ""}`;
1565
1410
  ${import_picocolors2.default.cyan(d2)}
1566
1411
  `;
1567
1412
  }
1568
- } }).prompt(), ye = (t) => {
1569
- const n = t.active ?? "Yes", r2 = t.inactive ?? "No";
1570
- return new dD({ active: n, inactive: r2, initialValue: t.initialValue ?? true, render() {
1571
- const i = `${import_picocolors2.default.gray(o)}
1572
- ${b2(this.state)} ${t.message}
1573
- `, s = this.value ? n : r2;
1574
- switch (this.state) {
1575
- case "submit":
1576
- return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(s)}`;
1577
- case "cancel":
1578
- return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}
1579
- ${import_picocolors2.default.gray(o)}`;
1580
- default:
1581
- return `${i}${import_picocolors2.default.cyan(o)} ${this.value ? `${import_picocolors2.default.green(k2)} ${n}` : `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(r2)}` : `${import_picocolors2.default.green(k2)} ${r2}`}
1582
- ${import_picocolors2.default.cyan(d2)}
1583
- `;
1584
- }
1585
- } }).prompt();
1586
- }, ve = (t) => {
1413
+ } }).prompt(), ve = (t) => {
1587
1414
  const n = (r2, i) => {
1588
1415
  const s = r2.label ?? String(r2.value);
1589
1416
  switch (i) {
@@ -1611,35 +1438,13 @@ ${import_picocolors2.default.gray(o)}`;
1611
1438
  return `${r2}${import_picocolors2.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (i, s) => n(i, s ? "active" : "inactive") }).join(`
1612
1439
  ${import_picocolors2.default.cyan(o)} `)}
1613
1440
  ${import_picocolors2.default.cyan(d2)}
1614
- `;
1615
- }
1616
- } }).prompt();
1617
- }, we = (t) => {
1618
- const n = (r2, i = "inactive") => {
1619
- const s = r2.label ?? String(r2.value);
1620
- return i === "selected" ? `${import_picocolors2.default.dim(s)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : i === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${r2.value} `))} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${r2.value} `)))} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}`;
1621
- };
1622
- return new ID({ options: t.options, initialValue: t.initialValue, render() {
1623
- const r2 = `${import_picocolors2.default.gray(o)}
1624
- ${b2(this.state)} ${t.message}
1625
- `;
1626
- switch (this.state) {
1627
- case "submit":
1628
- return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options.find((i) => i.value === this.value) ?? t.options[0], "selected")}`;
1629
- case "cancel":
1630
- return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[0], "cancelled")}
1631
- ${import_picocolors2.default.gray(o)}`;
1632
- default:
1633
- return `${r2}${import_picocolors2.default.cyan(o)} ${this.options.map((i, s) => n(i, s === this.cursor ? "active" : "inactive")).join(`
1634
- ${import_picocolors2.default.cyan(o)} `)}
1635
- ${import_picocolors2.default.cyan(d2)}
1636
1441
  `;
1637
1442
  }
1638
1443
  } }).prompt();
1639
1444
  }, fe = (t) => {
1640
1445
  const n = (r2, i) => {
1641
1446
  const s = r2.label ?? String(r2.value);
1642
- return i === "active" ? `${import_picocolors2.default.cyan(A2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "selected" ? `${import_picocolors2.default.green(T2)} ${import_picocolors2.default.dim(s)} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : i === "active-selected" ? `${import_picocolors2.default.green(T2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "submitted" ? `${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.dim(F)} ${import_picocolors2.default.dim(s)}`;
1447
+ return i === "active" ? `${import_picocolors2.default.cyan(A2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "selected" ? `${import_picocolors2.default.green(T)} ${import_picocolors2.default.dim(s)} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : i === "active-selected" ? `${import_picocolors2.default.green(T)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}` : i === "submitted" ? `${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.dim(F)} ${import_picocolors2.default.dim(s)}`;
1643
1448
  };
1644
1449
  return new SD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(r2) {
1645
1450
  if (this.required && r2.length === 0)
@@ -1673,66 +1478,6 @@ ${s}
1673
1478
  return `${r2}${import_picocolors2.default.cyan(o)} ${G2({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: i }).join(`
1674
1479
  ${import_picocolors2.default.cyan(o)} `)}
1675
1480
  ${import_picocolors2.default.cyan(d2)}
1676
- `;
1677
- }
1678
- } }).prompt();
1679
- }, be = (t) => {
1680
- const { selectableGroups: n = true } = t, r2 = (i, s, c = []) => {
1681
- const a = i.label ?? String(i.value), l2 = typeof i.group == "string", $2 = l2 && (c[c.indexOf(i) + 1] ?? { group: true }), g2 = l2 && $2.group === true, p2 = l2 ? n ? `${g2 ? d2 : o} ` : " " : "";
1682
- if (s === "active")
1683
- return `${import_picocolors2.default.dim(p2)}${import_picocolors2.default.cyan(A2)} ${a} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}`;
1684
- if (s === "group-active")
1685
- return `${p2}${import_picocolors2.default.cyan(A2)} ${import_picocolors2.default.dim(a)}`;
1686
- if (s === "group-active-selected")
1687
- return `${p2}${import_picocolors2.default.green(T2)} ${import_picocolors2.default.dim(a)}`;
1688
- if (s === "selected") {
1689
- const f = l2 || n ? import_picocolors2.default.green(T2) : "";
1690
- return `${import_picocolors2.default.dim(p2)}${f} ${import_picocolors2.default.dim(a)} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}`;
1691
- }
1692
- if (s === "cancelled")
1693
- return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(a))}`;
1694
- if (s === "active-selected")
1695
- return `${import_picocolors2.default.dim(p2)}${import_picocolors2.default.green(T2)} ${a} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}`;
1696
- if (s === "submitted")
1697
- return `${import_picocolors2.default.dim(a)}`;
1698
- const v2 = l2 || n ? import_picocolors2.default.dim(F) : "";
1699
- return `${import_picocolors2.default.dim(p2)}${v2} ${import_picocolors2.default.dim(a)}`;
1700
- };
1701
- return new _D({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, selectableGroups: n, validate(i) {
1702
- if (this.required && i.length === 0)
1703
- return `Please select at least one option.
1704
- ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
1705
- }, render() {
1706
- const i = `${import_picocolors2.default.gray(o)}
1707
- ${b2(this.state)} ${t.message}
1708
- `;
1709
- switch (this.state) {
1710
- case "submit":
1711
- return `${i}${import_picocolors2.default.gray(o)} ${this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => r2(s, "submitted")).join(import_picocolors2.default.dim(", "))}`;
1712
- case "cancel": {
1713
- const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => r2(c, "cancelled")).join(import_picocolors2.default.dim(", "));
1714
- return `${i}${import_picocolors2.default.gray(o)} ${s.trim() ? `${s}
1715
- ${import_picocolors2.default.gray(o)}` : ""}`;
1716
- }
1717
- case "error": {
1718
- const s = this.error.split(`
1719
- `).map((c, a) => a === 0 ? `${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(c)}` : ` ${c}`).join(`
1720
- `);
1721
- return `${i}${import_picocolors2.default.yellow(o)} ${this.options.map((c, a, l2) => {
1722
- const $2 = this.value.includes(c.value) || c.group === true && this.isGroupSelected(`${c.value}`), g2 = a === this.cursor;
1723
- return !g2 && typeof c.group == "string" && this.options[this.cursor].value === c.group ? r2(c, $2 ? "group-active-selected" : "group-active", l2) : g2 && $2 ? r2(c, "active-selected", l2) : $2 ? r2(c, "selected", l2) : r2(c, g2 ? "active" : "inactive", l2);
1724
- }).join(`
1725
- ${import_picocolors2.default.yellow(o)} `)}
1726
- ${s}
1727
- `;
1728
- }
1729
- default:
1730
- return `${i}${import_picocolors2.default.cyan(o)} ${this.options.map((s, c, a) => {
1731
- const l2 = this.value.includes(s.value) || s.group === true && this.isGroupSelected(`${s.value}`), $2 = c === this.cursor;
1732
- return !$2 && typeof s.group == "string" && this.options[this.cursor].value === s.group ? r2(s, l2 ? "group-active-selected" : "group-active", a) : $2 && l2 ? r2(s, "active-selected", a) : l2 ? r2(s, "selected", a) : r2(s, $2 ? "active" : "inactive", a);
1733
- }).join(`
1734
- ${import_picocolors2.default.cyan(o)} `)}
1735
- ${import_picocolors2.default.cyan(d2)}
1736
1481
  `;
1737
1482
  }
1738
1483
  } }).prompt();
@@ -1762,7 +1507,7 @@ ${import_picocolors2.default.gray(de + _2.repeat(s + 2) + pe)}
1762
1507
  ${import_picocolors2.default.gray(d2)} ${t}
1763
1508
 
1764
1509
  `);
1765
- }, M2, J2, x2, Y2 = ({ indicator: t = "dots" } = {}) => {
1510
+ }, J2, Y2 = ({ indicator: t = "dots" } = {}) => {
1766
1511
  const n = V2 ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], r2 = V2 ? 80 : 120, i = process.env.CI === "true";
1767
1512
  let s, c, a = false, l2 = "", $2, g2 = performance.now();
1768
1513
  const p2 = (m2) => {
@@ -1812,28 +1557,6 @@ ${import_picocolors2.default.gray(d2)} ${t}
1812
1557
  return { start: H2, stop: N2, message: (m2 = "") => {
1813
1558
  l2 = R2(m2 ?? l2);
1814
1559
  } };
1815
- }, Ce = async (t, n) => {
1816
- const r2 = {}, i = Object.keys(t);
1817
- for (const s of i) {
1818
- const c = t[s], a = await c({ results: r2 })?.catch((l2) => {
1819
- throw l2;
1820
- });
1821
- if (typeof n?.onCancel == "function" && pD(a)) {
1822
- r2[s] = "canceled", n.onCancel({ results: r2 });
1823
- continue;
1824
- }
1825
- r2[s] = a;
1826
- }
1827
- return r2;
1828
- }, Te = async (t) => {
1829
- for (const n of t) {
1830
- if (n.enabled === false)
1831
- continue;
1832
- const r2 = Y2();
1833
- r2.start(n.title);
1834
- const i = await n.task(r2.message);
1835
- r2.stop(i || n.title);
1836
- }
1837
1560
  };
1838
1561
  var init_dist2 = __esm(() => {
1839
1562
  init_dist();
@@ -1851,57 +1574,18 @@ var init_dist2 = __esm(() => {
1851
1574
  k2 = u("●", ">");
1852
1575
  P2 = u("○", " ");
1853
1576
  A2 = u("◻", "[•]");
1854
- T2 = u("◼", "[+]");
1577
+ T = u("◼", "[+]");
1855
1578
  F = u("◻", "[ ]");
1856
1579
  $e = u("▪", "•");
1857
1580
  _2 = u("─", "-");
1858
1581
  me = u("╮", "+");
1859
1582
  de = u("├", "+");
1860
1583
  pe = u("╯", "+");
1861
- q2 = u("●", "•");
1584
+ q = u("●", "•");
1862
1585
  D = u("◆", "*");
1863
1586
  U2 = u("▲", "!");
1864
1587
  K2 = u("■", "x");
1865
- M2 = { message: (t = "", { symbol: n = import_picocolors2.default.gray(o) } = {}) => {
1866
- const r2 = [`${import_picocolors2.default.gray(o)}`];
1867
- if (t) {
1868
- const [i, ...s] = t.split(`
1869
- `);
1870
- r2.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors2.default.gray(o)} ${c}`));
1871
- }
1872
- process.stdout.write(`${r2.join(`
1873
- `)}
1874
- `);
1875
- }, info: (t) => {
1876
- M2.message(t, { symbol: import_picocolors2.default.blue(q2) });
1877
- }, success: (t) => {
1878
- M2.message(t, { symbol: import_picocolors2.default.green(D) });
1879
- }, step: (t) => {
1880
- M2.message(t, { symbol: import_picocolors2.default.green(C) });
1881
- }, warn: (t) => {
1882
- M2.message(t, { symbol: import_picocolors2.default.yellow(U2) });
1883
- }, warning: (t) => {
1884
- M2.warn(t);
1885
- }, error: (t) => {
1886
- M2.message(t, { symbol: import_picocolors2.default.red(K2) });
1887
- } };
1888
1588
  J2 = `${import_picocolors2.default.gray(o)} `;
1889
- x2 = { message: async (t, { symbol: n = import_picocolors2.default.gray(o) } = {}) => {
1890
- process.stdout.write(`${import_picocolors2.default.gray(o)}
1891
- ${n} `);
1892
- let r2 = 3;
1893
- for await (let i of t) {
1894
- i = i.replace(/\n/g, `
1895
- ${J2}`), i.includes(`
1896
- `) && (r2 = 3 + S2(i.slice(i.lastIndexOf(`
1897
- `))).length);
1898
- const s = S2(i).length;
1899
- r2 + s < process.stdout.columns ? (r2 += s, process.stdout.write(i)) : (process.stdout.write(`
1900
- ${J2}${i.trimStart()}`), r2 = 3 + S2(i.trimStart()).length);
1901
- }
1902
- process.stdout.write(`
1903
- `);
1904
- }, info: (t) => x2.message(t, { symbol: import_picocolors2.default.blue(q2) }), success: (t) => x2.message(t, { symbol: import_picocolors2.default.green(D) }), step: (t) => x2.message(t, { symbol: import_picocolors2.default.green(C) }), warn: (t) => x2.message(t, { symbol: import_picocolors2.default.yellow(U2) }), warning: (t) => x2.warn(t), error: (t) => x2.message(t, { symbol: import_picocolors2.default.red(K2) }) };
1905
1589
  });
1906
1590
 
1907
1591
  // src/interactive.ts
@@ -5592,24 +5276,7 @@ Nothing new to index.`);
5592
5276
  ensureSyncInstalled(apiKey, opts.syncInterval);
5593
5277
  } catch {}
5594
5278
  }
5595
- let skipUpload = false;
5596
- if (allMemories.length > 2000 && !opts.dryRun && !opts.quiet) {
5597
- if (hasTty) {
5598
- const { confirm: confirm2 } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
5599
- const proceed = await confirm2({
5600
- message: `That's ${allMemories.length.toLocaleString()} memories — this may take a while and use significant resources. Continue?`
5601
- });
5602
- if (!proceed || typeof proceed === "symbol") {
5603
- log("Skipping upload for now. You can re-run `conare` anytime to upload.");
5604
- log();
5605
- skipUpload = true;
5606
- }
5607
- } else {
5608
- log(`Warning: ${allMemories.length.toLocaleString()} memories detected. Skipping large upload in non-interactive mode.`);
5609
- log("Re-run interactively or with --force to proceed.");
5610
- skipUpload = true;
5611
- }
5612
- }
5279
+ const skipUpload = false;
5613
5280
  let uploadedCount = 0;
5614
5281
  if (allMemories.length === 0 || skipUpload) {
5615
5282
  if (allMemories.length === 0)
@@ -5711,27 +5378,45 @@ Nothing new to index.`);
5711
5378
  }
5712
5379
  }
5713
5380
  }
5381
+ const targetLabels = new Map(MCP_TARGETS.map((t) => [t.id, t.label]));
5382
+ const configuredTools = selectedTargets.filter((t) => t !== "conare-skill").map((t) => targetLabels.get(t) ?? t);
5383
+ const toolList = configuredTools.length > 0 ? configuredTools.join(", ") : "your AI tools";
5384
+ const oneTool = configuredTools[0] ?? "your agent";
5385
+ const dim = (s) => `\x1B[2m${s}\x1B[0m`;
5386
+ const bold = (s) => `\x1B[1m${s}\x1B[0m`;
5387
+ let memoryTotal = 0;
5388
+ if (!opts.dryRun) {
5389
+ memoryTotal = await getRemoteMemoryCount(apiKey).catch(() => null) ?? 0;
5390
+ }
5391
+ if (memoryTotal <= 0)
5392
+ memoryTotal = uploadedCount;
5714
5393
  log("");
5715
- log(" \x1B[32m✓\x1B[0m Done! Every new conversation now starts with context.");
5394
+ if (memoryTotal > 0) {
5395
+ log(` \x1B[32m✓\x1B[0m ${bold(`${memoryTotal.toLocaleString()} memories`)} are now recallable inside ${toolList}.`);
5396
+ } else {
5397
+ log(` \x1B[32m✓\x1B[0m Conare is connected to ${toolList}.`);
5398
+ }
5716
5399
  log("");
5717
- const configuredTools = selectedTargets.filter((t) => t !== "conare-skill").map((t) => {
5718
- if (t === "claude")
5719
- return "Claude Code";
5720
- if (t === "codex")
5721
- return "Codex";
5722
- if (t === "cursor")
5723
- return "Cursor";
5724
- if (t === "opencode")
5725
- return "OpenCode";
5726
- if (t === "grok")
5727
- return "Grok";
5728
- return t;
5729
- });
5730
- const toolList = configuredTools.length > 0 ? configuredTools.join(", ") : "your AI tools";
5731
- log(` Your past conversations are now available inside ${toolList}.`);
5732
- log(" Start a new session context gets loaded automatically.");
5400
+ log(` ${bold("How it works")} Every new session, your agent recalls the right`);
5401
+ log(` past context automatically — no prompting, no copy-paste.`);
5402
+ log("");
5403
+ log(` ${bold("What that means")}`);
5404
+ log(` ${dim("")} Hit a bug you already solved? Your agent gets the past fix`);
5405
+ log(` instead of re-debugging from scratch.`);
5406
+ log(` ${dim("")} Touch a gnarly data model or API? It remembers how the`);
5407
+ log(` pieces connect you stop re-explaining the same thing.`);
5408
+ log("");
5409
+ log(` ${bold("Try it now")} — open ${oneTool} and ask:`);
5410
+ log(` ${dim("›")} "what did I work on most recently?"`);
5411
+ log(` ${dim("›")} "how did I set up <something you built before>?"`);
5412
+ log(` ${dim("›")} "what broke last time I touched <area>?"`);
5413
+ log("");
5414
+ log(` ${bold("You're in control")}`);
5415
+ log(` ${dim("•")} Recall runs automatically at the start of every session.`);
5416
+ log(` ${dim("•")} New chats auto-index every ${opts.syncInterval} min in the background.`);
5417
+ log(` ${dim("•")} Tune it or remove any memory anytime in the dashboard.`);
5733
5418
  log("");
5734
- log(` \x1B[2mDashboard:\x1B[0m ${CONARE_URL2}/dashboard`);
5419
+ log(` ${dim("Dashboard:")} ${CONARE_URL2}/dashboard`);
5735
5420
  log("");
5736
5421
  }
5737
5422
  main().catch((e2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Conare CLI for indexing AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {