@venizia/ignis-docs 0.0.1-4 → 0.0.1-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.
Files changed (107) hide show
  1. package/mcp-server/dist/common/config.d.ts +58 -21
  2. package/mcp-server/dist/common/config.d.ts.map +1 -1
  3. package/mcp-server/dist/common/config.js +67 -12
  4. package/mcp-server/dist/common/config.js.map +1 -1
  5. package/mcp-server/dist/helpers/docs.helper.d.ts +5 -5
  6. package/mcp-server/dist/helpers/docs.helper.d.ts.map +1 -1
  7. package/mcp-server/dist/helpers/docs.helper.js +31 -27
  8. package/mcp-server/dist/helpers/docs.helper.js.map +1 -1
  9. package/mcp-server/dist/helpers/github.helper.d.ts +37 -0
  10. package/mcp-server/dist/helpers/github.helper.d.ts.map +1 -0
  11. package/mcp-server/dist/helpers/github.helper.js +100 -0
  12. package/mcp-server/dist/helpers/github.helper.js.map +1 -0
  13. package/mcp-server/dist/helpers/index.d.ts +1 -0
  14. package/mcp-server/dist/helpers/index.d.ts.map +1 -1
  15. package/mcp-server/dist/helpers/index.js +1 -0
  16. package/mcp-server/dist/helpers/index.js.map +1 -1
  17. package/mcp-server/dist/index.js +60 -32
  18. package/mcp-server/dist/index.js.map +1 -1
  19. package/mcp-server/dist/tools/base.tool.d.ts +6 -10
  20. package/mcp-server/dist/tools/base.tool.d.ts.map +1 -1
  21. package/mcp-server/dist/tools/base.tool.js +3 -5
  22. package/mcp-server/dist/tools/base.tool.js.map +1 -1
  23. package/mcp-server/dist/tools/{get-doc-content.tool.d.ts → docs/get-document-content.tool.d.ts} +4 -4
  24. package/mcp-server/dist/tools/docs/get-document-content.tool.d.ts.map +1 -0
  25. package/mcp-server/dist/tools/{get-doc-content.tool.js → docs/get-document-content.tool.js} +12 -11
  26. package/mcp-server/dist/tools/docs/get-document-content.tool.js.map +1 -0
  27. package/mcp-server/dist/tools/{get-doc-metadata.tool.d.ts → docs/get-document-metadata.tool.d.ts} +4 -4
  28. package/mcp-server/dist/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
  29. package/mcp-server/dist/tools/{get-doc-metadata.tool.js → docs/get-document-metadata.tool.js} +11 -10
  30. package/mcp-server/dist/tools/docs/get-document-metadata.tool.js.map +1 -0
  31. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts +50 -0
  32. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts.map +1 -0
  33. package/mcp-server/dist/tools/docs/get-package-overview.tool.js +221 -0
  34. package/mcp-server/dist/tools/docs/get-package-overview.tool.js.map +1 -0
  35. package/mcp-server/dist/tools/docs/index.d.ts +7 -0
  36. package/mcp-server/dist/tools/docs/index.d.ts.map +1 -0
  37. package/mcp-server/dist/tools/docs/index.js +23 -0
  38. package/mcp-server/dist/tools/docs/index.js.map +1 -0
  39. package/mcp-server/dist/tools/{list-categories.tool.d.ts → docs/list-categories.tool.d.ts} +2 -2
  40. package/mcp-server/dist/tools/docs/list-categories.tool.d.ts.map +1 -0
  41. package/mcp-server/dist/tools/{list-categories.tool.js → docs/list-categories.tool.js} +7 -6
  42. package/mcp-server/dist/tools/docs/list-categories.tool.js.map +1 -0
  43. package/mcp-server/dist/tools/{list-docs.tool.d.ts → docs/list-documents.tool.d.ts} +4 -4
  44. package/mcp-server/dist/tools/docs/list-documents.tool.d.ts.map +1 -0
  45. package/mcp-server/dist/tools/{list-docs.tool.js → docs/list-documents.tool.js} +10 -9
  46. package/mcp-server/dist/tools/docs/list-documents.tool.js.map +1 -0
  47. package/mcp-server/dist/tools/{search-docs.tool.d.ts → docs/search-documents.tool.d.ts} +4 -4
  48. package/mcp-server/dist/tools/docs/search-documents.tool.d.ts.map +1 -0
  49. package/mcp-server/dist/tools/{search-docs.tool.js → docs/search-documents.tool.js} +19 -18
  50. package/mcp-server/dist/tools/docs/search-documents.tool.js.map +1 -0
  51. package/mcp-server/dist/tools/github/index.d.ts +5 -0
  52. package/mcp-server/dist/tools/github/index.d.ts.map +1 -0
  53. package/mcp-server/dist/tools/github/index.js +21 -0
  54. package/mcp-server/dist/tools/github/index.js.map +1 -0
  55. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts +28 -0
  56. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts.map +1 -0
  57. package/mcp-server/dist/tools/github/list-project-files.tool.js +98 -0
  58. package/mcp-server/dist/tools/github/list-project-files.tool.js.map +1 -0
  59. package/mcp-server/dist/tools/github/search-code.tool.d.ts +42 -0
  60. package/mcp-server/dist/tools/github/search-code.tool.d.ts.map +1 -0
  61. package/mcp-server/dist/tools/github/search-code.tool.js +194 -0
  62. package/mcp-server/dist/tools/github/search-code.tool.js.map +1 -0
  63. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts +55 -0
  64. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts.map +1 -0
  65. package/mcp-server/dist/tools/github/verify-dependencies.tool.js +167 -0
  66. package/mcp-server/dist/tools/github/verify-dependencies.tool.js.map +1 -0
  67. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts +26 -0
  68. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts.map +1 -0
  69. package/mcp-server/dist/tools/github/view-source-file.tool.js +91 -0
  70. package/mcp-server/dist/tools/github/view-source-file.tool.js.map +1 -0
  71. package/mcp-server/dist/tools/index.d.ts +3 -7
  72. package/mcp-server/dist/tools/index.d.ts.map +1 -1
  73. package/mcp-server/dist/tools/index.js +17 -13
  74. package/mcp-server/dist/tools/index.js.map +1 -1
  75. package/package.json +25 -6
  76. package/wiki/get-started/best-practices/api-usage-examples.md +42 -0
  77. package/wiki/get-started/best-practices/architectural-patterns.md +42 -1
  78. package/wiki/get-started/best-practices/code-style-standards.md +41 -0
  79. package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
  80. package/wiki/get-started/best-practices/data-modeling.md +126 -0
  81. package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
  82. package/wiki/get-started/mcp-docs-server.md +130 -32
  83. package/wiki/get-started/philosophy.md +198 -25
  84. package/wiki/public/logo.svg +1 -0
  85. package/wiki/references/base/application.md +5 -5
  86. package/wiki/references/base/controllers.md +3 -1
  87. package/wiki/references/base/dependency-injection.md +6 -5
  88. package/wiki/references/base/models.md +319 -1
  89. package/wiki/references/components/index.md +3 -1
  90. package/wiki/references/components/static-asset.md +1289 -0
  91. package/wiki/references/helpers/inversion.md +21 -11
  92. package/wiki/references/helpers/storage.md +538 -11
  93. package/wiki/references/src-details/core.md +15 -1
  94. package/wiki/references/src-details/docs.md +19 -9
  95. package/wiki/references/src-details/mcp-server.md +185 -234
  96. package/wiki/references/utilities/index.md +1 -1
  97. package/wiki/references/utilities/request.md +150 -0
  98. package/mcp-server/dist/tools/get-doc-content.tool.d.ts.map +0 -1
  99. package/mcp-server/dist/tools/get-doc-content.tool.js.map +0 -1
  100. package/mcp-server/dist/tools/get-doc-metadata.tool.d.ts.map +0 -1
  101. package/mcp-server/dist/tools/get-doc-metadata.tool.js.map +0 -1
  102. package/mcp-server/dist/tools/list-categories.tool.d.ts.map +0 -1
  103. package/mcp-server/dist/tools/list-categories.tool.js.map +0 -1
  104. package/mcp-server/dist/tools/list-docs.tool.d.ts.map +0 -1
  105. package/mcp-server/dist/tools/list-docs.tool.js.map +0 -1
  106. package/mcp-server/dist/tools/search-docs.tool.d.ts.map +0 -1
  107. package/mcp-server/dist/tools/search-docs.tool.js.map +0 -1
@@ -23,24 +23,34 @@ Documentation package housing guides, references, and MCP server for the Ignis f
23
23
 
24
24
  ## Project Structure Overview
25
25
 
26
- Top-level breakdown of the `@packages/docs/` directory:
26
+ Top-level breakdown of the `packages/docs/` directory:
27
27
 
28
- | Folder | Purpose |
29
- | :--------- | :--------------------------------------------------------------------------------- |
30
- | **`mcp`** | Contains the Model Context Protocol (MCP) server implementation for documentation. |
31
- | **`wiki`** | The main documentation content, built using VitePress. |
28
+ | Folder | Purpose |
29
+ | :--------------- | :--------------------------------------------------------------------------------- |
30
+ | **`mcp-server`** | Contains the Model Context Protocol (MCP) server implementation for documentation and code search. |
31
+ | **`wiki`** | The main documentation content, built using VitePress. |
32
32
 
33
33
  ---
34
34
 
35
35
  ## Detailed Sections
36
36
 
37
- ### `mcp`
37
+ ### `mcp-server`
38
38
 
39
- This directory contains the implementation of a Model Context Protocol (MCP) server, which allows external tools to discover and read documentation resources.
39
+ This directory contains the implementation of a Model Context Protocol (MCP) server, which allows external tools (AI assistants) to discover and read documentation resources, as well as search the source code.
40
40
 
41
- | File/Folder | Purpose/Key Details |
42
- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | File/Folder | Purpose/Key Details |
42
+ | :---------- | :------------------ |
43
+ | `index.ts` | Server entry point, tool registration, and CLI argument parsing |
44
+ | `common/config.ts` | `MCPConfigs` class with server, GitHub, search, and Fuse.js settings |
45
+ | `common/paths.ts` | Path resolution for wiki directory |
46
+ | `helpers/docs.helper.ts` | `DocsHelper` for documentation loading, caching, and Fuse.js search |
47
+ | `helpers/github.helper.ts` | `GithubHelper` for GitHub API integration (code search, file fetching) |
48
+ | `helpers/logger.helper.ts` | Logging utilities |
49
+ | `tools/base.tool.ts` | Abstract `BaseTool` class for all MCP tools |
50
+ | `tools/docs/` | Documentation tools: `searchDocs`, `getDocContent`, `listDocs`, `listCategories`, `getDocMetadata`, `getPackageOverview` |
51
+ | `tools/github/` | Code/project tools: `searchCode`, `listProjectFiles`, `viewSourceFile`, `verifyDependencies` |
43
52
 
53
+ For detailed MCP server documentation, see [MCP Server Deep Dive](./mcp-server.md).
44
54
 
45
55
  ### `wiki`
46
56
 
@@ -12,23 +12,40 @@ This document provides a detailed look into the architecture, features, and inte
12
12
  graph TB
13
13
  AI[AI Assistant / MCP Client]
14
14
  MCP[MCPServer Entry Point]
15
- Tools[MCP Tools Layer]
16
- Helpers[Business Logic Layer]
17
- Cache[In-Memory Cache]
18
- FS[File System / Wiki Docs]
15
+
16
+ subgraph ToolLayer [Tools Layer]
17
+ DocsTools[Documentation Tools]
18
+ CodeTools[Code & Project Tools]
19
+ end
20
+
21
+ subgraph LogicLayer [Business Logic Layer]
22
+ DocsHelper[Docs Helper]
23
+ GitHubHelper[GitHub Helper]
24
+ end
25
+
26
+ subgraph DataLayer [Data Sources]
27
+ FS[File System / Wiki Docs]
28
+ GitHubAPI[GitHub API]
29
+ end
19
30
 
20
31
  AI -->|MCP Protocol| MCP
21
- MCP --> Tools
22
- Tools --> Helpers
23
- Helpers --> Cache
24
- Cache -.->|Cache Miss| FS
32
+ MCP --> DocsTools
33
+ MCP --> CodeTools
34
+
35
+ DocsTools --> DocsHelper
36
+ CodeTools --> GitHubHelper
37
+
38
+ DocsHelper --> FS
39
+ GitHubHelper --> GitHubAPI
25
40
 
26
41
  style AI fill:#e1f5ff
27
42
  style MCP fill:#fff4e1
28
- style Tools fill:#f0f0f0
29
- style Helpers fill:#e8f5e9
30
- style Cache fill:#fce4ec
43
+ style DocsTools fill:#f0f0f0
44
+ style CodeTools fill:#f0f0f0
45
+ style DocsHelper fill:#e8f5e9
46
+ style GitHubHelper fill:#e8f5e9
31
47
  style FS fill:#f3e5f5
48
+ style GitHubAPI fill:#e3f2fd
32
49
  ```
33
50
 
34
51
  ### Component Responsibilities
@@ -36,15 +53,16 @@ graph TB
36
53
  | Component | Responsibility | Key Features |
37
54
  |-----------|---------------|--------------|
38
55
  | **MCP Server** | Protocol handling, request routing | Stdio transport, tool registration |
39
- | **Tools Layer** | Input validation, output formatting | Zod schemas, type safety |
40
- | **DocsHelper** | Business logic, search, caching | Fuse.js search, memory cache |
41
- | **File System** | Documentation storage | Markdown files with frontmatter |
56
+ | **Docs Tools** | Wiki documentation access | Search, content retrieval, metadata |
57
+ | **Code Tools** | Source code analysis | Code search, file listing, dependency check |
58
+ | **DocsHelper** | Docs logic, search, caching | Fuse.js search, memory cache |
59
+ | **GitHubHelper** | GitHub API integration | Repository search, content fetching |
42
60
 
43
61
  ---
44
62
 
45
63
  ## Data Flow
46
64
 
47
- ### Search Request Flow
65
+ ### Documentation Search Flow
48
66
 
49
67
  ```mermaid
50
68
  sequenceDiagram
@@ -52,230 +70,124 @@ sequenceDiagram
52
70
  participant MCP as MCP Server
53
71
  participant Tool as SearchDocsTool
54
72
  participant Helper as DocsHelper
55
- participant Cache as Memory Cache
56
73
  participant FS as File System
57
74
 
58
75
  AI->>MCP: searchDocs("dependency injection")
59
76
  MCP->>Tool: Route to tool handler
60
- Tool->>Tool: Validate input with Zod
61
- Tool->>Helper: DocsHelper.searchDocs()
77
+ Tool->>Helper: DocsHelper.searchDocuments()
62
78
 
63
79
  alt Cache Empty (First Call)
64
80
  Helper->>FS: Load all .md files
65
81
  FS-->>Helper: Raw markdown files
66
- Helper->>Helper: Parse frontmatter
67
82
  Helper->>Helper: Build Fuse.js index
68
- Helper->>Cache: Store docs + index
69
83
  end
70
84
 
71
- Helper->>Cache: Query Fuse.js index
72
- Cache-->>Helper: Matching documents
73
- Helper->>Helper: Generate smart snippets
85
+ Helper->>Helper: Query Fuse.js index
74
86
  Helper-->>Tool: Search results
75
- Tool->>Tool: Validate output with Zod
76
87
  Tool-->>MCP: Formatted response
77
88
  MCP-->>AI: JSON results
78
89
  ```
79
90
 
80
- ---
81
-
82
- ## Tools Reference
83
-
84
- ### Tool Comparison Table
85
-
86
- | Tool | Purpose | Input Complexity | Use Case |
87
- |------|---------|------------------|----------|
88
- | `searchDocs` | Find docs by keyword | Simple (query + limit) | "How do I use Redis?" |
89
- | `getDocContent` | Get full document | Simple (id only) | Retrieve specific guide |
90
- | `listDocs` | Browse all docs | Simple (optional filter) | Explore documentation |
91
- | `listCategories` | List all categories | None | Understand structure |
92
- | `getDocMetadata` | Get doc stats | Simple (id only) | Check length before reading |
93
-
94
- ### 1. searchDocs
95
-
96
- **What it does:** Fuzzy searches across all documentation titles and content.
97
-
98
- **Parameters:**
99
-
100
- | Parameter | Type | Required | Default | Description |
101
- |-----------|------|----------|---------|-------------|
102
- | `query` | string | Yes | - | Search keywords (min 2 chars) |
103
- | `limit` | number | No | 10 | Max results (1-50) |
104
-
105
- **Returns:**
106
-
107
- ```typescript
108
- Array<{
109
- id: string; // "get-started/intro.md"
110
- title: string; // "Introduction to Ignis"
111
- category: string; // "Getting Started"
112
- snippet: string; // First 300 chars preview
113
- score: number; // 0-1 relevance (lower = better)
114
- }>
115
- ```
116
-
117
- **Example Request:**
118
-
119
- ```json
120
- {
121
- "query": "dependency injection",
122
- "limit": 5
123
- }
124
- ```
125
-
126
- **Example Response:**
127
-
128
- ```json
129
- [
130
- {
131
- "id": "core-concepts/dependency-injection.md",
132
- "title": "Dependency Injection",
133
- "category": "Core Concepts",
134
- "snippet": "Ignis uses a powerful dependency injection system that allows you to...",
135
- "score": 0.12
136
- }
137
- ]
138
- ```
139
-
140
- ---
141
-
142
- ### 2. getDocContent
143
-
144
- **What it does:** Retrieves the full markdown content of a specific document.
145
-
146
- **Parameters:**
147
-
148
- | Parameter | Type | Required | Description |
149
- |-----------|------|----------|-------------|
150
- | `id` | string | Yes | Document ID from search/list |
151
-
152
- **Returns:**
153
-
154
- ```typescript
155
- {
156
- content: string; // Full markdown content
157
- id: string; // Document ID
158
- error?: string; // Error message if not found
159
- }
160
- ```
161
-
162
- **Example Request:**
163
-
164
- ```json
165
- {
166
- "id": "get-started/intro.md"
167
- }
168
- ```
169
-
170
- ---
171
-
172
- ### 3. listDocs
91
+ ### Code Search Flow (GitHub)
173
92
 
174
- **What it does:** Lists all documentation files with their metadata.
175
-
176
- **Parameters:**
177
-
178
- | Parameter | Type | Required | Description |
179
- |-----------|------|----------|-------------|
180
- | `category` | string | No | Filter by category name |
181
-
182
- **Returns:**
183
-
184
- ```typescript
185
- {
186
- count: number;
187
- docs: Array<{
188
- id: string;
189
- title: string;
190
- category: string;
191
- }>;
192
- }
193
- ```
194
-
195
- **Example Response:**
93
+ ```mermaid
94
+ sequenceDiagram
95
+ participant AI as AI Assistant
96
+ participant MCP as MCP Server
97
+ participant Tool as SearchCodeTool
98
+ participant Helper as GitHubHelper
99
+ participant API as GitHub API
196
100
 
197
- ```json
198
- {
199
- "count": 15,
200
- "docs": [
201
- {
202
- "id": "get-started/intro.md",
203
- "title": "Introduction",
204
- "category": "Getting Started"
205
- }
206
- ]
207
- }
101
+ AI->>MCP: searchCode("BaseController")
102
+ MCP->>Tool: Route to tool handler
103
+ Tool->>Helper: GitHubHelper.searchCode()
104
+ Helper->>API: GET /search/code
105
+ API-->>Helper: JSON results
106
+ Helper->>Helper: Process & Format
107
+ Helper-->>Tool: Code matches
108
+ Tool-->>MCP: Formatted response
109
+ MCP-->>AI: JSON results
208
110
  ```
209
111
 
210
112
  ---
211
113
 
212
- ### 4. listCategories
213
-
214
- **What it does:** Lists all unique categories, sorted alphabetically.
215
-
216
- **Parameters:** None
217
-
218
- **Returns:**
219
-
220
- ```typescript
221
- {
222
- count: number;
223
- categories: string[]; // ["Core Concepts", "Getting Started", ...]
224
- }
225
- ```
226
-
227
- **Example Response:**
114
+ ## Tools Reference
228
115
 
229
- ```json
230
- {
231
- "count": 6,
232
- "categories": [
233
- "Core Concepts",
234
- "Getting Started",
235
- "Helpers",
236
- "References"
237
- ]
238
- }
239
- ```
116
+ ### 1. Documentation Tools
117
+
118
+ Tools for accessing the Ignis Framework wiki and guide documentation.
119
+
120
+ | Tool | Purpose | Use Case |
121
+ |------|---------|----------|
122
+ | `searchDocs` | Find docs by keyword | "How do I use Redis?" |
123
+ | `getDocContent` | Get full document content | "Show me the Redis guide" |
124
+ | `listDocs` | Browse available docs | "What guides are available?" |
125
+ | `listCategories` | List doc categories | "Show me doc topics" |
126
+ | `getDocMetadata` | Get doc statistics | "Is this guide long?" |
127
+ | `getPackageOverview` | Get package summaries | "What does the core package do?" |
128
+
129
+ #### `searchDocs`
130
+ Fuzzy searches across all documentation titles and content.
131
+ - **Input:** `{ query: string, limit?: number }`
132
+ - **Returns:** List of matching documents with snippets and relevance scores.
133
+
134
+ #### `getDocContent`
135
+ Retrieves the full markdown content of a specific document.
136
+ - **Input:** `{ id: string }`
137
+ - **Returns:** Full document content.
138
+
139
+ #### `listDocs`
140
+ Lists all documentation files, optionally filtered by category.
141
+ - **Input:** `{ category?: string }`
142
+ - **Returns:** List of document metadata (id, title, category).
143
+
144
+ #### `listCategories`
145
+ Lists all unique documentation categories.
146
+ - **Input:** `{}`
147
+ - **Returns:** List of category names.
148
+
149
+ #### `getDocMetadata`
150
+ Retrieves statistics about a document without loading full content.
151
+ - **Input:** `{ id: string }`
152
+ - **Returns:** Word count, character count, last modified date.
153
+
154
+ #### `getPackageOverview`
155
+ Retrieves high-level information about specific framework packages.
156
+ - **Input:** `{ packageName?: string }`
157
+ - **Returns:** Package description, version, and purpose.
240
158
 
241
159
  ---
242
160
 
243
- ### 5. getDocMetadata
161
+ ### 2. Code & Project Tools
244
162
 
245
- **What it does:** Retrieves statistics about a document without loading full content.
163
+ Tools for exploring the Ignis codebase, searching source code, and verifying dependencies via GitHub.
246
164
 
247
- **Parameters:**
165
+ | Tool | Purpose | Use Case |
166
+ |------|---------|----------|
167
+ | `searchCode` | Search source code | "Find usages of BaseController" |
168
+ | `listProjectFiles` | List repo files | "Show me files in packages/core" |
169
+ | `viewSourceFile` | Read source code | "Read packages/core/src/index.ts" |
170
+ | `verifyDependencies` | Check package.json | "Check dependencies for @venizia/core" |
248
171
 
249
- | Parameter | Type | Required | Description |
250
- |-----------|------|----------|-------------|
251
- | `id` | string | Yes | Document ID |
172
+ #### `searchCode`
173
+ Searches the codebase using GitHub's code search API.
174
+ - **Input:** `{ query: string, limit?: number, extension?: string }`
175
+ - **Returns:** List of code matches with file paths and snippets.
252
176
 
253
- **Returns:**
254
-
255
- ```typescript
256
- {
257
- id: string;
258
- title: string;
259
- category: string;
260
- wordCount: number;
261
- charCount: number;
262
- lastModified?: string;
263
- size?: number; // Bytes
264
- }
265
- ```
177
+ #### `listProjectFiles`
178
+ Lists files and directories in the repository.
179
+ - **Input:** `{ path?: string, recursive?: boolean }`
180
+ - **Returns:** File tree structure.
266
181
 
267
- **Example Response:**
182
+ #### `viewSourceFile`
183
+ Retrieves the raw content of a source code file.
184
+ - **Input:** `{ path: string }`
185
+ - **Returns:** Raw file content.
268
186
 
269
- ```json
270
- {
271
- "id": "core-concepts/dependency-injection.md",
272
- "title": "Dependency Injection",
273
- "category": "Core Concepts",
274
- "wordCount": 2500,
275
- "charCount": 15234,
276
- "size": 15234
277
- }
278
- ```
187
+ #### `verifyDependencies`
188
+ Checks the `package.json` of a specific package or the root project.
189
+ - **Input:** `{ package?: string }`
190
+ - **Returns:** List of dependencies and their versions.
279
191
 
280
192
  ---
281
193
 
@@ -338,20 +250,31 @@ pie
338
250
  ```
339
251
  mcp-server/
340
252
  ├── common/
341
- │ ├── config.ts # Configuration constants
253
+ │ ├── config.ts # Configuration constants (MCPConfigs class)
342
254
  │ ├── logger.ts # Logging infrastructure
343
255
  │ ├── paths.ts # Path resolution
344
256
  │ └── index.ts # Common exports
345
257
  ├── helpers/
346
258
  │ ├── docs.helper.ts # Documentation loading and searching
259
+ │ ├── github.helper.ts # GitHub API integration
260
+ │ ├── logger.helper.ts # Logging utilities
347
261
  │ └── index.ts # Helper exports
348
262
  ├── tools/
349
263
  │ ├── base.tool.ts # Abstract base class for tools
350
- │ ├── search-docs.tool.ts
351
- │ ├── get-doc-content.tool.ts
352
- │ ├── list-docs.tool.ts
353
- │ ├── list-categories.tool.ts
354
- │ ├── get-doc-metadata.tool.ts
264
+ │ ├── docs/ # Documentation tools
265
+ ├── get-document-content.tool.ts
266
+ ├── get-document-metadata.tool.ts
267
+ ├── get-package-overview.tool.ts
268
+ ├── list-categories.tool.ts
269
+ │ │ ├── list-documents.tool.ts
270
+ │ │ ├── search-documents.tool.ts
271
+ │ │ └── index.ts
272
+ │ ├── github/ # GitHub/Code tools
273
+ │ │ ├── list-project-files.tool.ts
274
+ │ │ ├── search-code.tool.ts
275
+ │ │ ├── verify-dependencies.tool.ts
276
+ │ │ ├── view-source-file.tool.ts
277
+ │ │ └── index.ts
355
278
  │ └── index.ts
356
279
  ├── index.ts # Server entry point
357
280
  └── README.md
@@ -364,9 +287,10 @@ mcp-server/
364
287
  | `index.ts` | Server initialization, tool registration | `main()`, `mcpServer` |
365
288
  | `tools/base.tool.ts` | Abstract tool class, singleton pattern | `BaseTool`, `createTool` |
366
289
  | `helpers/docs.helper.ts` | Documentation loading, search, cache | `DocsHelper` class |
367
- | `common/config.ts` | Centralized configuration | `MCP_CONFIG` object |
290
+ | `helpers/github.helper.ts` | GitHub API integration | `GithubHelper` class |
291
+ | `common/config.ts` | Centralized configuration | `MCPConfigs` class |
368
292
  | `common/logger.ts` | Structured logging | `Logger` class |
369
- | `common/paths.ts` | Path resolution | `PATHS` object |
293
+ | `common/paths.ts` | Path resolution | `Paths` object |
370
294
 
371
295
  ---
372
296
 
@@ -543,28 +467,55 @@ const mcpServer = new MCPServer({
543
467
 
544
468
  ### Configuration Updates
545
469
 
546
- Modify `common/config.ts` to adjust global settings:
470
+ Modify `common/config.ts` to adjust global settings. The configuration is now a class with static properties:
547
471
 
548
472
  ```typescript
549
- export const MCP_CONFIG = {
550
- server: {
551
- name: 'ignis-docs',
552
- version: '0.0.1',
553
- },
554
- search: {
555
- defaultLimit: 10, // Change default result count
556
- maxLimit: 50, // Change maximum result count
557
- minQueryLength: 2, // Change minimum query length
558
- snippetLength: 300, // Change snippet preview length
559
- },
560
- fuse: {
561
- threshold: 0.4, // Adjust fuzzy matching strictness
473
+ export class MCPConfigs {
474
+ // Server identification
475
+ static readonly server = { name: 'ignis-docs', version: '0.0.1' } as const;
476
+
477
+ // GitHub configuration (branch is runtime-configurable)
478
+ static readonly github = {
479
+ apiBase: 'https://api.github.com',
480
+ rawContentBase: 'https://raw.githubusercontent.com',
481
+ repoOwner: 'VENIZIA-AI',
482
+ repoName: 'ignis',
483
+ get branch(): string { return MCPConfigs._branch; },
484
+ };
485
+
486
+ // Set branch at runtime via CLI argument
487
+ static setBranch(opts: { branch: string }) {
488
+ MCPConfigs._branch = opts.branch;
489
+ }
490
+
491
+ // Documentation search settings
492
+ static readonly search = {
493
+ snippetLength: 320, // Max characters for content snippet
494
+ defaultLimit: 10, // Default results per search
495
+ maxLimit: 50, // Maximum allowed results
496
+ minQueryLength: 2, // Minimum query length
497
+ };
498
+
499
+ // Code search settings (GitHub API)
500
+ static readonly codeSearch = {
501
+ defaultLimit: 10,
502
+ maxLimit: 30, // GitHub API limit
503
+ minQueryLength: 2,
504
+ };
505
+
506
+ // Fuse.js search engine settings
507
+ static readonly fuse = {
508
+ includeScore: true,
509
+ threshold: 0.4, // 0.0 = exact, 1.0 = match anything
510
+ minMatchCharLength: 2,
511
+ findAllMatches: true,
512
+ ignoreLocation: true,
562
513
  keys: [
563
- { name: 'title', weight: 0.7 }, // Adjust title weight
564
- { name: 'content', weight: 0.3 }, // Adjust content weight
514
+ { name: 'title', weight: 0.7 },
515
+ { name: 'content', weight: 0.3 },
565
516
  ],
566
- },
567
- };
517
+ };
518
+ }
568
519
  ```
569
520
 
570
521
  **Configuration Impact:**
@@ -723,4 +674,4 @@ The search uses a threshold of 0.4, which balances between strict and fuzzy matc
723
674
  - Close matches: Tolerate 1-2 character typos
724
675
  - Partial matches: Find substrings anywhere in title/content
725
676
 
726
- Adjust `MCP_CONFIG.fuse.threshold` to make it stricter (lower) or fuzzier (higher).
677
+ Adjust `MCPConfigs.fuse.threshold` to make it stricter (lower) or fuzzier (higher).
@@ -8,5 +8,5 @@ Utilities are pure, standalone functions that provide common, reusable logic for
8
8
  - [Parse](./parse.md): A collection of functions for parsing and converting data types.
9
9
  - [Performance](./performance.md): Utilities for measuring code execution time.
10
10
  - [Promise](./promise.md): Helper functions for working with Promises.
11
- - [Request](./request.md): Utilities for handling HTTP requests, such as parsing multipart form data.
11
+ - [Request](./request.md): Utilities for handling HTTP requests, such as parsing multipart form data and creating secure Content-Disposition headers.
12
12
  - [Schema](./schema.md): Helpers for creating and validating Zod schemas, especially for request and response validation in an OpenAPI context.