@eventcatalog/core 4.12.3 → 5.0.0-beta.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.
Files changed (267) hide show
  1. package/LICENSE +226 -95
  2. package/NOTICE +30 -0
  3. package/README.md +3 -2
  4. package/dist/analytics/analytics.cjs +1 -1
  5. package/dist/analytics/analytics.js +2 -2
  6. package/dist/analytics/log-build.cjs +43 -16
  7. package/dist/analytics/log-build.d.cts +6 -5
  8. package/dist/analytics/log-build.d.ts +6 -5
  9. package/dist/analytics/log-build.js +4 -3
  10. package/dist/{chunk-U4YJSTGV.js → chunk-AYNZXUB5.js} +2 -10
  11. package/dist/{chunk-TV3YAWKQ.js → chunk-CR6AK5LR.js} +1 -1
  12. package/dist/{chunk-M577VUOX.js → chunk-LR7AGRHN.js} +13 -16
  13. package/dist/chunk-TQLRG35T.js +203 -0
  14. package/dist/{chunk-HPC6KUDQ.js → chunk-TWN43V4T.js} +1 -1
  15. package/dist/{chunk-ZYTCBNB3.js → chunk-WAIADKQE.js} +1 -1
  16. package/dist/{chunk-5BPN6QEC.js → chunk-ZHKEARLJ.js} +1 -1
  17. package/dist/constants.cjs +1 -1
  18. package/dist/constants.js +1 -1
  19. package/dist/eventcatalog.cjs +407 -291
  20. package/dist/eventcatalog.config.d.cts +2 -3
  21. package/dist/eventcatalog.config.d.ts +2 -3
  22. package/dist/eventcatalog.js +35 -98
  23. package/dist/federation/content-cache.d.cts +0 -5
  24. package/dist/federation/content-cache.d.ts +0 -5
  25. package/dist/federation/diagnostics.d.cts +0 -5
  26. package/dist/federation/diagnostics.d.ts +0 -5
  27. package/dist/federation/federate.cjs +0 -9
  28. package/dist/federation/federate.d.cts +0 -5
  29. package/dist/federation/federate.d.ts +0 -5
  30. package/dist/federation/federate.js +4 -5
  31. package/dist/federation/filesystem-source-provider.d.cts +0 -5
  32. package/dist/federation/filesystem-source-provider.d.ts +0 -5
  33. package/dist/federation/github-source-provider.d.cts +0 -5
  34. package/dist/federation/github-source-provider.d.ts +0 -5
  35. package/dist/federation/output-transaction.d.cts +0 -4
  36. package/dist/federation/output-transaction.d.ts +0 -4
  37. package/dist/federation/public-assets.d.cts +0 -5
  38. package/dist/federation/public-assets.d.ts +0 -5
  39. package/dist/federation/source-provider.d.cts +0 -5
  40. package/dist/federation/source-provider.d.ts +0 -5
  41. package/dist/federation/types.d.cts +0 -5
  42. package/dist/federation/types.d.ts +0 -5
  43. package/dist/generate.cjs +1 -1
  44. package/dist/generate.js +3 -3
  45. package/dist/license-C1y-56bb.d.cts +23 -0
  46. package/dist/license-C1y-56bb.d.ts +23 -0
  47. package/dist/runtime-dependencies/@eventcatalog__visualiser__layout.mjs +3 -0
  48. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps.mjs +3 -0
  49. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__react.mjs +3 -0
  50. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__server.mjs +3 -0
  51. package/dist/runtime-dependencies/@modelcontextprotocol__sdk__types.js.mjs +3 -0
  52. package/dist/runtime-dependencies/manifest.json +12 -1
  53. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__graphql.mjs +3 -0
  54. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__json.mjs +3 -0
  55. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__markup.mjs +3 -0
  56. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__protobuf.mjs +3 -0
  57. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__yaml.mjs +3 -0
  58. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-dark.mjs +3 -0
  59. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-light.mjs +3 -0
  60. package/dist/utils/cli-logger.cjs +1 -1
  61. package/dist/utils/cli-logger.js +2 -2
  62. package/dist/utils/license-status.cjs +240 -0
  63. package/dist/utils/license-status.d.cts +28 -0
  64. package/dist/utils/license-status.d.ts +28 -0
  65. package/dist/utils/license-status.js +12 -0
  66. package/eventcatalog/astro.config.mjs +1 -1
  67. package/eventcatalog/integrations/eventcatalog-runtime.mjs +1 -1
  68. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +29 -19
  69. package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +74 -0
  70. package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +24 -28
  71. package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +16 -11
  72. package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +4 -218
  73. package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +27 -36
  74. package/eventcatalog/src/components/Header.astro +43 -58
  75. package/eventcatalog/src/components/Lists/PillListFlat.styles.css +17 -17
  76. package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +1 -1
  77. package/eventcatalog/src/components/MDX/Flow/Flow.astro +4 -0
  78. package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +14 -0
  79. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +49 -18
  80. package/eventcatalog/src/components/MDX/RemoteFile.astro +2 -24
  81. package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +59 -93
  82. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -32
  83. package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +20 -67
  84. package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -11
  85. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +11 -60
  86. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +1 -3
  87. package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +0 -3
  88. package/eventcatalog/src/components/SchemaExplorer/VersionHistoryModal.tsx +2 -9
  89. package/eventcatalog/src/components/SchemaExplorer/parse-schema.ts +46 -0
  90. package/eventcatalog/src/components/SchemaExplorer/utils.ts +11 -0
  91. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +2 -9
  92. package/eventcatalog/src/components/Settings/LicenseSettings.tsx +288 -0
  93. package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +3 -19
  94. package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +85 -30
  95. package/eventcatalog/src/components/Settings/SettingsShared.tsx +7 -75
  96. package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +2 -2
  97. package/eventcatalog/src/components/TrialBadge.astro +82 -0
  98. package/eventcatalog/src/content.config.ts +9 -96
  99. package/eventcatalog/src/{enterprise → features}/ai/chat-api.ts +22 -34
  100. package/eventcatalog/src/{enterprise → features}/analytics/adapters/ga4.ts +0 -5
  101. package/eventcatalog/src/{enterprise → features}/analytics/adapters/gtm.ts +0 -5
  102. package/eventcatalog/src/{enterprise → features}/analytics/adapters/posthog.ts +0 -5
  103. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsHead.astro +2 -4
  104. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsTracker.astro +2 -4
  105. package/eventcatalog/src/{enterprise → features}/analytics/tracker.ts +0 -5
  106. package/eventcatalog/src/{enterprise → features}/api/catalog.ts +0 -5
  107. package/eventcatalog/src/{enterprise → features}/auth/[...auth].ts +0 -5
  108. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware-auth.ts +0 -5
  109. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware.ts +0 -5
  110. package/eventcatalog/src/{enterprise → features}/collections/custom-pages.ts +0 -5
  111. package/eventcatalog/src/{enterprise → features}/collections/index.ts +0 -5
  112. package/eventcatalog/src/{enterprise → features}/collections/resource-docs.ts +0 -5
  113. package/eventcatalog/src/{enterprise → features}/custom-documentation/collection.ts +0 -5
  114. package/eventcatalog/src/features/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +9 -0
  115. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +0 -5
  116. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +1 -6
  117. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +0 -5
  118. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/index.tsx +1 -6
  119. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/types.ts +0 -5
  120. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/index.astro → features/custom-documentation/components/CustomDocumentationPage.astro} +5 -5
  121. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/badge-styles.ts +0 -5
  122. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/custom-docs.ts +1 -6
  123. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/docs-search.ts +0 -5
  124. package/eventcatalog/src/{enterprise → features}/custom-pages/routes.ts +0 -5
  125. package/eventcatalog/src/{enterprise → features}/directory/user-team-directory.ts +0 -5
  126. package/eventcatalog/src/{enterprise → features}/fields/field-extractor.ts +0 -5
  127. package/eventcatalog/src/{enterprise → features}/fields/field-indexer.ts +0 -5
  128. package/eventcatalog/src/{enterprise → features}/fields/fields-db.ts +0 -5
  129. package/eventcatalog/src/{enterprise → features}/fields/pages/api/fields.ts +1 -6
  130. package/eventcatalog/src/{enterprise → features}/fields/pages/fields.astro +1 -2
  131. package/eventcatalog/src/{enterprise → features}/integrations/eventcatalog-features.ts +17 -75
  132. package/eventcatalog/src/features/mcp/apps/architecture-diagram/links.ts +59 -0
  133. package/eventcatalog/src/features/mcp/apps/architecture-diagram/node-chat.tsx +299 -0
  134. package/eventcatalog/src/features/mcp/apps/architecture-diagram/shared.ts +14 -0
  135. package/eventcatalog/src/features/mcp/apps/architecture-diagram/view.tsx +454 -0
  136. package/eventcatalog/src/features/mcp/apps/generated/viewer.html +432 -0
  137. package/eventcatalog/src/features/mcp/apps/mermaid-stub.ts +10 -0
  138. package/eventcatalog/src/features/mcp/apps/schema-viewer/schema-code.tsx +65 -0
  139. package/eventcatalog/src/features/mcp/apps/schema-viewer/shared.ts +23 -0
  140. package/eventcatalog/src/features/mcp/apps/schema-viewer/view.tsx +170 -0
  141. package/eventcatalog/src/features/mcp/apps/shared/app-view.tsx +98 -0
  142. package/eventcatalog/src/features/mcp/apps/shared/resource-types.ts +15 -0
  143. package/eventcatalog/src/features/mcp/apps/viewer/shared.ts +24 -0
  144. package/eventcatalog/src/features/mcp/apps/viewer/styles.css +25 -0
  145. package/eventcatalog/src/features/mcp/apps/viewer/view.tsx +59 -0
  146. package/eventcatalog/src/features/mcp/mcp-app-icons.ts +63 -0
  147. package/eventcatalog/src/features/mcp/mcp-apps.ts +160 -0
  148. package/eventcatalog/src/{enterprise → features}/mcp/mcp-auth.ts +0 -5
  149. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scope.ts +7 -7
  150. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scoped-tools.ts +47 -40
  151. package/eventcatalog/src/{enterprise → features}/mcp/mcp-server.ts +347 -34
  152. package/eventcatalog/src/{enterprise → features}/mcp/oauth-protected-resource.ts +0 -5
  153. package/eventcatalog/src/features/mcp/schema-viewer.ts +24 -0
  154. package/eventcatalog/src/{enterprise → features}/tools/catalog-tools.ts +133 -102
  155. package/eventcatalog/src/features/tools/index.ts +5 -0
  156. package/eventcatalog/src/{enterprise → features}/visualizer-layout/reset.ts +0 -5
  157. package/eventcatalog/src/{enterprise → features}/visualizer-layout/save.ts +0 -5
  158. package/eventcatalog/src/layouts/BaseLayout.astro +2 -2
  159. package/eventcatalog/src/layouts/Footer.astro +31 -39
  160. package/eventcatalog/src/layouts/SettingsLayout.astro +6 -6
  161. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -37
  162. package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts +0 -22
  163. package/eventcatalog/src/{enterprise → pages}/api/schemas/services/[id]/[version]/[specification]/index.ts +0 -19
  164. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/_index.data.ts +2 -6
  165. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -5
  166. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/_index.data.ts +2 -6
  167. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +1 -5
  168. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].md.ts +2 -6
  169. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].mdx.ts +2 -6
  170. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
  171. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +12 -0
  172. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/root-index.astro → pages/docs/custom/index.astro} +1 -23
  173. package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +4 -9
  174. package/eventcatalog/src/pages/docs/llm/llms.txt.ts +4 -4
  175. package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +0 -11
  176. package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +2 -2
  177. package/eventcatalog/src/pages/index.astro +2 -2
  178. package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +0 -3
  179. package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -4
  180. package/eventcatalog/src/pages/settings/assistant.astro +2 -4
  181. package/eventcatalog/src/pages/settings/license.astro +18 -0
  182. package/eventcatalog/src/pages/settings/llm-access.astro +1 -4
  183. package/eventcatalog/src/pages/settings/mcp.astro +33 -4
  184. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +1 -2
  185. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/data/index.astro +2 -45
  186. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +1 -1
  187. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version].mermaid.ts +7 -109
  188. package/eventcatalog/src/pages/visualiser/_mermaid-route.ts +78 -0
  189. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/_index.data.ts +44 -0
  190. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +1 -1
  191. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/index.astro +56 -0
  192. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/index.astro +3 -40
  193. package/eventcatalog/src/pages/visualiser/domains/[id]/[version].mermaid.ts +20 -0
  194. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/_index.data.ts +29 -0
  195. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +3 -38
  196. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/index.astro +56 -0
  197. package/eventcatalog/src/pages/visualiser/systems/[id]/[version].mermaid.ts +20 -0
  198. package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +1 -1
  199. package/eventcatalog/src/stores/sidebar-store/builders/container.ts +1 -1
  200. package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +1 -1
  201. package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +7 -32
  202. package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +1 -1
  203. package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
  204. package/eventcatalog/src/stores/sidebar-store/builders/service.ts +2 -8
  205. package/eventcatalog/src/stores/sidebar-store/builders/system.ts +2 -12
  206. package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +0 -10
  207. package/eventcatalog/src/stores/sidebar-store/state.ts +4 -6
  208. package/eventcatalog/src/styles/theme.css +22 -18
  209. package/eventcatalog/src/styles/themes/forest.css +8 -8
  210. package/eventcatalog/src/styles/themes/ocean.css +8 -8
  211. package/eventcatalog/src/styles/themes/sapphire.css +8 -8
  212. package/eventcatalog/src/styles/themes/sunset.css +8 -8
  213. package/eventcatalog/src/utils/clipboard.ts +4 -4
  214. package/eventcatalog/src/utils/collections/flow-step-schema.ts +117 -0
  215. package/eventcatalog/src/utils/collections/pointer-schema.ts +7 -0
  216. package/eventcatalog/src/utils/collections/resource-docs.ts +677 -14
  217. package/eventcatalog/src/utils/collections/schema-loader.ts +0 -5
  218. package/eventcatalog/src/utils/feature.ts +14 -23
  219. package/eventcatalog/src/utils/license.ts +114 -0
  220. package/eventcatalog/src/utils/node-graphs/architecture-diagram-types.ts +32 -0
  221. package/eventcatalog/src/utils/node-graphs/architecture-diagram.ts +84 -0
  222. package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +4 -25
  223. package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +12 -39
  224. package/eventcatalog/src/utils/node-graphs/data-products-node-graph.ts +11 -27
  225. package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +679 -0
  226. package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +3 -20
  227. package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +51 -4
  228. package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +8 -23
  229. package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +119 -0
  230. package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +133 -47
  231. package/eventcatalog/src/utils/node-graphs/layout-node-graph.ts +28 -0
  232. package/eventcatalog/src/utils/node-graphs/layout-persistence.ts +3 -3
  233. package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +16 -34
  234. package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +11 -25
  235. package/eventcatalog/src/utils/node-graphs/system-context-node-graph.ts +18 -54
  236. package/eventcatalog/src/utils/node-graphs/system-levels-node-graph.ts +59 -0
  237. package/eventcatalog/src/utils/node-graphs/systems-node-graph.ts +20 -80
  238. package/eventcatalog/src/utils/node-graphs/utils/utils.ts +1 -78
  239. package/eventcatalog/src/utils/trial.ts +36 -0
  240. package/eventcatalog/tsconfig.json +1 -1
  241. package/package.json +11 -11
  242. package/dist/chunk-FV56YFM4.js +0 -7
  243. package/dist/federation/entitlement.cjs +0 -31
  244. package/dist/federation/entitlement.d.cts +0 -12
  245. package/dist/federation/entitlement.d.ts +0 -12
  246. package/dist/federation/entitlement.js +0 -6
  247. package/dist/runtime-dependencies/dagre.mjs +0 -3
  248. package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +0 -265
  249. package/eventcatalog/src/enterprise/LICENSE +0 -57
  250. package/eventcatalog/src/enterprise/README.md +0 -5
  251. package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +0 -691
  252. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +0 -9
  253. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro +0 -18
  254. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/feature.astro +0 -171
  255. package/eventcatalog/src/enterprise/feature.ts +0 -75
  256. package/eventcatalog/src/enterprise/tools/index.ts +0 -10
  257. package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +0 -126
  258. package/eventcatalog/src/pages/settings/billing.astro +0 -17
  259. package/eventcatalog/src/pages/visualiser/domain-integrations/index.astro +0 -26
  260. package/eventcatalog/src/types/mcp-modules.d.ts +0 -67
  261. package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +0 -261
  262. package/eventcatalog/src/utils/node-graphs/export-node-graph.ts +0 -91
  263. /package/eventcatalog/src/{enterprise → features}/auth/error.astro +0 -0
  264. /package/eventcatalog/src/{enterprise → features}/auth/login.astro +0 -0
  265. /package/eventcatalog/src/{enterprise → features}/auth/unauthorized.astro +0 -0
  266. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path]/_index.data.ts +0 -0
  267. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path].mdx.ts +0 -0
@@ -1,8 +1,3 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
- */
5
-
6
1
  import type { APIRoute } from 'astro';
7
2
  import { getMcpProtectedResourceMetadata } from './mcp-auth';
8
3
 
@@ -0,0 +1,24 @@
1
+ import { parseSchemaForViewer } from '@components/SchemaExplorer/parse-schema';
2
+ import { getLanguageForHighlight } from '@components/SchemaExplorer/utils';
3
+ import { getSchemaExtensionForFormat } from '@utils/collections/schemas';
4
+ import type { SchemaViewerSchema } from './apps/schema-viewer/shared';
5
+
6
+ type SchemaToolResult = { name?: string; format?: string; url?: string; code: string };
7
+
8
+ /**
9
+ * The schemas returned by getSchemaForResource, ready for the schema viewer: parsed for its Properties tab
10
+ * and with the language to highlight them in, the same way EventCatalog's schema pages do.
11
+ */
12
+ export const toSchemaViewerSchemas = (schemas: SchemaToolResult[]): SchemaViewerSchema[] =>
13
+ schemas.map((schema) => {
14
+ // Schemas in the schemas collection have a format (jsonschema, avro, protobuf), others a file extension
15
+ const format = schema.format ?? schema.url?.split('.').pop() ?? '';
16
+ const extension = getSchemaExtensionForFormat(format);
17
+ return {
18
+ ...parseSchemaForViewer(extension, schema.code),
19
+ ...(schemas.length > 1 && { name: schema.name ?? schema.url?.split('/').pop() ?? format }),
20
+ format,
21
+ language: getLanguageForHighlight(extension),
22
+ code: schema.code,
23
+ };
24
+ });
@@ -1,40 +1,28 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
- */
5
-
6
1
  /**
7
2
  * Shared catalog tools for accessing EventCatalog resources.
8
3
  * Used by both the AI Chat feature and MCP Server.
9
4
  */
10
- import { getCollection, getEntry } from 'astro:content';
5
+ import { getCollection } from 'astro:content';
11
6
  import { z } from 'zod';
12
7
  import { getSchemasFromResource, getSchemaFormatFromURL } from '@utils/collections/schemas';
13
8
  import { getItemsFromCollectionByIdAndSemverOrLatest } from '@utils/collections/util';
14
9
  import { getUbiquitousLanguageWithSubdomains } from '@utils/collections/domains';
15
10
  import { getAbsoluteFilePathForAstroFile } from '@utils/files';
16
11
  import fs from 'node:fs';
17
- import { getNodesAndEdges as getNodesAndEdgesForService } from '@utils/node-graphs/services-node-graph';
18
- import { getNodesAndEdges as getNodesAndEdgesForAgent } from '@utils/node-graphs/agents-node-graph';
12
+ import { getArchitectureDiagramGraph } from '@utils/node-graphs/architecture-diagram';
19
13
  import {
20
- getNodesAndEdgesForCommands,
21
- getNodesAndEdgesForEvents,
22
- getNodesAndEdgesForQueries,
23
- } from '@utils/node-graphs/message-node-graph';
24
- import { getNodesAndEdges as getNodesAndEdgesForDomain } from '@utils/node-graphs/domains-node-graph';
25
- import { getNodesAndEdges as getNodesAndEdgesForFlows } from '@utils/node-graphs/flows-node-graph';
26
- import { getNodesAndEdges as getNodesAndEdgesForDataProduct } from '@utils/node-graphs/data-products-node-graph';
27
- import { getNodesAndEdges as getNodesAndEdgesForContainer } from '@utils/node-graphs/container-node-graph';
28
- import { getNodesAndEdges as getNodesAndEdgesForSystem } from '@utils/node-graphs/systems-node-graph';
14
+ ARCHITECTURE_DIAGRAM_COLLECTIONS,
15
+ isArchitectureDiagramCollection,
16
+ type ArchitectureDiagramDetail,
17
+ } from '@utils/node-graphs/architecture-diagram-types';
29
18
  import { convertToMermaid } from '@utils/node-graphs/export-mermaid';
30
- import config from '@config';
31
19
  import { glob } from 'glob';
32
20
  import path from 'node:path';
33
21
  import {
34
22
  buildDocsSearchIndex,
35
23
  chunkMarkdownByHeadings,
36
24
  type DocsSearchIndex,
37
- } from '@enterprise/custom-documentation/utils/docs-search';
25
+ } from '@features/custom-documentation/utils/docs-search';
38
26
 
39
27
  const MESSAGE_COLLECTIONS = new Set(['events', 'commands', 'queries']);
40
28
  const LIKEC4_SOURCE_PATTERN = '**/*.{c4,likec4}';
@@ -209,34 +197,35 @@ export const resourceCollectionSchema = z.enum([
209
197
  'data-products',
210
198
  ]);
211
199
 
212
- export const visualiserCollectionSchema = z.enum([
213
- 'events',
214
- 'commands',
215
- 'queries',
216
- 'agents',
217
- 'services',
218
- 'domains',
219
- 'systems',
220
- 'flows',
221
- 'containers',
222
- 'data-products',
223
- ]);
200
+ export const visualiserCollectionSchema = z.enum(ARCHITECTURE_DIAGRAM_COLLECTIONS);
224
201
 
225
202
  // ============================================
226
203
  // Tool implementations (core logic)
227
204
  // ============================================
228
205
 
206
+ /**
207
+ * Find a catalog entry by id and version. When no version (or 'latest') is given, the latest version is returned.
208
+ */
209
+ async function findEntry(collection: string, id: string, version?: string): Promise<any | undefined> {
210
+ const entries = await getCollection(collection as any);
211
+ return getItemsFromCollectionByIdAndSemverOrLatest(entries as any[], id, version)[0];
212
+ }
213
+
214
+ const describeVersion = (version?: string) => version ?? 'latest';
215
+
229
216
  /**
230
217
  * Get resources from a collection with optional pagination and search
231
218
  */
232
219
  export async function getResources(params: { collection: string; cursor?: string; search?: string }) {
233
220
  const resources = await getCollection(params.collection as any);
234
- let allResults = resources.map((resource: any) => ({
235
- id: resource.data.id,
236
- version: resource.data.version,
237
- name: resource.data.name,
238
- summary: resource.data.summary,
239
- }));
221
+ let allResults = resources
222
+ .filter((resource: any) => resource.data.hidden !== true)
223
+ .map((resource: any) => ({
224
+ id: resource.data.id,
225
+ version: resource.data.version,
226
+ name: resource.data.name,
227
+ summary: resource.data.summary,
228
+ }));
240
229
 
241
230
  // Apply search filter if provided
242
231
  if (params.search) {
@@ -263,46 +252,90 @@ export async function getResources(params: { collection: string; cursor?: string
263
252
  }
264
253
 
265
254
  /**
266
- * Get a specific resource by id and version
255
+ * Get a specific resource by id and version (defaults to the latest version).
256
+ * Returns the frontmatter and markdown body only, not internal Astro entry fields such as file paths.
267
257
  */
268
- export async function getResource(params: { collection: string; id: string; version: string }) {
269
- const resource = await getEntry(params.collection as any, `${params.id}-${params.version}`);
258
+ export async function getResource(params: { collection: string; id: string; version?: string }) {
259
+ const resource = await findEntry(params.collection, params.id, params.version);
270
260
 
271
261
  if (!resource) {
272
- return { error: `Resource not found: ${params.id}-${params.version}` };
262
+ return { error: `Resource not found: ${params.id} (${describeVersion(params.version)}) in ${params.collection}` };
273
263
  }
274
264
 
275
- return resource;
265
+ return {
266
+ id: resource.data.id,
267
+ version: resource.data.version,
268
+ collection: params.collection,
269
+ data: resource.data,
270
+ body: resource.body,
271
+ };
276
272
  }
277
273
 
274
+ type MessagePointer = { id: string; version?: string };
275
+
278
276
  /**
279
- * Get messages produced or consumed by a resource
277
+ * Resolve a sends/receives pointer to the documented message it points at
278
+ */
279
+ const resolveMessagePointer = (messages: any[], pointer: MessagePointer) => {
280
+ const message = getItemsFromCollectionByIdAndSemverOrLatest(messages, pointer.id, pointer.version)[0];
281
+
282
+ if (!message) {
283
+ return { id: pointer.id, version: describeVersion(pointer.version), notFound: true };
284
+ }
285
+
286
+ return {
287
+ id: message.data.id,
288
+ version: message.data.version,
289
+ name: message.data.name || message.data.id,
290
+ summary: message.data.summary,
291
+ collection: message.collection,
292
+ };
293
+ };
294
+
295
+ /**
296
+ * Get the messages (events, commands, queries) a resource sends and receives, resolved to their catalog entries
280
297
  */
281
298
  export async function getMessagesProducedOrConsumedByResource(params: {
282
299
  resourceId: string;
283
- resourceVersion: string;
300
+ resourceVersion?: string;
284
301
  resourceCollection: string;
285
302
  }) {
286
- const resource = await getEntry(params.resourceCollection as any, `${params.resourceId}-${params.resourceVersion}`);
303
+ const resource = await findEntry(params.resourceCollection, params.resourceId, params.resourceVersion);
287
304
 
288
305
  if (!resource) {
289
306
  return {
290
- error: `Resource not found with id ${params.resourceId} and version ${params.resourceVersion} and collection ${params.resourceCollection}`,
307
+ error: `Resource not found with id ${params.resourceId} and version ${describeVersion(params.resourceVersion)} and collection ${params.resourceCollection}`,
291
308
  };
292
309
  }
293
310
 
294
- return resource;
311
+ const [events, commands, queries] = await Promise.all([
312
+ getCollection('events'),
313
+ getCollection('commands'),
314
+ getCollection('queries'),
315
+ ]);
316
+ const messages = [...events, ...commands, ...queries];
317
+
318
+ return {
319
+ resource: {
320
+ id: resource.data.id,
321
+ version: resource.data.version,
322
+ name: resource.data.name || resource.data.id,
323
+ collection: params.resourceCollection,
324
+ },
325
+ sends: (resource.data.sends || []).map((pointer: MessagePointer) => resolveMessagePointer(messages, pointer)),
326
+ receives: (resource.data.receives || []).map((pointer: MessagePointer) => resolveMessagePointer(messages, pointer)),
327
+ };
295
328
  }
296
329
 
297
330
  /**
298
331
  * Get schema or specifications for a resource
299
332
  */
300
- export async function getSchemaForResource(params: { resourceId: string; resourceVersion: string; resourceCollection: string }) {
301
- const resource = await getEntry(params.resourceCollection as any, `${params.resourceId}-${params.resourceVersion}`);
333
+ export async function getSchemaForResource(params: { resourceId: string; resourceVersion?: string; resourceCollection: string }) {
334
+ const resource = await findEntry(params.resourceCollection, params.resourceId, params.resourceVersion);
302
335
 
303
336
  if (!resource) {
304
337
  return {
305
- error: `Resource not found with id ${params.resourceId} and version ${params.resourceVersion} and collection ${params.resourceCollection}`,
338
+ error: `Resource not found with id ${params.resourceId} and version ${describeVersion(params.resourceVersion)} and collection ${params.resourceCollection}`,
306
339
  };
307
340
  }
308
341
 
@@ -312,7 +345,7 @@ export async function getSchemaForResource(params: { resourceId: string; resourc
312
345
  (schema) =>
313
346
  schema.data.message.collectionName === params.resourceCollection &&
314
347
  schema.data.message.id === params.resourceId &&
315
- schema.data.message.version === params.resourceVersion
348
+ schema.data.message.version === resource.data.version
316
349
  );
317
350
 
318
351
  if (schemas.length > 0) {
@@ -390,30 +423,31 @@ export async function findResourcesByOwner(params: { ownerId: string }) {
390
423
  /**
391
424
  * Get resources that produce (send) a specific message
392
425
  */
393
- export async function getProducersOfMessage(params: { messageId: string; messageVersion: string; messageCollection: string }) {
426
+ export async function getProducersOfMessage(params: { messageId: string; messageVersion?: string; messageCollection: string }) {
394
427
  const [services, agents] = await Promise.all([getCollection('services'), getCollection('agents')]);
395
428
  const routableResources = [...services, ...agents];
396
- const message = await getEntry(params.messageCollection as any, `${params.messageId}-${params.messageVersion}`);
429
+ const message = await findEntry(params.messageCollection, params.messageId, params.messageVersion);
397
430
 
398
431
  if (!message) {
399
432
  return {
400
- error: `Message not found: ${params.messageId}-${params.messageVersion} in ${params.messageCollection}`,
433
+ error: `Message not found: ${params.messageId} (${describeVersion(params.messageVersion)}) in ${params.messageCollection}`,
401
434
  };
402
435
  }
436
+ const messageVersion = message.data.version;
403
437
 
404
438
  const producers = routableResources.filter((resource) => {
405
439
  const sends = (resource.data as any).sends || [];
406
440
  return sends.some((send: any) => {
407
441
  const idMatch = send.id === params.messageId;
408
442
  if (!send.version || send.version === 'latest') return idMatch;
409
- return idMatch && send.version === params.messageVersion;
443
+ return idMatch && send.version === messageVersion;
410
444
  });
411
445
  });
412
446
 
413
447
  return {
414
448
  message: {
415
449
  id: params.messageId,
416
- version: params.messageVersion,
450
+ version: messageVersion,
417
451
  collection: params.messageCollection,
418
452
  },
419
453
  producers: producers.map((s) => ({
@@ -469,30 +503,31 @@ export async function getC4Diagram(params: { viewId?: string }) {
469
503
  /**
470
504
  * Get resources that consume (receive) a specific message
471
505
  */
472
- export async function getConsumersOfMessage(params: { messageId: string; messageVersion: string; messageCollection: string }) {
506
+ export async function getConsumersOfMessage(params: { messageId: string; messageVersion?: string; messageCollection: string }) {
473
507
  const [services, agents] = await Promise.all([getCollection('services'), getCollection('agents')]);
474
508
  const routableResources = [...services, ...agents];
475
- const message = await getEntry(params.messageCollection as any, `${params.messageId}-${params.messageVersion}`);
509
+ const message = await findEntry(params.messageCollection, params.messageId, params.messageVersion);
476
510
 
477
511
  if (!message) {
478
512
  return {
479
- error: `Message not found: ${params.messageId}-${params.messageVersion} in ${params.messageCollection}`,
513
+ error: `Message not found: ${params.messageId} (${describeVersion(params.messageVersion)}) in ${params.messageCollection}`,
480
514
  };
481
515
  }
516
+ const messageVersion = message.data.version;
482
517
 
483
518
  const consumers = routableResources.filter((resource) => {
484
519
  const receives = (resource.data as any).receives || [];
485
520
  return receives.some((receive: any) => {
486
521
  const idMatch = receive.id === params.messageId;
487
522
  if (!receive.version || receive.version === 'latest') return idMatch;
488
- return idMatch && receive.version === params.messageVersion;
523
+ return idMatch && receive.version === messageVersion;
489
524
  });
490
525
  });
491
526
 
492
527
  return {
493
528
  message: {
494
529
  id: params.messageId,
495
- version: params.messageVersion,
530
+ version: messageVersion,
496
531
  collection: params.messageCollection,
497
532
  },
498
533
  consumers: consumers.map((s) => ({
@@ -509,16 +544,17 @@ export async function getConsumersOfMessage(params: { messageId: string; message
509
544
  * Analyze the impact of changing a message (event, command, query)
510
545
  * Returns all affected services (producers and consumers) and their owners
511
546
  */
512
- export async function analyzeChangeImpact(params: { messageId: string; messageVersion: string; messageCollection: string }) {
547
+ export async function analyzeChangeImpact(params: { messageId: string; messageVersion?: string; messageCollection: string }) {
513
548
  const [services, agents] = await Promise.all([getCollection('services'), getCollection('agents')]);
514
549
  const routableResources = [...services, ...agents];
515
- const message = await getEntry(params.messageCollection as any, `${params.messageId}-${params.messageVersion}`);
550
+ const message = await findEntry(params.messageCollection, params.messageId, params.messageVersion);
516
551
 
517
552
  if (!message) {
518
553
  return {
519
- error: `Message not found: ${params.messageId}-${params.messageVersion} in ${params.messageCollection}`,
554
+ error: `Message not found: ${params.messageId} (${describeVersion(params.messageVersion)}) in ${params.messageCollection}`,
520
555
  };
521
556
  }
557
+ const messageVersion = message.data.version;
522
558
 
523
559
  // Find producers
524
560
  const producers = routableResources.filter((resource) => {
@@ -552,7 +588,7 @@ export async function analyzeChangeImpact(params: { messageId: string; messageVe
552
588
  return {
553
589
  message: {
554
590
  id: params.messageId,
555
- version: params.messageVersion,
591
+ version: messageVersion,
556
592
  collection: params.messageCollection,
557
593
  name: (message.data as any).name || params.messageId,
558
594
  },
@@ -589,11 +625,11 @@ export async function analyzeChangeImpact(params: { messageId: string; messageVe
589
625
  * Get detailed information about a flow (state machine / business process)
590
626
  * Returns the flow with its steps, description, and related services
591
627
  */
592
- export async function explainBusinessFlow(params: { flowId: string; flowVersion: string }) {
593
- const flow = await getEntry('flows', `${params.flowId}-${params.flowVersion}`);
628
+ export async function explainBusinessFlow(params: { flowId: string; flowVersion?: string }) {
629
+ const flow = await findEntry('flows', params.flowId, params.flowVersion);
594
630
 
595
631
  if (!flow) {
596
- return { error: `Flow not found: ${params.flowId}-${params.flowVersion}` };
632
+ return { error: `Flow not found: ${params.flowId} (${describeVersion(params.flowVersion)})` };
597
633
  }
598
634
 
599
635
  // Get related services and agents that use this flow
@@ -881,12 +917,12 @@ export async function explainUbiquitousLanguageTerms(params: { domainId: string;
881
917
  * Get the inputs (resources consumed) for a data product
882
918
  * Returns fully hydrated input resources
883
919
  */
884
- export async function getDataProductInputs(params: { dataProductId: string; dataProductVersion: string }) {
885
- const dataProduct = await getEntry('data-products', `${params.dataProductId}-${params.dataProductVersion}`);
920
+ export async function getDataProductInputs(params: { dataProductId: string; dataProductVersion?: string }) {
921
+ const dataProduct = await findEntry('data-products', params.dataProductId, params.dataProductVersion);
886
922
 
887
923
  if (!dataProduct) {
888
924
  return {
889
- error: `Data product not found: ${params.dataProductId}-${params.dataProductVersion}`,
925
+ error: `Data product not found: ${params.dataProductId} (${describeVersion(params.dataProductVersion)})`,
890
926
  };
891
927
  }
892
928
 
@@ -895,7 +931,7 @@ export async function getDataProductInputs(params: { dataProductId: string; data
895
931
  if (inputPointers.length === 0) {
896
932
  return {
897
933
  dataProductId: params.dataProductId,
898
- dataProductVersion: params.dataProductVersion,
934
+ dataProductVersion: dataProduct.data.version,
899
935
  message: 'No inputs found for this data product',
900
936
  inputs: [],
901
937
  };
@@ -932,7 +968,7 @@ export async function getDataProductInputs(params: { dataProductId: string; data
932
968
 
933
969
  return {
934
970
  dataProductId: params.dataProductId,
935
- dataProductVersion: params.dataProductVersion,
971
+ dataProductVersion: dataProduct.data.version,
936
972
  dataProductName: (dataProduct.data as any).name || params.dataProductId,
937
973
  inputs: hydratedInputs,
938
974
  totalCount: hydratedInputs.length,
@@ -943,12 +979,12 @@ export async function getDataProductInputs(params: { dataProductId: string; data
943
979
  * Get the outputs (resources produced) for a data product
944
980
  * Returns fully hydrated output resources with their contracts
945
981
  */
946
- export async function getDataProductOutputs(params: { dataProductId: string; dataProductVersion: string }) {
947
- const dataProduct = await getEntry('data-products', `${params.dataProductId}-${params.dataProductVersion}`);
982
+ export async function getDataProductOutputs(params: { dataProductId: string; dataProductVersion?: string }) {
983
+ const dataProduct = await findEntry('data-products', params.dataProductId, params.dataProductVersion);
948
984
 
949
985
  if (!dataProduct) {
950
986
  return {
951
- error: `Data product not found: ${params.dataProductId}-${params.dataProductVersion}`,
987
+ error: `Data product not found: ${params.dataProductId} (${describeVersion(params.dataProductVersion)})`,
952
988
  };
953
989
  }
954
990
 
@@ -957,7 +993,7 @@ export async function getDataProductOutputs(params: { dataProductId: string; dat
957
993
  if (outputPointers.length === 0) {
958
994
  return {
959
995
  dataProductId: params.dataProductId,
960
- dataProductVersion: params.dataProductVersion,
996
+ dataProductVersion: dataProduct.data.version,
961
997
  message: 'No outputs found for this data product',
962
998
  outputs: [],
963
999
  };
@@ -1016,7 +1052,7 @@ export async function getDataProductOutputs(params: { dataProductId: string; dat
1016
1052
 
1017
1053
  return {
1018
1054
  dataProductId: params.dataProductId,
1019
- dataProductVersion: params.dataProductVersion,
1055
+ dataProductVersion: dataProduct.data.version,
1020
1056
  dataProductName: (dataProduct.data as any).name || params.dataProductId,
1021
1057
  outputs: hydratedOutputs,
1022
1058
  totalCount: hydratedOutputs.length,
@@ -1027,44 +1063,37 @@ export async function getDataProductOutputs(params: { dataProductId: string; dat
1027
1063
  // Architecture Diagram (Mermaid) tools
1028
1064
  // ============================================
1029
1065
 
1030
- const getNodesAndEdgesFunctions = {
1031
- agents: getNodesAndEdgesForAgent,
1032
- services: getNodesAndEdgesForService,
1033
- events: getNodesAndEdgesForEvents,
1034
- commands: getNodesAndEdgesForCommands,
1035
- queries: getNodesAndEdgesForQueries,
1036
- domains: getNodesAndEdgesForDomain,
1037
- flows: getNodesAndEdgesForFlows,
1038
- containers: getNodesAndEdgesForContainer,
1039
- 'data-products': getNodesAndEdgesForDataProduct,
1040
- systems: getNodesAndEdgesForSystem,
1041
- };
1042
-
1043
1066
  /**
1044
1067
  * Get the architecture diagram for a resource as Mermaid code
1045
1068
  * Returns flowchart syntax that can be rendered or used for understanding architecture
1046
1069
  */
1047
1070
  export async function getArchitectureDiagramAsMermaid(params: {
1048
1071
  resourceId: string;
1049
- resourceVersion: string;
1072
+ resourceVersion?: string;
1050
1073
  resourceCollection: string;
1074
+ detail?: ArchitectureDiagramDetail;
1051
1075
  }) {
1052
- const { resourceId, resourceVersion, resourceCollection } = params;
1076
+ const { resourceId, resourceCollection, detail = 'full' } = params;
1053
1077
 
1054
1078
  // Validate the collection is supported for visualisation
1055
- if (!(resourceCollection in getNodesAndEdgesFunctions)) {
1079
+ if (!isArchitectureDiagramCollection(resourceCollection)) {
1056
1080
  return {
1057
- error: `Collection '${resourceCollection}' does not support architecture diagrams. Supported collections: ${Object.keys(getNodesAndEdgesFunctions).join(', ')}`,
1081
+ error: `Collection '${resourceCollection}' does not support architecture diagrams. Supported collections: ${ARCHITECTURE_DIAGRAM_COLLECTIONS.join(', ')}`,
1058
1082
  };
1059
1083
  }
1060
1084
 
1085
+ const resource = await findEntry(resourceCollection, resourceId, params.resourceVersion);
1086
+ if (!resource) {
1087
+ return { error: `Resource not found: ${resourceId} (${describeVersion(params.resourceVersion)}) in ${resourceCollection}` };
1088
+ }
1089
+ const resourceVersion: string = resource.data.version;
1090
+
1061
1091
  try {
1062
- // Get nodes and edges for this resource
1063
- const { nodes, edges } = await getNodesAndEdgesFunctions[resourceCollection as keyof typeof getNodesAndEdgesFunctions]({
1092
+ const { nodes, edges } = await getArchitectureDiagramGraph({
1093
+ collection: resourceCollection,
1064
1094
  id: resourceId,
1065
1095
  version: resourceVersion,
1066
- mode: 'full',
1067
- channelRenderMode: config.visualiser?.channels?.renderMode === 'single' ? 'single' : 'flat',
1096
+ detail,
1068
1097
  });
1069
1098
 
1070
1099
  if (!nodes || nodes.length === 0) {
@@ -1083,6 +1112,7 @@ export async function getArchitectureDiagramAsMermaid(params: {
1083
1112
  resourceId,
1084
1113
  resourceVersion,
1085
1114
  resourceCollection,
1115
+ detail,
1086
1116
  mermaidCode,
1087
1117
  nodeCount: nodes.length,
1088
1118
  edgeCount: edges.length,
@@ -1229,9 +1259,10 @@ export async function getCustomDoc(params: { id: string; section?: string }) {
1229
1259
  export const toolDescriptions = {
1230
1260
  getResources:
1231
1261
  'Use this tool to get events, agents, services, commands, queries, flows, domains, channels, entities from EventCatalog. Supports pagination via cursor and filtering by search term (searches name, id, and summary).',
1232
- getResource: 'Use this tool to get a specific resource from EventCatalog by its id and version',
1262
+ getResource:
1263
+ 'Use this tool to get a specific resource from EventCatalog by its id. Returns the frontmatter and markdown documentation. Omit the version to get the latest version.',
1233
1264
  getMessagesProducedOrConsumedByResource:
1234
- 'Use this tool to get the messages produced or consumed by a resource by its id and version. Look at the `sends` and `receives` properties to get the messages produced or consumed by the resource',
1265
+ 'Use this tool to get the messages (events, commands, queries) a service, agent or domain sends and receives. Each message is resolved to its catalog id, version, name and summary; messages that are referenced but not documented in the catalog are marked notFound. Omit the version to use the latest version of the resource.',
1235
1266
  getSchemaForResource:
1236
1267
  'Use this tool to get the schema or specifications (openapi or asyncapi or graphql) for a resource by its id and version',
1237
1268
  findResourcesByOwner:
@@ -1261,7 +1292,7 @@ export const toolDescriptions = {
1261
1292
  getDataProductOutputs:
1262
1293
  'Use this tool to get the outputs (resources produced) for a data product. Returns fully hydrated output resources with their id, version, name, summary, collection type, and data contracts (if defined). Data contracts include the contract name, path, format, type, and content.',
1263
1294
  getArchitectureDiagramAsMermaid:
1264
- 'Use this tool to get the architecture diagram for a resource as Mermaid flowchart code. This shows how the resource connects to other resources (agents, services, systems, events, channels, etc.) in the architecture. The mermaid code can be rendered to visualize the architecture or used to understand relationships. Supported collections: events, commands, queries, agents, services, domains, systems, flows, containers, data-products.',
1295
+ 'Use this tool first when you need an overview of how part of the architecture fits together. Returns the architecture diagram for a resource as Mermaid flowchart code, built the same way as its Diagram page in EventCatalog: the resources it connects to (services, agents, systems, domains, events, commands, queries, channels, data stores), with labelled edges (e.g. publishes, subscribes to, invokes). Systems and domains appear as subgraphs, so you can see what is inside a boundary and what is outside it. For domains and systems, pass detail "overview" for just the domains, systems and their relationships (smaller), or "full" (default) to include services, messages and channels. One call replaces walking producers and consumers one at a time, and the Mermaid can be shown to the user or added to docs and pull requests. Supported collections: events, commands, queries, agents, services, domains, systems, flows, containers, data-products.',
1265
1296
  getCustomDocs:
1266
1297
  'Use this tool to list the custom documentation pages in EventCatalog (guides, runbooks, architecture notes, onboarding docs, etc.). Returns page ids, titles, and summaries without page content. Supports pagination via cursor and filtering by search term (searches title, id, and summary).',
1267
1298
  searchCustomDocs:
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Catalog tools for EventCatalog
3
+ * Shared utilities for AI Chat and MCP Server features
4
+ */
5
+ export * from './catalog-tools';
@@ -1,8 +1,3 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
- */
5
-
6
1
  import type { APIRoute } from 'astro';
7
2
  import fs from 'node:fs';
8
3
  import { getLayoutFilePath } from '@utils/node-graphs/layout-persistence';
@@ -1,8 +1,3 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
- */
5
-
6
1
  import type { APIRoute } from 'astro';
7
2
  import fs from 'node:fs';
8
3
  import path from 'node:path';
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import SEO from '../components/Seo.astro';
3
- import AnalyticsHead from '../enterprise/analytics/components/AnalyticsHead.astro';
4
- import AnalyticsTracker from '../enterprise/analytics/components/AnalyticsTracker.astro';
3
+ import AnalyticsHead from '../features/analytics/components/AnalyticsHead.astro';
4
+ import AnalyticsTracker from '../features/analytics/components/AnalyticsTracker.astro';
5
5
  import NavigationProgress from '../components/NavigationProgress.astro';
6
6
  import config from '@config';
7
7
 
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  import { buildUrl } from '@utils/url-builder';
3
- import { showEventCatalogBranding } from '@utils/feature';
4
3
  const { className } = Astro.props;
5
4
  ---
6
5
 
@@ -8,42 +7,35 @@ const { className } = Astro.props;
8
7
  transition:persist="site-footer"
9
8
  class={`relative py-4 space-y-8 border-t border-[rgb(var(--ec-page-border))] ${className}`}
10
9
  >
11
- {
12
- showEventCatalogBranding() && (
13
- <div class="flex justify-between items-center py-8 text-[rgb(var(--ec-page-text-muted))] text-sm font-light">
14
- <div class="flex space-x-5">
15
- <a href="https://github.com/event-catalog/eventcatalog" target="_blank" aria-label="View EventCatalog on GitHub">
16
- <svg
17
- class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
18
- style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
19
- aria-hidden="true"
20
- />
21
- </a>
22
- <a href="https://x.com/event_catalog" target="_blank" aria-label="Follow EventCatalog on X (Twitter)">
23
- <span class="sr-only">X (Twitter)</span>
24
- <svg
25
- class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
26
- style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
27
- aria-hidden="true"
28
- />
29
- </a>
30
- <a href="https://www.youtube.com/@event-catalog" target="_blank" aria-label="Watch EventCatalog on YouTube">
31
- <span class="sr-only">YouTube</span>
32
- <svg
33
- class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
34
- style={`mask-image: url("${buildUrl('/icons/youtube.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
35
- aria-hidden="true"
36
- />
37
- </a>
38
- </div>
39
- <a
40
- target="_blank"
41
- class="hover:text-[rgb(var(--ec-accent))] hover:underline text-[rgb(var(--ec-icon-color))] font-light not-prose"
42
- href="https://eventcatalog.dev"
43
- >
44
- Powered by EventCatalog
45
- </a>
46
- </div>
47
- )
48
- }
10
+ <div class="flex justify-between items-center py-8 text-[rgb(var(--ec-page-text-muted))] text-sm font-light">
11
+ <div class="flex space-x-5">
12
+ <a href="https://github.com/event-catalog/eventcatalog" target="_blank" aria-label="View EventCatalog on GitHub">
13
+ <svg
14
+ class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
15
+ style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
16
+ aria-hidden="true"></svg>
17
+ </a>
18
+ <a href="https://x.com/event_catalog" target="_blank" aria-label="Follow EventCatalog on X (Twitter)">
19
+ <span class="sr-only">X (Twitter)</span>
20
+ <svg
21
+ class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
22
+ style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
23
+ aria-hidden="true"></svg>
24
+ </a>
25
+ <a href="https://www.youtube.com/@event-catalog" target="_blank" aria-label="Watch EventCatalog on YouTube">
26
+ <span class="sr-only">YouTube</span>
27
+ <svg
28
+ class="w-5 h-5 bg-[rgb(var(--ec-icon-color))] hover:bg-[rgb(var(--ec-accent))]"
29
+ style={`mask-image: url("${buildUrl('/icons/youtube.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
30
+ aria-hidden="true"></svg>
31
+ </a>
32
+ </div>
33
+ <a
34
+ target="_blank"
35
+ class="hover:text-[rgb(var(--ec-accent))] hover:underline text-[rgb(var(--ec-icon-color))] font-light not-prose"
36
+ href="https://eventcatalog.dev"
37
+ >
38
+ Powered by EventCatalog
39
+ </a>
40
+ </div>
49
41
  </footer>