@assistant-ui/react-mcp 0.1.18 → 0.1.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 +1 -2
- package/dist/auth/buildHeaders.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.d.ts +5 -6
- package/dist/auth/createOAuthProvider.d.ts.map +1 -1
- package/dist/auth/types.d.ts +1 -2
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/connector.d.ts +1 -2
- package/dist/connector.d.ts.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.d.ts +1 -2
- package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.d.ts +1 -2
- package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpServerByIdProvider.d.ts +1 -2
- package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.d.ts +5 -6
- package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.js +4 -0
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
- package/dist/mcp-scope.d.ts +14 -15
- package/dist/mcp-scope.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +4 -4
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.js +18 -71
- package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts +10 -0
- package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormBearerTokenField.js +50 -0
- package/dist/primitives/addForm/McpAddFormBearerTokenField.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormCancel.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormScopesField.d.ts +10 -0
- package/dist/primitives/addForm/McpAddFormScopesField.d.ts.map +1 -0
- package/dist/primitives/addForm/McpAddFormScopesField.js +38 -0
- package/dist/primitives/addForm/McpAddFormScopesField.js.map +1 -0
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts +2 -3
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
- package/dist/primitives/addForm/context.d.ts +7 -8
- package/dist/primitives/addForm/context.d.ts.map +1 -1
- package/dist/primitives/addForm.d.ts +4 -2
- package/dist/primitives/addForm.js +5 -1
- package/dist/primitives/addForm.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts +3 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts +3 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts +2 -3
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts.map +1 -1
- package/dist/primitives/elicitation/context.d.ts +7 -8
- package/dist/primitives/elicitation/context.d.ts.map +1 -1
- package/dist/primitives/elicitation/initialElicitationDraft.d.ts +1 -2
- package/dist/primitives/elicitation/initialElicitationDraft.d.ts.map +1 -1
- package/dist/primitives/elicitation/prepareElicitationContent.d.ts +1 -2
- package/dist/primitives/elicitation/prepareElicitationContent.d.ts.map +1 -1
- package/dist/primitives/elicitation/prepareElicitationContent.js +5 -1
- package/dist/primitives/elicitation/prepareElicitationContent.js.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +2 -3
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.d.ts +2 -3
- package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.d.ts +2 -3
- package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.d.ts +2 -3
- package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.d.ts +2 -3
- package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.d.ts +2 -3
- package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerError.d.ts +2 -3
- package/dist/primitives/server/McpServerError.d.ts.map +1 -1
- package/dist/primitives/server/McpServerIcon.d.ts +2 -3
- package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
- package/dist/primitives/server/McpServerName.d.ts +2 -3
- package/dist/primitives/server/McpServerName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.d.ts +2 -3
- package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.d.ts +2 -3
- package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRoot.d.ts +2 -3
- package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
- package/dist/primitives/server/McpServerStatus.d.ts +2 -3
- package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
- package/dist/primitives/server/McpServerToolName.d.ts +2 -3
- package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerTools.d.ts +3 -4
- package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.d.ts +2 -3
- package/dist/resources/McpManagerResource.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.js +93 -62
- package/dist/resources/McpManagerResource.js.map +1 -1
- package/dist/resources/McpServerRemovalFence.d.ts +2 -3
- package/dist/resources/McpServerRemovalFence.d.ts.map +1 -1
- package/dist/resources/McpServerResource.d.ts +3 -4
- package/dist/resources/McpServerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.js +4 -4
- package/dist/resources/McpServerResource.js.map +1 -1
- package/dist/resources/storage/McpCustomStorage.d.ts +1 -2
- package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.d.ts +4 -5
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpMemoryStorage.d.ts +1 -2
- package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
- package/dist/resources/storage/types.d.ts +2 -3
- package/dist/resources/storage/types.d.ts.map +1 -1
- package/dist/resources/validateElicitationContent.d.ts +1 -2
- package/dist/resources/validateElicitationContent.d.ts.map +1 -1
- package/dist/utils/createMcpId.d.ts +1 -2
- package/dist/utils/createMcpId.d.ts.map +1 -1
- package/dist/utils/invokeMcpCallback.d.ts +1 -2
- package/dist/utils/invokeMcpCallback.d.ts.map +1 -1
- package/dist/utils/serverId.d.ts +2 -3
- package/dist/utils/serverId.d.ts.map +1 -1
- package/dist/utils/serverUrl.d.ts +3 -4
- package/dist/utils/serverUrl.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/hooks/useMcpOAuthCallback.test.ts +53 -0
- package/src/hooks/useMcpOAuthCallback.tsx +12 -0
- package/src/index.ts +2 -1
- package/src/primitives/addForm/McpAddFormAccessibility.test.tsx +49 -0
- package/src/primitives/addForm/McpAddFormAuthFields.tsx +7 -15
- package/src/primitives/addForm/McpAddFormBearerTokenField.tsx +46 -0
- package/src/primitives/addForm/McpAddFormRoot.test.tsx +65 -0
- package/src/primitives/addForm/McpAddFormScopesField.tsx +34 -0
- package/src/primitives/addForm.ts +2 -0
- package/src/primitives/elicitation/prepareElicitationContent.ts +8 -6
- package/src/resources/McpManagerResource.test.ts +85 -0
- package/src/resources/McpManagerResource.ts +56 -23
- package/src/resources/McpServerResource.test.ts +9 -6
- package/src/resources/McpServerResource.ts +6 -5
|
@@ -6,7 +6,6 @@ import { MCPPersistedAuthState } from "./types.js";
|
|
|
6
6
|
* stored at add-form time (persisted), falling back to a static token on the
|
|
7
7
|
* config (used by connectors that hardcode a token, rare in practice).
|
|
8
8
|
*/
|
|
9
|
-
declare function buildHeaders(auth: MCPAuthConfig, persisted: MCPPersistedAuthState | null): Record<string, string> | undefined;
|
|
9
|
+
export declare function buildHeaders(auth: MCPAuthConfig, persisted: MCPPersistedAuthState | null): Record<string, string> | undefined;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { buildHeaders };
|
|
12
11
|
//# sourceMappingURL=buildHeaders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildHeaders.d.ts","names":[],"sources":["../../src/auth/buildHeaders.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"buildHeaders.d.ts","names":[],"sources":["../../src/auth/buildHeaders.ts"],"mappings":";;;;;;;;wBAQgB,aACd,MAAM,eACN,WAAW,+BACV"}
|
|
@@ -2,8 +2,8 @@ import { MCPAuthConfig } from "../mcp-scope.js";
|
|
|
2
2
|
import { MCPStorage } from "../resources/storage/types.js";
|
|
3
3
|
import { OAuthClientInformationFull, OAuthClientProvider, OAuthTokens } from "@modelcontextprotocol/client";
|
|
4
4
|
//#region src/auth/createOAuthProvider.d.ts
|
|
5
|
-
declare function decodeServerIdFromState(state: string): string | null;
|
|
6
|
-
type CreateOAuthProviderOptions = {
|
|
5
|
+
export declare function decodeServerIdFromState(state: string): string | null;
|
|
6
|
+
export type CreateOAuthProviderOptions = {
|
|
7
7
|
serverId: string;
|
|
8
8
|
serverUrl: string;
|
|
9
9
|
/** Must be `auth.type === "oauth"`. */
|
|
@@ -24,19 +24,18 @@ type OAuthCredentialState = {
|
|
|
24
24
|
clientInformation?: OAuthClientInformationFull | undefined;
|
|
25
25
|
clientInformationSource?: "registered" | undefined;
|
|
26
26
|
};
|
|
27
|
-
declare const hasUsableOAuthTokens: (state: OAuthCredentialState | null | undefined, config: OAuthConfig) => boolean;
|
|
27
|
+
export declare const hasUsableOAuthTokens: (state: OAuthCredentialState | null | undefined, config: OAuthConfig) => boolean;
|
|
28
28
|
/**
|
|
29
29
|
* Clears persisted OAuth state after the in-flight load and every queued write
|
|
30
30
|
* for that server have settled, so a discarded provider cannot recreate the
|
|
31
31
|
* record it was mid-save on.
|
|
32
32
|
*/
|
|
33
|
-
declare const clearOAuthProviderAuthState: (storage: MCPStorage, serverId: string) => Promise<void>;
|
|
33
|
+
export declare const clearOAuthProviderAuthState: (storage: MCPStorage, serverId: string) => Promise<void>;
|
|
34
34
|
/**
|
|
35
35
|
* Builds an OAuthClientProvider for the MCP SDK, backed by MCPStorage.
|
|
36
36
|
* Token refresh and DCR are handled by the SDK; this provider only mediates
|
|
37
37
|
* load/save and the redirect step.
|
|
38
38
|
*/
|
|
39
|
-
declare function createOAuthProvider(opts: CreateOAuthProviderOptions): OAuthClientProvider;
|
|
39
|
+
export declare function createOAuthProvider(opts: CreateOAuthProviderOptions): OAuthClientProvider;
|
|
40
40
|
//#endregion
|
|
41
|
-
export { CreateOAuthProviderOptions, clearOAuthProviderAuthState, createOAuthProvider, decodeServerIdFromState, hasUsableOAuthTokens };
|
|
42
41
|
//# sourceMappingURL=createOAuthProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOAuthProvider.d.ts","names":[],"sources":["../../src/auth/createOAuthProvider.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"createOAuthProvider.d.ts","names":[],"sources":["../../src/auth/createOAuthProvider.ts"],"mappings":";;;;wBAsCgB,wBAAwB;YAgB5B;EACV;EACA;;EAEA,QAAQ,QAAQ;IAAiB;;EACjC,SAAS;EACT;;EAEA,qBAAqB,KAAK;;KAcvB,cAAc,QAAQ;EAAiB;;KAEvC;EACH,SAAS;EACT;EACA,oBAAoB;EACpB;;qBAUW,uBACX,OAAO,yCACP,QAAQ;;;;;;qBAkHG,8BACX,SAAS,YACT,qBACC;;;;;;wBA2Ba,oBACd,MAAM,6BACL"}
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OAuthClientInformationFull, OAuthDiscoveryState, OAuthTokens } from "@modelcontextprotocol/client";
|
|
2
2
|
//#region src/auth/types.d.ts
|
|
3
|
-
type MCPPersistedAuthState = {
|
|
3
|
+
export type MCPPersistedAuthState = {
|
|
4
4
|
/** MCP server URL this authentication state belongs to. Required with credentials. */
|
|
5
5
|
serverUrl?: string;
|
|
6
6
|
tokens?: OAuthTokens;
|
|
@@ -14,5 +14,4 @@ type MCPPersistedAuthState = {
|
|
|
14
14
|
token?: string;
|
|
15
15
|
};
|
|
16
16
|
//#endregion
|
|
17
|
-
export { MCPPersistedAuthState };
|
|
18
17
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/auth/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;YAMY;;EAEV;EACA,SAAS;EACT;EACA,oBAAoB;EACpB;EACA;EACA;EACA,iBAAiB;;EAEjB"}
|
package/dist/connector.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MCPConnector } from "./mcp-scope.js";
|
|
2
2
|
//#region src/connector.d.ts
|
|
3
|
-
declare function defineConnector(connector: MCPConnector): MCPConnector;
|
|
3
|
+
export declare function defineConnector(connector: MCPConnector): MCPConnector;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { defineConnector };
|
|
6
5
|
//# sourceMappingURL=connector.d.ts.map
|
package/dist/connector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.d.ts","names":[],"sources":["../src/connector.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"connector.d.ts","names":[],"sources":["../src/connector.ts"],"mappings":";;wBAGgB,gBAAgB,WAAW,eAAe"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from "react";
|
|
2
2
|
//#region src/context/McpConnectorByIndexProvider.d.ts
|
|
3
|
-
declare const McpConnectorByIndexProvider: FC<PropsWithChildren<{
|
|
3
|
+
export declare const McpConnectorByIndexProvider: FC<PropsWithChildren<{
|
|
4
4
|
index: number;
|
|
5
5
|
}>>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { McpConnectorByIndexProvider };
|
|
8
7
|
//# sourceMappingURL=McpConnectorByIndexProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpConnectorByIndexProvider.d.ts","names":[],"sources":["../../src/context/McpConnectorByIndexProvider.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"McpConnectorByIndexProvider.d.ts","names":[],"sources":["../../src/context/McpConnectorByIndexProvider.tsx"],"mappings":";;qBAGa,6BAA6B,GACxC;EAAoB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from "react";
|
|
2
2
|
//#region src/context/McpCustomServerByIndexProvider.d.ts
|
|
3
|
-
declare const McpCustomServerByIndexProvider: FC<PropsWithChildren<{
|
|
3
|
+
export declare const McpCustomServerByIndexProvider: FC<PropsWithChildren<{
|
|
4
4
|
index: number;
|
|
5
5
|
}>>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { McpCustomServerByIndexProvider };
|
|
8
7
|
//# sourceMappingURL=McpCustomServerByIndexProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpCustomServerByIndexProvider.d.ts","names":[],"sources":["../../src/context/McpCustomServerByIndexProvider.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"McpCustomServerByIndexProvider.d.ts","names":[],"sources":["../../src/context/McpCustomServerByIndexProvider.tsx"],"mappings":";;qBAGa,gCAAgC,GAC3C;EAAoB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from "react";
|
|
2
2
|
//#region src/context/McpServerByIdProvider.d.ts
|
|
3
|
-
declare const McpServerByIdProvider: FC<PropsWithChildren<{
|
|
3
|
+
export declare const McpServerByIdProvider: FC<PropsWithChildren<{
|
|
4
4
|
id: string;
|
|
5
5
|
}>>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { McpServerByIdProvider };
|
|
8
7
|
//# sourceMappingURL=McpServerByIdProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerByIdProvider.d.ts","names":[],"sources":["../../src/context/McpServerByIdProvider.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"McpServerByIdProvider.d.ts","names":[],"sources":["../../src/context/McpServerByIdProvider.tsx"],"mappings":";;qBAGa,uBAAuB,GAAG;EAAoB"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
2
|
//#region src/hooks/useMcpOAuthCallback.d.ts
|
|
3
|
-
declare const createMcpOAuthCallbackError: (err: unknown, serverId: string | null) => Error;
|
|
4
|
-
type UseMcpOAuthCallbackOptions = {
|
|
3
|
+
export declare const createMcpOAuthCallbackError: (err: unknown, serverId: string | null) => Error;
|
|
4
|
+
export type UseMcpOAuthCallbackOptions = {
|
|
5
5
|
/** Defaults to `window.location.href`. */
|
|
6
6
|
url?: string;
|
|
7
7
|
onComplete?: (serverId: string) => void;
|
|
8
8
|
onError?: (err: Error) => void;
|
|
9
9
|
};
|
|
10
|
-
type UseMcpOAuthCallbackResult = {
|
|
10
|
+
export type UseMcpOAuthCallbackResult = {
|
|
11
11
|
status: "idle" | "running" | "done" | "error";
|
|
12
12
|
serverId: string | null;
|
|
13
13
|
error: Error | null;
|
|
14
14
|
};
|
|
15
|
-
declare function useMcpOAuthCallback(opts?: UseMcpOAuthCallbackOptions): UseMcpOAuthCallbackResult;
|
|
16
|
-
declare const McpOAuthCallback: FC<UseMcpOAuthCallbackOptions & {
|
|
15
|
+
export declare function useMcpOAuthCallback(opts?: UseMcpOAuthCallbackOptions): UseMcpOAuthCallbackResult;
|
|
16
|
+
export declare const McpOAuthCallback: FC<UseMcpOAuthCallbackOptions & {
|
|
17
17
|
children?: (result: UseMcpOAuthCallbackResult) => ReactNode;
|
|
18
18
|
}>;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { McpOAuthCallback, UseMcpOAuthCallbackOptions, UseMcpOAuthCallbackResult, createMcpOAuthCallbackError, useMcpOAuthCallback };
|
|
21
20
|
//# sourceMappingURL=useMcpOAuthCallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMcpOAuthCallback.d.ts","names":[],"sources":["../../src/hooks/useMcpOAuthCallback.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useMcpOAuthCallback.d.ts","names":[],"sources":["../../src/hooks/useMcpOAuthCallback.tsx"],"mappings":";;qBAYa,8BACX,cACA,4BACC;YAWS;;EAEV;EACA,cAAc;EACd,WAAW,KAAK;;YAGN;EACV;EACA;EACA,OAAO;;wBAGO,oBACd,OAAM,6BACL;qBA8DU,kBAAkB,GAC7B;EACE,YAAY,QAAQ,8BAA8B"}
|
|
@@ -27,6 +27,7 @@ function useMcpOAuthCallback(opts = {}) {
|
|
|
27
27
|
if (!url) return;
|
|
28
28
|
if (startedRef.current === url) return;
|
|
29
29
|
startedRef.current = url;
|
|
30
|
+
const superseded = () => startedRef.current !== url;
|
|
30
31
|
(async () => {
|
|
31
32
|
let serverId = null;
|
|
32
33
|
try {
|
|
@@ -34,18 +35,21 @@ function useMcpOAuthCallback(opts = {}) {
|
|
|
34
35
|
if (state) serverId = decodeServerIdFromState(state);
|
|
35
36
|
if (!state) throw new Error("missing \"state\" parameter");
|
|
36
37
|
if (!serverId) throw new Error("state was not created by assistant-ui MCP");
|
|
38
|
+
if (superseded()) return;
|
|
37
39
|
setResult({
|
|
38
40
|
status: "running",
|
|
39
41
|
serverId,
|
|
40
42
|
error: null
|
|
41
43
|
});
|
|
42
44
|
await aui.mcp.server({ id: serverId }).completeAuth(url);
|
|
45
|
+
if (superseded()) return;
|
|
43
46
|
setResult({
|
|
44
47
|
status: "done",
|
|
45
48
|
serverId,
|
|
46
49
|
error: null
|
|
47
50
|
});
|
|
48
51
|
} catch (err) {
|
|
52
|
+
if (superseded()) return;
|
|
49
53
|
const error = createMcpOAuthCallbackError(err, serverId);
|
|
50
54
|
setResult({
|
|
51
55
|
status: "error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMcpOAuthCallback.js","names":["FC","ReactNode","useEffect","useInsertionEffect","useRef","useState","useAui","decodeServerIdFromState","invokeMcpCallback","createMcpOAuthCallbackError","err","serverId","Error","message","String","cause","UseMcpOAuthCallbackOptions","url","onComplete","onError","UseMcpOAuthCallbackResult","status","error","useMcpOAuthCallback","opts","aui","result","setResult","startedRef","optsRef","current","window","location","href","parsed","URL","state","searchParams","get","mcp","server","id","completeAuth","McpOAuthCallback","children","t0","$","_c","t1","t2"],"sources":["../../src/hooks/useMcpOAuthCallback.tsx"],"sourcesContent":["import {\n type FC,\n type ReactNode,\n useEffect,\n useInsertionEffect,\n useRef,\n useState,\n} from \"react\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { decodeServerIdFromState } from \"../auth/createOAuthProvider\";\nimport { invokeMcpCallback } from \"../utils/invokeMcpCallback\";\n\nexport const createMcpOAuthCallbackError = (\n err: unknown,\n serverId: string | null,\n): Error => {\n const message = err instanceof Error ? err.message : String(err);\n if (serverId) {\n return new Error(\n `MCP OAuth callback for server \"${serverId}\" failed: ${message}`,\n { cause: err },\n );\n }\n return new Error(`MCP OAuth callback failed: ${message}`, { cause: err });\n};\n\nexport type UseMcpOAuthCallbackOptions = {\n /** Defaults to `window.location.href`. */\n url?: string;\n onComplete?: (serverId: string) => void;\n onError?: (err: Error) => void;\n};\n\nexport type UseMcpOAuthCallbackResult = {\n status: \"idle\" | \"running\" | \"done\" | \"error\";\n serverId: string | null;\n error: Error | null;\n};\n\nexport function useMcpOAuthCallback(\n opts: UseMcpOAuthCallbackOptions = {},\n): UseMcpOAuthCallbackResult {\n const aui = useAui();\n const [result, setResult] = useState<UseMcpOAuthCallbackResult>({\n status: \"idle\",\n serverId: null,\n error: null,\n });\n // Guard against React 18 Strict Mode's mount-unmount-remount: the effect\n // body must not run completeAuth twice for the same URL, otherwise the\n // single-use OAuth code is double-redeemed and the second attempt 4xxs.\n const startedRef = useRef<string | null>(null);\n const optsRef = useRef(opts);\n useInsertionEffect(() => {\n optsRef.current = opts;\n });\n\n useEffect(() => {\n const url =\n opts.url ?? (typeof window !== \"undefined\" ? window.location.href : null);\n if (!url) return;\n if (startedRef.current === url) return;\n startedRef.current = url;\n\n void (async () => {\n let serverId: string | null = null;\n try {\n const parsed = new URL(url);\n const state = parsed.searchParams.get(\"state\");\n if (state) serverId = decodeServerIdFromState(state);\n if (!state) throw new Error('missing \"state\" parameter');\n if (!serverId) {\n throw new Error(\"state was not created by assistant-ui MCP\");\n }\n setResult({ status: \"running\", serverId, error: null });\n await aui.mcp.server({ id: serverId }).completeAuth(url);\n setResult({ status: \"done\", serverId, error: null });\n } catch (err) {\n const error = createMcpOAuthCallbackError(err, serverId);\n setResult({ status: \"error\", serverId, error });\n invokeMcpCallback(\"onError\", optsRef.current.onError, error);\n return;\n }\n\n invokeMcpCallback(\"onComplete\", optsRef.current.onComplete, serverId);\n })();\n }, [aui, opts.url]);\n\n return result;\n}\n\nexport const McpOAuthCallback: FC<\n UseMcpOAuthCallbackOptions & {\n children?: (result: UseMcpOAuthCallbackResult) => ReactNode;\n }\n> = ({ children, ...opts }) => {\n const result = useMcpOAuthCallback(opts);\n if (children) return <>{children(result)}</>;\n return null;\n};\n"],"mappings":";;;;;;;AAYA,MAAaS,+BACXC,KACAC,aACU;CACV,MAAME,UAAUH,eAAeE,QAAQF,IAAIG,UAAUC,OAAOJ,GAAG;CAC/D,IAAIC,UACF,OAAO,IAAIC,MACT,kCAAkCD,SAAQ,YAAaE,WACvD,EAAEE,OAAOL,IAAI,CACf;CAEF,OAAO,IAAIE,MAAM,8BAA8BC,WAAW,EAAEE,OAAOL,IAAI,CAAC;AAC1E;AAeA,SAAgBa,oBACdC,OAAmC,CAAC,GACT;CAC3B,MAAMC,MAAMnB,OAAO;CACnB,MAAM,CAACoB,QAAQC,aAAatB,SAAoC;EAC9DgB,QAAQ;EACRV,UAAU;EACVW,OAAO;CACT,CAAC;CAID,MAAMM,aAAaxB,OAAsB,IAAI;CAC7C,MAAMyB,UAAUzB,OAAOoB,IAAI;CAC3BrB,yBAAyB;EACvB0B,QAAQC,UAAUN;CACpB,CAAC;CAEDtB,gBAAgB;EACd,MAAMe,MACJO,KAAKP,QAAQ,OAAOc,WAAW,cAAcA,OAAOC,SAASC,OAAO;EACtE,IAAI,CAAChB,KAAK;EACV,IAAIW,WAAWE,YAAYb,KAAK;EAChCW,WAAWE,UAAUb;
|
|
1
|
+
{"version":3,"file":"useMcpOAuthCallback.js","names":["FC","ReactNode","useEffect","useInsertionEffect","useRef","useState","useAui","decodeServerIdFromState","invokeMcpCallback","createMcpOAuthCallbackError","err","serverId","Error","message","String","cause","UseMcpOAuthCallbackOptions","url","onComplete","onError","UseMcpOAuthCallbackResult","status","error","useMcpOAuthCallback","opts","aui","result","setResult","startedRef","optsRef","current","window","location","href","superseded","parsed","URL","state","searchParams","get","mcp","server","id","completeAuth","McpOAuthCallback","children","t0","$","_c","t1","t2"],"sources":["../../src/hooks/useMcpOAuthCallback.tsx"],"sourcesContent":["import {\n type FC,\n type ReactNode,\n useEffect,\n useInsertionEffect,\n useRef,\n useState,\n} from \"react\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { decodeServerIdFromState } from \"../auth/createOAuthProvider\";\nimport { invokeMcpCallback } from \"../utils/invokeMcpCallback\";\n\nexport const createMcpOAuthCallbackError = (\n err: unknown,\n serverId: string | null,\n): Error => {\n const message = err instanceof Error ? err.message : String(err);\n if (serverId) {\n return new Error(\n `MCP OAuth callback for server \"${serverId}\" failed: ${message}`,\n { cause: err },\n );\n }\n return new Error(`MCP OAuth callback failed: ${message}`, { cause: err });\n};\n\nexport type UseMcpOAuthCallbackOptions = {\n /** Defaults to `window.location.href`. */\n url?: string;\n onComplete?: (serverId: string) => void;\n onError?: (err: Error) => void;\n};\n\nexport type UseMcpOAuthCallbackResult = {\n status: \"idle\" | \"running\" | \"done\" | \"error\";\n serverId: string | null;\n error: Error | null;\n};\n\nexport function useMcpOAuthCallback(\n opts: UseMcpOAuthCallbackOptions = {},\n): UseMcpOAuthCallbackResult {\n const aui = useAui();\n const [result, setResult] = useState<UseMcpOAuthCallbackResult>({\n status: \"idle\",\n serverId: null,\n error: null,\n });\n // Guard against React 18 Strict Mode's mount-unmount-remount: the effect\n // body must not run completeAuth twice for the same URL, otherwise the\n // single-use OAuth code is double-redeemed and the second attempt 4xxs.\n const startedRef = useRef<string | null>(null);\n const optsRef = useRef(opts);\n useInsertionEffect(() => {\n optsRef.current = opts;\n });\n\n useEffect(() => {\n const url =\n opts.url ?? (typeof window !== \"undefined\" ? window.location.href : null);\n if (!url) return;\n if (startedRef.current === url) return;\n startedRef.current = url;\n\n // A callback page can be handed a second login URL while the first\n // completeAuth is still in flight. That attempt keeps running, so it\n // publishes only while its own URL is still the one being attempted;\n // otherwise an older failure would overwrite the newer attempt's success.\n // The check is against `startedRef` rather than a teardown flag so that\n // Strict Mode's unmount-remount, which starts no new attempt, still\n // publishes the result of the one already running.\n const superseded = () => startedRef.current !== url;\n\n void (async () => {\n let serverId: string | null = null;\n try {\n const parsed = new URL(url);\n const state = parsed.searchParams.get(\"state\");\n if (state) serverId = decodeServerIdFromState(state);\n if (!state) throw new Error('missing \"state\" parameter');\n if (!serverId) {\n throw new Error(\"state was not created by assistant-ui MCP\");\n }\n if (superseded()) return;\n setResult({ status: \"running\", serverId, error: null });\n await aui.mcp.server({ id: serverId }).completeAuth(url);\n if (superseded()) return;\n setResult({ status: \"done\", serverId, error: null });\n } catch (err) {\n if (superseded()) return;\n const error = createMcpOAuthCallbackError(err, serverId);\n setResult({ status: \"error\", serverId, error });\n invokeMcpCallback(\"onError\", optsRef.current.onError, error);\n return;\n }\n\n invokeMcpCallback(\"onComplete\", optsRef.current.onComplete, serverId);\n })();\n }, [aui, opts.url]);\n\n return result;\n}\n\nexport const McpOAuthCallback: FC<\n UseMcpOAuthCallbackOptions & {\n children?: (result: UseMcpOAuthCallbackResult) => ReactNode;\n }\n> = ({ children, ...opts }) => {\n const result = useMcpOAuthC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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@assistant-ui/store";
|
|
2
2
|
//#region src/mcp-scope.d.ts
|
|
3
|
-
type MCPAuthConfig = {
|
|
3
|
+
export type MCPAuthConfig = {
|
|
4
4
|
type: "none";
|
|
5
5
|
} | {
|
|
6
6
|
type: "bearer";
|
|
@@ -14,10 +14,10 @@ type MCPAuthConfig = {
|
|
|
14
14
|
clientId?: string | undefined;
|
|
15
15
|
clientSecret?: string | undefined;
|
|
16
16
|
};
|
|
17
|
-
type MCPResponseCacheConfig = {
|
|
17
|
+
export type MCPResponseCacheConfig = {
|
|
18
18
|
readonly defaultTtlMs?: number;
|
|
19
19
|
};
|
|
20
|
-
type MCPConnector = {
|
|
20
|
+
export type MCPConnector = {
|
|
21
21
|
id: string;
|
|
22
22
|
name: string;
|
|
23
23
|
url: string;
|
|
@@ -27,7 +27,7 @@ type MCPConnector = {
|
|
|
27
27
|
readonly cache?: MCPResponseCacheConfig | undefined;
|
|
28
28
|
readonly elicitation?: boolean | undefined;
|
|
29
29
|
};
|
|
30
|
-
type MCPCustomServerRecord = {
|
|
30
|
+
export type MCPCustomServerRecord = {
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
33
33
|
url: string;
|
|
@@ -37,14 +37,14 @@ type MCPCustomServerRecord = {
|
|
|
37
37
|
readonly elicitation?: boolean | undefined;
|
|
38
38
|
createdAt: number;
|
|
39
39
|
};
|
|
40
|
-
type MCPServerKind = "connector" | "custom";
|
|
41
|
-
type MCPConnectionState = "disconnected" | "authRequired" | "authPending" | "connecting" | "connected" | "error";
|
|
42
|
-
type MCPToolInfo = {
|
|
40
|
+
export type MCPServerKind = "connector" | "custom";
|
|
41
|
+
export type MCPConnectionState = "disconnected" | "authRequired" | "authPending" | "connecting" | "connected" | "error";
|
|
42
|
+
export type MCPToolInfo = {
|
|
43
43
|
name: string;
|
|
44
44
|
description?: string | undefined;
|
|
45
45
|
inputSchema: unknown;
|
|
46
46
|
};
|
|
47
|
-
type MCPElicitation = {
|
|
47
|
+
export type MCPElicitation = {
|
|
48
48
|
readonly id: string;
|
|
49
49
|
readonly message: string;
|
|
50
50
|
readonly requestedSchema: unknown;
|
|
@@ -53,7 +53,7 @@ type MCPElicitation = {
|
|
|
53
53
|
readonly properties?: readonly string[] | undefined;
|
|
54
54
|
} | undefined;
|
|
55
55
|
};
|
|
56
|
-
type MCPElicitationResponse = {
|
|
56
|
+
export type MCPElicitationResponse = {
|
|
57
57
|
action: "accept";
|
|
58
58
|
content: Record<string, unknown>;
|
|
59
59
|
} | {
|
|
@@ -61,7 +61,7 @@ type MCPElicitationResponse = {
|
|
|
61
61
|
} | {
|
|
62
62
|
action: "cancel";
|
|
63
63
|
};
|
|
64
|
-
type MCPServerState = {
|
|
64
|
+
export type MCPServerState = {
|
|
65
65
|
id: string;
|
|
66
66
|
kind: MCPServerKind;
|
|
67
67
|
name: string;
|
|
@@ -75,13 +75,13 @@ type MCPServerState = {
|
|
|
75
75
|
authorizationUrl: string | null;
|
|
76
76
|
readonly pendingElicitations: readonly MCPElicitation[];
|
|
77
77
|
};
|
|
78
|
-
type MCPManagerState = {
|
|
78
|
+
export type MCPManagerState = {
|
|
79
79
|
servers: MCPServerState[];
|
|
80
80
|
connectors: MCPServerState[];
|
|
81
81
|
customServers: MCPServerState[];
|
|
82
82
|
isHydrated: boolean;
|
|
83
83
|
};
|
|
84
|
-
type MCPServerMethods = {
|
|
84
|
+
export type MCPServerMethods = {
|
|
85
85
|
getState: () => MCPServerState;
|
|
86
86
|
connect: () => Promise<void>;
|
|
87
87
|
disconnect: () => Promise<void>;
|
|
@@ -100,7 +100,7 @@ type MCPServerMethods = {
|
|
|
100
100
|
message: string;
|
|
101
101
|
}[] | undefined;
|
|
102
102
|
};
|
|
103
|
-
type MCPServerQuery = {
|
|
103
|
+
export type MCPServerQuery = {
|
|
104
104
|
id: string;
|
|
105
105
|
} | {
|
|
106
106
|
kind: "connector";
|
|
@@ -109,7 +109,7 @@ type MCPServerQuery = {
|
|
|
109
109
|
kind: "custom";
|
|
110
110
|
index: number;
|
|
111
111
|
};
|
|
112
|
-
type MCPManagerMethods = {
|
|
112
|
+
export type MCPManagerMethods = {
|
|
113
113
|
getState: () => MCPManagerState;
|
|
114
114
|
/** Look up a server by id, or by index within its kind. */
|
|
115
115
|
server: (query: MCPServerQuery) => MCPServerMethods;
|
|
@@ -146,5 +146,4 @@ declare module "@assistant-ui/store" {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
//#endregion
|
|
149
|
-
export { MCPAuthConfig, MCPConnectionState, MCPConnector, MCPCustomServerRecord, MCPElicitation, MCPElicitationResponse, MCPManagerMethods, MCPManagerState, MCPResponseCacheConfig, MCPServerKind, MCPServerMethods, MCPServerQuery, MCPServerState, MCPToolInfo };
|
|
150
149
|
//# sourceMappingURL=mcp-scope.d.ts.map
|
package/dist/mcp-scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-scope.d.ts","names":[],"sources":["../src/mcp-scope.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"mcp-scope.d.ts","names":[],"sources":["../src/mcp-scope.ts"],"mappings":";;YAEY;EACN;;EACA;EAAgB;;EAEhB;EACA;EACA;EACA;EACA;EACA;EACA;;YAGM;WACD;;YAGC;EACV;EACA;EACA;EACA;EACA,MAAM;EACN;WACS,QAAQ;WACR;;YAGC;EACV;EACA;EACA;EACA,MAAM;EACN;WACS,QAAQ;WACR;EACT;;YAGU;YAEA;YAQA;EACV;EACA;EACA;;YAGU;WACD;WACA;WACA;WACA;aAEM;aACA;;;YAKL;EACN;EAAkB,SAAS;;EAC3B;;EACA;;YAEM;EACV;EACA,MAAM;EACN;EACA;EACA;EACA,iBAAiB;EACjB;IAAa;;EACb,OAAO;EACP;WACS,8BAA8B;;YAG7B;EACV,SAAS;EACT,YAAY;EACZ,eAAe;EACf;;YAGU;EACV,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,cAAc;EACd,WAAW,cAAc,kBAAkB;;EAE3C,gBAAgB;IAAW;QAAkC;;EAE7D,eAAe,gBAAgB;;EAE/B,eAAe,wBAAwB;EACvC,kBACE,YACA,UAAU;IACE;IAAkB;;;YAGtB;EACN;;EACA;EAAmB;;EACnB;EAAgB;;YAEV;EACV,gBAAgB;;EAEhB,SAAS,OAAO,mBAAmB;;EAEnC,YAAY;IAAS;QAAoB;;EAEzC,eAAe;IAAS;QAAoB;EAC5C,kBAAkB;IAChB;IACA;IACA,MAAM;IACN;aACS,QAAQ;aACR;QACL;EACN,eAAe,eAAe;;;YAIpB;IACR;MACE,SAAS;;IAEX;MACE,SAAS;MACT;QAAQ;QAAe,OAAO"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { AddFormAuthType } from "./context.js";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
//#region src/primitives/addForm/McpAddFormAuthFields.d.ts
|
|
4
|
-
declare namespace McpAddFormPrimitiveAuthFields {
|
|
4
|
+
export declare namespace McpAddFormPrimitiveAuthFields {
|
|
5
5
|
type Props = {
|
|
6
6
|
/**
|
|
7
7
|
* Optional render override. Receives the current auth type so apps can render
|
|
8
|
-
* fully custom inputs
|
|
8
|
+
* fully custom inputs, bound to the form through `BearerTokenField` and
|
|
9
|
+
* `ScopesField`. Defaults to a minimal built-in for bearer / oauth.
|
|
9
10
|
*/
|
|
10
11
|
children?: FC<{
|
|
11
12
|
authType: AddFormAuthType;
|
|
12
13
|
}>;
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
declare const McpAddFormPrimitiveAuthFields: FC<McpAddFormPrimitiveAuthFields.Props>;
|
|
16
|
+
export declare const McpAddFormPrimitiveAuthFields: FC<McpAddFormPrimitiveAuthFields.Props>;
|
|
16
17
|
//#endregion
|
|
17
|
-
export { McpAddFormPrimitiveAuthFields };
|
|
18
18
|
//# sourceMappingURL=McpAddFormAuthFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthFields.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthFields.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"mappings":";;;yBAKiB;OACH;;;;;;IAMV,WAAW;MAAK,UAAU;;;;qBAIjB,+BAA+B,GAC1C,8BAA8B"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
|
+
import { McpAddFormPrimitiveBearerTokenField } from "./McpAddFormBearerTokenField.js";
|
|
3
|
+
import { McpAddFormPrimitiveScopesField } from "./McpAddFormScopesField.js";
|
|
2
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
//#region src/primitives/addForm/McpAddFormAuthFields.tsx
|
|
5
7
|
const McpAddFormPrimitiveAuthFields = (t0) => {
|
|
6
|
-
const $ = c(
|
|
8
|
+
const $ = c(7);
|
|
7
9
|
const { children } = t0;
|
|
8
|
-
const { state, ids
|
|
10
|
+
const { state, ids } = useAddForm();
|
|
9
11
|
if (children) {
|
|
10
12
|
const Render = children;
|
|
11
13
|
let t1;
|
|
@@ -20,89 +22,34 @@ const McpAddFormPrimitiveAuthFields = (t0) => {
|
|
|
20
22
|
if (state.authType === "bearer") {
|
|
21
23
|
let t1;
|
|
22
24
|
if ($[3] !== ids.bearerToken) {
|
|
23
|
-
t1 = /* @__PURE__ */ jsx("label", {
|
|
25
|
+
t1 = /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
24
26
|
htmlFor: ids.bearerToken,
|
|
25
27
|
"data-mcp-auth-field-label": "bearer-token",
|
|
26
28
|
children: "Bearer token"
|
|
27
|
-
})
|
|
29
|
+
}), /* @__PURE__ */ jsx(McpAddFormPrimitiveBearerTokenField, {
|
|
30
|
+
id: ids.bearerToken,
|
|
31
|
+
"data-mcp-auth-field": "bearer-token"
|
|
32
|
+
})] });
|
|
28
33
|
$[3] = ids.bearerToken;
|
|
29
34
|
$[4] = t1;
|
|
30
35
|
} else t1 = $[4];
|
|
31
|
-
|
|
32
|
-
if ($[5] !== setField) {
|
|
33
|
-
t2 = (e) => setField("bearerToken", e.target.value);
|
|
34
|
-
$[5] = setField;
|
|
35
|
-
$[6] = t2;
|
|
36
|
-
} else t2 = $[6];
|
|
37
|
-
const t3 = state.errorField === "bearerToken" ? true : void 0;
|
|
38
|
-
const t4 = state.errorField === "bearerToken" ? ids.error : void 0;
|
|
39
|
-
let t5;
|
|
40
|
-
if ($[7] !== ids.bearerToken || $[8] !== state.bearerToken || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
|
|
41
|
-
t5 = /* @__PURE__ */ jsx("input", {
|
|
42
|
-
id: ids.bearerToken,
|
|
43
|
-
type: "password",
|
|
44
|
-
value: state.bearerToken,
|
|
45
|
-
onChange: t2,
|
|
46
|
-
"aria-invalid": t3,
|
|
47
|
-
"aria-describedby": t4,
|
|
48
|
-
"data-mcp-auth-field": "bearer-token"
|
|
49
|
-
});
|
|
50
|
-
$[7] = ids.bearerToken;
|
|
51
|
-
$[8] = state.bearerToken;
|
|
52
|
-
$[9] = t2;
|
|
53
|
-
$[10] = t3;
|
|
54
|
-
$[11] = t4;
|
|
55
|
-
$[12] = t5;
|
|
56
|
-
} else t5 = $[12];
|
|
57
|
-
let t6;
|
|
58
|
-
if ($[13] !== t1 || $[14] !== t5) {
|
|
59
|
-
t6 = /* @__PURE__ */ jsxs("div", { children: [t1, t5] });
|
|
60
|
-
$[13] = t1;
|
|
61
|
-
$[14] = t5;
|
|
62
|
-
$[15] = t6;
|
|
63
|
-
} else t6 = $[15];
|
|
64
|
-
return t6;
|
|
36
|
+
return t1;
|
|
65
37
|
}
|
|
66
38
|
if (state.authType === "oauth") {
|
|
67
39
|
let t1;
|
|
68
|
-
if ($[
|
|
69
|
-
t1 = /* @__PURE__ */ jsx("label", {
|
|
40
|
+
if ($[5] !== ids.scopes) {
|
|
41
|
+
t1 = /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
70
42
|
htmlFor: ids.scopes,
|
|
71
43
|
"data-mcp-auth-field-label": "oauth-scopes",
|
|
72
44
|
children: "OAuth scopes"
|
|
73
|
-
})
|
|
74
|
-
$[16] = ids.scopes;
|
|
75
|
-
$[17] = t1;
|
|
76
|
-
} else t1 = $[17];
|
|
77
|
-
let t2;
|
|
78
|
-
if ($[18] !== setField) {
|
|
79
|
-
t2 = (e_0) => setField("scopes", e_0.target.value);
|
|
80
|
-
$[18] = setField;
|
|
81
|
-
$[19] = t2;
|
|
82
|
-
} else t2 = $[19];
|
|
83
|
-
let t3;
|
|
84
|
-
if ($[20] !== ids.scopes || $[21] !== state.scopes || $[22] !== t2) {
|
|
85
|
-
t3 = /* @__PURE__ */ jsx("input", {
|
|
45
|
+
}), /* @__PURE__ */ jsx(McpAddFormPrimitiveScopesField, {
|
|
86
46
|
id: ids.scopes,
|
|
87
|
-
type: "text",
|
|
88
|
-
placeholder: "Scopes (space-separated, optional)",
|
|
89
|
-
value: state.scopes,
|
|
90
|
-
onChange: t2,
|
|
91
47
|
"data-mcp-auth-field": "oauth-scopes"
|
|
92
|
-
});
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} else t3 = $[23];
|
|
98
|
-
let t4;
|
|
99
|
-
if ($[24] !== t1 || $[25] !== t3) {
|
|
100
|
-
t4 = /* @__PURE__ */ jsxs("div", { children: [t1, t3] });
|
|
101
|
-
$[24] = t1;
|
|
102
|
-
$[25] = t3;
|
|
103
|
-
$[26] = t4;
|
|
104
|
-
} else t4 = $[26];
|
|
105
|
-
return t4;
|
|
48
|
+
})] });
|
|
49
|
+
$[5] = ids.scopes;
|
|
50
|
+
$[6] = t1;
|
|
51
|
+
} else t1 = $[6];
|
|
52
|
+
return t1;
|
|
106
53
|
}
|
|
107
54
|
return null;
|
|
108
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthFields.js","names":["FC","AddFormAuthType","useAddForm","McpAddFormPrimitiveAuthFields","Props","children","authType","t0","$","_c","state","ids","
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthFields.js","names":["FC","McpAddFormPrimitiveBearerTokenField","McpAddFormPrimitiveScopesField","AddFormAuthType","useAddForm","McpAddFormPrimitiveAuthFields","Props","children","authType","t0","$","_c","state","ids","Render","t1","bearerToken","scopes","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { McpAddFormPrimitiveBearerTokenField } from \"./McpAddFormBearerTokenField\";\nimport { McpAddFormPrimitiveScopesField } from \"./McpAddFormScopesField\";\nimport { type AddFormAuthType, useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveAuthFields {\n export type Props = {\n /**\n * Optional render override. Receives the current auth type so apps can render\n * fully custom inputs, bound to the form through `BearerTokenField` and\n * `ScopesField`. Defaults to a minimal built-in for bearer / oauth.\n */\n children?: FC<{ authType: AddFormAuthType }>;\n };\n}\n\nexport const McpAddFormPrimitiveAuthFields: FC<\n McpAddFormPrimitiveAuthFields.Props\n> = ({ children }) => {\n const { state, ids } = useAddForm();\n\n if (children) {\n const Render = children;\n return <Render authType={state.authType} />;\n }\n\n if (state.authType === \"bearer\") {\n return (\n <div>\n <label\n htmlFor={ids.bearerToken}\n data-mcp-auth-field-label=\"bearer-token\"\n >\n Bearer token\n </label>\n <McpAddFormPrimitiveBearerTokenField\n id={ids.bearerToken}\n data-mcp-auth-field=\"bearer-token\"\n />\n </div>\n );\n }\n\n if (state.authType === \"oauth\") {\n return (\n <div>\n <label htmlFor={ids.scopes} data-mcp-auth-field-label=\"oauth-scopes\">\n OAuth scopes\n </label>\n <McpAddFormPrimitiveScopesField\n id={ids.scopes}\n data-mcp-auth-field=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AAI;GAAAP,EAAA,KAAAK;EAAA,OAAAA,KAAAL,EAAA;EAAA,OARNK;CAQM;CAET,OAEM;AAAI;AAGbV,8BAA8Ba,cAAc"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
3
|
//#region src/primitives/addForm/McpAddFormAuthSelect.d.ts
|
|
4
|
-
declare namespace McpAddFormPrimitiveAuthSelect {
|
|
4
|
+
export declare namespace McpAddFormPrimitiveAuthSelect {
|
|
5
5
|
type Element = ComponentRef<typeof Primitive.select>;
|
|
6
6
|
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.select>, "value" | "onChange">;
|
|
7
7
|
}
|
|
8
|
-
declare const McpAddFormPrimitiveAuthSelect: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveAuthSelect.Props & import("react").RefAttributes<HTMLSelectElement>>;
|
|
8
|
+
export declare const McpAddFormPrimitiveAuthSelect: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveAuthSelect.Props & import("react").RefAttributes<HTMLSelectElement>>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { McpAddFormPrimitiveAuthSelect };
|
|
11
10
|
//# sourceMappingURL=McpAddFormAuthSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthSelect.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthSelect.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"mappings":";;;yBAoBiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;qBAKjC,+CAA6B,0BAAA,8BAAA,wBAAA,cAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
//#region src/primitives/addForm/McpAddFormBearerTokenField.d.ts
|
|
4
|
+
export declare namespace McpAddFormPrimitiveBearerTokenField {
|
|
5
|
+
type Element = ComponentRef<typeof Primitive.input>;
|
|
6
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.input>, "value" | "onChange" | "type">;
|
|
7
|
+
}
|
|
8
|
+
export declare const McpAddFormPrimitiveBearerTokenField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveBearerTokenField.Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//# sourceMappingURL=McpAddFormBearerTokenField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpAddFormBearerTokenField.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.tsx"],"mappings":";;;yBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;qBAKjC,qDAAmC,0BAAA,oCAAA,wBAAA,cAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useAddForm } from "./context.js";
|
|
2
|
+
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/primitives/addForm/McpAddFormBearerTokenField.tsx
|
|
7
|
+
const McpAddFormPrimitiveBearerTokenField = forwardRef((props, ref) => {
|
|
8
|
+
const $ = c(13);
|
|
9
|
+
const { state, ids, setField } = useAddForm();
|
|
10
|
+
const t0 = props["aria-invalid"] ?? (state.errorField === "bearerToken" ? true : void 0);
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== ids || $[1] !== props || $[2] !== state.errorField) {
|
|
13
|
+
t1 = [props["aria-describedby"], state.errorField === "bearerToken" ? ids.error : null].filter(Boolean).join(" ") || void 0;
|
|
14
|
+
$[0] = ids;
|
|
15
|
+
$[1] = props;
|
|
16
|
+
$[2] = state.errorField;
|
|
17
|
+
$[3] = t1;
|
|
18
|
+
} else t1 = $[3];
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[4] !== setField) {
|
|
21
|
+
t2 = (e) => setField("bearerToken", e.target.value);
|
|
22
|
+
$[4] = setField;
|
|
23
|
+
$[5] = t2;
|
|
24
|
+
} else t2 = $[5];
|
|
25
|
+
let t3;
|
|
26
|
+
if ($[6] !== props || $[7] !== ref || $[8] !== state.bearerToken || $[9] !== t0 || $[10] !== t1 || $[11] !== t2) {
|
|
27
|
+
t3 = /* @__PURE__ */ jsx(Primitive.input, {
|
|
28
|
+
type: "password",
|
|
29
|
+
...props,
|
|
30
|
+
"aria-invalid": t0,
|
|
31
|
+
"aria-describedby": t1,
|
|
32
|
+
ref,
|
|
33
|
+
value: state.bearerToken,
|
|
34
|
+
onChange: t2
|
|
35
|
+
});
|
|
36
|
+
$[6] = props;
|
|
37
|
+
$[7] = ref;
|
|
38
|
+
$[8] = state.bearerToken;
|
|
39
|
+
$[9] = t0;
|
|
40
|
+
$[10] = t1;
|
|
41
|
+
$[11] = t2;
|
|
42
|
+
$[12] = t3;
|
|
43
|
+
} else t3 = $[12];
|
|
44
|
+
return t3;
|
|
45
|
+
});
|
|
46
|
+
McpAddFormPrimitiveBearerTokenField.displayName = "McpAddFormPrimitive.BearerTokenField";
|
|
47
|
+
//#endregion
|
|
48
|
+
export { McpAddFormPrimitiveBearerTokenField };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=McpAddFormBearerTokenField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpAddFormBearerTokenField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveBearerTokenField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","bearerToken","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveBearerTokenField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveBearerTokenField = forwardRef<\n McpAddFormPrimitiveBearerTokenField.Element,\n McpAddFormPrimitiveBearerTokenField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"password\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ??\n (state.errorField === \"bearerToken\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"bearerToken\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.bearerToken}\n onChange={(e) => setField(\"bearerToken\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveBearerTokenField.displayName =\n \"McpAddFormPrimitive.BearerTokenField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,sCAAsCH,YAGjDQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAMtC,MAAAa,KAAAP,MAAM,oBACLI,MAAKI,eAAgB,gBAArB,OAAAC,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGvDE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,gBAAgBH,IAAGM,QAAxC,IAA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