@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,49 +1,83 @@
1
- import { ExternalLink, Server, ServerCog } from 'lucide-react';
1
+ import { ArrowUpRight, Boxes, ExternalLink, Library, ServerCog } from 'lucide-react';
2
2
  import { Row } from './Row';
3
- import { LiveCard, MCP_DOCS_URL, UpgradeRequired, UrlPanel } from './SettingsShared';
3
+ import { MCP_DOCS_URL, UrlPanel } from './SettingsShared';
4
+
5
+ export type DomainMcpServer = {
6
+ id: string;
7
+ name: string;
8
+ summary?: string;
9
+ /** Services and messages the domain's MCP server serves (including its subdomains and systems) */
10
+ services: number;
11
+ messages: number;
12
+ docsUrl: string;
13
+ url: string;
14
+ };
15
+
16
+ const plural = (count: number, noun: string) => `${count} ${noun}${count === 1 ? '' : 's'}`;
17
+
18
+ // What the domain's MCP server covers, e.g. "5 services · 12 messages"
19
+ const getScope = (server: DomainMcpServer) => `${plural(server.services, 'service')} · ${plural(server.messages, 'message')}`;
4
20
 
5
21
  interface Props {
6
- hasScalePlan: boolean;
7
22
  inSSR: boolean;
8
23
  mcpUrl: string;
24
+ domainServers: DomainMcpServer[];
9
25
  }
10
26
 
11
- export const McpSettingsForm = ({ hasScalePlan, inSSR, mcpUrl }: Props) => {
12
- const mcpAvailable = hasScalePlan && inSSR;
13
-
27
+ export const McpSettingsForm = ({ inSSR, mcpUrl, domainServers }: Props) => {
14
28
  return (
15
29
  <div className="divide-y divide-[rgb(var(--ec-page-border))]">
16
30
  <Row
17
- title="MCP Server"
18
- description="Expose your catalog over the Model Context Protocol so AI agents (Claude Desktop, Cursor, etc.) can query your architecture as a live data source."
31
+ title="Catalog MCP Server"
32
+ description="Connect AI agents (Claude, Cursor, VS Code and any MCP client) to every resource in your catalog: domains, services, messages, flows, schemas and the teams that own them."
19
33
  canEdit={false}
20
34
  dirty={false}
21
35
  >
22
- {mcpAvailable ? (
23
- <McpAvailable url={mcpUrl} />
24
- ) : !hasScalePlan ? (
25
- <UpgradeRequired
26
- tier="Scale"
27
- blurb="The MCP Server is a Scale-plan feature. Upgrade to expose your catalog to AI agents over the Model Context Protocol."
28
- docsUrl={MCP_DOCS_URL}
29
- />
30
- ) : (
31
- <McpNeedsSSR />
32
- )}
36
+ {inSSR ? <CatalogServer url={mcpUrl} /> : <McpNeedsSSR />}
33
37
  </Row>
38
+
39
+ {inSSR && domainServers.length > 0 && (
40
+ <Row
41
+ title="Domain MCP Servers"
42
+ description="Each domain has its own MCP server, scoped to the domain and the services, messages and flows in it. Connect a team's agent to just the part of the architecture it works on."
43
+ canEdit={false}
44
+ dirty={false}
45
+ >
46
+ <DomainServers servers={domainServers} />
47
+ </Row>
48
+ )}
34
49
  </div>
35
50
  );
36
51
  };
37
52
 
38
- const McpAvailable = ({ url }: { url: string }) => (
39
- <div className="space-y-3">
40
- <LiveCard
41
- icon={<Server className="h-4 w-4" aria-hidden />}
42
- title="MCP server is live"
43
- description="Point Claude Desktop, Cursor, or any MCP-aware client at the endpoint below."
44
- />
45
- <div className="rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-bg)/0.4)] px-4 py-3">
46
- <p className="text-[12px] font-medium text-[rgb(var(--ec-page-text))]">Endpoint</p>
53
+ const LivePill = () => (
54
+ <span className="inline-flex flex-shrink-0 items-center gap-1.5 rounded-full border border-[rgb(var(--ec-badge-color-green-text)/0.3)] bg-[rgb(var(--ec-badge-color-green-background))] px-2 py-0.5 text-[11px] font-semibold text-[rgb(var(--ec-badge-color-green-text))]">
55
+ <span className="relative flex h-1.5 w-1.5" aria-hidden>
56
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60" />
57
+ <span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-current" />
58
+ </span>
59
+ Live
60
+ </span>
61
+ );
62
+
63
+ const CatalogServer = ({ url }: { url: string }) => (
64
+ <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))]">
65
+ <div className="flex items-start gap-3 px-4 py-3.5">
66
+ <span className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg border border-[rgb(var(--ec-accent)/0.3)] bg-[rgb(var(--ec-accent-subtle))] text-[rgb(var(--ec-accent))]">
67
+ <Library className="h-4 w-4" aria-hidden />
68
+ </span>
69
+ <div className="min-w-0 flex-1">
70
+ <div className="flex items-center justify-between gap-3">
71
+ <p className="text-[13px] font-semibold text-[rgb(var(--ec-page-text))]">Your whole catalog</p>
72
+ <LivePill />
73
+ </div>
74
+ <p className="mt-0.5 text-[12px] leading-snug text-[rgb(var(--ec-page-text-muted))]">
75
+ Every domain, service, message, flow and schema, served to your AI agents from one URL.
76
+ </p>
77
+ </div>
78
+ </div>
79
+ <div className="border-t border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-bg)/0.4)] px-4 py-3">
80
+ <p className="text-[11px] font-semibold uppercase tracking-wide text-[rgb(var(--ec-page-text-muted))]">Server URL</p>
47
81
  <UrlPanel url={url} />
48
82
  <a
49
83
  href={MCP_DOCS_URL}
@@ -51,13 +85,34 @@ const McpAvailable = ({ url }: { url: string }) => (
51
85
  rel="noreferrer"
52
86
  className="mt-3 inline-flex items-center gap-1 text-[12px] font-medium text-[rgb(var(--ec-accent))] hover:underline"
53
87
  >
54
- Connect a client
55
- <ExternalLink className="h-3 w-3" aria-hidden />
88
+ How to connect a client
89
+ <ArrowUpRight className="h-3.5 w-3.5" aria-hidden />
56
90
  </a>
57
91
  </div>
58
92
  </div>
59
93
  );
60
94
 
95
+ const DomainServers = ({ servers }: { servers: DomainMcpServer[] }) => (
96
+ <ul className="divide-y divide-[rgb(var(--ec-page-border))] overflow-hidden rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))]">
97
+ {servers.map((server) => (
98
+ <li key={server.id} className="px-4 py-3">
99
+ <div className="flex items-baseline justify-between gap-3">
100
+ <a
101
+ href={server.docsUrl}
102
+ title={server.summary}
103
+ className="inline-flex min-w-0 items-center gap-2 text-[13px] font-medium text-[rgb(var(--ec-page-text))] hover:text-[rgb(var(--ec-accent))]"
104
+ >
105
+ <Boxes className="h-3.5 w-3.5 flex-shrink-0 self-center text-[rgb(var(--ec-icon-color))]" aria-hidden />
106
+ <span className="truncate">{server.name}</span>
107
+ </a>
108
+ <span className="flex-shrink-0 text-[11px] text-[rgb(var(--ec-page-text-muted))]">{getScope(server)}</span>
109
+ </div>
110
+ <UrlPanel url={server.url} />
111
+ </li>
112
+ ))}
113
+ </ul>
114
+ );
115
+
61
116
  const McpNeedsSSR = () => (
62
117
  <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-accent)/0.4)] bg-gradient-to-br from-[rgb(var(--ec-accent)/0.1)] via-[rgb(var(--ec-accent)/0.05)] to-transparent">
63
118
  <div className="flex items-start gap-3 px-4 py-3.5">
@@ -1,6 +1,6 @@
1
- import { useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import { toast } from 'sonner';
3
- import { ExternalLink, Lock, Sparkles, Copy, Check as CheckIcon } from 'lucide-react';
3
+ import { ExternalLink, Copy, Check as CheckIcon } from 'lucide-react';
4
4
  import { cn } from './Row';
5
5
 
6
6
  export const ASSISTANT_DOCS_URL =
@@ -8,65 +8,18 @@ export const ASSISTANT_DOCS_URL =
8
8
  export const ASSISTANT_CONFIGURATION_DOCS_URL =
9
9
  'https://www.eventcatalog.dev/docs/development/ask-your-architecture/eventcatalog-assistant/configuration';
10
10
  export const MCP_DOCS_URL = 'https://www.eventcatalog.dev/docs/development/ask-your-architecture/mcp-server/getting-started';
11
- export const PRICING_URL = 'https://www.eventcatalog.dev/pricing';
12
-
13
- interface UpgradeRequiredProps {
14
- tier: string;
15
- blurb: string;
16
- docsUrl?: string;
17
- }
18
-
19
- export const UpgradeRequired = ({ tier, blurb, docsUrl }: UpgradeRequiredProps) => (
20
- <div className="overflow-hidden rounded-lg border border-amber-500/40 bg-gradient-to-br from-amber-500/10 via-amber-500/5 to-transparent">
21
- <div className="flex items-start gap-3 px-4 py-3.5">
22
- <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-amber-500/40 bg-amber-500/10 text-amber-500">
23
- <Lock className="h-4 w-4" aria-hidden />
24
- </span>
25
- <div className="flex-1 min-w-0">
26
- <div className="flex items-center gap-2">
27
- <p className="text-[13px] font-semibold text-[rgb(var(--ec-page-text))]">Available on {tier}</p>
28
- <span className="inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-500">
29
- <Sparkles className="h-2.5 w-2.5" aria-hidden />
30
- Upgrade
31
- </span>
32
- </div>
33
- <p className="mt-1 text-[12px] leading-snug text-[rgb(var(--ec-page-text-muted))]">{blurb}</p>
34
- <div className="mt-3 flex flex-wrap items-center gap-3">
35
- <a
36
- href={PRICING_URL}
37
- target="_blank"
38
- rel="noreferrer"
39
- className="inline-flex items-center gap-1 rounded-md bg-amber-500 px-3 py-1.5 text-[12px] font-semibold text-white shadow-sm transition-colors hover:bg-amber-600"
40
- >
41
- View plans
42
- <ExternalLink className="h-3 w-3" aria-hidden />
43
- </a>
44
- {docsUrl && (
45
- <a
46
- href={docsUrl}
47
- target="_blank"
48
- rel="noreferrer"
49
- className="inline-flex items-center gap-1 text-[12px] font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))]"
50
- >
51
- Learn more
52
- <ExternalLink className="h-3 w-3" aria-hidden />
53
- </a>
54
- )}
55
- </div>
56
- </div>
57
- </div>
58
- </div>
59
- );
60
-
61
11
  interface UrlPanelProps {
62
12
  url: string;
63
13
  }
64
14
 
65
15
  export const UrlPanel = ({ url }: UrlPanelProps) => {
66
16
  const [copied, setCopied] = useState(false);
17
+ // The full URL (what clients connect to), once the page knows its origin in the browser
18
+ const [fullUrl, setFullUrl] = useState(url);
19
+ useEffect(() => setFullUrl(new URL(url, window.location.origin).href), [url]);
67
20
  const copy = async () => {
68
21
  try {
69
- await navigator.clipboard.writeText(new URL(url, window.location.origin).href);
22
+ await navigator.clipboard.writeText(fullUrl);
70
23
  setCopied(true);
71
24
  setTimeout(() => setCopied(false), 1600);
72
25
  } catch {
@@ -81,7 +34,7 @@ export const UrlPanel = ({ url }: UrlPanelProps) => {
81
34
  rel="noreferrer"
82
35
  className="flex-1 truncate rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-bg))] px-2.5 py-1.5 font-mono text-[12px] text-[rgb(var(--ec-page-text))] transition-colors hover:border-[rgb(var(--ec-accent)/0.5)] hover:text-[rgb(var(--ec-accent))]"
83
36
  >
84
- {url}
37
+ {fullUrl}
85
38
  </a>
86
39
  <button
87
40
  type="button"
@@ -104,27 +57,6 @@ export const UrlPanel = ({ url }: UrlPanelProps) => {
104
57
  );
105
58
  };
106
59
 
107
- interface LiveCardProps {
108
- icon: React.ReactNode;
109
- title: string;
110
- description: string;
111
- }
112
-
113
- export const LiveCard = ({ icon, title, description }: LiveCardProps) => (
114
- <div className="flex items-center gap-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-4 py-3">
115
- <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-500">
116
- {icon}
117
- </span>
118
- <div className="flex-1 min-w-0">
119
- <p className="text-[13px] font-medium text-[rgb(var(--ec-page-text))]">{title}</p>
120
- <p className="text-[12px] leading-snug text-[rgb(var(--ec-page-text-muted))]">{description}</p>
121
- </div>
122
- <span className="flex-shrink-0 rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-500">
123
- Live
124
- </span>
125
- </div>
126
- );
127
-
128
60
  interface ToggleProps {
129
61
  checked: boolean;
130
62
  disabled?: boolean;
@@ -1,6 +1,6 @@
1
1
  ---
2
- import { getNavigationItems } from '@enterprise/custom-documentation/utils/custom-docs';
3
- import CustomDocsNavWrapper from '@enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper';
2
+ import { getNavigationItems } from '@features/custom-documentation/utils/custom-docs';
3
+ import CustomDocsNavWrapper from '@features/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper';
4
4
 
5
5
  const currentPath = Astro.url.pathname;
6
6
  const sidebarItems = await getNavigationItems();
@@ -0,0 +1,82 @@
1
+ ---
2
+ import catalog from '@utils/eventcatalog-config/catalog';
3
+ import { isDevMode } from '@utils/feature';
4
+ import { getLicenseDaysLeft, getTrialStatus, LICENSE_FAQ_URL, TRIAL_LENGTH_DAYS } from '@utils/trial';
5
+ import { getLicenseStatus } from '@utils/license';
6
+ import { buildUrl } from '@utils/url-builder';
7
+
8
+ // Only shown while running `eventcatalog dev`, never in built or served catalogs.
9
+ // A valid license.jwt replaces the trial, and only shows once it's about to expire.
10
+ // An expired license.jwt shows instead of the trial. A Scale or Starter plan replaces the trial too.
11
+ const license = isDevMode() ? await getLicenseStatus() : undefined;
12
+ const licensedUntil = license?.state === 'licensed' ? license.expiresAt : undefined;
13
+ const licenseDaysLeft = licensedUntil ? getLicenseDaysLeft(licensedUntil) : undefined;
14
+ const licenseExpired = license?.state === 'expired';
15
+ const expiredOn = license?.state === 'expired' ? license.expiresAt : undefined;
16
+ const trial =
17
+ isDevMode() && !licensedUntil && !licenseExpired && license?.state !== 'plan' ? getTrialStatus(catalog?.tsd) : undefined;
18
+
19
+ const days = (count?: number) => `${count} ${count === 1 ? 'day' : 'days'}`;
20
+ const label = licenseExpired
21
+ ? 'License expired'
22
+ : licenseDaysLeft !== undefined
23
+ ? `License · ${days(licenseDaysLeft)} left`
24
+ : trial?.ended
25
+ ? 'Trial ended'
26
+ : `Trial · ${days(trial?.daysLeft)} left`;
27
+ const title = licenseExpired
28
+ ? `Your EventCatalog commercial license ${expiredOn ? `expired on ${expiredOn.toLocaleDateString()}` : 'has expired'}. Renew it to keep using EventCatalog commercially.`
29
+ : licenseDaysLeft !== undefined
30
+ ? `Your EventCatalog commercial license expires on ${licensedUntil?.toLocaleDateString()}. Renew it to keep using EventCatalog commercially.`
31
+ : trial?.ended
32
+ ? `Your ${TRIAL_LENGTH_DAYS}-day EventCatalog trial ended on ${trial.endsAt.toLocaleDateString()}. Learn about licensing.`
33
+ : `You're on a ${TRIAL_LENGTH_DAYS}-day EventCatalog trial, ending on ${trial?.endsAt.toLocaleDateString()}. Learn about licensing.`;
34
+ const warning = licenseExpired || licenseDaysLeft !== undefined || trial?.ended;
35
+ // An expiring or expired license opens the license settings (where it's renewed), the trial the license FAQ
36
+ const isLicense = licenseExpired || licenseDaysLeft !== undefined;
37
+ const href = isLicense ? buildUrl('/settings/license') : LICENSE_FAQ_URL;
38
+ ---
39
+
40
+ {
41
+ (licenseExpired || licenseDaysLeft !== undefined || trial) && (
42
+ <a
43
+ href={href}
44
+ target={isLicense ? undefined : '_blank'}
45
+ rel={isLicense ? undefined : 'noopener noreferrer'}
46
+ title={title}
47
+ data-trial-ended={trial?.ended ? 'true' : undefined}
48
+ data-license-expired={licenseExpired ? 'true' : undefined}
49
+ class:list={[
50
+ 'inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-1 text-xs font-medium transition-colors',
51
+ warning
52
+ ? 'border-[rgb(var(--ec-badge-color-amber-text)/0.3)] bg-[rgb(var(--ec-badge-color-amber-background))] text-[rgb(var(--ec-badge-color-amber-text))] hover:opacity-90'
53
+ : 'border-[rgb(var(--ec-accent)/0.3)] bg-[rgb(var(--ec-accent-subtle))] text-[rgb(var(--ec-accent))] hover:bg-[rgb(var(--ec-accent)/0.15)]',
54
+ ]}
55
+ >
56
+ <svg
57
+ viewBox="0 0 24 24"
58
+ class="h-3.5 w-3.5"
59
+ fill="none"
60
+ stroke="currentColor"
61
+ stroke-width="2"
62
+ stroke-linecap="round"
63
+ stroke-linejoin="round"
64
+ aria-hidden="true"
65
+ >
66
+ {licenseExpired ? (
67
+ <>
68
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
69
+ <path d="M12 9v4" />
70
+ <path d="M12 17h.01" />
71
+ </>
72
+ ) : (
73
+ <>
74
+ <circle cx="12" cy="12" r="10" />
75
+ <polyline points="12 6 12 12 16 14" />
76
+ </>
77
+ )}
78
+ </svg>
79
+ {label}
80
+ </a>
81
+ )
82
+ }
@@ -6,14 +6,16 @@ import { badge, ownerReference } from './content.config-shared-collections';
6
6
  import { ADR_STATUS_VALUES } from './utils/collections/adr-constants';
7
7
  import fs from 'fs';
8
8
  import path from 'path';
9
- import { userTeamDirectoryLoader } from './enterprise/directory/user-team-directory';
9
+ import { userTeamDirectoryLoader } from './features/directory/user-team-directory';
10
10
  import config from '@config';
11
11
  import { schemaLoader } from './utils/collections/schema-loader';
12
12
  import { globWithSafeWatcher, withFederatedContent, withIgnoredBuildArtifacts } from './utils/collections/glob-loader';
13
13
  import { withExtensionProperties } from './utils/collections/extension-properties';
14
+ import { flowStepSchema } from './utils/collections/flow-step-schema';
15
+ import { pointer } from './utils/collections/pointer-schema';
14
16
 
15
- // Enterprise Collections
16
- import { customPagesSchema, resourceDocsSchema, resourceDocCategoriesSchema } from './enterprise/collections';
17
+ // Custom pages and resource docs collections
18
+ import { customPagesSchema, resourceDocsSchema, resourceDocCategoriesSchema } from './features/collections';
17
19
 
18
20
  // Astro's root is the user's catalog. Keep loader paths relative to that root,
19
21
  // independently of where generated metadata or the installed package lives.
@@ -32,11 +34,6 @@ const pages = defineCollection({
32
34
  .optional(),
33
35
  });
34
36
 
35
- const pointer = z.object({
36
- id: z.string(),
37
- version: z.string().optional().default('latest'),
38
- });
39
-
40
37
  const detailPanelPropertySchema = z.object({
41
38
  visible: z.boolean().optional(),
42
39
  });
@@ -235,19 +232,6 @@ const baseSchema = z.object({
235
232
 
236
233
  const agentBaseSchema = baseSchema.omit({ specifications: true });
237
234
 
238
- const flowStep = z
239
- .union([
240
- // Can be a string or a number just to reference a step
241
- z.union([z.string(), z.number()]),
242
- z
243
- .object({
244
- id: z.union([z.string(), z.number()]),
245
- label: z.string().optional(),
246
- })
247
- .optional(),
248
- ])
249
- .optional();
250
-
251
235
  const flows = defineCollection({
252
236
  loader: globWithSafeWatcher({
253
237
  pattern: withIgnoredBuildArtifacts(['**/flows/**/index.(md|mdx)', '**/flows/**/versioned/*/index.(md|mdx)']),
@@ -266,80 +250,7 @@ const flows = defineCollection({
266
250
  changelog: detailPanelPropertySchema.optional(),
267
251
  })
268
252
  .optional(),
269
- steps: z.array(
270
- z
271
- .object({
272
- id: z.union([z.string(), z.number()]),
273
- type: z.enum(['node', 'message', 'agent', 'user', 'actor']).optional(),
274
- title: z.string(),
275
- summary: z.string().optional(),
276
- message: pointer.optional(),
277
- agent: pointer.optional(),
278
- service: pointer.optional(),
279
- // Catalog system reference. `systems` matches how authors write the
280
- // pointer (same shape as `service`); `system` is accepted as an alias.
281
- systems: pointer.optional(),
282
- system: pointer.optional(),
283
- flow: pointer.optional(),
284
- container: pointer.optional(),
285
- dataProduct: pointer.optional(),
286
-
287
- actor: z
288
- .object({
289
- name: z.string(),
290
- summary: z.string().optional(),
291
- })
292
- .optional(),
293
- custom: z
294
- .object({
295
- title: z.string(),
296
- icon: z.string().optional(),
297
- type: z.string().optional(),
298
- summary: z.string().optional(),
299
- url: z.string().url().optional(),
300
- color: z.string().optional(),
301
- properties: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
302
- height: z.number().optional(),
303
- menu: z
304
- .array(
305
- z.object({
306
- label: z.string(),
307
- url: z.string().url().optional(),
308
- })
309
- )
310
- .optional(),
311
- })
312
- .optional(),
313
- externalSystem: z
314
- .object({
315
- name: z.string(),
316
- summary: z.string().optional(),
317
- url: z.string().url().optional(),
318
- })
319
- .optional(),
320
- next_step: flowStep,
321
- next_steps: z.array(flowStep).optional(),
322
- })
323
- .refine((data) => {
324
- // Cant have both next_steps and next_steps
325
- if (data.next_step && data.next_steps) return false;
326
-
327
- // Either one or non types can be present
328
- const typesUsed = [
329
- data.message,
330
- data.agent,
331
- data.service,
332
- data.systems,
333
- data.system,
334
- data.flow,
335
- data.container,
336
- data.dataProduct,
337
- data.actor,
338
- data.custom,
339
- ].filter((v) => v).length;
340
- return typesUsed === 0 || typesUsed === 1;
341
- })
342
- ),
253
+ steps: z.array(flowStepSchema),
343
254
  })
344
255
  .extend(baseSchema.shape)
345
256
  ),
@@ -499,6 +410,8 @@ const services = defineCollection({
499
410
  'systems/*/services/*/versioned/*/index.(md|mdx)',
500
411
  'domains/*/systems/*/services/*/index.(md|mdx)',
501
412
  'domains/*/systems/*/services/*/versioned/*/index.(md|mdx)',
413
+ 'domains/*/subdomains/*/systems/*/services/*/index.(md|mdx)',
414
+ 'domains/*/subdomains/*/systems/*/services/*/versioned/*/index.(md|mdx)',
502
415
 
503
416
  // Capture services in the root
504
417
  'services/*/index.(md|mdx)', // ✅ Capture only services markdown files
@@ -1311,7 +1224,7 @@ export const collections = {
1311
1224
  ubiquitousLanguages,
1312
1225
  entities,
1313
1226
 
1314
- // EventCatalog Pro Collections
1227
+ // Documentation Collections
1315
1228
  customPages,
1316
1229
  resourceDocs,
1317
1230
  resourceDocCategories,
@@ -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 { APIContext } from 'astro';
7
2
  import {
8
3
  convertToModelMessages,
@@ -15,7 +10,7 @@ import {
15
10
  type UIMessage,
16
11
  } from 'ai';
17
12
  import { join } from 'node:path';
18
- import { isEventCatalogScaleEnabled, isEventCatalogStarterEnabled } from '@utils/feature';
13
+ import { isDevMode } from '@utils/feature';
19
14
  import { getCollection, getEntry } from 'astro:content';
20
15
  import { z } from 'astro/zod';
21
16
  import { getConsumersOfMessage, getProducersOfMessage } from '@utils/collections/services';
@@ -35,7 +30,7 @@ import {
35
30
  messageCollectionSchema,
36
31
  visualiserCollectionSchema,
37
32
  toolDescriptions,
38
- } from '@enterprise/tools/catalog-tools';
33
+ } from '@features/tools/catalog-tools';
39
34
 
40
35
  const catalogDirectory = process.env.PROJECT_DIR || process.cwd();
41
36
 
@@ -49,24 +44,23 @@ export const defaultConfiguration = {
49
44
  };
50
45
 
51
46
  let hasChatConfiguration = false;
47
+ // Why eventcatalog.chat.js didn't load (e.g. its model provider package isn't installed)
48
+ let chatConfigurationError: string | undefined;
52
49
  let model: LanguageModel;
53
50
  let modelConfiguration: any;
54
51
  let extendedTools: any;
55
52
 
56
- const hasAssistantPlan = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
57
-
58
53
  try {
59
54
  const providerConfiguration = await import(/* @vite-ignore */ join(catalogDirectory, 'eventcatalog.chat.js'));
60
55
  model = await providerConfiguration.default();
61
56
  modelConfiguration = providerConfiguration.configuration || defaultConfiguration;
62
57
  hasChatConfiguration = true;
63
58
 
64
- if (isEventCatalogScaleEnabled()) {
65
- extendedTools = providerConfiguration.tools || {};
66
- }
59
+ extendedTools = providerConfiguration.tools || {};
67
60
  } catch (error) {
68
61
  console.error('[Chat] Error loading chat configuration', error);
69
62
  hasChatConfiguration = false;
63
+ chatConfigurationError = error instanceof Error ? error.message : String(error);
70
64
  }
71
65
 
72
66
  // Built-in tools metadata for client visibility
@@ -176,19 +170,23 @@ interface Message {
176
170
  content: string;
177
171
  }
178
172
 
179
- export const GET = async ({ request }: APIContext<{ question: string; messages: Message[]; additionalContext?: string }>) => {
180
- if (!hasAssistantPlan()) {
181
- return new Response(JSON.stringify({ error: 'Chat is not enabled' }), {
182
- status: 403,
183
- headers: { 'Content-Type': 'application/json' },
184
- });
185
- }
173
+ /**
174
+ * eventcatalog.chat.js exists (or the chat would be off) but didn't load. The chat panel shows how
175
+ * to fix it; the reason is only shared in dev mode, where it's the catalog owner asking.
176
+ */
177
+ const chatConfigurationErrorResponse = () =>
178
+ new Response(
179
+ JSON.stringify({
180
+ error: 'The EventCatalog Assistant could not load eventcatalog.chat.js',
181
+ code: 'CHAT_CONFIGURATION_ERROR',
182
+ ...(isDevMode() && chatConfigurationError ? { reason: chatConfigurationError } : {}),
183
+ }),
184
+ { status: 503, headers: { 'Content-Type': 'application/json' } }
185
+ );
186
186
 
187
+ export const GET = async ({ request }: APIContext<{ question: string; messages: Message[]; additionalContext?: string }>) => {
187
188
  if (!hasChatConfiguration) {
188
- return new Response(JSON.stringify({ error: 'No chat configuration found' }), {
189
- status: 404,
190
- headers: { 'Content-Type': 'application/json' },
191
- });
189
+ return chatConfigurationErrorResponse();
192
190
  }
193
191
 
194
192
  // Return available tools metadata
@@ -202,18 +200,8 @@ export const GET = async ({ request }: APIContext<{ question: string; messages:
202
200
  export const POST = async ({ request }: APIContext<{ question: string; messages: Message[]; additionalContext?: string }>) => {
203
201
  const { messages }: { messages: UIMessage[] } = await request.json();
204
202
 
205
- if (!hasAssistantPlan()) {
206
- return new Response(JSON.stringify({ error: 'Chat is not enabled, please upgrade to a paid plan to use this feature' }), {
207
- status: 403,
208
- headers: { 'Content-Type': 'application/json' },
209
- });
210
- }
211
-
212
203
  if (!hasChatConfiguration) {
213
- return new Response(JSON.stringify({ error: 'No chat configuration found' }), {
214
- status: 404,
215
- headers: { 'Content-Type': 'application/json' },
216
- });
204
+ return chatConfigurationErrorResponse();
217
205
  }
218
206
 
219
207
  // Get the URL of the request
@@ -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 { AnalyticsAdapter, EventProperties } from '../tracker';
7
2
 
8
3
  declare global {
@@ -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 { AnalyticsAdapter, EventProperties } from '../tracker';
7
2
 
8
3
  declare global {
@@ -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 { AnalyticsAdapter, EventProperties } from '../tracker';
7
2
 
8
3
  declare global {
@@ -1,17 +1,15 @@
1
1
  ---
2
2
  import config from '@config';
3
- import { isIntegrationsEnabled } from '@utils/feature';
4
3
 
5
4
  const integrations = config.integrations;
6
5
  const cloudAnalytics = config.cloud?.analytics;
7
- const enabled = isIntegrationsEnabled() && integrations;
8
- const hasProviders = enabled && (integrations?.ga4 || integrations?.gtm || integrations?.posthog);
6
+ const hasProviders = !!(integrations?.ga4 || integrations?.gtm || integrations?.posthog);
9
7
  const debug = integrations?.debug ?? false;
10
8
  const cloudDebug = cloudAnalytics?.debug ?? debug;
11
9
  const cloudAnalyticsEndpoint = cloudAnalytics?.endpoint || 'https://api.ecingest.dev/v1/analytics/ingest';
12
10
  const isCloudAnalyticsEnabled = cloudAnalytics?.enabled === true && !!cloudAnalytics?.trackingId;
13
11
  // Render the manager if there are providers OR if debug mode is on (so users can verify the pipeline)
14
- const shouldRender = isCloudAnalyticsEnabled || (enabled && (hasProviders || debug));
12
+ const shouldRender = isCloudAnalyticsEnabled || (!!integrations && (hasProviders || debug));
15
13
 
16
14
  // Build script contents in frontmatter to avoid Prettier/JSX parsing issues with braces in inline scripts
17
15
  const ga4ConfigScript = integrations?.ga4