agentic-knowledge-mcp 1.2.0 → 1.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-knowledge-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A Model Context Protocol server for agentic knowledge guidance with web-based documentation loading and intelligent search instructions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "packages/cli/dist/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"commander": "^12.0.0",
|
|
30
30
|
"js-yaml": "4.1.0",
|
|
31
31
|
"ora": "^8.0.1",
|
|
32
|
-
"@codemcp/knowledge": "1.2.
|
|
33
|
-
"@codemcp/knowledge-
|
|
34
|
-
"@codemcp/knowledge-
|
|
32
|
+
"@codemcp/knowledge": "1.2.1",
|
|
33
|
+
"@codemcp/knowledge-content-loader": "1.2.1",
|
|
34
|
+
"@codemcp/knowledge-core": "1.2.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@eslint/js": "^9.34.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Path calculation utilities
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { dirname, join, normalize, relative } from "node:path";
|
|
5
5
|
import { promises as fs } from "node:fs";
|
|
6
6
|
import * as fsSync from "node:fs";
|
|
7
7
|
import * as pathModule from "node:path";
|
|
@@ -26,21 +26,19 @@ export function calculateLocalPath(docset, configPath) {
|
|
|
26
26
|
throw new Error(`Docset '${docset.id}' has no sources configured`);
|
|
27
27
|
}
|
|
28
28
|
if (primarySource.type === "local_folder") {
|
|
29
|
-
// For local folders,
|
|
29
|
+
// For local folders, use standardized path: .knowledge/docsets/{id}
|
|
30
|
+
// This ensures consistency with git_repo and archive types,
|
|
31
|
+
// and prevents accidentally modifying source directories during init
|
|
30
32
|
if (!primarySource.paths || primarySource.paths.length === 0) {
|
|
31
33
|
throw new Error(`Local folder source for docset '${docset.id}' has no paths configured`);
|
|
32
34
|
}
|
|
35
|
+
// Validate that at least one path is configured
|
|
33
36
|
const firstPath = primarySource.paths[0];
|
|
34
37
|
if (!firstPath) {
|
|
35
38
|
throw new Error(`Local folder source for docset '${docset.id}' has empty path`);
|
|
36
39
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return normalize(firstPath);
|
|
40
|
-
}
|
|
41
|
-
// If relative path, resolve from project root and return relative
|
|
42
|
-
const resolvedPath = resolve(projectRoot, firstPath);
|
|
43
|
-
return relative(projectRoot, resolvedPath) || ".";
|
|
40
|
+
// Return the standard docset directory, symlinks will be created there
|
|
41
|
+
return join(configDir, "docsets", docset.id);
|
|
44
42
|
}
|
|
45
43
|
if (primarySource.type === "git_repo") {
|
|
46
44
|
// For git repos, use standardized path: .knowledge/docsets/{id}
|