obsidian-sync-mcp 0.4.5 → 0.4.6
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/main.js
CHANGED
|
@@ -945,7 +945,7 @@ if (VAULT_PATH) {
|
|
|
945
945
|
console.error("COUCHDB_PASSWORD is required in remote mode.");
|
|
946
946
|
process.exit(1);
|
|
947
947
|
}
|
|
948
|
-
const { Vault } = await import("./vault-
|
|
948
|
+
const { Vault } = await import("./vault-EKXBWYXE.js");
|
|
949
949
|
vault = new Vault({
|
|
950
950
|
couchdbUrl: COUCHDB_URL,
|
|
951
951
|
couchdbUser: COUCHDB_USER,
|
|
@@ -1085,7 +1085,7 @@ if (VAULT_PATH) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
var serverOptions = {
|
|
1087
1087
|
name: "obsidian-sync-mcp",
|
|
1088
|
-
version: "0.4.
|
|
1088
|
+
version: "0.4.6",
|
|
1089
1089
|
instructions: "Access and manage an Obsidian vault. You can read, write, list, search, move, and delete markdown notes. Every tool response includes an Obsidian deep link. Always show this link to the user using the format [obsidian://open?vault=...&file=...](obsidian://open?vault=...&file=...) so it is both clickable and visible as a URL."
|
|
1090
1090
|
};
|
|
1091
1091
|
var auth = null;
|
|
@@ -1138,7 +1138,7 @@ server.start({
|
|
|
1138
1138
|
transportType: "httpStream",
|
|
1139
1139
|
httpStream: { port: PORT, endpoint: "/mcp", host: process.env.HOST ?? "0.0.0.0" }
|
|
1140
1140
|
});
|
|
1141
|
-
console.log(`obsidian-sync-mcp v${"0.4.
|
|
1141
|
+
console.log(`obsidian-sync-mcp v${"0.4.6"} listening on port ${PORT}`);
|
|
1142
1142
|
process.on("unhandledRejection", (err) => {
|
|
1143
1143
|
console.error("Unhandled rejection:", err);
|
|
1144
1144
|
});
|
|
@@ -10988,9 +10988,12 @@ var DirectFileManipulator = class {
|
|
|
10988
10988
|
};
|
|
10989
10989
|
|
|
10990
10990
|
// src/vault.ts
|
|
10991
|
+
import { isPathProbablyObfuscated as isPathProbablyObfuscated2, decrypt as decrypt4 } from "octagonal-wheels/encryption/encryption";
|
|
10991
10992
|
var Vault = class _Vault {
|
|
10992
10993
|
manipulator;
|
|
10994
|
+
passphrase;
|
|
10993
10995
|
constructor(config) {
|
|
10996
|
+
this.passphrase = config.passphrase;
|
|
10994
10997
|
const opts = {
|
|
10995
10998
|
url: config.couchdbUrl,
|
|
10996
10999
|
username: config.couchdbUser,
|
|
@@ -11040,7 +11043,19 @@ var Vault = class _Vault {
|
|
|
11040
11043
|
});
|
|
11041
11044
|
for (const change of result.results) {
|
|
11042
11045
|
if (!change.doc) continue;
|
|
11043
|
-
const
|
|
11046
|
+
const meta = change.doc;
|
|
11047
|
+
if (meta.type === "leaf" || meta.type === "versioninfo") continue;
|
|
11048
|
+
if (meta._id?.startsWith("h:") || meta._id?.startsWith("_")) continue;
|
|
11049
|
+
let path = meta.path ?? "";
|
|
11050
|
+
if (isPathProbablyObfuscated2(path) && this.passphrase) {
|
|
11051
|
+
try {
|
|
11052
|
+
path = await decrypt4(path, this.passphrase, false);
|
|
11053
|
+
} catch {
|
|
11054
|
+
continue;
|
|
11055
|
+
}
|
|
11056
|
+
}
|
|
11057
|
+
if (!path.endsWith(".md") && !meta.deleted) continue;
|
|
11058
|
+
const doc = await this.manipulator.getByMeta(meta).catch(() => null);
|
|
11044
11059
|
if (doc) _Vault.docToChange(doc, callback);
|
|
11045
11060
|
}
|
|
11046
11061
|
totalProcessed += result.results.length;
|
|
@@ -11134,4 +11149,4 @@ var Vault = class _Vault {
|
|
|
11134
11149
|
export {
|
|
11135
11150
|
Vault
|
|
11136
11151
|
};
|
|
11137
|
-
//# sourceMappingURL=vault-
|
|
11152
|
+
//# sourceMappingURL=vault-EKXBWYXE.js.map
|