mcp-memory-bucket 0.12.0 → 0.12.1

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.
@@ -196,7 +196,16 @@ async function pullFile(db, spec, folder, credentialsBaseDir, changedFile) {
196
196
  // converted to mirror-relative before joining onto folder.mirrorDir.
197
197
  const content = await readFile(folder.server, credentialsBaseDir, folder.tenantId, changedFile.folderPath, changedFile.name, folder.owner);
198
198
  const mirrorRelativeDir = toMirrorRelativeDir(folder.folderPath, changedFile.folderPath);
199
- const localFilename = spec.remoteFilename.toLocal(changedFile.name);
199
+ // spec.remoteFilename.toLocal exists to translate a DOC's own remote name (a skill's fixed
200
+ // "SKILL" -> "SKILL.md", or a memory doc's legacy extensionless remote name -> "<name>.md") - it
201
+ // must never touch an attachment (or skill sibling) file, which is pushed/pulled under its own
202
+ // literal name with no translation (see attachments/storage.ts's isUnderAttachmentsDir doc
203
+ // comment). Applying it unconditionally used to append ".md" to every non-.md attachment (e.g.
204
+ // "style.css" -> "style.css.md"), which reconcileDeletions' own untranslated remote-listing
205
+ // comparison then saw as absent remotely and deleted on the very same poll - so a directory/file
206
+ // attachment synced down to a second machine, then vanished before its resync even finished.
207
+ const isAttachment = isUnderAttachmentsDir(mirrorRelativeDir);
208
+ const localFilename = isAttachment ? changedFile.name : spec.remoteFilename.toLocal(changedFile.name);
200
209
  const relPath = mirrorRelativeDir ? path.join(mirrorRelativeDir, localFilename) : localFilename;
201
210
  const mirrorPath = path.join(folder.mirrorDir, relPath);
202
211
  fs.mkdirSync(path.dirname(mirrorPath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-memory-bucket",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
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": {