@velvetmonkey/flywheel-memory 2.5.5 → 2.5.7
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.
- package/dist/index.js +9 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8158,7 +8158,7 @@ async function processBatch(index, vaultPath2, batch, options = {}) {
|
|
|
8158
8158
|
const chunk = events.slice(i, i + concurrency);
|
|
8159
8159
|
const chunkResults = await Promise.allSettled(
|
|
8160
8160
|
chunk.map(async (event) => {
|
|
8161
|
-
const relativePath =
|
|
8161
|
+
const relativePath = event.path;
|
|
8162
8162
|
if (event.type === "delete") {
|
|
8163
8163
|
return deleteNote(index, relativePath);
|
|
8164
8164
|
} else {
|
|
@@ -8182,15 +8182,14 @@ async function processBatch(index, vaultPath2, batch, options = {}) {
|
|
|
8182
8182
|
} else {
|
|
8183
8183
|
failed++;
|
|
8184
8184
|
const event = chunk[j];
|
|
8185
|
-
const relativePath = getRelativePath(vaultPath2, event.path);
|
|
8186
8185
|
const error = result.reason instanceof Error ? result.reason : new Error(String(result.reason));
|
|
8187
8186
|
results.push({
|
|
8188
8187
|
success: false,
|
|
8189
8188
|
action: "unchanged",
|
|
8190
|
-
path:
|
|
8189
|
+
path: event.path,
|
|
8191
8190
|
error
|
|
8192
8191
|
});
|
|
8193
|
-
onError?.(
|
|
8192
|
+
onError?.(event.path, error);
|
|
8194
8193
|
}
|
|
8195
8194
|
}
|
|
8196
8195
|
onProgress?.(processed, total);
|
|
@@ -9634,11 +9633,11 @@ var PipelineRunner = class {
|
|
|
9634
9633
|
this.hasEntityRelevantChanges = true;
|
|
9635
9634
|
serverLog("watcher", `Index rebuilt (full): ${rebuilt.notes.size} notes, ${rebuilt.entities.size} entities`);
|
|
9636
9635
|
} else {
|
|
9637
|
-
const
|
|
9636
|
+
const relativeBatch = {
|
|
9638
9637
|
...p.batch,
|
|
9639
|
-
events: p.events
|
|
9638
|
+
events: p.events
|
|
9640
9639
|
};
|
|
9641
|
-
const batchResult = await processBatch(vaultIndex2, p.vp,
|
|
9640
|
+
const batchResult = await processBatch(vaultIndex2, p.vp, relativeBatch, {
|
|
9642
9641
|
onError: (filePath, error) => {
|
|
9643
9642
|
serverLog("watcher", `File processing error: ${filePath}: ${error.message}`, "error");
|
|
9644
9643
|
}
|
|
@@ -27920,11 +27919,11 @@ async function runPostIndexWork(ctx) {
|
|
|
27920
27919
|
serverLog("watcher", `File watcher enabled (debounce: ${config.debounceMs}ms)`);
|
|
27921
27920
|
const handleBatch = async (batch) => {
|
|
27922
27921
|
const vaultPrefixes = /* @__PURE__ */ new Set([
|
|
27923
|
-
vp
|
|
27924
|
-
rvp
|
|
27922
|
+
normalizePath(vp),
|
|
27923
|
+
normalizePath(rvp)
|
|
27925
27924
|
]);
|
|
27926
27925
|
const normalizeEventPath = (rawPath) => {
|
|
27927
|
-
const normalized = rawPath
|
|
27926
|
+
const normalized = normalizePath(rawPath);
|
|
27928
27927
|
for (const prefix of vaultPrefixes) {
|
|
27929
27928
|
if (normalized.startsWith(prefix + "/")) {
|
|
27930
27929
|
return normalized.slice(prefix.length + 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velvetmonkey/flywheel-memory",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7",
|
|
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.
|
|
58
|
+
"@velvetmonkey/vault-core": "^2.5.7",
|
|
59
59
|
"better-sqlite3": "^12.0.0",
|
|
60
60
|
"chokidar": "^4.0.0",
|
|
61
61
|
"gray-matter": "^4.0.3",
|