@eui/mcp 1.0.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.
Files changed (191) hide show
  1. package/README.md +846 -0
  2. package/dist/config/index.d.ts +6 -0
  3. package/dist/config/index.d.ts.map +1 -0
  4. package/dist/config/index.js +6 -0
  5. package/dist/config/index.js.map +1 -0
  6. package/dist/config/loader.d.ts +27 -0
  7. package/dist/config/loader.d.ts.map +1 -0
  8. package/dist/config/loader.js +224 -0
  9. package/dist/config/loader.js.map +1 -0
  10. package/dist/config/schema.d.ts +171 -0
  11. package/dist/config/schema.d.ts.map +1 -0
  12. package/dist/config/schema.js +100 -0
  13. package/dist/config/schema.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +45 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/loader/cache-manager.d.ts +74 -0
  19. package/dist/loader/cache-manager.d.ts.map +1 -0
  20. package/dist/loader/cache-manager.js +107 -0
  21. package/dist/loader/cache-manager.js.map +1 -0
  22. package/dist/loader/documentation-loader.d.ts +57 -0
  23. package/dist/loader/documentation-loader.d.ts.map +1 -0
  24. package/dist/loader/documentation-loader.js +81 -0
  25. package/dist/loader/documentation-loader.js.map +1 -0
  26. package/dist/loader/documentation-source.d.ts +37 -0
  27. package/dist/loader/documentation-source.d.ts.map +1 -0
  28. package/dist/loader/documentation-source.js +2 -0
  29. package/dist/loader/documentation-source.js.map +1 -0
  30. package/dist/loader/errors.d.ts +34 -0
  31. package/dist/loader/errors.d.ts.map +1 -0
  32. package/dist/loader/errors.js +65 -0
  33. package/dist/loader/errors.js.map +1 -0
  34. package/dist/loader/http-client.d.ts +43 -0
  35. package/dist/loader/http-client.d.ts.map +1 -0
  36. package/dist/loader/http-client.js +144 -0
  37. package/dist/loader/http-client.js.map +1 -0
  38. package/dist/loader/index.d.ts +6 -0
  39. package/dist/loader/index.d.ts.map +1 -0
  40. package/dist/loader/index.js +5 -0
  41. package/dist/loader/index.js.map +1 -0
  42. package/dist/loader/local-documentation-source.d.ts +62 -0
  43. package/dist/loader/local-documentation-source.d.ts.map +1 -0
  44. package/dist/loader/local-documentation-source.js +190 -0
  45. package/dist/loader/local-documentation-source.js.map +1 -0
  46. package/dist/loader/path-type-detector.d.ts +34 -0
  47. package/dist/loader/path-type-detector.d.ts.map +1 -0
  48. package/dist/loader/path-type-detector.js +78 -0
  49. package/dist/loader/path-type-detector.js.map +1 -0
  50. package/dist/loader/remote-documentation-source.d.ts +112 -0
  51. package/dist/loader/remote-documentation-source.d.ts.map +1 -0
  52. package/dist/loader/remote-documentation-source.js +252 -0
  53. package/dist/loader/remote-documentation-source.js.map +1 -0
  54. package/dist/main.d.ts +3 -0
  55. package/dist/main.d.ts.map +1 -0
  56. package/dist/main.js +211 -0
  57. package/dist/main.js.map +1 -0
  58. package/dist/mcp/index.d.ts +5 -0
  59. package/dist/mcp/index.d.ts.map +1 -0
  60. package/dist/mcp/index.js +5 -0
  61. package/dist/mcp/index.js.map +1 -0
  62. package/dist/mcp/server.d.ts +65 -0
  63. package/dist/mcp/server.d.ts.map +1 -0
  64. package/dist/mcp/server.js +224 -0
  65. package/dist/mcp/server.js.map +1 -0
  66. package/dist/publish/index.d.ts +8 -0
  67. package/dist/publish/index.d.ts.map +1 -0
  68. package/dist/publish/index.js +8 -0
  69. package/dist/publish/index.js.map +1 -0
  70. package/dist/publish/publish-utils.d.ts +74 -0
  71. package/dist/publish/publish-utils.d.ts.map +1 -0
  72. package/dist/publish/publish-utils.js +170 -0
  73. package/dist/publish/publish-utils.js.map +1 -0
  74. package/dist/query/component-query.d.ts +33 -0
  75. package/dist/query/component-query.d.ts.map +1 -0
  76. package/dist/query/component-query.js +63 -0
  77. package/dist/query/component-query.js.map +1 -0
  78. package/dist/query/index-builder.d.ts +79 -0
  79. package/dist/query/index-builder.d.ts.map +1 -0
  80. package/dist/query/index-builder.js +217 -0
  81. package/dist/query/index-builder.js.map +1 -0
  82. package/dist/query/index.d.ts +5 -0
  83. package/dist/query/index.d.ts.map +1 -0
  84. package/dist/query/index.js +6 -0
  85. package/dist/query/index.js.map +1 -0
  86. package/dist/query/result-formatter.d.ts +108 -0
  87. package/dist/query/result-formatter.d.ts.map +1 -0
  88. package/dist/query/result-formatter.js +165 -0
  89. package/dist/query/result-formatter.js.map +1 -0
  90. package/dist/query/search-engine.d.ts +54 -0
  91. package/dist/query/search-engine.d.ts.map +1 -0
  92. package/dist/query/search-engine.js +178 -0
  93. package/dist/query/search-engine.js.map +1 -0
  94. package/dist/test-error.ts +1 -0
  95. package/dist/tools/get-component-docs.d.ts +43 -0
  96. package/dist/tools/get-component-docs.d.ts.map +1 -0
  97. package/dist/tools/get-component-docs.js +55 -0
  98. package/dist/tools/get-component-docs.js.map +1 -0
  99. package/dist/tools/get-component-examples.d.ts +45 -0
  100. package/dist/tools/get-component-examples.d.ts.map +1 -0
  101. package/dist/tools/get-component-examples.js +56 -0
  102. package/dist/tools/get-component-examples.js.map +1 -0
  103. package/dist/tools/get-component-inputs.d.ts +44 -0
  104. package/dist/tools/get-component-inputs.d.ts.map +1 -0
  105. package/dist/tools/get-component-inputs.js +55 -0
  106. package/dist/tools/get-component-inputs.js.map +1 -0
  107. package/dist/tools/get-component-outputs.d.ts +44 -0
  108. package/dist/tools/get-component-outputs.d.ts.map +1 -0
  109. package/dist/tools/get-component-outputs.js +55 -0
  110. package/dist/tools/get-component-outputs.js.map +1 -0
  111. package/dist/tools/index.d.ts +7 -0
  112. package/dist/tools/index.d.ts.map +1 -0
  113. package/dist/tools/index.js +8 -0
  114. package/dist/tools/index.js.map +1 -0
  115. package/dist/tools/list-components.d.ts +69 -0
  116. package/dist/tools/list-components.d.ts.map +1 -0
  117. package/dist/tools/list-components.js +84 -0
  118. package/dist/tools/list-components.js.map +1 -0
  119. package/dist/tools/search-components.d.ts +69 -0
  120. package/dist/tools/search-components.d.ts.map +1 -0
  121. package/dist/tools/search-components.js +98 -0
  122. package/dist/tools/search-components.js.map +1 -0
  123. package/dist/types/compodoc.d.ts +261 -0
  124. package/dist/types/compodoc.d.ts.map +1 -0
  125. package/dist/types/compodoc.js +5 -0
  126. package/dist/types/compodoc.js.map +1 -0
  127. package/dist/types/index.d.ts +5 -0
  128. package/dist/types/index.d.ts.map +1 -0
  129. package/dist/types/index.js +5 -0
  130. package/dist/types/index.js.map +1 -0
  131. package/dist/utils/circuit-breaker.d.ts +91 -0
  132. package/dist/utils/circuit-breaker.d.ts.map +1 -0
  133. package/dist/utils/circuit-breaker.js +186 -0
  134. package/dist/utils/circuit-breaker.js.map +1 -0
  135. package/dist/utils/credential-masking.d.ts +90 -0
  136. package/dist/utils/credential-masking.d.ts.map +1 -0
  137. package/dist/utils/credential-masking.js +202 -0
  138. package/dist/utils/credential-masking.js.map +1 -0
  139. package/dist/utils/error-handler.d.ts +68 -0
  140. package/dist/utils/error-handler.d.ts.map +1 -0
  141. package/dist/utils/error-handler.js +184 -0
  142. package/dist/utils/error-handler.js.map +1 -0
  143. package/dist/utils/errors.d.ts +156 -0
  144. package/dist/utils/errors.d.ts.map +1 -0
  145. package/dist/utils/errors.js +242 -0
  146. package/dist/utils/errors.js.map +1 -0
  147. package/dist/utils/index.d.ts +10 -0
  148. package/dist/utils/index.d.ts.map +1 -0
  149. package/dist/utils/index.js +16 -0
  150. package/dist/utils/index.js.map +1 -0
  151. package/dist/utils/logger.d.ts +76 -0
  152. package/dist/utils/logger.d.ts.map +1 -0
  153. package/dist/utils/logger.js +150 -0
  154. package/dist/utils/logger.js.map +1 -0
  155. package/dist/utils/retry.d.ts +19 -0
  156. package/dist/utils/retry.d.ts.map +1 -0
  157. package/dist/utils/retry.js +81 -0
  158. package/dist/utils/retry.js.map +1 -0
  159. package/dist/version/changelog-file-utils.d.ts +69 -0
  160. package/dist/version/changelog-file-utils.d.ts.map +1 -0
  161. package/dist/version/changelog-file-utils.js +161 -0
  162. package/dist/version/changelog-file-utils.js.map +1 -0
  163. package/dist/version/changelog-utils.d.ts +98 -0
  164. package/dist/version/changelog-utils.d.ts.map +1 -0
  165. package/dist/version/changelog-utils.js +198 -0
  166. package/dist/version/changelog-utils.js.map +1 -0
  167. package/dist/version/dry-run-utils.d.ts +108 -0
  168. package/dist/version/dry-run-utils.d.ts.map +1 -0
  169. package/dist/version/dry-run-utils.js +126 -0
  170. package/dist/version/dry-run-utils.js.map +1 -0
  171. package/dist/version/git-tag-utils.d.ts +50 -0
  172. package/dist/version/git-tag-utils.d.ts.map +1 -0
  173. package/dist/version/git-tag-utils.js +66 -0
  174. package/dist/version/git-tag-utils.js.map +1 -0
  175. package/dist/version/index.d.ts +11 -0
  176. package/dist/version/index.d.ts.map +1 -0
  177. package/dist/version/index.js +11 -0
  178. package/dist/version/index.js.map +1 -0
  179. package/dist/version/release-utils.d.ts +94 -0
  180. package/dist/version/release-utils.d.ts.map +1 -0
  181. package/dist/version/release-utils.js +170 -0
  182. package/dist/version/release-utils.js.map +1 -0
  183. package/dist/version/rollback-utils.d.ts +47 -0
  184. package/dist/version/rollback-utils.d.ts.map +1 -0
  185. package/dist/version/rollback-utils.js +73 -0
  186. package/dist/version/rollback-utils.js.map +1 -0
  187. package/dist/version/version-manager.d.ts +98 -0
  188. package/dist/version/version-manager.d.ts.map +1 -0
  189. package/dist/version/version-manager.js +158 -0
  190. package/dist/version/version-manager.js.map +1 -0
  191. package/package.json +61 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GetComponentOutputsTool class
3
+ * Handles retrieving component output events
4
+ */
5
+ export class GetComponentOutputsTool {
6
+ query;
7
+ formatter;
8
+ constructor(query, formatter) {
9
+ this.query = query;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the get-component-outputs tool
14
+ */
15
+ execute(params) {
16
+ const { name } = params;
17
+ // Validate parameters
18
+ if (!name || typeof name !== 'string' || name.trim().length === 0) {
19
+ throw new Error('Component name is required and must be a non-empty string');
20
+ }
21
+ // Look up component by name
22
+ const doc = this.query.getByName(name.trim());
23
+ // Handle not found
24
+ if (!doc) {
25
+ throw new Error(`Component "${name}" not found in documentation`);
26
+ }
27
+ // Extract and format output events
28
+ const outputs = this.formatter.formatOutputs(doc);
29
+ return {
30
+ componentName: doc.name,
31
+ outputs,
32
+ };
33
+ }
34
+ /**
35
+ * Get the tool definition for MCP registration
36
+ */
37
+ static getToolDefinition() {
38
+ return {
39
+ name: 'get-component-outputs',
40
+ description: 'Retrieves all output events for a specific component, directive, pipe, or service by name. ' +
41
+ 'Returns detailed information about each output including name, type, and description.',
42
+ inputSchema: {
43
+ type: 'object',
44
+ properties: {
45
+ name: {
46
+ type: 'string',
47
+ description: 'The name of the component, directive, pipe, or service',
48
+ },
49
+ },
50
+ required: ['name'],
51
+ },
52
+ };
53
+ }
54
+ }
55
+ //# sourceMappingURL=get-component-outputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-outputs.js","sourceRoot":"","sources":["../../src/tools/get-component-outputs.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAC1B,KAAK,CAAiB;IACtB,SAAS,CAAkB;IAEnC,YAAY,KAAqB,EAAE,SAA0B;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,MAAiC;QACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QAExB,sBAAsB;QACtB,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;QAC/E,CAAC;QAED,4BAA4B;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAE9C,mBAAmB;QACnB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,8BAA8B,CAAC,CAAC;QACpE,CAAC;QAED,mCAAmC;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAElD,OAAO;YACL,aAAa,EAAE,GAAG,CAAC,IAAI;YACvB,OAAO;SACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACtB,OAAO;YACL,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EACT,6FAA6F;gBAC7F,uFAAuF;YACzF,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,wDAAwD;qBACtE;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ export { ListComponentsTool, ListComponentsParams, ListComponentsResult, } from './list-components.js';
2
+ export { GetComponentDocsTool, GetComponentDocsParams, GetComponentDocsResult, } from './get-component-docs.js';
3
+ export { SearchComponentsTool, SearchComponentsParams, SearchComponentsResult, } from './search-components.js';
4
+ export { GetComponentInputsTool, GetComponentInputsParams, GetComponentInputsResult, } from './get-component-inputs.js';
5
+ export { GetComponentOutputsTool, GetComponentOutputsParams, GetComponentOutputsResult, } from './get-component-outputs.js';
6
+ export { GetComponentExamplesTool, GetComponentExamplesParams, GetComponentExamplesResult, } from './get-component-examples.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,8 @@
1
+ // Tool handlers exports
2
+ export { ListComponentsTool, } from './list-components.js';
3
+ export { GetComponentDocsTool, } from './get-component-docs.js';
4
+ export { SearchComponentsTool, } from './search-components.js';
5
+ export { GetComponentInputsTool, } from './get-component-inputs.js';
6
+ export { GetComponentOutputsTool, } from './get-component-outputs.js';
7
+ export { GetComponentExamplesTool, } from './get-component-examples.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EACL,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,GAGrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,oBAAoB,GAGrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,sBAAsB,GAGvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,uBAAuB,GAGxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,wBAAwB,GAGzB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * list-components tool handler
3
+ * Lists all available components with basic information
4
+ */
5
+ import { ComponentQuery } from '../query/component-query.js';
6
+ import { ResultFormatter, ComponentSummary } from '../query/result-formatter.js';
7
+ export interface ListComponentsParams {
8
+ includeDeprecated?: boolean;
9
+ type?: 'component' | 'directive' | 'pipe' | 'service' | 'all';
10
+ limit?: number;
11
+ offset?: number;
12
+ }
13
+ export interface ListComponentsResult {
14
+ items: ComponentSummary[];
15
+ total: number;
16
+ hasMore: boolean;
17
+ offset: number;
18
+ limit: number;
19
+ }
20
+ /**
21
+ * ListComponentsTool class
22
+ * Handles listing components with filtering and pagination
23
+ */
24
+ export declare class ListComponentsTool {
25
+ private query;
26
+ private formatter;
27
+ constructor(query: ComponentQuery, formatter: ResultFormatter);
28
+ /**
29
+ * Execute the list-components tool
30
+ */
31
+ execute(params?: ListComponentsParams): ListComponentsResult;
32
+ /**
33
+ * Get the tool definition for MCP registration
34
+ */
35
+ static getToolDefinition(): {
36
+ name: string;
37
+ description: string;
38
+ inputSchema: {
39
+ type: string;
40
+ properties: {
41
+ includeDeprecated: {
42
+ type: string;
43
+ description: string;
44
+ default: boolean;
45
+ };
46
+ type: {
47
+ type: string;
48
+ enum: string[];
49
+ description: string;
50
+ default: string;
51
+ };
52
+ limit: {
53
+ type: string;
54
+ description: string;
55
+ default: number;
56
+ minimum: number;
57
+ maximum: number;
58
+ };
59
+ offset: {
60
+ type: string;
61
+ description: string;
62
+ default: number;
63
+ minimum: number;
64
+ };
65
+ };
66
+ };
67
+ };
68
+ }
69
+ //# sourceMappingURL=list-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-components.d.ts","sourceRoot":"","sources":["../../src/tools/list-components.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEjF,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAkB;gBAEvB,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe;IAK7D;;OAEG;IACH,OAAO,CAAC,MAAM,GAAE,oBAAyB,GAAG,oBAAoB;IA0ChE;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCzB"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * ListComponentsTool class
3
+ * Handles listing components with filtering and pagination
4
+ */
5
+ export class ListComponentsTool {
6
+ query;
7
+ formatter;
8
+ constructor(query, formatter) {
9
+ this.query = query;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the list-components tool
14
+ */
15
+ execute(params = {}) {
16
+ const { includeDeprecated = false, type = 'all', limit = 50, offset = 0, } = params;
17
+ // Validate parameters
18
+ if (limit < 1 || limit > 1000) {
19
+ throw new Error('Limit must be between 1 and 1000');
20
+ }
21
+ if (offset < 0) {
22
+ throw new Error('Offset must be non-negative');
23
+ }
24
+ // Get components by type
25
+ const allComponents = this.query.getByType(type);
26
+ // Filter deprecated if needed
27
+ const filteredComponents = includeDeprecated
28
+ ? allComponents
29
+ : allComponents.filter((doc) => !doc.deprecated);
30
+ // Apply pagination
31
+ const total = filteredComponents.length;
32
+ const paginatedComponents = filteredComponents.slice(offset, offset + limit);
33
+ const hasMore = offset + limit < total;
34
+ // Format results
35
+ const items = this.formatter.formatList(paginatedComponents, true); // Already filtered, so pass true
36
+ return {
37
+ items,
38
+ total,
39
+ hasMore,
40
+ offset,
41
+ limit,
42
+ };
43
+ }
44
+ /**
45
+ * Get the tool definition for MCP registration
46
+ */
47
+ static getToolDefinition() {
48
+ return {
49
+ name: 'list-components',
50
+ description: 'Lists all available components, directives, pipes, and services from the EUI component library. ' +
51
+ 'Supports filtering by type and deprecated status, with pagination for large result sets.',
52
+ inputSchema: {
53
+ type: 'object',
54
+ properties: {
55
+ includeDeprecated: {
56
+ type: 'boolean',
57
+ description: 'Whether to include deprecated components in the results (default: false)',
58
+ default: false,
59
+ },
60
+ type: {
61
+ type: 'string',
62
+ enum: ['component', 'directive', 'pipe', 'service', 'all'],
63
+ description: 'Filter by type (default: all)',
64
+ default: 'all',
65
+ },
66
+ limit: {
67
+ type: 'number',
68
+ description: 'Maximum number of results to return (default: 50, max: 1000)',
69
+ default: 50,
70
+ minimum: 1,
71
+ maximum: 1000,
72
+ },
73
+ offset: {
74
+ type: 'number',
75
+ description: 'Number of results to skip for pagination (default: 0)',
76
+ default: 0,
77
+ minimum: 0,
78
+ },
79
+ },
80
+ },
81
+ };
82
+ }
83
+ }
84
+ //# sourceMappingURL=list-components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-components.js","sourceRoot":"","sources":["../../src/tools/list-components.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IACrB,KAAK,CAAiB;IACtB,SAAS,CAAkB;IAEnC,YAAY,KAAqB,EAAE,SAA0B;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,SAA+B,EAAE;QACvC,MAAM,EACJ,iBAAiB,GAAG,KAAK,EACzB,IAAI,GAAG,KAAK,EACZ,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,CAAC,GACX,GAAG,MAAM,CAAC;QAEX,sBAAsB;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AI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC;wBAC1D,WAAW,EAAE,+BAA+B;wBAC5C,OAAO,EAAE,KAAK;qBACf;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8DAA8D;wBAC3E,OAAO,EAAE,EAAE;wBACX,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,IAAI;qBACd;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,uDAAuD;wBACpE,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,CAAC;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * search-components tool handler
3
+ * Searches for components by keyword or functionality
4
+ */
5
+ import { SearchEngine } from '../query/search-engine.js';
6
+ import { ResultFormatter, SearchResultSummary } from '../query/result-formatter.js';
7
+ export interface SearchComponentsParams {
8
+ query: string;
9
+ types?: Array<'component' | 'directive' | 'pipe' | 'service'>;
10
+ includeDeprecated?: boolean;
11
+ limit?: number;
12
+ }
13
+ export interface SearchComponentsResult {
14
+ items: SearchResultSummary[];
15
+ total: number;
16
+ hasMore: boolean;
17
+ query: string;
18
+ }
19
+ /**
20
+ * SearchComponentsTool class
21
+ * Handles searching components with relevance scoring and ranking
22
+ */
23
+ export declare class SearchComponentsTool {
24
+ private searchEngine;
25
+ private formatter;
26
+ constructor(searchEngine: SearchEngine, formatter: ResultFormatter);
27
+ /**
28
+ * Execute the search-components tool
29
+ */
30
+ execute(params: SearchComponentsParams): SearchComponentsResult;
31
+ /**
32
+ * Get the tool definition for MCP registration
33
+ */
34
+ static getToolDefinition(): {
35
+ name: string;
36
+ description: string;
37
+ inputSchema: {
38
+ type: string;
39
+ properties: {
40
+ query: {
41
+ type: string;
42
+ description: string;
43
+ };
44
+ types: {
45
+ type: string;
46
+ items: {
47
+ type: string;
48
+ enum: string[];
49
+ };
50
+ description: string;
51
+ };
52
+ includeDeprecated: {
53
+ type: string;
54
+ description: string;
55
+ default: boolean;
56
+ };
57
+ limit: {
58
+ type: string;
59
+ description: string;
60
+ default: number;
61
+ minimum: number;
62
+ maximum: number;
63
+ };
64
+ };
65
+ required: string[];
66
+ };
67
+ };
68
+ }
69
+ //# sourceMappingURL=search-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-components.d.ts","sourceRoot":"","sources":["../../src/tools/search-components.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAiB,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEpF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,SAAS,CAAkB;gBAEvB,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe;IAKlE;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,sBAAsB;IAoD/D;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCzB"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * SearchComponentsTool class
3
+ * Handles searching components with relevance scoring and ranking
4
+ */
5
+ export class SearchComponentsTool {
6
+ searchEngine;
7
+ formatter;
8
+ constructor(searchEngine, formatter) {
9
+ this.searchEngine = searchEngine;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the search-components tool
14
+ */
15
+ execute(params) {
16
+ const { query, types, includeDeprecated = false, limit = 50 } = params;
17
+ // Validate parameters
18
+ if (query === null || query === undefined || typeof query !== 'string') {
19
+ throw new Error('Query is required and must be a string');
20
+ }
21
+ const trimmedQuery = query.trim();
22
+ if (trimmedQuery.length === 0) {
23
+ throw new Error('Query cannot be empty');
24
+ }
25
+ if (limit < 1 || limit > 1000) {
26
+ throw new Error('Limit must be between 1 and 1000');
27
+ }
28
+ // Validate types if provided
29
+ if (types && types.length > 0) {
30
+ const validTypes = ['component', 'directive', 'pipe', 'service'];
31
+ for (const type of types) {
32
+ if (!validTypes.includes(type)) {
33
+ throw new Error(`Invalid type "${type}". Must be one of: ${validTypes.join(', ')}`);
34
+ }
35
+ }
36
+ }
37
+ // Build search options
38
+ const searchOptions = {
39
+ query: trimmedQuery,
40
+ types,
41
+ includeDeprecated,
42
+ limit,
43
+ offset: 0, // Search doesn't support offset, only limit
44
+ };
45
+ // Execute search
46
+ const searchResult = this.searchEngine.search(searchOptions);
47
+ // Format results
48
+ const items = this.formatter.formatSearchResults(searchResult.items);
49
+ return {
50
+ items,
51
+ total: searchResult.total,
52
+ hasMore: searchResult.hasMore,
53
+ query: trimmedQuery,
54
+ };
55
+ }
56
+ /**
57
+ * Get the tool definition for MCP registration
58
+ */
59
+ static getToolDefinition() {
60
+ return {
61
+ name: 'search-components',
62
+ description: 'Searches for components, directives, pipes, and services by keyword or functionality. ' +
63
+ 'Returns results ranked by relevance, matching against component names, selectors, descriptions, ' +
64
+ 'inputs, outputs, and methods. Supports filtering by type and deprecated status.',
65
+ inputSchema: {
66
+ type: 'object',
67
+ properties: {
68
+ query: {
69
+ type: 'string',
70
+ description: 'Search query to match against component metadata',
71
+ },
72
+ types: {
73
+ type: 'array',
74
+ items: {
75
+ type: 'string',
76
+ enum: ['component', 'directive', 'pipe', 'service'],
77
+ },
78
+ description: 'Filter results by type (optional). If not specified, searches all types.',
79
+ },
80
+ includeDeprecated: {
81
+ type: 'boolean',
82
+ description: 'Whether to include deprecated components in results (default: false)',
83
+ default: false,
84
+ },
85
+ limit: {
86
+ type: 'number',
87
+ description: 'Maximum number of results to return (default: 50, max: 1000)',
88
+ default: 50,
89
+ minimum: 1,
90
+ maximum: 1000,
91
+ },
92
+ },
93
+ required: ['query'],
94
+ },
95
+ };
96
+ }
97
+ }
98
+ //# sourceMappingURL=search-components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-components.js","sourceRoot":"","sources":["../../src/tools/search-components.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACvB,YAAY,CAAe;IAC3B,SAAS,CAAkB;IAEnC,YAAY,YAA0B,EAAE,SAA0B;QAChE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,MAA8B;QACpC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,GAAG,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;QAEvE,sBAAsB;QACtB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QAED,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAClC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI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