@sunub/obsidian-mcp-server 0.3.0 → 0.3.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/README.md +21 -5
- package/build/cli/app.d.ts +1 -0
- package/build/cli/colors.d.ts +15 -0
- package/build/cli/colors.js +15 -0
- package/build/cli/colors.js.map +1 -0
- package/build/cli/commands/types.d.ts +19 -0
- package/build/cli/commands/types.js +11 -0
- package/build/cli/commands/types.js.map +1 -0
- package/build/cli/config/mcpServersConfig.d.ts +15 -3
- package/build/cli/config/mcpServersConfig.js +1 -1
- package/build/cli/config/mcpServersConfig.js.map +1 -1
- package/build/cli/constants.d.ts +47 -0
- package/build/cli/constants.js +101 -0
- package/build/cli/constants.js.map +1 -0
- package/build/cli/index.d.ts +1 -0
- package/build/cli/index.js +16 -4
- package/build/cli/index.js.map +1 -1
- package/build/cli/key/input.d.ts +5 -0
- package/build/cli/key/input.js +9 -0
- package/build/cli/key/input.js.map +1 -0
- package/build/cli/key/mouse.d.ts +23 -0
- package/build/cli/key/mouse.js +155 -0
- package/build/cli/key/mouse.js.map +1 -0
- package/build/cli/key/text-buffer-bestcase.d.ts +867 -0
- package/build/cli/key/text-buffer.d.ts +509 -0
- package/build/cli/main.d.ts +1 -0
- package/build/cli/main.js +20 -0
- package/build/cli/main.js.map +1 -0
- package/build/cli/reference/text-buffer.d.ts +867 -0
- package/build/cli/reference/text-buffer.js +2754 -0
- package/build/cli/reference/text-buffer.js.map +1 -0
- package/build/cli/theme/builtin/default-dark.d.ts +7 -0
- package/build/cli/theme/builtin/default-dark.js +143 -0
- package/build/cli/theme/builtin/default-dark.js.map +1 -0
- package/build/cli/theme/builtin/no-color.d.ts +7 -0
- package/build/cli/theme/builtin/tokyonight-dark.d.ts +7 -0
- package/build/cli/theme/semantic-colors.d.ts +2 -0
- package/build/cli/theme/semantic-tokens.d.ts +42 -0
- package/build/cli/theme/theme.d.ts +107 -0
- package/build/cli/tmp.d.ts +1 -0
- package/build/cli/utils/cache.d.ts +21 -0
- package/build/cli/utils/cache.js +56 -0
- package/build/cli/utils/cache.js.map +1 -0
- package/build/cli/utils/debugLogger.js +5 -5
- package/build/cli/utils/debugLogger.js.map +1 -1
- package/build/config.d.ts +30 -0
- package/build/config.js +1 -1
- package/build/config.js.map +1 -1
- package/build/db.d.ts +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +4 -2
- package/build/index.js.map +1 -1
- package/build/server.d.ts +2 -0
- package/build/server.js +39 -0
- package/build/server.js.map +1 -0
- package/build/tools/create_document_with_properties/params.d.ts +2 -2
- package/build/tools/create_document_with_properties/params.js +33 -0
- package/build/tools/create_document_with_properties/params.js.map +1 -0
- package/build/tools/generate_property/index.d.ts +34 -0
- package/build/tools/generate_property/params.d.ts +48 -0
- package/build/tools/generate_property/params.js +55 -0
- package/build/tools/generate_property/params.js.map +1 -0
- package/build/tools/index.js +13 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/organize_attachments/index.d.ts +32 -0
- package/build/tools/organize_attachments/params.d.ts +16 -16
- package/build/tools/organize_attachments/params.js +61 -0
- package/build/tools/organize_attachments/params.js.map +1 -0
- package/build/tools/organize_attachments/utils.d.ts +22 -0
- package/build/tools/organize_attachments/utils.js +66 -0
- package/build/tools/organize_attachments/utils.js.map +1 -0
- package/build/tools/vault/index.d.ts +50 -0
- package/build/tools/vault/metrics.d.ts +25 -0
- package/build/tools/vault/metrics.js +130 -0
- package/build/tools/vault/metrics.js.map +1 -0
- package/build/tools/vault/params.d.ts +12 -12
- package/build/tools/vault/params.js +148 -0
- package/build/tools/vault/params.js.map +1 -0
- package/build/tools/vault/types/collect_context.d.ts +249 -249
- package/build/tools/vault/types/collect_context.js +103 -0
- package/build/tools/vault/types/collect_context.js.map +1 -0
- package/build/tools/vault/types/list_all.d.ts +14 -14
- package/build/tools/vault/types/list_all.js +53 -0
- package/build/tools/vault/types/list_all.js.map +1 -0
- package/build/tools/vault/types/read_specific.d.ts +18 -18
- package/build/tools/vault/types/read_specific.js +41 -0
- package/build/tools/vault/types/read_specific.js.map +1 -0
- package/build/tools/vault/types/search.d.ts +22 -22
- package/build/tools/vault/types/search.js +59 -0
- package/build/tools/vault/types/search.js.map +1 -0
- package/build/tools/vault/utils/actions/collect_context.d.ts +4 -0
- package/build/tools/vault/utils/actions/index_rag.d.ts +2 -0
- package/build/tools/vault/utils/actions/list_all.d.ts +4 -0
- package/build/tools/vault/utils/actions/load_memory.d.ts +4 -0
- package/build/tools/vault/utils/actions/read.d.ts +4 -0
- package/build/tools/vault/utils/actions/search.d.ts +4 -0
- package/build/tools/vault/utils/actions/search_semantic.d.ts +3 -0
- package/build/tools/vault/utils/actions/search_semantic.js +23 -6
- package/build/tools/vault/utils/actions/search_semantic.js.map +1 -1
- package/build/tools/vault/utils/actions/stats.d.ts +3 -0
- package/build/tools/vault/utils/constants.d.ts +2 -0
- package/build/tools/vault/utils/constants.js +3 -0
- package/build/tools/vault/utils/constants.js.map +1 -0
- package/build/tools/vault/utils/document.d.ts +35 -0
- package/build/tools/vault/utils/shared.d.ts +29 -0
- package/build/tools/vault/utils/shared.js +75 -0
- package/build/tools/vault/utils/shared.js.map +1 -0
- package/build/tools/vault/utils.d.ts +8 -0
- package/build/tools/vault/utils.js +9 -0
- package/build/tools/vault/utils.js.map +1 -0
- package/build/tools/write_property/params.d.ts +60 -0
- package/build/tools/write_property/params.js +52 -0
- package/build/tools/write_property/params.js.map +1 -0
- package/build/utils/LLMClient.d.ts +1 -3
- package/build/utils/LLMClient.js +18 -4
- package/build/utils/LLMClient.js.map +1 -1
- package/build/utils/RerankerClient.d.ts +38 -4
- package/build/utils/RerankerClient.js +2 -1
- package/build/utils/RerankerClient.js.map +1 -1
- package/build/utils/VaultWatcher.js +35 -28
- package/build/utils/VaultWatcher.js.map +1 -1
- package/build/utils/processor/types.d.ts +2 -2
- package/build/utils/processor/types.js +21 -0
- package/build/utils/processor/types.js.map +1 -0
- package/build/utils/semaphore.d.ts +7 -0
- package/build/utils/semaphore.js +26 -0
- package/build/utils/semaphore.js.map +1 -0
- package/package.json +4 -2
|
@@ -29,23 +29,23 @@ class DebugLogger {
|
|
|
29
29
|
}
|
|
30
30
|
info(...args) {
|
|
31
31
|
this.writeToFile("INFO", args);
|
|
32
|
-
console.info(chalk.green("[INFO]"), chalk.
|
|
32
|
+
console.info(chalk.green("[INFO]"), chalk.green(util.format(...args)));
|
|
33
33
|
}
|
|
34
34
|
log(...args) {
|
|
35
35
|
this.writeToFile("LOG", args);
|
|
36
|
-
console.log(chalk.blue("[LOG]"), chalk.
|
|
36
|
+
console.log(chalk.blue("[LOG]"), chalk.gray(util.format(...args)));
|
|
37
37
|
}
|
|
38
38
|
warn(...args) {
|
|
39
39
|
this.writeToFile("WARN", args);
|
|
40
|
-
console.warn(chalk.yellow("[WARN]"), chalk.
|
|
40
|
+
console.warn(chalk.yellow("[WARN]"), chalk.yellow(util.format(...args)));
|
|
41
41
|
}
|
|
42
42
|
error(...args) {
|
|
43
43
|
this.writeToFile("ERROR", args);
|
|
44
|
-
console.error(chalk.red("[ERROR]"), chalk.
|
|
44
|
+
console.error(chalk.red("[ERROR]"), chalk.red(util.format(...args)));
|
|
45
45
|
}
|
|
46
46
|
debug(...args) {
|
|
47
47
|
this.writeToFile("DEBUG", args);
|
|
48
|
-
console.debug(chalk.magenta("[DEBUG]"), chalk.
|
|
48
|
+
console.debug(chalk.magenta("[DEBUG]"), chalk.magenta(util.format(...args)));
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
export const debugLogger = new DebugLogger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugLogger.js","sourceRoot":"","sources":["../../../src/cli/utils/debugLogger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,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IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,KAAK,CAAC,GAAG,IAAe;QACvB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAChC,OAAO,CAAC,KAAK,CACZ,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EACxB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CACnC,CAAC;IACH,CAAC;CACD;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const configSchema: z.ZodObject<{
|
|
3
|
+
vaultPath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
4
|
+
loggingLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
|
|
5
|
+
llmApiUrl: z.ZodDefault<z.ZodString>;
|
|
6
|
+
llmEmbeddingApiUrl: z.ZodDefault<z.ZodString>;
|
|
7
|
+
llmEmbeddingModel: z.ZodDefault<z.ZodString>;
|
|
8
|
+
llmChatModel: z.ZodDefault<z.ZodString>;
|
|
9
|
+
llmRerankerApiUrl: z.ZodDefault<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
vaultPath: string;
|
|
12
|
+
loggingLevel: "debug" | "info" | "warn" | "error";
|
|
13
|
+
llmApiUrl: string;
|
|
14
|
+
llmEmbeddingApiUrl: string;
|
|
15
|
+
llmEmbeddingModel: string;
|
|
16
|
+
llmChatModel: string;
|
|
17
|
+
llmRerankerApiUrl: string;
|
|
18
|
+
}, {
|
|
19
|
+
vaultPath: string;
|
|
20
|
+
loggingLevel?: "debug" | "info" | "warn" | "error" | undefined;
|
|
21
|
+
llmApiUrl?: string | undefined;
|
|
22
|
+
llmEmbeddingApiUrl?: string | undefined;
|
|
23
|
+
llmEmbeddingModel?: string | undefined;
|
|
24
|
+
llmChatModel?: string | undefined;
|
|
25
|
+
llmRerankerApiUrl?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export type ObsidianMcpConfig = z.infer<typeof configSchema>;
|
|
28
|
+
declare const state: ObsidianMcpConfig;
|
|
29
|
+
export declare function getOptions(): ObsidianMcpConfig | false;
|
|
30
|
+
export default state;
|
package/build/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, statSync } from "node:fs";
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import dotenv from "dotenv";
|
|
5
|
-
import { z } from "zod
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
dotenv.config({ debug: false, quiet: true });
|
|
7
7
|
const vaultPathSchema = z
|
|
8
8
|
.string()
|
package/build/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,M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AAI,CAAC,iBAAiB,CAAC;IAC7D,KAAK,CAAC,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IAEnD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,eAAe,KAAK,CAAC"}
|
package/build/db.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/index.d.ts
ADDED
package/build/index.js
CHANGED
|
@@ -10,8 +10,10 @@ async function main() {
|
|
|
10
10
|
process.exit(1);
|
|
11
11
|
}
|
|
12
12
|
try {
|
|
13
|
-
// Start vault watcher for RAG sync
|
|
14
|
-
|
|
13
|
+
// Start vault watcher for RAG sync in the background
|
|
14
|
+
vaultWatcher.start(options.vaultPath).catch((error) => {
|
|
15
|
+
console.error("[VaultWatcher] Background indexing error:", error);
|
|
16
|
+
});
|
|
15
17
|
const server = createMcpServer();
|
|
16
18
|
const transport = new StdioServerTransport();
|
|
17
19
|
await server.connect(transport);
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,eAAe,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,KAAK,UAAU,IAAI;IAClB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC;QACJ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,eAAe,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,KAAK,UAAU,IAAI;IAClB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC;QACJ,qDAAqD;QACrD,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACrD,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;AACF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACtB,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
package/build/server.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import pkg from "../package.json" with { type: "json" };
|
|
3
|
+
import tools from "./tools/index.js";
|
|
4
|
+
export default function createMcpServer() {
|
|
5
|
+
const mcpServer = new McpServer({
|
|
6
|
+
version: pkg.version,
|
|
7
|
+
name: "obsidian-mcp-server",
|
|
8
|
+
title: "Obsidian MCP Server",
|
|
9
|
+
}, {
|
|
10
|
+
capabilities: {
|
|
11
|
+
logging: {},
|
|
12
|
+
tools: { listChanged: false },
|
|
13
|
+
},
|
|
14
|
+
instructions: `
|
|
15
|
+
This server provides access to Obsidian vault documents and related tools.
|
|
16
|
+
|
|
17
|
+
Available tools:
|
|
18
|
+
- vault: Search, read, list, and semantic search markdown documents in the vault
|
|
19
|
+
* action="search_vault_by_semantic": Find documents by meaning using a natural language query.
|
|
20
|
+
* action="index_vault_to_vectordb": Manually trigger a full vault re-indexing.
|
|
21
|
+
- generate_property: Generate frontmatter property suggestions from document content
|
|
22
|
+
- write_property: Write frontmatter properties to a markdown file
|
|
23
|
+
- create_document_with_properties: Two-step workflow for AI-generated properties and write
|
|
24
|
+
- organize_attachments: Move linked attachments and update markdown links
|
|
25
|
+
|
|
26
|
+
Environment requirements:
|
|
27
|
+
- VAULT_DIR_PATH: Path to your Obsidian vault directory
|
|
28
|
+
- LLM_API_URL: (Optional) llama.cpp chat server URL (default: http://127.0.0.1:8080)
|
|
29
|
+
- LLM_EMBEDDING_API_URL: (Optional) llama.cpp embedding server URL (default: http://127.0.0.1:8081)
|
|
30
|
+
- LLM_EMBEDDING_MODEL: (Optional) Embedding model name (default: nomic-embed-text)
|
|
31
|
+
- LLM_CHAT_MODEL: (Optional) Chat model name (default: llama3)
|
|
32
|
+
`,
|
|
33
|
+
});
|
|
34
|
+
for (const tool of Object.values(tools)) {
|
|
35
|
+
tool.register(mcpServer);
|
|
36
|
+
}
|
|
37
|
+
return mcpServer;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,eAAe;IACtC,MAAM,SAAS,GAAG,IAAI,SAAS,CAC9B;QACC,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,qBAAqB;KAC5B,EACD;QACC,YAAY,EAAE;YACb,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;SAC7B;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;QAkBT;KACL,CACD,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -35,8 +35,8 @@ export declare const createDocumentWithPropertiesParamsSchema: z.ZodObject<{
|
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
quiet: boolean;
|
|
37
37
|
sourcePath: string;
|
|
38
|
-
outputPath?: string | undefined;
|
|
39
38
|
overwrite?: boolean | undefined;
|
|
39
|
+
outputPath?: string | undefined;
|
|
40
40
|
aiGeneratedProperties?: {
|
|
41
41
|
date?: string | undefined;
|
|
42
42
|
title?: string | undefined;
|
|
@@ -50,8 +50,8 @@ export declare const createDocumentWithPropertiesParamsSchema: z.ZodObject<{
|
|
|
50
50
|
}, {
|
|
51
51
|
sourcePath: string;
|
|
52
52
|
quiet?: boolean | undefined;
|
|
53
|
-
outputPath?: string | undefined;
|
|
54
53
|
overwrite?: boolean | undefined;
|
|
54
|
+
outputPath?: string | undefined;
|
|
55
55
|
aiGeneratedProperties?: {
|
|
56
56
|
date?: string | undefined;
|
|
57
57
|
title?: string | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { obsidianPropertyOutputSchema } from "../generate_property/params.js";
|
|
3
|
+
// input properties
|
|
4
|
+
const sourcePath = z
|
|
5
|
+
.string()
|
|
6
|
+
.describe('The path to the source markdown file to read and analyze (e.g., "draft/my-article.md")');
|
|
7
|
+
const outputPath = z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("The path where the processed file with properties will be saved. If not provided, the source file will be updated in place.");
|
|
11
|
+
const overwrite = z
|
|
12
|
+
.boolean()
|
|
13
|
+
.default(false)
|
|
14
|
+
.describe("If set to true, existing properties will be overwritten by the AI-generated content. Default: false.");
|
|
15
|
+
const aiGeneratedProperties = obsidianPropertyOutputSchema
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("AI-generated properties based on content analysis. If provided, these will be used instead of internal analysis.");
|
|
18
|
+
const quiet = z
|
|
19
|
+
.boolean()
|
|
20
|
+
.optional()
|
|
21
|
+
.default(false)
|
|
22
|
+
.describe("If true, the final write operation will return a minimal success message.");
|
|
23
|
+
// input schema
|
|
24
|
+
export const createDocumentWithPropertiesParamsSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
sourcePath: sourcePath,
|
|
27
|
+
outputPath: outputPath,
|
|
28
|
+
overwrite: overwrite.optional(),
|
|
29
|
+
aiGeneratedProperties: aiGeneratedProperties.optional(),
|
|
30
|
+
quiet: quiet,
|
|
31
|
+
})
|
|
32
|
+
.describe("Parameters for creating or updating a document with automatically generated properties");
|
|
33
|
+
//# sourceMappingURL=params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/tools/create_document_with_properties/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,mBAAmB;AACnB,MAAM,UAAU,GAAG,CAAC;KAClB,MAAM,EAAE;KACR,QAAQ,CACR,wFAAwF,CACxF,CAAC;AACH,MAAM,UAAU,GAAG,CAAC;KAClB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACR,6HAA6H,CAC7H,CAAC;AACH,MAAM,SAAS,GAAG,CAAC;KACjB,OAAO,EAAE;KACT,OAAO,CAAC,KAAK,CAAC;KACd,QAAQ,CACR,sGAAsG,CACtG,CAAC;AACH,MAAM,qBAAqB,GAAG,4BAA4B;KACxD,QAAQ,EAAE;KACV,QAAQ,CACR,kHAAkH,CAClH,CAAC;AACH,MAAM,KAAK,GAAG,CAAC;KACb,OAAO,EAAE;KACT,QAAQ,EAAE;KACV,OAAO,CAAC,KAAK,CAAC;KACd,QAAQ,CACR,2EAA2E,CAC3E,CAAC;AAEH,eAAe;AACf,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC;KACvD,MAAM,CAAC;IACP,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE;IAC/B,qBAAqB,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACvD,KAAK,EAAE,KAAK;CACZ,CAAC;KACD,QAAQ,CACR,wFAAwF,CACxF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { CallToolResult, ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { type ObsidianPropertyQueryParams } from "./params.js";
|
|
4
|
+
export declare const name = "generate_property";
|
|
5
|
+
export declare const annotations: ToolAnnotations;
|
|
6
|
+
export declare const description = "\n Reads a target markdown document and returns an AI-facing payload for generating frontmatter properties.\n\n This tool does not write to disk. It returns content_preview and a target output schema so an AI can produce a valid property object.\n\n Use Cases:\n - After completing a draft, when you need property suggestions from content.\n - When missing frontmatter fields (title, tags, summary, slug, date, category, completed) should be generated.\n\n To apply generated properties to a file, call 'write_property' with the resulting JSON.\n";
|
|
7
|
+
export declare const register: (mcpServer: McpServer) => void;
|
|
8
|
+
export declare const execute: (params: ObsidianPropertyQueryParams) => Promise<CallToolResult>;
|
|
9
|
+
export declare const shorthandDescription: {
|
|
10
|
+
en: string;
|
|
11
|
+
ko: string;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
annotations: {
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
readOnlyHint?: boolean | undefined;
|
|
19
|
+
destructiveHint?: boolean | undefined;
|
|
20
|
+
idempotentHint?: boolean | undefined;
|
|
21
|
+
openWorldHint?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
inputSchema: {
|
|
24
|
+
filename: import("zod").ZodString;
|
|
25
|
+
overwrite: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
26
|
+
};
|
|
27
|
+
execute: (params: ObsidianPropertyQueryParams) => Promise<CallToolResult>;
|
|
28
|
+
register: (mcpServer: McpServer) => void;
|
|
29
|
+
shorthandDescription: {
|
|
30
|
+
en: string;
|
|
31
|
+
ko: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const obsidianPropertyQueryParamsSchema: z.ZodObject<{
|
|
3
|
+
filename: z.ZodString;
|
|
4
|
+
overwrite: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
filename: string;
|
|
7
|
+
overwrite?: boolean | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
filename: string;
|
|
10
|
+
overwrite?: boolean | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type ObsidianPropertyQueryParams = z.infer<typeof obsidianPropertyQueryParamsSchema>;
|
|
13
|
+
export declare const obsidianCssClassesProperty: z.ZodArray<z.ZodString, "many">;
|
|
14
|
+
export declare const obsidianTagsProperty: z.ZodArray<z.ZodString, "many">;
|
|
15
|
+
export declare const obsidianTitleProperty: z.ZodString;
|
|
16
|
+
export declare const obsidianDateProperty: z.ZodString;
|
|
17
|
+
export declare const obsidianSummaryProperty: z.ZodString;
|
|
18
|
+
export declare const obsidianSlugProperty: z.ZodString;
|
|
19
|
+
export declare const obsidianCategoryProperty: z.ZodString;
|
|
20
|
+
export declare const obsidianCompletedProperty: z.ZodBoolean;
|
|
21
|
+
export declare const obsidianPropertyOutputSchema: z.ZodObject<{
|
|
22
|
+
cssclasses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
date: z.ZodOptional<z.ZodString>;
|
|
26
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
27
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
28
|
+
category: z.ZodOptional<z.ZodString>;
|
|
29
|
+
completed: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
date?: string | undefined;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
tags?: string[] | undefined;
|
|
34
|
+
summary?: string | undefined;
|
|
35
|
+
slug?: string | undefined;
|
|
36
|
+
category?: string | undefined;
|
|
37
|
+
completed?: boolean | undefined;
|
|
38
|
+
cssclasses?: string[] | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
date?: string | undefined;
|
|
41
|
+
title?: string | undefined;
|
|
42
|
+
tags?: string[] | undefined;
|
|
43
|
+
summary?: string | undefined;
|
|
44
|
+
slug?: string | undefined;
|
|
45
|
+
category?: string | undefined;
|
|
46
|
+
completed?: boolean | undefined;
|
|
47
|
+
cssclasses?: string[] | undefined;
|
|
48
|
+
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// input properties
|
|
3
|
+
const obsidianGenerateInputFilename = z
|
|
4
|
+
.string()
|
|
5
|
+
.describe('The name or path of the file to analyze and add properties to (e.g., "my-first-post.md")');
|
|
6
|
+
const obsidianGenerateInputOverwrite = z
|
|
7
|
+
.boolean()
|
|
8
|
+
.default(true)
|
|
9
|
+
.describe("If set to true, existing properties will be overwritten by the AI-generated content. Default: false.");
|
|
10
|
+
// input schema
|
|
11
|
+
export const obsidianPropertyQueryParamsSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
filename: obsidianGenerateInputFilename,
|
|
14
|
+
overwrite: obsidianGenerateInputOverwrite.optional(),
|
|
15
|
+
})
|
|
16
|
+
.describe("Parameters for generating or updating Obsidian document properties");
|
|
17
|
+
// output properties
|
|
18
|
+
export const obsidianCssClassesProperty = z
|
|
19
|
+
.array(z.string())
|
|
20
|
+
.describe("List of CSS classes associated with the document");
|
|
21
|
+
export const obsidianTagsProperty = z
|
|
22
|
+
.array(z.string())
|
|
23
|
+
.describe("List of tags associated with the document");
|
|
24
|
+
export const obsidianTitleProperty = z
|
|
25
|
+
.string()
|
|
26
|
+
.describe("Title of the document");
|
|
27
|
+
export const obsidianDateProperty = z
|
|
28
|
+
.string()
|
|
29
|
+
.describe("Creation date of the document in ISO 8601 format");
|
|
30
|
+
export const obsidianSummaryProperty = z
|
|
31
|
+
.string()
|
|
32
|
+
.describe("Brief summary or abstract of the document");
|
|
33
|
+
export const obsidianSlugProperty = z
|
|
34
|
+
.string()
|
|
35
|
+
.describe("URL-friendly identifier for the document");
|
|
36
|
+
export const obsidianCategoryProperty = z
|
|
37
|
+
.string()
|
|
38
|
+
.describe("Category or classification of the document");
|
|
39
|
+
export const obsidianCompletedProperty = z
|
|
40
|
+
.boolean()
|
|
41
|
+
.describe("Indicates whether a task or item is completed");
|
|
42
|
+
// output schema
|
|
43
|
+
export const obsidianPropertyOutputSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
cssclasses: obsidianCssClassesProperty.optional(),
|
|
46
|
+
tags: obsidianTagsProperty.optional(),
|
|
47
|
+
title: obsidianTitleProperty.optional(),
|
|
48
|
+
date: obsidianDateProperty.optional(),
|
|
49
|
+
summary: obsidianSummaryProperty.optional(),
|
|
50
|
+
slug: obsidianSlugProperty.optional(),
|
|
51
|
+
category: obsidianCategoryProperty.optional(),
|
|
52
|
+
completed: obsidianCompletedProperty.optional(),
|
|
53
|
+
})
|
|
54
|
+
.describe("Extracted properties from the Obsidian document content");
|
|
55
|
+
//# sourceMappingURL=params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/tools/generate_property/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mBAAmB;AACnB,MAAM,6BAA6B,GAAG,CAAC;KACrC,MAAM,EAAE;KACR,QAAQ,CACR,0FAA0F,CAC1F,CAAC;AACH,MAAM,8BAA8B,GAAG,CAAC;KACtC,OAAO,EAAE;KACT,OAAO,CAAC,IAAI,CAAC;KACb,QAAQ,CACR,sGAAsG,CACtG,CAAC;AAEH,eAAe;AACf,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAChD,MAAM,CAAC;IACP,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,8BAA8B,CAAC,QAAQ,EAAE;CACpD,CAAC;KACD,QAAQ,CACR,oEAAoE,CACpE,CAAC;AAMH,oBAAoB;AACpB,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACzC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACjB,QAAQ,CAAC,kDAAkD,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KACnC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACjB,QAAQ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ateObsidianVaultPropertiesTool from "./generate_property/index.js";
|
|
3
|
+
import OrganizeAttachmentsTool from "./organize_attachments/index.js";
|
|
4
|
+
import ObsidianVaultTool from "./vault/index.js";
|
|
5
|
+
import WriteObsidianPropertyTool from "./write_property/index.js";
|
|
6
|
+
export default {
|
|
7
|
+
ObsidianVaultTool,
|
|
8
|
+
GenerateObsidianVaultPropertiesTool,
|
|
9
|
+
WriteObsidianPropertyTool,
|
|
10
|
+
CreateDocumentWithPropertyTool,
|
|
11
|
+
OrganizeAttachmentsTool,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,MAAM,4CAA4C,CAAC;AACxF,OAAO,mCAAmC,MAAM,8BAA8B,CAAC;AAC/E,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AACtE,OAAO,iBAAiB,MAAM,kBAAkB,CAAC;AACjD,OAAO,yBAAyB,MAAM,2BAA2B,CAAC;AAElE,eAAe;IACd,iBAAiB;IACjB,mCAAmC;IACnC,yBAAyB;IACzB,8BAA8B;IAC9B,uBAAuB;CACvB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { CallToolResult, ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { type OrganizeAttachmentsParams } from "./params.js";
|
|
4
|
+
export declare const name = "organize_attachments";
|
|
5
|
+
export declare const annotations: ToolAnnotations;
|
|
6
|
+
export declare const description = "\n Scans a specified markdown file for linked images (or other attachments),\n moves them to a dedicated folder named after the document's title,\n and updates the links within the markdown file automatically.\n\n Use Cases:\n - When a post is finalized and you want to clean up all associated images into a neat folder.\n - To automatically organize attachments for better vault management.\n\n Example Workflow:\n 1. Specify 'my-awesome-post.md' as the fileName.\n 2. The tool finds the 'title' property in the frontmatter (e.g., \"My Awesome Post\").\n 3. It finds all image links like ![[my-image.png]].\n 4. It creates a folder at '{vault}/images/My Awesome Post/'.\n 5. It moves 'my-image.png' into that new folder.\n 6. It updates the link in the markdown file to ![[images/My Awesome Post/my-image.png]].\n";
|
|
7
|
+
export declare const register: (mcpServer: McpServer) => void;
|
|
8
|
+
export declare const execute: (params: OrganizeAttachmentsParams) => Promise<CallToolResult>;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
annotations: {
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
readOnlyHint?: boolean | undefined;
|
|
15
|
+
destructiveHint?: boolean | undefined;
|
|
16
|
+
idempotentHint?: boolean | undefined;
|
|
17
|
+
openWorldHint?: boolean | undefined;
|
|
18
|
+
};
|
|
19
|
+
inputSchema: {
|
|
20
|
+
keyword: import("zod").ZodString;
|
|
21
|
+
destination: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
22
|
+
useTitleAsFolderName: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
23
|
+
quiet: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
24
|
+
};
|
|
25
|
+
execute: (params: OrganizeAttachmentsParams) => Promise<CallToolResult>;
|
|
26
|
+
register: (mcpServer: McpServer) => void;
|
|
27
|
+
shorthandDescription: {
|
|
28
|
+
ko: string;
|
|
29
|
+
en: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
@@ -26,32 +26,32 @@ export declare const OrganizeAttachmentsDetailSchema: z.ZodObject<{
|
|
|
26
26
|
imageName: z.ZodString;
|
|
27
27
|
reason: z.ZodString;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
reason: string;
|
|
30
29
|
imageName: string;
|
|
31
|
-
}, {
|
|
32
30
|
reason: string;
|
|
31
|
+
}, {
|
|
33
32
|
imageName: string;
|
|
33
|
+
reason: string;
|
|
34
34
|
}>, "many">>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
status: "completed" | "success" | "skipped";
|
|
37
37
|
document: string;
|
|
38
38
|
message?: string | undefined;
|
|
39
|
+
movedFiles?: number | undefined;
|
|
39
40
|
targetDirectory?: string | undefined;
|
|
40
41
|
errors?: {
|
|
41
|
-
reason: string;
|
|
42
42
|
imageName: string;
|
|
43
|
+
reason: string;
|
|
43
44
|
}[] | undefined;
|
|
44
|
-
movedFiles?: number | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
status: "completed" | "success" | "skipped";
|
|
47
47
|
document: string;
|
|
48
48
|
message?: string | undefined;
|
|
49
|
+
movedFiles?: number | undefined;
|
|
49
50
|
targetDirectory?: string | undefined;
|
|
50
51
|
errors?: {
|
|
51
|
-
reason: string;
|
|
52
52
|
imageName: string;
|
|
53
|
+
reason: string;
|
|
53
54
|
}[] | undefined;
|
|
54
|
-
movedFiles?: number | undefined;
|
|
55
55
|
}>;
|
|
56
56
|
export declare const OrganizeAttachmentsResultSchema: z.ZodObject<{
|
|
57
57
|
summary: z.ZodString;
|
|
@@ -65,32 +65,32 @@ export declare const OrganizeAttachmentsResultSchema: z.ZodObject<{
|
|
|
65
65
|
imageName: z.ZodString;
|
|
66
66
|
reason: z.ZodString;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
reason: string;
|
|
69
68
|
imageName: string;
|
|
70
|
-
}, {
|
|
71
69
|
reason: string;
|
|
70
|
+
}, {
|
|
72
71
|
imageName: string;
|
|
72
|
+
reason: string;
|
|
73
73
|
}>, "many">>;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
75
|
status: "completed" | "success" | "skipped";
|
|
76
76
|
document: string;
|
|
77
77
|
message?: string | undefined;
|
|
78
|
+
movedFiles?: number | undefined;
|
|
78
79
|
targetDirectory?: string | undefined;
|
|
79
80
|
errors?: {
|
|
80
|
-
reason: string;
|
|
81
81
|
imageName: string;
|
|
82
|
+
reason: string;
|
|
82
83
|
}[] | undefined;
|
|
83
|
-
movedFiles?: number | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
status: "completed" | "success" | "skipped";
|
|
86
86
|
document: string;
|
|
87
87
|
message?: string | undefined;
|
|
88
|
+
movedFiles?: number | undefined;
|
|
88
89
|
targetDirectory?: string | undefined;
|
|
89
90
|
errors?: {
|
|
90
|
-
reason: string;
|
|
91
91
|
imageName: string;
|
|
92
|
+
reason: string;
|
|
92
93
|
}[] | undefined;
|
|
93
|
-
movedFiles?: number | undefined;
|
|
94
94
|
}>, "many">;
|
|
95
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
96
|
summary: string;
|
|
@@ -98,12 +98,12 @@ export declare const OrganizeAttachmentsResultSchema: z.ZodObject<{
|
|
|
98
98
|
status: "completed" | "success" | "skipped";
|
|
99
99
|
document: string;
|
|
100
100
|
message?: string | undefined;
|
|
101
|
+
movedFiles?: number | undefined;
|
|
101
102
|
targetDirectory?: string | undefined;
|
|
102
103
|
errors?: {
|
|
103
|
-
reason: string;
|
|
104
104
|
imageName: string;
|
|
105
|
+
reason: string;
|
|
105
106
|
}[] | undefined;
|
|
106
|
-
movedFiles?: number | undefined;
|
|
107
107
|
}[];
|
|
108
108
|
}, {
|
|
109
109
|
summary: string;
|
|
@@ -111,12 +111,12 @@ export declare const OrganizeAttachmentsResultSchema: z.ZodObject<{
|
|
|
111
111
|
status: "completed" | "success" | "skipped";
|
|
112
112
|
document: string;
|
|
113
113
|
message?: string | undefined;
|
|
114
|
+
movedFiles?: number | undefined;
|
|
114
115
|
targetDirectory?: string | undefined;
|
|
115
116
|
errors?: {
|
|
116
|
-
reason: string;
|
|
117
117
|
imageName: string;
|
|
118
|
+
reason: string;
|
|
118
119
|
}[] | undefined;
|
|
119
|
-
movedFiles?: number | undefined;
|
|
120
120
|
}[];
|
|
121
121
|
}>;
|
|
122
122
|
export type OrganizeAttachmentsResult = z.infer<typeof OrganizeAttachmentsResultSchema>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const organizeAttachmentsParamsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
keyword: z
|
|
5
|
+
.string()
|
|
6
|
+
.describe("A keyword to search for the markdown file within the vault."),
|
|
7
|
+
destination: z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.default("images")
|
|
11
|
+
.describe('The base folder to move attachments into. Defaults to "images".'),
|
|
12
|
+
useTitleAsFolderName: z
|
|
13
|
+
.boolean()
|
|
14
|
+
.optional()
|
|
15
|
+
.default(true)
|
|
16
|
+
.describe("If true, creates a subfolder named after the document title. Defaults to true."),
|
|
17
|
+
quiet: z
|
|
18
|
+
.boolean()
|
|
19
|
+
.optional()
|
|
20
|
+
.default(false)
|
|
21
|
+
.describe("If true, returns a minimal success message."),
|
|
22
|
+
})
|
|
23
|
+
.describe("Parameters for organizing attachments of a markdown file");
|
|
24
|
+
export const OrganizeAttachmentsDetailSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
document: z
|
|
27
|
+
.string()
|
|
28
|
+
.describe("The path of the processed markdown document."),
|
|
29
|
+
status: z
|
|
30
|
+
.enum(["skipped", "completed", "success"])
|
|
31
|
+
.describe("The status of the operation."),
|
|
32
|
+
message: z
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("A message providing additional information, especially if skipped."),
|
|
36
|
+
movedFiles: z
|
|
37
|
+
.number()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('The number of files successfully moved. Present if status is "completed".'),
|
|
40
|
+
targetDirectory: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('The directory where attachments were moved. Present if status is "completed".'),
|
|
44
|
+
errors: z
|
|
45
|
+
.array(z.object({
|
|
46
|
+
imageName: z
|
|
47
|
+
.string()
|
|
48
|
+
.describe("The name of the image that failed to move."),
|
|
49
|
+
reason: z.string().describe("The reason for the failure."),
|
|
50
|
+
}))
|
|
51
|
+
.optional()
|
|
52
|
+
.describe("List of errors encountered during the move operation. Present if any errors occurred."),
|
|
53
|
+
})
|
|
54
|
+
.describe("Result of organizing attachments for a single document");
|
|
55
|
+
export const OrganizeAttachmentsResultSchema = z.object({
|
|
56
|
+
summary: z.string().describe("A summary message of the overall operation."),
|
|
57
|
+
details: z
|
|
58
|
+
.array(OrganizeAttachmentsDetailSchema)
|
|
59
|
+
.describe("Array of results for each processed document."),
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/tools/organize_attachments/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC9C,MAAM,CAAC;IACP,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,6DAA6D,CAAC;IACzE,WAAW,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,QAAQ,CAAC;SACjB,QAAQ,CACR,iEAAiE,CACjE;IACF,oBAAoB,EAAE,CAAC;SACrB,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACR,gFAAgF,CAChF;IACF,KAAK,EAAE,CAAC;SACN,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,6CAA6C,CAAC;CACzD,CAAC;KACD,QAAQ,CAAC,0DAA0D,CAAC,CAAC;AAMvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC9C,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CAAC,8CAA8C,CAAC;IAC1D,MAAM,EAAE,CAAC;SACP,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SACzC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,oEAAoE,CACpE;IACF,UAAU,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,2EAA2E,CAC3E;IACF,eAAe,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,+EAA+E,CAC/E;IACF,MAAM,EAAE,CAAC;SACP,KAAK,CACL,CAAC,CAAC,MAAM,CAAC;QACR,SAAS,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,CAAC,4CAA4C,CAAC;QACxD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;KAC1D,CAAC,CACF;SACA,QAAQ,EAAE;SACV,QAAQ,CACR,uFAAuF,CACvF;CACF,CAAC;KACD,QAAQ,CAAC,wDAAwD,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC3E,OAAO,EAAE,CAAC;SACR,KAAK,CAAC,+BAA+B,CAAC;SACtC,QAAQ,CAAC,+CAA+C,CAAC;CAC3D,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DocumentIndex } from "../../utils/processor/types.js";
|
|
2
|
+
type MoveError = {
|
|
3
|
+
status: "error";
|
|
4
|
+
imageName: string;
|
|
5
|
+
reason: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function genreateOrganizationTasks(documents: DocumentIndex[], vaultDirPath: string): (() => Promise<{
|
|
8
|
+
document: string;
|
|
9
|
+
status: string;
|
|
10
|
+
message: string;
|
|
11
|
+
movedFiles: never[];
|
|
12
|
+
targetDirectory?: undefined;
|
|
13
|
+
errors?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
document: string;
|
|
16
|
+
status: string;
|
|
17
|
+
targetDirectory: string;
|
|
18
|
+
movedFiles: number;
|
|
19
|
+
errors: MoveError[];
|
|
20
|
+
message?: undefined;
|
|
21
|
+
}>)[];
|
|
22
|
+
export {};
|