@assistant-ui/react-mcp 0.0.17 → 0.0.19
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/dist/auth/buildHeaders.d.ts +0 -1
- package/dist/auth/buildHeaders.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.d.ts +4 -3
- package/dist/auth/createOAuthProvider.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.js +2 -1
- package/dist/auth/createOAuthProvider.js.map +1 -1
- package/dist/auth/types.d.ts +2 -2
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/connector.d.ts +0 -1
- package/dist/connector.d.ts.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.d.ts +0 -1
- package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.d.ts +0 -1
- package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpServerByIdProvider.d.ts +0 -1
- package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.d.ts +4 -3
- package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.js +14 -8
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
- package/dist/mcp-scope.d.ts +16 -6
- package/dist/mcp-scope.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts +0 -1
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
- package/dist/primitives/addForm/context.d.ts +0 -1
- package/dist/primitives/addForm/context.d.ts.map +1 -1
- package/dist/primitives/addForm.d.ts +0 -2
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +0 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.d.ts +0 -1
- package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.js.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.d.ts +0 -1
- package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.js.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.d.ts +0 -1
- package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
- package/dist/primitives/manager.d.ts +0 -2
- package/dist/primitives/server/McpServerConnectButton.d.ts +0 -1
- package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.d.ts +0 -1
- package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerError.d.ts +0 -1
- package/dist/primitives/server/McpServerError.d.ts.map +1 -1
- package/dist/primitives/server/McpServerError.js.map +1 -1
- package/dist/primitives/server/McpServerIcon.d.ts +4 -3
- package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
- package/dist/primitives/server/McpServerName.d.ts +0 -1
- package/dist/primitives/server/McpServerName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerName.js.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.d.ts +4 -3
- package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.d.ts +0 -1
- package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRoot.d.ts +0 -1
- package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
- package/dist/primitives/server/McpServerStatus.d.ts +0 -1
- package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
- package/dist/primitives/server/McpServerStatus.js.map +1 -1
- package/dist/primitives/server/McpServerToolName.d.ts +0 -1
- package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerToolName.js.map +1 -1
- package/dist/primitives/server/McpServerTools.d.ts +0 -1
- package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
- package/dist/primitives/server/McpServerTools.js.map +1 -1
- package/dist/primitives/server.d.ts +0 -2
- package/dist/resources/McpManagerResource.d.ts +6 -4
- package/dist/resources/McpManagerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.d.ts +0 -1
- package/dist/resources/McpServerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.js +99 -34
- package/dist/resources/McpServerResource.js.map +1 -1
- package/dist/resources/storage/McpCustomStorage.d.ts +0 -1
- package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.d.ts +8 -3
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.js +66 -3
- package/dist/resources/storage/McpLocalStorage.js.map +1 -1
- package/dist/resources/storage/McpMemoryStorage.d.ts +0 -1
- package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
- package/dist/resources/storage/types.d.ts +0 -1
- package/dist/resources/storage/types.d.ts.map +1 -1
- package/dist/utils/serverId.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/hooks/useMcpOAuthCallback.test.ts +24 -0
- package/src/hooks/useMcpOAuthCallback.tsx +20 -5
- package/src/mcp-scope.ts +2 -0
- package/src/resources/McpServerResource.test.ts +327 -11
- package/src/resources/McpServerResource.ts +124 -30
- package/src/resources/storage/McpLocalStorage.test.ts +240 -0
- package/src/resources/storage/McpLocalStorage.ts +134 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerConnectors.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpManagerConnectors.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"mappings":";;;kBASiB;OACH;;;;;;IAMV,WAAW;MAAS,QAAQ;UAAqB;;;;;;;;;;;;;;;;;;cAqDxC,+BAA+B,GAAG,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerConnectors.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpConnectorByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveConnectors","Props","children","value","server","McpManagerPrimitiveConnectorsInner","idsJoined","s","mcp","connectors","map","c","id","join","ids","split","length","index","aui","connector","getState","getItem","prev","next","displayName"],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpConnectorByIndexProvider } from \"../../context/McpConnectorByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\n// ASCII Unit Separator — never appears in MCP connector ids (uuids, urls,\n// app-provided strings).\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveConnectors {\n export type Props = {\n /**\n * Render function called once per connector. Receives a lazy `server`\n * accessor — reading it inside the render function subscribes to that\n * connector's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveConnectorsInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n // Subscribe to the connector id list, joined to a primitive so identity\n // is stable when the list hasn't changed. Re-renders on add/remove/reorder\n // but not on per-item state changes.\n const idsJoined = useAuiState((s) =>\n s.mcp.connectors.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpConnectorByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().connector({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpConnectorByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all connectors declared on `McpManagerResource`.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.Connectors>\n * {({ server }) => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * {server.connectionState === \"error\" && <p>{server.lastError?.message}</p>}\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.Connectors>\n * ```\n */\nexport const McpManagerPrimitiveConnectors: FC<McpManagerPrimitiveConnectors.Props> =\n memo(\n McpManagerPrimitiveConnectorsInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveConnectors.displayName = \"McpManagerPrimitive.Connectors\";\n"],"mappings":";;;;;AAOA,MAAMQ,MAAM;AAaZ,MAAMM,sCAEA,EAAEH,eAAe;CAIrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,WAAWC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC5C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,6BAAD;GAA6CA;
|
|
1
|
+
{"version":3,"file":"McpManagerConnectors.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpConnectorByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveConnectors","Props","children","value","server","McpManagerPrimitiveConnectorsInner","idsJoined","s","mcp","connectors","map","c","id","join","ids","split","length","index","aui","connector","getState","getItem","prev","next","displayName"],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpConnectorByIndexProvider } from \"../../context/McpConnectorByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\n// ASCII Unit Separator — never appears in MCP connector ids (uuids, urls,\n// app-provided strings).\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveConnectors {\n export type Props = {\n /**\n * Render function called once per connector. Receives a lazy `server`\n * accessor — reading it inside the render function subscribes to that\n * connector's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveConnectorsInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n // Subscribe to the connector id list, joined to a primitive so identity\n // is stable when the list hasn't changed. Re-renders on add/remove/reorder\n // but not on per-item state changes.\n const idsJoined = useAuiState((s) =>\n s.mcp.connectors.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpConnectorByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().connector({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpConnectorByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all connectors declared on `McpManagerResource`.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.Connectors>\n * {({ server }) => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * {server.connectionState === \"error\" && <p>{server.lastError?.message}</p>}\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.Connectors>\n * ```\n */\nexport const McpManagerPrimitiveConnectors: FC<McpManagerPrimitiveConnectors.Props> =\n memo(\n McpManagerPrimitiveConnectorsInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveConnectors.displayName = \"McpManagerPrimitive.Connectors\";\n"],"mappings":";;;;;AAOA,MAAMQ,MAAM;AAaZ,MAAMM,sCAEA,EAAEH,eAAe;CAIrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,WAAWC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC5C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,6BAAD;GAA6CA;GAC3C,UAAA,oBAAC,4BAAD;IACE,eAAeC,QAAQA,IAAIV,IAAI,CAAC,CAACW,UAAU,EAAEF,MAAM,CAAC,CAAC,CAACG,SAAS;IAE7DC,WAAAA,YACAnB,SAAS,EACP,IAAIE,SAAS;KACX,OAAOiB,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACD,GAZKT,EAYL,CAC9B;CACH,GAAG,CAACE,KAAKZ,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAaF,gCACXP,KACEY,qCACCiB,MAAMC,SAASD,KAAKpB,aAAaqB,KAAKrB,QACzC;AAEFF,8BAA8BwB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerCustomServers.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpManagerCustomServers.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"mappings":";;;kBAOiB;OACH;;;;;;IAMV,WAAW;MAAS,QAAQ;UAAqB;;;;;;;;;;;;;;;;;;cAkDxC,kCAAkC,GAAG,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerCustomServers.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpCustomServerByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveCustomServers","Props","children","value","server","McpManagerPrimitiveCustomServersInner","idsJoined","s","mcp","customServers","map","c","id","join","ids","split","length","index","aui","customServer","getState","getItem","prev","next","displayName"],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpCustomServerByIndexProvider } from \"../../context/McpCustomServerByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveCustomServers {\n export type Props = {\n /**\n * Render function called once per custom server. Receives a lazy\n * `server` accessor — reading it inside the render function subscribes\n * to that server's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveCustomServersInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n const idsJoined = useAuiState((s) =>\n s.mcp.customServers.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpCustomServerByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().customServer({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpCustomServerByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all user-added custom servers persisted in storage.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.CustomServers>\n * {() => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.CustomServers>\n * ```\n */\nexport const McpManagerPrimitiveCustomServers: FC<McpManagerPrimitiveCustomServers.Props> =\n memo(\n McpManagerPrimitiveCustomServersInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveCustomServers.displayName =\n \"McpManagerPrimitive.CustomServers\";\n"],"mappings":";;;;;AAKA,MAAMQ,MAAM;AAaZ,MAAMM,yCAEA,EAAEH,eAAe;CACrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,cAAcC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC/C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,gCAAD;GAAgDA;
|
|
1
|
+
{"version":3,"file":"McpManagerCustomServers.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpCustomServerByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveCustomServers","Props","children","value","server","McpManagerPrimitiveCustomServersInner","idsJoined","s","mcp","customServers","map","c","id","join","ids","split","length","index","aui","customServer","getState","getItem","prev","next","displayName"],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpCustomServerByIndexProvider } from \"../../context/McpCustomServerByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveCustomServers {\n export type Props = {\n /**\n * Render function called once per custom server. Receives a lazy\n * `server` accessor — reading it inside the render function subscribes\n * to that server's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveCustomServersInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n const idsJoined = useAuiState((s) =>\n s.mcp.customServers.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpCustomServerByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().customServer({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpCustomServerByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all user-added custom servers persisted in storage.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.CustomServers>\n * {() => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.CustomServers>\n * ```\n */\nexport const McpManagerPrimitiveCustomServers: FC<McpManagerPrimitiveCustomServers.Props> =\n memo(\n McpManagerPrimitiveCustomServersInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveCustomServers.displayName =\n \"McpManagerPrimitive.CustomServers\";\n"],"mappings":";;;;;AAKA,MAAMQ,MAAM;AAaZ,MAAMM,yCAEA,EAAEH,eAAe;CACrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,cAAcC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC/C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,gCAAD;GAAgDA;GAC9C,UAAA,oBAAC,4BAAD;IACE,eAAeC,QAAQA,IAAIV,IAAI,CAAC,CAACW,aAAa,EAAEF,MAAM,CAAC,CAAC,CAACG,SAAS;IAEhEC,WAAAA,YACAnB,SAAS,EACP,IAAIE,SAAS;KACX,OAAOiB,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACE,GAZKT,EAYL,CACjC;CACH,GAAG,CAACE,KAAKZ,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAaF,mCACXP,KACEY,wCACCiB,MAAMC,SAASD,KAAKpB,aAAaqB,KAAKrB,QACzC;AAEFF,iCAAiCwB,cAC/B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/manager/McpManagerRoot.d.ts
|
|
5
4
|
declare namespace McpManagerPrimitiveRoot {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.div>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerRoot.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpManagerRoot.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,yCAAuB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;4BAYlC,cAAA"}
|
|
@@ -2,8 +2,6 @@ import { McpManagerPrimitiveRoot } from "./manager/McpManagerRoot.js";
|
|
|
2
2
|
import { McpManagerPrimitiveConnectors } from "./manager/McpManagerConnectors.js";
|
|
3
3
|
import { McpManagerPrimitiveCustomServers } from "./manager/McpManagerCustomServers.js";
|
|
4
4
|
import { McpManagerPrimitiveAddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
|
|
5
|
-
|
|
6
|
-
//#region src/primitives/manager.d.ts
|
|
7
5
|
declare namespace manager_d_exports {
|
|
8
6
|
export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger, McpManagerPrimitiveConnectors as Connectors, McpManagerPrimitiveCustomServers as CustomServers, McpManagerPrimitiveRoot as Root };
|
|
9
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerConnectButton.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveConnectButton {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.button>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerConnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerConnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAKnD,iDAA+B,0BAAA,qBAAA,gBAAA,qCAAA,qBAAA;;4BAoB1C,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerDisconnectButton.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveDisconnectButton {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.button>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerDisconnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerDisconnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAKnD,oDAAkC,0BAAA,qBAAA,gBAAA,qCAAA,qBAAA;;4BAmB7C,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerError.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveError {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.div>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerError.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerError.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerError.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerError.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,yCAAuB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;4BAWlC,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveError","Element","div","Props","props","ref","$","_c","message","_temp","t0","children","t1","displayName","s","mcpServer","lastError"],"sources":["../../../src/primitives/server/McpServerError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveError = forwardRef<\n McpServerPrimitiveError.Element,\n McpServerPrimitiveError.Props\n>((props, ref) => {\n const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);\n if (message === null) return null;\n return (\n <Primitive.div {...props} ref={ref}>\n {props.children ?? message}\n </Primitive.div>\n );\n});\n\nMcpServerPrimitiveError.displayName = \"McpServerPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,UAAgBT,YAAYU,KAA6C;CACzE,IAAID,YAAY,MAAI,OAAS;CAGxB,MAAAE,KAAAN,MAAKO,YAALH;CAAyB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAD5BE,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBR;GAAYC;
|
|
1
|
+
{"version":3,"file":"McpServerError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveError","Element","div","Props","props","ref","$","_c","message","_temp","t0","children","t1","displayName","s","mcpServer","lastError"],"sources":["../../../src/primitives/server/McpServerError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveError = forwardRef<\n McpServerPrimitiveError.Element,\n McpServerPrimitiveError.Props\n>((props, ref) => {\n const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);\n if (message === null) return null;\n return (\n <Primitive.div {...props} ref={ref}>\n {props.children ?? message}\n </Primitive.div>\n );\n});\n\nMcpServerPrimitiveError.displayName = \"McpServerPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,UAAgBT,YAAYU,KAA6C;CACzE,IAAID,YAAY,MAAI,OAAS;CAGxB,MAAAE,KAAAN,MAAKO,YAALH;CAAyB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAD5BE,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBR;GAAYC;GAC5BK,UAAAA;EACH,CAAA;EAAgBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFhBM;AAEgB,CAEnB;AAEDZ,wBAAwBa,cAAc;AAVpC,SAAAJ,MAAAK,GAAA;CAAA,OACmCA,EAACC,UAAUC,WAAmBR,WAA9B;AAAsC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerIcon.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveIcon {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.img>;
|
|
7
6
|
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.img>, "src" | "alt"> & {
|
|
8
|
-
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
7
|
+
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
8
|
+
src?: string;
|
|
9
9
|
alt?: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
declare const McpServerPrimitiveIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
13
13
|
asChild?: boolean;
|
|
14
14
|
}, "ref">, "alt" | "src"> & {
|
|
15
|
-
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
15
|
+
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
16
|
+
src?: string;
|
|
16
17
|
alt?: string;
|
|
17
18
|
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
18
19
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerIcon.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerIcon.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;IAI1C;IACA;;;cAIS,wCAAsB,0BAAA,KAAA,qBAAA,gBAAA,oCAAA,kBAAA;;;;EALzB;EACA;oBAeR,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerName.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveName {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.span>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerName.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerName.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerName.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerName.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,wCAAsB,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAUjC,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveName = forwardRef<\n McpServerPrimitiveName.Element,\n McpServerPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.mcpServer.name);\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveName.displayName = \"McpServerPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAG3C,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;
|
|
1
|
+
{"version":3,"file":"McpServerName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveName = forwardRef<\n McpServerPrimitiveName.Element,\n McpServerPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.mcpServer.name);\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveName.displayName = \"McpServerPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAG3C,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BK,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,uBAAuBa,cAAc;AATnC,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACC,UAAUP;AAAK"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerOAuthLink.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveOAuthLink {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.a>;
|
|
7
6
|
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.a>, "href"> & {
|
|
8
|
-
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
7
|
+
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
8
|
+
href?: string;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
declare const McpServerPrimitiveOAuthLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
}, "ref">, "href"> & {
|
|
14
|
-
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
14
|
+
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
15
|
+
href?: string;
|
|
15
16
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
16
17
|
//#endregion
|
|
17
18
|
export { McpServerPrimitiveOAuthLink };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerOAuthLink.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;IAI1C;;;cAIS,6CAA2B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;EAJ7B;oBAoBT,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerRemoveButton.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveRemoveButton {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.button>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRemoveButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,gDAA8B,0BAAA,qBAAA,gBAAA,qCAAA,qBAAA;;4BAmBzC,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerRoot.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveRoot {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.div>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRoot.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerRoot.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,wCAAsB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;4BAmBjC,cAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerStatus.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveStatus {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.span>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerStatus.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerStatus.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,0CAAwB,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAUnC,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerStatus.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveStatus","Element","span","Props","props","ref","$","_c","state","_temp","t0","children","t1","displayName","s","mcpServer","connectionState"],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveStatus {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveStatus = forwardRef<\n McpServerPrimitiveStatus.Element,\n McpServerPrimitiveStatus.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n return (\n <Primitive.span {...props} ref={ref} data-state={state}>\n {props.children ?? state}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveStatus.displayName = \"McpServerPrimitive.Status\";\n"],"mappings":";;;;;;AAaA,MAAaK,2BAA2BH,YAGtCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,YAAYU,KAAkC;CAGvD,MAAAC,KAAAN,MAAKO,YAALH;CAAuB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,SAAAF,EAAA,OAAAI,IAAA;EAD1BE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAiBG,cAAAA;
|
|
1
|
+
{"version":3,"file":"McpServerStatus.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveStatus","Element","span","Props","props","ref","$","_c","state","_temp","t0","children","t1","displayName","s","mcpServer","connectionState"],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveStatus {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveStatus = forwardRef<\n McpServerPrimitiveStatus.Element,\n McpServerPrimitiveStatus.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n return (\n <Primitive.span {...props} ref={ref} data-state={state}>\n {props.children ?? state}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveStatus.displayName = \"McpServerPrimitive.Status\";\n"],"mappings":";;;;;;AAaA,MAAaK,2BAA2BH,YAGtCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,YAAYU,KAAkC;CAGvD,MAAAC,KAAAN,MAAKO,YAALH;CAAuB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,SAAAF,EAAA,OAAAI,IAAA;EAD1BE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAiBG,cAAAA;GAC9CE,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,yBAAyBa,cAAc;AATrC,SAAAJ,MAAAK,GAAA;CAAA,OACiCA,EAACC,UAAUC;AAAgB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
3
|
//#region src/primitives/server/McpServerToolName.d.ts
|
|
5
4
|
declare namespace McpServerPrimitiveToolName {
|
|
6
5
|
type Element = ComponentRef<typeof Primitive.span>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerToolName.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerToolName.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,4CAA0B,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAUrC,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerToolName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpServerTool","McpServerPrimitiveToolName","Element","span","Props","props","ref","$","_c","tool","t0","children","name","t1","displayName"],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpServerTool } from \"./McpServerTools\";\n\nexport namespace McpServerPrimitiveToolName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveToolName = forwardRef<\n McpServerPrimitiveToolName.Element,\n McpServerPrimitiveToolName.Props\n>((props, ref) => {\n const tool = useMcpServerTool();\n return (\n <Primitive.span {...props} ref={ref} data-tool-name={tool.name}>\n {props.children ?? tool.name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveToolName.displayName = \"McpServerPrimitive.ToolName\";\n"],"mappings":";;;;;;AAaA,MAAaK,6BAA6BH,YAGxCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,iBAAiB;CAGzB,MAAAU,KAAAL,MAAKM,YAAaF,KAAIG;CAAK,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAE,KAAAG,MAAA;EAD9BC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqB,kBAAAG,KAAIG;
|
|
1
|
+
{"version":3,"file":"McpServerToolName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpServerTool","McpServerPrimitiveToolName","Element","span","Props","props","ref","$","_c","tool","t0","children","name","t1","displayName"],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpServerTool } from \"./McpServerTools\";\n\nexport namespace McpServerPrimitiveToolName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveToolName = forwardRef<\n McpServerPrimitiveToolName.Element,\n McpServerPrimitiveToolName.Props\n>((props, ref) => {\n const tool = useMcpServerTool();\n return (\n <Primitive.span {...props} ref={ref} data-tool-name={tool.name}>\n {props.children ?? tool.name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveToolName.displayName = \"McpServerPrimitive.ToolName\";\n"],"mappings":";;;;;;AAaA,MAAaK,6BAA6BH,YAGxCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,iBAAiB;CAGzB,MAAAU,KAAAL,MAAKM,YAAaF,KAAIG;CAAK,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAE,KAAAG,MAAA;EAD9BC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqB,kBAAAG,KAAIG;GACtDF,UAAAA;EACH,CAAA;EAAiBH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAE,KAAAG;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,2BAA2Ba,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerTools.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerTools.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"mappings":";;;cAMa,wBAAuB;kBAUnB;OACH;IACV,UAAU,cAAc,MAAM,gBAAgB;;;cAIrC,yBAAyB,GAAG,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerTools.js","names":["FC","ReactNode","createContext","useContext","useAuiState","MCPToolInfo","ToolContext","useMcpServerTool","tool","Error","McpServerPrimitiveTools","Props","children","t0","$","_c","tools","_temp","length","t1","t2","name","map","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"sourcesContent":["import { type FC, type ReactNode, createContext, useContext } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPToolInfo } from \"../../mcp-scope\";\n\nconst ToolContext = createContext<MCPToolInfo | null>(null);\n\nexport const useMcpServerTool = (): MCPToolInfo => {\n const tool = useContext(ToolContext);\n if (!tool) {\n throw new Error(\n \"useMcpServerTool must be used inside <McpServerPrimitive.Tools>\",\n );\n }\n return tool;\n};\n\nexport namespace McpServerPrimitiveTools {\n export type Props = {\n children: ReactNode | ((tool: MCPToolInfo) => ReactNode);\n };\n}\n\nexport const McpServerPrimitiveTools: FC<McpServerPrimitiveTools.Props> = ({\n children,\n}) => {\n const tools = useAuiState((s) => s.mcpServer.tools);\n if (tools.length === 0) return null;\n return (\n <>\n {tools.map((tool) => (\n <ToolContext.Provider key={tool.name} value={tool}>\n {typeof children === \"function\" ? children(tool) : children}\n </ToolContext.Provider>\n ))}\n </>\n );\n};\n\nMcpServerPrimitiveTools.displayName = \"McpServerPrimitive.Tools\";\n"],"mappings":";;;;;AAIA,MAAMM,cAAcJ,cAAkC,IAAI;AAE1D,MAAaK,yBAAmB;CAC9B,MAAAC,OAAaL,WAAWG,WAAW;CACnC,IAAI,CAACE,MACH,MAAM,IAAIC,MACR,iEACF;CACD,OACMD;AAAI;AASb,MAAaE,2BAA6DG,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,aAAAC;CAGzE,MAAAG,QAAcZ,YAAYa,KAAwB;CAClD,IAAID,MAAKE,WAAY,GAAC,OAAS;CAAK,IAAAC;CAAA,IAAAL,EAAA,OAAAF,YAAAE,EAAA,OAAAE,OAAA;EAAA,IAAAI;EAAA,IAAAN,EAAA,OAAAF,UAAA;GAGrBQ,MAAAZ,SACT,oBAAA,YAAA,UAAA;IAA6CA,OAAAA;
|
|
1
|
+
{"version":3,"file":"McpServerTools.js","names":["FC","ReactNode","createContext","useContext","useAuiState","MCPToolInfo","ToolContext","useMcpServerTool","tool","Error","McpServerPrimitiveTools","Props","children","t0","$","_c","tools","_temp","length","t1","t2","name","map","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"sourcesContent":["import { type FC, type ReactNode, createContext, useContext } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPToolInfo } from \"../../mcp-scope\";\n\nconst ToolContext = createContext<MCPToolInfo | null>(null);\n\nexport const useMcpServerTool = (): MCPToolInfo => {\n const tool = useContext(ToolContext);\n if (!tool) {\n throw new Error(\n \"useMcpServerTool must be used inside <McpServerPrimitive.Tools>\",\n );\n }\n return tool;\n};\n\nexport namespace McpServerPrimitiveTools {\n export type Props = {\n children: ReactNode | ((tool: MCPToolInfo) => ReactNode);\n };\n}\n\nexport const McpServerPrimitiveTools: FC<McpServerPrimitiveTools.Props> = ({\n children,\n}) => {\n const tools = useAuiState((s) => s.mcpServer.tools);\n if (tools.length === 0) return null;\n return (\n <>\n {tools.map((tool) => (\n <ToolContext.Provider key={tool.name} value={tool}>\n {typeof children === \"function\" ? children(tool) : children}\n </ToolContext.Provider>\n ))}\n </>\n );\n};\n\nMcpServerPrimitiveTools.displayName = \"McpServerPrimitive.Tools\";\n"],"mappings":";;;;;AAIA,MAAMM,cAAcJ,cAAkC,IAAI;AAE1D,MAAaK,yBAAmB;CAC9B,MAAAC,OAAaL,WAAWG,WAAW;CACnC,IAAI,CAACE,MACH,MAAM,IAAIC,MACR,iEACF;CACD,OACMD;AAAI;AASb,MAAaE,2BAA6DG,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,aAAAC;CAGzE,MAAAG,QAAcZ,YAAYa,KAAwB;CAClD,IAAID,MAAKE,WAAY,GAAC,OAAS;CAAK,IAAAC;CAAA,IAAAL,EAAA,OAAAF,YAAAE,EAAA,OAAAE,OAAA;EAAA,IAAAI;EAAA,IAAAN,EAAA,OAAAF,UAAA;GAGrBQ,MAAAZ,SACT,oBAAA,YAAA,UAAA;IAA6CA,OAAAA;IAC1C,UAAA,OAAOI,aAAa,aAAaA,SAASJ,IAAe,IAAzDI;GACH,GAF2BJ,KAAIa,IAE/B;GACDP,EAAA,KAAAF;GAAAE,EAAA,KAAAM;EAAA,OAAAA,KAAAN,EAAA;EAJAK,KAAAH,MAAKM,IAAKF,EAIV;EAACN,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAK,IAAA;EALJC,KAAA,oBAAA,UAAA,EAAA,UACGD,GAIC,CAAA;EACDL,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OANHM;AAMG;AAIPV,wBAAwBa,cAAc;AAhBoC,SAAAN,MAAAO,GAAA;CAAA,OAGvCA,EAACC,UAAUT;AAAM"}
|
|
@@ -9,8 +9,6 @@ import { McpServerPrimitiveRemoveButton } from "./server/McpServerRemoveButton.j
|
|
|
9
9
|
import { McpServerPrimitiveOAuthLink } from "./server/McpServerOAuthLink.js";
|
|
10
10
|
import { McpServerPrimitiveTools, useMcpServerTool } from "./server/McpServerTools.js";
|
|
11
11
|
import { McpServerPrimitiveToolName } from "./server/McpServerToolName.js";
|
|
12
|
-
|
|
13
|
-
//#region src/primitives/server.d.ts
|
|
14
12
|
declare namespace server_d_exports {
|
|
15
13
|
export { McpServerPrimitiveConnectButton as ConnectButton, McpServerPrimitiveDisconnectButton as DisconnectButton, McpServerPrimitiveError as Error, McpServerPrimitiveIcon as Icon, McpServerPrimitiveName as Name, McpServerPrimitiveOAuthLink as OAuthLink, McpServerPrimitiveRemoveButton as RemoveButton, McpServerPrimitiveRoot as Root, McpServerPrimitiveStatus as Status, McpServerPrimitiveToolName as ToolName, McpServerPrimitiveTools as Tools, useMcpServerTool };
|
|
16
14
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { MCPConnector } from "../mcp-scope.js";
|
|
2
2
|
import { MCPStorageElement } from "./storage/types.js";
|
|
3
3
|
import { ClientOutput } from "@assistant-ui/store";
|
|
4
|
-
|
|
5
4
|
//#region src/resources/McpManagerResource.d.ts
|
|
6
5
|
type McpManagerResourceProps = {
|
|
7
6
|
connectors?: MCPConnector[] | undefined;
|
|
8
|
-
storage?: MCPStorageElement | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
storage?: MCPStorageElement | undefined;
|
|
8
|
+
/** OAuth redirect target. Defaults to `${origin}/mcp/callback`. */
|
|
9
|
+
oauthRedirectUri?: string | undefined;
|
|
10
|
+
/** Connect on mount when usable auth exists. Default true. */
|
|
11
|
+
autoConnect?: boolean | undefined;
|
|
12
|
+
/** Optional timeout in milliseconds for connect/listTools calls. Disabled by default. */
|
|
11
13
|
connectionTimeout?: number | undefined;
|
|
12
14
|
};
|
|
13
15
|
declare const McpManagerResource: import("@assistant-ui/tap").Resource<ClientOutput<"mcp">, [props: McpManagerResourceProps]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerResource.d.ts","names":[],"sources":["../../src/resources/McpManagerResource.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpManagerResource.d.ts","names":[],"sources":["../../src/resources/McpManagerResource.ts"],"mappings":";;;;KAqBY;EACV,aAAa;EACb,UAAU;;EAEV;;EAEA;;EAEA;;cA4OW,gDAAkB,SAAA,sBAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerResource.d.ts","names":[],"sources":["../../src/resources/McpServerResource.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"McpServerResource.d.ts","names":[],"sources":["../../src/resources/McpServerResource.ts"],"mappings":";;;;KAsBY;EACV;EACA,MAAM;EACN;EACA;EACA;EACA,MAAM;EACN,SAAS;EACT;EACA;EACA;EACA,gBAAgB;;cA8XL,+CAAiB,SAAA,4BAAA,OAAA"}
|