@bennys001/claude-code-memory 0.12.3 → 0.12.6

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 +21 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var package_default = {
5
5
  name: "@bennys001/claude-code-memory",
6
6
  publishConfig: { access: "public" },
7
- version: "0.12.3",
7
+ version: "0.12.6",
8
8
  description: "MCP server that gives Claude Code persistent memory via an Obsidian knowledge vault",
9
9
  module: "dist/index.js",
10
10
  main: "dist/index.js",
@@ -352,6 +352,7 @@ var NPM_URL = "https://registry.npmjs.org/@bennys001/claude-code-memory/latest";
352
352
  var CHANGELOG_URL = "https://raw.githubusercontent.com/Ben-Spn/claude-code-memory/master/CHANGELOG.md";
353
353
  var latestVersion = null;
354
354
  var releaseNotes = [];
355
+ var checkDone = Promise.resolve();
355
356
  async function fetchLatestVersion() {
356
357
  const res = await fetch(NPM_URL);
357
358
  if (!res.ok)
@@ -379,14 +380,19 @@ async function fetchReleaseNotes(version) {
379
380
  return parseChangelog(markdown, version);
380
381
  }
381
382
  function initUpdateCheck() {
382
- fetchLatestVersion().then(async (v) => {
383
+ const done = fetchLatestVersion().then(async (v) => {
383
384
  latestVersion = v;
384
385
  if (v !== package_default.version) {
385
386
  releaseNotes = await fetchReleaseNotes(v);
386
387
  }
387
388
  }).catch(() => {});
389
+ checkDone = Promise.race([
390
+ done,
391
+ new Promise((resolve2) => setTimeout(resolve2, 4000))
392
+ ]);
388
393
  }
389
- function getUpdateNotice() {
394
+ async function getUpdateNotice() {
395
+ await checkDone;
390
396
  if (!latestVersion || latestVersion === package_default.version)
391
397
  return "";
392
398
  const lines = [`
@@ -419,7 +425,7 @@ function registerIndexTool(server, entries) {
419
425
  })
420
426
  }, async (args) => {
421
427
  const result = executeIndex(args, entries);
422
- return { content: [{ type: "text", text: result + getUpdateNotice() }] };
428
+ return { content: [{ type: "text", text: result + await getUpdateNotice() }] };
423
429
  });
424
430
  }
425
431
 
@@ -450,7 +456,7 @@ function registerReadTool(server, vaultPath) {
450
456
  }, async ({ path }) => {
451
457
  const result = await executeRead(path, vaultPath);
452
458
  if (result.ok) {
453
- return { content: [{ type: "text", text: result.content + getUpdateNotice() }] };
459
+ return { content: [{ type: "text", text: result.content + await getUpdateNotice() }] };
454
460
  }
455
461
  return { content: [{ type: "text", text: result.error }], isError: true };
456
462
  });
@@ -508,7 +514,7 @@ function registerSearchTool(server, entries) {
508
514
  }, async (args) => {
509
515
  const results = executeSearch(args, entries);
510
516
  if (results.length === 0) {
511
- return { content: [{ type: "text", text: "No notes match that query." + getUpdateNotice() }] };
517
+ return { content: [{ type: "text", text: "No notes match that query." + await getUpdateNotice() }] };
512
518
  }
513
519
  const table = [
514
520
  "| T | Title | Path | ~Tok | Score |",
@@ -516,7 +522,7 @@ function registerSearchTool(server, entries) {
516
522
  ...results.map((r) => `| ${r.icon} | ${r.title} | ${r.relativePath} | ${r.tokenDisplay} | ${r.score} |`)
517
523
  ].join(`
518
524
  `);
519
- return { content: [{ type: "text", text: table + getUpdateNotice() }] };
525
+ return { content: [{ type: "text", text: table + await getUpdateNotice() }] };
520
526
  });
521
527
  }
522
528
 
@@ -786,7 +792,7 @@ function registerSyncTool(server, entries, vaultPath) {
786
792
  }, async ({ targetDir }) => {
787
793
  const dir = targetDir ?? process.cwd();
788
794
  const result = await executeSync(dir, entries, vaultPath);
789
- return { content: [{ type: "text", text: result.summary + getUpdateNotice() }] };
795
+ return { content: [{ type: "text", text: result.summary + await getUpdateNotice() }] };
790
796
  });
791
797
  }
792
798
 
@@ -892,7 +898,7 @@ function registerWriteTool(server, entries, vaultPath) {
892
898
  const result = await executeWrite(args, entries, vaultPath);
893
899
  if (result.ok) {
894
900
  const verb = result.updated ? "Updated" : "Created";
895
- return { content: [{ type: "text", text: `${verb} note: ${result.path}` + getUpdateNotice() }] };
901
+ return { content: [{ type: "text", text: `${verb} note: ${result.path}` + await getUpdateNotice() }] };
896
902
  }
897
903
  return { content: [{ type: "text", text: result.error }], isError: true };
898
904
  });
@@ -993,7 +999,7 @@ function registerFetchPageTool(server) {
993
999
  if (result.siteName)
994
1000
  parts.push(`Site: ${result.siteName}`);
995
1001
  return { content: [{ type: "text", text: parts.join(`
996
- `) + getUpdateNotice() }] };
1002
+ `) + await getUpdateNotice() }] };
997
1003
  }
998
1004
  return { content: [{ type: "text", text: result.error }], isError: true };
999
1005
  });
@@ -1055,9 +1061,9 @@ function registerResearchTool(server, entries, vaultPath) {
1055
1061
  }, async (args) => {
1056
1062
  const result = await executeResearch(args, entries, vaultPath);
1057
1063
  if (result.notes.length === 0) {
1058
- return { content: [{ type: "text", text: "No notes match that query." + getUpdateNotice() }] };
1064
+ return { content: [{ type: "text", text: "No notes match that query." + await getUpdateNotice() }] };
1059
1065
  }
1060
- return { content: [{ type: "text", text: buildResearchOutput(result) + getUpdateNotice() }] };
1066
+ return { content: [{ type: "text", text: buildResearchOutput(result) + await getUpdateNotice() }] };
1061
1067
  });
1062
1068
  }
1063
1069
 
@@ -1107,7 +1113,7 @@ function registerDiagnosticsTool(server, entries, watcherStats) {
1107
1113
  description: "Show live runtime diagnostics: vault stats, watcher activity, process metrics, and server version"
1108
1114
  }, async () => {
1109
1115
  const result = executeDiagnostics(entries, watcherStats);
1110
- return { content: [{ type: "text", text: result + getUpdateNotice() }] };
1116
+ return { content: [{ type: "text", text: result + await getUpdateNotice() }] };
1111
1117
  });
1112
1118
  }
1113
1119
 
@@ -1501,6 +1507,7 @@ async function printHelp() {
1501
1507
  if (latest !== package_default.version) {
1502
1508
  const notes = await fetchReleaseNotes(latest);
1503
1509
  const parts = [`
1510
+
1504
1511
  ${C.yellow}Update available:${C.reset} v${package_default.version} \u2192 ${C.green}v${latest}${C.reset}`];
1505
1512
  if (notes.length > 0) {
1506
1513
  parts.push(`${C.bold}What's new:${C.reset}`);
@@ -1524,7 +1531,7 @@ ${C.bold}First-time install:${C.reset}
1524
1531
  ${C.cyan}bun install -g @bennys001/claude-code-memory && ccm --init${C.reset}
1525
1532
 
1526
1533
  ${C.dim}Vault:${C.reset} ~/.ccm/knowledge-base/
1527
- ${C.dim}Docs:${C.reset} https://github.com/bennys001/claude-code-memory${updateLine}`);
1534
+ ${C.dim}Docs:${C.reset} https://github.com/Ben-Spn/claude-code-memory${updateLine}`);
1528
1535
  }
1529
1536
  async function runUpdate() {
1530
1537
  console.log(`${C.dim}Checking for updates...${C.reset}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bennys001/claude-code-memory",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "0.12.3",
4
+ "version": "0.12.6",
5
5
  "description": "MCP server that gives Claude Code persistent memory via an Obsidian knowledge vault",
6
6
  "module": "dist/index.js",
7
7
  "main": "dist/index.js",