@rushstack/mcp-server 0.2.1 → 0.2.3
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/CHANGELOG.json +24 -0
- package/CHANGELOG.md +13 -1
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +0 -1
- package/lib/server.js.map +1 -1
- package/lib/tools/index.d.ts +0 -1
- package/lib/tools/index.d.ts.map +1 -1
- package/lib/tools/index.js +0 -1
- package/lib/tools/index.js.map +1 -1
- package/package.json +4 -4
- package/lib/rush-doc-fragment.mock.json +0 -18
- package/lib/tools/docs.tool.d.ts +0 -9
- package/lib/tools/docs.tool.d.ts.map +0 -1
- package/lib/tools/docs.tool.js +0 -47
- package/lib/tools/docs.tool.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/mcp-server",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.2.3",
|
|
6
|
+
"tag": "@rushstack/mcp-server_v0.2.3",
|
|
7
|
+
"date": "Sat, 21 Jun 2025 00:13:15 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"dependency": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.74.0`"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.2.2",
|
|
18
|
+
"tag": "@rushstack/mcp-server_v0.2.2",
|
|
19
|
+
"date": "Sat, 14 Jun 2025 00:11:30 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"patch": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "Move the `rush docs` tool to a plugin package `@rushstack/rush-mcp-docs-plugin`"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
4
28
|
{
|
|
5
29
|
"version": "0.2.1",
|
|
6
30
|
"tag": "@rushstack/mcp-server_v0.2.1",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @rushstack/mcp-server
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 21 Jun 2025 00:13:15 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.2.3
|
|
6
|
+
Sat, 21 Jun 2025 00:13:15 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 0.2.2
|
|
11
|
+
Sat, 14 Jun 2025 00:11:30 GMT
|
|
12
|
+
|
|
13
|
+
### Patches
|
|
14
|
+
|
|
15
|
+
- Move the `rush docs` tool to a plugin package `@rushstack/rush-mcp-docs-plugin`
|
|
4
16
|
|
|
5
17
|
## 0.2.1
|
|
6
18
|
Fri, 06 Jun 2025 08:20:18 GMT
|
package/lib/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWpE,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,aAAa,CAAsB;gBAExB,iBAAiB,EAAE,MAAM;IAU/B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxC,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;CAOvB"}
|
package/lib/server.js
CHANGED
|
@@ -27,7 +27,6 @@ class RushMCPServer extends mcp_js_1.McpServer {
|
|
|
27
27
|
this._tools.push(new tools_1.RushCommandValidatorTool());
|
|
28
28
|
this._tools.push(new tools_1.RushWorkspaceDetailsTool());
|
|
29
29
|
this._tools.push(new tools_1.RushProjectDetailsTool());
|
|
30
|
-
this._tools.push(new tools_1.RushDocsTool());
|
|
31
30
|
}
|
|
32
31
|
_registerTools() {
|
|
33
32
|
process.chdir(this._rushWorkspacePath);
|
package/lib/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAAoE;AACpE,mCAOiB;AACjB,+EAA4E;AAE5E,MAAa,aAAc,SAAQ,kBAAS;IAK1C,YAAmB,iBAAyB;QAC1C,KAAK,CAAC;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;QAPG,WAAM,GAAe,EAAE,CAAC;QAS9B,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,IAAI,yCAAmB,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;IACvC,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,gCAAwB,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,8BAAsB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,gCAAwB,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,gCAAwB,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IACjD,CAAC;IAEO,cAAc;QACpB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAEvC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF;AArCD,sCAqCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport {\n type BaseTool,\n RushConflictResolverTool,\n RushMigrateProjectTool,\n RushCommandValidatorTool,\n RushWorkspaceDetailsTool,\n RushProjectDetailsTool\n} from './tools';\nimport { RushMcpPluginLoader } from './pluginFramework/RushMcpPluginLoader';\n\nexport class RushMCPServer extends McpServer {\n private _rushWorkspacePath: string;\n private _tools: BaseTool[] = [];\n private _pluginLoader: RushMcpPluginLoader;\n\n public constructor(rushWorkspacePath: string) {\n super({\n name: 'rush',\n version: '1.0.0'\n });\n\n this._rushWorkspacePath = rushWorkspacePath;\n this._pluginLoader = new RushMcpPluginLoader(this._rushWorkspacePath, this);\n }\n\n public async startAsync(): Promise<void> {\n this._initializeTools();\n this._registerTools();\n\n await this._pluginLoader.loadAsync();\n }\n\n private _initializeTools(): void {\n this._tools.push(new RushConflictResolverTool());\n this._tools.push(new RushMigrateProjectTool(this._rushWorkspacePath));\n this._tools.push(new RushCommandValidatorTool());\n this._tools.push(new RushWorkspaceDetailsTool());\n this._tools.push(new RushProjectDetailsTool());\n }\n\n private _registerTools(): void {\n process.chdir(this._rushWorkspacePath);\n\n for (const tool of this._tools) {\n tool.register(this);\n }\n }\n}\n"]}
|
package/lib/tools/index.d.ts
CHANGED
package/lib/tools/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
|
package/lib/tools/index.js
CHANGED
|
@@ -22,5 +22,4 @@ __exportStar(require("./project-details.tool"), exports);
|
|
|
22
22
|
__exportStar(require("./rush-command-validator.tool"), exports);
|
|
23
23
|
__exportStar(require("./workspace-details"), exports);
|
|
24
24
|
__exportStar(require("./conflict-resolver.tool"), exports);
|
|
25
|
-
__exportStar(require("./docs.tool"), exports);
|
|
26
25
|
//# sourceMappingURL=index.js.map
|
package/lib/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;AAE3D,8CAA4B;AAC5B,yDAAuC;AACvC,yDAAuC;AACvC,gEAA8C;AAC9C,sDAAoC;AACpC,2DAAyC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;AAE3D,8CAA4B;AAC5B,yDAAuC;AACvC,yDAAuC;AACvC,gEAA8C;AAC9C,sDAAoC;AACpC,2DAAyC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nexport * from './base.tool';\nexport * from './migrate-project.tool';\nexport * from './project-details.tool';\nexport * from './rush-command-validator.tool';\nexport * from './workspace-details';\nexport * from './conflict-resolver.tool';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A Model Context Protocol server implementation for Rush",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rush",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"zod": "~3.24.3",
|
|
31
31
|
"@rushstack/node-core-library": "5.13.1",
|
|
32
32
|
"@rushstack/terminal": "0.15.3",
|
|
33
|
-
"@rushstack/rush-sdk": "5.
|
|
33
|
+
"@rushstack/rush-sdk": "5.155.0",
|
|
34
34
|
"@rushstack/ts-command-line": "5.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "~5.8.2",
|
|
38
38
|
"@types/node": "20.17.19",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"local-node-rig": "1.0.0",
|
|
40
|
+
"@rushstack/heft": "0.74.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "heft build --clean",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"text": "---\ntitle: rush install-autoinstaller\n---\n\n```\nusage: rush install-autoinstaller [-h] --name AUTOINSTALLER_NAME\n\nUse this command to install dependencies for an autoinstaller folder.\n\nOptional arguments:\n -h, --help Show this help message and exit.\n --name AUTOINSTALLER_NAME\n The name of the autoinstaller, which must be one of\n the folders under common/autoinstallers.\n```\n\n## See also\n\n- [rush update-autoinstaller](../commands/rush_update-autoinstaller.md)\n- [rush init-autoinstaller](../commands/rush_init-autoinstaller.md)",
|
|
4
|
-
"score": 0.7231232
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"text": "---\ntitle: rush install-autoinstaller\n---\n\n```\n用法:rush install-autoinstaller [-h] --name AUTOINSTALLER_NAME\n\n使用该指令给一个项目安装依赖。\n\n可选参数:\n -h, --help 展示帮助信息并退出\n --name AUTOINSTALLER_NAME\n 指定自动安装的包名,它必须是 common/autoinstallers\n 下的一个文件夹。\n```\n\n## See also\n\n- [rush update-autoinstaller](../commands/rush_update-autoinstaller.md)\n- [rush init-autoinstaller](../commands/rush_init-autoinstaller.md)",
|
|
8
|
-
"score": 0.7132133
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"text": "---\ntitle: rush update-autoinstaller\n---\n\n```\nusage: rush update-autoinstaller [-h] --name AUTOINSTALLER_NAME\n\nUse this command to regenerate the shrinkwrap file for an autoinstaller\nfolder.\n\nOptional arguments:\n -h, --help Show this help message and exit.\n --name AUTOINSTALLER_NAME\n The name of the autoinstaller, which must be one of\n the folders under common/autoinstallers.\n```\n\n## See also\n\n- [rush install-autoinstaller](../commands/rush_install-autoinstaller.md)\n- [rush init-autoinstaller](../commands/rush_init-autoinstaller.md)",
|
|
12
|
-
"score": 0.6632131
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"text": "---\ntitle: rush update-autoinstaller\n---\n\n```\nusage: rush update-autoinstaller [-h] --name AUTOINSTALLER_NAME\n\nUse this command to regenerate the shrinkwrap file for an autoinstaller\nfolder.\n\nOptional arguments:\n -h, --help Show this help message and exit.\n --name AUTOINSTALLER_NAME\n The name of the autoinstaller, which must be one of\n the folders under common/autoinstallers.\n```\n\n## See also\n\n- [rush install-autoinstaller](../commands/rush_install-autoinstaller.md)\n- [rush init-autoinstaller](../commands/rush_init-autoinstaller.md)",
|
|
16
|
-
"score": 0.6528328
|
|
17
|
-
}
|
|
18
|
-
]
|
package/lib/tools/docs.tool.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseTool, type CallToolResult } from './base.tool';
|
|
2
|
-
export declare class RushDocsTool extends BaseTool {
|
|
3
|
-
constructor();
|
|
4
|
-
private _searchDocs;
|
|
5
|
-
executeAsync({ userQuery }: {
|
|
6
|
-
userQuery: string;
|
|
7
|
-
}): Promise<CallToolResult>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=docs.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs.tool.d.ts","sourceRoot":"","sources":["../../src/tools/docs.tool.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAY5D,qBAAa,YAAa,SAAQ,QAAQ;;IAaxC,OAAO,CAAC,WAAW;IAeN,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;CAYzF"}
|
package/lib/tools/docs.tool.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
-
// See LICENSE in the project root for license information.
|
|
4
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
-
};
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.RushDocsTool = void 0;
|
|
9
|
-
const zod_1 = require("zod");
|
|
10
|
-
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const base_tool_1 = require("./base.tool");
|
|
13
|
-
class RushDocsTool extends base_tool_1.BaseTool {
|
|
14
|
-
constructor() {
|
|
15
|
-
super({
|
|
16
|
-
name: 'rush_docs',
|
|
17
|
-
description: 'Search and retrieve relevant sections from the official Rush documentation based on user queries.',
|
|
18
|
-
schema: {
|
|
19
|
-
userQuery: zod_1.z.string().describe('The user query to search for relevant documentation sections.')
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// TODO: replace with Microsoft's service
|
|
24
|
-
_searchDocs(query) {
|
|
25
|
-
const startTime = Date.now();
|
|
26
|
-
const results = node_core_library_1.JsonFile.load(path_1.default.join(__dirname, '../rush-doc-fragment.mock.json'));
|
|
27
|
-
return {
|
|
28
|
-
query,
|
|
29
|
-
results,
|
|
30
|
-
count: results.length,
|
|
31
|
-
searchTimeMs: Date.now() - startTime
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
async executeAsync({ userQuery }) {
|
|
35
|
-
const docSearchResult = this._searchDocs(userQuery);
|
|
36
|
-
return {
|
|
37
|
-
content: [
|
|
38
|
-
{
|
|
39
|
-
type: 'text',
|
|
40
|
-
text: docSearchResult.results.map((item) => item.text).join('\n\n')
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.RushDocsTool = RushDocsTool;
|
|
47
|
-
//# sourceMappingURL=docs.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs.tool.js","sourceRoot":"","sources":["../../src/tools/docs.tool.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,6BAAwB;AACxB,oEAAwD;AACxD,gDAAwB;AAExB,2CAA4D;AAY5D,MAAa,YAAa,SAAQ,oBAAQ;IACxC;QACE,KAAK,CAAC;YACJ,IAAI,EAAE,WAAW;YACjB,WAAW,EACT,mGAAmG;YACrG,MAAM,EAAE;gBACN,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;aAChG;SACF,CAAC,CAAC;IACL,CAAC;IAED,yCAAyC;IACjC,WAAW,CAAC,KAAa;QAC/B,MAAM,SAAS,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;QAErC,MAAM,OAAO,GAA2B,4BAAQ,CAAC,IAAI,CACnD,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gCAAgC,CAAC,CACvD,CAAC;QAEF,OAAO;YACL,KAAK;YACL,OAAO;YACP,KAAK,EAAE,OAAO,CAAC,MAAM;YACrB,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACrC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,EAAE,SAAS,EAAyB;QAC5D,MAAM,eAAe,GAAgB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAEjE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;iBACpE;aACF;SACF,CAAC;IACJ,CAAC;CACF;AAxCD,oCAwCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { z } from 'zod';\nimport { JsonFile } from '@rushstack/node-core-library';\nimport path from 'path';\n\nimport { BaseTool, type CallToolResult } from './base.tool';\n\ninterface IDocsResult {\n query: string;\n results: {\n score: number;\n text: string;\n }[];\n count: number;\n searchTimeMs: number;\n}\n\nexport class RushDocsTool extends BaseTool {\n public constructor() {\n super({\n name: 'rush_docs',\n description:\n 'Search and retrieve relevant sections from the official Rush documentation based on user queries.',\n schema: {\n userQuery: z.string().describe('The user query to search for relevant documentation sections.')\n }\n });\n }\n\n // TODO: replace with Microsoft's service\n private _searchDocs(query: string): IDocsResult {\n const startTime: number = Date.now();\n\n const results: IDocsResult['results'] = JsonFile.load(\n path.join(__dirname, '../rush-doc-fragment.mock.json')\n );\n\n return {\n query,\n results,\n count: results.length,\n searchTimeMs: Date.now() - startTime\n };\n }\n\n public async executeAsync({ userQuery }: { userQuery: string }): Promise<CallToolResult> {\n const docSearchResult: IDocsResult = this._searchDocs(userQuery);\n\n return {\n content: [\n {\n type: 'text',\n text: docSearchResult.results.map((item) => item.text).join('\\n\\n')\n }\n ]\n };\n }\n}\n"]}
|