conare 0.5.7 → 0.5.9

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 +11 -24
  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() {
@@ -3945,7 +3932,7 @@ async function main() {
3945
3932
  const write = opts.quiet ? (_s) => {} : (s) => process.stdout.write(s);
3946
3933
  const savedApiKey = getSavedApiKey();
3947
3934
  const hasTty = !!process.stdin.isTTY && !!process.stdout.isTTY;
3948
- const shouldRunInteractive = hasTty && !opts.dryRun && !opts.quiet && (opts.interactive || !opts.force && !opts.source && !opts.indexPath && !opts.configOnly && !opts.ingestOnly && !opts.wasmDir);
3935
+ const shouldRunInteractive = hasTty && !opts.dryRun && !opts.quiet && (opts.interactive || !opts.source && !opts.indexPath && !opts.configOnly && !opts.ingestOnly && !opts.wasmDir);
3949
3936
  let selectedTargets = MCP_TARGETS.filter((t) => t.defaultSelected).map((t) => t.id);
3950
3937
  let effectiveConfigOnly = opts.configOnly;
3951
3938
  let effectiveIngestOnly = opts.ingestOnly;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "Conare CLI for indexing AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {