@atxp/client 0.2.22 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/ajv.js +8 -0
  4. package/dist/_virtual/ajv.js.map +1 -0
  5. package/dist/_virtual/cache.js +4 -0
  6. package/dist/_virtual/cache.js.map +1 -0
  7. package/dist/_virtual/index.js +4 -0
  8. package/dist/_virtual/index.js.map +1 -0
  9. package/dist/_virtual/uri.all.js +4 -0
  10. package/dist/_virtual/uri.all.js.map +1 -0
  11. package/dist/atxpAccount.js +4 -2
  12. package/dist/atxpAccount.js.map +1 -1
  13. package/dist/atxpClient.js +12 -10
  14. package/dist/atxpClient.js.map +1 -1
  15. package/dist/atxpFetcher.js +10 -8
  16. package/dist/atxpFetcher.js.map +1 -1
  17. package/dist/baseAccount.js +5 -3
  18. package/dist/baseAccount.js.map +1 -1
  19. package/dist/baseConstants.js +4 -0
  20. package/dist/baseConstants.js.map +1 -0
  21. package/dist/basePaymentMaker.js +15 -12
  22. package/dist/basePaymentMaker.js.map +1 -1
  23. package/dist/index.cjs +16198 -0
  24. package/dist/index.cjs.map +1 -0
  25. package/dist/index.d.ts +250 -10
  26. package/dist/index.js +16161 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +668 -0
  29. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js.map +1 -0
  30. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +273 -0
  31. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -0
  32. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +378 -0
  33. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -0
  34. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js +162 -0
  35. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js.map +1 -0
  36. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js +46 -0
  37. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js.map +1 -0
  38. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js +192 -0
  39. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js.map +1 -0
  40. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +418 -0
  41. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  42. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1313 -0
  43. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  44. package/dist/node_modules/ajv/lib/ajv.js +531 -0
  45. package/dist/node_modules/ajv/lib/ajv.js.map +1 -0
  46. package/dist/node_modules/ajv/lib/cache.js +37 -0
  47. package/dist/node_modules/ajv/lib/cache.js.map +1 -0
  48. package/dist/node_modules/ajv/lib/compile/async.js +102 -0
  49. package/dist/node_modules/ajv/lib/compile/async.js.map +1 -0
  50. package/dist/node_modules/ajv/lib/compile/error_classes.js +46 -0
  51. package/dist/node_modules/ajv/lib/compile/error_classes.js.map +1 -0
  52. package/dist/node_modules/ajv/lib/compile/formats.js +154 -0
  53. package/dist/node_modules/ajv/lib/compile/formats.js.map +1 -0
  54. package/dist/node_modules/ajv/lib/compile/index.js +404 -0
  55. package/dist/node_modules/ajv/lib/compile/index.js.map +1 -0
  56. package/dist/node_modules/ajv/lib/compile/resolve.js +286 -0
  57. package/dist/node_modules/ajv/lib/compile/resolve.js.map +1 -0
  58. package/dist/node_modules/ajv/lib/compile/rules.js +79 -0
  59. package/dist/node_modules/ajv/lib/compile/rules.js.map +1 -0
  60. package/dist/node_modules/ajv/lib/compile/schema_obj.js +21 -0
  61. package/dist/node_modules/ajv/lib/compile/schema_obj.js.map +1 -0
  62. package/dist/node_modules/ajv/lib/compile/ucs2length.js +30 -0
  63. package/dist/node_modules/ajv/lib/compile/ucs2length.js.map +1 -0
  64. package/dist/node_modules/ajv/lib/compile/util.js +252 -0
  65. package/dist/node_modules/ajv/lib/compile/util.js.map +1 -0
  66. package/dist/node_modules/ajv/lib/data.js +59 -0
  67. package/dist/node_modules/ajv/lib/data.js.map +1 -0
  68. package/dist/node_modules/ajv/lib/definition_schema.js +49 -0
  69. package/dist/node_modules/ajv/lib/definition_schema.js.map +1 -0
  70. package/dist/node_modules/ajv/lib/dotjs/_limit.js +173 -0
  71. package/dist/node_modules/ajv/lib/dotjs/_limit.js.map +1 -0
  72. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js +90 -0
  73. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js.map +1 -0
  74. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js +95 -0
  75. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js.map +1 -0
  76. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js +90 -0
  77. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js.map +1 -0
  78. package/dist/node_modules/ajv/lib/dotjs/allOf.js +52 -0
  79. package/dist/node_modules/ajv/lib/dotjs/allOf.js.map +1 -0
  80. package/dist/node_modules/ajv/lib/dotjs/anyOf.js +83 -0
  81. package/dist/node_modules/ajv/lib/dotjs/anyOf.js.map +1 -0
  82. package/dist/node_modules/ajv/lib/dotjs/comment.js +24 -0
  83. package/dist/node_modules/ajv/lib/dotjs/comment.js.map +1 -0
  84. package/dist/node_modules/ajv/lib/dotjs/const.js +62 -0
  85. package/dist/node_modules/ajv/lib/dotjs/const.js.map +1 -0
  86. package/dist/node_modules/ajv/lib/dotjs/contains.js +91 -0
  87. package/dist/node_modules/ajv/lib/dotjs/contains.js.map +1 -0
  88. package/dist/node_modules/ajv/lib/dotjs/custom.js +238 -0
  89. package/dist/node_modules/ajv/lib/dotjs/custom.js.map +1 -0
  90. package/dist/node_modules/ajv/lib/dotjs/dependencies.js +178 -0
  91. package/dist/node_modules/ajv/lib/dotjs/dependencies.js.map +1 -0
  92. package/dist/node_modules/ajv/lib/dotjs/enum.js +72 -0
  93. package/dist/node_modules/ajv/lib/dotjs/enum.js.map +1 -0
  94. package/dist/node_modules/ajv/lib/dotjs/format.js +160 -0
  95. package/dist/node_modules/ajv/lib/dotjs/format.js.map +1 -0
  96. package/dist/node_modules/ajv/lib/dotjs/if.js +113 -0
  97. package/dist/node_modules/ajv/lib/dotjs/if.js.map +1 -0
  98. package/dist/node_modules/ajv/lib/dotjs/index.js +68 -0
  99. package/dist/node_modules/ajv/lib/dotjs/index.js.map +1 -0
  100. package/dist/node_modules/ajv/lib/dotjs/items.js +150 -0
  101. package/dist/node_modules/ajv/lib/dotjs/items.js.map +1 -0
  102. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js +90 -0
  103. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js.map +1 -0
  104. package/dist/node_modules/ajv/lib/dotjs/not.js +94 -0
  105. package/dist/node_modules/ajv/lib/dotjs/not.js.map +1 -0
  106. package/dist/node_modules/ajv/lib/dotjs/oneOf.js +83 -0
  107. package/dist/node_modules/ajv/lib/dotjs/oneOf.js.map +1 -0
  108. package/dist/node_modules/ajv/lib/dotjs/pattern.js +85 -0
  109. package/dist/node_modules/ajv/lib/dotjs/pattern.js.map +1 -0
  110. package/dist/node_modules/ajv/lib/dotjs/properties.js +345 -0
  111. package/dist/node_modules/ajv/lib/dotjs/properties.js.map +1 -0
  112. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js +91 -0
  113. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js.map +1 -0
  114. package/dist/node_modules/ajv/lib/dotjs/ref.js +134 -0
  115. package/dist/node_modules/ajv/lib/dotjs/ref.js.map +1 -0
  116. package/dist/node_modules/ajv/lib/dotjs/required.js +276 -0
  117. package/dist/node_modules/ajv/lib/dotjs/required.js.map +1 -0
  118. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js +96 -0
  119. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js.map +1 -0
  120. package/dist/node_modules/ajv/lib/dotjs/validate.js +492 -0
  121. package/dist/node_modules/ajv/lib/dotjs/validate.js.map +1 -0
  122. package/dist/node_modules/ajv/lib/keyword.js +159 -0
  123. package/dist/node_modules/ajv/lib/keyword.js.map +1 -0
  124. package/dist/node_modules/ajv/lib/refs/data.json.js +33 -0
  125. package/dist/node_modules/ajv/lib/refs/data.json.js.map +1 -0
  126. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +254 -0
  127. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +1 -0
  128. package/dist/node_modules/eventsource-parser/dist/index.js +104 -0
  129. package/dist/node_modules/eventsource-parser/dist/index.js.map +1 -0
  130. package/dist/node_modules/eventsource-parser/dist/stream.js +28 -0
  131. package/dist/node_modules/eventsource-parser/dist/stream.js.map +1 -0
  132. package/dist/node_modules/fast-deep-equal/index.js +56 -0
  133. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  134. package/dist/node_modules/fast-json-stable-stringify/index.js +69 -0
  135. package/dist/node_modules/fast-json-stable-stringify/index.js.map +1 -0
  136. package/dist/node_modules/json-schema-traverse/index.js +100 -0
  137. package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
  138. package/dist/node_modules/pkce-challenge/dist/index.browser.js +66 -0
  139. package/dist/node_modules/pkce-challenge/dist/index.browser.js.map +1 -0
  140. package/dist/node_modules/uri-js/dist/es5/uri.all.js +1418 -0
  141. package/dist/node_modules/uri-js/dist/es5/uri.all.js.map +1 -0
  142. package/dist/node_modules/zod/v3/ZodError.js +133 -0
  143. package/dist/node_modules/zod/v3/ZodError.js.map +1 -0
  144. package/dist/node_modules/zod/v3/errors.js +9 -0
  145. package/dist/node_modules/zod/v3/errors.js.map +1 -0
  146. package/dist/node_modules/zod/v3/helpers/errorUtil.js +9 -0
  147. package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  148. package/dist/node_modules/zod/v3/helpers/parseUtil.js +112 -0
  149. package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  150. package/dist/node_modules/zod/v3/helpers/util.js +136 -0
  151. package/dist/node_modules/zod/v3/helpers/util.js.map +1 -0
  152. package/dist/node_modules/zod/v3/locales/en.js +112 -0
  153. package/dist/node_modules/zod/v3/locales/en.js.map +1 -0
  154. package/dist/node_modules/zod/v3/types.js +3491 -0
  155. package/dist/node_modules/zod/v3/types.js.map +1 -0
  156. package/dist/oAuth.js +7 -6
  157. package/dist/oAuth.js.map +1 -1
  158. package/dist/solanaAccount.js +7 -4
  159. package/dist/solanaAccount.js.map +1 -1
  160. package/dist/solanaPaymentMaker.js +13 -11
  161. package/dist/solanaPaymentMaker.js.map +1 -1
  162. package/dist/types.js +5 -3
  163. package/dist/types.js.map +1 -1
  164. package/package.json +26 -10
  165. package/dist/atxpAccount.d.ts +0 -13
  166. package/dist/atxpAccount.d.ts.map +0 -1
  167. package/dist/atxpClient.d.ts +0 -14
  168. package/dist/atxpClient.d.ts.map +0 -1
  169. package/dist/atxpFetcher.d.ts +0 -72
  170. package/dist/atxpFetcher.d.ts.map +0 -1
  171. package/dist/baseAccount.d.ts +0 -10
  172. package/dist/baseAccount.d.ts.map +0 -1
  173. package/dist/basePaymentMaker.d.ts +0 -16
  174. package/dist/basePaymentMaker.d.ts.map +0 -1
  175. package/dist/clientTestHelpers.d.ts +0 -6
  176. package/dist/clientTestHelpers.d.ts.map +0 -1
  177. package/dist/clientTestHelpers.js +0 -94
  178. package/dist/clientTestHelpers.js.map +0 -1
  179. package/dist/index.d.ts.map +0 -1
  180. package/dist/oAuth.d.ts +0 -44
  181. package/dist/oAuth.d.ts.map +0 -1
  182. package/dist/setup.expo.d.ts +0 -2
  183. package/dist/setup.expo.d.ts.map +0 -1
  184. package/dist/setup.expo.js +0 -30
  185. package/dist/setup.expo.js.map +0 -1
  186. package/dist/solanaAccount.d.ts +0 -9
  187. package/dist/solanaAccount.d.ts.map +0 -1
  188. package/dist/solanaPaymentMaker.d.ts +0 -18
  189. package/dist/solanaPaymentMaker.d.ts.map +0 -1
  190. package/dist/types.d.ts +0 -70
  191. package/dist/types.d.ts.map +0 -1
@@ -0,0 +1,378 @@
1
+ import { isJSONRPCRequest, isInitializedNotification, JSONRPCMessageSchema, isJSONRPCResponse } from '../types.js';
2
+ import { UnauthorizedError, auth, extractResourceMetadataUrl } from './auth.js';
3
+ import { EventSourceParserStream } from '../../../../../eventsource-parser/dist/stream.js';
4
+
5
+ // Default reconnection options for StreamableHTTP connections
6
+ const DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {
7
+ initialReconnectionDelay: 1000,
8
+ maxReconnectionDelay: 30000,
9
+ reconnectionDelayGrowFactor: 1.5,
10
+ maxRetries: 2,
11
+ };
12
+ class StreamableHTTPError extends Error {
13
+ constructor(code, message) {
14
+ super(`Streamable HTTP error: ${message}`);
15
+ this.code = code;
16
+ }
17
+ }
18
+ /**
19
+ * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.
20
+ * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events
21
+ * for receiving messages.
22
+ */
23
+ class StreamableHTTPClientTransport {
24
+ constructor(url, opts) {
25
+ var _a;
26
+ this._url = url;
27
+ this._resourceMetadataUrl = undefined;
28
+ this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;
29
+ this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;
30
+ this._fetch = opts === null || opts === void 0 ? void 0 : opts.fetch;
31
+ this._sessionId = opts === null || opts === void 0 ? void 0 : opts.sessionId;
32
+ this._reconnectionOptions = (_a = opts === null || opts === void 0 ? void 0 : opts.reconnectionOptions) !== null && _a !== void 0 ? _a : DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;
33
+ }
34
+ async _authThenStart() {
35
+ var _a;
36
+ if (!this._authProvider) {
37
+ throw new UnauthorizedError("No auth provider");
38
+ }
39
+ let result;
40
+ try {
41
+ result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });
42
+ }
43
+ catch (error) {
44
+ (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
45
+ throw error;
46
+ }
47
+ if (result !== "AUTHORIZED") {
48
+ throw new UnauthorizedError();
49
+ }
50
+ return await this._startOrAuthSse({ resumptionToken: undefined });
51
+ }
52
+ async _commonHeaders() {
53
+ var _a;
54
+ const headers = {};
55
+ if (this._authProvider) {
56
+ const tokens = await this._authProvider.tokens();
57
+ if (tokens) {
58
+ headers["Authorization"] = `Bearer ${tokens.access_token}`;
59
+ }
60
+ }
61
+ if (this._sessionId) {
62
+ headers["mcp-session-id"] = this._sessionId;
63
+ }
64
+ if (this._protocolVersion) {
65
+ headers["mcp-protocol-version"] = this._protocolVersion;
66
+ }
67
+ const extraHeaders = this._normalizeHeaders((_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers);
68
+ return new Headers({
69
+ ...headers,
70
+ ...extraHeaders,
71
+ });
72
+ }
73
+ async _startOrAuthSse(options) {
74
+ var _a, _b, _c;
75
+ const { resumptionToken } = options;
76
+ try {
77
+ // Try to open an initial SSE stream with GET to listen for server messages
78
+ // This is optional according to the spec - server may not support it
79
+ const headers = await this._commonHeaders();
80
+ headers.set("Accept", "text/event-stream");
81
+ // Include Last-Event-ID header for resumable streams if provided
82
+ if (resumptionToken) {
83
+ headers.set("last-event-id", resumptionToken);
84
+ }
85
+ const response = await ((_a = this._fetch) !== null && _a !== void 0 ? _a : fetch)(this._url, {
86
+ method: "GET",
87
+ headers,
88
+ signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal,
89
+ });
90
+ if (!response.ok) {
91
+ if (response.status === 401 && this._authProvider) {
92
+ // Need to authenticate
93
+ return await this._authThenStart();
94
+ }
95
+ // 405 indicates that the server does not offer an SSE stream at GET endpoint
96
+ // This is an expected case that should not trigger an error
97
+ if (response.status === 405) {
98
+ return;
99
+ }
100
+ throw new StreamableHTTPError(response.status, `Failed to open SSE stream: ${response.statusText}`);
101
+ }
102
+ this._handleSseStream(response.body, options, true);
103
+ }
104
+ catch (error) {
105
+ (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
106
+ throw error;
107
+ }
108
+ }
109
+ /**
110
+ * Calculates the next reconnection delay using backoff algorithm
111
+ *
112
+ * @param attempt Current reconnection attempt count for the specific stream
113
+ * @returns Time to wait in milliseconds before next reconnection attempt
114
+ */
115
+ _getNextReconnectionDelay(attempt) {
116
+ // Access default values directly, ensuring they're never undefined
117
+ const initialDelay = this._reconnectionOptions.initialReconnectionDelay;
118
+ const growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;
119
+ const maxDelay = this._reconnectionOptions.maxReconnectionDelay;
120
+ // Cap at maximum delay
121
+ return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);
122
+ }
123
+ _normalizeHeaders(headers) {
124
+ if (!headers)
125
+ return {};
126
+ if (headers instanceof Headers) {
127
+ return Object.fromEntries(headers.entries());
128
+ }
129
+ if (Array.isArray(headers)) {
130
+ return Object.fromEntries(headers);
131
+ }
132
+ return { ...headers };
133
+ }
134
+ /**
135
+ * Schedule a reconnection attempt with exponential backoff
136
+ *
137
+ * @param lastEventId The ID of the last received event for resumability
138
+ * @param attemptCount Current reconnection attempt count for this specific stream
139
+ */
140
+ _scheduleReconnection(options, attemptCount = 0) {
141
+ var _a;
142
+ // Use provided options or default options
143
+ const maxRetries = this._reconnectionOptions.maxRetries;
144
+ // Check if we've exceeded maximum retry attempts
145
+ if (maxRetries > 0 && attemptCount >= maxRetries) {
146
+ (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));
147
+ return;
148
+ }
149
+ // Calculate next delay based on current attempt count
150
+ const delay = this._getNextReconnectionDelay(attemptCount);
151
+ // Schedule the reconnection
152
+ setTimeout(() => {
153
+ // Use the last event ID to resume where we left off
154
+ this._startOrAuthSse(options).catch(error => {
155
+ var _a;
156
+ (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));
157
+ // Schedule another attempt if this one failed, incrementing the attempt counter
158
+ this._scheduleReconnection(options, attemptCount + 1);
159
+ });
160
+ }, delay);
161
+ }
162
+ _handleSseStream(stream, options, isReconnectable) {
163
+ if (!stream) {
164
+ return;
165
+ }
166
+ const { onresumptiontoken, replayMessageId } = options;
167
+ let lastEventId;
168
+ const processStream = async () => {
169
+ var _a, _b, _c, _d;
170
+ // this is the closest we can get to trying to catch network errors
171
+ // if something happens reader will throw
172
+ try {
173
+ // Create a pipeline: binary stream -> text decoder -> SSE parser
174
+ const reader = stream
175
+ .pipeThrough(new TextDecoderStream())
176
+ .pipeThrough(new EventSourceParserStream())
177
+ .getReader();
178
+ while (true) {
179
+ const { value: event, done } = await reader.read();
180
+ if (done) {
181
+ break;
182
+ }
183
+ // Update last event ID if provided
184
+ if (event.id) {
185
+ lastEventId = event.id;
186
+ onresumptiontoken === null || onresumptiontoken === void 0 ? void 0 : onresumptiontoken(event.id);
187
+ }
188
+ if (!event.event || event.event === "message") {
189
+ try {
190
+ const message = JSONRPCMessageSchema.parse(JSON.parse(event.data));
191
+ if (replayMessageId !== undefined && isJSONRPCResponse(message)) {
192
+ message.id = replayMessageId;
193
+ }
194
+ (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);
195
+ }
196
+ catch (error) {
197
+ (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);
198
+ }
199
+ }
200
+ }
201
+ }
202
+ catch (error) {
203
+ // Handle stream errors - likely a network disconnect
204
+ (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, new Error(`SSE stream disconnected: ${error}`));
205
+ // Attempt to reconnect if the stream disconnects unexpectedly and we aren't closing
206
+ if (isReconnectable &&
207
+ this._abortController &&
208
+ !this._abortController.signal.aborted) {
209
+ // Use the exponential backoff reconnection strategy
210
+ try {
211
+ this._scheduleReconnection({
212
+ resumptionToken: lastEventId,
213
+ onresumptiontoken,
214
+ replayMessageId
215
+ }, 0);
216
+ }
217
+ catch (error) {
218
+ (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, new Error(`Failed to reconnect: ${error instanceof Error ? error.message : String(error)}`));
219
+ }
220
+ }
221
+ }
222
+ };
223
+ processStream();
224
+ }
225
+ async start() {
226
+ if (this._abortController) {
227
+ throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");
228
+ }
229
+ this._abortController = new AbortController();
230
+ }
231
+ /**
232
+ * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
233
+ */
234
+ async finishAuth(authorizationCode) {
235
+ if (!this._authProvider) {
236
+ throw new UnauthorizedError("No auth provider");
237
+ }
238
+ const result = await auth(this._authProvider, { serverUrl: this._url, authorizationCode, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });
239
+ if (result !== "AUTHORIZED") {
240
+ throw new UnauthorizedError("Failed to authorize");
241
+ }
242
+ }
243
+ async close() {
244
+ var _a, _b;
245
+ // Abort any pending requests
246
+ (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.abort();
247
+ (_b = this.onclose) === null || _b === void 0 ? void 0 : _b.call(this);
248
+ }
249
+ async send(message, options) {
250
+ var _a, _b, _c, _d;
251
+ try {
252
+ const { resumptionToken, onresumptiontoken } = options || {};
253
+ if (resumptionToken) {
254
+ // If we have at last event ID, we need to reconnect the SSE stream
255
+ this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });
256
+ return;
257
+ }
258
+ const headers = await this._commonHeaders();
259
+ headers.set("content-type", "application/json");
260
+ headers.set("accept", "application/json, text/event-stream");
261
+ const init = {
262
+ ...this._requestInit,
263
+ method: "POST",
264
+ headers,
265
+ body: JSON.stringify(message),
266
+ signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,
267
+ };
268
+ const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);
269
+ // Handle session ID received during initialization
270
+ const sessionId = response.headers.get("mcp-session-id");
271
+ if (sessionId) {
272
+ this._sessionId = sessionId;
273
+ }
274
+ if (!response.ok) {
275
+ if (response.status === 401 && this._authProvider) {
276
+ this._resourceMetadataUrl = extractResourceMetadataUrl(response);
277
+ const result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });
278
+ if (result !== "AUTHORIZED") {
279
+ throw new UnauthorizedError();
280
+ }
281
+ // Purposely _not_ awaited, so we don't call onerror twice
282
+ return this.send(message);
283
+ }
284
+ const text = await response.text().catch(() => null);
285
+ throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);
286
+ }
287
+ // If the response is 202 Accepted, there's no body to process
288
+ if (response.status === 202) {
289
+ // if the accepted notification is initialized, we start the SSE stream
290
+ // if it's supported by the server
291
+ if (isInitializedNotification(message)) {
292
+ // Start without a lastEventId since this is a fresh connection
293
+ this._startOrAuthSse({ resumptionToken: undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });
294
+ }
295
+ return;
296
+ }
297
+ // Get original message(s) for detecting request IDs
298
+ const messages = Array.isArray(message) ? message : [message];
299
+ const hasRequests = messages.filter(msg => "method" in msg && "id" in msg && msg.id !== undefined).length > 0;
300
+ // Check the response type
301
+ const contentType = response.headers.get("content-type");
302
+ if (hasRequests) {
303
+ if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("text/event-stream")) {
304
+ // Handle SSE stream responses for requests
305
+ // We use the same handler as standalone streams, which now supports
306
+ // reconnection with the last event ID
307
+ this._handleSseStream(response.body, { onresumptiontoken }, false);
308
+ }
309
+ else if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("application/json")) {
310
+ // For non-streaming servers, we might get direct JSON responses
311
+ const data = await response.json();
312
+ const responseMessages = Array.isArray(data)
313
+ ? data.map(msg => JSONRPCMessageSchema.parse(msg))
314
+ : [JSONRPCMessageSchema.parse(data)];
315
+ for (const msg of responseMessages) {
316
+ (_c = this.onmessage) === null || _c === void 0 ? void 0 : _c.call(this, msg);
317
+ }
318
+ }
319
+ else {
320
+ throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);
321
+ }
322
+ }
323
+ }
324
+ catch (error) {
325
+ (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, error);
326
+ throw error;
327
+ }
328
+ }
329
+ get sessionId() {
330
+ return this._sessionId;
331
+ }
332
+ /**
333
+ * Terminates the current session by sending a DELETE request to the server.
334
+ *
335
+ * Clients that no longer need a particular session
336
+ * (e.g., because the user is leaving the client application) SHOULD send an
337
+ * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly
338
+ * terminate the session.
339
+ *
340
+ * The server MAY respond with HTTP 405 Method Not Allowed, indicating that
341
+ * the server does not allow clients to terminate sessions.
342
+ */
343
+ async terminateSession() {
344
+ var _a, _b, _c;
345
+ if (!this._sessionId) {
346
+ return; // No session to terminate
347
+ }
348
+ try {
349
+ const headers = await this._commonHeaders();
350
+ const init = {
351
+ ...this._requestInit,
352
+ method: "DELETE",
353
+ headers,
354
+ signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,
355
+ };
356
+ const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);
357
+ // We specifically handle 405 as a valid response according to the spec,
358
+ // meaning the server does not support explicit session termination
359
+ if (!response.ok && response.status !== 405) {
360
+ throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);
361
+ }
362
+ this._sessionId = undefined;
363
+ }
364
+ catch (error) {
365
+ (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
366
+ throw error;
367
+ }
368
+ }
369
+ setProtocolVersion(version) {
370
+ this._protocolVersion = version;
371
+ }
372
+ get protocolVersion() {
373
+ return this._protocolVersion;
374
+ }
375
+ }
376
+
377
+ export { StreamableHTTPClientTransport, StreamableHTTPError };
378
+ //# sourceMappingURL=streamableHttp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streamableHttp.js","sources":["../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"],"sourcesContent":["import { isInitializedNotification, isJSONRPCRequest, isJSONRPCResponse, JSONRPCMessageSchema } from \"../types.js\";\nimport { auth, extractResourceMetadataUrl, UnauthorizedError } from \"./auth.js\";\nimport { EventSourceParserStream } from \"eventsource-parser/stream\";\n// Default reconnection options for StreamableHTTP connections\nconst DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {\n initialReconnectionDelay: 1000,\n maxReconnectionDelay: 30000,\n reconnectionDelayGrowFactor: 1.5,\n maxRetries: 2,\n};\nexport class StreamableHTTPError extends Error {\n constructor(code, message) {\n super(`Streamable HTTP error: ${message}`);\n this.code = code;\n }\n}\n/**\n * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.\n * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events\n * for receiving messages.\n */\nexport class StreamableHTTPClientTransport {\n constructor(url, opts) {\n var _a;\n this._url = url;\n this._resourceMetadataUrl = undefined;\n this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;\n this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;\n this._fetch = opts === null || opts === void 0 ? void 0 : opts.fetch;\n this._sessionId = opts === null || opts === void 0 ? void 0 : opts.sessionId;\n this._reconnectionOptions = (_a = opts === null || opts === void 0 ? void 0 : opts.reconnectionOptions) !== null && _a !== void 0 ? _a : DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;\n }\n async _authThenStart() {\n var _a;\n if (!this._authProvider) {\n throw new UnauthorizedError(\"No auth provider\");\n }\n let result;\n try {\n result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n }\n catch (error) {\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);\n throw error;\n }\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError();\n }\n return await this._startOrAuthSse({ resumptionToken: undefined });\n }\n async _commonHeaders() {\n var _a;\n const headers = {};\n if (this._authProvider) {\n const tokens = await this._authProvider.tokens();\n if (tokens) {\n headers[\"Authorization\"] = `Bearer ${tokens.access_token}`;\n }\n }\n if (this._sessionId) {\n headers[\"mcp-session-id\"] = this._sessionId;\n }\n if (this._protocolVersion) {\n headers[\"mcp-protocol-version\"] = this._protocolVersion;\n }\n const extraHeaders = this._normalizeHeaders((_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers);\n return new Headers({\n ...headers,\n ...extraHeaders,\n });\n }\n async _startOrAuthSse(options) {\n var _a, _b, _c;\n const { resumptionToken } = options;\n try {\n // Try to open an initial SSE stream with GET to listen for server messages\n // This is optional according to the spec - server may not support it\n const headers = await this._commonHeaders();\n headers.set(\"Accept\", \"text/event-stream\");\n // Include Last-Event-ID header for resumable streams if provided\n if (resumptionToken) {\n headers.set(\"last-event-id\", resumptionToken);\n }\n const response = await ((_a = this._fetch) !== null && _a !== void 0 ? _a : fetch)(this._url, {\n method: \"GET\",\n headers,\n signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal,\n });\n if (!response.ok) {\n if (response.status === 401 && this._authProvider) {\n // Need to authenticate\n return await this._authThenStart();\n }\n // 405 indicates that the server does not offer an SSE stream at GET endpoint\n // This is an expected case that should not trigger an error\n if (response.status === 405) {\n return;\n }\n throw new StreamableHTTPError(response.status, `Failed to open SSE stream: ${response.statusText}`);\n }\n this._handleSseStream(response.body, options, true);\n }\n catch (error) {\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);\n throw error;\n }\n }\n /**\n * Calculates the next reconnection delay using backoff algorithm\n *\n * @param attempt Current reconnection attempt count for the specific stream\n * @returns Time to wait in milliseconds before next reconnection attempt\n */\n _getNextReconnectionDelay(attempt) {\n // Access default values directly, ensuring they're never undefined\n const initialDelay = this._reconnectionOptions.initialReconnectionDelay;\n const growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;\n const maxDelay = this._reconnectionOptions.maxReconnectionDelay;\n // Cap at maximum delay\n return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);\n }\n _normalizeHeaders(headers) {\n if (!headers)\n return {};\n if (headers instanceof Headers) {\n return Object.fromEntries(headers.entries());\n }\n if (Array.isArray(headers)) {\n return Object.fromEntries(headers);\n }\n return { ...headers };\n }\n /**\n * Schedule a reconnection attempt with exponential backoff\n *\n * @param lastEventId The ID of the last received event for resumability\n * @param attemptCount Current reconnection attempt count for this specific stream\n */\n _scheduleReconnection(options, attemptCount = 0) {\n var _a;\n // Use provided options or default options\n const maxRetries = this._reconnectionOptions.maxRetries;\n // Check if we've exceeded maximum retry attempts\n if (maxRetries > 0 && attemptCount >= maxRetries) {\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));\n return;\n }\n // Calculate next delay based on current attempt count\n const delay = this._getNextReconnectionDelay(attemptCount);\n // Schedule the reconnection\n setTimeout(() => {\n // Use the last event ID to resume where we left off\n this._startOrAuthSse(options).catch(error => {\n var _a;\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));\n // Schedule another attempt if this one failed, incrementing the attempt counter\n this._scheduleReconnection(options, attemptCount + 1);\n });\n }, delay);\n }\n _handleSseStream(stream, options, isReconnectable) {\n if (!stream) {\n return;\n }\n const { onresumptiontoken, replayMessageId } = options;\n let lastEventId;\n const processStream = async () => {\n var _a, _b, _c, _d;\n // this is the closest we can get to trying to catch network errors\n // if something happens reader will throw\n try {\n // Create a pipeline: binary stream -> text decoder -> SSE parser\n const reader = stream\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(new EventSourceParserStream())\n .getReader();\n while (true) {\n const { value: event, done } = await reader.read();\n if (done) {\n break;\n }\n // Update last event ID if provided\n if (event.id) {\n lastEventId = event.id;\n onresumptiontoken === null || onresumptiontoken === void 0 ? void 0 : onresumptiontoken(event.id);\n }\n if (!event.event || event.event === \"message\") {\n try {\n const message = JSONRPCMessageSchema.parse(JSON.parse(event.data));\n if (replayMessageId !== undefined && isJSONRPCResponse(message)) {\n message.id = replayMessageId;\n }\n (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);\n }\n catch (error) {\n (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);\n }\n }\n }\n }\n catch (error) {\n // Handle stream errors - likely a network disconnect\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, new Error(`SSE stream disconnected: ${error}`));\n // Attempt to reconnect if the stream disconnects unexpectedly and we aren't closing\n if (isReconnectable &&\n this._abortController &&\n !this._abortController.signal.aborted) {\n // Use the exponential backoff reconnection strategy\n try {\n this._scheduleReconnection({\n resumptionToken: lastEventId,\n onresumptiontoken,\n replayMessageId\n }, 0);\n }\n catch (error) {\n (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, new Error(`Failed to reconnect: ${error instanceof Error ? error.message : String(error)}`));\n }\n }\n }\n };\n processStream();\n }\n async start() {\n if (this._abortController) {\n throw new Error(\"StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.\");\n }\n this._abortController = new AbortController();\n }\n /**\n * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.\n */\n async finishAuth(authorizationCode) {\n if (!this._authProvider) {\n throw new UnauthorizedError(\"No auth provider\");\n }\n const result = await auth(this._authProvider, { serverUrl: this._url, authorizationCode, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError(\"Failed to authorize\");\n }\n }\n async close() {\n var _a, _b;\n // Abort any pending requests\n (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.abort();\n (_b = this.onclose) === null || _b === void 0 ? void 0 : _b.call(this);\n }\n async send(message, options) {\n var _a, _b, _c, _d;\n try {\n const { resumptionToken, onresumptiontoken } = options || {};\n if (resumptionToken) {\n // If we have at last event ID, we need to reconnect the SSE stream\n this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });\n return;\n }\n const headers = await this._commonHeaders();\n headers.set(\"content-type\", \"application/json\");\n headers.set(\"accept\", \"application/json, text/event-stream\");\n const init = {\n ...this._requestInit,\n method: \"POST\",\n headers,\n body: JSON.stringify(message),\n signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,\n };\n const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);\n // Handle session ID received during initialization\n const sessionId = response.headers.get(\"mcp-session-id\");\n if (sessionId) {\n this._sessionId = sessionId;\n }\n if (!response.ok) {\n if (response.status === 401 && this._authProvider) {\n this._resourceMetadataUrl = extractResourceMetadataUrl(response);\n const result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError();\n }\n // Purposely _not_ awaited, so we don't call onerror twice\n return this.send(message);\n }\n const text = await response.text().catch(() => null);\n throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);\n }\n // If the response is 202 Accepted, there's no body to process\n if (response.status === 202) {\n // if the accepted notification is initialized, we start the SSE stream\n // if it's supported by the server\n if (isInitializedNotification(message)) {\n // Start without a lastEventId since this is a fresh connection\n this._startOrAuthSse({ resumptionToken: undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });\n }\n return;\n }\n // Get original message(s) for detecting request IDs\n const messages = Array.isArray(message) ? message : [message];\n const hasRequests = messages.filter(msg => \"method\" in msg && \"id\" in msg && msg.id !== undefined).length > 0;\n // Check the response type\n const contentType = response.headers.get(\"content-type\");\n if (hasRequests) {\n if (contentType === null || contentType === void 0 ? void 0 : contentType.includes(\"text/event-stream\")) {\n // Handle SSE stream responses for requests\n // We use the same handler as standalone streams, which now supports\n // reconnection with the last event ID\n this._handleSseStream(response.body, { onresumptiontoken }, false);\n }\n else if (contentType === null || contentType === void 0 ? void 0 : contentType.includes(\"application/json\")) {\n // For non-streaming servers, we might get direct JSON responses\n const data = await response.json();\n const responseMessages = Array.isArray(data)\n ? data.map(msg => JSONRPCMessageSchema.parse(msg))\n : [JSONRPCMessageSchema.parse(data)];\n for (const msg of responseMessages) {\n (_c = this.onmessage) === null || _c === void 0 ? void 0 : _c.call(this, msg);\n }\n }\n else {\n throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);\n }\n }\n }\n catch (error) {\n (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, error);\n throw error;\n }\n }\n get sessionId() {\n return this._sessionId;\n }\n /**\n * Terminates the current session by sending a DELETE request to the server.\n *\n * Clients that no longer need a particular session\n * (e.g., because the user is leaving the client application) SHOULD send an\n * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly\n * terminate the session.\n *\n * The server MAY respond with HTTP 405 Method Not Allowed, indicating that\n * the server does not allow clients to terminate sessions.\n */\n async terminateSession() {\n var _a, _b, _c;\n if (!this._sessionId) {\n return; // No session to terminate\n }\n try {\n const headers = await this._commonHeaders();\n const init = {\n ...this._requestInit,\n method: \"DELETE\",\n headers,\n signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,\n };\n const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);\n // We specifically handle 405 as a valid response according to the spec,\n // meaning the server does not support explicit session termination\n if (!response.ok && response.status !== 405) {\n throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);\n }\n this._sessionId = undefined;\n }\n catch (error) {\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);\n throw error;\n }\n }\n setProtocolVersion(version) {\n this._protocolVersion = version;\n }\n get protocolVersion() {\n return this._protocolVersion;\n }\n}\n//# sourceMappingURL=streamableHttp.js.map"],"names":[],"mappings":";;;;AAGA;AACA,MAAM,4CAA4C,GAAG;AACrD,IAAI,wBAAwB,EAAE,IAAI;AAClC,IAAI,oBAAoB,EAAE,KAAK;AAC/B,IAAI,2BAA2B,EAAE,GAAG;AACpC,IAAI,UAAU,EAAE,CAAC;AACjB,CAAC;AACM,MAAM,mBAAmB,SAAS,KAAK,CAAC;AAC/C,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,QAAQ,KAAK,CAAC,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,6BAA6B,CAAC;AAC3C,IAAI,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE;AAC3B,QAAQ,IAAI,EAAE;AACd,QAAQ,IAAI,CAAC,IAAI,GAAG,GAAG;AACvB,QAAQ,IAAI,CAAC,oBAAoB,GAAG,SAAS;AAC7C,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW;AACxF,QAAQ,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,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,EAAE,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;AAC/G;AACA;AACA,YAAY,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;AACzD,gBAAgB,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,6BAA6B,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AACrH,YAAY;AACZ,YAAY,IAAI,CAAC,UAAU,GAAG,SAAS;AACvC,QAAQ;AACR,QAAQ,OAAO,KAAK,EAAE;AACtB,YAAY,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACzF,YAAY,MAAM,KAAK;AACvB,QAAQ;AACR,IAAI;AACJ,IAAI,kBAAkB,CAAC,OAAO,EAAE;AAChC,QAAQ,IAAI,CAAC,gBAAgB,GAAG,OAAO;AACvC,IAAI;AACJ,IAAI,IAAI,eAAe,GAAG;AAC1B,QAAQ,OAAO,IAAI,CAAC,gBAAgB;AACpC,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Base class for all OAuth errors
3
+ */
4
+ class OAuthError extends Error {
5
+ constructor(message, errorUri) {
6
+ super(message);
7
+ this.errorUri = errorUri;
8
+ this.name = this.constructor.name;
9
+ }
10
+ /**
11
+ * Converts the error to a standard OAuth error response object
12
+ */
13
+ toResponseObject() {
14
+ const response = {
15
+ error: this.errorCode,
16
+ error_description: this.message
17
+ };
18
+ if (this.errorUri) {
19
+ response.error_uri = this.errorUri;
20
+ }
21
+ return response;
22
+ }
23
+ get errorCode() {
24
+ return this.constructor.errorCode;
25
+ }
26
+ }
27
+ /**
28
+ * Invalid request error - The request is missing a required parameter,
29
+ * includes an invalid parameter value, includes a parameter more than once,
30
+ * or is otherwise malformed.
31
+ */
32
+ class InvalidRequestError extends OAuthError {
33
+ }
34
+ InvalidRequestError.errorCode = "invalid_request";
35
+ /**
36
+ * Invalid client error - Client authentication failed (e.g., unknown client, no client
37
+ * authentication included, or unsupported authentication method).
38
+ */
39
+ class InvalidClientError extends OAuthError {
40
+ }
41
+ InvalidClientError.errorCode = "invalid_client";
42
+ /**
43
+ * Invalid grant error - The provided authorization grant or refresh token is
44
+ * invalid, expired, revoked, does not match the redirection URI used in the
45
+ * authorization request, or was issued to another client.
46
+ */
47
+ class InvalidGrantError extends OAuthError {
48
+ }
49
+ InvalidGrantError.errorCode = "invalid_grant";
50
+ /**
51
+ * Unauthorized client error - The authenticated client is not authorized to use
52
+ * this authorization grant type.
53
+ */
54
+ class UnauthorizedClientError extends OAuthError {
55
+ }
56
+ UnauthorizedClientError.errorCode = "unauthorized_client";
57
+ /**
58
+ * Unsupported grant type error - The authorization grant type is not supported
59
+ * by the authorization server.
60
+ */
61
+ class UnsupportedGrantTypeError extends OAuthError {
62
+ }
63
+ UnsupportedGrantTypeError.errorCode = "unsupported_grant_type";
64
+ /**
65
+ * Invalid scope error - The requested scope is invalid, unknown, malformed, or
66
+ * exceeds the scope granted by the resource owner.
67
+ */
68
+ class InvalidScopeError extends OAuthError {
69
+ }
70
+ InvalidScopeError.errorCode = "invalid_scope";
71
+ /**
72
+ * Access denied error - The resource owner or authorization server denied the request.
73
+ */
74
+ class AccessDeniedError extends OAuthError {
75
+ }
76
+ AccessDeniedError.errorCode = "access_denied";
77
+ /**
78
+ * Server error - The authorization server encountered an unexpected condition
79
+ * that prevented it from fulfilling the request.
80
+ */
81
+ class ServerError extends OAuthError {
82
+ }
83
+ ServerError.errorCode = "server_error";
84
+ /**
85
+ * Temporarily unavailable error - The authorization server is currently unable to
86
+ * handle the request due to a temporary overloading or maintenance of the server.
87
+ */
88
+ class TemporarilyUnavailableError extends OAuthError {
89
+ }
90
+ TemporarilyUnavailableError.errorCode = "temporarily_unavailable";
91
+ /**
92
+ * Unsupported response type error - The authorization server does not support
93
+ * obtaining an authorization code using this method.
94
+ */
95
+ class UnsupportedResponseTypeError extends OAuthError {
96
+ }
97
+ UnsupportedResponseTypeError.errorCode = "unsupported_response_type";
98
+ /**
99
+ * Unsupported token type error - The authorization server does not support
100
+ * the requested token type.
101
+ */
102
+ class UnsupportedTokenTypeError extends OAuthError {
103
+ }
104
+ UnsupportedTokenTypeError.errorCode = "unsupported_token_type";
105
+ /**
106
+ * Invalid token error - The access token provided is expired, revoked, malformed,
107
+ * or invalid for other reasons.
108
+ */
109
+ class InvalidTokenError extends OAuthError {
110
+ }
111
+ InvalidTokenError.errorCode = "invalid_token";
112
+ /**
113
+ * Method not allowed error - The HTTP method used is not allowed for this endpoint.
114
+ * (Custom, non-standard error)
115
+ */
116
+ class MethodNotAllowedError extends OAuthError {
117
+ }
118
+ MethodNotAllowedError.errorCode = "method_not_allowed";
119
+ /**
120
+ * Too many requests error - Rate limit exceeded.
121
+ * (Custom, non-standard error based on RFC 6585)
122
+ */
123
+ class TooManyRequestsError extends OAuthError {
124
+ }
125
+ TooManyRequestsError.errorCode = "too_many_requests";
126
+ /**
127
+ * Invalid client metadata error - The client metadata is invalid.
128
+ * (Custom error for dynamic client registration - RFC 7591)
129
+ */
130
+ class InvalidClientMetadataError extends OAuthError {
131
+ }
132
+ InvalidClientMetadataError.errorCode = "invalid_client_metadata";
133
+ /**
134
+ * Insufficient scope error - The request requires higher privileges than provided by the access token.
135
+ */
136
+ class InsufficientScopeError extends OAuthError {
137
+ }
138
+ InsufficientScopeError.errorCode = "insufficient_scope";
139
+ /**
140
+ * A full list of all OAuthErrors, enabling parsing from error responses
141
+ */
142
+ const OAUTH_ERRORS = {
143
+ [InvalidRequestError.errorCode]: InvalidRequestError,
144
+ [InvalidClientError.errorCode]: InvalidClientError,
145
+ [InvalidGrantError.errorCode]: InvalidGrantError,
146
+ [UnauthorizedClientError.errorCode]: UnauthorizedClientError,
147
+ [UnsupportedGrantTypeError.errorCode]: UnsupportedGrantTypeError,
148
+ [InvalidScopeError.errorCode]: InvalidScopeError,
149
+ [AccessDeniedError.errorCode]: AccessDeniedError,
150
+ [ServerError.errorCode]: ServerError,
151
+ [TemporarilyUnavailableError.errorCode]: TemporarilyUnavailableError,
152
+ [UnsupportedResponseTypeError.errorCode]: UnsupportedResponseTypeError,
153
+ [UnsupportedTokenTypeError.errorCode]: UnsupportedTokenTypeError,
154
+ [InvalidTokenError.errorCode]: InvalidTokenError,
155
+ [MethodNotAllowedError.errorCode]: MethodNotAllowedError,
156
+ [TooManyRequestsError.errorCode]: TooManyRequestsError,
157
+ [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,
158
+ [InsufficientScopeError.errorCode]: InsufficientScopeError,
159
+ };
160
+
161
+ export { AccessDeniedError, InsufficientScopeError, InvalidClientError, InvalidClientMetadataError, InvalidGrantError, InvalidRequestError, InvalidScopeError, InvalidTokenError, MethodNotAllowedError, OAUTH_ERRORS, OAuthError, ServerError, TemporarilyUnavailableError, TooManyRequestsError, UnauthorizedClientError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UnsupportedTokenTypeError };
162
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sources":["../../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js"],"sourcesContent":["/**\n * Base class for all OAuth errors\n */\nexport class OAuthError extends Error {\n constructor(message, errorUri) {\n super(message);\n this.errorUri = errorUri;\n this.name = this.constructor.name;\n }\n /**\n * Converts the error to a standard OAuth error response object\n */\n toResponseObject() {\n const response = {\n error: this.errorCode,\n error_description: this.message\n };\n if (this.errorUri) {\n response.error_uri = this.errorUri;\n }\n return response;\n }\n get errorCode() {\n return this.constructor.errorCode;\n }\n}\n/**\n * Invalid request error - The request is missing a required parameter,\n * includes an invalid parameter value, includes a parameter more than once,\n * or is otherwise malformed.\n */\nexport class InvalidRequestError extends OAuthError {\n}\nInvalidRequestError.errorCode = \"invalid_request\";\n/**\n * Invalid client error - Client authentication failed (e.g., unknown client, no client\n * authentication included, or unsupported authentication method).\n */\nexport class InvalidClientError extends OAuthError {\n}\nInvalidClientError.errorCode = \"invalid_client\";\n/**\n * Invalid grant error - The provided authorization grant or refresh token is\n * invalid, expired, revoked, does not match the redirection URI used in the\n * authorization request, or was issued to another client.\n */\nexport class InvalidGrantError extends OAuthError {\n}\nInvalidGrantError.errorCode = \"invalid_grant\";\n/**\n * Unauthorized client error - The authenticated client is not authorized to use\n * this authorization grant type.\n */\nexport class UnauthorizedClientError extends OAuthError {\n}\nUnauthorizedClientError.errorCode = \"unauthorized_client\";\n/**\n * Unsupported grant type error - The authorization grant type is not supported\n * by the authorization server.\n */\nexport class UnsupportedGrantTypeError extends OAuthError {\n}\nUnsupportedGrantTypeError.errorCode = \"unsupported_grant_type\";\n/**\n * Invalid scope error - The requested scope is invalid, unknown, malformed, or\n * exceeds the scope granted by the resource owner.\n */\nexport class InvalidScopeError extends OAuthError {\n}\nInvalidScopeError.errorCode = \"invalid_scope\";\n/**\n * Access denied error - The resource owner or authorization server denied the request.\n */\nexport class AccessDeniedError extends OAuthError {\n}\nAccessDeniedError.errorCode = \"access_denied\";\n/**\n * Server error - The authorization server encountered an unexpected condition\n * that prevented it from fulfilling the request.\n */\nexport class ServerError extends OAuthError {\n}\nServerError.errorCode = \"server_error\";\n/**\n * Temporarily unavailable error - The authorization server is currently unable to\n * handle the request due to a temporary overloading or maintenance of the server.\n */\nexport class TemporarilyUnavailableError extends OAuthError {\n}\nTemporarilyUnavailableError.errorCode = \"temporarily_unavailable\";\n/**\n * Unsupported response type error - The authorization server does not support\n * obtaining an authorization code using this method.\n */\nexport class UnsupportedResponseTypeError extends OAuthError {\n}\nUnsupportedResponseTypeError.errorCode = \"unsupported_response_type\";\n/**\n * Unsupported token type error - The authorization server does not support\n * the requested token type.\n */\nexport class UnsupportedTokenTypeError extends OAuthError {\n}\nUnsupportedTokenTypeError.errorCode = \"unsupported_token_type\";\n/**\n * Invalid token error - The access token provided is expired, revoked, malformed,\n * or invalid for other reasons.\n */\nexport class InvalidTokenError extends OAuthError {\n}\nInvalidTokenError.errorCode = \"invalid_token\";\n/**\n * Method not allowed error - The HTTP method used is not allowed for this endpoint.\n * (Custom, non-standard error)\n */\nexport class MethodNotAllowedError extends OAuthError {\n}\nMethodNotAllowedError.errorCode = \"method_not_allowed\";\n/**\n * Too many requests error - Rate limit exceeded.\n * (Custom, non-standard error based on RFC 6585)\n */\nexport class TooManyRequestsError extends OAuthError {\n}\nTooManyRequestsError.errorCode = \"too_many_requests\";\n/**\n * Invalid client metadata error - The client metadata is invalid.\n * (Custom error for dynamic client registration - RFC 7591)\n */\nexport class InvalidClientMetadataError extends OAuthError {\n}\nInvalidClientMetadataError.errorCode = \"invalid_client_metadata\";\n/**\n * Insufficient scope error - The request requires higher privileges than provided by the access token.\n */\nexport class InsufficientScopeError extends OAuthError {\n}\nInsufficientScopeError.errorCode = \"insufficient_scope\";\n/**\n * A utility class for defining one-off error codes\n */\nexport class CustomOAuthError extends OAuthError {\n constructor(customErrorCode, message, errorUri) {\n super(message, errorUri);\n this.customErrorCode = customErrorCode;\n }\n get errorCode() {\n return this.customErrorCode;\n }\n}\n/**\n * A full list of all OAuthErrors, enabling parsing from error responses\n */\nexport const OAUTH_ERRORS = {\n [InvalidRequestError.errorCode]: InvalidRequestError,\n [InvalidClientError.errorCode]: InvalidClientError,\n [InvalidGrantError.errorCode]: InvalidGrantError,\n [UnauthorizedClientError.errorCode]: UnauthorizedClientError,\n [UnsupportedGrantTypeError.errorCode]: UnsupportedGrantTypeError,\n [InvalidScopeError.errorCode]: InvalidScopeError,\n [AccessDeniedError.errorCode]: AccessDeniedError,\n [ServerError.errorCode]: ServerError,\n [TemporarilyUnavailableError.errorCode]: TemporarilyUnavailableError,\n [UnsupportedResponseTypeError.errorCode]: UnsupportedResponseTypeError,\n [UnsupportedTokenTypeError.errorCode]: UnsupportedTokenTypeError,\n [InvalidTokenError.errorCode]: InvalidTokenError,\n [MethodNotAllowedError.errorCode]: MethodNotAllowedError,\n [TooManyRequestsError.errorCode]: TooManyRequestsError,\n [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,\n [InsufficientScopeError.errorCode]: InsufficientScopeError,\n};\n//# sourceMappingURL=errors.js.map"],"names":[],"mappings":"AAAA;AACA;AACA;AACO,MAAM,UAAU,SAAS,KAAK,CAAC;AACtC,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE;AACnC,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI;AACzC,IAAI;AACJ;AACA;AACA;AACA,IAAI,gBAAgB,GAAG;AACvB,QAAQ,MAAM,QAAQ,GAAG;AACzB,YAAY,KAAK,EAAE,IAAI,CAAC,SAAS;AACjC,YAAY,iBAAiB,EAAE,IAAI,CAAC;AACpC,SAAS;AACT,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;AAC3B,YAAY,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ;AAC9C,QAAQ;AACR,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,IAAI,SAAS,GAAG;AACpB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS;AACzC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,mBAAmB,SAAS,UAAU,CAAC;AACpD;AACA,mBAAmB,CAAC,SAAS,GAAG,iBAAiB;AACjD;AACA;AACA;AACA;AACO,MAAM,kBAAkB,SAAS,UAAU,CAAC;AACnD;AACA,kBAAkB,CAAC,SAAS,GAAG,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACO,MAAM,iBAAiB,SAAS,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