mcp-docs-service 0.3.4 → 0.3.6
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/dist/cli/bin.d.ts +8 -0
- package/dist/cli/bin.js +133 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/handlers/docs.d.ts +26 -0
- package/dist/handlers/docs.js +513 -0
- package/dist/handlers/docs.js.map +1 -0
- package/dist/handlers/file.d.ts +32 -0
- package/dist/handlers/file.js +222 -0
- package/dist/handlers/file.js.map +1 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/tools.d.ts +164 -0
- package/dist/schemas/tools.js +53 -0
- package/dist/schemas/tools.js.map +1 -0
- package/dist/types/docs.d.ts +74 -0
- package/dist/types/docs.js +2 -0
- package/dist/types/docs.js.map +1 -0
- package/dist/types/file.d.ts +21 -0
- package/dist/types/file.js +2 -0
- package/dist/types/file.js.map +1 -0
- package/dist/types/index.d.ts +44 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/tools.d.ts +11 -0
- package/dist/types/tools.js +2 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/utils/file.d.ts +24 -0
- package/dist/utils/file.js +94 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/path.d.ts +16 -0
- package/dist/utils/path.js +70 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +3 -2
@@ -0,0 +1,44 @@
|
|
1
|
+
export interface DocumentMetadata {
|
2
|
+
title?: string;
|
3
|
+
order?: number;
|
4
|
+
description?: string;
|
5
|
+
author?: string;
|
6
|
+
date?: Date;
|
7
|
+
tags?: string[];
|
8
|
+
status?: string;
|
9
|
+
[key: string]: any;
|
10
|
+
}
|
11
|
+
export interface DocumentEntry {
|
12
|
+
path: string;
|
13
|
+
name: string;
|
14
|
+
metadata: DocumentMetadata;
|
15
|
+
}
|
16
|
+
export interface TreeEntry {
|
17
|
+
name: string;
|
18
|
+
path: string;
|
19
|
+
type: string;
|
20
|
+
metadata?: DocumentMetadata;
|
21
|
+
children: TreeEntry[];
|
22
|
+
error?: string;
|
23
|
+
}
|
24
|
+
export interface NavigationItem {
|
25
|
+
title: string;
|
26
|
+
path: string | null;
|
27
|
+
order: number;
|
28
|
+
}
|
29
|
+
export interface NavigationSection {
|
30
|
+
title: string;
|
31
|
+
path: string | null;
|
32
|
+
items: NavigationItem[];
|
33
|
+
order: number;
|
34
|
+
}
|
35
|
+
export type ToolResponse = {
|
36
|
+
content: Array<{
|
37
|
+
type: string;
|
38
|
+
text: string;
|
39
|
+
}>;
|
40
|
+
metadata?: Record<string, any>;
|
41
|
+
isError?: boolean;
|
42
|
+
};
|
43
|
+
export * from "./docs.js";
|
44
|
+
export * from "./tools.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAiDA,+CAA+C;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { FileInfo } from "../types/file.js";
|
2
|
+
/**
|
3
|
+
* Gets file statistics and information
|
4
|
+
*/
|
5
|
+
export declare function getFileStats(filePath: string): Promise<FileInfo>;
|
6
|
+
/**
|
7
|
+
* Searches for files matching a pattern
|
8
|
+
*/
|
9
|
+
export declare function searchFiles(rootPath: string, pattern: string, excludePatterns?: string[]): Promise<string[]>;
|
10
|
+
/**
|
11
|
+
* Normalizes line endings to LF
|
12
|
+
*/
|
13
|
+
export declare function normalizeLineEndings(text: string): string;
|
14
|
+
/**
|
15
|
+
* Creates a unified diff between two text contents
|
16
|
+
*/
|
17
|
+
export declare function createUnifiedDiff(originalContent: string, newContent: string, filepath?: string): string;
|
18
|
+
/**
|
19
|
+
* Applies edits to a file
|
20
|
+
*/
|
21
|
+
export declare function applyFileEdits(filePath: string, edits: Array<{
|
22
|
+
oldText: string;
|
23
|
+
newText: string;
|
24
|
+
}>, dryRun?: boolean): Promise<string>;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import fs from "fs/promises";
|
2
|
+
import path from "path";
|
3
|
+
import { createTwoFilesPatch } from "diff";
|
4
|
+
import { minimatch } from "minimatch";
|
5
|
+
/**
|
6
|
+
* Gets file statistics and information
|
7
|
+
*/
|
8
|
+
export async function getFileStats(filePath) {
|
9
|
+
const stats = await fs.stat(filePath);
|
10
|
+
// Convert file mode to permission string (e.g., "rwxr-xr-x")
|
11
|
+
const mode = stats.mode;
|
12
|
+
const permissions = [
|
13
|
+
stats.mode & 0o400 ? "r" : "-",
|
14
|
+
stats.mode & 0o200 ? "w" : "-",
|
15
|
+
stats.mode & 0o100 ? "x" : "-",
|
16
|
+
stats.mode & 0o040 ? "r" : "-",
|
17
|
+
stats.mode & 0o020 ? "w" : "-",
|
18
|
+
stats.mode & 0o010 ? "x" : "-",
|
19
|
+
stats.mode & 0o004 ? "r" : "-",
|
20
|
+
stats.mode & 0o002 ? "w" : "-",
|
21
|
+
stats.mode & 0o001 ? "x" : "-",
|
22
|
+
].join("");
|
23
|
+
return {
|
24
|
+
size: stats.size,
|
25
|
+
created: stats.birthtime,
|
26
|
+
modified: stats.mtime,
|
27
|
+
accessed: stats.atime,
|
28
|
+
isDirectory: stats.isDirectory(),
|
29
|
+
isFile: stats.isFile(),
|
30
|
+
permissions,
|
31
|
+
};
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Searches for files matching a pattern
|
35
|
+
*/
|
36
|
+
export async function searchFiles(rootPath, pattern, excludePatterns = []) {
|
37
|
+
const results = [];
|
38
|
+
async function search(currentPath) {
|
39
|
+
const entries = await fs.readdir(currentPath, { withFileTypes: true });
|
40
|
+
for (const entry of entries) {
|
41
|
+
const entryPath = path.join(currentPath, entry.name);
|
42
|
+
const relativePath = path.relative(rootPath, entryPath);
|
43
|
+
// Check if path should be excluded
|
44
|
+
if (excludePatterns.some((excludePattern) => minimatch(relativePath, excludePattern))) {
|
45
|
+
continue;
|
46
|
+
}
|
47
|
+
if (entry.isDirectory()) {
|
48
|
+
await search(entryPath);
|
49
|
+
}
|
50
|
+
else if (minimatch(relativePath, pattern)) {
|
51
|
+
results.push(entryPath);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
await search(rootPath);
|
56
|
+
return results;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Normalizes line endings to LF
|
60
|
+
*/
|
61
|
+
export function normalizeLineEndings(text) {
|
62
|
+
return text.replace(/\r\n/g, "\n");
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* Creates a unified diff between two text contents
|
66
|
+
*/
|
67
|
+
export function createUnifiedDiff(originalContent, newContent, filepath = "file") {
|
68
|
+
return createTwoFilesPatch(filepath, filepath, normalizeLineEndings(originalContent), normalizeLineEndings(newContent), "", "", { context: 3 });
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Applies edits to a file
|
72
|
+
*/
|
73
|
+
export async function applyFileEdits(filePath, edits, dryRun = false) {
|
74
|
+
let content = await fs.readFile(filePath, "utf-8");
|
75
|
+
content = normalizeLineEndings(content);
|
76
|
+
// Apply all edits
|
77
|
+
for (const edit of edits) {
|
78
|
+
const { oldText, newText } = edit;
|
79
|
+
const normalizedOldText = normalizeLineEndings(oldText);
|
80
|
+
if (!content.includes(normalizedOldText)) {
|
81
|
+
throw new Error(`Edit failed: Could not find text to replace in ${filePath}`);
|
82
|
+
}
|
83
|
+
content = content.replace(normalizedOldText, normalizeLineEndings(newText));
|
84
|
+
}
|
85
|
+
// Create a diff to show changes
|
86
|
+
const originalContent = await fs.readFile(filePath, "utf-8");
|
87
|
+
const diff = createUnifiedDiff(originalContent, content, filePath);
|
88
|
+
// Write the changes if not a dry run
|
89
|
+
if (!dryRun) {
|
90
|
+
await fs.writeFile(filePath, content);
|
91
|
+
}
|
92
|
+
return diff;
|
93
|
+
}
|
94
|
+
//# sourceMappingURL=file.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEtC,6DAA6D;IAC7D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,WAAW,GAAG;QAClB,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC9B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC9B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC9B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC9B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC9B,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,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AE,CAAC;YACzC,MAAM,IAAI,KAAK,CACb,kDAAkD,QAAQ,EAAE,CAC7D,CAAC;QACJ,CAAC;QAED,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,gCAAgC;IAChC,MAAM,eAAe,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,iBAAiB,CAAC,eAAe,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEnE,qCAAqC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./path.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,cAAc,WAAW,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Normalizes a path consistently
|
3
|
+
*/
|
4
|
+
export declare function normalizePath(p: string): string;
|
5
|
+
/**
|
6
|
+
* Expands the home directory in a path (e.g., ~/docs -> /home/user/docs)
|
7
|
+
*/
|
8
|
+
export declare function expandHome(p: string): string;
|
9
|
+
/**
|
10
|
+
* Validates that a path is within allowed directories
|
11
|
+
* @param p The path to validate
|
12
|
+
* @param allowedDirectories Array of allowed directory paths
|
13
|
+
* @returns The normalized path if valid
|
14
|
+
* @throws Error if path is not within allowed directories
|
15
|
+
*/
|
16
|
+
export declare function validatePath(p: string, allowedDirectories: string[]): Promise<string>;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import path from "path";
|
2
|
+
import os from "os";
|
3
|
+
import fs from "fs/promises";
|
4
|
+
/**
|
5
|
+
* Normalizes a path consistently
|
6
|
+
*/
|
7
|
+
export function normalizePath(p) {
|
8
|
+
return path.normalize(p);
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* Expands the home directory in a path (e.g., ~/docs -> /home/user/docs)
|
12
|
+
*/
|
13
|
+
export function expandHome(p) {
|
14
|
+
if (!p)
|
15
|
+
return p;
|
16
|
+
if (p === "~" || p.startsWith("~/")) {
|
17
|
+
return p.replace(/^~/, os.homedir());
|
18
|
+
}
|
19
|
+
return p;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Validates that a path is within allowed directories
|
23
|
+
* @param p The path to validate
|
24
|
+
* @param allowedDirectories Array of allowed directory paths
|
25
|
+
* @returns The normalized path if valid
|
26
|
+
* @throws Error if path is not within allowed directories
|
27
|
+
*/
|
28
|
+
export async function validatePath(p, allowedDirectories) {
|
29
|
+
// Handle empty path by using the first allowed directory
|
30
|
+
if (!p) {
|
31
|
+
return allowedDirectories[0];
|
32
|
+
}
|
33
|
+
// Resolve the path
|
34
|
+
const normalizedPath = normalizePath(path.resolve(expandHome(p)));
|
35
|
+
// Check if the path is exactly an allowed directory
|
36
|
+
if (allowedDirectories.some((dir) => dir === normalizedPath)) {
|
37
|
+
return normalizedPath;
|
38
|
+
}
|
39
|
+
// Check if the path is within any of the allowed directories
|
40
|
+
const isAllowed = allowedDirectories.some((dir) => {
|
41
|
+
const relativePath = path.relative(dir, normalizedPath);
|
42
|
+
return (relativePath !== "" &&
|
43
|
+
!relativePath.startsWith("..") &&
|
44
|
+
!path.isAbsolute(relativePath));
|
45
|
+
});
|
46
|
+
if (!isAllowed) {
|
47
|
+
// Try to resolve the path relative to the allowed directories
|
48
|
+
for (const dir of allowedDirectories) {
|
49
|
+
const resolvedPath = path.resolve(dir, p);
|
50
|
+
try {
|
51
|
+
// Check if the path exists
|
52
|
+
await fs.access(resolvedPath);
|
53
|
+
// If it exists, check if it's within an allowed directory
|
54
|
+
const relativePath = path.relative(dir, resolvedPath);
|
55
|
+
if (relativePath !== "" &&
|
56
|
+
!relativePath.startsWith("..") &&
|
57
|
+
!path.isAbsolute(relativePath)) {
|
58
|
+
return resolvedPath;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
catch (error) {
|
62
|
+
// Path doesn't exist, continue to the next directory
|
63
|
+
}
|
64
|
+
}
|
65
|
+
// If we get here, the path is not allowed
|
66
|
+
throw new Error(`Access denied: ${p} is not within allowed directories. Allowed directories: ${allowedDirectories.join(", ")}`);
|
67
|
+
}
|
68
|
+
return normalizedPath;
|
69
|
+
}
|
70
|
+
//# sourceMappingURL=path.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,CAAS;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,CAAS,EACT,kBAA4B;IAE5B,yDAAyD;IACzD,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,mBAAmB;IACnB,MAAM,cAAc,GAAG,aAA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K,CACb,kBAAkB,CAAC,4DAA4D,kBAAkB,CAAC,IAAI,CACpG,IAAI,CACL,EAAE,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mcp-docs-service",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.6",
|
4
4
|
"description": "MCP Documentation Service - A Model Context Protocol implementation for documentation management",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/index.js",
|
@@ -19,7 +19,8 @@
|
|
19
19
|
"lint": "eslint src --ext .ts",
|
20
20
|
"test": "vitest run",
|
21
21
|
"test:watch": "vitest",
|
22
|
-
"prepublishOnly": "npm run build"
|
22
|
+
"prepublishOnly": "npm run build",
|
23
|
+
"prepare-publish": "node scripts/prepare-publish.js"
|
23
24
|
},
|
24
25
|
"keywords": [
|
25
26
|
"mcp",
|