@igstack/app-catalog-frontend-core 6.14.0 → 6.16.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 (151) hide show
  1. package/dist/esm/api/infra/trpc.d.ts +36 -0
  2. package/dist/esm/index.d.ts +1 -1
  3. package/dist/esm/internal.d.ts +1 -0
  4. package/dist/esm/internal.js +2 -0
  5. package/dist/esm/internal.js.map +1 -1
  6. package/dist/esm/lib/externalLink.d.ts +8 -0
  7. package/dist/esm/lib/externalLink.js +9 -0
  8. package/dist/esm/lib/externalLink.js.map +1 -0
  9. package/dist/esm/modules/appCatalog/context/AppCatalogContext.d.ts +3 -1
  10. package/dist/esm/modules/appCatalog/context/AppCatalogContext.js +2 -0
  11. package/dist/esm/modules/appCatalog/context/AppCatalogContext.js.map +1 -1
  12. package/dist/esm/modules/appCatalog/hooks/useUpdateApp.d.ts +36 -36
  13. package/dist/esm/modules/appCatalog/ui/components/SectionTabs.d.ts +2 -1
  14. package/dist/esm/modules/appCatalog/ui/components/SectionTabs.js +11 -1
  15. package/dist/esm/modules/appCatalog/ui/components/SectionTabs.js.map +1 -1
  16. package/dist/esm/modules/appCatalog/ui/components/SourcesList.d.ts +10 -0
  17. package/dist/esm/modules/appCatalog/ui/components/SourcesList.js +51 -0
  18. package/dist/esm/modules/appCatalog/ui/components/SourcesList.js.map +1 -0
  19. package/dist/esm/modules/appCatalog/ui/detail/AppDetails.js +9 -52
  20. package/dist/esm/modules/appCatalog/ui/detail/AppDetails.js.map +1 -1
  21. package/dist/esm/modules/appCatalog/ui/pages/ServiceDesksPage.js +12 -7
  22. package/dist/esm/modules/appCatalog/ui/pages/ServiceDesksPage.js.map +1 -1
  23. package/dist/esm/modules/communityTools/useCommunityTools.d.ts +6 -6
  24. package/dist/esm/modules/mcpCatalog/McpAccessLine.d.ts +5 -0
  25. package/dist/esm/modules/mcpCatalog/McpAccessLine.js +48 -0
  26. package/dist/esm/modules/mcpCatalog/McpAccessLine.js.map +1 -0
  27. package/dist/esm/modules/mcpCatalog/McpCatalogPage.d.ts +11 -0
  28. package/dist/esm/modules/mcpCatalog/McpCatalogPage.js +289 -0
  29. package/dist/esm/modules/mcpCatalog/McpCatalogPage.js.map +1 -0
  30. package/dist/esm/modules/mcpCatalog/McpInfoTiles.d.ts +5 -0
  31. package/dist/esm/modules/mcpCatalog/McpInfoTiles.js +88 -0
  32. package/dist/esm/modules/mcpCatalog/McpInfoTiles.js.map +1 -0
  33. package/dist/esm/modules/mcpCatalog/McpSafetyLines.d.ts +5 -0
  34. package/dist/esm/modules/mcpCatalog/McpSafetyLines.js +82 -0
  35. package/dist/esm/modules/mcpCatalog/McpSafetyLines.js.map +1 -0
  36. package/dist/esm/modules/mcpCatalog/McpSearchResult.d.ts +18 -0
  37. package/dist/esm/modules/mcpCatalog/McpSearchResult.js +150 -0
  38. package/dist/esm/modules/mcpCatalog/McpSearchResult.js.map +1 -0
  39. package/dist/esm/modules/mcpCatalog/McpServerDetail.d.ts +8 -0
  40. package/dist/esm/modules/mcpCatalog/McpServerDetail.js +116 -0
  41. package/dist/esm/modules/mcpCatalog/McpServerDetail.js.map +1 -0
  42. package/dist/esm/modules/mcpCatalog/McpServerRow.d.ts +10 -0
  43. package/dist/esm/modules/mcpCatalog/McpServerRow.js +75 -0
  44. package/dist/esm/modules/mcpCatalog/McpServerRow.js.map +1 -0
  45. package/dist/esm/modules/mcpCatalog/McpToolsTable.d.ts +5 -0
  46. package/dist/esm/modules/mcpCatalog/McpToolsTable.js +24 -0
  47. package/dist/esm/modules/mcpCatalog/McpToolsTable.js.map +1 -0
  48. package/dist/esm/modules/mcpCatalog/Triad.d.ts +13 -0
  49. package/dist/esm/modules/mcpCatalog/Triad.js +175 -0
  50. package/dist/esm/modules/mcpCatalog/Triad.js.map +1 -0
  51. package/dist/esm/modules/mcpCatalog/cart/McpCart.d.ts +15 -0
  52. package/dist/esm/modules/mcpCatalog/cart/McpCart.js +156 -0
  53. package/dist/esm/modules/mcpCatalog/cart/McpCart.js.map +1 -0
  54. package/dist/esm/modules/mcpCatalog/cart/useMcpCart.d.ts +11 -0
  55. package/dist/esm/modules/mcpCatalog/cart/useMcpCart.js +48 -0
  56. package/dist/esm/modules/mcpCatalog/cart/useMcpCart.js.map +1 -0
  57. package/dist/esm/modules/mcpCatalog/install/InstallButton.d.ts +12 -0
  58. package/dist/esm/modules/mcpCatalog/install/InstallButton.js +126 -0
  59. package/dist/esm/modules/mcpCatalog/install/InstallButton.js.map +1 -0
  60. package/dist/esm/modules/mcpCatalog/install/InstallMenu.d.ts +14 -0
  61. package/dist/esm/modules/mcpCatalog/install/InstallMenu.js +139 -0
  62. package/dist/esm/modules/mcpCatalog/install/InstallMenu.js.map +1 -0
  63. package/dist/esm/modules/mcpCatalog/install/WhatHappensDialog.d.ts +10 -0
  64. package/dist/esm/modules/mcpCatalog/install/WhatHappensDialog.js +161 -0
  65. package/dist/esm/modules/mcpCatalog/install/WhatHappensDialog.js.map +1 -0
  66. package/dist/esm/modules/mcpCatalog/install/installOptions.d.ts +40 -0
  67. package/dist/esm/modules/mcpCatalog/install/installOptions.js +204 -0
  68. package/dist/esm/modules/mcpCatalog/install/installOptions.js.map +1 -0
  69. package/dist/esm/modules/mcpCatalog/install/useMcpPrefs.d.ts +14 -0
  70. package/dist/esm/modules/mcpCatalog/install/useMcpPrefs.js +39 -0
  71. package/dist/esm/modules/mcpCatalog/install/useMcpPrefs.js.map +1 -0
  72. package/dist/esm/modules/mcpCatalog/searchMcpServers.d.ts +25 -0
  73. package/dist/esm/modules/mcpCatalog/searchMcpServers.js +44 -0
  74. package/dist/esm/modules/mcpCatalog/searchMcpServers.js.map +1 -0
  75. package/dist/esm/modules/mcpCatalog/signIn.d.ts +13 -0
  76. package/dist/esm/modules/mcpCatalog/signIn.js +29 -0
  77. package/dist/esm/modules/mcpCatalog/signIn.js.map +1 -0
  78. package/dist/esm/modules/mcpCatalog/useHasMcpServers.d.ts +8 -0
  79. package/dist/esm/modules/mcpCatalog/useHasMcpServers.js +13 -0
  80. package/dist/esm/modules/mcpCatalog/useHasMcpServers.js.map +1 -0
  81. package/dist/esm/modules/mcpCatalog/useMcpCatalogConfig.d.ts +7 -0
  82. package/dist/esm/modules/mcpCatalog/useMcpCatalogConfig.js +16 -0
  83. package/dist/esm/modules/mcpCatalog/useMcpCatalogConfig.js.map +1 -0
  84. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js +3 -3
  85. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js +1 -1
  86. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js +1 -1
  87. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js +2 -2
  88. package/dist/esm/routeTree.gen.d.ts +43 -17
  89. package/dist/esm/routeTree.gen.js +15 -3
  90. package/dist/esm/routeTree.gen.js.map +1 -1
  91. package/dist/esm/routes/_layout/community.$slug.d.ts +3 -3
  92. package/dist/esm/routes/_layout/community.d.ts +3 -3
  93. package/dist/esm/routes/_layout/mcp.$slug.d.ts +9 -0
  94. package/dist/esm/routes/_layout/mcp._slug.js +8 -0
  95. package/dist/esm/routes/_layout/mcp._slug.js.map +1 -0
  96. package/dist/esm/routes/_layout/mcp.d.ts +5 -1
  97. package/dist/esm/routes/_layout/mcp.js +45 -5
  98. package/dist/esm/routes/_layout/mcp.js.map +1 -1
  99. package/dist/esm/types/uiSettings.d.ts +10 -0
  100. package/dist/esm/ui/button.d.ts +1 -1
  101. package/dist/esm/ui/components/header/Header.js +1 -5
  102. package/dist/esm/ui/components/header/Header.js.map +1 -1
  103. package/dist/esm/ui/empty.d.ts +1 -1
  104. package/dist/esm/ui/item.d.ts +1 -1
  105. package/dist/esm/userDb/AcDb.d.ts +10 -0
  106. package/dist/esm/userDb/AcDb.js +6 -0
  107. package/dist/esm/userDb/AcDb.js.map +1 -1
  108. package/package.json +4 -4
  109. package/src/__tests__/modules/communityTools/timeAgo.test.ts +16 -0
  110. package/src/index.tsx +6 -1
  111. package/src/internal.ts +1 -0
  112. package/src/lib/externalLink.ts +10 -0
  113. package/src/modules/appCatalog/context/AppCatalogContext.tsx +5 -0
  114. package/src/modules/appCatalog/ui/components/SectionTabs.tsx +14 -1
  115. package/src/modules/appCatalog/ui/components/SourcesList.tsx +62 -0
  116. package/src/modules/appCatalog/ui/detail/AppDetails.tsx +6 -52
  117. package/src/modules/appCatalog/ui/pages/ServiceDesksPage.tsx +18 -3
  118. package/src/modules/mcpCatalog/McpAccessLine.tsx +54 -0
  119. package/src/modules/mcpCatalog/McpCatalogPage.tsx +324 -0
  120. package/src/modules/mcpCatalog/McpInfoTiles.tsx +112 -0
  121. package/src/modules/mcpCatalog/McpSafetyLines.tsx +89 -0
  122. package/src/modules/mcpCatalog/McpSearchResult.tsx +173 -0
  123. package/src/modules/mcpCatalog/McpServerDetail.tsx +145 -0
  124. package/src/modules/mcpCatalog/McpServerRow.tsx +78 -0
  125. package/src/modules/mcpCatalog/McpToolsTable.tsx +36 -0
  126. package/src/modules/mcpCatalog/Triad.tsx +213 -0
  127. package/src/modules/mcpCatalog/cart/McpCart.tsx +171 -0
  128. package/src/modules/mcpCatalog/cart/useMcpCart.ts +64 -0
  129. package/src/modules/mcpCatalog/install/InstallButton.tsx +154 -0
  130. package/src/modules/mcpCatalog/install/InstallMenu.tsx +160 -0
  131. package/src/modules/mcpCatalog/install/WhatHappensDialog.tsx +199 -0
  132. package/src/modules/mcpCatalog/install/installOptions.tsx +266 -0
  133. package/src/modules/mcpCatalog/install/useMcpPrefs.ts +55 -0
  134. package/src/modules/mcpCatalog/searchMcpServers.ts +84 -0
  135. package/src/modules/mcpCatalog/signIn.ts +34 -0
  136. package/src/modules/mcpCatalog/useHasMcpServers.ts +22 -0
  137. package/src/modules/mcpCatalog/useMcpCatalogConfig.ts +20 -0
  138. package/src/routeTree.gen.ts +36 -5
  139. package/src/routes/_layout/mcp.$slug.tsx +10 -0
  140. package/src/routes/_layout/mcp.tsx +63 -3
  141. package/src/types/uiSettings.ts +11 -0
  142. package/src/ui/components/header/Header.tsx +1 -7
  143. package/src/userDb/AcDb.ts +13 -0
  144. package/dist/esm/modules/appCatalog/ui/pages/McpPage.d.ts +0 -11
  145. package/dist/esm/modules/appCatalog/ui/pages/McpPage.js +0 -227
  146. package/dist/esm/modules/appCatalog/ui/pages/McpPage.js.map +0 -1
  147. package/dist/esm/modules/appCatalog/utils/fetchMcpTools.d.ts +0 -32
  148. package/dist/esm/modules/appCatalog/utils/fetchMcpTools.js +0 -79
  149. package/dist/esm/modules/appCatalog/utils/fetchMcpTools.js.map +0 -1
  150. package/src/modules/appCatalog/ui/pages/McpPage.tsx +0 -275
  151. package/src/modules/appCatalog/utils/fetchMcpTools.ts +0 -140
@@ -18,6 +18,7 @@ import { Route as LayoutServiceDesksRouteImport } from './routes/_layout/service
18
18
  import { Route as AuthCallbackRouteImport } from './routes/auth.callback'
19
19
  import { Route as LayoutAppSlugRouteImport } from './routes/_layout/app.$slug'
20
20
  import { Route as LayoutCommunitySlugRouteImport } from './routes/_layout/community.$slug'
21
+ import { Route as LayoutMcpSlugRouteImport } from './routes/_layout/mcp.$slug'
21
22
  import { Route as LayoutServiceDesksSlugRouteImport } from './routes/_layout/service-desks.$slug'
22
23
  import { Route as LayoutCatalogAppsIndexRouteImport } from './routes/_layout/catalog.apps.index'
23
24
  import { Route as LayoutAppSlugSubSubSlugRouteImport } from './routes/_layout/app.$slug_.sub.$subSlug'
@@ -66,6 +67,11 @@ const LayoutCommunitySlugRoute = LayoutCommunitySlugRouteImport.update({
66
67
  path: '/$slug',
67
68
  getParentRoute: () => LayoutCommunityRoute,
68
69
  } as any)
70
+ const LayoutMcpSlugRoute = LayoutMcpSlugRouteImport.update({
71
+ id: '/$slug',
72
+ path: '/$slug',
73
+ getParentRoute: () => LayoutMcpRoute,
74
+ } as any)
69
75
  const LayoutServiceDesksSlugRoute = LayoutServiceDesksSlugRouteImport.update({
70
76
  id: '/$slug',
71
77
  path: '/$slug',
@@ -86,11 +92,12 @@ export interface FileRoutesByFullPath {
86
92
  '/': typeof LayoutIndexRoute
87
93
  '/community': typeof LayoutCommunityRouteWithChildren
88
94
  '/login': typeof LayoutLoginRoute
89
- '/mcp': typeof LayoutMcpRoute
95
+ '/mcp': typeof LayoutMcpRouteWithChildren
90
96
  '/service-desks': typeof LayoutServiceDesksRouteWithChildren
91
97
  '/auth/callback': typeof AuthCallbackRoute
92
98
  '/app/$slug': typeof LayoutAppSlugRoute
93
99
  '/community/$slug': typeof LayoutCommunitySlugRoute
100
+ '/mcp/$slug': typeof LayoutMcpSlugRoute
94
101
  '/service-desks/$slug': typeof LayoutServiceDesksSlugRoute
95
102
  '/catalog/apps/': typeof LayoutCatalogAppsIndexRoute
96
103
  '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute
@@ -98,12 +105,13 @@ export interface FileRoutesByFullPath {
98
105
  export interface FileRoutesByTo {
99
106
  '/community': typeof LayoutCommunityRouteWithChildren
100
107
  '/login': typeof LayoutLoginRoute
101
- '/mcp': typeof LayoutMcpRoute
108
+ '/mcp': typeof LayoutMcpRouteWithChildren
102
109
  '/service-desks': typeof LayoutServiceDesksRouteWithChildren
103
110
  '/auth/callback': typeof AuthCallbackRoute
104
111
  '/': typeof LayoutIndexRoute
105
112
  '/app/$slug': typeof LayoutAppSlugRoute
106
113
  '/community/$slug': typeof LayoutCommunitySlugRoute
114
+ '/mcp/$slug': typeof LayoutMcpSlugRoute
107
115
  '/service-desks/$slug': typeof LayoutServiceDesksSlugRoute
108
116
  '/catalog/apps': typeof LayoutCatalogAppsIndexRoute
109
117
  '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute
@@ -113,12 +121,13 @@ export interface FileRoutesById {
113
121
  '/_layout': typeof LayoutRouteWithChildren
114
122
  '/_layout/community': typeof LayoutCommunityRouteWithChildren
115
123
  '/_layout/login': typeof LayoutLoginRoute
116
- '/_layout/mcp': typeof LayoutMcpRoute
124
+ '/_layout/mcp': typeof LayoutMcpRouteWithChildren
117
125
  '/_layout/service-desks': typeof LayoutServiceDesksRouteWithChildren
118
126
  '/auth/callback': typeof AuthCallbackRoute
119
127
  '/_layout/': typeof LayoutIndexRoute
120
128
  '/_layout/app/$slug': typeof LayoutAppSlugRoute
121
129
  '/_layout/community/$slug': typeof LayoutCommunitySlugRoute
130
+ '/_layout/mcp/$slug': typeof LayoutMcpSlugRoute
122
131
  '/_layout/service-desks/$slug': typeof LayoutServiceDesksSlugRoute
123
132
  '/_layout/catalog/apps/': typeof LayoutCatalogAppsIndexRoute
124
133
  '/_layout/app/$slug_/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute
@@ -134,6 +143,7 @@ export interface FileRouteTypes {
134
143
  | '/auth/callback'
135
144
  | '/app/$slug'
136
145
  | '/community/$slug'
146
+ | '/mcp/$slug'
137
147
  | '/service-desks/$slug'
138
148
  | '/catalog/apps/'
139
149
  | '/app/$slug/sub/$subSlug'
@@ -147,6 +157,7 @@ export interface FileRouteTypes {
147
157
  | '/'
148
158
  | '/app/$slug'
149
159
  | '/community/$slug'
160
+ | '/mcp/$slug'
150
161
  | '/service-desks/$slug'
151
162
  | '/catalog/apps'
152
163
  | '/app/$slug/sub/$subSlug'
@@ -161,6 +172,7 @@ export interface FileRouteTypes {
161
172
  | '/_layout/'
162
173
  | '/_layout/app/$slug'
163
174
  | '/_layout/community/$slug'
175
+ | '/_layout/mcp/$slug'
164
176
  | '/_layout/service-desks/$slug'
165
177
  | '/_layout/catalog/apps/'
166
178
  | '/_layout/app/$slug_/sub/$subSlug'
@@ -236,6 +248,13 @@ declare module '@tanstack/react-router' {
236
248
  preLoaderRoute: typeof LayoutCommunitySlugRouteImport
237
249
  parentRoute: typeof LayoutCommunityRoute
238
250
  }
251
+ '/_layout/mcp/$slug': {
252
+ id: '/_layout/mcp/$slug'
253
+ path: '/$slug'
254
+ fullPath: '/mcp/$slug'
255
+ preLoaderRoute: typeof LayoutMcpSlugRouteImport
256
+ parentRoute: typeof LayoutMcpRoute
257
+ }
239
258
  '/_layout/service-desks/$slug': {
240
259
  id: '/_layout/service-desks/$slug'
241
260
  path: '/$slug'
@@ -272,6 +291,18 @@ const LayoutCommunityRouteWithChildren = LayoutCommunityRoute._addFileChildren(
272
291
  LayoutCommunityRouteChildren,
273
292
  )
274
293
 
294
+ interface LayoutMcpRouteChildren {
295
+ LayoutMcpSlugRoute: typeof LayoutMcpSlugRoute
296
+ }
297
+
298
+ const LayoutMcpRouteChildren: LayoutMcpRouteChildren = {
299
+ LayoutMcpSlugRoute: LayoutMcpSlugRoute,
300
+ }
301
+
302
+ const LayoutMcpRouteWithChildren = LayoutMcpRoute._addFileChildren(
303
+ LayoutMcpRouteChildren,
304
+ )
305
+
275
306
  interface LayoutServiceDesksRouteChildren {
276
307
  LayoutServiceDesksSlugRoute: typeof LayoutServiceDesksSlugRoute
277
308
  }
@@ -286,7 +317,7 @@ const LayoutServiceDesksRouteWithChildren =
286
317
  interface LayoutRouteChildren {
287
318
  LayoutCommunityRoute: typeof LayoutCommunityRouteWithChildren
288
319
  LayoutLoginRoute: typeof LayoutLoginRoute
289
- LayoutMcpRoute: typeof LayoutMcpRoute
320
+ LayoutMcpRoute: typeof LayoutMcpRouteWithChildren
290
321
  LayoutServiceDesksRoute: typeof LayoutServiceDesksRouteWithChildren
291
322
  LayoutIndexRoute: typeof LayoutIndexRoute
292
323
  LayoutAppSlugRoute: typeof LayoutAppSlugRoute
@@ -297,7 +328,7 @@ interface LayoutRouteChildren {
297
328
  const LayoutRouteChildren: LayoutRouteChildren = {
298
329
  LayoutCommunityRoute: LayoutCommunityRouteWithChildren,
299
330
  LayoutLoginRoute: LayoutLoginRoute,
300
- LayoutMcpRoute: LayoutMcpRoute,
331
+ LayoutMcpRoute: LayoutMcpRouteWithChildren,
301
332
  LayoutServiceDesksRoute: LayoutServiceDesksRouteWithChildren,
302
333
  LayoutIndexRoute: LayoutIndexRoute,
303
334
  LayoutAppSlugRoute: LayoutAppSlugRoute,
@@ -0,0 +1,10 @@
1
+ import { createFileRoute } from '@tanstack/react-router'
2
+
3
+ /**
4
+ * One server's detail dialog, `/mcp/<slug>`. Renders nothing: the parent
5
+ * `/mcp` route owns the page and reads the slug, so opening a server never
6
+ * remounts the list or loses the search.
7
+ */
8
+ export const Route = createFileRoute('/_layout/mcp/$slug')({
9
+ component: () => null,
10
+ })
@@ -1,17 +1,77 @@
1
- import { createFileRoute } from '@tanstack/react-router'
1
+ import {
2
+ Outlet,
3
+ createFileRoute,
4
+ useNavigate,
5
+ useParams,
6
+ } from '@tanstack/react-router'
7
+ import { z } from 'zod'
2
8
  import { AppCatalogLayout } from '~/modules/appCatalog/ui/layout/AppCatalogLayout'
3
- import { McpPage } from '~/modules/appCatalog/ui/pages/McpPage'
9
+ import { McpCatalogPage } from '~/modules/mcpCatalog/McpCatalogPage'
10
+ import { McpServerDetail } from '~/modules/mcpCatalog/McpServerDetail'
11
+ import { useHasMcpServers } from '~/modules/mcpCatalog/useHasMcpServers'
12
+ import { NotFoundError } from '~/ui/error/NotFoundError'
13
+ import { TopLevelProvidersForErrors } from '~/ui/layout/TopLevelProvidersForErrors'
14
+
15
+ // The router JSON-parses search values, so `?cart=123` or `?q=42` arrive as
16
+ // numbers; both are text here.
17
+ const text = z
18
+ .union([z.string(), z.number()])
19
+ .transform(String)
20
+ .optional()
21
+ .catch(undefined)
22
+
23
+ // Both absent by default, so a plain /mcp link stays plain.
24
+ const searchSchema = z.object({
25
+ /** The search, so a search can be shared. */
26
+ q: text,
27
+ /** Comma-separated slugs of a shared cart. */
28
+ cart: text,
29
+ })
4
30
 
5
31
  export const Route = createFileRoute('/_layout/mcp')({
6
32
  component: RouteComponent,
33
+ validateSearch: searchSchema,
7
34
  })
8
35
 
9
36
  function RouteComponent() {
10
37
  const { queryClient, trpcClient } = Route.useRouteContext()
38
+ const { q } = Route.useSearch()
39
+ // Unscoped, so `to: '.'` is the current match: a child route under /mcp
40
+ // keeps its params while the query changes.
41
+ const navigate = useNavigate()
42
+ // Set while a server's dialog is open: the child route's slug.
43
+ const { slug } = useParams({ strict: false })
44
+ const hasServers = useHasMcpServers(queryClient)
45
+
46
+ if (hasServers === false) {
47
+ return (
48
+ <TopLevelProvidersForErrors>
49
+ <NotFoundError />
50
+ </TopLevelProvidersForErrors>
51
+ )
52
+ }
11
53
 
12
54
  return (
13
55
  <AppCatalogLayout queryClient={queryClient} trpcClient={trpcClient}>
14
- <McpPage />
56
+ <McpCatalogPage
57
+ q={q ?? ''}
58
+ onQueryChange={(next) =>
59
+ void navigate({
60
+ to: '.',
61
+ search: (prev) => ({ ...prev, q: next || undefined }),
62
+ replace: true,
63
+ })
64
+ }
65
+ />
66
+ {slug && (
67
+ <McpServerDetail
68
+ slug={slug}
69
+ // Back to the list with the search it was opened from.
70
+ onClose={() => void navigate({ to: '/mcp', search: (prev) => prev })}
71
+ />
72
+ )}
73
+ {/* The detail route renders nothing; the dialog above reads its slug. */}
74
+ <Outlet />
15
75
  </AppCatalogLayout>
16
76
  )
17
77
  }
@@ -23,6 +23,15 @@ export interface AreasSettings {
23
23
  dayToDayLabel?: string
24
24
  }
25
25
 
26
+ /**
27
+ * Presentation of the Service Desks view's area sections. A desk's area comes
28
+ * from its portal data, so the core knows none of them.
29
+ */
30
+ export interface ServiceDesksSettings {
31
+ /** Icon per area name, as the portals spell it. Areas without one show the accent bar. */
32
+ areaIcons?: Record<string, AreaIcon>
33
+ }
34
+
26
35
  /**
27
36
  * UI settings passed from the app entry point.
28
37
  */
@@ -43,6 +52,8 @@ export interface UiSettings {
43
52
  chatChannelUrlTemplate?: string
44
53
  /** Area sections on the home view: icons and the day-to-day fold. */
45
54
  areas?: AreasSettings
55
+ /** The Service Desks view's area sections. */
56
+ serviceDesks?: ServiceDesksSettings
46
57
  /** PWA auto-update configuration (idle timeout, check interval, debug) */
47
58
  pwaAutoUpdate?: PwaAutoUpdateOptions
48
59
  /**
@@ -4,7 +4,7 @@ import type {
4
4
  } from '@igstack/app-catalog-backend-core'
5
5
  import { Link } from '@tanstack/react-router'
6
6
  import { useQuery } from '@tanstack/react-query'
7
- import { LogOut, Plug, X } from 'lucide-react'
7
+ import { LogOut, X } from 'lucide-react'
8
8
  import React, { use } from 'react'
9
9
  import AppCatalogLogo from '~/assets/app-catalog.svg?react'
10
10
  import { useTRPC } from '~/api/infra/trpc'
@@ -211,12 +211,6 @@ export function Header({ middle }: HeaderProps) {
211
211
  </div>
212
212
  {middle && <div className="flex-1">{middle}</div>}
213
213
  <div className="flex items-center gap-3 ml-auto">
214
- <Button variant="outline" size="sm" asChild>
215
- <Link to="/mcp">
216
- <Plug />
217
- MCP
218
- </Link>
219
- </Button>
220
214
  <ThemeSwitcher />
221
215
  {isLoading ? (
222
216
  <Skeleton className="w-8 h-8 rounded-full" />
@@ -3,6 +3,7 @@ import type {
3
3
  AppCatalogData,
4
4
  TRPCRouter,
5
5
  } from '@igstack/app-catalog-backend-core'
6
+ import type { InstallOptionId } from '@igstack/app-catalog-shared-core'
6
7
  import type { inferRouterOutputs } from '@trpc/server'
7
8
  import type { Table } from 'dexie'
8
9
 
@@ -15,10 +16,16 @@ export interface AppClickHistoryItem {
15
16
  timestamp: number
16
17
  }
17
18
 
19
+ /** The MCP tab's remembered choices, one row per key. */
20
+ export type McpPref =
21
+ | { key: 'installWith'; value: InstallOptionId }
22
+ | { key: 'installed'; value: string[] }
23
+
18
24
  export class AcDb extends Dexie {
19
25
  appCatalog!: Table<AppCatalogData>
20
26
  appClickHistory!: Table<AppClickHistoryItem>
21
27
  communityToolsConfig!: Table<CommunityToolsConfig>
28
+ mcpPrefs!: Table<McpPref, McpPref['key']>
22
29
 
23
30
  constructor() {
24
31
  super('app-catalog')
@@ -34,6 +41,12 @@ export class AcDb extends Dexie {
34
41
  appClickHistory: '++id, appSlug, timestamp',
35
42
  communityToolsConfig: '',
36
43
  })
44
+ this.version(4).stores({
45
+ appCatalog: '',
46
+ appClickHistory: '++id, appSlug, timestamp',
47
+ communityToolsConfig: '',
48
+ mcpPrefs: 'key',
49
+ })
37
50
  }
38
51
 
39
52
  /**
@@ -1,11 +0,0 @@
1
- /**
2
- * MCP docs page: how to point an AI agent at this catalog.
3
- *
4
- * Every snippet is built from `window.location.origin`, so production, a
5
- * preview host and localhost each show a config that actually works — nothing
6
- * is hardcoded.
7
- *
8
- * The tool reference is fetched from the live registry (`tools/list`) rather
9
- * than written out by hand, so it cannot rot when the server's tools change.
10
- */
11
- export declare function McpPage(): import("react/jsx-runtime").JSX.Element;
@@ -1,227 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { TriangleAlert, Check, Copy } from "lucide-react";
3
- import { useState, useRef, useEffect, useCallback } from "react";
4
- import { Button } from "../../../../ui/button.js";
5
- import { Spinner } from "../../../../ui/spinner.js";
6
- import { fetchMcpTools, MCP_ENDPOINT_PATH } from "../../utils/fetchMcpTools.js";
7
- function McpPage() {
8
- const origin = typeof window === "undefined" ? "" : window.location.origin;
9
- const endpoint = `${origin}${MCP_ENDPOINT_PATH}`;
10
- const serverName = "app-catalog";
11
- const [tools, setTools] = useState(null);
12
- const [error, setError] = useState(null);
13
- const [reloadKey, setReloadKey] = useState(0);
14
- const headingRef = useRef(null);
15
- useEffect(() => {
16
- var _a;
17
- (_a = headingRef.current) == null ? void 0 : _a.focus();
18
- }, []);
19
- useEffect(() => {
20
- const controller = new AbortController();
21
- setTools(null);
22
- setError(null);
23
- fetchMcpTools(origin, controller.signal).then(setTools).catch((err) => {
24
- if (controller.signal.aborted) return;
25
- setError(
26
- err instanceof Error ? err.message : "Could not reach the MCP endpoint."
27
- );
28
- });
29
- return () => controller.abort();
30
- }, [origin, reloadKey]);
31
- const mcpJson = JSON.stringify(
32
- {
33
- mcpServers: {
34
- [serverName]: { type: "http", url: endpoint }
35
- }
36
- },
37
- null,
38
- 2
39
- );
40
- const cliCommand = `claude mcp add --transport http ${serverName} ${endpoint}`;
41
- return /* @__PURE__ */ jsx("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-8 w-full max-w-3xl mx-auto pb-8", children: [
42
- /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2", children: [
43
- /* @__PURE__ */ jsx(
44
- "h1",
45
- {
46
- ref: headingRef,
47
- tabIndex: -1,
48
- className: "text-xl font-semibold outline-none",
49
- children: "MCP server"
50
- }
51
- ),
52
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
53
- "This catalog exposes a",
54
- " ",
55
- /* @__PURE__ */ jsx(
56
- "a",
57
- {
58
- href: "https://modelcontextprotocol.io",
59
- target: "_blank",
60
- rel: "noopener noreferrer",
61
- className: "text-primary hover:underline",
62
- children: "Model Context Protocol"
63
- }
64
- ),
65
- " ",
66
- "server, so an AI agent can search the catalog and read an entry the same way you can — what exists, who owns it, and how to request access. Point your agent at the endpoint below and it gains those tools; no key or account is needed."
67
- ] }),
68
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
69
- "It speaks MCP over Streamable HTTP (JSON-RPC over",
70
- " ",
71
- /* @__PURE__ */ jsx("code", { className: "text-xs", children: "POST" }),
72
- "), and it is read-only."
73
- ] })
74
- ] }),
75
- /* @__PURE__ */ jsx(
76
- Snippet,
77
- {
78
- title: "Endpoint",
79
- description: "The URL an MCP client connects to.",
80
- value: endpoint
81
- }
82
- ),
83
- /* @__PURE__ */ jsx(
84
- Snippet,
85
- {
86
- title: "Add it with the CLI",
87
- description: "One command, if your agent ships a CLI that manages MCP servers.",
88
- value: cliCommand
89
- }
90
- ),
91
- /* @__PURE__ */ jsx(
92
- Snippet,
93
- {
94
- title: "Or add it to .mcp.json",
95
- description: "Commit this in a project so everyone working on it gets the same tools.",
96
- value: mcpJson,
97
- language: "json"
98
- }
99
- ),
100
- /* @__PURE__ */ jsxs(
101
- "section",
102
- {
103
- className: "flex flex-col gap-3",
104
- "aria-busy": tools === null && error === null,
105
- children: [
106
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
107
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold", children: "Tools" }),
108
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Read live from the server, so this list is always what your agent will actually see." })
109
- ] }),
110
- error !== null ? /* @__PURE__ */ jsxs(
111
- "div",
112
- {
113
- role: "alert",
114
- className: "flex flex-col items-start gap-3 rounded-md border border-destructive/40 bg-destructive/5 p-4",
115
- children: [
116
- /* @__PURE__ */ jsxs("p", { className: "flex items-start gap-2 text-sm", children: [
117
- /* @__PURE__ */ jsx(TriangleAlert, { className: "size-4 shrink-0 mt-0.5 text-destructive" }),
118
- /* @__PURE__ */ jsxs("span", { children: [
119
- "Could not read the tool list. ",
120
- error,
121
- " The setup instructions above are still correct."
122
- ] })
123
- ] }),
124
- /* @__PURE__ */ jsx(
125
- Button,
126
- {
127
- variant: "outline",
128
- size: "sm",
129
- onClick: () => setReloadKey((k) => k + 1),
130
- children: "Try again"
131
- }
132
- )
133
- ]
134
- }
135
- ) : tools === null ? /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
136
- /* @__PURE__ */ jsx(Spinner, { className: "size-4" }),
137
- "Reading the tool list…"
138
- ] }) : tools.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "The server reported no tools." }) : /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-4 list-none p-0 m-0", children: tools.map((tool) => /* @__PURE__ */ jsxs(
139
- "li",
140
- {
141
- className: "rounded-md border p-4 flex flex-col gap-2",
142
- children: [
143
- /* @__PURE__ */ jsx("code", { className: "text-sm font-semibold", children: tool.name }),
144
- tool.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: tool.description }),
145
- tool.parameters.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "No parameters." }) : /* @__PURE__ */ jsx("dl", { className: "flex flex-col gap-2 m-0", children: tool.parameters.map((param) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
146
- /* @__PURE__ */ jsxs("dt", { className: "text-xs", children: [
147
- /* @__PURE__ */ jsx("code", { className: "font-medium", children: param.name }),
148
- param.type && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
149
- " ",
150
- param.type
151
- ] }),
152
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
153
- " ",
154
- "— ",
155
- param.required ? "required" : "optional"
156
- ] })
157
- ] }),
158
- param.description && /* @__PURE__ */ jsx("dd", { className: "text-xs text-muted-foreground m-0", children: param.description }),
159
- param.enumValues && /* @__PURE__ */ jsxs("dd", { className: "text-xs text-muted-foreground m-0", children: [
160
- "One of: ",
161
- param.enumValues.join(", ")
162
- ] })
163
- ] }, param.name)) })
164
- ]
165
- },
166
- tool.name
167
- )) })
168
- ]
169
- }
170
- )
171
- ] }) });
172
- }
173
- function Snippet({
174
- title,
175
- description,
176
- value,
177
- language
178
- }) {
179
- return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2", children: [
180
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold", children: title }),
181
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description }),
182
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
183
- /* @__PURE__ */ jsx(
184
- "pre",
185
- {
186
- className: "overflow-x-auto rounded-md border bg-muted/40 p-3 pr-12 text-xs",
187
- "data-language": language,
188
- children: /* @__PURE__ */ jsx("code", { children: value })
189
- }
190
- ),
191
- /* @__PURE__ */ jsx(CopyButton, { value, label: title })
192
- ] })
193
- ] });
194
- }
195
- function CopyButton({ value, label }) {
196
- const [copied, setCopied] = useState(false);
197
- const timeoutRef = useRef(null);
198
- useEffect(
199
- () => () => {
200
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
201
- },
202
- []
203
- );
204
- const copy = useCallback(() => {
205
- void navigator.clipboard.writeText(value);
206
- setCopied(true);
207
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
208
- timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
209
- }, [value]);
210
- return /* @__PURE__ */ jsx(
211
- Button,
212
- {
213
- type: "button",
214
- variant: "ghost",
215
- size: "icon",
216
- onClick: copy,
217
- "aria-label": copied ? `${label} copied` : `Copy ${label}`,
218
- title: copied ? "Copied" : "Copy",
219
- className: "absolute right-1.5 top-1.5",
220
- children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-4 text-primary" }) : /* @__PURE__ */ jsx(Copy, { className: "size-4" })
221
- }
222
- );
223
- }
224
- export {
225
- McpPage
226
- };
227
- //# sourceMappingURL=McpPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"McpPage.js","sources":["../../../../../../src/modules/appCatalog/ui/pages/McpPage.tsx"],"sourcesContent":["import { Check, Copy, TriangleAlert } from 'lucide-react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { Button } from '~/ui/button'\nimport { Spinner } from '~/ui/spinner'\nimport type { McpTool } from '../../utils/fetchMcpTools'\nimport { MCP_ENDPOINT_PATH, fetchMcpTools } from '../../utils/fetchMcpTools'\n\n/**\n * MCP docs page: how to point an AI agent at this catalog.\n *\n * Every snippet is built from `window.location.origin`, so production, a\n * preview host and localhost each show a config that actually works — nothing\n * is hardcoded.\n *\n * The tool reference is fetched from the live registry (`tools/list`) rather\n * than written out by hand, so it cannot rot when the server's tools change.\n */\nexport function McpPage() {\n const origin = typeof window === 'undefined' ? '' : window.location.origin\n const endpoint = `${origin}${MCP_ENDPOINT_PATH}`\n const serverName = 'app-catalog'\n\n const [tools, setTools] = useState<McpTool[] | null>(null)\n const [error, setError] = useState<string | null>(null)\n const [reloadKey, setReloadKey] = useState(0)\n const headingRef = useRef<HTMLHeadingElement>(null)\n\n // New view: land keyboard and screen-reader users in the content rather than\n // leaving focus on whatever nav element was clicked.\n useEffect(() => {\n headingRef.current?.focus()\n }, [])\n\n useEffect(() => {\n const controller = new AbortController()\n setTools(null)\n setError(null)\n fetchMcpTools(origin, controller.signal)\n .then(setTools)\n .catch((err: unknown) => {\n if (controller.signal.aborted) return\n setError(\n err instanceof Error\n ? err.message\n : 'Could not reach the MCP endpoint.',\n )\n })\n return () => controller.abort()\n }, [origin, reloadKey])\n\n const mcpJson = JSON.stringify(\n {\n mcpServers: {\n [serverName]: { type: 'http', url: endpoint },\n },\n },\n null,\n 2,\n )\n const cliCommand = `claude mcp add --transport http ${serverName} ${endpoint}`\n\n return (\n <div className=\"flex flex-col flex-1 min-h-0 overflow-y-auto\">\n <div className=\"flex flex-col gap-8 w-full max-w-3xl mx-auto pb-8\">\n <section className=\"flex flex-col gap-2\">\n <h1\n ref={headingRef}\n tabIndex={-1}\n className=\"text-xl font-semibold outline-none\"\n >\n MCP server\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n This catalog exposes a{' '}\n <a\n href=\"https://modelcontextprotocol.io\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-primary hover:underline\"\n >\n Model Context Protocol\n </a>{' '}\n server, so an AI agent can search the catalog and read an entry the\n same way you can — what exists, who owns it, and how to request\n access. Point your agent at the endpoint below and it gains those\n tools; no key or account is needed.\n </p>\n <p className=\"text-sm text-muted-foreground\">\n It speaks MCP over Streamable HTTP (JSON-RPC over{' '}\n <code className=\"text-xs\">POST</code>), and it is read-only.\n </p>\n </section>\n\n <Snippet\n title=\"Endpoint\"\n description=\"The URL an MCP client connects to.\"\n value={endpoint}\n />\n\n <Snippet\n title=\"Add it with the CLI\"\n description=\"One command, if your agent ships a CLI that manages MCP servers.\"\n value={cliCommand}\n />\n\n <Snippet\n title=\"Or add it to .mcp.json\"\n description=\"Commit this in a project so everyone working on it gets the same tools.\"\n value={mcpJson}\n language=\"json\"\n />\n\n <section\n className=\"flex flex-col gap-3\"\n aria-busy={tools === null && error === null}\n >\n <div className=\"flex flex-col gap-1\">\n <h2 className=\"text-base font-semibold\">Tools</h2>\n <p className=\"text-xs text-muted-foreground\">\n Read live from the server, so this list is always what your agent\n will actually see.\n </p>\n </div>\n\n {error !== null ? (\n <div\n role=\"alert\"\n className=\"flex flex-col items-start gap-3 rounded-md border border-destructive/40 bg-destructive/5 p-4\"\n >\n <p className=\"flex items-start gap-2 text-sm\">\n <TriangleAlert className=\"size-4 shrink-0 mt-0.5 text-destructive\" />\n <span>\n Could not read the tool list. {error} The setup instructions\n above are still correct.\n </span>\n </p>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setReloadKey((k) => k + 1)}\n >\n Try again\n </Button>\n </div>\n ) : tools === null ? (\n <p className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <Spinner className=\"size-4\" />\n Reading the tool list…\n </p>\n ) : tools.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">\n The server reported no tools.\n </p>\n ) : (\n <ul className=\"flex flex-col gap-4 list-none p-0 m-0\">\n {tools.map((tool) => (\n <li\n key={tool.name}\n className=\"rounded-md border p-4 flex flex-col gap-2\"\n >\n <code className=\"text-sm font-semibold\">{tool.name}</code>\n {tool.description && (\n <p className=\"text-sm text-muted-foreground\">\n {tool.description}\n </p>\n )}\n {tool.parameters.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">\n No parameters.\n </p>\n ) : (\n <dl className=\"flex flex-col gap-2 m-0\">\n {tool.parameters.map((param) => (\n <div key={param.name} className=\"flex flex-col gap-0.5\">\n <dt className=\"text-xs\">\n <code className=\"font-medium\">{param.name}</code>\n {param.type && (\n <span className=\"text-muted-foreground\">\n {' '}\n {param.type}\n </span>\n )}\n <span className=\"text-muted-foreground\">\n {' '}\n — {param.required ? 'required' : 'optional'}\n </span>\n </dt>\n {param.description && (\n <dd className=\"text-xs text-muted-foreground m-0\">\n {param.description}\n </dd>\n )}\n {param.enumValues && (\n <dd className=\"text-xs text-muted-foreground m-0\">\n One of: {param.enumValues.join(', ')}\n </dd>\n )}\n </div>\n ))}\n </dl>\n )}\n </li>\n ))}\n </ul>\n )}\n </section>\n </div>\n </div>\n )\n}\n\nfunction Snippet({\n title,\n description,\n value,\n language,\n}: {\n title: string\n description: string\n value: string\n language?: string\n}) {\n return (\n <section className=\"flex flex-col gap-2\">\n <h2 className=\"text-base font-semibold\">{title}</h2>\n <p className=\"text-xs text-muted-foreground\">{description}</p>\n <div className=\"relative\">\n <pre\n className=\"overflow-x-auto rounded-md border bg-muted/40 p-3 pr-12 text-xs\"\n data-language={language}\n >\n <code>{value}</code>\n </pre>\n <CopyButton value={value} label={title} />\n </div>\n </section>\n )\n}\n\nfunction CopyButton({ value, label }: { value: string; label: string }) {\n const [copied, setCopied] = useState(false)\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n useEffect(\n () => () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n },\n [],\n )\n\n const copy = useCallback(() => {\n void navigator.clipboard.writeText(value)\n setCopied(true)\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n timeoutRef.current = setTimeout(() => setCopied(false), 2000)\n }, [value])\n\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={copy}\n aria-label={copied ? `${label} copied` : `Copy ${label}`}\n title={copied ? 'Copied' : 'Copy'}\n className=\"absolute right-1.5 top-1.5\"\n >\n {copied ? (\n <Check className=\"size-4 text-primary\" />\n ) : (\n <Copy className=\"size-4\" />\n )}\n </Button>\n )\n}\n"],"names":[],"mappings":";;;;;;AAiBO,SAAS,UAAU;AACxB,QAAM,SAAS,OAAO,WAAW,cAAc,KAAK,OAAO,SAAS;AACpE,QAAM,WAAW,GAAG,MAAM,GAAG,iBAAiB;AAC9C,QAAM,aAAa;AAEnB,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA2B,IAAI;AACzD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAwB,IAAI;AACtD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,CAAC;AAC5C,QAAM,aAAa,OAA2B,IAAI;AAIlD,Y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AAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,SAAS;AAAA,MACT,cAAY,SAAS,GAAG,KAAK,YAAY,QAAQ,KAAK;AAAA,MACtD,OAAO,SAAS,WAAW;AAAA,MAC3B,WAAU;AAAA,MAET,UAAA,6BACE,OAAA,EAAM,WAAU,uBAAsB,IAEvC,oBAAC,MAAA,EAAK,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAIjC;"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Minimal MCP client for the docs page: one `tools/list` call over Streamable
3
- * HTTP. Deliberately raw `fetch` rather than the MCP SDK — the page needs one
4
- * unauthenticated read and nothing else.
5
- *
6
- * The endpoint is stateless (a fresh server per request), so `tools/list`
7
- * stands alone with no `initialize` handshake. It may answer with either JSON
8
- * or a single SSE event, so both are parsed.
9
- */
10
- export interface McpToolParameter {
11
- name: string;
12
- type?: string;
13
- required: boolean;
14
- description?: string;
15
- enumValues?: string[];
16
- }
17
- export interface McpTool {
18
- name: string;
19
- title?: string;
20
- description?: string;
21
- parameters: McpToolParameter[];
22
- }
23
- /** Path the MCP server is mounted at, relative to the site origin. */
24
- export declare const MCP_ENDPOINT_PATH = "/api/mcp";
25
- /**
26
- * Fetch the live tool registry so this page cannot go stale when the tools
27
- * change.
28
- *
29
- * @param origin - Site origin, e.g. `window.location.origin`
30
- * @param signal - Optional abort signal
31
- */
32
- export declare function fetchMcpTools(origin: string, signal?: AbortSignal): Promise<McpTool[]>;