@assistant-ui/react-mcp 0.1.18 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/auth/buildHeaders.d.ts +3 -6
  2. package/dist/auth/buildHeaders.d.ts.map +1 -1
  3. package/dist/auth/createOAuthProvider.d.ts +24 -26
  4. package/dist/auth/createOAuthProvider.d.ts.map +1 -1
  5. package/dist/auth/types.d.ts +13 -16
  6. package/dist/auth/types.d.ts.map +1 -1
  7. package/dist/connector.d.ts +2 -5
  8. package/dist/connector.d.ts.map +1 -1
  9. package/dist/context/McpConnectorByIndexProvider.d.ts +3 -6
  10. package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
  11. package/dist/context/McpConnectorByIndexProvider.js +1 -1
  12. package/dist/context/McpCustomServerByIndexProvider.d.ts +3 -6
  13. package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
  14. package/dist/context/McpCustomServerByIndexProvider.js +1 -1
  15. package/dist/context/McpServerByIdProvider.d.ts +3 -6
  16. package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
  17. package/dist/context/McpServerByIdProvider.js +1 -1
  18. package/dist/hooks/useMcpOAuthCallback.d.ts +14 -17
  19. package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
  20. package/dist/hooks/useMcpOAuthCallback.js +6 -2
  21. package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
  22. package/dist/index.d.ts +19 -18
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +4 -4
  25. package/dist/mcp-scope.d.ts +124 -127
  26. package/dist/mcp-scope.d.ts.map +1 -1
  27. package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +14 -16
  28. package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
  29. package/dist/primitives/addForm/McpAddFormAuthFields.js +18 -71
  30. package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
  31. package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +5 -8
  32. package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
  33. package/dist/primitives/addForm/McpAddFormAuthSelect.js +1 -1
  34. package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts +8 -0
  35. package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts.map +1 -0
  36. package/dist/primitives/addForm/McpAddFormBearerTokenField.js +50 -0
  37. package/dist/primitives/addForm/McpAddFormBearerTokenField.js.map +1 -0
  38. package/dist/primitives/addForm/McpAddFormCancel.d.ts +6 -9
  39. package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
  40. package/dist/primitives/addForm/McpAddFormCancel.js +1 -1
  41. package/dist/primitives/addForm/McpAddFormError.d.ts +6 -9
  42. package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
  43. package/dist/primitives/addForm/McpAddFormError.js +1 -1
  44. package/dist/primitives/addForm/McpAddFormNameField.d.ts +5 -8
  45. package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
  46. package/dist/primitives/addForm/McpAddFormNameField.js +1 -1
  47. package/dist/primitives/addForm/McpAddFormRoot.d.ts +11 -14
  48. package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
  49. package/dist/primitives/addForm/McpAddFormRoot.js +2 -2
  50. package/dist/primitives/addForm/McpAddFormScopesField.d.ts +8 -0
  51. package/dist/primitives/addForm/McpAddFormScopesField.d.ts.map +1 -0
  52. package/dist/primitives/addForm/McpAddFormScopesField.js +38 -0
  53. package/dist/primitives/addForm/McpAddFormScopesField.js.map +1 -0
  54. package/dist/primitives/addForm/McpAddFormSubmit.d.ts +6 -9
  55. package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
  56. package/dist/primitives/addForm/McpAddFormSubmit.js +1 -1
  57. package/dist/primitives/addForm/McpAddFormUrlField.d.ts +5 -8
  58. package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
  59. package/dist/primitives/addForm/McpAddFormUrlField.js +1 -1
  60. package/dist/primitives/addForm/context.d.ts +25 -28
  61. package/dist/primitives/addForm/context.d.ts.map +1 -1
  62. package/dist/primitives/addForm.d.ts +10 -13
  63. package/dist/primitives/addForm.d.ts.map +1 -1
  64. package/dist/primitives/addForm.js +5 -1
  65. package/dist/primitives/addForm.js.map +1 -1
  66. package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts +6 -9
  67. package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts.map +1 -1
  68. package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.js +2 -2
  69. package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts +6 -9
  70. package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts.map +1 -1
  71. package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.js +2 -2
  72. package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts +6 -9
  73. package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts.map +1 -1
  74. package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.js +2 -2
  75. package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts +6 -9
  76. package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts.map +1 -1
  77. package/dist/primitives/elicitation/McpElicitationPrimitiveError.js +1 -1
  78. package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts +8 -10
  79. package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts.map +1 -1
  80. package/dist/primitives/elicitation/McpElicitationPrimitiveFields.js +1 -1
  81. package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts +8 -11
  82. package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts.map +1 -1
  83. package/dist/primitives/elicitation/McpElicitationPrimitiveItems.js +2 -2
  84. package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts +6 -9
  85. package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts.map +1 -1
  86. package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.js +1 -1
  87. package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts +6 -9
  88. package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts.map +1 -1
  89. package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.js +1 -1
  90. package/dist/primitives/elicitation/context.d.ts +15 -18
  91. package/dist/primitives/elicitation/context.d.ts.map +1 -1
  92. package/dist/primitives/elicitation/initialElicitationDraft.d.ts +1 -4
  93. package/dist/primitives/elicitation/initialElicitationDraft.d.ts.map +1 -1
  94. package/dist/primitives/elicitation/prepareElicitationContent.d.ts +4 -7
  95. package/dist/primitives/elicitation/prepareElicitationContent.d.ts.map +1 -1
  96. package/dist/primitives/elicitation/prepareElicitationContent.js +5 -1
  97. package/dist/primitives/elicitation/prepareElicitationContent.js.map +1 -1
  98. package/dist/primitives/elicitation.d.ts +8 -14
  99. package/dist/primitives/elicitation.d.ts.map +1 -1
  100. package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +6 -9
  101. package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
  102. package/dist/primitives/manager/McpManagerAddCustomTrigger.js +1 -1
  103. package/dist/primitives/manager/McpManagerConnectors.d.ts +14 -17
  104. package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
  105. package/dist/primitives/manager/McpManagerConnectors.js +1 -1
  106. package/dist/primitives/manager/McpManagerCustomServers.d.ts +14 -17
  107. package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
  108. package/dist/primitives/manager/McpManagerCustomServers.js +1 -1
  109. package/dist/primitives/manager/McpManagerRoot.d.ts +6 -9
  110. package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
  111. package/dist/primitives/manager/McpManagerRoot.js +2 -2
  112. package/dist/primitives/manager.d.ts +4 -9
  113. package/dist/primitives/manager.d.ts.map +1 -1
  114. package/dist/primitives/server/McpServerConnectButton.d.ts +6 -9
  115. package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
  116. package/dist/primitives/server/McpServerConnectButton.js +2 -2
  117. package/dist/primitives/server/McpServerDisconnectButton.d.ts +6 -9
  118. package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
  119. package/dist/primitives/server/McpServerDisconnectButton.js +2 -2
  120. package/dist/primitives/server/McpServerError.d.ts +6 -9
  121. package/dist/primitives/server/McpServerError.d.ts.map +1 -1
  122. package/dist/primitives/server/McpServerError.js +2 -2
  123. package/dist/primitives/server/McpServerIcon.d.ts +12 -15
  124. package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
  125. package/dist/primitives/server/McpServerIcon.js +2 -2
  126. package/dist/primitives/server/McpServerName.d.ts +6 -9
  127. package/dist/primitives/server/McpServerName.d.ts.map +1 -1
  128. package/dist/primitives/server/McpServerName.js +2 -2
  129. package/dist/primitives/server/McpServerOAuthLink.d.ts +11 -14
  130. package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
  131. package/dist/primitives/server/McpServerOAuthLink.js +2 -2
  132. package/dist/primitives/server/McpServerRemoveButton.d.ts +6 -9
  133. package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
  134. package/dist/primitives/server/McpServerRemoveButton.js +2 -2
  135. package/dist/primitives/server/McpServerRoot.d.ts +6 -9
  136. package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
  137. package/dist/primitives/server/McpServerRoot.js +2 -2
  138. package/dist/primitives/server/McpServerStatus.d.ts +6 -9
  139. package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
  140. package/dist/primitives/server/McpServerStatus.js +2 -2
  141. package/dist/primitives/server/McpServerToolName.d.ts +6 -9
  142. package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
  143. package/dist/primitives/server/McpServerToolName.js +1 -1
  144. package/dist/primitives/server/McpServerTools.d.ts +8 -11
  145. package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
  146. package/dist/primitives/server/McpServerTools.js +2 -2
  147. package/dist/primitives/server.d.ts +11 -16
  148. package/dist/primitives/server.d.ts.map +1 -1
  149. package/dist/resources/McpManagerResource.d.ts +13 -16
  150. package/dist/resources/McpManagerResource.d.ts.map +1 -1
  151. package/dist/resources/McpManagerResource.js +95 -64
  152. package/dist/resources/McpManagerResource.js.map +1 -1
  153. package/dist/resources/McpServerRemovalFence.d.ts +3 -6
  154. package/dist/resources/McpServerRemovalFence.d.ts.map +1 -1
  155. package/dist/resources/McpServerResource.d.ts +21 -24
  156. package/dist/resources/McpServerResource.d.ts.map +1 -1
  157. package/dist/resources/McpServerResource.js +55 -47
  158. package/dist/resources/McpServerResource.js.map +1 -1
  159. package/dist/resources/storage/McpCustomStorage.d.ts +2 -5
  160. package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
  161. package/dist/resources/storage/McpLocalStorage.d.ts +18 -21
  162. package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
  163. package/dist/resources/storage/McpLocalStorage.js +1 -1
  164. package/dist/resources/storage/McpMemoryStorage.d.ts +2 -5
  165. package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
  166. package/dist/resources/storage/types.d.ts +24 -27
  167. package/dist/resources/storage/types.d.ts.map +1 -1
  168. package/dist/resources/validateElicitationContent.d.ts +4 -6
  169. package/dist/resources/validateElicitationContent.d.ts.map +1 -1
  170. package/dist/utils/createMcpId.d.ts +1 -4
  171. package/dist/utils/createMcpId.d.ts.map +1 -1
  172. package/dist/utils/invokeMcpCallback.d.ts +1 -4
  173. package/dist/utils/invokeMcpCallback.d.ts.map +1 -1
  174. package/dist/utils/serverId.d.ts +2 -5
  175. package/dist/utils/serverId.d.ts.map +1 -1
  176. package/dist/utils/serverUrl.d.ts +4 -7
  177. package/dist/utils/serverUrl.d.ts.map +1 -1
  178. package/package.json +11 -10
  179. package/src/hooks/useMcpOAuthCallback.test.ts +53 -0
  180. package/src/hooks/useMcpOAuthCallback.tsx +12 -0
  181. package/src/index.ts +2 -1
  182. package/src/primitives/addForm/McpAddFormAccessibility.test.tsx +49 -0
  183. package/src/primitives/addForm/McpAddFormAuthFields.tsx +7 -15
  184. package/src/primitives/addForm/McpAddFormBearerTokenField.tsx +46 -0
  185. package/src/primitives/addForm/McpAddFormRoot.test.tsx +65 -0
  186. package/src/primitives/addForm/McpAddFormScopesField.tsx +34 -0
  187. package/src/primitives/addForm.ts +2 -0
  188. package/src/primitives/elicitation/prepareElicitationContent.ts +8 -6
  189. package/src/resources/McpManagerResource.test.ts +85 -0
  190. package/src/resources/McpManagerResource.ts +56 -23
  191. package/src/resources/McpServerResource.test.ts +121 -6
  192. package/src/resources/McpServerResource.ts +28 -12
@@ -1,150 +1,147 @@
1
1
  import "@assistant-ui/store";
2
- //#region src/mcp-scope.d.ts
3
- type MCPAuthConfig = {
4
- type: "none";
2
+ export type MCPAuthConfig = {
3
+ type: "none";
5
4
  } | {
6
- type: "bearer";
7
- token?: string | undefined;
5
+ type: "bearer";
6
+ token?: string | undefined;
8
7
  } | {
9
- type: "oauth";
10
- scopes?: string[] | undefined;
11
- authorizationEndpoint?: string | undefined;
12
- tokenEndpoint?: string | undefined;
13
- registrationEndpoint?: string | undefined;
14
- clientId?: string | undefined;
15
- clientSecret?: string | undefined;
8
+ type: "oauth";
9
+ scopes?: string[] | undefined;
10
+ authorizationEndpoint?: string | undefined;
11
+ tokenEndpoint?: string | undefined;
12
+ registrationEndpoint?: string | undefined;
13
+ clientId?: string | undefined;
14
+ clientSecret?: string | undefined;
16
15
  };
17
- type MCPResponseCacheConfig = {
18
- readonly defaultTtlMs?: number;
16
+ export type MCPResponseCacheConfig = {
17
+ readonly defaultTtlMs?: number;
19
18
  };
20
- type MCPConnector = {
21
- id: string;
22
- name: string;
23
- url: string;
24
- icon?: string | undefined;
25
- auth: MCPAuthConfig;
26
- connectionTimeout?: number | undefined;
27
- readonly cache?: MCPResponseCacheConfig | undefined;
28
- readonly elicitation?: boolean | undefined;
19
+ export type MCPConnector = {
20
+ id: string;
21
+ name: string;
22
+ url: string;
23
+ icon?: string | undefined;
24
+ auth: MCPAuthConfig;
25
+ connectionTimeout?: number | undefined;
26
+ readonly cache?: MCPResponseCacheConfig | undefined;
27
+ readonly elicitation?: boolean | undefined;
29
28
  };
30
- type MCPCustomServerRecord = {
31
- id: string;
32
- name: string;
33
- url: string;
34
- auth: MCPAuthConfig;
35
- connectionTimeout?: number | undefined;
36
- readonly cache?: MCPResponseCacheConfig | undefined;
37
- readonly elicitation?: boolean | undefined;
38
- createdAt: number;
29
+ export type MCPCustomServerRecord = {
30
+ id: string;
31
+ name: string;
32
+ url: string;
33
+ auth: MCPAuthConfig;
34
+ connectionTimeout?: number | undefined;
35
+ readonly cache?: MCPResponseCacheConfig | undefined;
36
+ readonly elicitation?: boolean | undefined;
37
+ createdAt: number;
39
38
  };
40
- type MCPServerKind = "connector" | "custom";
41
- type MCPConnectionState = "disconnected" | "authRequired" | "authPending" | "connecting" | "connected" | "error";
42
- type MCPToolInfo = {
43
- name: string;
44
- description?: string | undefined;
45
- inputSchema: unknown;
39
+ export type MCPServerKind = "connector" | "custom";
40
+ export type MCPConnectionState = "disconnected" | "authRequired" | "authPending" | "connecting" | "connected" | "error";
41
+ export type MCPToolInfo = {
42
+ name: string;
43
+ description?: string | undefined;
44
+ inputSchema: unknown;
46
45
  };
47
- type MCPElicitation = {
48
- readonly id: string;
49
- readonly message: string;
50
- readonly requestedSchema: unknown;
51
- readonly error?: {
46
+ export type MCPElicitation = {
47
+ readonly id: string;
52
48
  readonly message: string;
53
- readonly properties?: readonly string[] | undefined;
54
- } | undefined;
49
+ readonly requestedSchema: unknown;
50
+ readonly error?: {
51
+ readonly message: string;
52
+ readonly properties?: readonly string[] | undefined;
53
+ } | undefined;
55
54
  };
56
- type MCPElicitationResponse = {
57
- action: "accept";
58
- content: Record<string, unknown>;
55
+ export type MCPElicitationResponse = {
56
+ action: "accept";
57
+ content: Record<string, unknown>;
59
58
  } | {
60
- action: "decline";
59
+ action: "decline";
61
60
  } | {
62
- action: "cancel";
61
+ action: "cancel";
63
62
  };
64
- type MCPServerState = {
65
- id: string;
66
- kind: MCPServerKind;
67
- name: string;
68
- url: string;
69
- icon?: string | undefined;
70
- connectionState: MCPConnectionState;
71
- lastError: {
72
- message: string;
73
- } | null;
74
- tools: MCPToolInfo[];
75
- authorizationUrl: string | null;
76
- readonly pendingElicitations: readonly MCPElicitation[];
63
+ export type MCPServerState = {
64
+ id: string;
65
+ kind: MCPServerKind;
66
+ name: string;
67
+ url: string;
68
+ icon?: string | undefined;
69
+ connectionState: MCPConnectionState;
70
+ lastError: {
71
+ message: string;
72
+ } | null;
73
+ tools: MCPToolInfo[];
74
+ authorizationUrl: string | null;
75
+ readonly pendingElicitations: readonly MCPElicitation[];
77
76
  };
78
- type MCPManagerState = {
79
- servers: MCPServerState[];
80
- connectors: MCPServerState[];
81
- customServers: MCPServerState[];
82
- isHydrated: boolean;
77
+ export type MCPManagerState = {
78
+ servers: MCPServerState[];
79
+ connectors: MCPServerState[];
80
+ customServers: MCPServerState[];
81
+ isHydrated: boolean;
83
82
  };
84
- type MCPServerMethods = {
85
- getState: () => MCPServerState;
86
- connect: () => Promise<void>;
87
- disconnect: () => Promise<void>;
88
- remove: () => Promise<void>;
89
- callTool: (name: string, args: unknown) => Promise<unknown>;
90
- /** List resources exposed by the server. Returns the raw MCP `ListResourcesResult`. */
91
- listResources: (params?: {
92
- cursor?: string | undefined;
93
- }) => Promise<unknown>;
94
- /** Read a resource by URI. Returns the raw MCP `ReadResourceResult`. */
95
- readResource: (uri: string) => Promise<unknown>;
96
- /** OAuth only: pass full callback URL (e.g. window.location.href) */
97
- completeAuth: (callbackUrl: string) => Promise<void>;
98
- answerElicitation(id: string, response: MCPElicitationResponse): readonly {
99
- property: string;
100
- message: string;
101
- }[] | undefined;
83
+ export type MCPServerMethods = {
84
+ getState: () => MCPServerState;
85
+ connect: () => Promise<void>;
86
+ disconnect: () => Promise<void>;
87
+ remove: () => Promise<void>;
88
+ callTool: (name: string, args: unknown) => Promise<unknown>;
89
+ /** List resources exposed by the server. Returns the raw MCP `ListResourcesResult`. */
90
+ listResources: (params?: {
91
+ cursor?: string | undefined;
92
+ }) => Promise<unknown>;
93
+ /** Read a resource by URI. Returns the raw MCP `ReadResourceResult`. */
94
+ readResource: (uri: string) => Promise<unknown>;
95
+ /** OAuth only: pass full callback URL (e.g. window.location.href) */
96
+ completeAuth: (callbackUrl: string) => Promise<void>;
97
+ answerElicitation(id: string, response: MCPElicitationResponse): readonly {
98
+ property: string;
99
+ message: string;
100
+ }[] | undefined;
102
101
  };
103
- type MCPServerQuery = {
104
- id: string;
105
- } | {
106
- kind: "connector";
107
- index: number;
102
+ export type MCPServerQuery = {
103
+ id: string;
108
104
  } | {
109
- kind: "custom";
110
- index: number;
111
- };
112
- type MCPManagerMethods = {
113
- getState: () => MCPManagerState;
114
- /** Look up a server by id, or by index within its kind. */
115
- server: (query: MCPServerQuery) => MCPServerMethods;
116
- /** Convenience: equivalent to `server({ kind: "connector", index })`. */
117
- connector: (query: {
105
+ kind: "connector";
118
106
  index: number;
119
- }) => MCPServerMethods;
120
- /** Convenience: equivalent to `server({ kind: "custom", index })`. */
121
- customServer: (query: {
107
+ } | {
108
+ kind: "custom";
122
109
  index: number;
123
- }) => MCPServerMethods;
124
- addCustomServer: (input: {
125
- name: string;
126
- url: string;
127
- auth: MCPAuthConfig;
128
- connectionTimeout?: number | undefined;
129
- readonly cache?: MCPResponseCacheConfig | undefined;
130
- readonly elicitation?: boolean | undefined;
131
- }) => Promise<string>;
132
- removeServer: (id: string) => Promise<void>;
110
+ };
111
+ export type MCPManagerMethods = {
112
+ getState: () => MCPManagerState;
113
+ /** Look up a server by id, or by index within its kind. */
114
+ server: (query: MCPServerQuery) => MCPServerMethods;
115
+ /** Convenience: equivalent to `server({ kind: "connector", index })`. */
116
+ connector: (query: {
117
+ index: number;
118
+ }) => MCPServerMethods;
119
+ /** Convenience: equivalent to `server({ kind: "custom", index })`. */
120
+ customServer: (query: {
121
+ index: number;
122
+ }) => MCPServerMethods;
123
+ addCustomServer: (input: {
124
+ name: string;
125
+ url: string;
126
+ auth: MCPAuthConfig;
127
+ connectionTimeout?: number | undefined;
128
+ readonly cache?: MCPResponseCacheConfig | undefined;
129
+ readonly elicitation?: boolean | undefined;
130
+ }) => Promise<string>;
131
+ removeServer: (id: string) => Promise<void>;
133
132
  };
134
133
  declare module "@assistant-ui/store" {
135
- interface ScopeRegistry {
136
- mcp: {
137
- methods: MCPManagerMethods;
138
- };
139
- mcpServer: {
140
- methods: MCPServerMethods;
141
- meta: {
142
- source: "mcp";
143
- query: MCPServerQuery;
144
- };
145
- };
146
- }
134
+ interface ScopeRegistry {
135
+ mcp: {
136
+ methods: MCPManagerMethods;
137
+ };
138
+ mcpServer: {
139
+ methods: MCPServerMethods;
140
+ meta: {
141
+ source: "mcp";
142
+ query: MCPServerQuery;
143
+ };
144
+ };
145
+ }
147
146
  }
148
- //#endregion
149
- export { MCPAuthConfig, MCPConnectionState, MCPConnector, MCPCustomServerRecord, MCPElicitation, MCPElicitationResponse, MCPManagerMethods, MCPManagerState, MCPResponseCacheConfig, MCPServerKind, MCPServerMethods, MCPServerQuery, MCPServerState, MCPToolInfo };
150
147
  //# sourceMappingURL=mcp-scope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-scope.d.ts","names":[],"sources":["../src/mcp-scope.ts"],"mappings":";;KAEY;EACN;;EACA;EAAgB;;EAEhB;EACA;EACA;EACA;EACA;EACA;EACA;;KAGM;WACD;;KAGC;EACV;EACA;EACA;EACA;EACA,MAAM;EACN;WACS,QAAQ;WACR;;KAGC;EACV;EACA;EACA;EACA,MAAM;EACN;WACS,QAAQ;WACR;EACT;;KAGU;KAEA;KAQA;EACV;EACA;EACA;;KAGU;WACD;WACA;WACA;WACA;aAEM;aACA;;;KAKL;EACN;EAAkB,SAAS;;EAC3B;;EACA;;KAEM;EACV;EACA,MAAM;EACN;EACA;EACA;EACA,iBAAiB;EACjB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K,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,gBAAgB,CAAC;IAC7D,eAAe,EAAE,CAAC,KAAK,EAAE;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,aAAa,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;QACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAC5C,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,aAAa;QACrB,GAAG,EAAE;YACH,OAAO,EAAE,iBAAiB,CAAC;SAC5B,CAAC;QACF,SAAS,EAAE;YACT,OAAO,EAAE,gBAAgB,CAAC;YAC1B,IAAI,EAAE;gBAAE,MAAM,EAAE,KAAK,CAAC;gBAAC,KAAK,EAAE,cAAc,CAAA;aAAE,CAAC;SAChD,CAAC;KACH;CACF"}
@@ -1,18 +1,16 @@
1
- import { AddFormAuthType } from "./context.js";
2
- import { FC } from "react";
3
- //#region src/primitives/addForm/McpAddFormAuthFields.d.ts
4
- declare namespace McpAddFormPrimitiveAuthFields {
5
- type Props = {
6
- /**
7
- * Optional render override. Receives the current auth type so apps can render
8
- * fully custom inputs. Defaults to a minimal built-in for bearer / oauth.
9
- */
10
- children?: FC<{
11
- authType: AddFormAuthType;
12
- }>;
13
- };
1
+ import type { FC } from "react";
2
+ import { type AddFormAuthType } from "./context.js";
3
+ export declare namespace McpAddFormPrimitiveAuthFields {
4
+ type Props = {
5
+ /**
6
+ * Optional render override. Receives the current auth type so apps can render
7
+ * fully custom inputs, bound to the form through `BearerTokenField` and
8
+ * `ScopesField`. Defaults to a minimal built-in for bearer / oauth.
9
+ */
10
+ children?: FC<{
11
+ authType: AddFormAuthType;
12
+ }>;
13
+ };
14
14
  }
15
- declare const McpAddFormPrimitiveAuthFields: FC<McpAddFormPrimitiveAuthFields.Props>;
16
- //#endregion
17
- export { McpAddFormPrimitiveAuthFields };
15
+ export declare const McpAddFormPrimitiveAuthFields: FC<McpAddFormPrimitiveAuthFields.Props>;
18
16
  //# sourceMappingURL=McpAddFormAuthFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormAuthFields.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"mappings":";;;kBAGiB;OACH;;;;;IAKV,WAAW;MAAK,UAAU;;;;cAIjB,+BAA+B,GAC1C,8BAA8B"}
1
+ {"version":3,"file":"McpAddFormAuthFields.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,KAAK,eAAe,EAAc,qBAAkB;AAE7D,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,KAAK,GAAG;QAClB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,EAAE,CAAC;YAAE,QAAQ,EAAE,eAAe,CAAA;SAAE,CAAC,CAAC;KAC9C,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAC5C,6BAA6B,CAAC,KAAK,CAyCpC,CAAC"}
@@ -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(27);
8
+ const $ = c(7);
7
9
  const { children } = t0;
8
- const { state, ids, setField } = useAddForm();
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
- let t2;
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 ($[16] !== ids.scopes) {
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
- $[20] = ids.scopes;
94
- $[21] = state.scopes;
95
- $[22] = t2;
96
- $[23] = t3;
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","setField","Render","t1","bearerToken","t2","e","target","value","t3","errorField","undefined","t4","error","t5","t6","scopes","e_0","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"sourcesContent":["import type { FC } from \"react\";\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. 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, setField } = 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 <input\n id={ids.bearerToken}\n type=\"password\"\n value={state.bearerToken}\n onChange={(e) => setField(\"bearerToken\", e.target.value)}\n aria-invalid={state.errorField === \"bearerToken\" ? true : undefined}\n aria-describedby={\n state.errorField === \"bearerToken\" ? ids.error : undefined\n }\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 <input\n id={ids.scopes}\n type=\"text\"\n placeholder=\"Scopes (space-separated, optional)\"\n value={state.scopes}\n onChange={(e) => setField(\"scopes\", e.target.value)}\n data-mcp-auth-field=\"oauth-scopes\"\n />\n </div>\n );\n }\n\n return null;\n};\n\nMcpAddFormPrimitiveAuthFields.displayName = \"McpAddFormPrimitive.AuthFields\";\n"],"mappings":";;;;AAaA,MAAaG,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAJ,aAAAE;CACH,MAAA,EAAAG,O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AA,OAAA,EAAA,UAAA,CACET,IAGAM,EAQI,EAAA,CAAA;GAAAZ,EAAA,MAAAM;GAAAN,EAAA,MAAAY;GAAAZ,EAAA,MAAAe;EAAA,OAAAA,KAAAf,EAAA;EAAA,OAZNe;CAYM;CAET,OAEM;AAAI;AAGbpB,8BAA8B0B,cAAc"}
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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AA,KAAAG,IAAAI;GAAAP,EAAA,KAAAK;EAAA,OAAAA,KAAAL,EAAA;EAAA,OARNK;CAQM;CAET,OAEM;AAAI;AAGbV,8BAA8Ba,cAAc"}
@@ -1,11 +1,8 @@
1
- import { ComponentPropsWithoutRef, ComponentRef } from "react";
1
+ import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
- //#region src/primitives/addForm/McpAddFormAuthSelect.d.ts
4
- declare namespace McpAddFormPrimitiveAuthSelect {
5
- type Element = ComponentRef<typeof Primitive.select>;
6
- type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.select>, "value" | "onChange">;
3
+ export declare namespace McpAddFormPrimitiveAuthSelect {
4
+ type Element = ComponentRef<typeof Primitive.select>;
5
+ type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.select>, "value" | "onChange">;
7
6
  }
8
- declare const McpAddFormPrimitiveAuthSelect: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveAuthSelect.Props & import("react").RefAttributes<HTMLSelectElement>>;
9
- //#endregion
10
- export { McpAddFormPrimitiveAuthSelect };
7
+ export declare const McpAddFormPrimitiveAuthSelect: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveAuthSelect.Props & import("react").RefAttributes<HTMLSelectElement>>;
11
8
  //# sourceMappingURL=McpAddFormAuthSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormAuthSelect.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"mappings":";;;kBAoBiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;cAKjC,+CAA6B,0BAAA,8BAAA,wBAAA,cAAA"}
1
+ {"version":3,"file":"McpAddFormAuthSelect.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAetD,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,EACjD,OAAO,GAAG,UAAU,CACrB,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,mIAwBxC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { useAddForm } from "./context.js";
2
2
  import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
4
  import { forwardRef } from "@assistant-ui/tap/react-shim";
4
5
  import { Primitive } from "@radix-ui/react-primitive";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/primitives/addForm/McpAddFormAuthSelect.tsx
7
7
  const AUTH_TYPES = /* @__PURE__ */ new Set([
8
8
  "none",
@@ -0,0 +1,8 @@
1
+ import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
2
+ import { Primitive } from "@radix-ui/react-primitive";
3
+ export declare namespace McpAddFormPrimitiveBearerTokenField {
4
+ type Element = ComponentRef<typeof Primitive.input>;
5
+ type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.input>, "value" | "onChange" | "type">;
6
+ }
7
+ export declare const McpAddFormPrimitiveBearerTokenField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveBearerTokenField.Props & import("react").RefAttributes<HTMLInputElement>>;
8
+ //# sourceMappingURL=McpAddFormBearerTokenField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McpAddFormBearerTokenField.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.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,mCAAmC,CAAC;IACnD,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EAChD,OAAO,GAAG,UAAU,GAAG,MAAM,CAC9B,CAAC;CACH;AAED,eAAO,MAAM,mCAAmC,wIA0B9C,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { useAddForm } from "./context.js";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { forwardRef } from "@assistant-ui/tap/react-shim";
5
+ import { Primitive } from "@radix-ui/react-primitive";
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,IAAqD,CACtD,CAAAC,OACSC,OAAO,CAAC,CAAAC,KACV,GAAgB,KALxBL,KAAAA;EAKyBP,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAE,MAAAI;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAI,UAAA;EAIjBS,MAAAC,MAAOV,SAAS,eAAeU,EAACC,OAAOC,KAAM;EAAChB,EAAA,KAAAI;EAAAJ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAgB,eAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAjB1DI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GAAU,GACXnB;GAEF,gBAAAO;GAIA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAA8C,CAAA;EACxDb,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAgB;EAAAlB,EAAA,KAAAK;EAAAL,EAAA,MAAAQ;EAAAR,EAAA,MAAAa;EAAAb,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAlBFiB;AAkBE,CAEL;AAEDxB,oCAAoC0B,cAClC"}
@@ -1,13 +1,10 @@
1
- import { ComponentPropsWithoutRef, ComponentRef } from "react";
1
+ import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
- //#region src/primitives/addForm/McpAddFormCancel.d.ts
4
- declare namespace McpAddFormPrimitiveCancel {
5
- type Element = ComponentRef<typeof Primitive.button>;
6
- type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
3
+ export declare namespace McpAddFormPrimitiveCancel {
4
+ type Element = ComponentRef<typeof Primitive.button>;
5
+ type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
7
6
  }
8
- declare const McpAddFormPrimitiveCancel: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
9
- asChild?: boolean;
7
+ export declare const McpAddFormPrimitiveCancel: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
8
+ asChild?: boolean;
10
9
  }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
- //#endregion
12
- export { McpAddFormPrimitiveCancel };
13
10
  //# sourceMappingURL=McpAddFormCancel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormCancel.d.ts","names":[],"sources":["../../../src/primitives/addForm/McpAddFormCancel.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,2CAAyB,0BAAA,qBAAA,gBAAA,qCAAA,qBAAA;;4BAiBpC,cAAA"}
1
+ {"version":3,"file":"McpAddFormCancel.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormCancel.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,yBAAyB,CAAC;IACzC,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,yBAAyB;;6DAiBpC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { useAddForm } from "./context.js";
2
2
  import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
3
4
  import { forwardRef } from "@assistant-ui/tap/react-shim";
4
5
  import { Primitive } from "@radix-ui/react-primitive";
5
- import { jsx } from "react/jsx-runtime";
6
6
  //#region src/primitives/addForm/McpAddFormCancel.tsx
7
7
  const McpAddFormPrimitiveCancel = forwardRef((props, ref) => {
8
8
  const $ = c(7);