@velvetmonkey/flywheel-memory 2.5.4 → 2.5.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 +10 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7672,8 +7672,10 @@ function normalizePath(filePath) {
7672
7672
  return normalized;
7673
7673
  }
7674
7674
  function getRelativePath(vaultPath2, filePath) {
7675
- const relative3 = path5.relative(vaultPath2, filePath);
7676
- return normalizePath(relative3);
7675
+ const normalizedVault = normalizePath(vaultPath2);
7676
+ const normalizedFile = normalizePath(filePath);
7677
+ const relative3 = path5.posix.relative(normalizedVault, normalizedFile);
7678
+ return relative3;
7677
7679
  }
7678
7680
  function shouldWatch(filePath, vaultPath2) {
7679
7681
  const normalized = normalizePath(filePath);
@@ -8156,7 +8158,7 @@ async function processBatch(index, vaultPath2, batch, options = {}) {
8156
8158
  const chunk = events.slice(i, i + concurrency);
8157
8159
  const chunkResults = await Promise.allSettled(
8158
8160
  chunk.map(async (event) => {
8159
- const relativePath = getRelativePath(vaultPath2, event.path);
8161
+ const relativePath = event.path;
8160
8162
  if (event.type === "delete") {
8161
8163
  return deleteNote(index, relativePath);
8162
8164
  } else {
@@ -8180,15 +8182,14 @@ async function processBatch(index, vaultPath2, batch, options = {}) {
8180
8182
  } else {
8181
8183
  failed++;
8182
8184
  const event = chunk[j];
8183
- const relativePath = getRelativePath(vaultPath2, event.path);
8184
8185
  const error = result.reason instanceof Error ? result.reason : new Error(String(result.reason));
8185
8186
  results.push({
8186
8187
  success: false,
8187
8188
  action: "unchanged",
8188
- path: relativePath,
8189
+ path: event.path,
8189
8190
  error
8190
8191
  });
8191
- onError?.(relativePath, error);
8192
+ onError?.(event.path, error);
8192
8193
  }
8193
8194
  }
8194
8195
  onProgress?.(processed, total);
@@ -9632,11 +9633,11 @@ var PipelineRunner = class {
9632
9633
  this.hasEntityRelevantChanges = true;
9633
9634
  serverLog("watcher", `Index rebuilt (full): ${rebuilt.notes.size} notes, ${rebuilt.entities.size} entities`);
9634
9635
  } else {
9635
- const absoluteBatch = {
9636
+ const relativeBatch = {
9636
9637
  ...p.batch,
9637
- events: p.events.map((e) => ({ ...e, path: path15.join(p.vp, e.path) }))
9638
+ events: p.events
9638
9639
  };
9639
- const batchResult = await processBatch(vaultIndex2, p.vp, absoluteBatch, {
9640
+ const batchResult = await processBatch(vaultIndex2, p.vp, relativeBatch, {
9640
9641
  onError: (filePath, error) => {
9641
9642
  serverLog("watcher", `File processing error: ${filePath}: ${error.message}`, "error");
9642
9643
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-memory",
3
- "version": "2.5.4",
3
+ "version": "2.5.6",
4
4
  "description": "MCP tools that search, write, and auto-link your Obsidian vault — and learn from your edits.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@huggingface/transformers": "^3.8.1",
57
57
  "@modelcontextprotocol/sdk": "^1.25.1",
58
- "@velvetmonkey/vault-core": "^2.5.4",
58
+ "@velvetmonkey/vault-core": "^2.5.6",
59
59
  "better-sqlite3": "^12.0.0",
60
60
  "chokidar": "^4.0.0",
61
61
  "gray-matter": "^4.0.3",