@assistant-ui/react-mcp 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/buildHeaders.d.ts +9 -0
- package/dist/auth/buildHeaders.d.ts.map +1 -0
- package/dist/auth/buildHeaders.js +15 -0
- package/dist/auth/buildHeaders.js.map +1 -0
- package/dist/auth/createOAuthProvider.d.ts +22 -0
- package/dist/auth/createOAuthProvider.d.ts.map +1 -0
- package/dist/auth/createOAuthProvider.js +148 -0
- package/dist/auth/createOAuthProvider.js.map +1 -0
- package/dist/auth/types.d.ts +9 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +2 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/connector.d.ts +3 -0
- package/dist/connector.d.ts.map +1 -0
- package/dist/connector.js +6 -0
- package/dist/connector.js.map +1 -0
- package/dist/context/McpConnectorByIndexProvider.d.ts +5 -0
- package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -0
- package/dist/context/McpConnectorByIndexProvider.js +13 -0
- package/dist/context/McpConnectorByIndexProvider.js.map +1 -0
- package/dist/context/McpCustomServerByIndexProvider.d.ts +5 -0
- package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -0
- package/dist/context/McpCustomServerByIndexProvider.js +13 -0
- package/dist/context/McpCustomServerByIndexProvider.js.map +1 -0
- package/dist/context/McpServerByIdProvider.d.ts +5 -0
- package/dist/context/McpServerByIdProvider.d.ts.map +1 -0
- package/dist/context/McpServerByIdProvider.js +13 -0
- package/dist/context/McpServerByIdProvider.js.map +1 -0
- package/dist/hooks/useMcpOAuthCallback.d.ts +17 -0
- package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -0
- package/dist/hooks/useMcpOAuthCallback.js +59 -0
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-scope.d.ts +109 -0
- package/dist/mcp-scope.d.ts.map +1 -0
- package/dist/mcp-scope.js +2 -0
- package/dist/mcp-scope.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +15 -0
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormAuthFields.js +18 -0
- package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +8 -0
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormAuthSelect.js +24 -0
- package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormCancel.d.ts +10 -0
- package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormCancel.js +15 -0
- package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormError.d.ts +10 -0
- package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormError.js +12 -0
- package/dist/primitives/addForm/McpAddFormError.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormNameField.d.ts +8 -0
- package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormNameField.js +10 -0
- package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormRoot.d.ts +16 -0
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormRoot.js +102 -0
- package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts +10 -0
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormSubmit.js +10 -0
- package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts +8 -0
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormUrlField.js +10 -0
- package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -0
- package/dist/primitives/addForm/context.d.ts +21 -0
- package/dist/primitives/addForm/context.d.ts.map +1 -0
- package/dist/primitives/addForm/context.js +10 -0
- package/dist/primitives/addForm/context.js.map +1 -0
- package/dist/primitives/addForm.d.ts +9 -0
- package/dist/primitives/addForm.d.ts.map +1 -0
- package/dist/primitives/addForm.js +9 -0
- package/dist/primitives/addForm.js.map +1 -0
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +10 -0
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -0
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js +9 -0
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -0
- package/dist/primitives/manager/McpManagerConnectors.d.ts +31 -0
- package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -0
- package/dist/primitives/manager/McpManagerConnectors.js +41 -0
- package/dist/primitives/manager/McpManagerConnectors.js.map +1 -0
- package/dist/primitives/manager/McpManagerCustomServers.d.ts +31 -0
- package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -0
- package/dist/primitives/manager/McpManagerCustomServers.js +37 -0
- package/dist/primitives/manager/McpManagerCustomServers.js.map +1 -0
- package/dist/primitives/manager/McpManagerRoot.d.ts +10 -0
- package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -0
- package/dist/primitives/manager/McpManagerRoot.js +10 -0
- package/dist/primitives/manager/McpManagerRoot.js.map +1 -0
- package/dist/primitives/manager.d.ts +5 -0
- package/dist/primitives/manager.d.ts.map +1 -0
- package/dist/primitives/manager.js +5 -0
- package/dist/primitives/manager.js.map +1 -0
- package/dist/primitives/server/McpServerConnectButton.d.ts +10 -0
- package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -0
- package/dist/primitives/server/McpServerConnectButton.js +20 -0
- package/dist/primitives/server/McpServerConnectButton.js.map +1 -0
- package/dist/primitives/server/McpServerDisconnectButton.d.ts +10 -0
- package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -0
- package/dist/primitives/server/McpServerDisconnectButton.js +20 -0
- package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -0
- package/dist/primitives/server/McpServerError.d.ts +10 -0
- package/dist/primitives/server/McpServerError.d.ts.map +1 -0
- package/dist/primitives/server/McpServerError.js +12 -0
- package/dist/primitives/server/McpServerError.js.map +1 -0
- package/dist/primitives/server/McpServerIcon.d.ts +18 -0
- package/dist/primitives/server/McpServerIcon.d.ts.map +1 -0
- package/dist/primitives/server/McpServerIcon.js +14 -0
- package/dist/primitives/server/McpServerIcon.js.map +1 -0
- package/dist/primitives/server/McpServerName.d.ts +10 -0
- package/dist/primitives/server/McpServerName.d.ts.map +1 -0
- package/dist/primitives/server/McpServerName.js +10 -0
- package/dist/primitives/server/McpServerName.js.map +1 -0
- package/dist/primitives/server/McpServerOAuthLink.d.ts +16 -0
- package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -0
- package/dist/primitives/server/McpServerOAuthLink.js +13 -0
- package/dist/primitives/server/McpServerOAuthLink.js.map +1 -0
- package/dist/primitives/server/McpServerRemoveButton.d.ts +10 -0
- package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -0
- package/dist/primitives/server/McpServerRemoveButton.js +18 -0
- package/dist/primitives/server/McpServerRemoveButton.js.map +1 -0
- package/dist/primitives/server/McpServerRoot.d.ts +10 -0
- package/dist/primitives/server/McpServerRoot.d.ts.map +1 -0
- package/dist/primitives/server/McpServerRoot.js +13 -0
- package/dist/primitives/server/McpServerRoot.js.map +1 -0
- package/dist/primitives/server/McpServerStatus.d.ts +10 -0
- package/dist/primitives/server/McpServerStatus.d.ts.map +1 -0
- package/dist/primitives/server/McpServerStatus.js +10 -0
- package/dist/primitives/server/McpServerStatus.js.map +1 -0
- package/dist/primitives/server/McpServerToolName.d.ts +10 -0
- package/dist/primitives/server/McpServerToolName.d.ts.map +1 -0
- package/dist/primitives/server/McpServerToolName.js +10 -0
- package/dist/primitives/server/McpServerToolName.js.map +1 -0
- package/dist/primitives/server/McpServerTools.d.ts +10 -0
- package/dist/primitives/server/McpServerTools.d.ts.map +1 -0
- package/dist/primitives/server/McpServerTools.js +19 -0
- package/dist/primitives/server/McpServerTools.js.map +1 -0
- package/dist/primitives/server.d.ts +12 -0
- package/dist/primitives/server.d.ts.map +1 -0
- package/dist/primitives/server.js +12 -0
- package/dist/primitives/server.js.map +1 -0
- package/dist/resources/McpManagerResource.d.ts +13 -0
- package/dist/resources/McpManagerResource.d.ts.map +1 -0
- package/dist/resources/McpManagerResource.js +191 -0
- package/dist/resources/McpManagerResource.js.map +1 -0
- package/dist/resources/McpServerResource.d.ts +17 -0
- package/dist/resources/McpServerResource.d.ts.map +1 -0
- package/dist/resources/McpServerResource.js +239 -0
- package/dist/resources/McpServerResource.js.map +1 -0
- package/dist/resources/storage/McpCustomStorage.d.ts +3 -0
- package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -0
- package/dist/resources/storage/McpCustomStorage.js +3 -0
- package/dist/resources/storage/McpCustomStorage.js.map +1 -0
- package/dist/resources/storage/McpLocalStorage.d.ts +9 -0
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -0
- package/dist/resources/storage/McpLocalStorage.js +67 -0
- package/dist/resources/storage/McpLocalStorage.js.map +1 -0
- package/dist/resources/storage/McpMemoryStorage.d.ts +3 -0
- package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -0
- package/dist/resources/storage/McpMemoryStorage.js +19 -0
- package/dist/resources/storage/McpMemoryStorage.js.map +1 -0
- package/dist/resources/storage/types.d.ts +12 -0
- package/dist/resources/storage/types.d.ts.map +1 -0
- package/dist/resources/storage/types.js +2 -0
- package/dist/resources/storage/types.js.map +1 -0
- package/dist/utils/serverId.d.ts +2 -0
- package/dist/utils/serverId.d.ts.map +1 -0
- package/dist/utils/serverId.js +16 -0
- package/dist/utils/serverId.js.map +1 -0
- package/package.json +67 -0
- package/src/auth/buildHeaders.ts +19 -0
- package/src/auth/createOAuthProvider.ts +172 -0
- package/src/auth/types.ts +12 -0
- package/src/connector.ts +7 -0
- package/src/context/McpConnectorByIndexProvider.tsx +16 -0
- package/src/context/McpCustomServerByIndexProvider.tsx +16 -0
- package/src/context/McpServerByIdProvider.tsx +17 -0
- package/src/hooks/useMcpOAuthCallback.tsx +79 -0
- package/src/index.ts +68 -0
- package/src/mcp-scope.ts +110 -0
- package/src/primitives/addForm/McpAddFormAuthFields.tsx +51 -0
- package/src/primitives/addForm/McpAddFormAuthSelect.tsx +55 -0
- package/src/primitives/addForm/McpAddFormCancel.tsx +33 -0
- package/src/primitives/addForm/McpAddFormError.tsx +27 -0
- package/src/primitives/addForm/McpAddFormNameField.tsx +34 -0
- package/src/primitives/addForm/McpAddFormRoot.tsx +141 -0
- package/src/primitives/addForm/McpAddFormSubmit.tsx +30 -0
- package/src/primitives/addForm/McpAddFormUrlField.tsx +35 -0
- package/src/primitives/addForm/context.tsx +37 -0
- package/src/primitives/addForm.ts +8 -0
- package/src/primitives/manager/McpManagerAddCustomTrigger.tsx +21 -0
- package/src/primitives/manager/McpManagerConnectors.tsx +76 -0
- package/src/primitives/manager/McpManagerCustomServers.tsx +72 -0
- package/src/primitives/manager/McpManagerRoot.tsx +28 -0
- package/src/primitives/manager.ts +4 -0
- package/src/primitives/server/McpServerConnectButton.tsx +39 -0
- package/src/primitives/server/McpServerDisconnectButton.tsx +38 -0
- package/src/primitives/server/McpServerError.tsx +27 -0
- package/src/primitives/server/McpServerIcon.tsx +35 -0
- package/src/primitives/server/McpServerName.tsx +26 -0
- package/src/primitives/server/McpServerOAuthLink.tsx +38 -0
- package/src/primitives/server/McpServerRemoveButton.tsx +35 -0
- package/src/primitives/server/McpServerRoot.tsx +35 -0
- package/src/primitives/server/McpServerStatus.tsx +26 -0
- package/src/primitives/server/McpServerToolName.tsx +26 -0
- package/src/primitives/server/McpServerTools.tsx +39 -0
- package/src/primitives/server.ts +14 -0
- package/src/resources/McpManagerResource.ts +253 -0
- package/src/resources/McpServerResource.ts +292 -0
- package/src/resources/storage/McpCustomStorage.ts +6 -0
- package/src/resources/storage/McpLocalStorage.ts +77 -0
- package/src/resources/storage/McpMemoryStorage.ts +22 -0
- package/src/resources/storage/types.ts +16 -0
- package/src/utils/serverId.ts +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpManagerCustomServers.d.ts","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,2BAAwB;AAItD,yBAAiB,gCAAgC,CAAC;IAChD,KAAY,KAAK,GAAG;QAClB;;;;WAIG;QACH,QAAQ,EAAE,CAAC,KAAK,EAAE;YAAE,MAAM,EAAE,cAAc,CAAA;SAAE,KAAK,SAAS,CAAC;KAC5D,CAAC;CACH;AAiCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAIrF,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
4
|
+
import { McpCustomServerByIndexProvider } from "../../context/McpCustomServerByIndexProvider.js";
|
|
5
|
+
const SEP = "\x1f";
|
|
6
|
+
const McpManagerPrimitiveCustomServersInner = ({ children }) => {
|
|
7
|
+
const idsJoined = useAuiState((s) => s.mcp.customServers.map((c) => c.id).join(SEP));
|
|
8
|
+
const ids = useMemo(() => (idsJoined ? idsJoined.split(SEP) : []), [idsJoined]);
|
|
9
|
+
return useMemo(() => {
|
|
10
|
+
if (ids.length === 0)
|
|
11
|
+
return null;
|
|
12
|
+
return ids.map((id, index) => (_jsx(McpCustomServerByIndexProvider, { index: index, children: _jsx(RenderChildrenWithAccessor, { getItemState: (aui) => aui.mcp().customServer({ index }).getState(), children: (getItem) => children({
|
|
13
|
+
get server() {
|
|
14
|
+
return getItem();
|
|
15
|
+
},
|
|
16
|
+
}) }) }, id)));
|
|
17
|
+
}, [ids, children]);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Renders all user-added custom servers persisted in storage.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <McpManagerPrimitive.CustomServers>
|
|
25
|
+
* {() => (
|
|
26
|
+
* <McpServerPrimitive.Root>
|
|
27
|
+
* <McpServerPrimitive.Name />
|
|
28
|
+
* <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>
|
|
29
|
+
* </McpServerPrimitive.Root>
|
|
30
|
+
* )}
|
|
31
|
+
* </McpManagerPrimitive.CustomServers>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export const McpManagerPrimitiveCustomServers = memo(McpManagerPrimitiveCustomServersInner, (prev, next) => prev.children === next.children);
|
|
35
|
+
McpManagerPrimitiveCustomServers.displayName =
|
|
36
|
+
"McpManagerPrimitive.CustomServers";
|
|
37
|
+
//# sourceMappingURL=McpManagerCustomServers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpManagerCustomServers.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,wDAAqD;AAG9F,MAAM,GAAG,GAAG,MAAM,CAAC;AAanB,MAAM,qCAAqC,GAEtC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAClC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/C,CAAC;IACF,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7C,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,8BAA8B,IAAU,KAAK,EAAE,KAAK,YACnD,KAAC,0BAA0B,IACzB,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,YAElE,CAAC,OAAO,EAAE,EAAE,CACX,QAAQ,CAAC;oBACP,IAAI,MAAM;wBACR,OAAO,OAAO,EAAE,CAAC;oBACnB,CAAC;iBACF,CAAC,GAEuB,IAXM,EAAE,CAYN,CAClC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,IAAI,CACF,qCAAqC,EACrC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAChD,CAAC;AAEJ,gCAAgC,CAAC,WAAW;IAC1C,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpManagerPrimitiveRoot {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpManagerPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//# sourceMappingURL=McpManagerRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpManagerRoot.d.ts","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,uBAAuB,CAAC;IACvC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,uBAAuB;;0DAYlC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpManagerPrimitiveRoot = forwardRef((props, ref) => {
|
|
6
|
+
const isHydrated = useAuiState((s) => s.mcp.isHydrated);
|
|
7
|
+
return (_jsx(Primitive.div, { ...props, ref: ref, "data-mcp-hydrated": isHydrated || undefined }));
|
|
8
|
+
});
|
|
9
|
+
McpManagerPrimitiveRoot.displayName = "McpManagerPrimitive.Root";
|
|
10
|
+
//# sourceMappingURL=McpManagerRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpManagerRoot.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAG/C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxD,OAAO,CACL,KAAC,SAAS,CAAC,GAAG,OACR,KAAK,EACT,GAAG,EAAE,GAAG,uBACW,UAAU,IAAI,SAAS,GAC1C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { McpManagerPrimitiveRoot as Root } from "./manager/McpManagerRoot.js";
|
|
2
|
+
export { McpManagerPrimitiveConnectors as Connectors } from "./manager/McpManagerConnectors.js";
|
|
3
|
+
export { McpManagerPrimitiveCustomServers as CustomServers } from "./manager/McpManagerCustomServers.js";
|
|
4
|
+
export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
|
|
5
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/primitives/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,IAAI,IAAI,EAAE,oCAAiC;AAC3E,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,gCAAgC,IAAI,aAAa,EAAE,6CAA0C;AACtG,OAAO,EAAE,mCAAmC,IAAI,gBAAgB,EAAE,gDAA6C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { McpManagerPrimitiveRoot as Root } from "./manager/McpManagerRoot.js";
|
|
2
|
+
export { McpManagerPrimitiveConnectors as Connectors } from "./manager/McpManagerConnectors.js";
|
|
3
|
+
export { McpManagerPrimitiveCustomServers as CustomServers } from "./manager/McpManagerCustomServers.js";
|
|
4
|
+
export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
|
|
5
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/primitives/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,IAAI,IAAI,EAAE,oCAAiC;AAC3E,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,gCAAgC,IAAI,aAAa,EAAE,6CAA0C;AACtG,OAAO,EAAE,mCAAmC,IAAI,gBAAgB,EAAE,gDAA6C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveConnectButton {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveConnectButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerConnectButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerConnectButton.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,+BAA+B,CAAC;IAC/C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,+BAA+B;;6DAoB1C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
|
+
const CONNECTABLE = new Set(["disconnected", "error", "authRequired"]);
|
|
6
|
+
export const McpServerPrimitiveConnectButton = forwardRef((props, ref) => {
|
|
7
|
+
const state = useAuiState((s) => s.mcpServer.connectionState);
|
|
8
|
+
const aui = useAui();
|
|
9
|
+
if (!CONNECTABLE.has(state))
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsx(Primitive.button, { ...props, type: "button", ref: ref, "data-state-hint": state === "authRequired" ? "auth-required" : undefined, onClick: (e) => {
|
|
12
|
+
props.onClick?.(e);
|
|
13
|
+
if (e.defaultPrevented)
|
|
14
|
+
return;
|
|
15
|
+
void aui.mcpServer().connect();
|
|
16
|
+
} }));
|
|
17
|
+
});
|
|
18
|
+
McpServerPrimitiveConnectButton.displayName =
|
|
19
|
+
"McpServerPrimitive.ConnectButton";
|
|
20
|
+
//# sourceMappingURL=McpServerConnectButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerConnectButton.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAO1D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAGvD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,CACL,KAAC,SAAS,CAAC,MAAM,OACX,KAAK,EACT,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,qBACS,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,EACvE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,CAAC,gBAAgB;gBAAE,OAAO;YAC/B,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;QACjC,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,+BAA+B,CAAC,WAAW;IACzC,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveDisconnectButton {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveDisconnectButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerDisconnectButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerDisconnectButton.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,kCAAkC,CAAC;IAClD,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,kCAAkC;;6DAmB7C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
|
+
const DISCONNECTABLE = new Set(["connected", "connecting", "authPending"]);
|
|
6
|
+
export const McpServerPrimitiveDisconnectButton = forwardRef((props, ref) => {
|
|
7
|
+
const state = useAuiState((s) => s.mcpServer.connectionState);
|
|
8
|
+
const aui = useAui();
|
|
9
|
+
if (!DISCONNECTABLE.has(state))
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsx(Primitive.button, { ...props, type: "button", ref: ref, onClick: (e) => {
|
|
12
|
+
props.onClick?.(e);
|
|
13
|
+
if (e.defaultPrevented)
|
|
14
|
+
return;
|
|
15
|
+
void aui.mcpServer().disconnect();
|
|
16
|
+
} }));
|
|
17
|
+
});
|
|
18
|
+
McpServerPrimitiveDisconnectButton.displayName =
|
|
19
|
+
"McpServerPrimitive.DisconnectButton";
|
|
20
|
+
//# sourceMappingURL=McpServerDisconnectButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerDisconnectButton.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAO1D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAG,UAAU,CAG1D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,CACL,KAAC,SAAS,CAAC,MAAM,OACX,KAAK,EACT,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,CAAC,gBAAgB;gBAAE,OAAO;YAC/B,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kCAAkC,CAAC,WAAW;IAC5C,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveError {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveError: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerError.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerError.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,uBAAuB,CAAC;IACvC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,uBAAuB;;0DAWlC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveError = forwardRef((props, ref) => {
|
|
6
|
+
const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);
|
|
7
|
+
if (message === null)
|
|
8
|
+
return null;
|
|
9
|
+
return (_jsx(Primitive.div, { ...props, ref: ref, children: props.children ?? message }));
|
|
10
|
+
});
|
|
11
|
+
McpServerPrimitiveError.displayName = "McpServerPrimitive.Error";
|
|
12
|
+
//# sourceMappingURL=McpServerError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerError.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerError.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAG/C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;IAC3E,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,CACL,KAAC,SAAS,CAAC,GAAG,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,YAC/B,KAAK,CAAC,QAAQ,IAAI,OAAO,GACZ,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveIcon {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.img>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.img>, "src" | "alt"> & {
|
|
6
|
+
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
7
|
+
src?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const McpServerPrimitiveIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}, "ref">, "src" | "alt"> & {
|
|
14
|
+
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
15
|
+
src?: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
18
|
+
//# sourceMappingURL=McpServerIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerIcon.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,EAC9C,KAAK,GAAG,KAAK,CACd,GAAG;QACF,iEAAiE;QACjE,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,sBAAsB;;;IAN/B,iEAAiE;UAC3D,MAAM;UACN,MAAM;oDAgBd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveIcon = forwardRef(({ src, alt, ...props }, ref) => {
|
|
6
|
+
const iconUrl = useAuiState((s) => s.mcpServer.icon ?? null);
|
|
7
|
+
const name = useAuiState((s) => s.mcpServer.name);
|
|
8
|
+
const effective = src ?? iconUrl;
|
|
9
|
+
if (!effective)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsx(Primitive.img, { ...props, ref: ref, src: effective, alt: alt ?? name }));
|
|
12
|
+
});
|
|
13
|
+
McpServerPrimitiveIcon.displayName = "McpServerPrimitive.Icon";
|
|
14
|
+
//# sourceMappingURL=McpServerIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerIcon.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAclD,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAG9C,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,GAAG,IAAI,OAAO,CAAC;IACjC,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,CAEL,KAAC,SAAS,CAAC,GAAG,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,GAAI,CACzE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveName {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.span>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveName: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerName.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerName.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;CACrE;AAED,eAAO,MAAM,sBAAsB;;2DAUjC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveName = forwardRef((props, ref) => {
|
|
6
|
+
const name = useAuiState((s) => s.mcpServer.name);
|
|
7
|
+
return (_jsx(Primitive.span, { ...props, ref: ref, children: props.children ?? name }));
|
|
8
|
+
});
|
|
9
|
+
McpServerPrimitiveName.displayName = "McpServerPrimitive.Name";
|
|
10
|
+
//# sourceMappingURL=McpServerName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerName.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerName.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAG9C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,CACL,KAAC,SAAS,CAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,YAChC,KAAK,CAAC,QAAQ,IAAI,IAAI,GACR,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveOAuthLink {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.a>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.a>, "href"> & {
|
|
6
|
+
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const McpServerPrimitiveOAuthLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}, "ref">, "href"> & {
|
|
13
|
+
/** Optional href override; defaults to the server's authorizationUrl. */
|
|
14
|
+
href?: string;
|
|
15
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
16
|
+
//# sourceMappingURL=McpServerOAuthLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,2BAA2B,CAAC;IAC3C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;IACvD,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,EAC5C,MAAM,CACP,GAAG;QACF,yEAAyE;QACzE,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B;;;IALpC,yEAAyE;WAClE,MAAM;qDAoBf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveOAuthLink = forwardRef(({ href, ...props }, ref) => {
|
|
6
|
+
const url = useAuiState((s) => s.mcpServer.authorizationUrl);
|
|
7
|
+
const effective = href ?? url;
|
|
8
|
+
if (!effective)
|
|
9
|
+
return null;
|
|
10
|
+
return (_jsx(Primitive.a, { target: "_blank", ...props, ref: ref, href: effective, rel: props.rel ?? "noopener noreferrer" }));
|
|
11
|
+
});
|
|
12
|
+
McpServerPrimitiveOAuthLink.displayName = "McpServerPrimitive.OAuthLink";
|
|
13
|
+
//# sourceMappingURL=McpServerOAuthLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAalD,MAAM,CAAC,MAAM,2BAA2B,GAAG,UAAU,CAGnD,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC5B,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,IAAI,IAAI,GAAG,CAAC;IAC9B,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,CACL,KAAC,SAAS,CAAC,CAAC,IACV,MAAM,EAAC,QAAQ,KACX,KAAK,EACT,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,qBAAqB,GACvC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,2BAA2B,CAAC,WAAW,GAAG,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveRemoveButton {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveRemoveButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerRemoveButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,8BAA8B,CAAC;IAC9C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,8BAA8B;;6DAmBzC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveRemoveButton = forwardRef((props, ref) => {
|
|
6
|
+
const kind = useAuiState((s) => s.mcpServer.kind);
|
|
7
|
+
const aui = useAui();
|
|
8
|
+
if (kind !== "custom")
|
|
9
|
+
return null;
|
|
10
|
+
return (_jsx(Primitive.button, { ...props, type: "button", ref: ref, onClick: (e) => {
|
|
11
|
+
props.onClick?.(e);
|
|
12
|
+
if (e.defaultPrevented)
|
|
13
|
+
return;
|
|
14
|
+
void aui.mcpServer().remove();
|
|
15
|
+
} }));
|
|
16
|
+
});
|
|
17
|
+
McpServerPrimitiveRemoveButton.displayName = "McpServerPrimitive.RemoveButton";
|
|
18
|
+
//# sourceMappingURL=McpServerRemoveButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAO1D,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAGtD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,CACL,KAAC,SAAS,CAAC,MAAM,OACX,KAAK,EACT,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,CAAC,gBAAgB;gBAAE,OAAO;YAC/B,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC;QAChC,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,8BAA8B,CAAC,WAAW,GAAG,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveRoot {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerRoot.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,sBAAsB;;0DAmBjC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveRoot = forwardRef((props, ref) => {
|
|
6
|
+
const id = useAuiState((s) => s.mcpServer.id);
|
|
7
|
+
const kind = useAuiState((s) => s.mcpServer.kind);
|
|
8
|
+
const connectionState = useAuiState((s) => s.mcpServer.connectionState);
|
|
9
|
+
const hasError = useAuiState((s) => s.mcpServer.lastError !== null);
|
|
10
|
+
return (_jsx(Primitive.div, { ...props, ref: ref, "data-server-id": id, "data-kind": kind, "data-connection-state": connectionState, "data-has-error": hasError || undefined }));
|
|
11
|
+
});
|
|
12
|
+
McpServerPrimitiveRoot.displayName = "McpServerPrimitive.Root";
|
|
13
|
+
//# sourceMappingURL=McpServerRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerRoot.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerRoot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAG9C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IAEpE,OAAO,CACL,KAAC,SAAS,CAAC,GAAG,OACR,KAAK,EACT,GAAG,EAAE,GAAG,oBACQ,EAAE,eACP,IAAI,2BACQ,eAAe,oBACtB,QAAQ,IAAI,SAAS,GACrC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveStatus {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.span>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveStatus: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerStatus.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,wBAAwB,CAAC;IACxC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;CACrE;AAED,eAAO,MAAM,wBAAwB;;2DAUnC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
+
export const McpServerPrimitiveStatus = forwardRef((props, ref) => {
|
|
6
|
+
const state = useAuiState((s) => s.mcpServer.connectionState);
|
|
7
|
+
return (_jsx(Primitive.span, { ...props, ref: ref, "data-state": state, children: props.children ?? state }));
|
|
8
|
+
});
|
|
9
|
+
McpServerPrimitiveStatus.displayName = "McpServerPrimitive.Status";
|
|
10
|
+
//# sourceMappingURL=McpServerStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerStatus.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAGhD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC9D,OAAO,CACL,KAAC,SAAS,CAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,gBAAc,KAAK,YACnD,KAAK,CAAC,QAAQ,IAAI,KAAK,GACT,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,wBAAwB,CAAC,WAAW,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
export declare namespace McpServerPrimitiveToolName {
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.span>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
6
|
+
}
|
|
7
|
+
export declare const McpServerPrimitiveToolName: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
//# sourceMappingURL=McpServerToolName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerToolName.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerToolName.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,0BAA0B,CAAC;IAC1C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;CACrE;AAED,eAAO,MAAM,0BAA0B;;2DAUrC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { useMcpServerTool } from "./McpServerTools.js";
|
|
5
|
+
export const McpServerPrimitiveToolName = forwardRef((props, ref) => {
|
|
6
|
+
const tool = useMcpServerTool();
|
|
7
|
+
return (_jsx(Primitive.span, { ...props, ref: ref, "data-tool-name": tool.name, children: props.children ?? tool.name }));
|
|
8
|
+
});
|
|
9
|
+
McpServerPrimitiveToolName.displayName = "McpServerPrimitive.ToolName";
|
|
10
|
+
//# sourceMappingURL=McpServerToolName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerToolName.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerToolName.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,4BAAyB;AAOpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAGlD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAC;IAChC,OAAO,CACL,KAAC,SAAS,CAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,oBAAkB,IAAI,CAAC,IAAI,YAC3D,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,GACb,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,0BAA0B,CAAC,WAAW,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
|
+
import type { MCPToolInfo } from "../../mcp-scope.js";
|
|
3
|
+
export declare const useMcpServerTool: () => MCPToolInfo;
|
|
4
|
+
export declare namespace McpServerPrimitiveTools {
|
|
5
|
+
type Props = {
|
|
6
|
+
children: ReactNode | ((tool: MCPToolInfo) => ReactNode);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const McpServerPrimitiveTools: FC<McpServerPrimitiveTools.Props>;
|
|
10
|
+
//# sourceMappingURL=McpServerTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerTools.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAwB;AAInD,eAAO,MAAM,gBAAgB,QAAO,WAQnC,CAAC;AAEF,yBAAiB,uBAAuB,CAAC;IACvC,KAAY,KAAK,GAAG;QAClB,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC;KAC1D,CAAC;CACH;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAcrE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
4
|
+
const ToolContext = createContext(null);
|
|
5
|
+
export const useMcpServerTool = () => {
|
|
6
|
+
const tool = useContext(ToolContext);
|
|
7
|
+
if (!tool) {
|
|
8
|
+
throw new Error("useMcpServerTool must be used inside <McpServerPrimitive.Tools>");
|
|
9
|
+
}
|
|
10
|
+
return tool;
|
|
11
|
+
};
|
|
12
|
+
export const McpServerPrimitiveTools = ({ children, }) => {
|
|
13
|
+
const tools = useAuiState((s) => s.mcpServer.tools);
|
|
14
|
+
if (tools.length === 0)
|
|
15
|
+
return null;
|
|
16
|
+
return (_jsx(_Fragment, { children: tools.map((tool) => (_jsx(ToolContext.Provider, { value: tool, children: typeof children === "function" ? children(tool) : children }, tool.name))) }));
|
|
17
|
+
};
|
|
18
|
+
McpServerPrimitiveTools.displayName = "McpServerPrimitive.Tools";
|
|
19
|
+
//# sourceMappingURL=McpServerTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerTools.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerTools.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,MAAM,WAAW,GAAG,aAAa,CAAqB,IAAI,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAgB,EAAE;IAChD,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,uBAAuB,GAAsC,CAAC,EACzE,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO,CACL,4BACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,KAAC,WAAW,CAAC,QAAQ,IAAiB,KAAK,EAAE,IAAI,YAC9C,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IADlC,IAAI,CAAC,IAAI,CAEb,CACxB,CAAC,GACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { McpServerPrimitiveRoot as Root } from "./server/McpServerRoot.js";
|
|
2
|
+
export { McpServerPrimitiveName as Name } from "./server/McpServerName.js";
|
|
3
|
+
export { McpServerPrimitiveStatus as Status } from "./server/McpServerStatus.js";
|
|
4
|
+
export { McpServerPrimitiveError as Error } from "./server/McpServerError.js";
|
|
5
|
+
export { McpServerPrimitiveIcon as Icon } from "./server/McpServerIcon.js";
|
|
6
|
+
export { McpServerPrimitiveConnectButton as ConnectButton } from "./server/McpServerConnectButton.js";
|
|
7
|
+
export { McpServerPrimitiveDisconnectButton as DisconnectButton } from "./server/McpServerDisconnectButton.js";
|
|
8
|
+
export { McpServerPrimitiveRemoveButton as RemoveButton } from "./server/McpServerRemoveButton.js";
|
|
9
|
+
export { McpServerPrimitiveOAuthLink as OAuthLink } from "./server/McpServerOAuthLink.js";
|
|
10
|
+
export { McpServerPrimitiveTools as Tools, useMcpServerTool, } from "./server/McpServerTools.js";
|
|
11
|
+
export { McpServerPrimitiveToolName as ToolName } from "./server/McpServerToolName.js";
|
|
12
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/primitives/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,wBAAwB,IAAI,MAAM,EAAE,oCAAiC;AAC9E,OAAO,EAAE,uBAAuB,IAAI,KAAK,EAAE,mCAAgC;AAC3E,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,+BAA+B,IAAI,aAAa,EAAE,2CAAwC;AACnG,OAAO,EAAE,kCAAkC,IAAI,gBAAgB,EAAE,8CAA2C;AAC5G,OAAO,EAAE,8BAA8B,IAAI,YAAY,EAAE,0CAAuC;AAChG,OAAO,EAAE,2BAA2B,IAAI,SAAS,EAAE,uCAAoC;AACvF,OAAO,EACL,uBAAuB,IAAI,KAAK,EAChC,gBAAgB,GACjB,mCAAgC;AACjC,OAAO,EAAE,0BAA0B,IAAI,QAAQ,EAAE,sCAAmC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { McpServerPrimitiveRoot as Root } from "./server/McpServerRoot.js";
|
|
2
|
+
export { McpServerPrimitiveName as Name } from "./server/McpServerName.js";
|
|
3
|
+
export { McpServerPrimitiveStatus as Status } from "./server/McpServerStatus.js";
|
|
4
|
+
export { McpServerPrimitiveError as Error } from "./server/McpServerError.js";
|
|
5
|
+
export { McpServerPrimitiveIcon as Icon } from "./server/McpServerIcon.js";
|
|
6
|
+
export { McpServerPrimitiveConnectButton as ConnectButton } from "./server/McpServerConnectButton.js";
|
|
7
|
+
export { McpServerPrimitiveDisconnectButton as DisconnectButton } from "./server/McpServerDisconnectButton.js";
|
|
8
|
+
export { McpServerPrimitiveRemoveButton as RemoveButton } from "./server/McpServerRemoveButton.js";
|
|
9
|
+
export { McpServerPrimitiveOAuthLink as OAuthLink } from "./server/McpServerOAuthLink.js";
|
|
10
|
+
export { McpServerPrimitiveTools as Tools, useMcpServerTool, } from "./server/McpServerTools.js";
|
|
11
|
+
export { McpServerPrimitiveToolName as ToolName } from "./server/McpServerToolName.js";
|
|
12
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/primitives/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,wBAAwB,IAAI,MAAM,EAAE,oCAAiC;AAC9E,OAAO,EAAE,uBAAuB,IAAI,KAAK,EAAE,mCAAgC;AAC3E,OAAO,EAAE,sBAAsB,IAAI,IAAI,EAAE,kCAA+B;AACxE,OAAO,EAAE,+BAA+B,IAAI,aAAa,EAAE,2CAAwC;AACnG,OAAO,EAAE,kCAAkC,IAAI,gBAAgB,EAAE,8CAA2C;AAC5G,OAAO,EAAE,8BAA8B,IAAI,YAAY,EAAE,0CAAuC;AAChG,OAAO,EAAE,2BAA2B,IAAI,SAAS,EAAE,uCAAoC;AACvF,OAAO,EACL,uBAAuB,IAAI,KAAK,EAChC,gBAAgB,GACjB,mCAAgC;AACjC,OAAO,EAAE,0BAA0B,IAAI,QAAQ,EAAE,sCAAmC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ClientOutput } from "@assistant-ui/store";
|
|
2
|
+
import type { MCPStorageElement } from "./storage/types.js";
|
|
3
|
+
import type { MCPConnector } from "../mcp-scope.js";
|
|
4
|
+
export type McpManagerResourceProps = {
|
|
5
|
+
connectors?: MCPConnector[] | undefined;
|
|
6
|
+
storage?: MCPStorageElement | undefined;
|
|
7
|
+
/** OAuth redirect target. Defaults to `${origin}/mcp/callback`. */
|
|
8
|
+
oauthRedirectUri?: string | undefined;
|
|
9
|
+
/** Connect on mount when usable auth exists. Default true. */
|
|
10
|
+
autoConnect?: boolean | undefined;
|
|
11
|
+
};
|
|
12
|
+
export declare const McpManagerResource: (props: McpManagerResourceProps) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"mcp">, McpManagerResourceProps>;
|
|
13
|
+
//# sourceMappingURL=McpManagerResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpManagerResource.d.ts","sourceRoot":"","sources":["../../src/resources/McpManagerResource.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAAwB;AACzD,OAAO,KAAK,EAEV,YAAY,EAGb,wBAAqB;AAEtB,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACxC,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACxC,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC,CAAC;AAOF,eAAO,MAAM,kBAAkB,+HAyM9B,CAAC"}
|