@opentiny/next-sdk 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebMcpClient.ts +9 -37
- package/agent/AgentModelProvider.ts +56 -43
- package/agent/type.ts +2 -2
- package/agent/utils/getAISDKTools.ts +2 -2
- package/dist/WebMcpClient.d.ts +1 -4
- package/dist/WebMcpClient.js +9 -33
- package/dist/agent/AgentModelProvider.d.ts +21 -16
- package/dist/agent/AgentModelProvider.js +72 -51
- package/dist/agent/type.d.ts +2 -2
- package/dist/agent/utils/getAISDKTools.d.ts +2 -2
- package/dist/agent/utils/getAISDKTools.js +2 -2
- package/dist/index.es.dev.js +56 -57
- package/dist/index.es.js +4076 -4070
- package/dist/index.umd.dev.js +56 -57
- package/dist/index.umd.js +27 -27
- package/dist/remoter/createRemoter.js +1 -1
- package/dist/webagent.dev.js +48 -28
- package/dist/webagent.es.dev.js +48 -28
- package/dist/webagent.es.js +1617 -1602
- package/dist/webagent.js +21 -21
- package/dist/webmcp-full.dev.js +930 -987
- package/dist/webmcp-full.es.dev.js +930 -987
- package/dist/webmcp-full.es.js +1388 -1397
- package/dist/webmcp-full.js +7 -7
- package/dist/webmcp.dev.js +8 -29
- package/dist/webmcp.es.dev.js +8 -29
- package/dist/webmcp.es.js +432 -441
- package/dist/webmcp.js +1 -1
- package/package.json +1 -1
- package/remoter/createRemoter.ts +1 -1
- package/runtime.html +21 -80
package/dist/webmcp.es.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { default as pt } from "ajv";
|
|
2
|
-
import { JSONRPCMessageSchema as ae, EmptyResultSchema as ce, ElicitResultSchema as le, CreateMessageResultSchema as ue, ListRootsResultSchema as de, SetLevelRequestSchema as ee, SubscribeRequestSchema as fe, UnsubscribeRequestSchema as he, ListResourcesRequestSchema as _e, RootsListChangedNotificationSchema as xe, CallToolResultSchema as pe, ElicitRequestSchema as ve, CreateMessageRequestSchema as be, ListRootsRequestSchema as
|
|
3
|
-
import { Client as
|
|
4
|
-
import { SSEClientTransport as
|
|
5
|
-
import { StreamableHTTPClientTransport as
|
|
2
|
+
import { JSONRPCMessageSchema as ae, EmptyResultSchema as ce, ElicitResultSchema as le, CreateMessageResultSchema as ue, ListRootsResultSchema as de, SetLevelRequestSchema as ee, SubscribeRequestSchema as fe, UnsubscribeRequestSchema as he, ListResourcesRequestSchema as _e, RootsListChangedNotificationSchema as xe, CallToolResultSchema as pe, ElicitRequestSchema as ve, CreateMessageRequestSchema as be, ListRootsRequestSchema as ge, ToolListChangedNotificationSchema as we, PromptListChangedNotificationSchema as me, ResourceListChangedNotificationSchema as ye, ResourceUpdatedNotificationSchema as Ie, LoggingMessageNotificationSchema as Ce } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { Client as j } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
+
import { SSEClientTransport as N } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
5
|
+
import { StreamableHTTPClientTransport as J } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
6
6
|
import { WebSocketClientTransport as te } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
7
7
|
import { UnauthorizedError as Re } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
8
8
|
import { McpServer as ne } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
9
|
import { ResourceTemplate as bt } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
-
import { z as
|
|
10
|
+
import { z as wt } from "zod";
|
|
11
11
|
import { UriTemplate as yt } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
12
12
|
import { completable as Ct } from "@modelcontextprotocol/sdk/server/completable.js";
|
|
13
13
|
import { getDisplayName as St } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
|
|
14
|
-
function
|
|
14
|
+
function V() {
|
|
15
15
|
const r = ["224340fQYLJj", "function", "onmessage", "port2", "341XVdnBD", "313767JEBgqL", "950bpstaX", "1354759gUhUbE", "wRKyh", "onclose", "2044SvCTUj", "endpoint", "24msSkHx", "164VuWYGY", "mOWMr", "EkZCC", "addEventListener", "postMessage", "120705iyGzUz", "8878392ivIdKn", "close", "_listen", "3619482FaLQHc", "start", "_endpoint", "kgkem", "bzNYT", "MessageChannel transport error: ", "stringify", "onmessageerror", "HvyCv", "undefined", "Jwyua", "message", "_globalObject", "parse", "authInfo", "thraG", "220pGvxgp", "_port", "EGhzU", "onerror", "data", "MhriV"];
|
|
16
|
-
return
|
|
16
|
+
return V = function() {
|
|
17
17
|
return r;
|
|
18
|
-
},
|
|
18
|
+
}, V();
|
|
19
19
|
}
|
|
20
20
|
(function(r, e) {
|
|
21
|
-
const t =
|
|
21
|
+
const t = w, n = w, s = r();
|
|
22
22
|
for (; ; )
|
|
23
23
|
try {
|
|
24
24
|
if (parseInt(t(417)) / 1 * (parseInt(t(421)) / 2) + parseInt(t(433)) / 3 + parseInt(t(424)) / 4 * (-parseInt(n(429)) / 5) + parseInt(n(423)) / 6 * (-parseInt(n(418)) / 7) + -parseInt(n(430)) / 8 + -parseInt(t(416)) / 9 * (-parseInt(t(405)) / 10) + -parseInt(t(415)) / 11 * (-parseInt(t(411)) / 12) === e) break;
|
|
@@ -26,9 +26,9 @@ function A() {
|
|
|
26
26
|
} catch {
|
|
27
27
|
s.push(s.shift());
|
|
28
28
|
}
|
|
29
|
-
})(
|
|
29
|
+
})(V, 650197);
|
|
30
30
|
const se = () => {
|
|
31
|
-
const r =
|
|
31
|
+
const r = w, e = { EGhzU: function(t, n) {
|
|
32
32
|
return t !== n;
|
|
33
33
|
}, kIrDB: "undefined", llYQe: function(t, n) {
|
|
34
34
|
return t !== n;
|
|
@@ -37,41 +37,41 @@ const se = () => {
|
|
|
37
37
|
}, Jwyua: "return this" };
|
|
38
38
|
return typeof globalThis < "u" ? globalThis : e[r(407)](typeof window, e.kIrDB) ? window : e.llYQe(typeof global, e.kIrDB) ? global : typeof self !== r(398) ? self : e.PZfJg(Function, e[r(399)])();
|
|
39
39
|
}, Se = (r, e, t) => {
|
|
40
|
-
const n =
|
|
41
|
-
o[n(410)] = s(398), o.dBkaX = function(
|
|
42
|
-
return
|
|
40
|
+
const n = w, s = w, o = {};
|
|
41
|
+
o[n(410)] = s(398), o.dBkaX = function(i, l) {
|
|
42
|
+
return i === l;
|
|
43
43
|
}, o[s(393)] = "function";
|
|
44
|
-
const
|
|
45
|
-
typeof window !==
|
|
44
|
+
const a = o;
|
|
45
|
+
typeof window !== a[s(410)] ? r.postMessage(e, "*", t) : s(428) in r && a.dBkaX(typeof r.postMessage, a[n(393)]) && r.postMessage(e, t);
|
|
46
46
|
}, Le = (r, e) => {
|
|
47
|
-
const t =
|
|
48
|
-
s.MbsGh = "addEventListener", s.PPniK = function(
|
|
49
|
-
return
|
|
47
|
+
const t = w, n = w, s = {};
|
|
48
|
+
s.MbsGh = "addEventListener", s.PPniK = function(a, i) {
|
|
49
|
+
return a === i;
|
|
50
50
|
}, s[t(419)] = n(412), s[n(404)] = "onmessage", s[t(397)] = "undefined";
|
|
51
51
|
const o = s;
|
|
52
52
|
o.MbsGh in r && o.PPniK(typeof r[t(427)], o.wRKyh) ? r[t(427)](t(400), e) : o.thraG in r && typeof r[n(413)] !== o[n(397)] && (r.onmessage = e);
|
|
53
53
|
};
|
|
54
|
-
class
|
|
54
|
+
class z {
|
|
55
55
|
constructor(e) {
|
|
56
|
-
const t =
|
|
56
|
+
const t = w;
|
|
57
57
|
this[t(406)] = e;
|
|
58
58
|
}
|
|
59
59
|
async start() {
|
|
60
|
-
const e =
|
|
60
|
+
const e = w, t = w;
|
|
61
61
|
this[e(406)] && (this[e(406)][e(413)] = (n) => {
|
|
62
62
|
var s, o;
|
|
63
|
-
const
|
|
63
|
+
const a = e, i = t;
|
|
64
64
|
try {
|
|
65
|
-
const
|
|
66
|
-
(s = this[
|
|
67
|
-
} catch (
|
|
68
|
-
const
|
|
69
|
-
(o = this[
|
|
65
|
+
const l = ae[a(402)](n.data[a(400)]);
|
|
66
|
+
(s = this[a(413)]) == null || s.call(this, l, n[i(409)].extra);
|
|
67
|
+
} catch (l) {
|
|
68
|
+
const c = new Error("MessageChannel failed to parse message: " + l);
|
|
69
|
+
(o = this[i(408)]) == null || o.call(this, c);
|
|
70
70
|
}
|
|
71
71
|
}, this._port[e(396)] = (n) => {
|
|
72
72
|
var s;
|
|
73
|
-
const o = t,
|
|
74
|
-
(s = this.onerror) == null || s.call(this,
|
|
73
|
+
const o = t, a = t, i = new Error(o(394) + JSON[a(395)](n));
|
|
74
|
+
(s = this.onerror) == null || s.call(this, i);
|
|
75
75
|
}, this[e(406)][e(434)]());
|
|
76
76
|
}
|
|
77
77
|
async send(e, t) {
|
|
@@ -81,63 +81,63 @@ class W {
|
|
|
81
81
|
return s(o);
|
|
82
82
|
} };
|
|
83
83
|
return new Promise((s, o) => {
|
|
84
|
-
var
|
|
85
|
-
const
|
|
84
|
+
var a;
|
|
85
|
+
const i = w, l = w;
|
|
86
86
|
try {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const c = {};
|
|
88
|
+
c[i(403)] = t == null ? void 0 : t[i(403)];
|
|
89
89
|
const u = {};
|
|
90
|
-
u[
|
|
91
|
-
} catch (
|
|
92
|
-
const u =
|
|
93
|
-
(
|
|
90
|
+
u[l(400)] = e, u.extra = c, this[l(406)] && this[i(406)].postMessage(u), n.lEyuq(s);
|
|
91
|
+
} catch (c) {
|
|
92
|
+
const u = c instanceof Error ? c : new Error(n.YihNw(String, c));
|
|
93
|
+
(a = this[l(408)]) == null || a.call(this, u), o(u);
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
async close() {
|
|
98
98
|
var e, t;
|
|
99
|
-
const n =
|
|
99
|
+
const n = w, s = w;
|
|
100
100
|
(e = this._port) == null || e[n(431)](), this._port = void 0, (t = this[s(420)]) == null || t.call(this);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
class
|
|
103
|
+
class Q extends z {
|
|
104
104
|
constructor(e, t = se()) {
|
|
105
|
-
const n =
|
|
106
|
-
return
|
|
105
|
+
const n = w, s = w, o = { EkZCC: function(i, l, c, u) {
|
|
106
|
+
return i(l, c, u);
|
|
107
107
|
} };
|
|
108
108
|
super(), this[n(391)] = e, this[s(401)] = t;
|
|
109
|
-
const
|
|
110
|
-
this[s(406)] =
|
|
109
|
+
const a = new MessageChannel();
|
|
110
|
+
this[s(406)] = a.port1, o[s(426)](Se, this[n(401)], { endpoint: this[s(391)] }, [a[s(414)]]);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class
|
|
113
|
+
class X extends z {
|
|
114
114
|
constructor(e, t = se()) {
|
|
115
|
-
const n =
|
|
116
|
-
return o ===
|
|
117
|
-
}, kgkem: function(o,
|
|
118
|
-
return o(
|
|
115
|
+
const n = w, s = { mOWMr: function(o, a) {
|
|
116
|
+
return o === a;
|
|
117
|
+
}, kgkem: function(o, a, i) {
|
|
118
|
+
return o(a, i);
|
|
119
119
|
} };
|
|
120
120
|
super(), this._endpoint = e, this._globalObject = t, this[n(432)] = new Promise((o) => {
|
|
121
|
-
const
|
|
122
|
-
s[
|
|
123
|
-
const
|
|
124
|
-
|
|
121
|
+
const a = n, i = n;
|
|
122
|
+
s[a(392)](Le, this[i(401)], (l) => {
|
|
123
|
+
const c = i, u = i;
|
|
124
|
+
l.data && s[c(425)](l.data[u(422)], this[u(391)]) && (this[u(406)] = l.ports[-1 * 4852 + 1 * 1601 + 3251], o());
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
async listen() {
|
|
129
|
-
return this[
|
|
129
|
+
return this[w(432)];
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
const t =
|
|
134
|
-
return
|
|
132
|
+
function w(r, e) {
|
|
133
|
+
const t = V();
|
|
134
|
+
return w = function(n, s) {
|
|
135
135
|
return n = n - (17 * -491 + -669 + 9407), t[n];
|
|
136
|
-
},
|
|
136
|
+
}, w(r, e);
|
|
137
137
|
}
|
|
138
138
|
const qe = () => {
|
|
139
139
|
const r = new MessageChannel();
|
|
140
|
-
return [new
|
|
140
|
+
return [new z(r.port1), new z(r.port2)];
|
|
141
141
|
};
|
|
142
142
|
(function(r, e) {
|
|
143
143
|
const t = b, n = b, s = r();
|
|
@@ -148,213 +148,213 @@ const qe = () => {
|
|
|
148
148
|
} catch {
|
|
149
149
|
s.push(s.shift());
|
|
150
150
|
}
|
|
151
|
-
})(
|
|
151
|
+
})(A, -763475 + -52067 * 10 + 1724410);
|
|
152
152
|
const ke = async (r, e, t) => {
|
|
153
153
|
var n;
|
|
154
|
-
const s = b, o = b,
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
let
|
|
158
|
-
switch (
|
|
159
|
-
case
|
|
160
|
-
|
|
154
|
+
const s = b, o = b, a = {};
|
|
155
|
+
a[s(345)] = "tools/list", a.rqstG = "tools/call", a.WqUnk = "resources/list", a[s(329)] = o(358), a[s(365)] = s(335), a.ookoz = "resources/unsubscribe", a[s(385)] = s(340), a.VTIWq = "prompts/list", a.SkoRK = s(376), a.QUtUV = s(388), a.XtowM = o(332);
|
|
156
|
+
const i = a, { id: l, method: c, params: u } = t;
|
|
157
|
+
let d = {};
|
|
158
|
+
switch (c) {
|
|
159
|
+
case i[o(345)]:
|
|
160
|
+
d = await e.listTools(u);
|
|
161
161
|
break;
|
|
162
|
-
case
|
|
163
|
-
|
|
162
|
+
case i.rqstG:
|
|
163
|
+
d = await e.callTool(u);
|
|
164
164
|
break;
|
|
165
|
-
case
|
|
166
|
-
|
|
165
|
+
case i[s(334)]:
|
|
166
|
+
d = await e[s(350)](u);
|
|
167
167
|
break;
|
|
168
|
-
case
|
|
169
|
-
|
|
168
|
+
case i[o(329)]:
|
|
169
|
+
d = await e.listResourceTemplates(u);
|
|
170
170
|
break;
|
|
171
171
|
case s(372):
|
|
172
|
-
|
|
172
|
+
d = await e[s(383)](u);
|
|
173
173
|
break;
|
|
174
|
-
case
|
|
175
|
-
|
|
174
|
+
case i.HgYgW:
|
|
175
|
+
d = await e.subscribeResource(u);
|
|
176
176
|
break;
|
|
177
|
-
case
|
|
178
|
-
|
|
177
|
+
case i.ookoz:
|
|
178
|
+
d = await e.unsubscribeResource(u);
|
|
179
179
|
break;
|
|
180
|
-
case
|
|
181
|
-
|
|
180
|
+
case i[s(385)]:
|
|
181
|
+
d = await e.getPrompt(u);
|
|
182
182
|
break;
|
|
183
|
-
case
|
|
184
|
-
|
|
183
|
+
case i.VTIWq:
|
|
184
|
+
d = await e.listPrompts(u);
|
|
185
185
|
break;
|
|
186
|
-
case
|
|
187
|
-
|
|
186
|
+
case i[s(344)]:
|
|
187
|
+
d = await e[s(376)]();
|
|
188
188
|
break;
|
|
189
|
-
case
|
|
190
|
-
|
|
189
|
+
case i.QUtUV:
|
|
190
|
+
d = await e.complete(u);
|
|
191
191
|
break;
|
|
192
192
|
case s(390):
|
|
193
|
-
|
|
193
|
+
d = await e[s(336)](u == null ? void 0 : u.level);
|
|
194
194
|
break;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
197
|
-
|
|
196
|
+
const f = {};
|
|
197
|
+
f[s(361)] = d, f[s(394)] = i[s(364)], f.id = l, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[s(392)](f));
|
|
198
198
|
}, Te = async (r, e, t) => {
|
|
199
199
|
var n;
|
|
200
|
-
const s = b, o = b,
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
let
|
|
204
|
-
switch (
|
|
200
|
+
const s = b, o = b, a = {};
|
|
201
|
+
a.jQBBS = "sampling/createMessage", a.EZqgC = "elicitation/create", a[s(370)] = o(376), a.aVeaL = o(332);
|
|
202
|
+
const i = a, { id: l, method: c, params: u } = t;
|
|
203
|
+
let d = {};
|
|
204
|
+
switch (c) {
|
|
205
205
|
case s(368):
|
|
206
206
|
const h = {};
|
|
207
|
-
h.method =
|
|
207
|
+
h.method = c, h[o(367)] = u, d = await e.request(h, de);
|
|
208
208
|
break;
|
|
209
|
-
case
|
|
209
|
+
case i[o(391)]:
|
|
210
210
|
const x = {};
|
|
211
|
-
x.method =
|
|
212
|
-
break;
|
|
213
|
-
case a.EZqgC:
|
|
214
|
-
const p = {};
|
|
215
|
-
p.method = l, p.params = u, f = await e.request(p, le);
|
|
211
|
+
x.method = c, x[o(367)] = u, d = await e[o(381)](x, ue);
|
|
216
212
|
break;
|
|
217
|
-
case
|
|
213
|
+
case i.EZqgC:
|
|
218
214
|
const _ = {};
|
|
219
|
-
_.method =
|
|
215
|
+
_.method = c, _.params = u, d = await e.request(_, le);
|
|
216
|
+
break;
|
|
217
|
+
case i[o(370)]:
|
|
218
|
+
const p = {};
|
|
219
|
+
p.method = c, d = await e[o(381)](p, ce);
|
|
220
220
|
break;
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
return
|
|
222
|
+
const f = {};
|
|
223
|
+
return f[o(361)] = d, f.jsonrpc = i[o(387)], f.id = l, await ((n = r == null ? void 0 : r[s(371)]) == null ? void 0 : n.send(f)), d;
|
|
224
224
|
}, He = (r, e) => {
|
|
225
|
-
const t = b, n = { gXsjT: function(o,
|
|
226
|
-
return o ===
|
|
227
|
-
}, oegpC: t(351), lZOUC: function(o,
|
|
228
|
-
return o(
|
|
225
|
+
const t = b, n = { gXsjT: function(o, a) {
|
|
226
|
+
return o === a;
|
|
227
|
+
}, oegpC: t(351), lZOUC: function(o, a, i, l) {
|
|
228
|
+
return o(a, i, l);
|
|
229
229
|
}, ifIKG: "2.0" }, s = r._onrequest;
|
|
230
|
-
r._onrequest = async (o,
|
|
231
|
-
var
|
|
232
|
-
const
|
|
230
|
+
r._onrequest = async (o, a) => {
|
|
231
|
+
var i, l, c, u, d;
|
|
232
|
+
const f = t, h = t, { id: x, method: _ } = o;
|
|
233
233
|
try {
|
|
234
|
-
n[
|
|
235
|
-
} catch (
|
|
236
|
-
const { code: v, message:
|
|
234
|
+
n[f(333)](_, n.oegpC) ? await s[f(386)](r, o, a) : await n.lZOUC(ke, r, e, o);
|
|
235
|
+
} catch (p) {
|
|
236
|
+
const { code: v, message: I, data: L } = p;
|
|
237
237
|
try {
|
|
238
238
|
if (v) {
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
} else (
|
|
244
|
-
} catch (
|
|
245
|
-
(
|
|
239
|
+
const m = {};
|
|
240
|
+
m.code = v, m.message = I, m.data = L;
|
|
241
|
+
const S = {};
|
|
242
|
+
S.error = m, S[f(394)] = n[h(331)], S.id = x, await ((i = r == null ? void 0 : r.transport) == null ? void 0 : i.send(S));
|
|
243
|
+
} else (c = (l = r == null ? void 0 : r[h(371)]) == null ? void 0 : l.onerror) == null || c.call(l, p);
|
|
244
|
+
} catch (m) {
|
|
245
|
+
(d = (u = r == null ? void 0 : r[f(371)]) == null ? void 0 : u.onerror) == null || d.call(u, m);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
}, Pe = (r, e) => {
|
|
250
250
|
const t = b, n = b, s = {};
|
|
251
|
-
s[t(363)] = function(
|
|
252
|
-
return
|
|
251
|
+
s[t(363)] = function(a, i) {
|
|
252
|
+
return a !== i;
|
|
253
253
|
}, s[t(398)] = t(353), s.hzhyg = "notifications/cancelled";
|
|
254
254
|
const o = s;
|
|
255
|
-
r._onnotification = async (
|
|
256
|
-
var
|
|
257
|
-
const
|
|
258
|
-
if (o[
|
|
259
|
-
await e.notification(
|
|
255
|
+
r._onnotification = async (a) => {
|
|
256
|
+
var i, l;
|
|
257
|
+
const c = t, u = n, { method: d, params: f } = a;
|
|
258
|
+
if (o[c(363)](d, o[u(398)]) && (o[c(363)](d, o.hzhyg) || f != null && f.forward)) try {
|
|
259
|
+
await e.notification(a);
|
|
260
260
|
} catch (h) {
|
|
261
|
-
(
|
|
261
|
+
(l = (i = r == null ? void 0 : r.transport) == null ? void 0 : i.onerror) == null || l.call(i, h);
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
}, Me = (r, e) => async (t) => {
|
|
265
|
-
var n, s, o,
|
|
266
|
-
const
|
|
267
|
-
u.SEmWX =
|
|
268
|
-
const
|
|
265
|
+
var n, s, o, a, i;
|
|
266
|
+
const l = b, c = b, u = {};
|
|
267
|
+
u.SEmWX = l(332);
|
|
268
|
+
const d = u;
|
|
269
269
|
try {
|
|
270
270
|
return await Te(r, e, t);
|
|
271
|
-
} catch (
|
|
272
|
-
const { code: h, message: x, data:
|
|
271
|
+
} catch (f) {
|
|
272
|
+
const { code: h, message: x, data: _ } = f;
|
|
273
273
|
try {
|
|
274
274
|
if (h) {
|
|
275
|
-
const
|
|
276
|
-
|
|
275
|
+
const p = {};
|
|
276
|
+
p[c(377)] = h, p.message = x, p.data = _;
|
|
277
277
|
const v = {};
|
|
278
|
-
v[
|
|
279
|
-
} else (o = (s = r == null ? void 0 : r.transport) == null ? void 0 : s[
|
|
280
|
-
} catch (
|
|
281
|
-
(
|
|
278
|
+
v[c(348)] = p, v.jsonrpc = d[l(338)], v.id = t.id, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[c(392)](v));
|
|
279
|
+
} else (o = (s = r == null ? void 0 : r.transport) == null ? void 0 : s[c(339)]) == null || o.call(s, f);
|
|
280
|
+
} catch (p) {
|
|
281
|
+
(i = (a = r == null ? void 0 : r[l(371)]) == null ? void 0 : a[c(339)]) == null || i.call(a, p);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}, Ue = (r, e) => async (t) => {
|
|
285
285
|
var n, s, o;
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
},
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
} catch (
|
|
295
|
-
(o = (s = r == null ? void 0 : r[
|
|
286
|
+
const a = b, i = b, l = {};
|
|
287
|
+
l.dtUgZ = function(f, h) {
|
|
288
|
+
return f !== h;
|
|
289
|
+
}, l.jgCIb = a(353), l.uUjKY = "2.0";
|
|
290
|
+
const c = l, { method: u, params: d } = t;
|
|
291
|
+
if (c.dtUgZ(u, c.jgCIb) && (u !== a(400) || d != null && d.forward)) try {
|
|
292
|
+
const f = { ...t };
|
|
293
|
+
f[a(394)] = c[i(352)], await ((n = e == null ? void 0 : e[a(371)]) == null ? void 0 : n[a(392)](f));
|
|
294
|
+
} catch (f) {
|
|
295
|
+
(o = (s = r == null ? void 0 : r[a(371)]) == null ? void 0 : s[i(339)]) == null || o.call(s, f);
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
function b(r, e) {
|
|
299
|
-
const t =
|
|
299
|
+
const t = A();
|
|
300
300
|
return b = function(n, s) {
|
|
301
301
|
return n = n - (9 * -113 + -1439 * -1 + -97), t[n];
|
|
302
302
|
}, b(r, e);
|
|
303
303
|
}
|
|
304
304
|
const Oe = (r, e) => async (t) => {
|
|
305
|
-
var n, s, o,
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
const
|
|
305
|
+
var n, s, o, a, i, l;
|
|
306
|
+
const c = b, u = b, d = {};
|
|
307
|
+
d[c(401)] = u(332);
|
|
308
|
+
const f = d;
|
|
309
309
|
try {
|
|
310
310
|
await ((n = e == null ? void 0 : e.transport) == null ? void 0 : n.send(t));
|
|
311
311
|
} catch (h) {
|
|
312
|
-
const { code: x, message:
|
|
312
|
+
const { code: x, message: _, data: p } = h;
|
|
313
313
|
try {
|
|
314
314
|
if (x) {
|
|
315
315
|
const v = {};
|
|
316
|
-
v.code = x, v[
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
} else (
|
|
316
|
+
v.code = x, v[c(399)] = _, v.data = p;
|
|
317
|
+
const I = {};
|
|
318
|
+
I[c(348)] = v, I[c(394)] = f.OhJjz, I.id = t.id, await ((s = r == null ? void 0 : r[c(371)]) == null ? void 0 : s.send(I));
|
|
319
|
+
} else (a = (o = r == null ? void 0 : r.transport) == null ? void 0 : o[u(339)]) == null || a.call(o, h);
|
|
320
320
|
} catch (v) {
|
|
321
|
-
(
|
|
321
|
+
(l = (i = r == null ? void 0 : r.transport) == null ? void 0 : i.onerror) == null || l.call(i, v);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
const r = b, e = b, t = { vnkqu: function(
|
|
326
|
-
return
|
|
327
|
-
}, wxDWr: function(
|
|
328
|
-
return
|
|
329
|
-
}, GdkkV: function(
|
|
330
|
-
return
|
|
331
|
-
} }, n = [], s = (
|
|
332
|
-
const
|
|
324
|
+
}, G = () => {
|
|
325
|
+
const r = b, e = b, t = { vnkqu: function(c, u) {
|
|
326
|
+
return c !== u;
|
|
327
|
+
}, wxDWr: function(c, u) {
|
|
328
|
+
return c(u);
|
|
329
|
+
}, GdkkV: function(c, u) {
|
|
330
|
+
return c === u;
|
|
331
|
+
} }, n = [], s = (c, u) => {
|
|
332
|
+
const d = b, f = b;
|
|
333
333
|
if (u) {
|
|
334
334
|
const h = [];
|
|
335
335
|
for (const x of n)
|
|
336
336
|
try {
|
|
337
|
-
h.push(x(
|
|
337
|
+
h.push(x(c, u));
|
|
338
338
|
} catch {
|
|
339
339
|
}
|
|
340
340
|
for (const x of h)
|
|
341
|
-
if (t[
|
|
341
|
+
if (t[d(379)](x, null)) return x;
|
|
342
342
|
} else for (const h of n)
|
|
343
343
|
try {
|
|
344
|
-
t[
|
|
344
|
+
t[f(343)](h, c);
|
|
345
345
|
} catch {
|
|
346
346
|
}
|
|
347
|
-
}, o = (
|
|
347
|
+
}, o = (c) => {
|
|
348
348
|
const u = b;
|
|
349
|
-
t[u(384)](typeof
|
|
350
|
-
},
|
|
351
|
-
const u = n.indexOf(
|
|
349
|
+
t[u(384)](typeof c, u(369)) && !n.includes(c) && n.push(c);
|
|
350
|
+
}, a = (c) => {
|
|
351
|
+
const u = n.indexOf(c);
|
|
352
352
|
u !== -1 && n.splice(u, 1 * -6854 + 8 * -33 + 7119);
|
|
353
|
-
},
|
|
354
|
-
const
|
|
355
|
-
n[
|
|
356
|
-
},
|
|
357
|
-
return
|
|
353
|
+
}, i = () => {
|
|
354
|
+
const c = b;
|
|
355
|
+
n[c(374)] = 7102 * 1 + 5522 + -526 * 24;
|
|
356
|
+
}, l = {};
|
|
357
|
+
return l[r(346)] = s, l[e(330)] = o, l.removeListener = a, l[r(359)] = i, l;
|
|
358
358
|
}, Fe = (r) => {
|
|
359
359
|
const e = b, t = b, n = { xwPeb: function(s) {
|
|
360
360
|
return s();
|
|
@@ -362,38 +362,38 @@ const Oe = (r, e) => async (t) => {
|
|
|
362
362
|
return s();
|
|
363
363
|
} };
|
|
364
364
|
{
|
|
365
|
-
const { handleListener: s, addListener: o, removeListener:
|
|
366
|
-
r._onresponse = s, r[e(395)] = o, r.removeResponseListener =
|
|
365
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n[e(326)](G);
|
|
366
|
+
r._onresponse = s, r[e(395)] = o, r.removeResponseListener = a, r.clearResponseListener = i;
|
|
367
367
|
}
|
|
368
368
|
{
|
|
369
|
-
const { handleListener: s, addListener: o, removeListener:
|
|
370
|
-
r[t(328)] = s, r.addRequestListener = o, r[t(354)] =
|
|
369
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n[t(326)](G);
|
|
370
|
+
r[t(328)] = s, r.addRequestListener = o, r[t(354)] = a, r[t(341)] = i;
|
|
371
371
|
}
|
|
372
372
|
{
|
|
373
|
-
const { handleListener: s, addListener: o, removeListener:
|
|
374
|
-
r[e(342)] = s, r[e(327)] = o, r.removeNotificationListener =
|
|
373
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n[e(375)](G);
|
|
374
|
+
r[e(342)] = s, r[e(327)] = o, r.removeNotificationListener = a, r.clearNotificationListener = i;
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
-
function
|
|
377
|
+
function A() {
|
|
378
378
|
const r = ["uUjKY", "notifications/initialized", "removeRequestListener", "96194JysfjF", "36346SGEWAV", "1357830AJaOeY", "resources/templates/list", "clearListener", "iQqcJ", "result", "tqDZP", "sSeCz", "XtowM", "HgYgW", "3913230mjiatC", "params", "roots/list", "function", "bfmJT", "transport", "resources/read", "27FNuDmk", "length", "Mfvzm", "ping", "code", "_onresponse", "vnkqu", "cjSoZ", "request", "9gIMIPC", "readResource", "GdkkV", "ptMjy", "call", "aVeaL", "completion/complete", "5035122lFbpzR", "logging/setLevel", "jQBBS", "send", "_requestHandlers", "jsonrpc", "addResponseListener", "7SpcenI", "ElOQH", "MDIkN", "message", "notifications/cancelled", "OhJjz", "clear", "672216JzFEyR", "xwPeb", "addNotificationListener", "fallbackRequestHandler", "sYzPD", "addListener", "ifIKG", "2.0", "gXsjT", "WqUnk", "resources/subscribe", "setLoggingLevel", "2491772kFUWFh", "SEmWX", "onerror", "prompts/get", "clearRequestListener", "fallbackNotificationHandler", "wxDWr", "SkoRK", "uTeHc", "handleListener", "Zybtx", "error", "originalOnResponse", "listResources", "initialize"];
|
|
379
|
-
return
|
|
379
|
+
return A = function() {
|
|
380
380
|
return r;
|
|
381
|
-
},
|
|
381
|
+
}, A();
|
|
382
382
|
}
|
|
383
383
|
const je = (r, { beforeInit: e, afterInit: t } = {}) => {
|
|
384
|
-
const n = b, s = b, o = { tqDZP: function(
|
|
385
|
-
return
|
|
386
|
-
}, cjSoZ: "function", iQqcJ: n(378), Zybtx: function(
|
|
387
|
-
return
|
|
388
|
-
}, ElOQH: function(
|
|
389
|
-
return
|
|
390
|
-
} },
|
|
391
|
-
r[n(393)][n(402)](), r._notificationHandlers[n(402)](), o.tqDZP(typeof e, o[n(380)]) && e(), o[n(362)](r._onresponse.name, o[n(360)]) && (r[s(349)] = r._onresponse), o[n(347)](Fe, r), r.addResponseListener((
|
|
392
|
-
const
|
|
393
|
-
r.originalOnResponse[
|
|
394
|
-
}), o.tqDZP(typeof t, o[s(380)]) && o[n(397)](t), r[s(327)]((
|
|
395
|
-
const { method:
|
|
396
|
-
o.tqDZP(typeof
|
|
384
|
+
const n = b, s = b, o = { tqDZP: function(i, l) {
|
|
385
|
+
return i === l;
|
|
386
|
+
}, cjSoZ: "function", iQqcJ: n(378), Zybtx: function(i, l) {
|
|
387
|
+
return i(l);
|
|
388
|
+
}, ElOQH: function(i) {
|
|
389
|
+
return i();
|
|
390
|
+
} }, a = new Map(r._notificationHandlers);
|
|
391
|
+
r[n(393)][n(402)](), r._notificationHandlers[n(402)](), o.tqDZP(typeof e, o[n(380)]) && e(), o[n(362)](r._onresponse.name, o[n(360)]) && (r[s(349)] = r._onresponse), o[n(347)](Fe, r), r.addResponseListener((i) => {
|
|
392
|
+
const l = s;
|
|
393
|
+
r.originalOnResponse[l(386)](r, i);
|
|
394
|
+
}), o.tqDZP(typeof t, o[s(380)]) && o[n(397)](t), r[s(327)]((i) => {
|
|
395
|
+
const { method: l } = i, c = a.get(l);
|
|
396
|
+
o.tqDZP(typeof c, o.cjSoZ) && c(i);
|
|
397
397
|
});
|
|
398
398
|
}, Ne = q, Ee = q;
|
|
399
399
|
(function(r, e) {
|
|
@@ -405,18 +405,18 @@ const je = (r, { beforeInit: e, afterInit: t } = {}) => {
|
|
|
405
405
|
} catch {
|
|
406
406
|
s.push(s.shift());
|
|
407
407
|
}
|
|
408
|
-
})(
|
|
408
|
+
})(W, -1 * -881393 + 2 * 180895 + 1 * -644809);
|
|
409
409
|
function q(r, e) {
|
|
410
|
-
const t =
|
|
410
|
+
const t = W();
|
|
411
411
|
return q = function(n, s) {
|
|
412
412
|
return n = n - (-1861 + -499 * 4 + 4241), t[n];
|
|
413
413
|
}, q(r, e);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function W() {
|
|
416
416
|
const r = ["toString", "getRandomValues", "2101mUsYMI", "EQHzo", "padStart", "30UvDAkd", "1609706yzlqYx", "974735GrhZVO", "randomUUID", "REzPF", "562771BvAnoG", "dHTfU", "2047455boiYXf", "randomBytes", "14664qHAdbF", "3772144jLpQch", "52310AkWksx", "318MkjaVb", "from", "40WRwnSc"];
|
|
417
|
-
return
|
|
417
|
+
return W = function() {
|
|
418
418
|
return r;
|
|
419
|
-
},
|
|
419
|
+
}, W();
|
|
420
420
|
}
|
|
421
421
|
const Ve = () => {
|
|
422
422
|
const r = q, e = q, t = {};
|
|
@@ -429,15 +429,15 @@ const Ve = () => {
|
|
|
429
429
|
}, t[e(394)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
430
430
|
const n = t;
|
|
431
431
|
return n.suJHI(typeof crypto, "object") && crypto.randomUUID ? crypto[e(391)]() : n.dHTfU.replace(/[xy]/g, (s) => {
|
|
432
|
-
const o = r,
|
|
433
|
-
return (n.suJHI(s, "x") ?
|
|
432
|
+
const o = r, a = r, i = n[o(392)](crypto[o(384)](new Uint8Array(-25 * -62 + 7113 + 2 * -4331))[741 * 2 + -1385 * -2 + 4252 * -1], 8648 + -107 * 62 + -1999);
|
|
433
|
+
return (n.suJHI(s, "x") ? i : n[a(386)](i, -4377 + 4 * 1095) | 5079 + 461 * -11).toString(9449 + 4 * -461 + -7589);
|
|
434
434
|
});
|
|
435
435
|
}, ze = (r) => {
|
|
436
436
|
const e = q, t = q, n = new Uint8Array(r);
|
|
437
437
|
return crypto.getRandomValues(n), Array[e(401)](n, (s) => s[t(403)](-3 * 1739 + -6509 + 2 * 5871)[e(387)](2, "0")).join("");
|
|
438
438
|
}, P = {};
|
|
439
439
|
P[Ne(391)] = Ve, P[Ee(396)] = ze;
|
|
440
|
-
const
|
|
440
|
+
const R = k;
|
|
441
441
|
(function(r, e) {
|
|
442
442
|
const t = k, n = k, s = r();
|
|
443
443
|
for (; ; )
|
|
@@ -447,192 +447,192 @@ const S = k;
|
|
|
447
447
|
} catch {
|
|
448
448
|
s.push(s.shift());
|
|
449
449
|
}
|
|
450
|
-
})(
|
|
450
|
+
})(B, 1472653 * 1 + -2 * -897917 + -2275789);
|
|
451
451
|
const Ae = (r, e) => {
|
|
452
|
-
const t = k, n = k, s = { FyYHt: function(
|
|
453
|
-
return c
|
|
454
|
-
}, Fxtoq: function(
|
|
455
|
-
return c
|
|
452
|
+
const t = k, n = k, s = { FyYHt: function(l, c, u) {
|
|
453
|
+
return l(c, u);
|
|
454
|
+
}, Fxtoq: function(l, c, u) {
|
|
455
|
+
return l(c, u);
|
|
456
456
|
} };
|
|
457
457
|
He(r, e), Pe(r, e);
|
|
458
|
-
const o = Me(e, r),
|
|
459
|
-
e[n(537)](o), e[t(519)](
|
|
460
|
-
const
|
|
461
|
-
e.removeRequestListener(o), e[
|
|
458
|
+
const o = Me(e, r), a = s[t(510)](Oe, e, r), i = s[n(549)](Ue, e, r);
|
|
459
|
+
e[n(537)](o), e[t(519)](a), e.addNotificationListener(i), r[n(556)] = () => {
|
|
460
|
+
const l = n;
|
|
461
|
+
e.removeRequestListener(o), e[l(530)](a), e[l(529)](i);
|
|
462
462
|
};
|
|
463
|
-
},
|
|
464
|
-
const n = k, s = { pMiva: function(
|
|
465
|
-
return
|
|
466
|
-
}, TeTEy: n(546), fyZbd: function(
|
|
467
|
-
return
|
|
463
|
+
}, K = (r, e, t) => {
|
|
464
|
+
const n = k, s = { pMiva: function(i, l) {
|
|
465
|
+
return i instanceof l;
|
|
466
|
+
}, TeTEy: n(546), fyZbd: function(i, l, c) {
|
|
467
|
+
return i(l, c);
|
|
468
468
|
} }, o = () => {
|
|
469
|
-
var
|
|
470
|
-
const
|
|
471
|
-
s.pMiva(t,
|
|
472
|
-
var
|
|
473
|
-
const u =
|
|
474
|
-
(
|
|
469
|
+
var i;
|
|
470
|
+
const l = n;
|
|
471
|
+
s.pMiva(t, N) && ((i = t._eventSource) == null || i.addEventListener(s[l(547)], () => {
|
|
472
|
+
var c;
|
|
473
|
+
const u = l;
|
|
474
|
+
(c = t[u(509)]) == null || c[u(546)]();
|
|
475
475
|
})), Ae(r, e);
|
|
476
|
-
},
|
|
477
|
-
|
|
476
|
+
}, a = {};
|
|
477
|
+
a.afterInit = o, s.fyZbd(je, e, a);
|
|
478
478
|
}, re = (r, e = P.randomUUID()) => {
|
|
479
|
-
const t = k, n = k, s = { OfssH: function(u,
|
|
480
|
-
return u(
|
|
479
|
+
const t = k, n = k, s = { OfssH: function(u, d, f) {
|
|
480
|
+
return u(d, f);
|
|
481
481
|
} }, o = {};
|
|
482
482
|
o[t(528)] = e;
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
const
|
|
489
|
-
Object.entries(
|
|
490
|
-
x[h(527)](
|
|
483
|
+
const a = o, i = {};
|
|
484
|
+
i[t(528)] = e;
|
|
485
|
+
const l = {};
|
|
486
|
+
l[n(558)] = i, l[t(534)] = t(524);
|
|
487
|
+
const c = { requestInit: l, eventSourceInit: { async fetch(u, d) {
|
|
488
|
+
const f = t, h = n, x = new Headers((d == null ? void 0 : d[f(558)]) || {});
|
|
489
|
+
Object.entries(a)[h(498)](([p, v]) => {
|
|
490
|
+
x[h(527)](p, v);
|
|
491
491
|
});
|
|
492
|
-
const
|
|
493
|
-
return
|
|
492
|
+
const _ = { ...d };
|
|
493
|
+
return _[h(558)] = x, s.OfssH(fetch, u, _);
|
|
494
494
|
}, withCredentials: !0 } };
|
|
495
|
-
return r && (
|
|
496
|
-
}, oe = (r, e = P[
|
|
497
|
-
const t =
|
|
495
|
+
return r && (c.requestInit[t(558)].Authorization = t(533) + r, a.Authorization = "Bearer " + r), c;
|
|
496
|
+
}, oe = (r, e = P[R(517)]()) => {
|
|
497
|
+
const t = R, n = R, s = {};
|
|
498
498
|
s.nwQhY = "include";
|
|
499
|
-
const o = s,
|
|
500
|
-
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
return r && (
|
|
507
|
-
},
|
|
508
|
-
const n =
|
|
509
|
-
return
|
|
510
|
-
}, egwVO: function(
|
|
511
|
-
return
|
|
512
|
-
} },
|
|
499
|
+
const o = s, a = {};
|
|
500
|
+
a["stream-session-id"] = e;
|
|
501
|
+
const i = {};
|
|
502
|
+
i.headers = a, i.credentials = o[t(520)];
|
|
503
|
+
const l = {};
|
|
504
|
+
l[t(544)] = i;
|
|
505
|
+
const c = l;
|
|
506
|
+
return r && (c.requestInit.headers[n(552)] = n(533) + r), c;
|
|
507
|
+
}, $ = async (r, e, t) => {
|
|
508
|
+
const n = R, s = R, o = { CFfFC: function(i) {
|
|
509
|
+
return i();
|
|
510
|
+
}, egwVO: function(i, l, c, u) {
|
|
511
|
+
return i(l, c, u);
|
|
512
|
+
} }, a = o.CFfFC(t);
|
|
513
513
|
try {
|
|
514
|
-
return await r[n(538)](
|
|
515
|
-
} catch (
|
|
516
|
-
if (
|
|
517
|
-
const
|
|
518
|
-
return await
|
|
519
|
-
} else throw
|
|
514
|
+
return await r[n(538)](a), a;
|
|
515
|
+
} catch (i) {
|
|
516
|
+
if (i instanceof Re) {
|
|
517
|
+
const l = await e();
|
|
518
|
+
return await a[s(505)](l), await o[n(525)]($, r, e, t);
|
|
519
|
+
} else throw i;
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
522
|
function k(r, e) {
|
|
523
|
-
const t =
|
|
523
|
+
const t = B();
|
|
524
524
|
return k = function(n, s) {
|
|
525
525
|
return n = n - (74 * -67 + -8341 + -73 * -189), t[n];
|
|
526
526
|
}, k(r, e);
|
|
527
527
|
}
|
|
528
528
|
const ie = (r, e) => {
|
|
529
|
-
const t =
|
|
530
|
-
s.RsKXs = function(
|
|
531
|
-
return
|
|
529
|
+
const t = R, n = R, s = {};
|
|
530
|
+
s.RsKXs = function(a, i) {
|
|
531
|
+
return a in i;
|
|
532
532
|
}, s.PBhps = "waitForOAuthCode", s[t(535)] = "function", s[t(507)] = "waitForOAuthCode need to be provided when authProvider is provided";
|
|
533
533
|
const o = s;
|
|
534
534
|
if (o.RsKXs(o[n(551)], r)) return r[n(523)];
|
|
535
535
|
if (typeof e === o.yTKoP) return e;
|
|
536
536
|
throw new Error(o.RZhOv);
|
|
537
537
|
}, We = async (r) => {
|
|
538
|
-
const e =
|
|
539
|
-
return
|
|
540
|
-
}, HwvVa: "mcp-sse-proxy-client", ufTHS: function(
|
|
541
|
-
return
|
|
542
|
-
}, WIVYl: function(
|
|
543
|
-
return
|
|
544
|
-
}, jniGY: "sessionId" }, { client: s, url: o, token:
|
|
545
|
-
|
|
546
|
-
const h =
|
|
547
|
-
if (
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
} else h[t(544)] =
|
|
538
|
+
const e = R, t = R, n = { TFSRn: function(g, T, H) {
|
|
539
|
+
return g(T, H);
|
|
540
|
+
}, HwvVa: "mcp-sse-proxy-client", ufTHS: function(g) {
|
|
541
|
+
return g();
|
|
542
|
+
}, WIVYl: function(g, T, H, O) {
|
|
543
|
+
return g(T, H, O);
|
|
544
|
+
}, jniGY: "sessionId" }, { client: s, url: o, token: a, sessionId: i, authProvider: l, requestInit: c, eventSourceInit: u, waitForOAuthCode: d } = r, f = {};
|
|
545
|
+
f.authProvider = l, f.requestInit = c, f.eventSourceInit = u;
|
|
546
|
+
const h = f, x = i || P.randomUUID(), _ = n[e(506)](re, a, x);
|
|
547
|
+
if (c) {
|
|
548
|
+
const g = { ..._.requestInit, ...c };
|
|
549
|
+
g.headers = { ..._[e(544)].headers, ...c.headers }, h.requestInit = g;
|
|
550
|
+
} else h[t(544)] = _.requestInit;
|
|
551
551
|
if (u) {
|
|
552
|
-
const
|
|
553
|
-
h.eventSourceInit =
|
|
554
|
-
} else h.eventSourceInit =
|
|
555
|
-
const
|
|
556
|
-
|
|
552
|
+
const g = { ..._[e(559)], ...u };
|
|
553
|
+
h.eventSourceInit = g;
|
|
554
|
+
} else h.eventSourceInit = _.eventSourceInit;
|
|
555
|
+
const p = {};
|
|
556
|
+
p.listChanged = !0;
|
|
557
557
|
const v = {};
|
|
558
|
-
v.roots =
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
let
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
} else await
|
|
569
|
-
n[t(513)](
|
|
558
|
+
v.roots = p, v.sampling = {}, v[e(511)] = {};
|
|
559
|
+
const I = v, L = {};
|
|
560
|
+
L[t(536)] = n.HwvVa, L.version = e(526);
|
|
561
|
+
const m = {};
|
|
562
|
+
m.capabilities = I;
|
|
563
|
+
const S = new j(L, m), U = () => new N(new URL(o), h);
|
|
564
|
+
let C = n[t(504)](U);
|
|
565
|
+
if (l) {
|
|
566
|
+
const g = n[e(506)](ie, l, d);
|
|
567
|
+
C = await n[t(513)]($, S, g, U);
|
|
568
|
+
} else await S[e(538)](C);
|
|
569
|
+
n[t(513)](K, S, s, C), C[t(557)] = C[t(542)].searchParams[t(532)](n.jniGY);
|
|
570
570
|
const M = {};
|
|
571
|
-
return M.transport =
|
|
571
|
+
return M.transport = C, M.sessionId = C[e(557)], M;
|
|
572
572
|
};
|
|
573
|
-
function
|
|
573
|
+
function B() {
|
|
574
574
|
const r = ["ufTHS", "finishAuth", "TFSRn", "RZhOv", "Vajmx", "_eventSource", "FyYHt", "elicitation", "transport", "WIVYl", "13320uyrBtN", "sampling", "8WTwLJD", "randomUUID", "6438654bkJHij", "addResponseListener", "nwQhY", "11721GVgRMJ", "?sessionId=", "waitForOAuthCode", "include", "egwVO", "1.0.0", "set", "sse-session-id", "removeNotificationListener", "removeResponseListener", "11838520fNkjrV", "get", "Bearer ", "credentials", "yTKoP", "name", "addRequestListener", "connect", "18VhCgQv", "mcp-socket-proxy-client", "2819364JNqkQZ", "_endpoint", "699JyrxCR", "requestInit", "44ofbsvb", "close", "TeTEy", "QgzDy", "Fxtoq", "roots", "PBhps", "Authorization", "11309130xGCFwl", "&token=", "version", "onclose", "sessionId", "headers", "eventSourceInit", "forEach", "62FcOkCa", "mcp-stream-proxy-client", "zXcpO", "1794855cQEXDT", "biJOc"];
|
|
575
|
-
return
|
|
575
|
+
return B = function() {
|
|
576
576
|
return r;
|
|
577
|
-
},
|
|
577
|
+
}, B();
|
|
578
578
|
}
|
|
579
579
|
const Be = async (r) => {
|
|
580
|
-
const e =
|
|
581
|
-
return
|
|
582
|
-
}, zXcpO: function(
|
|
583
|
-
return
|
|
584
|
-
}, zDnjZ: function(
|
|
585
|
-
return
|
|
586
|
-
}, FQMAh: function(
|
|
587
|
-
return
|
|
588
|
-
} }, { client: s, url: o, token:
|
|
589
|
-
|
|
590
|
-
const h =
|
|
591
|
-
if (l) {
|
|
592
|
-
const w = { ...p.requestInit, ...l };
|
|
593
|
-
w.headers = { ...p.requestInit.headers, ...l.headers }, h[e(544)] = w;
|
|
594
|
-
} else h.requestInit = p.requestInit;
|
|
595
|
-
const _ = {};
|
|
596
|
-
_.listChanged = !0;
|
|
597
|
-
const v = {};
|
|
598
|
-
v[t(550)] = _, v.sampling = {}, v.elicitation = {};
|
|
599
|
-
const m = v, y = {};
|
|
600
|
-
y[e(536)] = n[t(508)], y[e(555)] = "1.0.0";
|
|
601
|
-
const I = {};
|
|
602
|
-
I.capabilities = m;
|
|
603
|
-
const L = new V(y, I), O = () => new N(new URL(o), h);
|
|
604
|
-
let R = n[e(503)](O);
|
|
580
|
+
const e = R, t = R, n = { Vajmx: e(500), biJOc: function(g) {
|
|
581
|
+
return g();
|
|
582
|
+
}, zXcpO: function(g, T, H) {
|
|
583
|
+
return g(T, H);
|
|
584
|
+
}, zDnjZ: function(g, T, H, O) {
|
|
585
|
+
return g(T, H, O);
|
|
586
|
+
}, FQMAh: function(g, T, H, O) {
|
|
587
|
+
return g(T, H, O);
|
|
588
|
+
} }, { client: s, url: o, token: a, sessionId: i, authProvider: l, requestInit: c, reconnectionOptions: u, waitForOAuthCode: d } = r, f = {};
|
|
589
|
+
f.authProvider = l, f.requestInit = c, f.reconnectionOptions = u;
|
|
590
|
+
const h = f, x = i || P.randomUUID(), _ = oe(a, x);
|
|
605
591
|
if (c) {
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
} else
|
|
609
|
-
|
|
592
|
+
const g = { ..._.requestInit, ...c };
|
|
593
|
+
g.headers = { ..._.requestInit.headers, ...c.headers }, h[e(544)] = g;
|
|
594
|
+
} else h.requestInit = _.requestInit;
|
|
595
|
+
const p = {};
|
|
596
|
+
p.listChanged = !0;
|
|
597
|
+
const v = {};
|
|
598
|
+
v[t(550)] = p, v.sampling = {}, v.elicitation = {};
|
|
599
|
+
const I = v, L = {};
|
|
600
|
+
L[e(536)] = n[t(508)], L[e(555)] = "1.0.0";
|
|
601
|
+
const m = {};
|
|
602
|
+
m.capabilities = I;
|
|
603
|
+
const S = new j(L, m), U = () => new J(new URL(o), h);
|
|
604
|
+
let C = n[e(503)](U);
|
|
605
|
+
if (l) {
|
|
606
|
+
const g = n[e(501)](ie, l, d);
|
|
607
|
+
C = await n.zDnjZ($, S, g, U);
|
|
608
|
+
} else await S.connect(C);
|
|
609
|
+
n.FQMAh(K, S, s, C);
|
|
610
610
|
const M = {};
|
|
611
|
-
return M.transport =
|
|
611
|
+
return M.transport = C, M[t(557)] = C.sessionId, M;
|
|
612
612
|
}, De = async (r) => {
|
|
613
|
-
const e =
|
|
614
|
-
return v(
|
|
615
|
-
} }, { client: s, url: o, token:
|
|
616
|
-
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
const u =
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
const h = new
|
|
624
|
-
await h.connect(
|
|
625
|
-
const
|
|
626
|
-
return
|
|
627
|
-
},
|
|
628
|
-
function
|
|
629
|
-
const t =
|
|
630
|
-
return
|
|
613
|
+
const e = R, t = R, n = { QgzDy: e(540), jkaVB: function(v, I, L, m) {
|
|
614
|
+
return v(I, L, m);
|
|
615
|
+
} }, { client: s, url: o, token: a, sessionId: i } = r, l = {};
|
|
616
|
+
l.listChanged = !0;
|
|
617
|
+
const c = {};
|
|
618
|
+
c[e(550)] = l, c[e(515)] = {}, c[t(511)] = {};
|
|
619
|
+
const u = c, d = {};
|
|
620
|
+
d.name = n[t(548)], d[t(555)] = t(526);
|
|
621
|
+
const f = {};
|
|
622
|
+
f.capabilities = u;
|
|
623
|
+
const h = new j(d, f), x = i || P[t(517)](), _ = new te(new URL(o + e(522) + x + t(554) + a));
|
|
624
|
+
await h.connect(_), n.jkaVB(K, h, s, _);
|
|
625
|
+
const p = {};
|
|
626
|
+
return p[e(512)] = _, p[t(557)] = x, p;
|
|
627
|
+
}, F = y, E = y;
|
|
628
|
+
function y(r, e) {
|
|
629
|
+
const t = D();
|
|
630
|
+
return y = function(n, s) {
|
|
631
631
|
return n = n - (-16761 + 51 * 337), t[n];
|
|
632
|
-
},
|
|
632
|
+
}, y(r, e);
|
|
633
633
|
}
|
|
634
634
|
(function(r, e) {
|
|
635
|
-
const t =
|
|
635
|
+
const t = y, n = y, s = r();
|
|
636
636
|
for (; ; )
|
|
637
637
|
try {
|
|
638
638
|
if (-parseInt(t(440)) / 1 + -parseInt(t(458)) / 2 * (parseInt(t(448)) / 3) + -parseInt(t(451)) / 4 * (parseInt(n(449)) / 5) + -parseInt(n(455)) / 6 + -parseInt(t(427)) / 7 + -parseInt(n(438)) / 8 * (parseInt(n(459)) / 9) + parseInt(t(430)) / 10 * (parseInt(n(436)) / 11) === e) break;
|
|
@@ -640,52 +640,52 @@ function C(r, e) {
|
|
|
640
640
|
} catch {
|
|
641
641
|
s.push(s.shift());
|
|
642
642
|
}
|
|
643
|
-
})(
|
|
644
|
-
function
|
|
643
|
+
})(D, -220880 + 1 * -333337 + -2 * -384996);
|
|
644
|
+
function D() {
|
|
645
645
|
const r = ["650XPHLhD", "redirectToAuthorization", "10856jPvMVb", "GET", "qcFPW", "_redirectUrl", "2187414WnlGuZ", "resolve", "tokens", "3976YyOqUl", "27ejNHsa", "Content-Type", "waitForOAuthCode", "2903796yvWZFa", "_clientMetadata", "application/x-www-form-urlencoded", "10beEWJk", "json", "code", "_callBackPromise", "reject", "saveClientInformation", "20776349mLNCcF", "_codeVerifier", "629912aTknXq", "_tokens", "52074GwcpRo", "state", "_state", "_redirectCallback", "_clientInformation", "redirect_uris", "Failed to redirect: ", "clientInformation", "381aduWsB"];
|
|
646
|
-
return
|
|
646
|
+
return D = function() {
|
|
647
647
|
return r;
|
|
648
|
-
},
|
|
648
|
+
}, D();
|
|
649
649
|
}
|
|
650
650
|
const Ze = () => P.randomBytes(3485 * 1 + -261 + -3184);
|
|
651
651
|
class tt {
|
|
652
652
|
constructor(e) {
|
|
653
|
-
const t =
|
|
653
|
+
const t = y, n = y;
|
|
654
654
|
this._callBackPromise = {};
|
|
655
|
-
const { clientMetadata: s, state: o, redirectCallback:
|
|
656
|
-
this[t(428)] = s, this[t(454)] = s[t(445)][0], this._state = o || Ze(), this._redirectCallback =
|
|
655
|
+
const { clientMetadata: s, state: o, redirectCallback: a, getAuthCodeByState: i, waitForOAuthCode: l } = e;
|
|
656
|
+
this[t(428)] = s, this[t(454)] = s[t(445)][0], this._state = o || Ze(), this._redirectCallback = a || this.redirectCallbackFunction, this._getAuthCodeByState = i || this.getAuthCodeByStateFunction, this[n(426)] = l || this.waitForOAuthCodeFunction();
|
|
657
657
|
}
|
|
658
658
|
async redirectCallbackFunction(e) {
|
|
659
|
-
var t, n, s, o,
|
|
660
|
-
const
|
|
661
|
-
return x(
|
|
662
|
-
}, qcFPW:
|
|
663
|
-
!
|
|
664
|
-
const
|
|
665
|
-
if (!
|
|
666
|
-
(o = (s = this[
|
|
659
|
+
var t, n, s, o, a, i;
|
|
660
|
+
const l = y, c = y, u = { qITTp: function(x, _, p) {
|
|
661
|
+
return x(_, p);
|
|
662
|
+
}, qcFPW: l(452) }, d = await u.qITTp(fetch, e, { method: u[l(453)] });
|
|
663
|
+
!d.ok && ((n = (t = this._callBackPromise).reject) == null || n.call(t, c(446) + d.statusText));
|
|
664
|
+
const f = await this._getAuthCodeByState(this[c(454)], this[l(442)]);
|
|
665
|
+
if (!f.ok) {
|
|
666
|
+
(o = (s = this[l(433)]).reject) == null || o.call(s, "Failed to fetch auth code: " + f.statusText);
|
|
667
667
|
return;
|
|
668
668
|
}
|
|
669
|
-
const h = await
|
|
670
|
-
(
|
|
669
|
+
const h = await f[l(431)]();
|
|
670
|
+
(i = (a = this[c(433)])[l(456)]) == null || i.call(a, h[l(432)]);
|
|
671
671
|
}
|
|
672
672
|
async getAuthCodeByStateFunction(e, t) {
|
|
673
|
-
const n =
|
|
673
|
+
const n = y, s = y, o = {};
|
|
674
674
|
o.tuSmb = n(429);
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
return
|
|
675
|
+
const a = o, i = {};
|
|
676
|
+
i[n(460)] = a.tuSmb;
|
|
677
|
+
const l = {};
|
|
678
|
+
return l[s(441)] = t, fetch(e, { method: "POST", headers: i, body: new URLSearchParams(l) });
|
|
679
679
|
}
|
|
680
680
|
waitForOAuthCodeFunction() {
|
|
681
|
-
const e =
|
|
681
|
+
const e = y, t = this[e(433)];
|
|
682
682
|
return () => new Promise((n, s) => {
|
|
683
683
|
const o = e;
|
|
684
684
|
t.resolve = n, t[o(434)] = s;
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
get redirectUrl() {
|
|
688
|
-
return this[
|
|
688
|
+
return this[y(454)];
|
|
689
689
|
}
|
|
690
690
|
get clientMetadata() {
|
|
691
691
|
return this._clientMetadata;
|
|
@@ -693,32 +693,32 @@ class tt {
|
|
|
693
693
|
state() {
|
|
694
694
|
return this._state;
|
|
695
695
|
}
|
|
696
|
-
[
|
|
697
|
-
return this[
|
|
696
|
+
[F(447)]() {
|
|
697
|
+
return this[F(444)];
|
|
698
698
|
}
|
|
699
|
-
[
|
|
700
|
-
const t =
|
|
699
|
+
[E(435)](e) {
|
|
700
|
+
const t = F;
|
|
701
701
|
this[t(444)] = e;
|
|
702
702
|
}
|
|
703
|
-
[
|
|
704
|
-
return this[
|
|
703
|
+
[E(457)]() {
|
|
704
|
+
return this[E(439)];
|
|
705
705
|
}
|
|
706
706
|
saveTokens(e) {
|
|
707
707
|
this._tokens = e;
|
|
708
708
|
}
|
|
709
|
-
[
|
|
710
|
-
this[
|
|
709
|
+
[E(450)](e) {
|
|
710
|
+
this[F(443)](e);
|
|
711
711
|
}
|
|
712
712
|
saveCodeVerifier(e) {
|
|
713
713
|
this._codeVerifier = e;
|
|
714
714
|
}
|
|
715
715
|
codeVerifier() {
|
|
716
|
-
if (!this[
|
|
716
|
+
if (!this[F(437)]) throw new Error("No code verifier saved");
|
|
717
717
|
return this._codeVerifier;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
(function(r, e) {
|
|
721
|
-
for (var t =
|
|
721
|
+
for (var t = Y, n = Y, s = r(); ; )
|
|
722
722
|
try {
|
|
723
723
|
var o = parseInt(t(361)) / 1 * (parseInt(n(363)) / 2) + -parseInt(t(358)) / 3 + parseInt(t(359)) / 4 * (parseInt(t(357)) / 5) + parseInt(n(354)) / 6 * (parseInt(t(360)) / 7) + parseInt(n(362)) / 8 + parseInt(n(364)) / 9 + -parseInt(n(356)) / 10 * (parseInt(t(355)) / 11);
|
|
724
724
|
if (o === e) break;
|
|
@@ -726,20 +726,20 @@ class tt {
|
|
|
726
726
|
} catch {
|
|
727
727
|
s.push(s.shift());
|
|
728
728
|
}
|
|
729
|
-
})(
|
|
730
|
-
function
|
|
729
|
+
})(Z, -73523 * -3 + 1 * -407717 + 530518);
|
|
730
|
+
function Z() {
|
|
731
731
|
var r = ["40ecBYYe", "1095owKKYD", "486870YOVwZy", "5752xWiyTO", "561484biNVMw", "1fWJmxQ", "1866064SPnyhb", "1109522vMiuMX", "1602351pPEGwH", "12sVyMLL", "2573296LTwOhv"];
|
|
732
|
-
return
|
|
732
|
+
return Z = function() {
|
|
733
733
|
return r;
|
|
734
|
-
},
|
|
734
|
+
}, Z();
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
var t =
|
|
738
|
-
return
|
|
736
|
+
function Y(r, e) {
|
|
737
|
+
var t = Z();
|
|
738
|
+
return Y = function(n, s) {
|
|
739
739
|
n = n - (-1 * -642 + 503 * -5 + 2227);
|
|
740
740
|
var o = t[n];
|
|
741
741
|
return o;
|
|
742
|
-
},
|
|
742
|
+
}, Y(r, e);
|
|
743
743
|
}
|
|
744
744
|
class nt {
|
|
745
745
|
constructor(e, t) {
|
|
@@ -760,15 +760,15 @@ class nt {
|
|
|
760
760
|
var o;
|
|
761
761
|
(o = this.onclose) == null || o.call(this);
|
|
762
762
|
}, this.server.server.onerror = (o) => {
|
|
763
|
-
var
|
|
764
|
-
(
|
|
763
|
+
var a;
|
|
764
|
+
(a = this.onerror) == null || a.call(this, o);
|
|
765
765
|
}, this.server.server.setRequestHandler(ee, async () => ({}));
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
768
|
* Connects the server to a transport via the specified option.
|
|
769
769
|
*/
|
|
770
770
|
async connect(e) {
|
|
771
|
-
return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new
|
|
771
|
+
return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new X(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
774
|
* Closes the connection.
|
|
@@ -943,7 +943,7 @@ class nt {
|
|
|
943
943
|
e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
const st = (r, e) => new
|
|
946
|
+
const st = (r, e) => new X(r, e), rt = () => qe(), ot = (r) => r instanceof X, it = (r) => r instanceof ne;
|
|
947
947
|
class at {
|
|
948
948
|
constructor(e, t) {
|
|
949
949
|
const n = {
|
|
@@ -954,12 +954,12 @@ class at {
|
|
|
954
954
|
sampling: {},
|
|
955
955
|
elicitation: {}
|
|
956
956
|
};
|
|
957
|
-
this.client = new
|
|
957
|
+
this.client = new j(e || n, t || { capabilities: s }), this.client.onclose = () => {
|
|
958
958
|
var o;
|
|
959
959
|
(o = this.onclose) == null || o.call(this);
|
|
960
960
|
}, this.client.onerror = (o) => {
|
|
961
|
-
var
|
|
962
|
-
(
|
|
961
|
+
var a;
|
|
962
|
+
(a = this.onerror) == null || a.call(this, o);
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
965
|
/**
|
|
@@ -968,37 +968,28 @@ class at {
|
|
|
968
968
|
async connect(e) {
|
|
969
969
|
if (typeof e.start == "function")
|
|
970
970
|
return this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0, await this.client.connect(this.transport), { transport: this.transport, sessionId: this.transport.sessionId };
|
|
971
|
-
const { url: t, token: n, sessionId: s,
|
|
971
|
+
const { url: t, token: n, sessionId: s, type: o, agent: a, onError: i } = e;
|
|
972
972
|
if (a === !0) {
|
|
973
|
-
const
|
|
974
|
-
let
|
|
975
|
-
|
|
976
|
-
const { transport:
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
},
|
|
980
|
-
};
|
|
981
|
-
return await _(), p;
|
|
973
|
+
const u = { client: this.client, url: t, token: n, sessionId: s };
|
|
974
|
+
let d;
|
|
975
|
+
return await (async () => {
|
|
976
|
+
const { transport: h, sessionId: x } = o === "sse" ? await We(u) : o === "socket" ? await De(u) : await Be(u);
|
|
977
|
+
h.onerror = async (_) => {
|
|
978
|
+
i == null || i(_);
|
|
979
|
+
}, d = { transport: h, sessionId: x };
|
|
980
|
+
})(), d;
|
|
982
981
|
}
|
|
983
|
-
const
|
|
984
|
-
let
|
|
985
|
-
if (
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
if (o) {
|
|
995
|
-
const h = () => new N(f, { authProvider: o });
|
|
996
|
-
d = await E(this.client, o.waitForOAuthCode, h);
|
|
997
|
-
} else {
|
|
998
|
-
const h = oe(n, s);
|
|
999
|
-
d = new N(f, h), await this.client.connect(d);
|
|
1000
|
-
}
|
|
1001
|
-
return this.transport = d, { transport: this.transport, sessionId: this.transport.sessionId };
|
|
982
|
+
const l = new URL(t);
|
|
983
|
+
let c;
|
|
984
|
+
if (o === "channel" && (c = new Q(t), await this.client.connect(c)), o === "sse") {
|
|
985
|
+
const u = re(n, s);
|
|
986
|
+
c = new N(l, u), await this.client.connect(c);
|
|
987
|
+
}
|
|
988
|
+
if (o === "socket" && (c = new te(new URL(`${t}?sessionId=${s}&token=${n}`)), c.sessionId = s, await this.client.connect(c)), typeof c > "u") {
|
|
989
|
+
const u = oe(n, s);
|
|
990
|
+
c = new J(l, u), await this.client.connect(c);
|
|
991
|
+
}
|
|
992
|
+
return this.transport = c, { transport: this.transport, sessionId: this.transport.sessionId };
|
|
1002
993
|
}
|
|
1003
994
|
/**
|
|
1004
995
|
* Closes the connection.
|
|
@@ -1160,13 +1151,13 @@ class at {
|
|
|
1160
1151
|
* Registers a handler for the list roots request.
|
|
1161
1152
|
*/
|
|
1162
1153
|
onListRoots(e) {
|
|
1163
|
-
this.client.setRequestHandler(
|
|
1154
|
+
this.client.setRequestHandler(ge, e);
|
|
1164
1155
|
}
|
|
1165
1156
|
/**
|
|
1166
1157
|
* Registers a handler for the tool list changed notification.
|
|
1167
1158
|
*/
|
|
1168
1159
|
onToolListChanged(e) {
|
|
1169
|
-
this.client.setNotificationHandler(
|
|
1160
|
+
this.client.setNotificationHandler(we, e);
|
|
1170
1161
|
}
|
|
1171
1162
|
/**
|
|
1172
1163
|
* Registers a handler for the prompt list changed notification.
|
|
@@ -1199,7 +1190,7 @@ class at {
|
|
|
1199
1190
|
e.persisted || (Ye(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
|
|
1200
1191
|
}
|
|
1201
1192
|
}
|
|
1202
|
-
const ct = (r, e) => new
|
|
1193
|
+
const ct = (r, e) => new N(r, e), lt = (r, e) => new J(r, e), ut = (r, e) => new Q(r, e), dt = (r) => r instanceof N, Ye = (r) => r instanceof J, ft = (r) => r instanceof Q, ht = (r) => r instanceof j;
|
|
1203
1194
|
export {
|
|
1204
1195
|
pt as Ajv,
|
|
1205
1196
|
tt as AuthClientProvider,
|
|
@@ -1220,5 +1211,5 @@ export {
|
|
|
1220
1211
|
ot as isMessageChannelServerTransport,
|
|
1221
1212
|
dt as isSSEClientTransport,
|
|
1222
1213
|
Ye as isStreamableHTTPClientTransport,
|
|
1223
|
-
|
|
1214
|
+
wt as z
|
|
1224
1215
|
};
|