@@ -21,6 +21,7 @@ import { type ToolModule } from './server.toolsUser';
2121 * - `cli`: Command-line interface mode.
2222 * - `programmatic`: Programmatic interaction mode where the application is used as a library or API.
2323 * - `test`: Testing or debugging mode.
24+ * - `docs`: Documentation mode for building PatternFly documentation.
2425 * @property {ModeOptions } modeOptions - Mode-specific options.
2526 * @property name - Name of the package.
2627 * @property nodeVersion - Node.js major version.
@@ -51,7 +52,7 @@ interface DefaultOptions<TLogOptions = LoggingOptions> {
5152 isHttp : boolean ;
5253 logging : TLogOptions ;
5354 minMax : MinMax ;
54- mode : 'cli' | 'programmatic' | 'test' ;
55+ mode : 'cli' | 'programmatic' | 'test' | 'docs' ;
5556 modeOptions : ModeOptions ;
5657 name : string ;
5758 nodeVersion : number ;
@@ -170,6 +171,7 @@ interface ModeOptions {
170171 test ?: {
171172 baseUrl ?: string | undefined ;
172173 } | undefined ;
174+ docs ?: object | undefined ;
173175}
174176
175177/**
@@ -205,6 +207,13 @@ interface PatternFlyOptions {
205207 versionWhitelist : string [ ] ;
206208 versionStrategy : 'highest' | 'lowest' ;
207209 } ,
210+ api : {
211+ expireDays : number ;
212+ endpoints : {
213+ v6 : WhitelistUrl ;
214+ v5 ?: WhitelistUrl ;
215+ }
216+ } ,
208217 urlWhitelist : WhitelistUrl [ ] ;
209218 urlWhitelistProtocols : string [ ] ;
210219}
@@ -348,7 +357,8 @@ const MIN_MAX: MinMax = {
348357const MODE_OPTIONS : ModeOptions = {
349358 cli : { } ,
350359 programmatic : { } ,
351- test : { }
360+ test : { } ,
361+ docs : { }
352362} ;
353363
354364/**
@@ -455,8 +465,15 @@ const PATTERNFLY_OPTIONS: PatternFlyOptions = {
455465 ] ,
456466 versionStrategy : 'highest'
457467 } ,
468+ api : {
469+ expireDays : 14 ,
470+ endpoints : {
471+ v6 : 'https://patternfly-doc-core.pages.dev/api/v6'
472+ }
473+ } ,
458474 urlWhitelist : [
459475 'https://patternfly.org' ,
476+ 'https://patternfly-doc-core.pages.dev' ,
460477 'https://github.com/patternfly' ,
461478 'https://raw.githubusercontent.com/patternfly'
462479 ] ,
@@ -471,7 +488,7 @@ const URL_REGEX = /^(https?:)\/\//i;
471488/**
472489 * Available operational modes for the MCP server.
473490 */
474- const MODE_LEVELS : DefaultOptions [ 'mode' ] [ ] = [ 'cli' , 'programmatic' , 'test' ] ;
491+ const MODE_LEVELS : DefaultOptions [ 'mode' ] [ ] = [ 'cli' , 'programmatic' , 'test' , 'docs' ] ;
475492
476493/**
477494 * Get the current Node.js major version.
0 commit comments