agentic-knowledge-mcp 0.1.10 → 0.1.12

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": "0.1.10",
3
+ "version": "0.1.12",
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
  "chalk": "^5.3.0",
31
31
  "ora": "^8.0.1",
32
- "@codemcp/knowledge-core": "0.1.10",
33
- "@codemcp/knowledge-content-loader": "0.1.10",
34
- "@codemcp/knowledge-mcp-server": "0.1.10"
32
+ "@codemcp/knowledge-mcp-server": "0.1.12",
33
+ "@codemcp/knowledge-content-loader": "0.1.12",
34
+ "@codemcp/knowledge-core": "0.1.12"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@modelcontextprotocol/inspector": "0.16.8",
@@ -19,7 +19,23 @@ export const createCommand = new Command("create")
19
19
  try {
20
20
  console.log(chalk.blue("🚀 Creating new docset..."));
21
21
  const configManager = new ConfigManager();
22
- const { config, configPath } = await configManager.loadConfig(process.cwd());
22
+ // Check if config exists, create if not
23
+ let config, configPath;
24
+ const configExists = await configManager.configExists(process.cwd());
25
+ if (!configExists) {
26
+ // Create initial config structure
27
+ configPath = path.join(process.cwd(), ".knowledge", "config.yaml");
28
+ config = {
29
+ version: "1.0",
30
+ docsets: [],
31
+ };
32
+ // Ensure .knowledge directory exists
33
+ await fs.mkdir(path.dirname(configPath), { recursive: true });
34
+ console.log(chalk.gray("📁 Created .knowledge directory"));
35
+ }
36
+ else {
37
+ ({ config, configPath } = await configManager.loadConfig(process.cwd()));
38
+ }
23
39
  // Check if docset ID already exists
24
40
  if (config.docsets.find((d) => d.id === options.id)) {
25
41
  throw new Error(`Docset with ID '${options.id}' already exists`);
@@ -37,6 +53,18 @@ export const createCommand = new Command("create")
37
53
  // Add to config
38
54
  config.docsets.push(newDocset);
39
55
  await configManager.saveConfig(config, configPath);
56
+ // For local folders, create symlinks immediately
57
+ if (options.preset === "local-folder") {
58
+ console.log(chalk.gray("🔗 Creating symlinks for local folder..."));
59
+ const { calculateLocalPathWithSymlinks } = await import("@codemcp/knowledge-core");
60
+ try {
61
+ await calculateLocalPathWithSymlinks(newDocset, configPath);
62
+ console.log(chalk.gray(" ✅ Symlinks created successfully"));
63
+ }
64
+ catch (error) {
65
+ console.log(chalk.yellow(` ⚠️ Warning: Could not create symlinks: ${error.message}`));
66
+ }
67
+ }
40
68
  console.log(chalk.green(`✅ Created docset '${options.id}' successfully`));
41
69
  console.log(chalk.gray(` Config saved to: ${configPath}`));
42
70
  }
@@ -11,12 +11,7 @@ const __filename = fileURLToPath(import.meta.url);
11
11
  const __dirname = dirname(__filename);
12
12
  async function main() {
13
13
  const args = process.argv.slice(2);
14
- // Debug output to stderr so it doesn't interfere with CLI output
15
- console.error(`[DEBUG] process.argv: ${JSON.stringify(process.argv)}`);
16
- console.error(`[DEBUG] args: ${JSON.stringify(args)}`);
17
- console.error(`[DEBUG] args.length: ${args.length}`);
18
14
  if (args.length === 0) {
19
- console.error("[DEBUG] No args - starting MCP server");
20
15
  // No arguments, start MCP server
21
16
  const isLocal = existsSync(join(__dirname, "../../mcp-server/dist/index.js"));
22
17
  if (isLocal) {
@@ -31,7 +26,6 @@ async function main() {
31
26
  }
32
27
  }
33
28
  else {
34
- console.error("[DEBUG] Has args - starting CLI");
35
29
  // Any arguments, run CLI
36
30
  const { runCli } = await import("./cli.js");
37
31
  runCli();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-cli",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Command-line interface for agentic knowledge web content management",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -32,9 +32,9 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@codemcp/knowledge-core": "^0.1.10",
36
- "@codemcp/knowledge-content-loader": "^0.1.10",
37
- "@codemcp/knowledge-mcp-server": "^0.1.10",
35
+ "@codemcp/knowledge-core": "^0.1.12",
36
+ "@codemcp/knowledge-content-loader": "^0.1.12",
37
+ "@codemcp/knowledge-mcp-server": "^0.1.12",
38
38
  "commander": "^12.0.0",
39
39
  "chalk": "^5.3.0",
40
40
  "ora": "^8.0.1"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-content-loader",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Web content loading and metadata management for agentic knowledge system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,5 +8,5 @@ export * from "./types.js";
8
8
  export { findConfigPath, findConfigPathSync } from "./config/discovery.js";
9
9
  export { loadConfig, loadConfigSync, validateConfig } from "./config/loader.js";
10
10
  export { ConfigManager } from "./config/manager.js";
11
- export { calculateLocalPath, formatPath, validatePath, validatePathSync, getRelativePath, ensureKnowledgeGitignore, ensureKnowledgeGitignoreSync, } from "./paths/calculator.js";
11
+ export { calculateLocalPath, calculateLocalPathWithSymlinks, formatPath, validatePath, validatePathSync, getRelativePath, ensureKnowledgeGitignore, ensureKnowledgeGitignoreSync, } from "./paths/calculator.js";
12
12
  export { processTemplate, getEffectiveTemplate, validateTemplate, extractVariables, createTemplateContext, } from "./templates/processor.js";
@@ -11,6 +11,6 @@ export { findConfigPath, findConfigPathSync } from "./config/discovery.js";
11
11
  export { loadConfig, loadConfigSync, validateConfig } from "./config/loader.js";
12
12
  export { ConfigManager } from "./config/manager.js";
13
13
  // Export path calculation utilities
14
- export { calculateLocalPath, formatPath, validatePath, validatePathSync, getRelativePath, ensureKnowledgeGitignore, ensureKnowledgeGitignoreSync, } from "./paths/calculator.js";
14
+ export { calculateLocalPath, calculateLocalPathWithSymlinks, formatPath, validatePath, validatePathSync, getRelativePath, ensureKnowledgeGitignore, ensureKnowledgeGitignoreSync, } from "./paths/calculator.js";
15
15
  // Export template processing
16
16
  export { processTemplate, getEffectiveTemplate, validateTemplate, extractVariables, createTemplateContext, } from "./templates/processor.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-core",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Core functionality for agentic knowledge guidance system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/knowledge-mcp-server",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "MCP server implementation for agentic knowledge guidance system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "typecheck": "tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "@codemcp/knowledge-core": "^0.1.10",
33
+ "@codemcp/knowledge-core": "^0.1.12",
34
34
  "@modelcontextprotocol/sdk": "^1.19.1"
35
35
  },
36
36
  "devDependencies": {