@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,54 @@
1
+ /**
2
+ * SearchEngine - Implements search and relevance scoring
3
+ */
4
+ import { ComponentIndex, IndexableDoc } from './index-builder.js';
5
+ export interface SearchOptions {
6
+ query: string;
7
+ types?: Array<'component' | 'directive' | 'pipe' | 'service'>;
8
+ includeDeprecated?: boolean;
9
+ limit?: number;
10
+ offset?: number;
11
+ }
12
+ export interface SearchResultItem {
13
+ doc: IndexableDoc;
14
+ relevanceScore: number;
15
+ }
16
+ export interface SearchResult {
17
+ items: SearchResultItem[];
18
+ total: number;
19
+ hasMore: boolean;
20
+ }
21
+ /**
22
+ * SearchEngine class
23
+ * Implements search with relevance scoring and ranking
24
+ */
25
+ export declare class SearchEngine {
26
+ private index;
27
+ constructor(index: ComponentIndex);
28
+ /**
29
+ * Search for components matching the query
30
+ */
31
+ search(options: SearchOptions): SearchResult;
32
+ /**
33
+ * Get candidate documents for search
34
+ * Uses the inverted index to find documents containing query words
35
+ */
36
+ private getCandidates;
37
+ /**
38
+ * Calculate relevance score for a document
39
+ * Based on the design document's scoring algorithm:
40
+ * - Exact name match: 100 points
41
+ * - Selector match: 80 points
42
+ * - Name starts with query: 60 points
43
+ * - Description contains query: 40 points
44
+ * - Input/output name match: 30 points
45
+ * - Method name match: 20 points
46
+ * - Deprecated penalty: 50% reduction
47
+ */
48
+ private calculateRelevanceScore;
49
+ /**
50
+ * Update the index
51
+ */
52
+ updateIndex(index: ComponentIndex): void;
53
+ }
54
+ //# sourceMappingURL=search-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-engine.d.ts","sourceRoot":"","sources":["../../src/query/search-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,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;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,YAAY,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAiB;gBAElB,KAAK,EAAE,cAAc;IAIjC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY;IAoD5C;;;OAGG;IACH,OAAO,CAAC,aAAa;IAkDrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uBAAuB;IA4E/B;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;CAGzC"}
@@ -0,0 +1,178 @@
1
+ /**
2
+ * SearchEngine class
3
+ * Implements search with relevance scoring and ranking
4
+ */
5
+ export class SearchEngine {
6
+ index;
7
+ constructor(index) {
8
+ this.index = index;
9
+ }
10
+ /**
11
+ * Search for components matching the query
12
+ */
13
+ search(options) {
14
+ const { query, types, includeDeprecated = false, limit = 50, offset = 0, } = options;
15
+ // Normalize query to lowercase for case-insensitive search
16
+ const normalizedQuery = query.toLowerCase().trim();
17
+ if (normalizedQuery.length === 0) {
18
+ return {
19
+ items: [],
20
+ total: 0,
21
+ hasMore: false,
22
+ };
23
+ }
24
+ // Get candidate documents
25
+ const candidates = this.getCandidates(normalizedQuery, types);
26
+ // Score and filter candidates
27
+ const scoredResults = [];
28
+ for (const doc of candidates) {
29
+ // Skip deprecated if not included
30
+ if (!includeDeprecated && doc.deprecated) {
31
+ continue;
32
+ }
33
+ const score = this.calculateRelevanceScore(doc, normalizedQuery);
34
+ if (score > 0) {
35
+ scoredResults.push({ doc, relevanceScore: score });
36
+ }
37
+ }
38
+ // Sort by relevance score (descending)
39
+ scoredResults.sort((a, b) => b.relevanceScore - a.relevanceScore);
40
+ // Apply pagination
41
+ const total = scoredResults.length;
42
+ const paginatedItems = scoredResults.slice(offset, offset + limit);
43
+ const hasMore = offset + limit < total;
44
+ return {
45
+ items: paginatedItems,
46
+ total,
47
+ hasMore,
48
+ };
49
+ }
50
+ /**
51
+ * Get candidate documents for search
52
+ * Uses the inverted index to find documents containing query words
53
+ */
54
+ getCandidates(normalizedQuery, types) {
55
+ // Extract words from query
56
+ const queryWords = normalizedQuery
57
+ .split(/[^a-z0-9]+/)
58
+ .filter((word) => word.length > 0);
59
+ // Find all documents that contain any query word
60
+ const candidateNames = new Set();
61
+ for (const word of queryWords) {
62
+ // Check for exact word match
63
+ if (this.index.searchIndex.has(word)) {
64
+ const names = this.index.searchIndex.get(word);
65
+ for (const name of names) {
66
+ candidateNames.add(name);
67
+ }
68
+ }
69
+ // Check for partial word matches (word starts with query word)
70
+ for (const [indexWord, names] of this.index.searchIndex.entries()) {
71
+ if (indexWord.startsWith(word)) {
72
+ for (const name of names) {
73
+ candidateNames.add(name);
74
+ }
75
+ }
76
+ }
77
+ }
78
+ // Convert names to documents
79
+ const candidates = [];
80
+ for (const name of candidateNames) {
81
+ const doc = this.index.byName.get(name);
82
+ if (doc) {
83
+ // Filter by type if specified
84
+ if (types && types.length > 0) {
85
+ if (types.includes(doc.type)) {
86
+ candidates.push(doc);
87
+ }
88
+ }
89
+ else {
90
+ candidates.push(doc);
91
+ }
92
+ }
93
+ }
94
+ return candidates;
95
+ }
96
+ /**
97
+ * Calculate relevance score for a document
98
+ * Based on the design document's scoring algorithm:
99
+ * - Exact name match: 100 points
100
+ * - Selector match: 80 points
101
+ * - Name starts with query: 60 points
102
+ * - Description contains query: 40 points
103
+ * - Input/output name match: 30 points
104
+ * - Method name match: 20 points
105
+ * - Deprecated penalty: 50% reduction
106
+ */
107
+ calculateRelevanceScore(doc, normalizedQuery) {
108
+ let score = 0;
109
+ const nameLower = doc.name.toLowerCase();
110
+ // Exact name match: 100 points
111
+ if (nameLower === normalizedQuery) {
112
+ score += 100;
113
+ }
114
+ // Selector match: 80 points
115
+ if ('selector' in doc && doc.selector) {
116
+ const selectorLower = doc.selector.toLowerCase();
117
+ if (selectorLower === normalizedQuery || selectorLower.includes(normalizedQuery)) {
118
+ score += 80;
119
+ }
120
+ }
121
+ // Name starts with query: 60 points
122
+ if (nameLower.startsWith(normalizedQuery)) {
123
+ score += 60;
124
+ }
125
+ // Name contains query (but doesn't start with it): 30 points
126
+ if (!nameLower.startsWith(normalizedQuery) && nameLower.includes(normalizedQuery)) {
127
+ score += 30;
128
+ }
129
+ // Description contains query: 40 points
130
+ if (doc.description) {
131
+ const descriptionLower = doc.description.toLowerCase();
132
+ if (descriptionLower.includes(normalizedQuery)) {
133
+ score += 40;
134
+ }
135
+ }
136
+ // Input/output name match: 30 points
137
+ if ('inputs' in doc && doc.inputs) {
138
+ for (const input of doc.inputs) {
139
+ const inputNameLower = input.name.toLowerCase();
140
+ if (inputNameLower.includes(normalizedQuery)) {
141
+ score += 30;
142
+ break; // Only count once
143
+ }
144
+ }
145
+ }
146
+ if ('outputs' in doc && doc.outputs) {
147
+ for (const output of doc.outputs) {
148
+ const outputNameLower = output.name.toLowerCase();
149
+ if (outputNameLower.includes(normalizedQuery)) {
150
+ score += 30;
151
+ break; // Only count once
152
+ }
153
+ }
154
+ }
155
+ // Method name match: 20 points
156
+ if ('methods' in doc && doc.methods) {
157
+ for (const method of doc.methods) {
158
+ const methodNameLower = method.name.toLowerCase();
159
+ if (methodNameLower.includes(normalizedQuery)) {
160
+ score += 20;
161
+ break; // Only count once
162
+ }
163
+ }
164
+ }
165
+ // Deprecated penalty: 50% reduction
166
+ if (doc.deprecated) {
167
+ score = Math.floor(score * 0.5);
168
+ }
169
+ return score;
170
+ }
171
+ /**
172
+ * Update the index
173
+ */
174
+ updateIndex(index) {
175
+ this.index = index;
176
+ }
177
+ }
178
+ //# sourceMappingURL=search-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-engine.js","sourceRoot":"","sources":["../../src/query/search-engine.ts"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,MAAM,OAAO,YAAY;IACf,KAAK,CAAiB;IAE9B,YAAY,KAAqB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAsB;QAC3B,MAAM,EACJ,KAAK,EACL,KAAK,EAC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,EAAE,CAAC;oBAC9C,KAAK,IAAI,EAAE,CAAC;oBACZ,MAAM,CAAC,kBAAkB;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,oCAAoC;QACpC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YACnB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,KAAqB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ const test: string = 123;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * get-component-docs tool handler
3
+ * Retrieves detailed documentation for a specific component
4
+ */
5
+ import { ComponentQuery } from '../query/component-query.js';
6
+ import { ResultFormatter, ComponentDetails } from '../query/result-formatter.js';
7
+ export interface GetComponentDocsParams {
8
+ name: string;
9
+ }
10
+ export interface GetComponentDocsResult {
11
+ component: ComponentDetails;
12
+ }
13
+ /**
14
+ * GetComponentDocsTool class
15
+ * Handles retrieving detailed component documentation
16
+ */
17
+ export declare class GetComponentDocsTool {
18
+ private query;
19
+ private formatter;
20
+ constructor(query: ComponentQuery, formatter: ResultFormatter);
21
+ /**
22
+ * Execute the get-component-docs tool
23
+ */
24
+ execute(params: GetComponentDocsParams): GetComponentDocsResult;
25
+ /**
26
+ * Get the tool definition for MCP registration
27
+ */
28
+ static getToolDefinition(): {
29
+ name: string;
30
+ description: string;
31
+ inputSchema: {
32
+ type: string;
33
+ properties: {
34
+ name: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ };
39
+ required: string[];
40
+ };
41
+ };
42
+ }
43
+ //# sourceMappingURL=get-component-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-docs.d.ts","sourceRoot":"","sources":["../../src/tools/get-component-docs.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,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAkB;gBAEvB,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe;IAK7D;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,sBAAsB,GAAG,sBAAsB;IAwB/D;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;CAmBzB"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GetComponentDocsTool class
3
+ * Handles retrieving detailed component documentation
4
+ */
5
+ export class GetComponentDocsTool {
6
+ query;
7
+ formatter;
8
+ constructor(query, formatter) {
9
+ this.query = query;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the get-component-docs 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
+ // Format detailed response
28
+ const component = this.formatter.formatDetails(doc);
29
+ return {
30
+ component,
31
+ };
32
+ }
33
+ /**
34
+ * Get the tool definition for MCP registration
35
+ */
36
+ static getToolDefinition() {
37
+ return {
38
+ name: 'get-component-docs',
39
+ description: 'Retrieves detailed documentation for a specific component, directive, pipe, or service by name. ' +
40
+ 'Returns complete metadata including inputs, outputs, methods, examples, selector information, ' +
41
+ 'standalone flag, and module import requirements.',
42
+ inputSchema: {
43
+ type: 'object',
44
+ properties: {
45
+ name: {
46
+ type: 'string',
47
+ description: 'The name of the component, directive, pipe, or service to retrieve',
48
+ },
49
+ },
50
+ required: ['name'],
51
+ },
52
+ };
53
+ }
54
+ }
55
+ //# sourceMappingURL=get-component-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-docs.js","sourceRoot":"","sources":["../../src/tools/get-component-docs.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACvB,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,MAA8B;QACpC,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,2BAA2B;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAEpD,OAAO;YACL,SAAS;SACV,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACtB,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EACT,kGAAkG;gBAClG,gGAAgG;gBAChG,kDAAkD;YACpD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,oEAAoE;qBAClF;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * get-component-examples tool handler
3
+ * Retrieves usage examples for a specific component
4
+ */
5
+ import { ComponentQuery } from '../query/component-query.js';
6
+ import { ResultFormatter } from '../query/result-formatter.js';
7
+ import { ExampleDoc } from '../types/compodoc.js';
8
+ export interface GetComponentExamplesParams {
9
+ name: string;
10
+ }
11
+ export interface GetComponentExamplesResult {
12
+ componentName: string;
13
+ examples: ExampleDoc[];
14
+ }
15
+ /**
16
+ * GetComponentExamplesTool class
17
+ * Handles retrieving component usage examples
18
+ */
19
+ export declare class GetComponentExamplesTool {
20
+ private query;
21
+ private formatter;
22
+ constructor(query: ComponentQuery, formatter: ResultFormatter);
23
+ /**
24
+ * Execute the get-component-examples tool
25
+ */
26
+ execute(params: GetComponentExamplesParams): GetComponentExamplesResult;
27
+ /**
28
+ * Get the tool definition for MCP registration
29
+ */
30
+ static getToolDefinition(): {
31
+ name: string;
32
+ description: string;
33
+ inputSchema: {
34
+ type: string;
35
+ properties: {
36
+ name: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ };
41
+ required: string[];
42
+ };
43
+ };
44
+ }
45
+ //# sourceMappingURL=get-component-examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-examples.d.ts","sourceRoot":"","sources":["../../src/tools/get-component-examples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAkB;gBAEvB,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe;IAK7D;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,0BAA0B,GAAG,0BAA0B;IAyBvE;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;CAmBzB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * GetComponentExamplesTool class
3
+ * Handles retrieving component usage examples
4
+ */
5
+ export class GetComponentExamplesTool {
6
+ query;
7
+ formatter;
8
+ constructor(query, formatter) {
9
+ this.query = query;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the get-component-examples 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 examples
28
+ const examples = this.formatter.formatExamples(doc);
29
+ return {
30
+ componentName: doc.name,
31
+ examples,
32
+ };
33
+ }
34
+ /**
35
+ * Get the tool definition for MCP registration
36
+ */
37
+ static getToolDefinition() {
38
+ return {
39
+ name: 'get-component-examples',
40
+ description: 'Retrieves all usage examples for a specific component, directive, pipe, or service by name. ' +
41
+ 'Returns code examples with HTML templates and TypeScript code, preserving formatting. ' +
42
+ 'Returns an empty array if no examples are available.',
43
+ inputSchema: {
44
+ type: 'object',
45
+ properties: {
46
+ name: {
47
+ type: 'string',
48
+ description: 'The name of the component, directive, pipe, or service',
49
+ },
50
+ },
51
+ required: ['name'],
52
+ },
53
+ };
54
+ }
55
+ }
56
+ //# sourceMappingURL=get-component-examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-examples.js","sourceRoot":"","sources":["../../src/tools/get-component-examples.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAC3B,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,MAAkC;QACxC,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,8BAA8B;QAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAEpD,OAAO;YACL,aAAa,EAAE,GAAG,CAAC,IAAI;YACvB,QAAQ;SACT,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACtB,OAAO;YACL,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EACT,8FAA8F;gBAC9F,wFAAwF;gBACxF,sDAAsD;YACxD,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,44 @@
1
+ /**
2
+ * get-component-inputs tool handler
3
+ * Retrieves input properties for a specific component
4
+ */
5
+ import { ComponentQuery } from '../query/component-query.js';
6
+ import { ResultFormatter, PropertySummary } from '../query/result-formatter.js';
7
+ export interface GetComponentInputsParams {
8
+ name: string;
9
+ }
10
+ export interface GetComponentInputsResult {
11
+ componentName: string;
12
+ inputs: PropertySummary[];
13
+ }
14
+ /**
15
+ * GetComponentInputsTool class
16
+ * Handles retrieving component input properties
17
+ */
18
+ export declare class GetComponentInputsTool {
19
+ private query;
20
+ private formatter;
21
+ constructor(query: ComponentQuery, formatter: ResultFormatter);
22
+ /**
23
+ * Execute the get-component-inputs tool
24
+ */
25
+ execute(params: GetComponentInputsParams): GetComponentInputsResult;
26
+ /**
27
+ * Get the tool definition for MCP registration
28
+ */
29
+ static getToolDefinition(): {
30
+ name: string;
31
+ description: string;
32
+ inputSchema: {
33
+ type: string;
34
+ properties: {
35
+ name: {
36
+ type: string;
37
+ description: string;
38
+ };
39
+ };
40
+ required: string[];
41
+ };
42
+ };
43
+ }
44
+ //# sourceMappingURL=get-component-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-inputs.d.ts","sourceRoot":"","sources":["../../src/tools/get-component-inputs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAkB;gBAEvB,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe;IAK7D;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,wBAAwB,GAAG,wBAAwB;IAyBnE;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;CAkBzB"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GetComponentInputsTool class
3
+ * Handles retrieving component input properties
4
+ */
5
+ export class GetComponentInputsTool {
6
+ query;
7
+ formatter;
8
+ constructor(query, formatter) {
9
+ this.query = query;
10
+ this.formatter = formatter;
11
+ }
12
+ /**
13
+ * Execute the get-component-inputs 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 input properties
28
+ const inputs = this.formatter.formatInputs(doc);
29
+ return {
30
+ componentName: doc.name,
31
+ inputs,
32
+ };
33
+ }
34
+ /**
35
+ * Get the tool definition for MCP registration
36
+ */
37
+ static getToolDefinition() {
38
+ return {
39
+ name: 'get-component-inputs',
40
+ description: 'Retrieves all input properties for a specific component, directive, pipe, or service by name. ' +
41
+ 'Returns detailed information about each input including name, type, description, default value, and required flag.',
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-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-inputs.js","sourceRoot":"","sources":["../../src/tools/get-component-inputs.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACzB,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,MAAgC;QACtC,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,sCAAsC;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAEhD,OAAO;YACL,aAAa,EAAE,GAAG,CAAC,IAAI;YACvB,MAAM;SACP,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACtB,OAAO;YACL,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,gGAAgG;gBAChG,oHAAoH;YACtH,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,44 @@
1
+ /**
2
+ * get-component-outputs tool handler
3
+ * Retrieves output events for a specific component
4
+ */
5
+ import { ComponentQuery } from '../query/component-query.js';
6
+ import { ResultFormatter, PropertySummary } from '../query/result-formatter.js';
7
+ export interface GetComponentOutputsParams {
8
+ name: string;
9
+ }
10
+ export interface GetComponentOutputsResult {
11
+ componentName: string;
12
+ outputs: PropertySummary[];
13
+ }
14
+ /**
15
+ * GetComponentOutputsTool class
16
+ * Handles retrieving component output events
17
+ */
18
+ export declare class GetComponentOutputsTool {
19
+ private query;
20
+ private formatter;
21
+ constructor(query: ComponentQuery, formatter: ResultFormatter);
22
+ /**
23
+ * Execute the get-component-outputs tool
24
+ */
25
+ execute(params: GetComponentOutputsParams): GetComponentOutputsResult;
26
+ /**
27
+ * Get the tool definition for MCP registration
28
+ */
29
+ static getToolDefinition(): {
30
+ name: string;
31
+ description: string;
32
+ inputSchema: {
33
+ type: string;
34
+ properties: {
35
+ name: {
36
+ type: string;
37
+ description: string;
38
+ };
39
+ };
40
+ required: string[];
41
+ };
42
+ };
43
+ }
44
+ //# sourceMappingURL=get-component-outputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-outputs.d.ts","sourceRoot":"","sources":["../../src/tools/get-component-outputs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAkB;gBAEvB,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe;IAK7D;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,yBAAyB,GAAG,yBAAyB;IAyBrE;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;;;;;;;;CAkBzB"}