mcp-memory-bucket 0.7.0 → 0.7.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.
@@ -57,7 +57,15 @@ export class AttachmentRepository {
57
57
  const next = (doc.attachments ?? []).filter((a) => a.filename !== filename);
58
58
  this.saveAttachmentsList(kind, docIdOrName, next);
59
59
  if (listAttachmentFiles(dir).length === 0) {
60
- fs.rmdirSync(dir, { recursive: true });
60
+ fs.rmSync(dir, { recursive: true, force: true });
61
+ if (kind === 'memory') {
62
+ // Memory docs get a sibling <id>/ wrapper solely to hold attachments/
63
+ // (see attachmentsDirFor) - remove it too once it's empty.
64
+ const wrapperDir = path.dirname(dir);
65
+ if (fs.existsSync(wrapperDir) && fs.readdirSync(wrapperDir).length === 0) {
66
+ fs.rmdirSync(wrapperDir);
67
+ }
68
+ }
61
69
  }
62
70
  }
63
71
  list(kind, docIdOrName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-memory-bucket",
3
- "version": "0.7.0",
3
+ "version": "0.7.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": {