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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-knowledge-mcp",
3
- "version": "1.2.0",
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.2.0",
33
- "@codemcp/knowledge-core": "1.2.0",
34
- "@codemcp/knowledge-content-loader": "1.2.0"
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Command-line interface for agentic knowledge web content management",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-content-loader",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Web content loading and metadata management for agentic knowledge system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Path calculation utilities
3
3
  */
4
- import { resolve, dirname, isAbsolute, join, normalize, relative, } from "node:path";
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, return relative path from project root
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
- if (isAbsolute(firstPath)) {
38
- // If absolute path, return as-is
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 (grep, rg, ripgrep) to search for {{keywords}} in {{local_path}}. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.";
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 (grep, rg, ripgrep) to search for {{keywords}} in {{local_path}}. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.`;
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
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-core",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Core functionality for agentic knowledge guidance system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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 (grep, rg, ripgrep, find).`;
156
+ Use the path and search terms with your available text search tools.`;
157
157
  return {
158
158
  tools: [
159
159
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "MCP server implementation for agentic knowledge guidance system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",