|
| 1 | +/** |
| 2 | + * PatternFly JSON catalog doc |
| 3 | + */ |
| 4 | +type PatternFlyMcpDocsCatalogDoc = { |
| 5 | + displayName: string; |
| 6 | + description: string; |
| 7 | + pathSlug: string; |
| 8 | + section: string; |
| 9 | + category: string; |
| 10 | + source: string; |
| 11 | + path: string; |
| 12 | + version: string; |
| 13 | +}; |
| 14 | + |
| 15 | +/** |
| 16 | + * PatternFly JSON catalog documentation entries. |
| 17 | + */ |
| 18 | +type PatternFlyMcpDocsCatalogEntry = { |
| 19 | + [key: string]: PatternFlyMcpDocsCatalogDoc[] |
| 20 | +}; |
| 21 | + |
| 22 | +/** |
| 23 | + * PatternFly documentation catalog. |
| 24 | + * |
| 25 | + * @interface PatternFlyMcpDocsCatalog |
| 26 | + * |
| 27 | + * @property [version] - Version of the catalog. |
| 28 | + * @property [generated] - Date when the catalog was generated. |
| 29 | + * @property {PatternFlyMcpDocsCatalogEntry} docs - PatternFly documentation entries. |
| 30 | + */ |
| 31 | +interface PatternFlyMcpDocsCatalog { |
| 32 | + version?: string; |
| 33 | + generated?: string; |
| 34 | + meta: { |
| 35 | + totalEntries: number; |
| 36 | + totalDocs: number; |
| 37 | + source: string; |
| 38 | + }; |
| 39 | + docs: PatternFlyMcpDocsCatalogEntry |
| 40 | +} |
| 41 | + |
| 42 | +/** |
| 43 | + * Fallback documentation for when the catalog is unavailable. |
| 44 | + * Points to the high-level entry points for PatternFly. |
| 45 | + */ |
| 46 | +const EMBEDDED_DOCS: PatternFlyMcpDocsCatalog = { |
| 47 | + meta: { |
| 48 | + totalEntries: 2, |
| 49 | + totalDocs: 5, |
| 50 | + source: 'patternfly-mcp-fallback' |
| 51 | + }, |
| 52 | + docs: { |
| 53 | + patternfly: [ |
| 54 | + { |
| 55 | + displayName: 'PatternFly Home', |
| 56 | + description: 'Official PatternFly design system website.', |
| 57 | + pathSlug: 'patternfly-home', |
| 58 | + section: 'home', |
| 59 | + category: 'reference', |
| 60 | + source: 'website', |
| 61 | + path: 'https://www.patternfly.org', |
| 62 | + version: 'v6' |
| 63 | + }, |
| 64 | + { |
| 65 | + displayName: 'PatternFly GitHub', |
| 66 | + description: 'PatternFly organization on GitHub (Core & React).', |
| 67 | + pathSlug: 'patternfly-github', |
| 68 | + section: 'github', |
| 69 | + category: 'reference', |
| 70 | + source: 'github', |
| 71 | + path: 'https://github.com/patternfly', |
| 72 | + version: 'v6' |
| 73 | + }, |
| 74 | + { |
| 75 | + displayName: 'PatternFly Org', |
| 76 | + description: 'Direct source for PatternFly documentation and guidelines.', |
| 77 | + pathSlug: 'patternfly-org', |
| 78 | + section: 'github', |
| 79 | + category: 'reference', |
| 80 | + source: 'github', |
| 81 | + path: 'https://github.com/patternfly/patternfly-org', |
| 82 | + version: 'v6' |
| 83 | + } |
| 84 | + ], |
| 85 | + React: [ |
| 86 | + { |
| 87 | + displayName: 'PatternFly React Docs', |
| 88 | + description: 'Direct source for PatternFly React component examples.', |
| 89 | + pathSlug: 'patternfly-react', |
| 90 | + section: 'components', |
| 91 | + category: 'react', |
| 92 | + source: 'github', |
| 93 | + path: 'https://raw.githubusercontent.com/patternfly/patternfly-react/refs/heads/main/README.md', |
| 94 | + version: 'v6' |
| 95 | + }, |
| 96 | + { |
| 97 | + displayName: 'React Development Rules', |
| 98 | + description: 'AI guidance for PatternFly React development rules.', |
| 99 | + pathSlug: 'react-development', |
| 100 | + section: 'guidelines', |
| 101 | + category: 'react', |
| 102 | + source: 'github', |
| 103 | + path: 'https://raw.githubusercontent.com/patternfly/ai-helpers/refs/heads/main/docs/README.md', |
| 104 | + version: 'v6' |
| 105 | + } |
| 106 | + ] |
| 107 | + } |
| 108 | +}; |
| 109 | + |
| 110 | +export { |
| 111 | + EMBEDDED_DOCS, |
| 112 | + type PatternFlyMcpDocsCatalog, |
| 113 | + type PatternFlyMcpDocsCatalogEntry, |
| 114 | + type PatternFlyMcpDocsCatalogDoc |
| 115 | +}; |
0 commit comments