@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.
- package/LICENSE +226 -95
- package/NOTICE +30 -0
- package/README.md +3 -2
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +43 -16
- package/dist/analytics/log-build.d.cts +6 -5
- package/dist/analytics/log-build.d.ts +6 -5
- package/dist/analytics/log-build.js +4 -3
- package/dist/{chunk-U4YJSTGV.js → chunk-AYNZXUB5.js} +2 -10
- package/dist/{chunk-TV3YAWKQ.js → chunk-CR6AK5LR.js} +1 -1
- package/dist/{chunk-M577VUOX.js → chunk-LR7AGRHN.js} +13 -16
- package/dist/chunk-TQLRG35T.js +203 -0
- package/dist/{chunk-HPC6KUDQ.js → chunk-TWN43V4T.js} +1 -1
- package/dist/{chunk-ZYTCBNB3.js → chunk-WAIADKQE.js} +1 -1
- package/dist/{chunk-5BPN6QEC.js → chunk-ZHKEARLJ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +407 -291
- package/dist/eventcatalog.config.d.cts +2 -3
- package/dist/eventcatalog.config.d.ts +2 -3
- package/dist/eventcatalog.js +35 -98
- package/dist/federation/content-cache.d.cts +0 -5
- package/dist/federation/content-cache.d.ts +0 -5
- package/dist/federation/diagnostics.d.cts +0 -5
- package/dist/federation/diagnostics.d.ts +0 -5
- package/dist/federation/federate.cjs +0 -9
- package/dist/federation/federate.d.cts +0 -5
- package/dist/federation/federate.d.ts +0 -5
- package/dist/federation/federate.js +4 -5
- package/dist/federation/filesystem-source-provider.d.cts +0 -5
- package/dist/federation/filesystem-source-provider.d.ts +0 -5
- package/dist/federation/github-source-provider.d.cts +0 -5
- package/dist/federation/github-source-provider.d.ts +0 -5
- package/dist/federation/output-transaction.d.cts +0 -4
- package/dist/federation/output-transaction.d.ts +0 -4
- package/dist/federation/public-assets.d.cts +0 -5
- package/dist/federation/public-assets.d.ts +0 -5
- package/dist/federation/source-provider.d.cts +0 -5
- package/dist/federation/source-provider.d.ts +0 -5
- package/dist/federation/types.d.cts +0 -5
- package/dist/federation/types.d.ts +0 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/license-C1y-56bb.d.cts +23 -0
- package/dist/license-C1y-56bb.d.ts +23 -0
- package/dist/runtime-dependencies/@eventcatalog__visualiser__layout.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__react.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__server.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__sdk__types.js.mjs +3 -0
- package/dist/runtime-dependencies/manifest.json +12 -1
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__graphql.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__json.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__markup.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__protobuf.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__yaml.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-dark.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-light.mjs +3 -0
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/dist/utils/license-status.cjs +240 -0
- package/dist/utils/license-status.d.cts +28 -0
- package/dist/utils/license-status.d.ts +28 -0
- package/dist/utils/license-status.js +12 -0
- package/eventcatalog/astro.config.mjs +1 -1
- package/eventcatalog/integrations/eventcatalog-runtime.mjs +1 -1
- package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +29 -19
- package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +74 -0
- package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +24 -28
- package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +16 -11
- package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +4 -218
- package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +27 -36
- package/eventcatalog/src/components/Header.astro +43 -58
- package/eventcatalog/src/components/Lists/PillListFlat.styles.css +17 -17
- package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +1 -1
- package/eventcatalog/src/components/MDX/Flow/Flow.astro +4 -0
- package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +14 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +49 -18
- package/eventcatalog/src/components/MDX/RemoteFile.astro +2 -24
- package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +59 -93
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -32
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +20 -67
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -11
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +11 -60
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +1 -3
- package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +0 -3
- package/eventcatalog/src/components/SchemaExplorer/VersionHistoryModal.tsx +2 -9
- package/eventcatalog/src/components/SchemaExplorer/parse-schema.ts +46 -0
- package/eventcatalog/src/components/SchemaExplorer/utils.ts +11 -0
- package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +2 -9
- package/eventcatalog/src/components/Settings/LicenseSettings.tsx +288 -0
- package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +3 -19
- package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +85 -30
- package/eventcatalog/src/components/Settings/SettingsShared.tsx +7 -75
- package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +2 -2
- package/eventcatalog/src/components/TrialBadge.astro +82 -0
- package/eventcatalog/src/content.config.ts +9 -96
- package/eventcatalog/src/{enterprise → features}/ai/chat-api.ts +22 -34
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/ga4.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/gtm.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/posthog.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsHead.astro +2 -4
- package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsTracker.astro +2 -4
- package/eventcatalog/src/{enterprise → features}/analytics/tracker.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/api/catalog.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/[...auth].ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware-auth.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/custom-pages.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/index.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/resource-docs.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/collection.ts +0 -5
- package/eventcatalog/src/features/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +9 -0
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/index.tsx +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/types.ts +0 -5
- package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/index.astro → features/custom-documentation/components/CustomDocumentationPage.astro} +5 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/badge-styles.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/custom-docs.ts +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/docs-search.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-pages/routes.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/directory/user-team-directory.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/field-extractor.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/field-indexer.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/fields-db.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/pages/api/fields.ts +1 -6
- package/eventcatalog/src/{enterprise → features}/fields/pages/fields.astro +1 -2
- package/eventcatalog/src/{enterprise → features}/integrations/eventcatalog-features.ts +17 -75
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/links.ts +59 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/node-chat.tsx +299 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/shared.ts +14 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/view.tsx +454 -0
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +432 -0
- package/eventcatalog/src/features/mcp/apps/mermaid-stub.ts +10 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/schema-code.tsx +65 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/shared.ts +23 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/view.tsx +170 -0
- package/eventcatalog/src/features/mcp/apps/shared/app-view.tsx +98 -0
- package/eventcatalog/src/features/mcp/apps/shared/resource-types.ts +15 -0
- package/eventcatalog/src/features/mcp/apps/viewer/shared.ts +24 -0
- package/eventcatalog/src/features/mcp/apps/viewer/styles.css +25 -0
- package/eventcatalog/src/features/mcp/apps/viewer/view.tsx +59 -0
- package/eventcatalog/src/features/mcp/mcp-app-icons.ts +63 -0
- package/eventcatalog/src/features/mcp/mcp-apps.ts +160 -0
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-auth.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-scope.ts +7 -7
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-scoped-tools.ts +47 -40
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-server.ts +347 -34
- package/eventcatalog/src/{enterprise → features}/mcp/oauth-protected-resource.ts +0 -5
- package/eventcatalog/src/features/mcp/schema-viewer.ts +24 -0
- package/eventcatalog/src/{enterprise → features}/tools/catalog-tools.ts +133 -102
- package/eventcatalog/src/features/tools/index.ts +5 -0
- package/eventcatalog/src/{enterprise → features}/visualizer-layout/reset.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/visualizer-layout/save.ts +0 -5
- package/eventcatalog/src/layouts/BaseLayout.astro +2 -2
- package/eventcatalog/src/layouts/Footer.astro +31 -39
- package/eventcatalog/src/layouts/SettingsLayout.astro +6 -6
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -37
- package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts +0 -22
- package/eventcatalog/src/{enterprise → pages}/api/schemas/services/[id]/[version]/[specification]/index.ts +0 -19
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/_index.data.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/_index.data.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +1 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].md.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].mdx.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
- package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +12 -0
- package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/root-index.astro → pages/docs/custom/index.astro} +1 -23
- package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +4 -9
- package/eventcatalog/src/pages/docs/llm/llms.txt.ts +4 -4
- package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +0 -11
- package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +2 -2
- package/eventcatalog/src/pages/index.astro +2 -2
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +0 -3
- package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -4
- package/eventcatalog/src/pages/settings/assistant.astro +2 -4
- package/eventcatalog/src/pages/settings/license.astro +18 -0
- package/eventcatalog/src/pages/settings/llm-access.astro +1 -4
- package/eventcatalog/src/pages/settings/mcp.astro +33 -4
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +1 -2
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/data/index.astro +2 -45
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +1 -1
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version].mermaid.ts +7 -109
- package/eventcatalog/src/pages/visualiser/_mermaid-route.ts +78 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/_index.data.ts +44 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +1 -1
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/index.astro +56 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/index.astro +3 -40
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version].mermaid.ts +20 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/_index.data.ts +29 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +3 -38
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/index.astro +56 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version].mermaid.ts +20 -0
- package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/container.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +7 -32
- package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +2 -8
- package/eventcatalog/src/stores/sidebar-store/builders/system.ts +2 -12
- package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +0 -10
- package/eventcatalog/src/stores/sidebar-store/state.ts +4 -6
- package/eventcatalog/src/styles/theme.css +22 -18
- package/eventcatalog/src/styles/themes/forest.css +8 -8
- package/eventcatalog/src/styles/themes/ocean.css +8 -8
- package/eventcatalog/src/styles/themes/sapphire.css +8 -8
- package/eventcatalog/src/styles/themes/sunset.css +8 -8
- package/eventcatalog/src/utils/clipboard.ts +4 -4
- package/eventcatalog/src/utils/collections/flow-step-schema.ts +117 -0
- package/eventcatalog/src/utils/collections/pointer-schema.ts +7 -0
- package/eventcatalog/src/utils/collections/resource-docs.ts +677 -14
- package/eventcatalog/src/utils/collections/schema-loader.ts +0 -5
- package/eventcatalog/src/utils/feature.ts +14 -23
- package/eventcatalog/src/utils/license.ts +114 -0
- package/eventcatalog/src/utils/node-graphs/architecture-diagram-types.ts +32 -0
- package/eventcatalog/src/utils/node-graphs/architecture-diagram.ts +84 -0
- package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +4 -25
- package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +12 -39
- package/eventcatalog/src/utils/node-graphs/data-products-node-graph.ts +11 -27
- package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +679 -0
- package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +3 -20
- package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +51 -4
- package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +8 -23
- package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +119 -0
- package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +133 -47
- package/eventcatalog/src/utils/node-graphs/layout-node-graph.ts +28 -0
- package/eventcatalog/src/utils/node-graphs/layout-persistence.ts +3 -3
- package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +16 -34
- package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +11 -25
- package/eventcatalog/src/utils/node-graphs/system-context-node-graph.ts +18 -54
- package/eventcatalog/src/utils/node-graphs/system-levels-node-graph.ts +59 -0
- package/eventcatalog/src/utils/node-graphs/systems-node-graph.ts +20 -80
- package/eventcatalog/src/utils/node-graphs/utils/utils.ts +1 -78
- package/eventcatalog/src/utils/trial.ts +36 -0
- package/eventcatalog/tsconfig.json +1 -1
- package/package.json +11 -11
- package/dist/chunk-FV56YFM4.js +0 -7
- package/dist/federation/entitlement.cjs +0 -31
- package/dist/federation/entitlement.d.cts +0 -12
- package/dist/federation/entitlement.d.ts +0 -12
- package/dist/federation/entitlement.js +0 -6
- package/dist/runtime-dependencies/dagre.mjs +0 -3
- package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +0 -265
- package/eventcatalog/src/enterprise/LICENSE +0 -57
- package/eventcatalog/src/enterprise/README.md +0 -5
- package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +0 -691
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +0 -9
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro +0 -18
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/feature.astro +0 -171
- package/eventcatalog/src/enterprise/feature.ts +0 -75
- package/eventcatalog/src/enterprise/tools/index.ts +0 -10
- package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +0 -126
- package/eventcatalog/src/pages/settings/billing.astro +0 -17
- package/eventcatalog/src/pages/visualiser/domain-integrations/index.astro +0 -26
- package/eventcatalog/src/types/mcp-modules.d.ts +0 -67
- package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +0 -261
- package/eventcatalog/src/utils/node-graphs/export-node-graph.ts +0 -91
- /package/eventcatalog/src/{enterprise → features}/auth/error.astro +0 -0
- /package/eventcatalog/src/{enterprise → features}/auth/login.astro +0 -0
- /package/eventcatalog/src/{enterprise → features}/auth/unauthorized.astro +0 -0
- /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path]/_index.data.ts +0 -0
- /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path].mdx.ts +0 -0
|
@@ -1,49 +1,83 @@
|
|
|
1
|
-
import { ExternalLink,
|
|
1
|
+
import { ArrowUpRight, Boxes, ExternalLink, Library, ServerCog } from 'lucide-react';
|
|
2
2
|
import { Row } from './Row';
|
|
3
|
-
import {
|
|
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 = ({
|
|
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="
|
|
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
|
-
{
|
|
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
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
55
|
-
<
|
|
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,
|
|
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(
|
|
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
|
-
{
|
|
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 '@
|
|
3
|
-
import CustomDocsNavWrapper from '@
|
|
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 './
|
|
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
|
-
//
|
|
16
|
-
import { customPagesSchema, resourceDocsSchema, resourceDocCategoriesSchema } from './
|
|
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
|
-
//
|
|
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 {
|
|
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 '@
|
|
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
|
-
|
|
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
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
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
|
|
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,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
|
|
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 || (
|
|
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
|