conare 0.4.0 → 0.4.2

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 +67 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1024,7 +1024,7 @@ var import_sisteransi, import_picocolors, uD, W, tD, eD, FD = function() {
1024
1024
  ` && (s && o && (F += z(s)), i && (F += K(i)));
1025
1025
  }
1026
1026
  return F;
1027
- }, 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;
1027
+ }, 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, 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;
1028
1028
  var init_dist = __esm(() => {
1029
1029
  import_sisteransi = __toESM(require_src(), 1);
1030
1030
  import_picocolors = __toESM(require_picocolors(), 1);
@@ -1076,6 +1076,23 @@ var init_dist = __esm(() => {
1076
1076
  AD = globalThis.process.platform.startsWith("win");
1077
1077
  S = Symbol("clack:cancel");
1078
1078
  gD = Object.defineProperty;
1079
+ dD = class dD extends x {
1080
+ get cursor() {
1081
+ return this.value ? 0 : 1;
1082
+ }
1083
+ get _value() {
1084
+ return this.cursor === 0;
1085
+ }
1086
+ constructor(u) {
1087
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
1088
+ this.value = this._value;
1089
+ }), this.on("confirm", (t) => {
1090
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
1091
+ }), this.on("cursor", () => {
1092
+ this.value = !this.value;
1093
+ });
1094
+ }
1095
+ };
1079
1096
  A = new WeakMap;
1080
1097
  kD = Object.defineProperty;
1081
1098
  SD = class extends x {
@@ -1204,7 +1221,25 @@ ${import_picocolors2.default.gray(o)}` : ""}`;
1204
1221
  ${import_picocolors2.default.cyan(d2)}
1205
1222
  `;
1206
1223
  }
1207
- } }).prompt(), ve = (t) => {
1224
+ } }).prompt(), ye = (t) => {
1225
+ const n = t.active ?? "Yes", r2 = t.inactive ?? "No";
1226
+ return new dD({ active: n, inactive: r2, initialValue: t.initialValue ?? true, render() {
1227
+ const i = `${import_picocolors2.default.gray(o)}
1228
+ ${b2(this.state)} ${t.message}
1229
+ `, s = this.value ? n : r2;
1230
+ switch (this.state) {
1231
+ case "submit":
1232
+ return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(s)}`;
1233
+ case "cancel":
1234
+ return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}
1235
+ ${import_picocolors2.default.gray(o)}`;
1236
+ default:
1237
+ 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}`}
1238
+ ${import_picocolors2.default.cyan(d2)}
1239
+ `;
1240
+ }
1241
+ } }).prompt();
1242
+ }, ve = (t) => {
1208
1243
  const n = (r2, i) => {
1209
1244
  const s = r2.label ?? String(r2.value);
1210
1245
  switch (i) {
@@ -1476,7 +1511,7 @@ async function selectChatSources(targets) {
1476
1511
  return ensureValue(await fe({
1477
1512
  message: "Select chat sources",
1478
1513
  required: false,
1479
- initialValues: targets.filter((target) => target.recommended).map((target) => target.id),
1514
+ initialValues: targets.filter((target) => target.available !== false && (target.detectedCount ?? 0) > 0).map((target) => target.id),
1480
1515
  options: targets.map((target) => ({
1481
1516
  value: target.id,
1482
1517
  label: target.label,
@@ -1488,16 +1523,16 @@ async function selectMcpTargets(targets) {
1488
1523
  return ensureValue(await fe({
1489
1524
  message: "Select where to install the MCP",
1490
1525
  required: false,
1491
- initialValues: targets.filter((target) => target.recommended).map((target) => target.id),
1526
+ initialValues: targets.filter((target) => target.available !== false).map((target) => target.id),
1492
1527
  options: targets.map((target) => ({
1493
1528
  value: target.id,
1494
1529
  label: target.label,
1495
- hint: target.available === false ? "not detected" : "recommended"
1530
+ hint: target.available === false ? "not detected" : "detected"
1496
1531
  }))
1497
1532
  }));
1498
1533
  }
1499
1534
  async function confirmIndexCodebase() {
1500
- return ensureValue(await confirm({
1535
+ return ensureValue(await ye({
1501
1536
  message: "Index this codebase too?",
1502
1537
  initialValue: false
1503
1538
  }));
@@ -2322,7 +2357,7 @@ function configureClaude(apiKey) {
2322
2357
  stdio: "ignore",
2323
2358
  shell: platform5() === "win32"
2324
2359
  }).status === 0) {
2325
- return "Claude Code configured via `claude mcp add-json`";
2360
+ return "\x1B[32m✓\x1B[0m Claude Code";
2326
2361
  }
2327
2362
  const config = readJsonFile(claudeConfigPath);
2328
2363
  if (!config.mcpServers || typeof config.mcpServers !== "object") {
@@ -2338,7 +2373,7 @@ function configureClaude(apiKey) {
2338
2373
  mcpConfig.mcpServers[SERVER_NAME] = getServerConfig(apiKey);
2339
2374
  writeJsonFile(claudeMcpPath, mcpConfig);
2340
2375
  }
2341
- return `Claude Code configured at ${claudeConfigPath}`;
2376
+ return "\x1B[32m✓\x1B[0m Claude Code";
2342
2377
  }
2343
2378
  function configureCodex(apiKey) {
2344
2379
  const configPath = join7(homedir5(), ".codex", "config.toml");
@@ -2346,7 +2381,7 @@ function configureCodex(apiKey) {
2346
2381
  stdio: "ignore",
2347
2382
  shell: platform5() === "win32"
2348
2383
  }).status === 0) {
2349
- return "Codex configured via `codex mcp add`";
2384
+ return "\x1B[32m✓\x1B[0m Codex";
2350
2385
  }
2351
2386
  let toml = "";
2352
2387
  try {
@@ -2389,7 +2424,7 @@ ${newSection}
2389
2424
  }
2390
2425
  }
2391
2426
  } catch {}
2392
- return `Codex configured at ${configPath}`;
2427
+ return "\x1B[32m✓\x1B[0m Codex";
2393
2428
  }
2394
2429
  function configureCursor(apiKey) {
2395
2430
  const configPath = join7(homedir5(), ".cursor", "mcp.json");
@@ -2402,7 +2437,7 @@ function configureCursor(apiKey) {
2402
2437
  headers: { Authorization: `Bearer ${apiKey}` }
2403
2438
  };
2404
2439
  writeJsonFile(configPath, config);
2405
- return `Cursor configured at ${configPath}`;
2440
+ return "\x1B[32m✓\x1B[0m Cursor";
2406
2441
  }
2407
2442
  function configureWindsurf(apiKey) {
2408
2443
  const configPath = join7(homedir5(), ".codeium", "windsurf", "mcp_config.json");
@@ -2415,7 +2450,7 @@ function configureWindsurf(apiKey) {
2415
2450
  headers: { Authorization: `Bearer ${apiKey}` }
2416
2451
  };
2417
2452
  writeJsonFile(configPath, config);
2418
- return `Windsurf configured at ${configPath}`;
2453
+ return "\x1B[32m✓\x1B[0m Windsurf";
2419
2454
  }
2420
2455
  function configureVscode(apiKey) {
2421
2456
  const os = platform5();
@@ -2437,7 +2472,7 @@ function configureVscode(apiKey) {
2437
2472
  headers: { Authorization: `Bearer ${apiKey}` }
2438
2473
  };
2439
2474
  writeJsonFile(configPath, config);
2440
- return `VS Code Copilot configured at ${configPath}`;
2475
+ return "\x1B[32m✓\x1B[0m VS Code Copilot";
2441
2476
  }
2442
2477
  function configureCline(apiKey) {
2443
2478
  const os = platform5();
@@ -2459,7 +2494,7 @@ function configureCline(apiKey) {
2459
2494
  disabled: false
2460
2495
  };
2461
2496
  writeJsonFile(configPath, config);
2462
- return `Cline configured at ${configPath}`;
2497
+ return "\x1B[32m✓\x1B[0m Cline";
2463
2498
  }
2464
2499
  function configureZed(apiKey) {
2465
2500
  const os = platform5();
@@ -2485,7 +2520,7 @@ function configureZed(apiKey) {
2485
2520
  env: {}
2486
2521
  };
2487
2522
  writeJsonFile(configPath, config);
2488
- return `Zed configured at ${configPath}`;
2523
+ return "\x1B[32m✓\x1B[0m Zed";
2489
2524
  }
2490
2525
  function configureOpenclaw(apiKey) {
2491
2526
  const configPath = join7(homedir5(), ".openclaw", "openclaw.json");
@@ -2499,7 +2534,7 @@ function configureOpenclaw(apiKey) {
2499
2534
  headers: { Authorization: `Bearer ${apiKey}` }
2500
2535
  };
2501
2536
  writeJsonFile(configPath, config);
2502
- return `OpenClaw configured at ${configPath}`;
2537
+ return "\x1B[32m✓\x1B[0m OpenClaw";
2503
2538
  }
2504
2539
  var CLIENT_CONFIGURATORS = {
2505
2540
  claude: configureClaude,
@@ -2607,14 +2642,14 @@ function installSkill() {
2607
2642
  if (existsSync6(claudeSkillDir)) {
2608
2643
  try {
2609
2644
  if (readlinkSync(claudeSkillDir) === skillDir)
2610
- return "Agent Skill installed";
2645
+ return "\x1B[32m✓\x1B[0m Agent Skill";
2611
2646
  } catch {}
2612
2647
  rmSync(claudeSkillDir, { recursive: true, force: true });
2613
2648
  }
2614
2649
  symlinkSync(skillDir, claudeSkillDir);
2615
2650
  }
2616
2651
  } catch {}
2617
- return "Agent Skill installed";
2652
+ return "\x1B[32m✓\x1B[0m Agent Skill";
2618
2653
  }
2619
2654
  function configureMcp(apiKey, targets = ["claude", "codex"]) {
2620
2655
  const results = [];
@@ -3349,8 +3384,8 @@ async function runInstall() {
3349
3384
  const detected = detectedTools.find((d3) => d3.id === t.id);
3350
3385
  return detected?.available || t.defaultSelected;
3351
3386
  }).map((t) => t.id);
3352
- const lines = configureMcp(apiKey, targets);
3353
- for (const line of lines)
3387
+ const mcpLines = configureMcp(apiKey, targets);
3388
+ for (const line of mcpLines)
3354
3389
  console.log(` ${line}`);
3355
3390
  console.log("");
3356
3391
  console.log(" \x1B[32m✓\x1B[0m MCP installed. Restart your AI tool to connect.");
@@ -3428,7 +3463,8 @@ async function main() {
3428
3463
  }
3429
3464
  }
3430
3465
  showDetectedApps(interactiveTargets);
3431
- selectedSources = await selectChatSources(interactiveTargets);
3466
+ const INGESTIBLE_SOURCES = new Set(["claude", "codex", "cursor"]);
3467
+ selectedSources = await selectChatSources(interactiveTargets.filter((t) => INGESTIBLE_SOURCES.has(t.id)));
3432
3468
  interactiveMode = true;
3433
3469
  }
3434
3470
  if (opts.uninstallSync) {
@@ -3490,8 +3526,10 @@ async function main() {
3490
3526
  if (!opts.dryRun) {
3491
3527
  const mcpSpinner = Y2();
3492
3528
  mcpSpinner.start("Configuring MCP...");
3493
- const lines = configureMcp(apiKey, selectedTargets);
3494
- mcpSpinner.stop(`MCP configured: ${lines.join(", ")}`);
3529
+ const mcpLines = configureMcp(apiKey, selectedTargets);
3530
+ mcpSpinner.stop("MCP configured");
3531
+ for (const line of mcpLines)
3532
+ log(` ${line}`);
3495
3533
  }
3496
3534
  log("");
3497
3535
  log("Done! Conare MCP is configured.");
@@ -3583,7 +3621,9 @@ Nothing new to index.`);
3583
3621
  const mcpSpinner = Y2();
3584
3622
  mcpSpinner.start("Configuring MCP...");
3585
3623
  const mcpLines = configureMcp(apiKey, selectedTargets);
3586
- mcpSpinner.stop(`MCP: ${mcpLines.join(", ")}`);
3624
+ mcpSpinner.stop("MCP configured");
3625
+ for (const line of mcpLines)
3626
+ log(` ${line}`);
3587
3627
  }
3588
3628
  log("Done! Your codebase is now searchable via recall.");
3589
3629
  return;
@@ -3742,7 +3782,9 @@ Nothing new to index.`);
3742
3782
  const mcpSpinner = Y2();
3743
3783
  mcpSpinner.start("Configuring MCP...");
3744
3784
  const mcpLines = configureMcp(apiKey, selectedTargets);
3745
- mcpSpinner.stop(`MCP: ${mcpLines.join(", ")}`);
3785
+ mcpSpinner.stop("MCP configured");
3786
+ for (const line of mcpLines)
3787
+ log(` ${line}`);
3746
3788
  }
3747
3789
  if (postIngestIndexPath) {
3748
3790
  const { resolve: resolve2 } = await import("node:path");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Conare CLI for ingesting AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {