@opentiny/next-sdk 0.1.4 → 0.1.6
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 +15 -3
- package/agent/AgentModelProvider.ts +13 -5
- package/agent/type.ts +1 -1
- package/dist/WebMcpClient.d.ts +1 -1
- package/dist/WebMcpClient.js +12 -2
- package/dist/agent/AgentModelProvider.d.ts +2 -0
- package/dist/agent/AgentModelProvider.js +11 -4
- package/dist/agent/type.d.ts +1 -1
- package/dist/index.es.dev.js +717 -658
- package/dist/index.es.js +5821 -5784
- package/dist/index.umd.dev.js +717 -658
- package/dist/index.umd.js +29 -29
- package/dist/mcpsdk@1.17.0.dev.js +866 -830
- package/dist/mcpsdk@1.17.0.es.dev.js +868 -832
- package/dist/webagent.dev.js +11 -4
- package/dist/webagent.es.dev.js +11 -4
- package/dist/webagent.es.js +7 -7
- package/dist/webagent.js +1 -1
- package/dist/webmcp-full.dev.js +1523 -1507
- package/dist/webmcp-full.es.dev.js +1525 -1509
- package/dist/webmcp-full.es.js +3270 -3233
- package/dist/webmcp-full.js +8 -8
- package/dist/webmcp.dev.js +630 -631
- package/dist/webmcp.es.dev.js +629 -629
- package/dist/webmcp.es.js +560 -568
- package/dist/webmcp.js +1 -1
- package/package.json +2 -2
package/dist/webmcp.es.js
CHANGED
|
@@ -1,755 +1,747 @@
|
|
|
1
1
|
import { default as pt } from "ajv";
|
|
2
|
-
import { JSONRPCMessageSchema as
|
|
3
|
-
import { Client as
|
|
4
|
-
import { SSEClientTransport as
|
|
5
|
-
import { StreamableHTTPClientTransport as
|
|
6
|
-
import {
|
|
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 we, ToolListChangedNotificationSchema as ge, PromptListChangedNotificationSchema as me, ResourceListChangedNotificationSchema as ye, ResourceUpdatedNotificationSchema as Ie, LoggingMessageNotificationSchema as Ce } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { Client as V } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
+
import { SSEClientTransport as U } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
5
|
+
import { StreamableHTTPClientTransport as N } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
6
|
+
import { WebSocketClientTransport as te } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
7
|
+
import { UnauthorizedError as Re } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
7
8
|
import { McpServer as ne } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
-
import { ResourceTemplate as
|
|
9
|
+
import { ResourceTemplate as bt } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
10
|
import { z as gt } from "zod";
|
|
10
|
-
import { UriTemplate as
|
|
11
|
-
import { completable as
|
|
12
|
-
import { getDisplayName as
|
|
13
|
-
|
|
11
|
+
import { UriTemplate as yt } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
12
|
+
import { completable as Ct } from "@modelcontextprotocol/sdk/server/completable.js";
|
|
13
|
+
import { getDisplayName as St } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
|
|
14
|
+
function A() {
|
|
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 A = function() {
|
|
17
|
+
return r;
|
|
18
|
+
}, A();
|
|
19
|
+
}
|
|
14
20
|
(function(r, e) {
|
|
15
|
-
const t =
|
|
21
|
+
const t = g, n = g, s = r();
|
|
16
22
|
for (; ; )
|
|
17
23
|
try {
|
|
18
|
-
if (parseInt(t(
|
|
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;
|
|
19
25
|
s.push(s.shift());
|
|
20
26
|
} catch {
|
|
21
27
|
s.push(s.shift());
|
|
22
28
|
}
|
|
23
|
-
})(
|
|
24
|
-
function w(r, e) {
|
|
25
|
-
const t = V();
|
|
26
|
-
return w = function(n, s) {
|
|
27
|
-
return n = n - 129, t[n];
|
|
28
|
-
}, w(r, e);
|
|
29
|
-
}
|
|
29
|
+
})(A, 650197);
|
|
30
30
|
const se = () => {
|
|
31
|
-
const r =
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
return
|
|
35
|
-
},
|
|
36
|
-
return n
|
|
37
|
-
},
|
|
38
|
-
return
|
|
31
|
+
const r = g, e = { EGhzU: function(t, n) {
|
|
32
|
+
return t !== n;
|
|
33
|
+
}, kIrDB: "undefined", llYQe: function(t, n) {
|
|
34
|
+
return t !== n;
|
|
35
|
+
}, PZfJg: function(t, n) {
|
|
36
|
+
return t(n);
|
|
37
|
+
}, Jwyua: "return this" };
|
|
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.
|
|
42
|
-
return a !== c;
|
|
43
|
-
}, o.axlRk = "undefined", o.WGYMl = function(a, c) {
|
|
44
|
-
return a in c;
|
|
45
|
-
}, o[n(162)] = s(131), o[s(142)] = function(a, c) {
|
|
40
|
+
const n = g, s = g, o = {};
|
|
41
|
+
o[n(410)] = s(398), o.dBkaX = function(a, c) {
|
|
46
42
|
return a === c;
|
|
47
|
-
}, o[s(
|
|
43
|
+
}, o[s(393)] = "function";
|
|
48
44
|
const i = o;
|
|
49
|
-
i[s(
|
|
50
|
-
},
|
|
51
|
-
const t =
|
|
52
|
-
s.
|
|
45
|
+
typeof window !== i[s(410)] ? r.postMessage(e, "*", t) : s(428) in r && i.dBkaX(typeof r.postMessage, i[n(393)]) && r.postMessage(e, t);
|
|
46
|
+
}, Le = (r, e) => {
|
|
47
|
+
const t = g, n = g, s = {};
|
|
48
|
+
s.MbsGh = "addEventListener", s.PPniK = function(i, a) {
|
|
53
49
|
return i === a;
|
|
54
|
-
}, s
|
|
55
|
-
return i in a;
|
|
56
|
-
}, s[t(157)] = "onmessage", s.jnGTR = function(i, a) {
|
|
57
|
-
return i !== a;
|
|
58
|
-
}, s.xkAIW = "undefined";
|
|
50
|
+
}, s[t(419)] = n(412), s[n(404)] = "onmessage", s[t(397)] = "undefined";
|
|
59
51
|
const o = s;
|
|
60
|
-
o.
|
|
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);
|
|
61
53
|
};
|
|
62
|
-
class
|
|
54
|
+
class W {
|
|
63
55
|
constructor(e) {
|
|
64
|
-
|
|
56
|
+
const t = g;
|
|
57
|
+
this[t(406)] = e;
|
|
65
58
|
}
|
|
66
59
|
async start() {
|
|
67
|
-
const e =
|
|
68
|
-
this
|
|
69
|
-
var
|
|
70
|
-
const
|
|
60
|
+
const e = g, t = g;
|
|
61
|
+
this[e(406)] && (this[e(406)][e(413)] = (n) => {
|
|
62
|
+
var s, o;
|
|
63
|
+
const i = e, a = t;
|
|
71
64
|
try {
|
|
72
|
-
const
|
|
73
|
-
(
|
|
74
|
-
} catch (
|
|
75
|
-
const
|
|
76
|
-
(
|
|
65
|
+
const c = ae[i(402)](n.data[i(400)]);
|
|
66
|
+
(s = this[i(413)]) == null || s.call(this, c, n[a(409)].extra);
|
|
67
|
+
} catch (c) {
|
|
68
|
+
const l = new Error("MessageChannel failed to parse message: " + c);
|
|
69
|
+
(o = this[a(408)]) == null || o.call(this, l);
|
|
77
70
|
}
|
|
78
|
-
}, this._port
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
(
|
|
82
|
-
}, this[e(
|
|
71
|
+
}, this._port[e(396)] = (n) => {
|
|
72
|
+
var s;
|
|
73
|
+
const o = t, i = t, a = new Error(o(394) + JSON[i(395)](n));
|
|
74
|
+
(s = this.onerror) == null || s.call(this, a);
|
|
75
|
+
}, this[e(406)][e(434)]());
|
|
83
76
|
}
|
|
84
77
|
async send(e, t) {
|
|
85
|
-
const n = {
|
|
78
|
+
const n = { lEyuq: function(s) {
|
|
86
79
|
return s();
|
|
87
|
-
},
|
|
88
|
-
return s(o);
|
|
89
|
-
}, Pfhxv: function(s, o) {
|
|
80
|
+
}, YihNw: function(s, o) {
|
|
90
81
|
return s(o);
|
|
91
82
|
} };
|
|
92
83
|
return new Promise((s, o) => {
|
|
93
84
|
var i;
|
|
94
|
-
const a =
|
|
85
|
+
const a = g, c = g;
|
|
95
86
|
try {
|
|
96
87
|
const l = {};
|
|
97
|
-
l
|
|
88
|
+
l[a(403)] = t == null ? void 0 : t[a(403)];
|
|
98
89
|
const u = {};
|
|
99
|
-
u[c(
|
|
90
|
+
u[c(400)] = e, u.extra = l, this[c(406)] && this[a(406)].postMessage(u), n.lEyuq(s);
|
|
100
91
|
} catch (l) {
|
|
101
|
-
const u = l instanceof Error ? l : new Error(n.
|
|
102
|
-
(i = this[
|
|
92
|
+
const u = l instanceof Error ? l : new Error(n.YihNw(String, l));
|
|
93
|
+
(i = this[c(408)]) == null || i.call(this, u), o(u);
|
|
103
94
|
}
|
|
104
95
|
});
|
|
105
96
|
}
|
|
106
97
|
async close() {
|
|
107
98
|
var e, t;
|
|
108
|
-
const n =
|
|
109
|
-
(e = this._port) == null || e[n(
|
|
99
|
+
const n = g, s = g;
|
|
100
|
+
(e = this._port) == null || e[n(431)](), this._port = void 0, (t = this[s(420)]) == null || t.call(this);
|
|
110
101
|
}
|
|
111
102
|
}
|
|
112
|
-
|
|
113
|
-
const r = ["start", "18osCtKg", "RphJy", "FzgVC", "MJJde", "jnGTR", "LnNVQ", "1051519VVnrnU", "33477396wnvbno", "sxstg", "5032460FukhmU", "gdsVr", "11iMeJBh", "function", "_endpoint", "_listen", "1275704COqcWf", "56LfVOEz", "listen", "fDJxn", "undefined", "ports", "JlLHy", "4dKwrPa", "close", "onmessage", "postMessage", "authInfo", "11129553jiEKRY", "776455JhRkBm", "data", "port2", "onerror", "_port", "SUplI", "SjhYv", "extra", "cgHZW", "2982963YuFHfk", "OXUfv", "1sYviCF", "port1", "BODwV", "message", "ZJoRh", "_globalObject", "Pfhxv", "addEventListener"];
|
|
114
|
-
return V = function() {
|
|
115
|
-
return r;
|
|
116
|
-
}, V();
|
|
117
|
-
}
|
|
118
|
-
class $ extends j {
|
|
103
|
+
class X extends W {
|
|
119
104
|
constructor(e, t = se()) {
|
|
120
|
-
const n =
|
|
121
|
-
return
|
|
105
|
+
const n = g, s = g, o = { EkZCC: function(a, c, l, u) {
|
|
106
|
+
return a(c, l, u);
|
|
122
107
|
} };
|
|
123
|
-
super(), this[n(
|
|
124
|
-
const
|
|
125
|
-
this
|
|
108
|
+
super(), this[n(391)] = e, this[s(401)] = t;
|
|
109
|
+
const i = new MessageChannel();
|
|
110
|
+
this[s(406)] = i.port1, o[s(426)](Se, this[n(401)], { endpoint: this[s(391)] }, [i[s(414)]]);
|
|
126
111
|
}
|
|
127
112
|
}
|
|
128
|
-
class
|
|
113
|
+
class K extends W {
|
|
129
114
|
constructor(e, t = se()) {
|
|
130
|
-
const n =
|
|
115
|
+
const n = g, s = { mOWMr: function(o, i) {
|
|
131
116
|
return o === i;
|
|
132
|
-
},
|
|
133
|
-
return o();
|
|
134
|
-
}, ZJoRh: function(o, i, a) {
|
|
117
|
+
}, kgkem: function(o, i, a) {
|
|
135
118
|
return o(i, a);
|
|
136
119
|
} };
|
|
137
|
-
super(), this._endpoint = e, this
|
|
138
|
-
const i = n;
|
|
139
|
-
s[i(
|
|
140
|
-
const
|
|
141
|
-
|
|
120
|
+
super(), this._endpoint = e, this._globalObject = t, this[n(432)] = new Promise((o) => {
|
|
121
|
+
const i = n, a = n;
|
|
122
|
+
s[i(392)](Le, this[a(401)], (c) => {
|
|
123
|
+
const l = a, u = a;
|
|
124
|
+
c.data && s[l(425)](c.data[u(422)], this[u(391)]) && (this[u(406)] = c.ports[-1 * 4852 + 1 * 1601 + 3251], o());
|
|
142
125
|
});
|
|
143
126
|
});
|
|
144
127
|
}
|
|
145
|
-
async
|
|
146
|
-
return this[
|
|
128
|
+
async listen() {
|
|
129
|
+
return this[g(432)];
|
|
147
130
|
}
|
|
148
131
|
}
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
return
|
|
132
|
+
function g(r, e) {
|
|
133
|
+
const t = A();
|
|
134
|
+
return g = function(n, s) {
|
|
135
|
+
return n = n - (17 * -491 + -669 + 9407), t[n];
|
|
136
|
+
}, g(r, e);
|
|
137
|
+
}
|
|
138
|
+
const qe = () => {
|
|
139
|
+
const r = new MessageChannel();
|
|
140
|
+
return [new W(r.port1), new W(r.port2)];
|
|
152
141
|
};
|
|
153
142
|
(function(r, e) {
|
|
154
|
-
const t =
|
|
143
|
+
const t = b, n = b, s = r();
|
|
155
144
|
for (; ; )
|
|
156
145
|
try {
|
|
157
|
-
if (
|
|
146
|
+
if (parseInt(t(355)) / 1 + -parseInt(t(356)) / 2 * (-parseInt(t(373)) / 3) + -parseInt(t(337)) / 4 + parseInt(n(357)) / 5 + -parseInt(n(389)) / 6 * (-parseInt(t(396)) / 7) + parseInt(n(325)) / 8 * (parseInt(t(382)) / 9) + -parseInt(t(366)) / 10 === e) break;
|
|
158
147
|
s.push(s.shift());
|
|
159
148
|
} catch {
|
|
160
149
|
s.push(s.shift());
|
|
161
150
|
}
|
|
162
|
-
})(
|
|
163
|
-
const
|
|
151
|
+
})(B, -763475 + -52067 * 10 + 1724410);
|
|
152
|
+
const ke = async (r, e, t) => {
|
|
164
153
|
var n;
|
|
165
|
-
const s =
|
|
166
|
-
i.
|
|
154
|
+
const s = b, o = b, i = {};
|
|
155
|
+
i[s(345)] = "tools/list", i.rqstG = "tools/call", i.WqUnk = "resources/list", i[s(329)] = o(358), i[s(365)] = s(335), i.ookoz = "resources/unsubscribe", i[s(385)] = s(340), i.VTIWq = "prompts/list", i.SkoRK = s(376), i.QUtUV = s(388), i.XtowM = o(332);
|
|
167
156
|
const a = i, { id: c, method: l, params: u } = t;
|
|
168
157
|
let f = {};
|
|
169
158
|
switch (l) {
|
|
170
|
-
case
|
|
159
|
+
case a[o(345)]:
|
|
171
160
|
f = await e.listTools(u);
|
|
172
161
|
break;
|
|
173
|
-
case a.
|
|
162
|
+
case a.rqstG:
|
|
174
163
|
f = await e.callTool(u);
|
|
175
164
|
break;
|
|
176
|
-
case s(
|
|
177
|
-
f = await e
|
|
165
|
+
case a[s(334)]:
|
|
166
|
+
f = await e[s(350)](u);
|
|
178
167
|
break;
|
|
179
|
-
case a[
|
|
180
|
-
f = await e
|
|
168
|
+
case a[o(329)]:
|
|
169
|
+
f = await e.listResourceTemplates(u);
|
|
181
170
|
break;
|
|
182
|
-
case
|
|
183
|
-
f = await e[s(
|
|
171
|
+
case s(372):
|
|
172
|
+
f = await e[s(383)](u);
|
|
184
173
|
break;
|
|
185
|
-
case a.
|
|
186
|
-
f = await e
|
|
174
|
+
case a.HgYgW:
|
|
175
|
+
f = await e.subscribeResource(u);
|
|
187
176
|
break;
|
|
188
|
-
case
|
|
189
|
-
f = await e
|
|
177
|
+
case a.ookoz:
|
|
178
|
+
f = await e.unsubscribeResource(u);
|
|
190
179
|
break;
|
|
191
|
-
case
|
|
180
|
+
case a[s(385)]:
|
|
192
181
|
f = await e.getPrompt(u);
|
|
193
182
|
break;
|
|
194
|
-
case a
|
|
195
|
-
f = await e
|
|
183
|
+
case a.VTIWq:
|
|
184
|
+
f = await e.listPrompts(u);
|
|
196
185
|
break;
|
|
197
|
-
case a[
|
|
198
|
-
f = await e
|
|
186
|
+
case a[s(344)]:
|
|
187
|
+
f = await e[s(376)]();
|
|
199
188
|
break;
|
|
200
|
-
case a.
|
|
189
|
+
case a.QUtUV:
|
|
201
190
|
f = await e.complete(u);
|
|
202
191
|
break;
|
|
203
|
-
case
|
|
204
|
-
f = await e
|
|
192
|
+
case s(390):
|
|
193
|
+
f = await e[s(336)](u == null ? void 0 : u.level);
|
|
205
194
|
break;
|
|
206
195
|
}
|
|
207
196
|
const d = {};
|
|
208
|
-
d
|
|
209
|
-
},
|
|
197
|
+
d[s(361)] = f, d[s(394)] = a[s(364)], d.id = c, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[s(392)](d));
|
|
198
|
+
}, Te = async (r, e, t) => {
|
|
210
199
|
var n;
|
|
211
|
-
const s =
|
|
212
|
-
i.
|
|
200
|
+
const s = b, o = b, i = {};
|
|
201
|
+
i.jQBBS = "sampling/createMessage", i.EZqgC = "elicitation/create", i[s(370)] = o(376), i.aVeaL = o(332);
|
|
213
202
|
const a = i, { id: c, method: l, params: u } = t;
|
|
214
203
|
let f = {};
|
|
215
204
|
switch (l) {
|
|
216
|
-
case
|
|
205
|
+
case s(368):
|
|
217
206
|
const h = {};
|
|
218
|
-
h.method = l, h[o(
|
|
207
|
+
h.method = l, h[o(367)] = u, f = await e.request(h, de);
|
|
219
208
|
break;
|
|
220
|
-
case
|
|
221
|
-
const
|
|
222
|
-
|
|
209
|
+
case a[o(391)]:
|
|
210
|
+
const x = {};
|
|
211
|
+
x.method = l, x[o(367)] = u, f = await e[o(381)](x, ue);
|
|
223
212
|
break;
|
|
224
|
-
case a.
|
|
213
|
+
case a.EZqgC:
|
|
225
214
|
const p = {};
|
|
226
|
-
p.method = l, p.params = u, f = await e.request(p,
|
|
215
|
+
p.method = l, p.params = u, f = await e.request(p, le);
|
|
227
216
|
break;
|
|
228
|
-
case a
|
|
229
|
-
const
|
|
230
|
-
|
|
217
|
+
case a[o(370)]:
|
|
218
|
+
const _ = {};
|
|
219
|
+
_.method = l, f = await e[o(381)](_, ce);
|
|
231
220
|
break;
|
|
232
221
|
}
|
|
233
222
|
const d = {};
|
|
234
|
-
return d[o(
|
|
235
|
-
},
|
|
236
|
-
const t =
|
|
237
|
-
return
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
223
|
+
return d[o(361)] = f, d.jsonrpc = a[o(387)], d.id = c, await ((n = r == null ? void 0 : r[s(371)]) == null ? void 0 : n.send(d)), f;
|
|
224
|
+
}, He = (r, e) => {
|
|
225
|
+
const t = b, n = { gXsjT: function(o, i) {
|
|
226
|
+
return o === i;
|
|
227
|
+
}, oegpC: t(351), lZOUC: function(o, i, a, c) {
|
|
228
|
+
return o(i, a, c);
|
|
229
|
+
}, ifIKG: "2.0" }, s = r._onrequest;
|
|
230
|
+
r._onrequest = async (o, i) => {
|
|
231
|
+
var a, c, l, u, f;
|
|
232
|
+
const d = t, h = t, { id: x, method: p } = o;
|
|
242
233
|
try {
|
|
243
|
-
|
|
244
|
-
} catch (
|
|
245
|
-
const { code:
|
|
234
|
+
n[d(333)](p, n.oegpC) ? await s[d(386)](r, o, i) : await n.lZOUC(ke, r, e, o);
|
|
235
|
+
} catch (_) {
|
|
236
|
+
const { code: v, message: m, data: y } = _;
|
|
246
237
|
try {
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
} else (
|
|
253
|
-
} catch (
|
|
254
|
-
(
|
|
238
|
+
if (v) {
|
|
239
|
+
const I = {};
|
|
240
|
+
I.code = v, I.message = m, I.data = y;
|
|
241
|
+
const L = {};
|
|
242
|
+
L.error = I, L[d(394)] = n[h(331)], L.id = x, await ((a = r == null ? void 0 : r.transport) == null ? void 0 : a.send(L));
|
|
243
|
+
} else (l = (c = r == null ? void 0 : r[h(371)]) == null ? void 0 : c.onerror) == null || l.call(c, _);
|
|
244
|
+
} catch (I) {
|
|
245
|
+
(f = (u = r == null ? void 0 : r[d(371)]) == null ? void 0 : u.onerror) == null || f.call(u, I);
|
|
255
246
|
}
|
|
256
247
|
}
|
|
257
248
|
};
|
|
258
|
-
},
|
|
259
|
-
const t =
|
|
260
|
-
s
|
|
249
|
+
}, Pe = (r, e) => {
|
|
250
|
+
const t = b, n = b, s = {};
|
|
251
|
+
s[t(363)] = function(i, a) {
|
|
261
252
|
return i !== a;
|
|
262
|
-
}, s[t(
|
|
253
|
+
}, s[t(398)] = t(353), s.hzhyg = "notifications/cancelled";
|
|
263
254
|
const o = s;
|
|
264
|
-
r
|
|
255
|
+
r._onnotification = async (i) => {
|
|
265
256
|
var a, c;
|
|
266
|
-
const l =
|
|
267
|
-
if (o
|
|
257
|
+
const l = t, u = n, { method: f, params: d } = i;
|
|
258
|
+
if (o[l(363)](f, o[u(398)]) && (o[l(363)](f, o.hzhyg) || d != null && d.forward)) try {
|
|
268
259
|
await e.notification(i);
|
|
269
260
|
} catch (h) {
|
|
270
261
|
(c = (a = r == null ? void 0 : r.transport) == null ? void 0 : a.onerror) == null || c.call(a, h);
|
|
271
262
|
}
|
|
272
263
|
};
|
|
273
|
-
},
|
|
264
|
+
}, Me = (r, e) => async (t) => {
|
|
274
265
|
var n, s, o, i, a;
|
|
275
|
-
const c =
|
|
276
|
-
|
|
277
|
-
|
|
266
|
+
const c = b, l = b, u = {};
|
|
267
|
+
u.SEmWX = c(332);
|
|
268
|
+
const f = u;
|
|
278
269
|
try {
|
|
279
|
-
return await
|
|
280
|
-
} catch (
|
|
281
|
-
const { code:
|
|
270
|
+
return await Te(r, e, t);
|
|
271
|
+
} catch (d) {
|
|
272
|
+
const { code: h, message: x, data: p } = d;
|
|
282
273
|
try {
|
|
283
|
-
if (
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
} else (o = (s = r == null ? void 0 : r
|
|
289
|
-
} catch (
|
|
290
|
-
(a = (i = r == null ? void 0 : r[c(
|
|
274
|
+
if (h) {
|
|
275
|
+
const _ = {};
|
|
276
|
+
_[l(377)] = h, _.message = x, _.data = p;
|
|
277
|
+
const v = {};
|
|
278
|
+
v[l(348)] = _, v.jsonrpc = f[c(338)], v.id = t.id, await ((n = r == null ? void 0 : r.transport) == null ? void 0 : n[l(392)](v));
|
|
279
|
+
} else (o = (s = r == null ? void 0 : r.transport) == null ? void 0 : s[l(339)]) == null || o.call(s, d);
|
|
280
|
+
} catch (_) {
|
|
281
|
+
(a = (i = r == null ? void 0 : r[c(371)]) == null ? void 0 : i[l(339)]) == null || a.call(i, _);
|
|
291
282
|
}
|
|
292
283
|
}
|
|
293
|
-
}
|
|
294
|
-
function z() {
|
|
295
|
-
const r = ["level", "originalOnResponse", "55170mBdYDU", "message", "forward", "completion/complete", "YTglM", "_onrequest", "push", "resources/subscribe", "method", "evRYg", "IwJLf", "36vWOzfl", "INhFO", "ERLmZ", "4771400ICkNjz", "removeListener", "bepKH", "jsonrpc", "1588030zEKxZA", "readResource", "request", "indexOf", "_onresponse", "elicitation/create", "transport", "listResourceTemplates", "SAxlc", "TivTb", "VvMvg", "lKSxx", "resources/templates/list", "send", "removeRequestListener", "resources/list", "HHuTf", "error", "unsubscribeResource", "JgvOQ", "params", "HMnPG", "mKgNI", "initialize", "2.0", "clearListener", "result", "xAZkD", "_onnotification", "notifications/initialized", "DNAeN", "deQam", "18856juHcqp", "1408312pVrTzy", "exSlO", "_notificationHandlers", "fallbackRequestHandler", "1770391vhkQKM", "clear", "length", "917098eoebuK", "onerror", "eBAUu", "subscribeResource", "get", "clearRequestListener", "dFopk", "listPrompts", "2853mVPrjm", "addNotificationListener", "lfNNa", "prompts/list", "code", "call", "18wkYBws", "addResponseListener", "data", "RZSpk"];
|
|
296
|
-
return z = function() {
|
|
297
|
-
return r;
|
|
298
|
-
}, z();
|
|
299
|
-
}
|
|
300
|
-
const Pe = (r, e) => async (t) => {
|
|
284
|
+
}, Ue = (r, e) => async (t) => {
|
|
301
285
|
var n, s, o;
|
|
302
|
-
const i =
|
|
303
|
-
c
|
|
286
|
+
const i = b, a = b, c = {};
|
|
287
|
+
c.dtUgZ = function(d, h) {
|
|
304
288
|
return d !== h;
|
|
305
|
-
}, c.
|
|
289
|
+
}, c.jgCIb = i(353), c.uUjKY = "2.0";
|
|
306
290
|
const l = c, { method: u, params: f } = t;
|
|
307
|
-
if (l.
|
|
291
|
+
if (l.dtUgZ(u, l.jgCIb) && (u !== i(400) || f != null && f.forward)) try {
|
|
308
292
|
const d = { ...t };
|
|
309
|
-
d[i(
|
|
293
|
+
d[i(394)] = l[a(352)], await ((n = e == null ? void 0 : e[i(371)]) == null ? void 0 : n[i(392)](d));
|
|
310
294
|
} catch (d) {
|
|
311
|
-
(o = (s = r == null ? void 0 : r
|
|
295
|
+
(o = (s = r == null ? void 0 : r[i(371)]) == null ? void 0 : s[a(339)]) == null || o.call(s, d);
|
|
312
296
|
}
|
|
313
297
|
};
|
|
314
|
-
function
|
|
315
|
-
const t =
|
|
316
|
-
return
|
|
317
|
-
return n = n - (
|
|
318
|
-
},
|
|
298
|
+
function b(r, e) {
|
|
299
|
+
const t = B();
|
|
300
|
+
return b = function(n, s) {
|
|
301
|
+
return n = n - (9 * -113 + -1439 * -1 + -97), t[n];
|
|
302
|
+
}, b(r, e);
|
|
319
303
|
}
|
|
320
304
|
const Oe = (r, e) => async (t) => {
|
|
321
305
|
var n, s, o, i, a, c;
|
|
322
|
-
const l =
|
|
323
|
-
f
|
|
306
|
+
const l = b, u = b, f = {};
|
|
307
|
+
f[l(401)] = u(332);
|
|
324
308
|
const d = f;
|
|
325
309
|
try {
|
|
326
310
|
await ((n = e == null ? void 0 : e.transport) == null ? void 0 : n.send(t));
|
|
327
311
|
} catch (h) {
|
|
328
|
-
const { code:
|
|
312
|
+
const { code: x, message: p, data: _ } = h;
|
|
329
313
|
try {
|
|
330
|
-
if (
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
} else (i = (o = r == null ? void 0 : r.transport) == null ? void 0 : o
|
|
336
|
-
} catch (
|
|
337
|
-
(c = (a = r == null ? void 0 : r
|
|
314
|
+
if (x) {
|
|
315
|
+
const v = {};
|
|
316
|
+
v.code = x, v[l(399)] = p, v.data = _;
|
|
317
|
+
const m = {};
|
|
318
|
+
m[l(348)] = v, m[l(394)] = d.OhJjz, m.id = t.id, await ((s = r == null ? void 0 : r[l(371)]) == null ? void 0 : s.send(m));
|
|
319
|
+
} else (i = (o = r == null ? void 0 : r.transport) == null ? void 0 : o[u(339)]) == null || i.call(o, h);
|
|
320
|
+
} catch (v) {
|
|
321
|
+
(c = (a = r == null ? void 0 : r.transport) == null ? void 0 : a.onerror) == null || c.call(a, v);
|
|
338
322
|
}
|
|
339
323
|
}
|
|
340
|
-
},
|
|
341
|
-
const r =
|
|
342
|
-
return
|
|
343
|
-
},
|
|
344
|
-
return
|
|
345
|
-
},
|
|
346
|
-
return
|
|
347
|
-
},
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const f = [];
|
|
353
|
-
for (const d of t)
|
|
324
|
+
}, Q = () => {
|
|
325
|
+
const r = b, e = b, t = { vnkqu: function(l, u) {
|
|
326
|
+
return l !== u;
|
|
327
|
+
}, wxDWr: function(l, u) {
|
|
328
|
+
return l(u);
|
|
329
|
+
}, GdkkV: function(l, u) {
|
|
330
|
+
return l === u;
|
|
331
|
+
} }, n = [], s = (l, u) => {
|
|
332
|
+
const f = b, d = b;
|
|
333
|
+
if (u) {
|
|
334
|
+
const h = [];
|
|
335
|
+
for (const x of n)
|
|
354
336
|
try {
|
|
355
|
-
|
|
337
|
+
h.push(x(l, u));
|
|
356
338
|
} catch {
|
|
357
339
|
}
|
|
358
|
-
for (const
|
|
359
|
-
if (
|
|
360
|
-
} else for (const
|
|
340
|
+
for (const x of h)
|
|
341
|
+
if (t[f(379)](x, null)) return x;
|
|
342
|
+
} else for (const h of n)
|
|
361
343
|
try {
|
|
362
|
-
|
|
344
|
+
t[d(343)](h, l);
|
|
363
345
|
} catch {
|
|
364
346
|
}
|
|
365
|
-
},
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
},
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
return
|
|
347
|
+
}, o = (l) => {
|
|
348
|
+
const u = b;
|
|
349
|
+
t[u(384)](typeof l, u(369)) && !n.includes(l) && n.push(l);
|
|
350
|
+
}, i = (l) => {
|
|
351
|
+
const u = n.indexOf(l);
|
|
352
|
+
u !== -1 && n.splice(u, 1 * -6854 + 8 * -33 + 7119);
|
|
353
|
+
}, a = () => {
|
|
354
|
+
const l = b;
|
|
355
|
+
n[l(374)] = 7102 * 1 + 5522 + -526 * 24;
|
|
356
|
+
}, c = {};
|
|
357
|
+
return c[r(346)] = s, c[e(330)] = o, c.removeListener = i, c[r(359)] = a, c;
|
|
376
358
|
}, Fe = (r) => {
|
|
377
|
-
const e =
|
|
378
|
-
return s();
|
|
379
|
-
}, evRYg: function(s) {
|
|
359
|
+
const e = b, t = b, n = { xwPeb: function(s) {
|
|
380
360
|
return s();
|
|
381
|
-
},
|
|
361
|
+
}, Mfvzm: function(s) {
|
|
382
362
|
return s();
|
|
383
363
|
} };
|
|
384
364
|
{
|
|
385
|
-
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n
|
|
386
|
-
r._onresponse = s, r[e(
|
|
365
|
+
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[e(326)](Q);
|
|
366
|
+
r._onresponse = s, r[e(395)] = o, r.removeResponseListener = i, r.clearResponseListener = a;
|
|
387
367
|
}
|
|
388
368
|
{
|
|
389
|
-
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[t(
|
|
390
|
-
r[
|
|
369
|
+
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[t(326)](Q);
|
|
370
|
+
r[t(328)] = s, r.addRequestListener = o, r[t(354)] = i, r[t(341)] = a;
|
|
391
371
|
}
|
|
392
372
|
{
|
|
393
|
-
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n
|
|
394
|
-
r
|
|
373
|
+
const { handleListener: s, addListener: o, removeListener: i, clearListener: a } = n[e(375)](Q);
|
|
374
|
+
r[e(342)] = s, r[e(327)] = o, r.removeNotificationListener = i, r.clearNotificationListener = a;
|
|
395
375
|
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
376
|
+
};
|
|
377
|
+
function B() {
|
|
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 B = function() {
|
|
380
|
+
return r;
|
|
381
|
+
}, B();
|
|
382
|
+
}
|
|
383
|
+
const je = (r, { beforeInit: e, afterInit: t } = {}) => {
|
|
384
|
+
const n = b, s = b, o = { tqDZP: function(a, c) {
|
|
400
385
|
return a === c;
|
|
401
|
-
},
|
|
402
|
-
return a();
|
|
403
|
-
},
|
|
386
|
+
}, cjSoZ: "function", iQqcJ: n(378), Zybtx: function(a, c) {
|
|
387
|
+
return a(c);
|
|
388
|
+
}, ElOQH: function(a) {
|
|
404
389
|
return a();
|
|
405
390
|
} }, i = new Map(r._notificationHandlers);
|
|
406
|
-
r
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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((a) => {
|
|
392
|
+
const c = s;
|
|
393
|
+
r.originalOnResponse[c(386)](r, a);
|
|
394
|
+
}), o.tqDZP(typeof t, o[s(380)]) && o[n(397)](t), r[s(327)]((a) => {
|
|
395
|
+
const { method: c } = a, l = i.get(c);
|
|
396
|
+
o.tqDZP(typeof l, o.cjSoZ) && l(a);
|
|
411
397
|
});
|
|
412
|
-
},
|
|
413
|
-
function M(r, e) {
|
|
414
|
-
const t = W();
|
|
415
|
-
return M = function(n, s) {
|
|
416
|
-
return n = n - (-499 * 3 + 1 * -890 + -337 * -8), t[n];
|
|
417
|
-
}, M(r, e);
|
|
418
|
-
}
|
|
398
|
+
}, Ne = q, Ee = q;
|
|
419
399
|
(function(r, e) {
|
|
420
|
-
const t =
|
|
400
|
+
const t = q, n = q, s = r();
|
|
421
401
|
for (; ; )
|
|
422
402
|
try {
|
|
423
|
-
if (parseInt(t(
|
|
403
|
+
if (-parseInt(t(393)) / 1 + parseInt(t(397)) / 2 * (-parseInt(t(400)) / 3) + -parseInt(n(398)) / 4 + parseInt(t(390)) / 5 * (parseInt(n(388)) / 6) + -parseInt(t(389)) / 7 + -parseInt(t(402)) / 8 * (-parseInt(n(395)) / 9) + parseInt(n(399)) / 10 * (parseInt(n(385)) / 11) === e) break;
|
|
424
404
|
s.push(s.shift());
|
|
425
405
|
} catch {
|
|
426
406
|
s.push(s.shift());
|
|
427
407
|
}
|
|
428
|
-
})(
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
|
|
408
|
+
})(D, -1 * -881393 + 2 * 180895 + 1 * -644809);
|
|
409
|
+
function q(r, e) {
|
|
410
|
+
const t = D();
|
|
411
|
+
return q = function(n, s) {
|
|
412
|
+
return n = n - (-1861 + -499 * 4 + 4241), t[n];
|
|
413
|
+
}, q(r, e);
|
|
414
|
+
}
|
|
415
|
+
function D() {
|
|
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 D = function() {
|
|
418
|
+
return r;
|
|
419
|
+
}, D();
|
|
420
|
+
}
|
|
421
|
+
const Ve = () => {
|
|
422
|
+
const r = q, e = q, t = {};
|
|
423
|
+
t.REzPF = function(s, o) {
|
|
436
424
|
return s & o;
|
|
437
|
-
}, t
|
|
425
|
+
}, t.suJHI = function(s, o) {
|
|
438
426
|
return s === o;
|
|
439
|
-
}, t
|
|
427
|
+
}, t[r(386)] = function(s, o) {
|
|
428
|
+
return s & o;
|
|
429
|
+
}, t[e(394)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
440
430
|
const n = t;
|
|
441
|
-
return n
|
|
442
|
-
const o = r, i = r, a = n[o(
|
|
443
|
-
return (s
|
|
431
|
+
return n.suJHI(typeof crypto, "object") && crypto.randomUUID ? crypto[e(391)]() : n.dHTfU.replace(/[xy]/g, (s) => {
|
|
432
|
+
const o = r, i = r, a = 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") ? a : n[i(386)](a, -4377 + 4 * 1095) | 5079 + 461 * -11).toString(9449 + 4 * -461 + -7589);
|
|
444
434
|
});
|
|
445
|
-
},
|
|
446
|
-
const e =
|
|
447
|
-
return crypto
|
|
435
|
+
}, ze = (r) => {
|
|
436
|
+
const e = q, t = q, n = new Uint8Array(r);
|
|
437
|
+
return crypto.getRandomValues(n), Array[e(401)](n, (s) => s[t(403)](-3 * 1739 + -6509 + 2 * 5871)[e(387)](2, "0")).join("");
|
|
448
438
|
}, P = {};
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return W = function() {
|
|
452
|
-
return r;
|
|
453
|
-
}, W();
|
|
454
|
-
}
|
|
455
|
-
P.randomUUID = Je, P[Be(318)] = je;
|
|
456
|
-
const A = T, k = T;
|
|
439
|
+
P[Ne(391)] = Ve, P[Ee(396)] = ze;
|
|
440
|
+
const S = k;
|
|
457
441
|
(function(r, e) {
|
|
458
|
-
const t =
|
|
442
|
+
const t = k, n = k, s = r();
|
|
459
443
|
for (; ; )
|
|
460
444
|
try {
|
|
461
|
-
if (
|
|
445
|
+
if (parseInt(t(521)) / 1 * (parseInt(n(499)) / 2) + parseInt(n(543)) / 3 * (parseInt(n(514)) / 4) + parseInt(t(502)) / 5 * (parseInt(n(539)) / 6) + parseInt(t(553)) / 7 + parseInt(t(516)) / 8 * (-parseInt(t(518)) / 9) + -parseInt(t(531)) / 10 + -parseInt(t(545)) / 11 * (parseInt(t(541)) / 12) === e) break;
|
|
462
446
|
s.push(s.shift());
|
|
463
447
|
} catch {
|
|
464
448
|
s.push(s.shift());
|
|
465
449
|
}
|
|
466
|
-
})(
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}, Y();
|
|
472
|
-
}
|
|
473
|
-
const Ve = (r, e) => {
|
|
474
|
-
const t = T, n = T, s = { MRyfg: function(c, l, u) {
|
|
450
|
+
})(Z, 1472653 * 1 + -2 * -897917 + -2275789);
|
|
451
|
+
const Ae = (r, e) => {
|
|
452
|
+
const t = k, n = k, s = { FyYHt: function(c, l, u) {
|
|
453
|
+
return c(l, u);
|
|
454
|
+
}, Fxtoq: function(c, l, u) {
|
|
475
455
|
return c(l, u);
|
|
476
456
|
} };
|
|
477
|
-
|
|
478
|
-
const o =
|
|
479
|
-
e[
|
|
480
|
-
const c =
|
|
481
|
-
e
|
|
457
|
+
He(r, e), Pe(r, e);
|
|
458
|
+
const o = Me(e, r), i = s[t(510)](Oe, e, r), a = s[n(549)](Ue, e, r);
|
|
459
|
+
e[n(537)](o), e[t(519)](i), e.addNotificationListener(a), r[n(556)] = () => {
|
|
460
|
+
const c = n;
|
|
461
|
+
e.removeRequestListener(o), e[c(530)](i), e[c(529)](a);
|
|
482
462
|
};
|
|
483
|
-
},
|
|
484
|
-
const n =
|
|
485
|
-
return
|
|
486
|
-
},
|
|
487
|
-
return c
|
|
488
|
-
},
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, oe = (r, e = P[A(191)]()) => {
|
|
501
|
-
const t = A, n = A, s = { sFqUo: function(u, f, d) {
|
|
463
|
+
}, $ = (r, e, t) => {
|
|
464
|
+
const n = k, s = { pMiva: function(a, c) {
|
|
465
|
+
return a instanceof c;
|
|
466
|
+
}, TeTEy: n(546), fyZbd: function(a, c, l) {
|
|
467
|
+
return a(c, l);
|
|
468
|
+
} }, o = () => {
|
|
469
|
+
var a;
|
|
470
|
+
const c = n;
|
|
471
|
+
s.pMiva(t, U) && ((a = t._eventSource) == null || a.addEventListener(s[c(547)], () => {
|
|
472
|
+
var l;
|
|
473
|
+
const u = c;
|
|
474
|
+
(l = t[u(509)]) == null || l[u(546)]();
|
|
475
|
+
})), Ae(r, e);
|
|
476
|
+
}, i = {};
|
|
477
|
+
i.afterInit = o, s.fyZbd(je, e, i);
|
|
478
|
+
}, re = (r, e = P.randomUUID()) => {
|
|
479
|
+
const t = k, n = k, s = { OfssH: function(u, f, d) {
|
|
502
480
|
return u(f, d);
|
|
503
|
-
}
|
|
504
|
-
o[
|
|
481
|
+
} }, o = {};
|
|
482
|
+
o[t(528)] = e;
|
|
505
483
|
const i = o, a = {};
|
|
506
|
-
a[
|
|
484
|
+
a[t(528)] = e;
|
|
507
485
|
const c = {};
|
|
508
|
-
c[n(
|
|
486
|
+
c[n(558)] = a, c[t(534)] = t(524);
|
|
509
487
|
const l = { requestInit: c, eventSourceInit: { async fetch(u, f) {
|
|
510
|
-
const d = t, h = new Headers((f == null ? void 0 : f
|
|
511
|
-
Object[
|
|
512
|
-
h
|
|
488
|
+
const d = t, h = n, x = new Headers((f == null ? void 0 : f[d(558)]) || {});
|
|
489
|
+
Object.entries(i)[h(498)](([_, v]) => {
|
|
490
|
+
x[h(527)](_, v);
|
|
513
491
|
});
|
|
514
|
-
const
|
|
515
|
-
return
|
|
492
|
+
const p = { ...f };
|
|
493
|
+
return p[h(558)] = x, s.OfssH(fetch, u, p);
|
|
516
494
|
}, withCredentials: !0 } };
|
|
517
|
-
return r && (l[
|
|
518
|
-
},
|
|
519
|
-
const t =
|
|
520
|
-
s
|
|
521
|
-
const o = {};
|
|
522
|
-
|
|
523
|
-
const
|
|
524
|
-
i[
|
|
525
|
-
const
|
|
526
|
-
|
|
495
|
+
return r && (l.requestInit[t(558)].Authorization = t(533) + r, i.Authorization = "Bearer " + r), l;
|
|
496
|
+
}, oe = (r, e = P[S(517)]()) => {
|
|
497
|
+
const t = S, n = S, s = {};
|
|
498
|
+
s.nwQhY = "include";
|
|
499
|
+
const o = s, i = {};
|
|
500
|
+
i["stream-session-id"] = e;
|
|
501
|
+
const a = {};
|
|
502
|
+
a.headers = i, a.credentials = o[t(520)];
|
|
503
|
+
const c = {};
|
|
504
|
+
c[t(544)] = a;
|
|
505
|
+
const l = c;
|
|
506
|
+
return r && (l.requestInit.headers[n(552)] = n(533) + r), l;
|
|
507
|
+
}, E = async (r, e, t) => {
|
|
508
|
+
const n = S, s = S, o = { CFfFC: function(a) {
|
|
509
|
+
return a();
|
|
510
|
+
}, egwVO: function(a, c, l, u) {
|
|
511
|
+
return a(c, l, u);
|
|
512
|
+
} }, i = o.CFfFC(t);
|
|
513
|
+
try {
|
|
514
|
+
return await r[n(538)](i), i;
|
|
515
|
+
} catch (a) {
|
|
516
|
+
if (a instanceof Re) {
|
|
517
|
+
const c = await e();
|
|
518
|
+
return await i[s(505)](c), await o[n(525)](E, r, e, t);
|
|
519
|
+
} else throw a;
|
|
520
|
+
}
|
|
527
521
|
};
|
|
528
|
-
function
|
|
529
|
-
const t =
|
|
530
|
-
return
|
|
531
|
-
return n = n - (
|
|
532
|
-
},
|
|
522
|
+
function k(r, e) {
|
|
523
|
+
const t = Z();
|
|
524
|
+
return k = function(n, s) {
|
|
525
|
+
return n = n - (74 * -67 + -8341 + -73 * -189), t[n];
|
|
526
|
+
}, k(r, e);
|
|
533
527
|
}
|
|
534
|
-
const
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}, alwWV: function(i, a, c, l) {
|
|
540
|
-
return i(a, c, l);
|
|
541
|
-
} }, o = t();
|
|
542
|
-
try {
|
|
543
|
-
return await r.connect(o), o;
|
|
544
|
-
} catch (i) {
|
|
545
|
-
if (s.YdzuA(i, Le)) {
|
|
546
|
-
const a = await s.uzBvt(e);
|
|
547
|
-
return await o.finishAuth(a), await s[n(214)](J, r, e, t);
|
|
548
|
-
} else throw i;
|
|
549
|
-
}
|
|
550
|
-
}, ae = (r, e) => {
|
|
551
|
-
const t = k, n = k, s = {};
|
|
552
|
-
s[t(199)] = "waitForOAuthCode", s[t(183)] = function(i, a) {
|
|
553
|
-
return i === a;
|
|
554
|
-
}, s[n(207)] = t(216);
|
|
528
|
+
const ie = (r, e) => {
|
|
529
|
+
const t = S, n = S, s = {};
|
|
530
|
+
s.RsKXs = function(i, a) {
|
|
531
|
+
return i in a;
|
|
532
|
+
}, s.PBhps = "waitForOAuthCode", s[t(535)] = "function", s[t(507)] = "waitForOAuthCode need to be provided when authProvider is provided";
|
|
555
533
|
const o = s;
|
|
556
|
-
if (o.
|
|
557
|
-
if (
|
|
558
|
-
throw new Error(
|
|
559
|
-
},
|
|
560
|
-
const e =
|
|
561
|
-
return
|
|
562
|
-
},
|
|
563
|
-
return
|
|
564
|
-
},
|
|
565
|
-
return
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
d[e(219)] = c, d[e(193)] = l, d.eventSourceInit = u;
|
|
570
|
-
const h = d, _ = a || P[t(191)](), p = oe(i, _);
|
|
534
|
+
if (o.RsKXs(o[n(551)], r)) return r[n(523)];
|
|
535
|
+
if (typeof e === o.yTKoP) return e;
|
|
536
|
+
throw new Error(o.RZhOv);
|
|
537
|
+
}, We = async (r) => {
|
|
538
|
+
const e = S, t = S, n = { TFSRn: function(w, T, H) {
|
|
539
|
+
return w(T, H);
|
|
540
|
+
}, HwvVa: "mcp-sse-proxy-client", ufTHS: function(w) {
|
|
541
|
+
return w();
|
|
542
|
+
}, WIVYl: function(w, T, H, F) {
|
|
543
|
+
return w(T, H, F);
|
|
544
|
+
}, jniGY: "sessionId" }, { client: s, url: o, token: i, sessionId: a, authProvider: c, requestInit: l, eventSourceInit: u, waitForOAuthCode: f } = r, d = {};
|
|
545
|
+
d.authProvider = c, d.requestInit = l, d.eventSourceInit = u;
|
|
546
|
+
const h = d, x = a || P.randomUUID(), p = n[e(506)](re, i, x);
|
|
571
547
|
if (l) {
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
} else h[
|
|
548
|
+
const w = { ...p.requestInit, ...l };
|
|
549
|
+
w.headers = { ...p[e(544)].headers, ...l.headers }, h.requestInit = w;
|
|
550
|
+
} else h[t(544)] = p.requestInit;
|
|
575
551
|
if (u) {
|
|
576
|
-
const
|
|
577
|
-
h
|
|
578
|
-
} else h
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
let
|
|
552
|
+
const w = { ...p[e(559)], ...u };
|
|
553
|
+
h.eventSourceInit = w;
|
|
554
|
+
} else h.eventSourceInit = p.eventSourceInit;
|
|
555
|
+
const _ = {};
|
|
556
|
+
_.listChanged = !0;
|
|
557
|
+
const v = {};
|
|
558
|
+
v.roots = _, v.sampling = {}, v[e(511)] = {};
|
|
559
|
+
const m = v, y = {};
|
|
560
|
+
y[t(536)] = n.HwvVa, y.version = e(526);
|
|
561
|
+
const I = {};
|
|
562
|
+
I.capabilities = m;
|
|
563
|
+
const L = new V(y, I), O = () => new U(new URL(o), h);
|
|
564
|
+
let R = n[t(504)](O);
|
|
589
565
|
if (c) {
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
} else await
|
|
593
|
-
n
|
|
594
|
-
const
|
|
595
|
-
return
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
return
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
566
|
+
const w = n[e(506)](ie, c, f);
|
|
567
|
+
R = await n[t(513)](E, L, w, O);
|
|
568
|
+
} else await L[e(538)](R);
|
|
569
|
+
n[t(513)]($, L, s, R), R[t(557)] = R[t(542)].searchParams[t(532)](n.jniGY);
|
|
570
|
+
const M = {};
|
|
571
|
+
return M.transport = R, M.sessionId = R[e(557)], M;
|
|
572
|
+
};
|
|
573
|
+
function Z() {
|
|
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 Z = function() {
|
|
576
|
+
return r;
|
|
577
|
+
}, Z();
|
|
578
|
+
}
|
|
579
|
+
const Be = async (r) => {
|
|
580
|
+
const e = S, t = S, n = { Vajmx: e(500), biJOc: function(w) {
|
|
581
|
+
return w();
|
|
582
|
+
}, zXcpO: function(w, T, H) {
|
|
583
|
+
return w(T, H);
|
|
584
|
+
}, zDnjZ: function(w, T, H, F) {
|
|
585
|
+
return w(T, H, F);
|
|
586
|
+
}, FQMAh: function(w, T, H, F) {
|
|
587
|
+
return w(T, H, F);
|
|
605
588
|
} }, { client: s, url: o, token: i, sessionId: a, authProvider: c, requestInit: l, reconnectionOptions: u, waitForOAuthCode: f } = r, d = {};
|
|
606
589
|
d.authProvider = c, d.requestInit = l, d.reconnectionOptions = u;
|
|
607
|
-
const h = d,
|
|
590
|
+
const h = d, x = a || P.randomUUID(), p = oe(i, x);
|
|
608
591
|
if (l) {
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
} else h
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
let
|
|
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);
|
|
622
605
|
if (c) {
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
} else await
|
|
626
|
-
|
|
627
|
-
const
|
|
628
|
-
return
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
606
|
+
const w = n[e(501)](ie, c, f);
|
|
607
|
+
R = await n.zDnjZ(E, L, w, O);
|
|
608
|
+
} else await L.connect(R);
|
|
609
|
+
n.FQMAh($, L, s, R);
|
|
610
|
+
const M = {};
|
|
611
|
+
return M.transport = R, M[t(557)] = R.sessionId, M;
|
|
612
|
+
}, De = async (r) => {
|
|
613
|
+
const e = S, t = S, n = { QgzDy: e(540), jkaVB: function(v, m, y, I) {
|
|
614
|
+
return v(m, y, I);
|
|
615
|
+
} }, { client: s, url: o, token: i, sessionId: a } = r, c = {};
|
|
616
|
+
c.listChanged = !0;
|
|
617
|
+
const l = {};
|
|
618
|
+
l[e(550)] = c, l[e(515)] = {}, l[t(511)] = {};
|
|
619
|
+
const u = l, f = {};
|
|
620
|
+
f.name = n[t(548)], f[t(555)] = t(526);
|
|
621
|
+
const d = {};
|
|
622
|
+
d.capabilities = u;
|
|
623
|
+
const h = new V(f, d), x = a || P[t(517)](), p = new te(new URL(o + e(522) + x + t(554) + i));
|
|
624
|
+
await h.connect(p), n.jkaVB($, h, s, p);
|
|
625
|
+
const _ = {};
|
|
626
|
+
return _[e(512)] = p, _[t(557)] = x, _;
|
|
627
|
+
}, j = C, z = C;
|
|
628
|
+
function C(r, e) {
|
|
629
|
+
const t = Y();
|
|
630
|
+
return C = function(n, s) {
|
|
631
|
+
return n = n - (-16761 + 51 * 337), t[n];
|
|
632
|
+
}, C(r, e);
|
|
635
633
|
}
|
|
636
|
-
const H = R, Q = R;
|
|
637
634
|
(function(r, e) {
|
|
638
|
-
const t =
|
|
635
|
+
const t = C, n = C, s = r();
|
|
639
636
|
for (; ; )
|
|
640
637
|
try {
|
|
641
|
-
if (parseInt(t(
|
|
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;
|
|
642
639
|
s.push(s.shift());
|
|
643
640
|
} catch {
|
|
644
641
|
s.push(s.shift());
|
|
645
642
|
}
|
|
646
|
-
})(
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}, R(r, e);
|
|
643
|
+
})(Y, -220880 + 1 * -333337 + -2 * -384996);
|
|
644
|
+
function Y() {
|
|
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 Y = function() {
|
|
647
|
+
return r;
|
|
648
|
+
}, Y();
|
|
653
649
|
}
|
|
654
|
-
|
|
650
|
+
const Ze = () => P.randomBytes(3485 * 1 + -261 + -3184);
|
|
651
|
+
class tt {
|
|
655
652
|
constructor(e) {
|
|
656
|
-
const t =
|
|
657
|
-
this
|
|
653
|
+
const t = C, n = C;
|
|
654
|
+
this._callBackPromise = {};
|
|
658
655
|
const { clientMetadata: s, state: o, redirectCallback: i, getAuthCodeByState: a, waitForOAuthCode: c } = e;
|
|
659
|
-
this[
|
|
656
|
+
this[t(428)] = s, this[t(454)] = s[t(445)][0], this._state = o || Ze(), this._redirectCallback = i || this.redirectCallbackFunction, this._getAuthCodeByState = a || this.getAuthCodeByStateFunction, this[n(426)] = c || this.waitForOAuthCodeFunction();
|
|
660
657
|
}
|
|
661
658
|
async redirectCallbackFunction(e) {
|
|
662
659
|
var t, n, s, o, i, a;
|
|
663
|
-
const c =
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
!
|
|
669
|
-
|
|
670
|
-
if (!_.ok) {
|
|
671
|
-
(o = (s = this[l(275)])[l(258)]) == null || o.call(s, l(252) + _[l(248)]);
|
|
660
|
+
const c = C, l = C, u = { qITTp: function(x, p, _) {
|
|
661
|
+
return x(p, _);
|
|
662
|
+
}, qcFPW: c(452) }, f = await u.qITTp(fetch, e, { method: u[c(453)] });
|
|
663
|
+
!f.ok && ((n = (t = this._callBackPromise).reject) == null || n.call(t, l(446) + f.statusText));
|
|
664
|
+
const d = await this._getAuthCodeByState(this[l(454)], this[c(442)]);
|
|
665
|
+
if (!d.ok) {
|
|
666
|
+
(o = (s = this[c(433)]).reject) == null || o.call(s, "Failed to fetch auth code: " + d.statusText);
|
|
672
667
|
return;
|
|
673
668
|
}
|
|
674
|
-
const
|
|
675
|
-
(a = (i = this[
|
|
669
|
+
const h = await d[c(431)]();
|
|
670
|
+
(a = (i = this[l(433)])[c(456)]) == null || a.call(i, h[c(432)]);
|
|
676
671
|
}
|
|
677
672
|
async getAuthCodeByStateFunction(e, t) {
|
|
678
|
-
const n =
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
673
|
+
const n = C, s = C, o = {};
|
|
674
|
+
o.tuSmb = n(429);
|
|
675
|
+
const i = o, a = {};
|
|
676
|
+
a[n(460)] = i.tuSmb;
|
|
677
|
+
const c = {};
|
|
678
|
+
return c[s(441)] = t, fetch(e, { method: "POST", headers: a, body: new URLSearchParams(c) });
|
|
682
679
|
}
|
|
683
680
|
waitForOAuthCodeFunction() {
|
|
684
|
-
const e = this
|
|
685
|
-
return () => new Promise((
|
|
686
|
-
const
|
|
687
|
-
|
|
681
|
+
const e = C, t = this[e(433)];
|
|
682
|
+
return () => new Promise((n, s) => {
|
|
683
|
+
const o = e;
|
|
684
|
+
t.resolve = n, t[o(434)] = s;
|
|
688
685
|
});
|
|
689
686
|
}
|
|
690
|
-
get
|
|
691
|
-
return this
|
|
687
|
+
get redirectUrl() {
|
|
688
|
+
return this[C(454)];
|
|
692
689
|
}
|
|
693
|
-
get
|
|
690
|
+
get clientMetadata() {
|
|
694
691
|
return this._clientMetadata;
|
|
695
692
|
}
|
|
696
693
|
state() {
|
|
697
|
-
return this
|
|
694
|
+
return this._state;
|
|
698
695
|
}
|
|
699
|
-
[
|
|
700
|
-
return this
|
|
696
|
+
[j(447)]() {
|
|
697
|
+
return this[j(444)];
|
|
701
698
|
}
|
|
702
|
-
|
|
703
|
-
const t =
|
|
704
|
-
this[t(
|
|
699
|
+
[z(435)](e) {
|
|
700
|
+
const t = j;
|
|
701
|
+
this[t(444)] = e;
|
|
705
702
|
}
|
|
706
|
-
|
|
707
|
-
return this
|
|
703
|
+
[z(457)]() {
|
|
704
|
+
return this[z(439)];
|
|
708
705
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
this[t(272)] = e;
|
|
706
|
+
saveTokens(e) {
|
|
707
|
+
this._tokens = e;
|
|
712
708
|
}
|
|
713
|
-
|
|
714
|
-
this[
|
|
709
|
+
[z(450)](e) {
|
|
710
|
+
this[j(443)](e);
|
|
715
711
|
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
this[t(268)] = e;
|
|
712
|
+
saveCodeVerifier(e) {
|
|
713
|
+
this._codeVerifier = e;
|
|
719
714
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
const s = n;
|
|
724
|
-
if (!this._codeVerifier) throw new Error(s[t(255)]);
|
|
725
|
-
return this[t(268)];
|
|
715
|
+
codeVerifier() {
|
|
716
|
+
if (!this[j(437)]) throw new Error("No code verifier saved");
|
|
717
|
+
return this._codeVerifier;
|
|
726
718
|
}
|
|
727
719
|
}
|
|
728
720
|
(function(r, e) {
|
|
729
|
-
for (var t =
|
|
721
|
+
for (var t = G, n = G, s = r(); ; )
|
|
730
722
|
try {
|
|
731
|
-
var o =
|
|
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);
|
|
732
724
|
if (o === e) break;
|
|
733
725
|
s.push(s.shift());
|
|
734
726
|
} catch {
|
|
735
727
|
s.push(s.shift());
|
|
736
728
|
}
|
|
737
|
-
})(
|
|
738
|
-
function
|
|
739
|
-
var r = ["
|
|
740
|
-
return
|
|
729
|
+
})(J, -73523 * -3 + 1 * -407717 + 530518);
|
|
730
|
+
function J() {
|
|
731
|
+
var r = ["40ecBYYe", "1095owKKYD", "486870YOVwZy", "5752xWiyTO", "561484biNVMw", "1fWJmxQ", "1866064SPnyhb", "1109522vMiuMX", "1602351pPEGwH", "12sVyMLL", "2573296LTwOhv"];
|
|
732
|
+
return J = function() {
|
|
741
733
|
return r;
|
|
742
|
-
},
|
|
734
|
+
}, J();
|
|
743
735
|
}
|
|
744
|
-
function
|
|
745
|
-
var t =
|
|
746
|
-
return
|
|
747
|
-
n = n - (
|
|
736
|
+
function G(r, e) {
|
|
737
|
+
var t = J();
|
|
738
|
+
return G = function(n, s) {
|
|
739
|
+
n = n - (-1 * -642 + 503 * -5 + 2227);
|
|
748
740
|
var o = t[n];
|
|
749
741
|
return o;
|
|
750
|
-
},
|
|
742
|
+
}, G(r, e);
|
|
751
743
|
}
|
|
752
|
-
class
|
|
744
|
+
class nt {
|
|
753
745
|
constructor(e, t) {
|
|
754
746
|
const n = {
|
|
755
747
|
name: "web-mcp-server",
|
|
@@ -770,13 +762,13 @@ class et {
|
|
|
770
762
|
}, this.server.server.onerror = (o) => {
|
|
771
763
|
var i;
|
|
772
764
|
(i = this.onerror) == null || i.call(this, o);
|
|
773
|
-
}, this.server.server.setRequestHandler(
|
|
765
|
+
}, this.server.server.setRequestHandler(ee, async () => ({}));
|
|
774
766
|
}
|
|
775
767
|
/**
|
|
776
768
|
* Connects the server to a transport via the specified option.
|
|
777
769
|
*/
|
|
778
770
|
async connect(e) {
|
|
779
|
-
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 K(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
|
|
780
772
|
}
|
|
781
773
|
/**
|
|
782
774
|
* Closes the connection.
|
|
@@ -918,19 +910,19 @@ class et {
|
|
|
918
910
|
* Registers a handler for the subscribe request.
|
|
919
911
|
*/
|
|
920
912
|
onSubscribe(e) {
|
|
921
|
-
this.server.server.setRequestHandler(
|
|
913
|
+
this.server.server.setRequestHandler(fe, e);
|
|
922
914
|
}
|
|
923
915
|
/**
|
|
924
916
|
* Registers a handler for the unsubscribe request.
|
|
925
917
|
*/
|
|
926
918
|
onUnsubscribe(e) {
|
|
927
|
-
this.server.server.setRequestHandler(
|
|
919
|
+
this.server.server.setRequestHandler(he, e);
|
|
928
920
|
}
|
|
929
921
|
/**
|
|
930
922
|
* Registers a handler for the set log level request.
|
|
931
923
|
*/
|
|
932
924
|
onSetLogLevel(e) {
|
|
933
|
-
this.server.server.setRequestHandler(
|
|
925
|
+
this.server.server.setRequestHandler(ee, e);
|
|
934
926
|
}
|
|
935
927
|
/**
|
|
936
928
|
* Registers a handler for the list tools request.
|
|
@@ -951,8 +943,8 @@ class et {
|
|
|
951
943
|
e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
|
|
952
944
|
}
|
|
953
945
|
}
|
|
954
|
-
const
|
|
955
|
-
class
|
|
946
|
+
const st = (r, e) => new K(r, e), rt = () => qe(), ot = (r) => r instanceof K, it = (r) => r instanceof ne;
|
|
947
|
+
class at {
|
|
956
948
|
constructor(e, t) {
|
|
957
949
|
const n = {
|
|
958
950
|
name: "web-mcp-client",
|
|
@@ -962,7 +954,7 @@ class ot {
|
|
|
962
954
|
sampling: {},
|
|
963
955
|
elicitation: {}
|
|
964
956
|
};
|
|
965
|
-
this.client = new
|
|
957
|
+
this.client = new V(e || n, t || { capabilities: s }), this.client.onclose = () => {
|
|
966
958
|
var o;
|
|
967
959
|
(o = this.onclose) == null || o.call(this);
|
|
968
960
|
}, this.client.onerror = (o) => {
|
|
@@ -979,32 +971,32 @@ class ot {
|
|
|
979
971
|
const { url: t, token: n, sessionId: s, authProvider: o, type: i, agent: a, onError: c, onUnauthorized: l, onReconnect: u } = e;
|
|
980
972
|
if (a === !0) {
|
|
981
973
|
const h = { client: this.client, url: t, token: n, sessionId: s, authProvider: o };
|
|
982
|
-
let
|
|
983
|
-
const
|
|
984
|
-
const { transport:
|
|
985
|
-
|
|
986
|
-
c == null || c(
|
|
987
|
-
}, p = { transport:
|
|
974
|
+
let x = !1, p;
|
|
975
|
+
const _ = async () => {
|
|
976
|
+
const { transport: v, sessionId: m } = i === "sse" ? await We(h) : i === "socket" ? await De(h) : await Be(h);
|
|
977
|
+
v.onerror = async (y) => {
|
|
978
|
+
c == null || c(y), y.message === "Unauthorized" && !x && (typeof l == "function" ? await l(_) : (x = !0, await _(), x = !1, await (u == null ? void 0 : u())));
|
|
979
|
+
}, p = { transport: v, sessionId: m };
|
|
988
980
|
};
|
|
989
|
-
return await
|
|
981
|
+
return await _(), p;
|
|
990
982
|
}
|
|
991
983
|
const f = new URL(t);
|
|
992
984
|
let d;
|
|
993
|
-
if (i === "channel" && (d = new
|
|
985
|
+
if (i === "channel" && (d = new X(t), await this.client.connect(d)), i === "sse")
|
|
994
986
|
if (o) {
|
|
995
|
-
const h = () => new
|
|
996
|
-
d = await
|
|
987
|
+
const h = () => new U(f, { authProvider: o });
|
|
988
|
+
d = await E(this.client, o.waitForOAuthCode, h);
|
|
997
989
|
} else {
|
|
998
|
-
const h =
|
|
999
|
-
d = new
|
|
990
|
+
const h = re(n, s);
|
|
991
|
+
d = new U(f, h), await this.client.connect(d);
|
|
1000
992
|
}
|
|
1001
|
-
if (typeof d > "u")
|
|
993
|
+
if (i === "socket" && (d = new te(new URL(`${t}?sessionId=${s}&token=${n}`)), d.sessionId = s, await this.client.connect(d)), typeof d > "u")
|
|
1002
994
|
if (o) {
|
|
1003
|
-
const h = () => new
|
|
1004
|
-
d = await
|
|
995
|
+
const h = () => new N(f, { authProvider: o });
|
|
996
|
+
d = await E(this.client, o.waitForOAuthCode, h);
|
|
1005
997
|
} else {
|
|
1006
|
-
const h =
|
|
1007
|
-
d = new
|
|
998
|
+
const h = oe(n, s);
|
|
999
|
+
d = new N(f, h), await this.client.connect(d);
|
|
1008
1000
|
}
|
|
1009
1001
|
return this.transport = d, { transport: this.transport, sessionId: this.transport.sessionId };
|
|
1010
1002
|
}
|
|
@@ -1096,7 +1088,7 @@ class ot {
|
|
|
1096
1088
|
* Calls a tool on the server with the given parameters.
|
|
1097
1089
|
*/
|
|
1098
1090
|
async callTool(e, t) {
|
|
1099
|
-
return await this.client.callTool(e,
|
|
1091
|
+
return await this.client.callTool(e, pe, t);
|
|
1100
1092
|
}
|
|
1101
1093
|
/**
|
|
1102
1094
|
* Lists all tools available on the server.
|
|
@@ -1156,7 +1148,7 @@ class ot {
|
|
|
1156
1148
|
* Registers a handler for the elicitation request.
|
|
1157
1149
|
*/
|
|
1158
1150
|
onElicit(e) {
|
|
1159
|
-
this.client.setRequestHandler(
|
|
1151
|
+
this.client.setRequestHandler(ve, e);
|
|
1160
1152
|
}
|
|
1161
1153
|
/**
|
|
1162
1154
|
* Registers a handler for the create LLM message request.
|
|
@@ -1174,25 +1166,25 @@ class ot {
|
|
|
1174
1166
|
* Registers a handler for the tool list changed notification.
|
|
1175
1167
|
*/
|
|
1176
1168
|
onToolListChanged(e) {
|
|
1177
|
-
this.client.setNotificationHandler(
|
|
1169
|
+
this.client.setNotificationHandler(ge, e);
|
|
1178
1170
|
}
|
|
1179
1171
|
/**
|
|
1180
1172
|
* Registers a handler for the prompt list changed notification.
|
|
1181
1173
|
*/
|
|
1182
1174
|
onPromptListChanged(e) {
|
|
1183
|
-
this.client.setNotificationHandler(
|
|
1175
|
+
this.client.setNotificationHandler(me, e);
|
|
1184
1176
|
}
|
|
1185
1177
|
/**
|
|
1186
1178
|
* Registers a handler for the resource list changed notification.
|
|
1187
1179
|
*/
|
|
1188
1180
|
onResourceListChanged(e) {
|
|
1189
|
-
this.client.setNotificationHandler(
|
|
1181
|
+
this.client.setNotificationHandler(ye, e);
|
|
1190
1182
|
}
|
|
1191
1183
|
/**
|
|
1192
1184
|
* Registers a handler for the resource updated notification.
|
|
1193
1185
|
*/
|
|
1194
1186
|
onResourceUpdated(e) {
|
|
1195
|
-
this.client.setNotificationHandler(
|
|
1187
|
+
this.client.setNotificationHandler(Ie, e);
|
|
1196
1188
|
}
|
|
1197
1189
|
/**
|
|
1198
1190
|
* Registers a handler for the logging message notification.
|
|
@@ -1204,29 +1196,29 @@ class ot {
|
|
|
1204
1196
|
* Close the transport for window.addEventListener('pagehide')
|
|
1205
1197
|
*/
|
|
1206
1198
|
async onPagehide(e) {
|
|
1207
|
-
e.persisted || (
|
|
1199
|
+
e.persisted || (Ye(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
|
|
1208
1200
|
}
|
|
1209
1201
|
}
|
|
1210
|
-
const
|
|
1202
|
+
const ct = (r, e) => new U(r, e), lt = (r, e) => new N(r, e), ut = (r, e) => new X(r, e), dt = (r) => r instanceof U, Ye = (r) => r instanceof N, ft = (r) => r instanceof X, ht = (r) => r instanceof V;
|
|
1211
1203
|
export {
|
|
1212
1204
|
pt as Ajv,
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1205
|
+
tt as AuthClientProvider,
|
|
1206
|
+
bt as ResourceTemplate,
|
|
1207
|
+
yt as UriTemplate,
|
|
1208
|
+
at as WebMcpClient,
|
|
1209
|
+
nt as WebMcpServer,
|
|
1210
|
+
Ct as completable,
|
|
1211
|
+
ut as createMessageChannelClientTransport,
|
|
1212
|
+
rt as createMessageChannelPairTransport,
|
|
1213
|
+
st as createMessageChannelServerTransport,
|
|
1214
|
+
ct as createSSEClientTransport,
|
|
1215
|
+
lt as createStreamableHTTPClientTransport,
|
|
1216
|
+
St as getDisplayName,
|
|
1217
|
+
ht as isMcpClient,
|
|
1218
|
+
it as isMcpServer,
|
|
1219
|
+
ft as isMessageChannelClientTransport,
|
|
1220
|
+
ot as isMessageChannelServerTransport,
|
|
1221
|
+
dt as isSSEClientTransport,
|
|
1222
|
+
Ye as isStreamableHTTPClientTransport,
|
|
1231
1223
|
gt as z
|
|
1232
1224
|
};
|