agentic-knowledge-mcp 1.2.0 → 1.3.0
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 +4 -4
- package/packages/cli/package.json +1 -1
- package/packages/content-loader/package.json +1 -1
- package/packages/core/dist/paths/calculator.js +7 -9
- package/packages/core/dist/types.d.ts +1 -1
- package/packages/core/dist/types.js +1 -1
- package/packages/core/package.json +1 -1
- package/packages/mcp-server/dist/server.js +1 -1
- package/packages/mcp-server/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-knowledge-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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.
|
|
33
|
-
"@codemcp/knowledge-core": "1.
|
|
34
|
-
"@codemcp/knowledge-content-loader": "1.
|
|
32
|
+
"@codemcp/knowledge": "1.3.0",
|
|
33
|
+
"@codemcp/knowledge-core": "1.3.0",
|
|
34
|
+
"@codemcp/knowledge-content-loader": "1.3.0"
|
|
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}
|
|
@@ -142,7 +142,7 @@ export declare class KnowledgeError extends Error {
|
|
|
142
142
|
/**
|
|
143
143
|
* Default instruction template
|
|
144
144
|
*/
|
|
145
|
-
export declare const DEFAULT_TEMPLATE = "Use text search tools
|
|
145
|
+
export declare const DEFAULT_TEMPLATE = "Use available text search tools to search for {{keywords}} in {{local_path}}. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.";
|
|
146
146
|
/**
|
|
147
147
|
* Allowed template variables that can be used in instruction templates
|
|
148
148
|
*/
|
|
@@ -31,7 +31,7 @@ export class KnowledgeError extends Error {
|
|
|
31
31
|
/**
|
|
32
32
|
* Default instruction template
|
|
33
33
|
*/
|
|
34
|
-
export const DEFAULT_TEMPLATE = `Use text search tools
|
|
34
|
+
export const DEFAULT_TEMPLATE = `Use available text search tools to search for {{keywords}} in {{local_path}}. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.`;
|
|
35
35
|
/**
|
|
36
36
|
* Allowed template variables that can be used in instruction templates
|
|
37
37
|
*/
|
|
@@ -153,7 +153,7 @@ Returns JSON object with:
|
|
|
153
153
|
- generalized_search_terms: Broader terms for context
|
|
154
154
|
- path: Local directory path to search in
|
|
155
155
|
|
|
156
|
-
Use the path and search terms with your text search tools
|
|
156
|
+
Use the path and search terms with your available text search tools.`;
|
|
157
157
|
return {
|
|
158
158
|
tools: [
|
|
159
159
|
{
|