@backstage-community/plugin-mcp-chat 0.3.1 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @backstage-community/plugin-mcp-chat
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 805e6fd: Add support for new frontend system
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 158dbf4: Backstage version bump to v1.48.5
14
+
3
15
  ## 0.3.1
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,84 @@
1
+ /// <reference types="react" />
2
+ import * as react from 'react';
3
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
4
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
+
6
+ /**
7
+ * MCP Chat plugin.
8
+ @public
9
+ */
10
+ declare const mcpChatPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
11
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
12
+ }, {}, {
13
+ "api:mcp-chat": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
14
+ kind: "api";
15
+ name: undefined;
16
+ config: {};
17
+ configInput: {};
18
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
19
+ inputs: {};
20
+ params: <TApi, TImpl extends TApi, TDeps extends {
21
+ [x: string]: unknown;
22
+ }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
23
+ }>;
24
+ "nav-item:mcp-chat": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
25
+ kind: "nav-item";
26
+ name: undefined;
27
+ config: {};
28
+ configInput: {};
29
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<{
30
+ title: string;
31
+ icon: _backstage_frontend_plugin_api.IconComponent;
32
+ routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
33
+ }, "core.nav-item.target", {}>;
34
+ inputs: {};
35
+ params: {
36
+ title: string;
37
+ icon: _backstage_frontend_plugin_api.IconComponent;
38
+ routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
39
+ };
40
+ }>;
41
+ "page:mcp-chat": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
42
+ kind: "page";
43
+ name: undefined;
44
+ config: {
45
+ path: string | undefined;
46
+ title: string | undefined;
47
+ };
48
+ configInput: {
49
+ title?: string | undefined;
50
+ path?: string | undefined;
51
+ };
52
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
53
+ optional: true;
54
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
55
+ optional: true;
56
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
57
+ optional: true;
58
+ }>;
59
+ inputs: {
60
+ pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
61
+ optional: true;
62
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
63
+ optional: true;
64
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
65
+ optional: true;
66
+ }>, {
67
+ singleton: false;
68
+ optional: false;
69
+ internal: false;
70
+ }>;
71
+ };
72
+ params: {
73
+ defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
74
+ path: string;
75
+ title?: string | undefined;
76
+ icon?: _backstage_frontend_plugin_api.IconElement | undefined;
77
+ loader?: (() => Promise<react.JSX.Element>) | undefined;
78
+ routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
79
+ noHeader?: boolean | undefined;
80
+ };
81
+ }>;
82
+ }>;
83
+
84
+ export { mcpChatPlugin as default };
@@ -0,0 +1,38 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { ApiBlueprint, fetchApiRef, discoveryApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
+ import { mcpChatApiRef } from './api/index.esm.js';
4
+ import { McpChat } from './api/McpChatApi.esm.js';
5
+ import { BotIconComponent } from './components/BotIcon/BotIcon.esm.js';
6
+ import { rootRouteRef } from './routes.esm.js';
7
+
8
+ const mcpChatApi = ApiBlueprint.make({
9
+ params: (defineParams) => defineParams({
10
+ api: mcpChatApiRef,
11
+ deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },
12
+ factory: ({ discoveryApi, fetchApi }) => new McpChat({ discoveryApi, fetchApi })
13
+ })
14
+ });
15
+ const mcpChatPage = PageBlueprint.make({
16
+ params: {
17
+ path: "/mcp-chat",
18
+ loader: () => import('./components/ChatPage/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ChatPage, {})),
19
+ routeRef: rootRouteRef
20
+ }
21
+ });
22
+ const mcpChatNavItem = NavItemBlueprint.make({
23
+ params: {
24
+ title: "MCP Chat",
25
+ icon: BotIconComponent,
26
+ routeRef: rootRouteRef
27
+ }
28
+ });
29
+ const mcpChatPlugin = createFrontendPlugin({
30
+ pluginId: "mcp-chat",
31
+ extensions: [mcpChatApi, mcpChatPage, mcpChatNavItem],
32
+ routes: {
33
+ root: rootRouteRef
34
+ }
35
+ });
36
+
37
+ export { mcpChatPlugin as default };
38
+ //# sourceMappingURL=alpha.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ApiBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n NavItemBlueprint,\n PageBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { mcpChatApiRef } from './api';\nimport { McpChat } from './api/McpChatApi';\nimport { BotIconComponent } from './components/BotIcon';\nimport { rootRouteRef } from './routes';\n\n/**\n * MCP Chat Api\n * @public\n */\nconst mcpChatApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: mcpChatApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new McpChat({ discoveryApi, fetchApi }),\n }),\n});\n\n/**\n * MCP Chat Page\n * @public\n */\nconst mcpChatPage = PageBlueprint.make({\n params: {\n path: '/mcp-chat',\n loader: () => import('./components/ChatPage').then(m => <m.ChatPage />),\n routeRef: rootRouteRef,\n },\n});\n\n/**\n * MCP Chat Nav Item\n * @public\n */\nconst mcpChatNavItem = NavItemBlueprint.make({\n params: {\n title: 'MCP Chat',\n icon: BotIconComponent,\n routeRef: rootRouteRef,\n },\n});\n\n/**\n * MCP Chat plugin.\n @public\n */\nconst mcpChatPlugin = createFrontendPlugin({\n pluginId: 'mcp-chat',\n extensions: [mcpChatApi, mcpChatPage, mcpChatNavItem],\n routes: {\n root: rootRouteRef,\n },\n});\n\nexport default mcpChatPlugin;\n"],"names":[],"mappings":";;;;;;;AAgCA,MAAM,UAAA,GAAa,aAAa,IAAA,CAAK;AAAA,EACnC,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,aAAA;AAAA,IACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,IAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,OAAA,CAAQ,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,GACzC;AACL,CAAC,CAAA;AAMD,MAAM,WAAA,GAAc,cAAc,IAAA,CAAK;AAAA,EACrC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,WAAA;AAAA,IACN,MAAA,EAAQ,MAAM,OAAO,oCAAuB,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,QAAA,EAAF,EAAW,CAAE,CAAA;AAAA,IACtE,QAAA,EAAU;AAAA;AAEd,CAAC,CAAA;AAMD,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,UAAA;AAAA,IACP,IAAA,EAAM,gBAAA;AAAA,IACN,QAAA,EAAU;AAAA;AAEd,CAAC,CAAA;AAMD,MAAM,gBAAgB,oBAAA,CAAqB;AAAA,EACzC,QAAA,EAAU,UAAA;AAAA,EACV,UAAA,EAAY,CAAC,UAAA,EAAY,WAAA,EAAa,cAAc,CAAA;AAAA,EACpD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA;AAEV,CAAC;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
- import { IconComponent } from '@backstage/core-plugin-api';
3
+ import { ComponentType } from 'react';
4
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
4
5
 
5
6
  /**
6
7
  * MCP Chat plugin.
@@ -18,7 +19,9 @@ declare const McpChatPage: () => react_jsx_runtime.JSX.Element;
18
19
  * MCP Chat Icon
19
20
  * @public
20
21
  */
21
- declare const MCPChatIcon: IconComponent;
22
+ declare const MCPChatIcon: ComponentType<{
23
+ fontSize?: 'medium' | 'large' | 'small' | 'inherit';
24
+ }>;
22
25
 
23
26
  /**
24
27
  * MCP server connection types
@@ -182,7 +185,7 @@ interface McpChatApi {
182
185
  /**
183
186
  * @public
184
187
  */
185
- declare const mcpChatApiRef: _backstage_core_plugin_api.ApiRef<McpChatApi>;
188
+ declare const mcpChatApiRef: _backstage_frontend_plugin_api.ApiRef<McpChatApi>;
186
189
 
187
190
  export { MCPChatIcon, MCPServerType, McpChatPage, mcpChatApiRef, mcpChatPlugin };
188
191
  export type { ChatMessage, ChatResponse, ConversationRecord, ConversationsResponse, MCPServer, MCPServerStatusData, McpChatApi, Provider, ProviderConnectionStatus, ProviderStatusData, Tool, ToolsResponse };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createPlugin,\n createRoutableExtension,\n createApiFactory,\n discoveryApiRef,\n fetchApiRef,\n IconComponent,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport { mcpChatApiRef } from './api';\nimport { McpChat } from './api/McpChatApi';\nimport { BotIconComponent } from './components/BotIcon';\n\n/**\n * MCP Chat plugin.\n @public\n */\n\nexport const mcpChatPlugin = createPlugin({\n id: 'mcp-chat',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: mcpChatApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new McpChat({ discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/**\n * MCP Chat Page\n * @public\n */\nexport const McpChatPage = mcpChatPlugin.provide(\n createRoutableExtension({\n name: 'McpChatPage',\n component: () => import('./components/ChatPage').then(m => m.ChatPage),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * MCP Chat Icon\n * @public\n */\nexport const MCPChatIcon: IconComponent = BotIconComponent;\n"],"names":[],"mappings":";;;;;;AAkCO,MAAM,gBAAgB,YAAA,CAAa;AAAA,EACxC,EAAA,EAAI,UAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,aAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,OAAA,CAAQ,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KACzC;AAAA;AAEL,CAAC;AAMM,MAAM,cAAc,aAAA,CAAc,OAAA;AAAA,EACvC,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,aAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,oCAAuB,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,QAAQ,CAAA;AAAA,IACrE,UAAA,EAAY;AAAA,GACb;AACH;AAMO,MAAM,WAAA,GAA6B;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentType } from 'react';\nimport {\n createPlugin,\n createRoutableExtension,\n createApiFactory,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport { mcpChatApiRef } from './api';\nimport { McpChat } from './api/McpChatApi';\nimport { BotIconComponent } from './components/BotIcon';\n\n/**\n * MCP Chat plugin.\n @public\n */\n\nexport const mcpChatPlugin = createPlugin({\n id: 'mcp-chat',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: mcpChatApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new McpChat({ discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/**\n * MCP Chat Page\n * @public\n */\nexport const McpChatPage = mcpChatPlugin.provide(\n createRoutableExtension({\n name: 'McpChatPage',\n component: () => import('./components/ChatPage').then(m => m.ChatPage),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * MCP Chat Icon\n * @public\n */\nexport const MCPChatIcon: ComponentType<{\n fontSize?: 'medium' | 'large' | 'small' | 'inherit';\n}> = BotIconComponent;\n"],"names":[],"mappings":";;;;;;AAkCO,MAAM,gBAAgB,YAAA,CAAa;AAAA,EACxC,EAAA,EAAI,UAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,aAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,OAAA,CAAQ,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KACzC;AAAA;AAEL,CAAC;AAMM,MAAM,cAAc,aAAA,CAAc,OAAA;AAAA,EACvC,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,aAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,oCAAuB,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,QAAQ,CAAA;AAAA,IACrE,UAAA,EAAY;AAAA,GACb;AACH;AAMO,MAAM,WAAA,GAER;;;;"}
package/package.json CHANGED
@@ -1,14 +1,36 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-mcp-chat",
3
3
  "description": "A Backstage plugin that provides a chat interface for interacting with the MCP Servers.",
4
- "version": "0.3.1",
4
+ "version": "0.5.0",
5
5
  "license": "Apache-2.0",
6
- "main": "dist/index.esm.js",
7
- "types": "dist/index.d.ts",
6
+ "main": "./dist/index.esm.js",
7
+ "types": "./dist/index.d.ts",
8
8
  "publishConfig": {
9
- "access": "public",
10
- "main": "dist/index.esm.js",
11
- "types": "dist/index.d.ts"
9
+ "access": "public"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.esm.js",
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.esm.js"
16
+ },
17
+ "./alpha": {
18
+ "backstage": "@backstage/FrontendPlugin",
19
+ "import": "./dist/alpha.esm.js",
20
+ "types": "./dist/alpha.d.ts",
21
+ "default": "./dist/alpha.esm.js"
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
25
+ "typesVersions": {
26
+ "*": {
27
+ "alpha": [
28
+ "dist/alpha.d.ts"
29
+ ],
30
+ "package.json": [
31
+ "package.json"
32
+ ]
33
+ }
12
34
  },
13
35
  "backstage": {
14
36
  "role": "frontend-plugin",
@@ -17,7 +39,10 @@
17
39
  "pluginPackage": "@backstage-community/plugin-mcp-chat",
18
40
  "pluginPackages": [
19
41
  "@backstage-community/plugin-mcp-chat"
20
- ]
42
+ ],
43
+ "features": {
44
+ "./alpha": "@backstage/FrontendPlugin"
45
+ }
21
46
  },
22
47
  "sideEffects": false,
23
48
  "scripts": {
@@ -30,10 +55,11 @@
30
55
  "postpack": "backstage-cli package postpack"
31
56
  },
32
57
  "dependencies": {
33
- "@backstage/core-components": "^0.17.3",
34
- "@backstage/core-plugin-api": "^1.10.8",
58
+ "@backstage/core-components": "^0.18.7",
59
+ "@backstage/core-plugin-api": "^1.12.3",
35
60
  "@backstage/errors": "^1.2.7",
36
- "@backstage/theme": "^0.6.6",
61
+ "@backstage/frontend-plugin-api": "^0.14.1",
62
+ "@backstage/theme": "^0.7.2",
37
63
  "@mui/icons-material": "^5.17.1",
38
64
  "@mui/material": "^5.17.1",
39
65
  "react-markdown": "^10.1.0",
@@ -47,9 +73,9 @@
47
73
  "react-router-dom": "^6.3.0"
48
74
  },
49
75
  "devDependencies": {
50
- "@backstage/cli": "^0.33.0",
51
- "@backstage/dev-utils": "^1.1.11",
52
- "@backstage/test-utils": "^1.7.8",
76
+ "@backstage/cli": "^0.35.4",
77
+ "@backstage/dev-utils": "^1.1.20",
78
+ "@backstage/test-utils": "^1.7.15",
53
79
  "@testing-library/dom": "^10.4.1",
54
80
  "@testing-library/jest-dom": "^6.0.0",
55
81
  "@testing-library/react": "^16.0.0",
@@ -82,12 +108,5 @@
82
108
  "Lucifergene"
83
109
  ],
84
110
  "author": "Avik Kundu",
85
- "typesVersions": {
86
- "*": {
87
- "package.json": [
88
- "package.json"
89
- ]
90
- }
91
- },
92
111
  "module": "./dist/index.esm.js"
93
112
  }