@eventcatalog/core 4.2.6 → 4.3.0
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/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-OBA7TFHM.js → chunk-32ZHIOUO.js} +3 -3
- package/dist/{chunk-XTSY2LTR.js → chunk-GZOFTODZ.js} +1 -1
- package/dist/{chunk-DEGSBGEF.js → chunk-RQCRNCF6.js} +1 -1
- package/dist/{chunk-OZNVNRI7.js → chunk-TE4QQSPT.js} +1 -1
- package/dist/{chunk-NZUMNTJK.js → chunk-ZLUUUTWP.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +12 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +5 -0
- package/dist/eventcatalog.config.d.ts +5 -0
- package/dist/eventcatalog.js +9 -9
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +73 -5
- package/eventcatalog/src/components/McpConnectDialog.tsx +98 -0
- package/eventcatalog/src/components/McpIcon.tsx +14 -0
- package/eventcatalog/src/enterprise/feature.ts +1 -1
- package/eventcatalog/src/enterprise/mcp/mcp-scope.ts +159 -0
- package/eventcatalog/src/enterprise/mcp/mcp-scoped-tools.ts +197 -0
- package/eventcatalog/src/enterprise/mcp/mcp-server.ts +287 -176
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +13 -0
- package/eventcatalog/src/types/mcp-modules.d.ts +1 -0
- package/package.json +1 -1
|
@@ -64,6 +64,7 @@ import {
|
|
|
64
64
|
isMarkdownDownloadEnabled,
|
|
65
65
|
isVisualiserEnabled,
|
|
66
66
|
isRSSEnabled,
|
|
67
|
+
isEventCatalogMCPEnabled,
|
|
67
68
|
} from '@utils/feature';
|
|
68
69
|
import { getMDXComponentsByName, parseMdxBooleanProp } from '@utils/markdown';
|
|
69
70
|
|
|
@@ -89,6 +90,15 @@ const pageTitle = `${props.collection} | ${props.data.name}`.replace(/^\w/, (c)
|
|
|
89
90
|
const contentBadges = props.data.badges || [];
|
|
90
91
|
const editUrl =
|
|
91
92
|
props.data.editUrl || (config.editUrl && props?.filePath ? buildEditUrlForResource(config.editUrl, props?.filePath) : '');
|
|
93
|
+
const isLatestVersion = props.data.latestVersion === props.data.version;
|
|
94
|
+
const mcpResourceType = props.collection === 'domains' ? 'domain' : props.collection === 'systems' ? 'system' : undefined;
|
|
95
|
+
const mcpServerUrl =
|
|
96
|
+
mcpResourceType && isEventCatalogMCPEnabled()
|
|
97
|
+
? buildUrl(
|
|
98
|
+
`/docs/mcp/${mcpResourceType}s/${encodeURIComponent(props.data.id)}${isLatestVersion ? '' : `/${encodeURIComponent(props.data.version)}`}`,
|
|
99
|
+
true
|
|
100
|
+
)
|
|
101
|
+
: undefined;
|
|
92
102
|
|
|
93
103
|
const headerIconSrc = isIconPath(props.data.styles?.icon) ? resolveIconUrl(props.data.styles!.icon!) : null;
|
|
94
104
|
|
|
@@ -458,6 +468,9 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
458
468
|
rssFeedEnabled={isRSSEnabled()}
|
|
459
469
|
editUrl={editUrl}
|
|
460
470
|
preferChatAsDefault={isEventCatalogChatEnabled()}
|
|
471
|
+
mcpServerUrl={mcpServerUrl}
|
|
472
|
+
resourceName={props.data.name}
|
|
473
|
+
mcpResourceType={mcpResourceType}
|
|
461
474
|
/>
|
|
462
475
|
</div>
|
|
463
476
|
{
|