obsidian-sync-mcp 0.11.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.
- package/README.md +14 -4
- package/dist/chunk-AK3JXN67.js +59 -0
- package/dist/chunk-AK3JXN67.js.map +1 -0
- package/dist/main.js +15 -5
- package/dist/main.js.map +1 -1
- package/dist/{vault-7FFBJ5QT.js → vault-AV7JZZT2.js} +1807 -581
- package/dist/vault-AV7JZZT2.js.map +1 -0
- package/package.json +5 -3
- package/dist/chunk-GSVMRHWP.js +0 -33
- package/dist/chunk-GSVMRHWP.js.map +0 -1
- package/dist/vault-7FFBJ5QT.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obsidian-sync-mcp",
|
|
3
3
|
"mcpName": "io.github.es617/obsidian-sync-mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.1",
|
|
5
5
|
"description": "Give any AI agent access to your Obsidian vault over MCP",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,14 +35,16 @@
|
|
|
35
35
|
"dev": "tsx src/main.ts",
|
|
36
36
|
"test": "node --import tsx --test 'src/**/*.test.ts'",
|
|
37
37
|
"test:e2e": "node --import tsx --test test/e2e.test.ts",
|
|
38
|
-
"test:couchdb": "tsup test/couchdb-obfuscation.e2e.ts --out-dir .harness-tmp && node .harness-tmp/couchdb-obfuscation.e2e.js"
|
|
38
|
+
"test:couchdb": "tsup test/couchdb-obfuscation.e2e.ts --out-dir .harness-tmp && node .harness-tmp/couchdb-obfuscation.e2e.js",
|
|
39
|
+
"test:smoke": "npm run build && tsup test/smoke.e2e.ts --out-dir .harness-tmp && node .harness-tmp/smoke.e2e.js"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
42
|
+
"@vrtmrz/value-store": "^0.1.0",
|
|
41
43
|
"diff-match-patch": "^1.0.5",
|
|
42
44
|
"fastmcp": "^3.34.0",
|
|
43
45
|
"fflate": "^0.8.2",
|
|
44
46
|
"minimatch": "^10",
|
|
45
|
-
"octagonal-wheels": "^0.1.
|
|
47
|
+
"octagonal-wheels": "^0.1.56",
|
|
46
48
|
"pouchdb-adapter-http": "^9.0.0",
|
|
47
49
|
"pouchdb-core": "^9.0.0",
|
|
48
50
|
"pouchdb-errors": "^9.0.0",
|
package/dist/chunk-GSVMRHWP.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Node polyfills for livesync-commonlib browser globals
|
|
3
|
-
if(!("navigator" in globalThis)){globalThis.navigator={language:"en"};}
|
|
4
|
-
|
|
5
|
-
// src/index-sync.ts
|
|
6
|
-
function deriveContent(doc) {
|
|
7
|
-
if (doc.deleted) return null;
|
|
8
|
-
return "data" in doc && Array.isArray(doc.data) ? doc.data.join("") : "";
|
|
9
|
-
}
|
|
10
|
-
function applyIndexChange(index, path, content, mtime) {
|
|
11
|
-
if (content !== null) {
|
|
12
|
-
index.update(path, content, mtime);
|
|
13
|
-
} else {
|
|
14
|
-
index.remove(path);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function pruneGhosts(index, preexisting, seen) {
|
|
18
|
-
const removed = [];
|
|
19
|
-
for (const p of preexisting) {
|
|
20
|
-
if (!seen.has(p)) {
|
|
21
|
-
index.remove(p);
|
|
22
|
-
removed.push(p);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return removed;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
deriveContent,
|
|
30
|
-
applyIndexChange,
|
|
31
|
-
pruneGhosts
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=chunk-GSVMRHWP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index-sync.ts"],"sourcesContent":["/**\n * Shared search-index sync helpers.\n *\n * Kept dependency-free (no livesync-commonlib imports) so the delete-vs-empty\n * routing is unit-testable in isolation.\n */\n\nexport interface IndexTarget {\n update(path: string, content: string, mtime?: number): void;\n remove(path: string): void;\n}\n\n/**\n * Derive index content from a LiveSync change doc.\n *\n * Returns `null` ONLY when the note is deleted. An existing note with no body\n * yields `\"\"` so a zero-byte note stays distinguishable from a deletion —\n * without this, a note that serializes with no `data` array would look deleted.\n */\nexport function deriveContent(doc: { deleted?: boolean; data?: unknown }): string | null {\n if (doc.deleted) return null;\n return \"data\" in doc && Array.isArray(doc.data) ? doc.data.join(\"\") : \"\";\n}\n\n/**\n * Route a change into the index: `null` content removes (the note was deleted),\n * any string — including `\"\"` — upserts. Using `content !== null` (rather than a\n * truthiness check) keeps zero-byte notes indexed instead of dropping them\n * (issues #5 / #6).\n */\nexport function applyIndexChange(index: IndexTarget, path: string, content: string | null, mtime?: number): void {\n if (content !== null) {\n index.update(path, content, mtime);\n } else {\n index.remove(path);\n }\n}\n\n/**\n * After a completed from-zero catch-up, remove index entries for notes that\n * vanished while the server was down (e.g. a remote \"Rebuild database\" that\n * left no tombstones to replay). Only paths present before the pass\n * (`preexisting`) that the pass did not re-deliver (`seen`) are dropped:\n * restricting the prune to pre-existing paths means an entry the live watcher\n * adds mid-pass is never pruned. Returns the removed paths.\n */\nexport function pruneGhosts(\n index: Pick<IndexTarget, \"remove\">,\n preexisting: Iterable<string>,\n seen: ReadonlySet<string>,\n): string[] {\n const removed: string[] = [];\n for (const p of preexisting) {\n if (!seen.has(p)) {\n index.remove(p);\n removed.push(p);\n }\n }\n return removed;\n}\n"],"mappings":";;;;;AAmBO,SAAS,cAAc,KAA2D;AACrF,MAAI,IAAI,QAAS,QAAO;AACxB,SAAO,UAAU,OAAO,MAAM,QAAQ,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,IAAI;AAC1E;AAQO,SAAS,iBAAiB,OAAoB,MAAc,SAAwB,OAAsB;AAC7G,MAAI,YAAY,MAAM;AAClB,UAAM,OAAO,MAAM,SAAS,KAAK;AAAA,EACrC,OAAO;AACH,UAAM,OAAO,IAAI;AAAA,EACrB;AACJ;AAUO,SAAS,YACZ,OACA,aACA,MACQ;AACR,QAAM,UAAoB,CAAC;AAC3B,aAAW,KAAK,aAAa;AACzB,QAAI,CAAC,KAAK,IAAI,CAAC,GAAG;AACd,YAAM,OAAO,CAAC;AACd,cAAQ,KAAK,CAAC;AAAA,IAClB;AAAA,EACJ;AACA,SAAO;AACX;","names":[]}
|