@eventcatalog/core 4.2.6 → 4.3.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.
Files changed (35) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-XTSY2LTR.js → chunk-E3KVC4LF.js} +1 -1
  6. package/dist/{chunk-NZUMNTJK.js → chunk-GC6SSPJI.js} +1 -1
  7. package/dist/{chunk-DEGSBGEF.js → chunk-GC7WNQP6.js} +1 -1
  8. package/dist/{chunk-OZNVNRI7.js → chunk-UXHV3GN7.js} +1 -1
  9. package/dist/{chunk-OBA7TFHM.js → chunk-ZYVGVWMQ.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +12 -1
  13. package/dist/eventcatalog.cjs +1 -1
  14. package/dist/eventcatalog.config.d.cts +5 -0
  15. package/dist/eventcatalog.config.d.ts +5 -0
  16. package/dist/eventcatalog.js +5 -5
  17. package/dist/generate.cjs +1 -1
  18. package/dist/generate.js +3 -3
  19. package/dist/utils/cli-logger.cjs +1 -1
  20. package/dist/utils/cli-logger.js +2 -2
  21. package/eventcatalog/src/components/CopyAsMarkdown.tsx +73 -5
  22. package/eventcatalog/src/components/McpConnectDialog.tsx +98 -0
  23. package/eventcatalog/src/components/McpIcon.tsx +14 -0
  24. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +3 -3
  25. package/eventcatalog/src/components/SideNav/NestedSideBar/utils.spec.ts +12 -0
  26. package/eventcatalog/src/components/SideNav/NestedSideBar/utils.ts +3 -0
  27. package/eventcatalog/src/enterprise/feature.ts +1 -1
  28. package/eventcatalog/src/enterprise/mcp/mcp-scope.ts +159 -0
  29. package/eventcatalog/src/enterprise/mcp/mcp-scoped-tools.ts +197 -0
  30. package/eventcatalog/src/enterprise/mcp/mcp-server.ts +287 -176
  31. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +13 -0
  32. package/eventcatalog/src/stores/sidebar-store/builders/shared.ts +1 -0
  33. package/eventcatalog/src/stores/sidebar-store/state.ts +1 -0
  34. package/eventcatalog/src/types/mcp-modules.d.ts +1 -0
  35. package/package.json +3 -3
@@ -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
  {
@@ -23,6 +23,7 @@ export type ChildRef = string | NavNode;
23
23
  export type NavNode = {
24
24
  type: 'group' | 'item';
25
25
  title: string;
26
+ collapseKey?: string; // Stable key used to persist collapse state for inline groups
26
27
  icon?: string; // Lucide icon name
27
28
  subtle?: boolean; // Render lightweight styling for nested subgroup headers
28
29
  leftIcon?: string; // Path to SVG icon shown on the left of the label
@@ -69,6 +69,7 @@ const groupAdrsByStatus = (adrs: Adr[]): NavNode[] =>
69
69
  groups.push({
70
70
  type: 'group',
71
71
  title: `${formatAdrStatus(status)} (${adrsForStatus.length})`,
72
+ collapseKey: `adrs:status:${status}`,
72
73
  subtle: true,
73
74
  pages: [...adrsForStatus].sort(byResourceName).map(getAdrNodeKey),
74
75
  });
@@ -7,6 +7,7 @@ declare module 'hono' {
7
7
  export interface Context {
8
8
  req: {
9
9
  raw: Request;
10
+ param: (name: string) => string;
10
11
  };
11
12
  json: (data: unknown, status?: number) => Response;
12
13
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.2.6",
10
+ "version": "4.3.1",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -117,8 +117,8 @@
117
117
  "uuid": "^10.0.0",
118
118
  "zod": "^4.3.6",
119
119
  "@eventcatalog/sdk": "2.26.2",
120
- "@eventcatalog/linter": "1.1.7",
121
- "@eventcatalog/visualiser": "^4.1.0"
120
+ "@eventcatalog/visualiser": "^4.1.0",
121
+ "@eventcatalog/linter": "1.1.7"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@astrojs/check": "^0.9.9",