mcp-memory-bucket 0.10.15 → 0.10.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.
- package/dist/src/store/sync.js +13 -2
- package/package.json +1 -1
package/dist/src/store/sync.js
CHANGED
|
@@ -7,6 +7,17 @@ import { extractDates, toLocalDate } from './date-extract.js';
|
|
|
7
7
|
import { slugify } from './slug.js';
|
|
8
8
|
import { normalizeKey } from '../types.js';
|
|
9
9
|
import { reconcileRenamedAttachmentsDir, isUnderAttachmentsDir } from '../attachments/storage.js';
|
|
10
|
+
/**
|
|
11
|
+
* OS-generated bookkeeping files (macOS's per-directory .DS_Store, Windows' Thumbs.db) that the OS
|
|
12
|
+
* itself creates/deletes as a side effect of Finder/Explorer merely browsing a folder — never
|
|
13
|
+
* user/skill content, so they must never be treated as a skill sibling to push/pull/reconcile, and
|
|
14
|
+
* must never even reach the watcher's onUnmatchedFileChange hook (a stray .DS_Store churning in and
|
|
15
|
+
* out of an open Finder window would otherwise spam push/trash calls against the remote folder).
|
|
16
|
+
*/
|
|
17
|
+
function isOsJunkFile(filePath) {
|
|
18
|
+
const name = path.basename(filePath);
|
|
19
|
+
return name === '.DS_Store' || name === 'Thumbs.db';
|
|
20
|
+
}
|
|
10
21
|
// `paused` is deliberately absent from both lists: it's a local-only cache column (see
|
|
11
22
|
// SkillRepository/MemoryRepository#setPaused) that never round-trips through frontmatter, so a
|
|
12
23
|
// file add/change/rescan must never overwrite it via the INSERT/ON CONFLICT UPDATE below.
|
|
@@ -295,13 +306,13 @@ export function* walkSkillSiblingFiles(skillDir) {
|
|
|
295
306
|
continue;
|
|
296
307
|
yield* walkSkillSiblingFiles(full);
|
|
297
308
|
}
|
|
298
|
-
else if (entry.isFile() && entry.name !== 'SKILL.md') {
|
|
309
|
+
else if (entry.isFile() && entry.name !== 'SKILL.md' && !isOsJunkFile(full)) {
|
|
299
310
|
yield full;
|
|
300
311
|
}
|
|
301
312
|
}
|
|
302
313
|
}
|
|
303
314
|
export function watchSources(db, spec) {
|
|
304
|
-
const watcher = chokidar.watch(spec.sources.map((f) => f.path), { ignoreInitial: true, persistent: true, depth: 10, ignored: (filePath) => isUnderAttachmentsDir(filePath) });
|
|
315
|
+
const watcher = chokidar.watch(spec.sources.map((f) => f.path), { ignoreInitial: true, persistent: true, depth: 10, ignored: (filePath) => isUnderAttachmentsDir(filePath) || isOsJunkFile(filePath) });
|
|
305
316
|
watcher
|
|
306
317
|
.on('add', (filePath) => {
|
|
307
318
|
if (!spec.matchesFile(filePath)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-memory-bucket",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server exposing skill_* (reusable coding patterns) and memory_* (point-in-time working context) tools over a markdown+frontmatter source, cached into SQLite at runtime.",
|
|
6
6
|
"repository": {
|