obsidian-sync-mcp 0.5.0 → 0.5.2
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
|
@@ -869,7 +869,7 @@ if (VAULT_PATH) {
|
|
|
869
869
|
console.error("COUCHDB_PASSWORD is required in remote mode.");
|
|
870
870
|
process.exit(1);
|
|
871
871
|
}
|
|
872
|
-
const { Vault } = await import("./vault-
|
|
872
|
+
const { Vault } = await import("./vault-5Y35MEZS.js");
|
|
873
873
|
vault = new Vault({
|
|
874
874
|
couchdbUrl: COUCHDB_URL,
|
|
875
875
|
couchdbUser: COUCHDB_USER,
|
|
@@ -998,7 +998,7 @@ if (VAULT_PATH) {
|
|
|
998
998
|
}
|
|
999
999
|
var serverOptions = {
|
|
1000
1000
|
name: "obsidian-sync-mcp",
|
|
1001
|
-
version: "0.5.
|
|
1001
|
+
version: "0.5.2",
|
|
1002
1002
|
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."
|
|
1003
1003
|
};
|
|
1004
1004
|
var auth = null;
|
|
@@ -1051,7 +1051,7 @@ server.start({
|
|
|
1051
1051
|
transportType: "httpStream",
|
|
1052
1052
|
httpStream: { port: PORT, endpoint: "/mcp", host: process.env.HOST ?? "0.0.0.0" }
|
|
1053
1053
|
});
|
|
1054
|
-
console.log(`obsidian-sync-mcp v${"0.5.
|
|
1054
|
+
console.log(`obsidian-sync-mcp v${"0.5.2"} listening on port ${PORT}`);
|
|
1055
1055
|
process.on("unhandledRejection", (err) => {
|
|
1056
1056
|
console.error("Unhandled rejection:", err);
|
|
1057
1057
|
});
|
|
@@ -4737,6 +4737,9 @@ function createSyncParamsHanderForServer(key, options) {
|
|
|
4737
4737
|
_handlers.set(key, handler);
|
|
4738
4738
|
return handler;
|
|
4739
4739
|
}
|
|
4740
|
+
function clearHandlers() {
|
|
4741
|
+
_handlers.clear();
|
|
4742
|
+
}
|
|
4740
4743
|
var SyncParamsHandlerError = class extends LiveSyncError {
|
|
4741
4744
|
};
|
|
4742
4745
|
var SyncParamsFetchError = class extends SyncParamsHandlerError {
|
|
@@ -11091,6 +11094,7 @@ var Vault = class _Vault {
|
|
|
11091
11094
|
}
|
|
11092
11095
|
async writeNote(path, content) {
|
|
11093
11096
|
this.validatePath(path);
|
|
11097
|
+
clearHandlers();
|
|
11094
11098
|
let ctime = Date.now();
|
|
11095
11099
|
const existing = await this.manipulator.get(path, true);
|
|
11096
11100
|
if (existing && "ctime" in existing) {
|
|
@@ -11105,6 +11109,7 @@ var Vault = class _Vault {
|
|
|
11105
11109
|
}
|
|
11106
11110
|
async deleteNote(path) {
|
|
11107
11111
|
this.validatePath(path);
|
|
11112
|
+
clearHandlers();
|
|
11108
11113
|
return await this.manipulator.delete(path);
|
|
11109
11114
|
}
|
|
11110
11115
|
async moveNote(from, to) {
|
|
@@ -11150,4 +11155,4 @@ var Vault = class _Vault {
|
|
|
11150
11155
|
export {
|
|
11151
11156
|
Vault
|
|
11152
11157
|
};
|
|
11153
|
-
//# sourceMappingURL=vault-
|
|
11158
|
+
//# sourceMappingURL=vault-5Y35MEZS.js.map
|