@exhaustive-ui/mcp 0.0.0-stage → 3.0.0-alpha.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/LICENSE +23 -0
- package/README.md +167 -2
- package/data/components/accordion.md +421 -0
- package/data/components/animateonscroll.md +163 -0
- package/data/components/autocomplete.md +1077 -0
- package/data/components/autofocus.md +38 -0
- package/data/components/avatar.md +417 -0
- package/data/components/badge.md +234 -0
- package/data/components/blockui.md +108 -0
- package/data/components/breadcrumb.md +178 -0
- package/data/components/button.md +774 -0
- package/data/components/card.md +138 -0
- package/data/components/carousel.md +440 -0
- package/data/components/cascadeselect.md +1387 -0
- package/data/components/chart.md +1178 -0
- package/data/components/checkbox.md +529 -0
- package/data/components/chip.md +180 -0
- package/data/components/colorpicker.md +301 -0
- package/data/components/confirmdialog.md +287 -0
- package/data/components/confirmpopup.md +417 -0
- package/data/components/contextmenu.md +491 -0
- package/data/components/dataview.md +600 -0
- package/data/components/datepicker.md +1262 -0
- package/data/components/dialog.md +622 -0
- package/data/components/divider.md +250 -0
- package/data/components/dock.md +500 -0
- package/data/components/dragdrop.md +285 -0
- package/data/components/drawer.md +510 -0
- package/data/components/dynamicdialog.md +109 -0
- package/data/components/editor.md +291 -0
- package/data/components/fieldset.md +182 -0
- package/data/components/fileupload.md +430 -0
- package/data/components/floatlabel.md +155 -0
- package/data/components/fluid.md +72 -0
- package/data/components/focustrap.md +65 -0
- package/data/components/galleria.md +627 -0
- package/data/components/iconfield.md +246 -0
- package/data/components/iftalabel.md +105 -0
- package/data/components/imagecompare.md +97 -0
- package/data/components/inplace.md +233 -0
- package/data/components/inputgroup.md +306 -0
- package/data/components/inputmask.md +518 -0
- package/data/components/inputnumber.md +675 -0
- package/data/components/inputotp.md +336 -0
- package/data/components/inputtext.md +488 -0
- package/data/components/keyfilter.md +85 -0
- package/data/components/knob.md +462 -0
- package/data/components/listbox.md +798 -0
- package/data/components/llms.md +28 -0
- package/data/components/megamenu.md +587 -0
- package/data/components/menu.md +483 -0
- package/data/components/menubar.md +462 -0
- package/data/components/message.md +449 -0
- package/data/components/metergroup.md +241 -0
- package/data/components/multiselect.md +1047 -0
- package/data/components/orderlist.md +342 -0
- package/data/components/organizationchart.md +197 -0
- package/data/components/overlay.md +217 -0
- package/data/components/paginator.md +314 -0
- package/data/components/panel.md +214 -0
- package/data/components/panelmenu.md +699 -0
- package/data/components/password.md +570 -0
- package/data/components/picklist.md +420 -0
- package/data/components/popover.md +378 -0
- package/data/components/progressbar.md +181 -0
- package/data/components/progressspinner.md +91 -0
- package/data/components/radiobutton.md +377 -0
- package/data/components/rating.md +312 -0
- package/data/components/ripple.md +89 -0
- package/data/components/scroller.md +122 -0
- package/data/components/scrollpanel.md +149 -0
- package/data/components/scrolltop.md +105 -0
- package/data/components/select.md +1206 -0
- package/data/components/selectbutton.md +356 -0
- package/data/components/skeleton.md +242 -0
- package/data/components/slider.md +337 -0
- package/data/components/speeddial.md +589 -0
- package/data/components/splitbutton.md +945 -0
- package/data/components/splitter.md +196 -0
- package/data/components/stepper.md +411 -0
- package/data/components/styleclass.md +126 -0
- package/data/components/table.md +4557 -0
- package/data/components/tabs.md +467 -0
- package/data/components/tag.md +200 -0
- package/data/components/terminal.md +118 -0
- package/data/components/textarea.md +416 -0
- package/data/components/tieredmenu.md +578 -0
- package/data/components/timeline.md +310 -0
- package/data/components/toast.md +596 -0
- package/data/components/togglebutton.md +356 -0
- package/data/components/toggleswitch.md +285 -0
- package/data/components/toolbar.md +182 -0
- package/data/components/tooltip.md +211 -0
- package/data/components/tree.md +746 -0
- package/data/components/treeselect.md +912 -0
- package/data/components/treetable.md +2814 -0
- package/data/components.json +43751 -0
- package/data/llms-full.txt +47433 -0
- package/data/llms.txt +121 -0
- package/data/manifest.json +46513 -0
- package/data/pages/accessibility.md +28 -0
- package/data/pages/animations.md +28 -0
- package/data/pages/configuration.md +210 -0
- package/data/pages/contribution.md +20 -0
- package/data/pages/customicons.md +20 -0
- package/data/pages/faq.md +20 -0
- package/data/pages/icons.md +66 -0
- package/data/pages/installation.md +71 -0
- package/data/pages/llms.md +61 -0
- package/data/pages/passthrough.md +32 -0
- package/data/pages/philosophy.md +28 -0
- package/data/pages/primeflex.md +20 -0
- package/data/pages/rtl.md +12 -0
- package/data/pages/styled.md +132 -0
- package/data/pages/tailwind.md +40 -0
- package/data/pages/unstyled.md +39 -0
- package/data/snapshot.json +9 -0
- package/dist/index.d.mts +448 -0
- package/dist/index.mjs +2501 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -3
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/config.d.ts
|
|
4
|
+
declare const DEFAULT_DOCS_URL = "https://exhaustive-ui.e-xiste.com";
|
|
5
|
+
declare const DEFAULT_CACHE_TTL_SECONDS: number;
|
|
6
|
+
declare const DEFAULT_FETCH_TIMEOUT_MS = 10000;
|
|
7
|
+
declare const RESOURCE_BASE_URI = "exhaustive-ui://docs";
|
|
8
|
+
interface ServerConfig {
|
|
9
|
+
/** Base URL of the docs site; the machine-readable docs live under `${docsUrl}/llms/`. */
|
|
10
|
+
docsUrl: string;
|
|
11
|
+
/** How long a fetched document is reused before it is fetched again. */
|
|
12
|
+
cacheTtlMs: number;
|
|
13
|
+
/** Per-request timeout for the docs site. */
|
|
14
|
+
fetchTimeoutMs: number;
|
|
15
|
+
/** When true the live site is never contacted and only the snapshot is used. */
|
|
16
|
+
offline: boolean;
|
|
17
|
+
/** Directory holding the offline snapshot; undefined disables the fallback. */
|
|
18
|
+
snapshotDir: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
type Env = Record<string, string | undefined>;
|
|
21
|
+
declare function resolveConfig(env?: Env, overrides?: Partial<ServerConfig>): ServerConfig;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/source.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* Where the machine-readable docs come from. Paths are relative to the `/llms/` directory of the docs site:
|
|
26
|
+
* `components.json`, `manifest.json`, `llms.txt`, `llms-full.txt`, `components/<name>.md`, `pages/<name>.md`.
|
|
27
|
+
*/
|
|
28
|
+
interface DocsSource {
|
|
29
|
+
readonly kind: string;
|
|
30
|
+
readText(docsPath: string): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
/** In-memory documents, for tests and embedding. */
|
|
33
|
+
declare class MemorySource implements DocsSource {
|
|
34
|
+
private readonly documents;
|
|
35
|
+
readonly kind = "memory";
|
|
36
|
+
constructor(documents?: Map<string, string>);
|
|
37
|
+
readText(docsPath: string): Promise<string>;
|
|
38
|
+
}
|
|
39
|
+
/** The offline snapshot produced at build time by scripts/prebuild.mjs. */
|
|
40
|
+
declare class SnapshotSource implements DocsSource {
|
|
41
|
+
readonly directory: string;
|
|
42
|
+
readonly kind = "snapshot";
|
|
43
|
+
constructor(directory: string);
|
|
44
|
+
readText(docsPath: string): Promise<string>;
|
|
45
|
+
}
|
|
46
|
+
type FetchLike = (input: string, init?: {
|
|
47
|
+
signal?: AbortSignal;
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
}) => Promise<{
|
|
50
|
+
ok: boolean;
|
|
51
|
+
status: number;
|
|
52
|
+
headers: {
|
|
53
|
+
get(name: string): string | null;
|
|
54
|
+
};
|
|
55
|
+
text(): Promise<string>;
|
|
56
|
+
}>;
|
|
57
|
+
interface RemoteSourceOptions {
|
|
58
|
+
baseUrl: string;
|
|
59
|
+
timeoutMs: number;
|
|
60
|
+
fetchImpl?: FetchLike;
|
|
61
|
+
userAgent?: string;
|
|
62
|
+
}
|
|
63
|
+
/** The live docs site. A not-found path is served as the SPA shell with HTTP 200, so HTML answers are treated as misses. */
|
|
64
|
+
declare class RemoteSource implements DocsSource {
|
|
65
|
+
private readonly options;
|
|
66
|
+
readonly kind = "remote";
|
|
67
|
+
private readonly fetchImpl;
|
|
68
|
+
constructor(options: RemoteSourceOptions);
|
|
69
|
+
urlFor(docsPath: string): string;
|
|
70
|
+
readText(docsPath: string): Promise<string>;
|
|
71
|
+
}
|
|
72
|
+
interface CachedSourceOptions {
|
|
73
|
+
ttlMs: number;
|
|
74
|
+
now?: () => number;
|
|
75
|
+
}
|
|
76
|
+
/** Remembers documents for a TTL, dedupes concurrent reads, and serves a stale copy when a refresh fails. */
|
|
77
|
+
declare class CachedSource implements DocsSource {
|
|
78
|
+
private readonly inner;
|
|
79
|
+
private readonly options;
|
|
80
|
+
readonly kind: string;
|
|
81
|
+
private readonly entries;
|
|
82
|
+
private readonly pending;
|
|
83
|
+
private readonly now;
|
|
84
|
+
private hits;
|
|
85
|
+
private misses;
|
|
86
|
+
constructor(inner: DocsSource, options: CachedSourceOptions);
|
|
87
|
+
readText(docsPath: string): Promise<string>;
|
|
88
|
+
invalidate(): void;
|
|
89
|
+
stats(): {
|
|
90
|
+
entries: number;
|
|
91
|
+
hits: number;
|
|
92
|
+
misses: number;
|
|
93
|
+
ttlMs: number;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
interface FallbackStatus {
|
|
97
|
+
primary: string;
|
|
98
|
+
fallback: string;
|
|
99
|
+
fallbackReads: number;
|
|
100
|
+
lastFallbackAt?: string;
|
|
101
|
+
lastFallbackReason?: string;
|
|
102
|
+
/** Set while the primary is skipped after a connection failure. */
|
|
103
|
+
primarySkippedUntil?: string;
|
|
104
|
+
}
|
|
105
|
+
interface FallbackSourceOptions {
|
|
106
|
+
/** After a connection failure the primary is not retried for this long, so an offline session stays responsive. */
|
|
107
|
+
cooldownMs?: number;
|
|
108
|
+
now?: () => number;
|
|
109
|
+
}
|
|
110
|
+
/** Reads from the primary source and falls back to the secondary one when the primary fails for any reason. */
|
|
111
|
+
declare class FallbackSource implements DocsSource {
|
|
112
|
+
private readonly primary;
|
|
113
|
+
private readonly fallback;
|
|
114
|
+
readonly kind: string;
|
|
115
|
+
private readonly cooldownMs;
|
|
116
|
+
private readonly now;
|
|
117
|
+
private fallbackReads;
|
|
118
|
+
private lastFallbackAt;
|
|
119
|
+
private lastFallbackReason;
|
|
120
|
+
private primarySkippedUntil;
|
|
121
|
+
constructor(primary: DocsSource, fallback: DocsSource, options?: FallbackSourceOptions);
|
|
122
|
+
readText(docsPath: string): Promise<string>;
|
|
123
|
+
private readFallback;
|
|
124
|
+
status(): FallbackStatus;
|
|
125
|
+
}
|
|
126
|
+
interface SourceStatus {
|
|
127
|
+
mode: 'remote' | 'offline';
|
|
128
|
+
docsUrl: string;
|
|
129
|
+
cacheTtlSeconds: number;
|
|
130
|
+
snapshotDir?: string;
|
|
131
|
+
fallback?: FallbackStatus;
|
|
132
|
+
cache?: {
|
|
133
|
+
entries: number;
|
|
134
|
+
hits: number;
|
|
135
|
+
misses: number;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
interface ConfiguredSource {
|
|
139
|
+
source: DocsSource;
|
|
140
|
+
status(): SourceStatus;
|
|
141
|
+
}
|
|
142
|
+
/** The runtime source: the live site behind a TTL cache, falling back to the offline snapshot (or the snapshot alone when offline). */
|
|
143
|
+
declare function createDocsSource(config: ServerConfig, fetchImpl?: FetchLike): ConfiguredSource;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/types.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* Shapes of the machine-readable docs published by the ExhaustiveUI docs site under `/llms/`
|
|
148
|
+
* (apps/docs/scripts/build-llm-docs.mjs and build-manifest.mjs), and the normalized catalog the server builds from them.
|
|
149
|
+
*/
|
|
150
|
+
interface RawApiProp {
|
|
151
|
+
name: string;
|
|
152
|
+
type?: string;
|
|
153
|
+
default?: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
deprecated?: string;
|
|
156
|
+
}
|
|
157
|
+
interface RawApiParameter {
|
|
158
|
+
name: string;
|
|
159
|
+
type?: string;
|
|
160
|
+
}
|
|
161
|
+
interface RawApiEmit {
|
|
162
|
+
name: string;
|
|
163
|
+
parameters?: RawApiParameter[];
|
|
164
|
+
description?: string;
|
|
165
|
+
}
|
|
166
|
+
interface RawApiTemplate {
|
|
167
|
+
name: string;
|
|
168
|
+
type?: string;
|
|
169
|
+
description?: string;
|
|
170
|
+
}
|
|
171
|
+
interface RawApiMethod {
|
|
172
|
+
name: string;
|
|
173
|
+
parameters?: RawApiParameter[];
|
|
174
|
+
returnType?: string;
|
|
175
|
+
description?: string;
|
|
176
|
+
}
|
|
177
|
+
interface RawApiPassThrough {
|
|
178
|
+
name: string;
|
|
179
|
+
type?: string;
|
|
180
|
+
description?: string;
|
|
181
|
+
}
|
|
182
|
+
interface RawApiStyleClass {
|
|
183
|
+
class: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
}
|
|
186
|
+
interface RawApiToken {
|
|
187
|
+
token: string;
|
|
188
|
+
variable?: string;
|
|
189
|
+
description?: string;
|
|
190
|
+
}
|
|
191
|
+
interface RawComponentApi {
|
|
192
|
+
props?: RawApiProp[];
|
|
193
|
+
templates?: RawApiTemplate[];
|
|
194
|
+
emits?: RawApiEmit[];
|
|
195
|
+
methods?: RawApiMethod[];
|
|
196
|
+
pt?: RawApiPassThrough[];
|
|
197
|
+
styles?: RawApiStyleClass[];
|
|
198
|
+
tokens?: RawApiToken[];
|
|
199
|
+
}
|
|
200
|
+
interface RawSectionExamples {
|
|
201
|
+
typescript?: string;
|
|
202
|
+
html?: string;
|
|
203
|
+
command?: string;
|
|
204
|
+
}
|
|
205
|
+
interface RawSection {
|
|
206
|
+
id: string;
|
|
207
|
+
label: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
examples?: RawSectionExamples | null;
|
|
210
|
+
}
|
|
211
|
+
interface RawComponent {
|
|
212
|
+
name: string;
|
|
213
|
+
title: string;
|
|
214
|
+
description?: string;
|
|
215
|
+
sections: RawSection[];
|
|
216
|
+
api?: RawComponentApi;
|
|
217
|
+
}
|
|
218
|
+
interface RawPage {
|
|
219
|
+
name: string;
|
|
220
|
+
path: string;
|
|
221
|
+
title: string;
|
|
222
|
+
description?: string;
|
|
223
|
+
sections: RawSection[];
|
|
224
|
+
}
|
|
225
|
+
interface ComponentsJson {
|
|
226
|
+
version: string;
|
|
227
|
+
generatedAt: string;
|
|
228
|
+
components: RawComponent[];
|
|
229
|
+
pages: RawPage[];
|
|
230
|
+
}
|
|
231
|
+
interface ManifestInput {
|
|
232
|
+
name: string;
|
|
233
|
+
type?: string;
|
|
234
|
+
description?: string;
|
|
235
|
+
signal?: boolean;
|
|
236
|
+
default?: string;
|
|
237
|
+
transform?: string;
|
|
238
|
+
deprecated?: string;
|
|
239
|
+
twoWay?: boolean;
|
|
240
|
+
/** Class property name when it differs from the binding name. */
|
|
241
|
+
property?: string;
|
|
242
|
+
/** Allowed literal values when the input type is a union of string literals. */
|
|
243
|
+
values?: string[];
|
|
244
|
+
}
|
|
245
|
+
interface ManifestOutput {
|
|
246
|
+
name: string;
|
|
247
|
+
payload?: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
}
|
|
250
|
+
interface ManifestTemplate {
|
|
251
|
+
name: string;
|
|
252
|
+
context?: string;
|
|
253
|
+
description?: string;
|
|
254
|
+
}
|
|
255
|
+
interface ManifestPassThrough {
|
|
256
|
+
name: string;
|
|
257
|
+
type?: string;
|
|
258
|
+
description?: string;
|
|
259
|
+
}
|
|
260
|
+
interface ManifestMethod {
|
|
261
|
+
name: string;
|
|
262
|
+
description?: string;
|
|
263
|
+
}
|
|
264
|
+
interface ManifestDeclaration {
|
|
265
|
+
kind: 'component' | 'directive';
|
|
266
|
+
className: string;
|
|
267
|
+
selector?: string;
|
|
268
|
+
standalone?: boolean;
|
|
269
|
+
description?: string;
|
|
270
|
+
inputs?: ManifestInput[];
|
|
271
|
+
outputs?: ManifestOutput[];
|
|
272
|
+
templates?: ManifestTemplate[];
|
|
273
|
+
contentProjection?: string[];
|
|
274
|
+
passThrough?: ManifestPassThrough[];
|
|
275
|
+
/** True when the declaration implements ControlValueAccessor (works with ngModel and reactive forms). */
|
|
276
|
+
forms?: boolean;
|
|
277
|
+
methods?: ManifestMethod[];
|
|
278
|
+
}
|
|
279
|
+
interface ManifestEntryPoint {
|
|
280
|
+
name: string;
|
|
281
|
+
import: string;
|
|
282
|
+
description?: string;
|
|
283
|
+
modules?: string[];
|
|
284
|
+
declarations?: ManifestDeclaration[];
|
|
285
|
+
services?: string[];
|
|
286
|
+
types?: unknown[];
|
|
287
|
+
cssClasses?: {
|
|
288
|
+
class: string;
|
|
289
|
+
description?: string;
|
|
290
|
+
}[];
|
|
291
|
+
classes?: unknown[];
|
|
292
|
+
}
|
|
293
|
+
interface ManifestJson {
|
|
294
|
+
schemaVersion: number;
|
|
295
|
+
package: string;
|
|
296
|
+
version: string;
|
|
297
|
+
site: string;
|
|
298
|
+
entryPoints: ManifestEntryPoint[];
|
|
299
|
+
}
|
|
300
|
+
type CodeLanguage = 'typescript' | 'html' | 'bash';
|
|
301
|
+
interface SectionEntry {
|
|
302
|
+
id: string;
|
|
303
|
+
label: string;
|
|
304
|
+
description?: string;
|
|
305
|
+
hasCode: boolean;
|
|
306
|
+
codeLanguage?: CodeLanguage;
|
|
307
|
+
code?: string;
|
|
308
|
+
}
|
|
309
|
+
interface ComponentEntry {
|
|
310
|
+
kind: 'component';
|
|
311
|
+
name: string;
|
|
312
|
+
title: string;
|
|
313
|
+
description: string;
|
|
314
|
+
route: string;
|
|
315
|
+
publicUrl: string;
|
|
316
|
+
markdownUrl: string;
|
|
317
|
+
docPath: string;
|
|
318
|
+
resourceUri: string;
|
|
319
|
+
apiResourceUri: string;
|
|
320
|
+
import?: string;
|
|
321
|
+
modules: string[];
|
|
322
|
+
selectors: string[];
|
|
323
|
+
declarations: ManifestDeclaration[];
|
|
324
|
+
sections: SectionEntry[];
|
|
325
|
+
api: RawComponentApi;
|
|
326
|
+
}
|
|
327
|
+
interface GuideEntry {
|
|
328
|
+
kind: 'guide';
|
|
329
|
+
name: string;
|
|
330
|
+
title: string;
|
|
331
|
+
description: string;
|
|
332
|
+
route: string;
|
|
333
|
+
publicUrl: string;
|
|
334
|
+
markdownUrl: string;
|
|
335
|
+
docPath: string;
|
|
336
|
+
resourceUri: string;
|
|
337
|
+
sections: SectionEntry[];
|
|
338
|
+
}
|
|
339
|
+
interface DirectiveEntry {
|
|
340
|
+
className: string;
|
|
341
|
+
selector: string;
|
|
342
|
+
entryPoint: string;
|
|
343
|
+
import: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
/** Name of the catalog component whose docs cover this directive, when there is one. */
|
|
346
|
+
component?: string;
|
|
347
|
+
}
|
|
348
|
+
interface Catalog {
|
|
349
|
+
libraryVersion: string;
|
|
350
|
+
docsVersion: string;
|
|
351
|
+
generatedAt: string;
|
|
352
|
+
site: string;
|
|
353
|
+
components: ComponentEntry[];
|
|
354
|
+
guides: GuideEntry[];
|
|
355
|
+
directives: DirectiveEntry[];
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/catalog.d.ts
|
|
359
|
+
interface BuildCatalogOptions {
|
|
360
|
+
resourceBaseUri?: string;
|
|
361
|
+
}
|
|
362
|
+
/** Normalize the two generated indexes into one catalog. */
|
|
363
|
+
declare function buildCatalog(componentsJson: ComponentsJson, manifest: ManifestJson, options?: BuildCatalogOptions): Catalog;
|
|
364
|
+
/** Resolve a component by name, title, selector, class name, alias, route or URL. */
|
|
365
|
+
declare function findComponent(catalog: Catalog, query: string): ComponentEntry;
|
|
366
|
+
/** Resolve a guide by name ("installation"), route ("theming/styled"), title, markdown path or URL. */
|
|
367
|
+
declare function findGuide(catalog: Catalog, query: string): GuideEntry;
|
|
368
|
+
/** Resolve a section of a component or guide by id or label; undefined when nothing matches. */
|
|
369
|
+
declare function findSection(sections: readonly SectionEntry[], query: string): SectionEntry | undefined;
|
|
370
|
+
/** Loads and caches the catalog; a rebuild only happens when the source hands back different index documents. */
|
|
371
|
+
declare class CatalogLoader {
|
|
372
|
+
private readonly source;
|
|
373
|
+
private readonly options;
|
|
374
|
+
private cached;
|
|
375
|
+
constructor(source: DocsSource, options?: BuildCatalogOptions);
|
|
376
|
+
load(): Promise<Catalog>;
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/search.d.ts
|
|
380
|
+
type SearchScope = 'all' | 'components' | 'guides' | 'api' | 'examples';
|
|
381
|
+
interface SearchHit extends Record<string, unknown> {
|
|
382
|
+
type: string;
|
|
383
|
+
score: number;
|
|
384
|
+
matchedTerms: string[];
|
|
385
|
+
matches: string[];
|
|
386
|
+
}
|
|
387
|
+
/** Search components, guides, API members and examples of the catalog. Results are sorted by relevance. */
|
|
388
|
+
declare function searchCatalog(catalog: Catalog, query: string, scope?: SearchScope): SearchHit[];
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/validate.d.ts
|
|
391
|
+
type IssueSeverity = 'error' | 'warning';
|
|
392
|
+
interface UsageIssue {
|
|
393
|
+
kind: string;
|
|
394
|
+
severity: IssueSeverity;
|
|
395
|
+
name?: string;
|
|
396
|
+
message: string;
|
|
397
|
+
allowedProps?: string;
|
|
398
|
+
allowedValues?: string;
|
|
399
|
+
allowedEvents?: string;
|
|
400
|
+
suggestion?: string;
|
|
401
|
+
}
|
|
402
|
+
/** Validate a template or component source against the generated API of one component. */
|
|
403
|
+
declare function validateComponentUsage(catalog: Catalog, component: ComponentEntry, code: string): UsageIssue[];
|
|
404
|
+
//#endregion
|
|
405
|
+
//#region src/tools.d.ts
|
|
406
|
+
interface ToolResult {
|
|
407
|
+
[key: string]: unknown;
|
|
408
|
+
content: {
|
|
409
|
+
type: 'text';
|
|
410
|
+
text: string;
|
|
411
|
+
}[];
|
|
412
|
+
structuredContent: Record<string, unknown>;
|
|
413
|
+
isError?: boolean;
|
|
414
|
+
}
|
|
415
|
+
interface ToolContext {
|
|
416
|
+
serverName: string;
|
|
417
|
+
serverVersion: string;
|
|
418
|
+
source: DocsSource;
|
|
419
|
+
catalog(): Promise<Catalog>;
|
|
420
|
+
sourceStatus(): SourceStatus;
|
|
421
|
+
}
|
|
422
|
+
declare const TOOL_NAMES: readonly ["list", "search", "get_component", "get_guide", "get_example", "get_setup", "validate_usage", "version"];
|
|
423
|
+
declare const STATIC_RESOURCE_URIS: string[];
|
|
424
|
+
declare const RESOURCE_TEMPLATE_NAMES: string[];
|
|
425
|
+
declare const PROMPT_NAMES: readonly ["use_component", "build_form", "theme_component", "migrate_from_primeng", "audit_component_usage"];
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/server.d.ts
|
|
428
|
+
declare const SERVER_NAME = "@exhaustive-ui/mcp";
|
|
429
|
+
interface CreateServerOptions {
|
|
430
|
+
/** Environment to read EXHAUSTIVE_UI_* variables from; defaults to process.env. */
|
|
431
|
+
env?: Env;
|
|
432
|
+
/** Explicit configuration, taking precedence over the environment. */
|
|
433
|
+
config?: Partial<ServerConfig>;
|
|
434
|
+
/** Replace the configured docs source entirely (tests, embedding). */
|
|
435
|
+
source?: DocsSource;
|
|
436
|
+
/** Custom fetch for the live site (tests). */
|
|
437
|
+
fetchImpl?: FetchLike;
|
|
438
|
+
version?: string;
|
|
439
|
+
}
|
|
440
|
+
declare function readPackageVersion(): string;
|
|
441
|
+
/** Build the tool context: configured docs source, catalog loader and status reporting. */
|
|
442
|
+
declare function createToolContext(options?: CreateServerOptions): ToolContext;
|
|
443
|
+
declare function createExhaustiveUiMcpServer(options?: CreateServerOptions): Promise<McpServer>;
|
|
444
|
+
declare function runExhaustiveUiMcpServer(options?: CreateServerOptions): Promise<void>;
|
|
445
|
+
declare function componentApi(component: ComponentEntry): Record<string, unknown>;
|
|
446
|
+
//#endregion
|
|
447
|
+
export { CachedSource, type Catalog, CatalogLoader, type ComponentEntry, type CreateServerOptions, DEFAULT_CACHE_TTL_SECONDS, DEFAULT_DOCS_URL, DEFAULT_FETCH_TIMEOUT_MS, type DirectiveEntry, type DocsSource, FallbackSource, type FetchLike, type GuideEntry, MemorySource, PROMPT_NAMES, RESOURCE_BASE_URI, RESOURCE_TEMPLATE_NAMES, RemoteSource, SERVER_NAME, STATIC_RESOURCE_URIS, type SectionEntry, type ServerConfig, SnapshotSource, type SourceStatus, TOOL_NAMES, type ToolContext, type ToolResult, type UsageIssue, buildCatalog, componentApi, createDocsSource, createExhaustiveUiMcpServer, createToolContext, findComponent, findGuide, findSection, readPackageVersion, resolveConfig, runExhaustiveUiMcpServer, searchCatalog, validateComponentUsage };
|
|
448
|
+
//# sourceMappingURL=index.d.mts.map
|