@rushstack/rush-mcp-docs-plugin 0.2.14 → 0.3.1

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 CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@rushstack/rush-mcp-docs-plugin",
3
3
  "entries": [
4
+ {
5
+ "version": "0.3.1",
6
+ "tag": "@rushstack/rush-mcp-docs-plugin_v0.3.1",
7
+ "date": "Fri, 20 Feb 2026 00:15:04 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "Add `\"node\"` condition before `\"import\"` in the `\"exports\"` map so that Node.js uses the CJS output (which handles extensionless imports), while bundlers still use ESM via `\"import\"`. Fixes https://github.com/microsoft/rushstack/issues/5644."
12
+ }
13
+ ],
14
+ "dependency": [
15
+ {
16
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.20.1`"
17
+ },
18
+ {
19
+ "comment": "Updating dependency \"@rushstack/mcp-server\" to `0.4.1`"
20
+ },
21
+ {
22
+ "comment": "Updating dependency \"@rushstack/heft\" to `1.2.1`"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "version": "0.3.0",
29
+ "tag": "@rushstack/rush-mcp-docs-plugin_v0.3.0",
30
+ "date": "Thu, 19 Feb 2026 00:04:53 GMT",
31
+ "comments": {
32
+ "minor": [
33
+ {
34
+ "comment": "Normalize package layout. CommonJS is now under `lib-commonjs`, DTS is now under `lib-dts`, and ESM is now under `lib-esm`. Imports to `lib` still work as before, handled by the `\"exports\"` field in `package.json`."
35
+ }
36
+ ],
37
+ "dependency": [
38
+ {
39
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.20.0`"
40
+ },
41
+ {
42
+ "comment": "Updating dependency \"@rushstack/mcp-server\" to `0.4.0`"
43
+ },
44
+ {
45
+ "comment": "Updating dependency \"@rushstack/heft\" to `1.2.0`"
46
+ }
47
+ ]
48
+ }
49
+ },
4
50
  {
5
51
  "version": "0.2.14",
6
52
  "tag": "@rushstack/rush-mcp-docs-plugin_v0.2.14",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @rushstack/rush-mcp-docs-plugin
2
2
 
3
- This log was last generated on Sat, 07 Feb 2026 01:13:26 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 20 Feb 2026 00:15:04 GMT and should not be manually modified.
4
+
5
+ ## 0.3.1
6
+ Fri, 20 Feb 2026 00:15:04 GMT
7
+
8
+ ### Patches
9
+
10
+ - Add `"node"` condition before `"import"` in the `"exports"` map so that Node.js uses the CJS output (which handles extensionless imports), while bundlers still use ESM via `"import"`. Fixes https://github.com/microsoft/rushstack/issues/5644.
11
+
12
+ ## 0.3.0
13
+ Thu, 19 Feb 2026 00:04:53 GMT
14
+
15
+ ### Minor changes
16
+
17
+ - Normalize package layout. CommonJS is now under `lib-commonjs`, DTS is now under `lib-dts`, and ESM is now under `lib-esm`. Imports to `lib` still work as before, handled by the `"exports"` field in `package.json`.
4
18
 
5
19
  ## 0.2.14
6
20
  Sat, 07 Feb 2026 01:13:26 GMT
@@ -0,0 +1,17 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { DocsTool } from './DocsTool';
4
+ export class DocsPlugin {
5
+ constructor(session, configFile) {
6
+ this.configFile = undefined;
7
+ this.session = session;
8
+ this.configFile = configFile;
9
+ }
10
+ async onInitializeAsync() {
11
+ this.session.registerTool({
12
+ toolName: 'rush_docs',
13
+ description: 'Search and retrieve relevant sections from the official Rush documentation based on user queries.'
14
+ }, new DocsTool(this));
15
+ }
16
+ }
17
+ //# sourceMappingURL=DocsPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocsPlugin.js","sourceRoot":"","sources":["../src/DocsPlugin.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAI3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,MAAM,OAAO,UAAU;IAIrB,YAAmB,OAA6B,EAAE,UAA6C;QAFxF,eAAU,GAAsC,SAAS,CAAC;QAG/D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,iBAAiB;QAC5B,IAAI,CAAC,OAAO,CAAC,YAAY,CACvB;YACE,QAAQ,EAAE,WAAW;YACrB,WAAW,EACT,mGAAmG;SACtG,EACD,IAAI,QAAQ,CAAC,IAAI,CAAC,CACnB,CAAC;IACJ,CAAC;CACF","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 type { IRushMcpPlugin, RushMcpPluginSession } from '@rushstack/mcp-server';\n\nimport { DocsTool } from './DocsTool';\n\nexport interface IDocsPluginConfigFile {}\n\nexport class DocsPlugin implements IRushMcpPlugin {\n public session: RushMcpPluginSession;\n public configFile: IDocsPluginConfigFile | undefined = undefined;\n\n public constructor(session: RushMcpPluginSession, configFile: IDocsPluginConfigFile | undefined) {\n this.session = session;\n this.configFile = configFile;\n }\n\n public async onInitializeAsync(): Promise<void> {\n this.session.registerTool(\n {\n toolName: 'rush_docs',\n description:\n 'Search and retrieve relevant sections from the official Rush documentation based on user queries.'\n },\n new DocsTool(this)\n );\n }\n}\n"]}
@@ -0,0 +1,41 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import path from 'node:path';
4
+ import { JsonFile } from '@rushstack/node-core-library';
5
+ export class DocsTool {
6
+ constructor(plugin) {
7
+ this.plugin = plugin;
8
+ this.session = plugin.session;
9
+ }
10
+ // ZOD relies on type inference generate a messy expression in the .d.ts file
11
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12
+ get schema() {
13
+ const zod = this.session.zod;
14
+ return zod.object({
15
+ userQuery: zod.string().describe('The user query to search for relevant documentation sections.')
16
+ });
17
+ }
18
+ // TODO: replace with Microsoft's service
19
+ _searchDocs(query) {
20
+ const startTime = Date.now();
21
+ const results = JsonFile.load(path.join(__dirname, './rush-doc-fragment.mock.json'));
22
+ return {
23
+ query,
24
+ results,
25
+ count: results.length,
26
+ searchTimeMs: Date.now() - startTime
27
+ };
28
+ }
29
+ async executeAsync({ userQuery }) {
30
+ const docSearchResult = this._searchDocs(userQuery);
31
+ return {
32
+ content: [
33
+ {
34
+ type: 'text',
35
+ text: docSearchResult.results.map((item) => item.text).join('\n\n')
36
+ }
37
+ ]
38
+ };
39
+ }
40
+ }
41
+ //# sourceMappingURL=DocsTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocsTool.js","sourceRoot":"","sources":["../src/DocsTool.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAcxD,MAAM,OAAO,QAAQ;IAInB,YAAmB,MAAkB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,6EAA6E;IAC7E,4EAA4E;IAC5E,IAAW,MAAM;QACf,MAAM,GAAG,GAAqB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;QAE/C,OAAO,GAAG,CAAC,MAAM,CAAC;YAChB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;SAClG,CAAC,CAAC;IACL,CAAC;IAED,yCAAyC;IACjC,WAAW,CAAC,KAAa;QAC/B,MAAM,SAAS,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;QAErC,MAAM,OAAO,GAA2B,QAAQ,CAAC,IAAI,CACnD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,+BAA+B,CAAC,CACtD,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,EAAuC;QAC1E,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","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 path from 'node:path';\n\nimport type { IRushMcpTool, RushMcpPluginSession, CallToolResult, zodModule } from '@rushstack/mcp-server';\nimport { JsonFile } from '@rushstack/node-core-library';\n\nimport type { DocsPlugin } from './DocsPlugin';\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 DocsTool implements IRushMcpTool<DocsTool['schema']> {\n public readonly plugin: DocsPlugin;\n public readonly session: RushMcpPluginSession;\n\n public constructor(plugin: DocsPlugin) {\n this.plugin = plugin;\n this.session = plugin.session;\n }\n\n // ZOD relies on type inference generate a messy expression in the .d.ts file\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n public get schema() {\n const zod: typeof zodModule = this.session.zod;\n\n return zod.object({\n userQuery: zod.string().describe('The user query to search for relevant documentation sections.')\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 }: zodModule.infer<DocsTool['schema']>): 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"]}
@@ -0,0 +1,8 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { DocsPlugin } from './DocsPlugin';
4
+ function createPlugin(session, configFile) {
5
+ return new DocsPlugin(session, configFile);
6
+ }
7
+ export default createPlugin;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAI3D,OAAO,EAAE,UAAU,EAA8B,MAAM,cAAc,CAAC;AAEtE,SAAS,YAAY,CACnB,OAA6B,EAC7B,UAA6C;IAE7C,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,eAAe,YAAkE,CAAC","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 type { RushMcpPluginSession, RushMcpPluginFactory } from '@rushstack/mcp-server';\n\nimport { DocsPlugin, type IDocsPluginConfigFile } from './DocsPlugin';\n\nfunction createPlugin(\n session: RushMcpPluginSession,\n configFile: IDocsPluginConfigFile | undefined\n): DocsPlugin {\n return new DocsPlugin(session, configFile);\n}\n\nexport default createPlugin satisfies RushMcpPluginFactory<IDocsPluginConfigFile>;\n"]}
@@ -0,0 +1,18 @@
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-mcp-docs-plugin",
3
- "version": "0.2.14",
3
+ "version": "0.3.1",
4
4
  "description": "Docs plugin for @rushstack/mcp-server",
5
5
  "repository": {
6
6
  "url": "https://github.com/microsoft/rushstack.git",
@@ -8,19 +8,43 @@
8
8
  "directory": "rush-plugins/rush-mcp-docs-plugin"
9
9
  },
10
10
  "homepage": "https://rushjs.io",
11
- "main": "lib/index.js",
12
- "types": "lib/index.d.ts",
11
+ "main": "./lib-commonjs/index.js",
12
+ "module": "./lib-esm/index.js",
13
+ "types": "./lib-dts/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./lib-dts/index.d.ts",
17
+ "node": "./lib-commonjs/index.js",
18
+ "import": "./lib-esm/index.js",
19
+ "require": "./lib-commonjs/index.js"
20
+ },
21
+ "./lib/*": {
22
+ "types": "./lib-dts/*.d.ts",
23
+ "node": "./lib-commonjs/*.js",
24
+ "import": "./lib-esm/*.js",
25
+ "require": "./lib-commonjs/*.js"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "typesVersions": {
30
+ "*": {
31
+ "lib/*": [
32
+ "lib-dts/*"
33
+ ]
34
+ }
35
+ },
13
36
  "license": "MIT",
14
37
  "dependencies": {
15
- "@rushstack/node-core-library": "5.19.1",
16
- "@rushstack/mcp-server": "0.3.14"
38
+ "@rushstack/node-core-library": "5.20.1",
39
+ "@rushstack/mcp-server": "0.4.1"
17
40
  },
18
41
  "devDependencies": {
19
42
  "eslint": "~9.37.0",
20
- "@rushstack/heft": "1.1.14",
21
- "local-node-rig": "1.0.0",
22
- "local-eslint-config": "1.0.0"
43
+ "@rushstack/heft": "1.2.1",
44
+ "local-eslint-config": "1.0.0",
45
+ "local-node-rig": "1.0.0"
23
46
  },
47
+ "sideEffects": false,
24
48
  "scripts": {
25
49
  "build": "heft build --clean",
26
50
  "_phase:build": "heft run --only build -- --clean",
@@ -15,10 +15,10 @@
15
15
  *
16
16
  * The config file path will be `<rush-repo>/common/config/rush-mcp/<plugin-name>.json`.
17
17
  */
18
- // "configFileSchema": "./lib/rush-mcp-example-plugin.schema.json",
18
+ // "configFileSchema": "./lib-commonjs/rush-mcp-example-plugin.schema.json",
19
19
 
20
20
  /**
21
21
  * The entry point, whose default export should be a class that implements
22
22
  */
23
- "entryPoint": "./lib/index.js"
23
+ "entryPoint": "./lib-commonjs/index.js"
24
24
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes