conare 0.5.8 → 0.5.10

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 +26 -36
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -52,6 +52,11 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
52
52
  import { createHash } from "node:crypto";
53
53
  import { join } from "node:path";
54
54
  import { homedir } from "node:os";
55
+ function hardCapContent(content) {
56
+ if (content.length <= MAX_MEMORY_CONTENT)
57
+ return content;
58
+ return content.slice(0, MAX_MEMORY_CONTENT - TRUNCATED_MARKER.length) + TRUNCATED_MARKER;
59
+ }
55
60
  function fitContent(header, rounds) {
56
61
  const buildContent = (maxUser) => {
57
62
  const body = rounds.map((r) => {
@@ -73,7 +78,7 @@ ${body}`;
73
78
  const full = buildContent(0);
74
79
  if (full.length <= MAX_MEMORY_CONTENT)
75
80
  return full;
76
- return buildContent(TRUNCATED_USER_MSG);
81
+ return hardCapContent(buildContent(TRUNCATED_USER_MSG));
77
82
  }
78
83
  function parseTimestampMs(value) {
79
84
  if (typeof value === "number" && Number.isFinite(value))
@@ -146,7 +151,9 @@ function clearIngested(source) {
146
151
  mkdirSync(dir, { recursive: true });
147
152
  writeFileSync(MANIFEST_PATH, JSON.stringify(manifest, null, 2));
148
153
  }
149
- var MANIFEST_PATH, MAX_MEMORY_CONTENT = 200000, TRUNCATED_USER_MSG = 3000, MIN_SUBSTANTIVE = 200, NARRATION_RE;
154
+ var MANIFEST_PATH, MAX_MEMORY_CONTENT = 200000, TRUNCATED_USER_MSG = 3000, TRUNCATED_MARKER = `
155
+
156
+ ...[truncated to fit Conare upload limit]`, MIN_SUBSTANTIVE = 200, NARRATION_RE;
150
157
  var init_shared = __esm(() => {
151
158
  MANIFEST_PATH = join(homedir(), ".conare", "ingested.json");
152
159
  NARRATION_RE = /^[\s\n]*(Let me |Now let me |Now I['\u2019]|Now add |Now fix |Now replace |Now integrate |Now update |Now pass |Now clean |Now build|Update the |Builds clean|Deployed\.|Wait, I |Let['\u2019]s test |Good —|Great\.|Perfect\.|Alright|OK,? let me|I[''\u2019]ll |Starting |I need to |Need |I found |I read |I[''\u2019]ve (loaded|confirmed|verified)|Context loaded|Next (I[''\u2019]|step)|Deps confirm|Diff check|Still missing|I[''\u2019]ll (do|check|inspect|trace|run|grab|pull|read|verify))/;
@@ -3463,25 +3470,6 @@ function removeCronEntry() {
3463
3470
  return false;
3464
3471
  }
3465
3472
  }
3466
- function runSyncNow() {
3467
- const os = platform6();
3468
- try {
3469
- if (os === "win32") {
3470
- const runCmd = join9(BIN_DIR, "run.cmd");
3471
- if (existsSync9(runCmd)) {
3472
- execSync3(`"${runCmd}"`, { stdio: "ignore", timeout: 60000 });
3473
- return true;
3474
- }
3475
- } else {
3476
- const runSh = join9(BIN_DIR, "run.sh");
3477
- if (existsSync9(runSh)) {
3478
- execSync3(`/bin/bash "${runSh}"`, { stdio: "ignore", timeout: 60000 });
3479
- return true;
3480
- }
3481
- }
3482
- } catch {}
3483
- return false;
3484
- }
3485
3473
  function installGlobalCommand() {
3486
3474
  const isWindows = platform6() === "win32";
3487
3475
  if (isWindows) {
@@ -3626,8 +3614,7 @@ function installSync(apiKey, intervalMinutes = 10) {
3626
3614
  } else {
3627
3615
  messages.push(`Unsupported platform: ${os}. Run manually: ~/.conare/bin/run.sh`);
3628
3616
  }
3629
- const syncOk = runSyncNow();
3630
- messages.push(syncOk ? "First sync completed" : "First sync deferred to next timer tick");
3617
+ messages.push("First sync scheduled");
3631
3618
  return messages;
3632
3619
  }
3633
3620
  function uninstallSync() {
@@ -3962,19 +3949,8 @@ async function main() {
3962
3949
  }));
3963
3950
  let interactiveMode = false;
3964
3951
  if (shouldRunInteractive) {
3965
- const detectedTools = await detect();
3966
- interactiveTargets = MCP_TARGETS.map((target) => {
3967
- const detected = detectedTools.find((tool) => tool.id === target.id);
3968
- return {
3969
- id: target.id,
3970
- label: target.label,
3971
- available: detected?.available,
3972
- recommended: target.defaultSelected && detected?.available !== false,
3973
- detectedCount: detected?.sessionCount,
3974
- detectedCountApproximate: detected?.sessionCountApproximate
3975
- };
3976
- });
3977
3952
  startSetup();
3953
+ interactiveMode = true;
3978
3954
  if (!apiKey) {
3979
3955
  const authResult = await promptAuth({
3980
3956
  providedApiKey: opts.key
@@ -3993,11 +3969,25 @@ async function main() {
3993
3969
  apiKey = authResult || apiKey;
3994
3970
  }
3995
3971
  }
3972
+ const detectSpinner = Y2();
3973
+ detectSpinner.start("Detecting apps...");
3974
+ const detectedTools = await detect();
3975
+ detectSpinner.stop("Apps detected");
3976
+ interactiveTargets = MCP_TARGETS.map((target) => {
3977
+ const detected = detectedTools.find((tool) => tool.id === target.id);
3978
+ return {
3979
+ id: target.id,
3980
+ label: target.label,
3981
+ available: detected?.available,
3982
+ recommended: target.defaultSelected && detected?.available !== false,
3983
+ detectedCount: detected?.sessionCount,
3984
+ detectedCountApproximate: detected?.sessionCountApproximate
3985
+ };
3986
+ });
3996
3987
  const INGESTIBLE_SOURCES = new Set(["claude", "codex", "cursor"]);
3997
3988
  const ingestibleTargets = interactiveTargets.filter((t) => INGESTIBLE_SOURCES.has(t.id));
3998
3989
  showDetectedApps(ingestibleTargets);
3999
3990
  selectedSources = await selectChatSources(ingestibleTargets);
4000
- interactiveMode = true;
4001
3991
  }
4002
3992
  if (opts.uninstallSync) {
4003
3993
  const messages = uninstallSync();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "Conare CLI for indexing AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {