@react-native-nitro-device-info/mcp-server 1.0.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/README.md +220 -0
- package/dist/cli/init.d.ts +12 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +153 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +375 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer/api-parser.d.ts +23 -0
- package/dist/indexer/api-parser.d.ts.map +1 -0
- package/dist/indexer/api-parser.js +404 -0
- package/dist/indexer/api-parser.js.map +1 -0
- package/dist/indexer/doc-parser.d.ts +38 -0
- package/dist/indexer/doc-parser.d.ts.map +1 -0
- package/dist/indexer/doc-parser.js +359 -0
- package/dist/indexer/doc-parser.js.map +1 -0
- package/dist/indexer/index.d.ts +54 -0
- package/dist/indexer/index.d.ts.map +1 -0
- package/dist/indexer/index.js +151 -0
- package/dist/indexer/index.js.map +1 -0
- package/dist/indexer/search.d.ts +36 -0
- package/dist/indexer/search.d.ts.map +1 -0
- package/dist/indexer/search.js +511 -0
- package/dist/indexer/search.js.map +1 -0
- package/dist/tools/get-api.d.ts +26 -0
- package/dist/tools/get-api.d.ts.map +1 -0
- package/dist/tools/get-api.js +229 -0
- package/dist/tools/get-api.js.map +1 -0
- package/dist/tools/list-apis.d.ts +32 -0
- package/dist/tools/list-apis.d.ts.map +1 -0
- package/dist/tools/list-apis.js +210 -0
- package/dist/tools/list-apis.js.map +1 -0
- package/dist/tools/search-docs.d.ts +32 -0
- package/dist/tools/search-docs.d.ts.map +1 -0
- package/dist/tools/search-docs.js +148 -0
- package/dist/tools/search-docs.js.map +1 -0
- package/dist/types/index.d.ts +166 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* API Parser for DeviceInfo.nitro.ts
|
|
4
|
+
*
|
|
5
|
+
* Extracts method signatures, JSDoc comments, and platform tags
|
|
6
|
+
* from the TypeScript interface definition.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.parseDeviceInfoFile = parseDeviceInfoFile;
|
|
43
|
+
exports.parseDeviceInfoContent = parseDeviceInfoContent;
|
|
44
|
+
exports.getDeviceInfoPath = getDeviceInfoPath;
|
|
45
|
+
const fs = __importStar(require("fs"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
/**
|
|
48
|
+
* Category keywords mapping for automatic categorization
|
|
49
|
+
*/
|
|
50
|
+
const CATEGORY_KEYWORDS = {
|
|
51
|
+
// Battery & Power
|
|
52
|
+
battery: 'battery',
|
|
53
|
+
power: 'battery',
|
|
54
|
+
charging: 'battery',
|
|
55
|
+
lowpower: 'battery',
|
|
56
|
+
// Memory
|
|
57
|
+
memory: 'memory',
|
|
58
|
+
ram: 'memory',
|
|
59
|
+
// Storage
|
|
60
|
+
disk: 'storage',
|
|
61
|
+
storage: 'storage',
|
|
62
|
+
// Network
|
|
63
|
+
ip: 'network',
|
|
64
|
+
mac: 'network',
|
|
65
|
+
carrier: 'network',
|
|
66
|
+
network: 'network',
|
|
67
|
+
// Capabilities
|
|
68
|
+
notch: 'capabilities',
|
|
69
|
+
dynamicisland: 'capabilities',
|
|
70
|
+
emulator: 'capabilities',
|
|
71
|
+
simulator: 'capabilities',
|
|
72
|
+
tablet: 'capabilities',
|
|
73
|
+
camera: 'capabilities',
|
|
74
|
+
fingerprint: 'capabilities',
|
|
75
|
+
gms: 'capabilities',
|
|
76
|
+
hms: 'capabilities',
|
|
77
|
+
feature: 'capabilities',
|
|
78
|
+
landscape: 'capabilities',
|
|
79
|
+
// Application
|
|
80
|
+
version: 'application',
|
|
81
|
+
build: 'application',
|
|
82
|
+
bundle: 'application',
|
|
83
|
+
application: 'application',
|
|
84
|
+
install: 'application',
|
|
85
|
+
referrer: 'application',
|
|
86
|
+
useragent: 'application',
|
|
87
|
+
// Platform-specific
|
|
88
|
+
android: 'platform-specific',
|
|
89
|
+
serial: 'platform-specific',
|
|
90
|
+
security: 'platform-specific',
|
|
91
|
+
bootloader: 'platform-specific',
|
|
92
|
+
codename: 'platform-specific',
|
|
93
|
+
hardware: 'platform-specific',
|
|
94
|
+
incremental: 'platform-specific',
|
|
95
|
+
navigation: 'platform-specific',
|
|
96
|
+
// Display
|
|
97
|
+
brightness: 'display',
|
|
98
|
+
fontscale: 'display',
|
|
99
|
+
display: 'display',
|
|
100
|
+
zoom: 'display',
|
|
101
|
+
// Audio
|
|
102
|
+
headphone: 'audio',
|
|
103
|
+
bluetooth: 'audio',
|
|
104
|
+
audio: 'audio',
|
|
105
|
+
// Location
|
|
106
|
+
location: 'location',
|
|
107
|
+
airplane: 'location',
|
|
108
|
+
// Identification
|
|
109
|
+
unique: 'identification',
|
|
110
|
+
devicetoken: 'identification',
|
|
111
|
+
idfv: 'identification',
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Parse JSDoc comment block
|
|
115
|
+
*/
|
|
116
|
+
function parseJsDoc(comment) {
|
|
117
|
+
const lines = comment.split('\n').map((l) => l.trim().replace(/^\*\s?/, ''));
|
|
118
|
+
let description = '';
|
|
119
|
+
let platform = { type: 'both' };
|
|
120
|
+
const examples = [];
|
|
121
|
+
const params = [];
|
|
122
|
+
let returns = '';
|
|
123
|
+
let isAsync = false;
|
|
124
|
+
let currentSection = 'description';
|
|
125
|
+
let currentExample = '';
|
|
126
|
+
for (const line of lines) {
|
|
127
|
+
// Check for @tags
|
|
128
|
+
if (line.startsWith('@platform')) {
|
|
129
|
+
const platformText = line.replace('@platform', '').trim().toLowerCase();
|
|
130
|
+
if (platformText.includes('android') && platformText.includes('ios')) {
|
|
131
|
+
platform = { type: 'both' };
|
|
132
|
+
}
|
|
133
|
+
else if (platformText.includes('android only') || platformText === 'android') {
|
|
134
|
+
const apiMatch = platformText.match(/api\s*(\d+)/i);
|
|
135
|
+
platform = {
|
|
136
|
+
type: 'android-only',
|
|
137
|
+
minApiLevel: apiMatch ? parseInt(apiMatch[1]) : undefined,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
else if (platformText.includes('ios only') || platformText === 'ios') {
|
|
141
|
+
const versionMatch = platformText.match(/ios\s*([\d.]+)/i);
|
|
142
|
+
platform = {
|
|
143
|
+
type: 'ios-only',
|
|
144
|
+
minVersion: versionMatch ? versionMatch[1] : undefined,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else if (platformText.includes('android')) {
|
|
148
|
+
const apiMatch = platformText.match(/api\s*(\d+)/i);
|
|
149
|
+
platform = {
|
|
150
|
+
type: 'android',
|
|
151
|
+
minApiLevel: apiMatch ? parseInt(apiMatch[1]) : undefined,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
else if (platformText.includes('ios')) {
|
|
155
|
+
const versionMatch = platformText.match(/([\d.]+)/);
|
|
156
|
+
platform = {
|
|
157
|
+
type: 'ios',
|
|
158
|
+
minVersion: versionMatch ? versionMatch[1] : undefined,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (line.startsWith('@example')) {
|
|
164
|
+
currentSection = 'example';
|
|
165
|
+
currentExample = '';
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (line.startsWith('@param')) {
|
|
169
|
+
currentSection = 'param';
|
|
170
|
+
const paramMatch = line.match(/@param\s+(\w+)\s*(.*)/);
|
|
171
|
+
if (paramMatch) {
|
|
172
|
+
params.push({
|
|
173
|
+
name: paramMatch[1],
|
|
174
|
+
type: 'unknown', // Will be extracted from signature
|
|
175
|
+
description: paramMatch[2] || '',
|
|
176
|
+
optional: false,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (line.startsWith('@returns') || line.startsWith('@return')) {
|
|
182
|
+
currentSection = 'returns';
|
|
183
|
+
returns = line.replace(/@returns?\s*/, '');
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (line.startsWith('@async')) {
|
|
187
|
+
isAsync = true;
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if (line.startsWith('@')) {
|
|
191
|
+
// Skip other tags
|
|
192
|
+
currentSection = 'other';
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
// Accumulate content based on current section
|
|
196
|
+
if (currentSection === 'description' && line && !line.startsWith('```')) {
|
|
197
|
+
description += (description ? ' ' : '') + line;
|
|
198
|
+
}
|
|
199
|
+
else if (currentSection === 'example') {
|
|
200
|
+
currentExample += line + '\n';
|
|
201
|
+
}
|
|
202
|
+
else if (currentSection === 'returns' && line) {
|
|
203
|
+
returns += ' ' + line;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (currentExample.trim()) {
|
|
207
|
+
examples.push(currentExample.trim());
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
description: description.trim(),
|
|
211
|
+
platform,
|
|
212
|
+
examples,
|
|
213
|
+
params,
|
|
214
|
+
returns: returns.trim(),
|
|
215
|
+
async: isAsync,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Determine API category based on name and description
|
|
220
|
+
*/
|
|
221
|
+
function determineCategory(name, description) {
|
|
222
|
+
const searchText = (name + ' ' + description).toLowerCase();
|
|
223
|
+
for (const [keyword, category] of Object.entries(CATEGORY_KEYWORDS)) {
|
|
224
|
+
if (searchText.includes(keyword)) {
|
|
225
|
+
return category;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return 'device-info'; // Default category
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Parse a single API member (method or property)
|
|
232
|
+
*/
|
|
233
|
+
function parseApiMember(memberText, jsDocComment) {
|
|
234
|
+
const jsDoc = parseJsDoc(jsDocComment);
|
|
235
|
+
// Check if it's a readonly property
|
|
236
|
+
const propertyMatch = memberText.match(/readonly\s+(\w+):\s*([^;]+)/);
|
|
237
|
+
if (propertyMatch) {
|
|
238
|
+
const [, name, returnType] = propertyMatch;
|
|
239
|
+
return {
|
|
240
|
+
name,
|
|
241
|
+
description: jsDoc.description,
|
|
242
|
+
kind: 'property',
|
|
243
|
+
signature: `readonly ${name}: ${returnType.trim()}`,
|
|
244
|
+
returnType: returnType.trim(),
|
|
245
|
+
parameters: [],
|
|
246
|
+
platform: jsDoc.platform,
|
|
247
|
+
isAsync: false,
|
|
248
|
+
examples: jsDoc.examples,
|
|
249
|
+
relatedApis: findRelatedApis(name),
|
|
250
|
+
category: determineCategory(name, jsDoc.description),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
// Check if it's a method
|
|
254
|
+
const methodMatch = memberText.match(/(\w+)\s*\(([^)]*)\)\s*:\s*([^;]+)/);
|
|
255
|
+
if (methodMatch) {
|
|
256
|
+
const [, name, paramsStr, returnType] = methodMatch;
|
|
257
|
+
// Parse parameters
|
|
258
|
+
const parameters = [];
|
|
259
|
+
if (paramsStr.trim()) {
|
|
260
|
+
const paramParts = paramsStr.split(',');
|
|
261
|
+
for (const param of paramParts) {
|
|
262
|
+
const paramMatch = param.trim().match(/(\w+)(\?)?:\s*(.+)/);
|
|
263
|
+
if (paramMatch) {
|
|
264
|
+
const [, paramName, optional, paramType] = paramMatch;
|
|
265
|
+
const jsDocParam = jsDoc.params.find((p) => p.name === paramName);
|
|
266
|
+
parameters.push({
|
|
267
|
+
name: paramName,
|
|
268
|
+
type: paramType.trim(),
|
|
269
|
+
description: jsDocParam?.description || '',
|
|
270
|
+
optional: !!optional,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const isAsync = jsDoc.async || returnType.trim().startsWith('Promise<');
|
|
276
|
+
const cleanReturnType = returnType.trim();
|
|
277
|
+
return {
|
|
278
|
+
name,
|
|
279
|
+
description: jsDoc.description,
|
|
280
|
+
kind: 'method',
|
|
281
|
+
signature: `${name}(${paramsStr.trim()}): ${cleanReturnType}`,
|
|
282
|
+
returnType: cleanReturnType,
|
|
283
|
+
parameters,
|
|
284
|
+
platform: jsDoc.platform,
|
|
285
|
+
isAsync,
|
|
286
|
+
examples: jsDoc.examples,
|
|
287
|
+
relatedApis: findRelatedApis(name),
|
|
288
|
+
category: determineCategory(name, jsDoc.description),
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Find related APIs based on naming patterns
|
|
295
|
+
*/
|
|
296
|
+
function findRelatedApis(name) {
|
|
297
|
+
const related = [];
|
|
298
|
+
const nameLower = name.toLowerCase();
|
|
299
|
+
// Battery-related
|
|
300
|
+
if (nameLower.includes('battery') || nameLower.includes('power') || nameLower.includes('charging')) {
|
|
301
|
+
if (!nameLower.includes('getbatterylevel'))
|
|
302
|
+
related.push('getBatteryLevel');
|
|
303
|
+
if (!nameLower.includes('getpowerstate'))
|
|
304
|
+
related.push('getPowerState');
|
|
305
|
+
if (!nameLower.includes('getisbatterycharging'))
|
|
306
|
+
related.push('getIsBatteryCharging');
|
|
307
|
+
if (!nameLower.includes('islowbatterylevel'))
|
|
308
|
+
related.push('isLowBatteryLevel');
|
|
309
|
+
}
|
|
310
|
+
// Memory-related
|
|
311
|
+
if (nameLower.includes('memory')) {
|
|
312
|
+
if (!nameLower.includes('totalmemory'))
|
|
313
|
+
related.push('totalMemory');
|
|
314
|
+
if (!nameLower.includes('getusedmemory'))
|
|
315
|
+
related.push('getUsedMemory');
|
|
316
|
+
if (!nameLower.includes('maxmemory'))
|
|
317
|
+
related.push('maxMemory');
|
|
318
|
+
}
|
|
319
|
+
// Storage-related
|
|
320
|
+
if (nameLower.includes('disk') || nameLower.includes('storage')) {
|
|
321
|
+
if (!nameLower.includes('totaldiskcapacity'))
|
|
322
|
+
related.push('totalDiskCapacity');
|
|
323
|
+
if (!nameLower.includes('getfreediskstorage'))
|
|
324
|
+
related.push('getFreeDiskStorage');
|
|
325
|
+
}
|
|
326
|
+
// Headphones-related
|
|
327
|
+
if (nameLower.includes('headphone')) {
|
|
328
|
+
if (!nameLower.includes('isheadphonesconnected'))
|
|
329
|
+
related.push('isHeadphonesConnected');
|
|
330
|
+
if (!nameLower.includes('iswiredheadphones'))
|
|
331
|
+
related.push('getIsWiredHeadphonesConnected');
|
|
332
|
+
if (!nameLower.includes('isbluetoothheadphones'))
|
|
333
|
+
related.push('getIsBluetoothHeadphonesConnected');
|
|
334
|
+
}
|
|
335
|
+
// Limit to 3 related APIs
|
|
336
|
+
return related.filter((r) => r.toLowerCase() !== nameLower).slice(0, 3);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Parse DeviceInfo.nitro.ts file and extract all API definitions
|
|
340
|
+
*/
|
|
341
|
+
function parseDeviceInfoFile(filePath) {
|
|
342
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
343
|
+
return parseDeviceInfoContent(content);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Parse DeviceInfo content string and extract all API definitions
|
|
347
|
+
*/
|
|
348
|
+
function parseDeviceInfoContent(content) {
|
|
349
|
+
const apis = [];
|
|
350
|
+
// Find the DeviceInfo interface
|
|
351
|
+
const interfaceMatch = content.match(/export\s+interface\s+DeviceInfo[\s\S]*?\{([\s\S]*?)\n\}/);
|
|
352
|
+
if (!interfaceMatch) {
|
|
353
|
+
console.warn('Could not find DeviceInfo interface in file');
|
|
354
|
+
return apis;
|
|
355
|
+
}
|
|
356
|
+
const interfaceBody = interfaceMatch[1];
|
|
357
|
+
// Split by JSDoc comments and member declarations
|
|
358
|
+
const memberRegex = /\/\*\*[\s\S]*?\*\/\s*(?:readonly\s+\w+:[^;]+;|\w+\s*\([^)]*\)\s*:[^;]+;)/g;
|
|
359
|
+
const matches = interfaceBody.match(memberRegex);
|
|
360
|
+
if (!matches) {
|
|
361
|
+
return apis;
|
|
362
|
+
}
|
|
363
|
+
for (const match of matches) {
|
|
364
|
+
// Split into JSDoc and member
|
|
365
|
+
const jsDocMatch = match.match(/\/\*\*([\s\S]*?)\*\//);
|
|
366
|
+
const memberMatch = match.match(/\*\/\s*([\s\S]+)/);
|
|
367
|
+
if (jsDocMatch && memberMatch) {
|
|
368
|
+
const jsDoc = jsDocMatch[1];
|
|
369
|
+
const member = memberMatch[1].trim();
|
|
370
|
+
const api = parseApiMember(member, jsDoc);
|
|
371
|
+
if (api) {
|
|
372
|
+
apis.push(api);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return apis;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Get the path to DeviceInfo.nitro.ts relative to package
|
|
380
|
+
*
|
|
381
|
+
* When running from dist (packages/mcp-server/dist), we need to go up 3 levels
|
|
382
|
+
* to reach the repository root where src/DeviceInfo.nitro.ts lives.
|
|
383
|
+
*/
|
|
384
|
+
function getDeviceInfoPath(packageRoot) {
|
|
385
|
+
// Try common locations (ordered from most specific to least)
|
|
386
|
+
const possiblePaths = [
|
|
387
|
+
// From packages/mcp-server/dist -> repo root (3 levels up)
|
|
388
|
+
path.join(packageRoot, '..', '..', '..', 'src', 'DeviceInfo.nitro.ts'),
|
|
389
|
+
// From packages/mcp-server/src -> repo root (3 levels up, for dev mode)
|
|
390
|
+
path.join(packageRoot, '..', '..', '..', 'src', 'DeviceInfo.nitro.ts'),
|
|
391
|
+
// From packages/mcp-server -> repo root (2 levels up)
|
|
392
|
+
path.join(packageRoot, '..', '..', 'src', 'DeviceInfo.nitro.ts'),
|
|
393
|
+
// Legacy paths for other configurations
|
|
394
|
+
path.join(packageRoot, '..', 'src', 'DeviceInfo.nitro.ts'),
|
|
395
|
+
path.join(packageRoot, 'src', 'DeviceInfo.nitro.ts'),
|
|
396
|
+
];
|
|
397
|
+
for (const p of possiblePaths) {
|
|
398
|
+
if (fs.existsSync(p)) {
|
|
399
|
+
return p;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
throw new Error(`Could not find DeviceInfo.nitro.ts. Searched: ${possiblePaths.join(', ')}`);
|
|
403
|
+
}
|
|
404
|
+
//# sourceMappingURL=api-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-parser.js","sourceRoot":"","sources":["../../src/indexer/api-parser.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgVH,kDAGC;AAKD,wDAwCC;AAQD,8CAuBC;AA7ZD,uCAAyB;AACzB,2CAA6B;AAG7B;;GAEG;AACH,MAAM,iBAAiB,GAAgC;IACrD,kBAAkB;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IAEnB,SAAS;IACT,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,QAAQ;IAEb,UAAU;IACV,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAElB,UAAU;IACV,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAElB,eAAe;IACf,KAAK,EAAE,cAAc;IACrB,aAAa,EAAE,cAAc;IAC7B,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,cAAc;IACtB,WAAW,EAAE,cAAc;IAC3B,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,cAAc;IACnB,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,cAAc;IAEzB,cAAc;IACd,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,aAAa;IACrB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,aAAa;IAExB,oBAAoB;IACpB,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,mBAAmB;IAC3B,QAAQ,EAAE,mBAAmB;IAC7B,U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,KAAK,EAAE,qBAAqB,CAAC;QAChE,wCAAwC;QACxC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,CAAC;QAC1D,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,qBAAqB,CAAC;KACrD,CAAC;IAEF,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QAC9B,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CACb,iDAAiD,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses markdown documentation files with heading-based chunking
|
|
5
|
+
* for searchable documentation sections.
|
|
6
|
+
*/
|
|
7
|
+
import type { DocumentationChunk } from '../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Parse a single markdown file into documentation chunks
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseMarkdownFile(filePath: string): DocumentationChunk[];
|
|
12
|
+
/**
|
|
13
|
+
* Parse markdown content string into documentation chunks
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseMarkdownContent(content: string, source?: string): DocumentationChunk[];
|
|
16
|
+
/**
|
|
17
|
+
* Parse all markdown files in a directory
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseDocsDirectory(dirPath: string): DocumentationChunk[];
|
|
20
|
+
/**
|
|
21
|
+
* Get documentation paths relative to package root
|
|
22
|
+
*
|
|
23
|
+
* When running from dist (packages/mcp-server/dist), we need to go up 3 levels
|
|
24
|
+
* to reach the repository root where docs/ lives.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getDocsPaths(packageRoot: string): string[];
|
|
27
|
+
/**
|
|
28
|
+
* Parse README file for quick reference content
|
|
29
|
+
*
|
|
30
|
+
* When running from dist (packages/mcp-server/dist), we need to go up 3 levels
|
|
31
|
+
* to reach the repository root where README.md lives.
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseReadme(packageRoot: string): DocumentationChunk[];
|
|
34
|
+
/**
|
|
35
|
+
* Create platform limitation documentation chunks
|
|
36
|
+
*/
|
|
37
|
+
export declare function createPlatformLimitationChunks(): DocumentationChunk[];
|
|
38
|
+
//# sourceMappingURL=doc-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-parser.d.ts","sourceRoot":"","sources":["../../src/indexer/doc-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,mBAAmB,CAAC;AAkG1E;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAGxE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAkB,GACzB,kBAAkB,EAAE,CA2FtB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,EAAE,CA2BxE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAsBrE;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,kBAAkB,EAAE,CAuErE"}
|