@lojban/semantic-search-mcp 1.0.15 → 1.0.16

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.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lojban/semantic-search-mcp",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Local-first MCP server for semantic search using transformers.js and SQLite",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -6,16 +6,17 @@ import {
6
6
  ListToolsRequestSchema,
7
7
  } from '@modelcontextprotocol/sdk/types.js';
8
8
  import path from 'path';
9
+ import os from 'os';
9
10
  import { getEmbedding, getBatchEmbeddings } from './embeddings.js';
10
11
  import { createVectorStorage, type SearchResult } from './storage.js';
11
12
  import { normalizePath } from './path-util.js';
12
13
  import { listFilesInDirectories, readFileWithMetadata } from './scanner.js';
13
14
  import { getSampuVlasteDir } from './download-sampu-vlaste.js';
14
15
 
15
- // Data dir: use env, or project cwd so each workspace has its own index when run via npx from Cursor
16
+ // Data dir: use env, or $HOME/.semantic-search/data so the same index is used across MCP version upgrades (npx cwd can change per version)
16
17
  const dataDir =
17
18
  process.env.SEMANTIC_SEARCH_DATA_DIR ||
18
- path.join(process.cwd(), '.semantic-search', 'data');
19
+ path.join(os.homedir(), '.semantic-search', 'data');
19
20
  const DB_PATH = path.join(dataDir, 'vectors.db');
20
21
 
21
22
  // Background indexing state (progress for get_index_stats)