@velvetmonkey/flywheel-memory 2.0.24 → 2.0.25

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 +40 -32
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -14900,14 +14900,18 @@ async function main() {
14900
14900
  initializeLogger2(vaultPath).catch((err) => {
14901
14901
  console.error(`[Memory] Write logger initialization failed: ${err}`);
14902
14902
  });
14903
- if (isIndexStale(vaultPath)) {
14904
- buildFTS5Index(vaultPath).then(() => {
14905
- console.error("[Memory] FTS5 search index ready");
14906
- }).catch((err) => {
14907
- console.error("[Memory] FTS5 build failed:", err);
14908
- });
14903
+ if (process.env.FLYWHEEL_SKIP_FTS5 !== "true") {
14904
+ if (isIndexStale(vaultPath)) {
14905
+ buildFTS5Index(vaultPath).then(() => {
14906
+ console.error("[Memory] FTS5 search index ready");
14907
+ }).catch((err) => {
14908
+ console.error("[Memory] FTS5 build failed:", err);
14909
+ });
14910
+ } else {
14911
+ console.error("[Memory] FTS5 search index already fresh, skipping rebuild");
14912
+ }
14909
14913
  } else {
14910
- console.error("[Memory] FTS5 search index already fresh, skipping rebuild");
14914
+ console.error("[Memory] FTS5 indexing skipped (FLYWHEEL_SKIP_FTS5=true)");
14911
14915
  }
14912
14916
  let cachedIndex = null;
14913
14917
  if (stateDb) {
@@ -15045,32 +15049,36 @@ async function runPostIndexWork(index) {
15045
15049
  if (flywheelConfig.vault_name) {
15046
15050
  console.error(`[Memory] Vault: ${flywheelConfig.vault_name}`);
15047
15051
  }
15048
- if (hasEmbeddingsIndex()) {
15049
- console.error("[Memory] Embeddings already built, skipping full scan");
15050
- } else {
15051
- setEmbeddingsBuilding(true);
15052
- buildEmbeddingsIndex(vaultPath, (p) => {
15053
- if (p.current % 100 === 0 || p.current === p.total) {
15054
- console.error(`[Semantic] ${p.current}/${p.total}`);
15055
- }
15056
- }).then(async () => {
15057
- if (stateDb) {
15058
- const entities = getAllEntitiesFromDb2(stateDb);
15059
- if (entities.length > 0) {
15060
- const entityMap = new Map(entities.map((e) => [e.name, {
15061
- name: e.name,
15062
- path: e.path,
15063
- category: e.category,
15064
- aliases: e.aliases
15065
- }]));
15066
- await buildEntityEmbeddingsIndex(vaultPath, entityMap);
15052
+ if (process.env.FLYWHEEL_SKIP_EMBEDDINGS !== "true") {
15053
+ if (hasEmbeddingsIndex()) {
15054
+ console.error("[Memory] Embeddings already built, skipping full scan");
15055
+ } else {
15056
+ setEmbeddingsBuilding(true);
15057
+ buildEmbeddingsIndex(vaultPath, (p) => {
15058
+ if (p.current % 100 === 0 || p.current === p.total) {
15059
+ console.error(`[Semantic] ${p.current}/${p.total}`);
15060
+ }
15061
+ }).then(async () => {
15062
+ if (stateDb) {
15063
+ const entities = getAllEntitiesFromDb2(stateDb);
15064
+ if (entities.length > 0) {
15065
+ const entityMap = new Map(entities.map((e) => [e.name, {
15066
+ name: e.name,
15067
+ path: e.path,
15068
+ category: e.category,
15069
+ aliases: e.aliases
15070
+ }]));
15071
+ await buildEntityEmbeddingsIndex(vaultPath, entityMap);
15072
+ }
15067
15073
  }
15068
- }
15069
- loadEntityEmbeddingsToMemory();
15070
- console.error("[Memory] Embeddings refreshed");
15071
- }).catch((err) => {
15072
- console.error("[Memory] Embeddings refresh failed:", err);
15073
- });
15074
+ loadEntityEmbeddingsToMemory();
15075
+ console.error("[Memory] Embeddings refreshed");
15076
+ }).catch((err) => {
15077
+ console.error("[Memory] Embeddings refresh failed:", err);
15078
+ });
15079
+ }
15080
+ } else {
15081
+ console.error("[Memory] Embeddings skipped (FLYWHEEL_SKIP_EMBEDDINGS=true)");
15074
15082
  }
15075
15083
  if (process.env.FLYWHEEL_WATCH !== "false") {
15076
15084
  const config = parseWatcherConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-memory",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "MCP server that gives Claude full read/write access to your Obsidian vault. 42 tools for search, backlinks, graph queries, mutations, and hybrid semantic search.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@modelcontextprotocol/sdk": "^1.25.1",
53
- "@velvetmonkey/vault-core": "^2.0.24",
53
+ "@velvetmonkey/vault-core": "^2.0.25",
54
54
  "better-sqlite3": "^11.0.0",
55
55
  "chokidar": "^4.0.0",
56
56
  "gray-matter": "^4.0.3",