indelible-mcp 4.9.1 → 4.9.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/package.json +1 -1
  2. package/src/index.js +20 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indelible-mcp",
3
- "version": "4.9.1",
3
+ "version": "4.9.2",
4
4
  "description": "Blockchain-backed memory and code storage for Claude Code. Save AI conversations and source code permanently on BSV.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -3825,7 +3825,8 @@ function deriveTitleSearch(session) {
3825
3825
  };
3826
3826
  const first = msgs.find(isUser) || msgs[0];
3827
3827
  const summary = (session?.summary || "").trim();
3828
- const title = summary || (first ? contentText(first).replace(/\s+/g, " ").trim().slice(0, 90) : "");
3828
+ const firstText = first ? contentText(first).replace(/\s+/g, " ").trim().slice(0, 90) : "";
3829
+ const title = summary && !isGenericSummary(summary) ? summary : firstText || summary;
3829
3830
  const searchText = msgs.map((m) => `${m.role || m.type || ""}: ${contentText(m)}`).join(" \n ").toLowerCase().slice(0, 2e4);
3830
3831
  return { title, searchText, message_count: msgs.length };
3831
3832
  }
@@ -4038,8 +4039,17 @@ async function searchIndexSemantic(address, { fromDate = null, toDate = null, qu
4038
4039
  ordered = [...score.entries()].sort((a, b) => b[1] - a[1]).map(([id]) => byId.get(id)).filter(Boolean);
4039
4040
  ranking_used = "blend";
4040
4041
  }
4042
+ const deduped = [];
4043
+ const seenSig = /* @__PURE__ */ new Set();
4044
+ for (const r of ordered) {
4045
+ const st = r?.searchText || "";
4046
+ const sig = st.length >= 80 ? st.slice(0, 240) : `id:${r.txId}`;
4047
+ if (seenSig.has(sig)) continue;
4048
+ seenSig.add(sig);
4049
+ deduped.push(r);
4050
+ }
4041
4051
  return {
4042
- results: ordered.slice(0, limit).map((r) => ({
4052
+ results: deduped.slice(0, limit).map((r) => ({
4043
4053
  txId: r.txId,
4044
4054
  date: r.date,
4045
4055
  title: r.title,
@@ -4062,7 +4072,7 @@ function indexStatus(address) {
4062
4072
  index_file: indexPath(address)
4063
4073
  };
4064
4074
  }
4065
- var ROOT, INDEX_DIR2, GAPS_DIR, indexPath, indexLock, gapsPath, gapsLock, withTimeout, MIN_SEMANTIC_CHARS, SUBSTANTIAL_CHARS;
4075
+ var ROOT, INDEX_DIR2, GAPS_DIR, indexPath, indexLock, gapsPath, gapsLock, withTimeout, isGenericSummary, MIN_SEMANTIC_CHARS, SUBSTANTIAL_CHARS;
4066
4076
  var init_recall_index = __esm({
4067
4077
  "lib/recall-index.js"() {
4068
4078
  init_file_lock();
@@ -4076,6 +4086,7 @@ var init_recall_index = __esm({
4076
4086
  gapsPath = (a) => join16(GAPS_DIR, `${a}.jsonl`);
4077
4087
  gapsLock = (a) => join16(GAPS_DIR, `${a}.lock`);
4078
4088
  withTimeout = (p, ms) => Promise.race([p, new Promise((_, rej) => setTimeout(() => rej(new Error("fetch timeout")), ms))]);
4089
+ isGenericSummary = (s) => /^(auto[-\s]?save|auto[-\s]?compaction|checkpoint|save[-_\s]?all|delta[-\s]?save)\b/i.test(s || "");
4079
4090
  MIN_SEMANTIC_CHARS = 140;
4080
4091
  SUBSTANTIAL_CHARS = 1200;
4081
4092
  }
@@ -7978,7 +7989,7 @@ Commands:
7978
7989
  }
7979
7990
  function printHelp() {
7980
7991
  console.log(`
7981
- Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.1)
7992
+ Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.2)
7982
7993
 
7983
7994
  Setup:
7984
7995
  indelible-mcp setup --wif=KEY --pin=PIN Import and encrypt your private key
@@ -8198,7 +8209,7 @@ function readStdin() {
8198
8209
  }
8199
8210
  var SERVER_INFO = {
8200
8211
  name: "indelible",
8201
- version: "4.9.1",
8212
+ version: "4.9.2",
8202
8213
  description: "Blockchain-backed memory and code storage for Claude Code"
8203
8214
  };
8204
8215
  var TOOLS = [
@@ -8495,7 +8506,8 @@ var TOOLS = [
8495
8506
  depth: { type: "string", enum: ["list", "full"], description: '"list" (default) = Tier-1 search; "full" = decrypt given txids.' },
8496
8507
  limit: { type: "number", description: 'Max results for depth:"list" (default 25).' },
8497
8508
  txids: { type: "array", items: { type: "string" }, description: 'For depth:"full": session txids to decrypt (max 20).' },
8498
- max_index: { type: "number", description: "Max sessions to decrypt-and-index this call (default 150)." }
8509
+ max_index: { type: "number", description: "Max sessions to decrypt-and-index this call (default 150)." },
8510
+ ranking: { type: "string", enum: ["blend", "keyword", "semantic"], description: "Result ranking: 'blend' (default) fuses keyword + meaning-based ranking; 'keyword' = exact-term only; 'semantic' = meaning only. Meaning ranking needs the local model pack (indelible-mcp semantic-fetch); absent = keyword with a notice. Nothing ever leaves your machine." }
8499
8511
  },
8500
8512
  required: []
8501
8513
  }
@@ -8652,7 +8664,8 @@ async function handleMcpRequest(request) {
8652
8664
  depth: args2?.depth || "list",
8653
8665
  limit: args2?.limit || 25,
8654
8666
  txids: args2?.txids || null,
8655
- max_index: args2?.max_index || 150
8667
+ max_index: args2?.max_index || 150,
8668
+ ranking: args2?.ranking || "blend"
8656
8669
  });
8657
8670
  break;
8658
8671
  case "report_bug":