@keke1933/vibe-dictionary-mcp 0.9.0 → 0.9.1

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 +13 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27629,6 +27629,14 @@ function createSearchTokenizer(synonyms, extraStopWords = []) {
27629
27629
  return [...new Set(canonical.split(/[^\p{L}\p{N}.%-]+/u).filter((token) => token && !stopWords.has(token)))];
27630
27630
  };
27631
27631
  }
27632
+ function createSearchEntries(fields, tokenize) {
27633
+ return fields.flatMap(([field, values]) => values.map((value) => ({
27634
+ field,
27635
+ value,
27636
+ normalizedValue: normalizeSearchText(value),
27637
+ tokens: new Set(tokenize(value))
27638
+ })));
27639
+ }
27632
27640
  function rankSearchEntries(entries3, queryTokens, weights3, exact, exactBonus = 100) {
27633
27641
  if (!queryTokens.length && !exact) return null;
27634
27642
  const matchedOn = [];
@@ -27680,7 +27688,7 @@ function entries(item) {
27680
27688
  ["question", texts.flatMap((text2) => text2.questions)],
27681
27689
  ["example", texts.map((text2) => text2.example)]
27682
27690
  ];
27683
- const result2 = fields.flatMap(([field, values]) => values.map((value) => ({ field, value, tokens: new Set(tokens(value)) })));
27691
+ const result2 = createSearchEntries(fields, tokens);
27684
27692
  index.set(item, result2);
27685
27693
  return result2;
27686
27694
  }
@@ -27691,7 +27699,7 @@ function rankDomainKnowledge(query = "") {
27691
27699
  const results = [];
27692
27700
  for (const item of DOMAIN_KNOWLEDGE) {
27693
27701
  const allEntries = entries(item);
27694
- const exact = allEntries.find((entry) => normalizeSearchText(entry.value) === normalizedQuery);
27702
+ const exact = allEntries.find((entry) => entry.normalizedValue === normalizedQuery);
27695
27703
  const result2 = rankSearchEntries(allEntries, queryTokens, weights, exact, exact?.field === "domain" || exact?.field === "title" ? 150 : 100);
27696
27704
  if (result2) results.push({ item, ...result2 });
27697
27705
  }
@@ -27825,7 +27833,7 @@ function entries2(item) {
27825
27833
  ["summary", [item.summary, en.summary]],
27826
27834
  ["prompt", [item.promptSnippet, en.promptSnippet]]
27827
27835
  ];
27828
- const result2 = fields.flatMap(([field, values]) => values.map((value) => ({ field, value, tokens: new Set(tokens2(value)) })));
27836
+ const result2 = createSearchEntries(fields, tokens2);
27829
27837
  index2.set(item, result2);
27830
27838
  return result2;
27831
27839
  }
@@ -27833,7 +27841,7 @@ function rank(item, query, queryTokens) {
27833
27841
  if (!query.trim()) return { item, score: 0, matchedOn: [] };
27834
27842
  const normalizedQuery = normalizeSearchText(query);
27835
27843
  const allEntries = entries2(item);
27836
- const exact = allEntries.find((entry) => entry.field !== "prompt" && normalizeSearchText(entry.value) === normalizedQuery);
27844
+ const exact = allEntries.find((entry) => entry.field !== "prompt" && entry.normalizedValue === normalizedQuery);
27837
27845
  const result2 = rankSearchEntries(allEntries, queryTokens, weights2, exact, exact?.field === "title" ? 150 : 100);
27838
27846
  return result2 ? { item, ...result2 } : null;
27839
27847
  }
@@ -27854,7 +27862,7 @@ function searchTechniques(options = {}) {
27854
27862
  // package.json
27855
27863
  var package_default = {
27856
27864
  name: "@keke1933/vibe-dictionary-mcp",
27857
- version: "0.9.0",
27865
+ version: "0.9.1",
27858
27866
  license: "MIT",
27859
27867
  author: "leejh96",
27860
27868
  description: "Read-only local MCP for searching Vibe Dictionary techniques and retrieving implementation prompts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keke1933/vibe-dictionary-mcp",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "license": "MIT",
5
5
  "author": "leejh96",
6
6
  "description": "Read-only local MCP for searching Vibe Dictionary techniques and retrieving implementation prompts",