@opentiny/next-sdk 0.1.15-beta.4 → 0.1.15-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WebMcpClient.d.ts +26 -165
- package/dist/WebMcpServer.d.ts +147 -36
- package/dist/index.es.dev.js +7399 -3878
- package/dist/index.es.js +16324 -13513
- package/dist/index.umd.dev.js +7334 -3813
- package/dist/index.umd.js +63 -61
- package/dist/{mcpsdk@1.24.3.dev.js → mcpsdk@1.23.1.dev.js} +201 -1695
- package/dist/{mcpsdk@1.24.3.es.dev.js → mcpsdk@1.23.1.es.dev.js} +201 -1695
- package/dist/mcpsdk@1.23.1.es.js +15530 -0
- package/dist/mcpsdk@1.23.1.js +43 -0
- package/dist/webagent.dev.js +13766 -9959
- package/dist/webagent.es.dev.js +13847 -10040
- package/dist/webagent.es.js +17686 -14643
- package/dist/webagent.js +60 -58
- package/dist/webmcp-full.dev.js +6697 -3408
- package/dist/webmcp-full.es.dev.js +6672 -3383
- package/dist/webmcp-full.es.js +11482 -8820
- package/dist/webmcp-full.js +28 -28
- package/dist/webmcp.dev.js +652 -618
- package/dist/webmcp.es.dev.js +652 -618
- package/dist/webmcp.es.js +665 -626
- package/dist/webmcp.js +1 -1
- package/package.json +2 -2
- package/dist/mcpsdk@1.24.3.es.js +0 -16781
- package/dist/mcpsdk@1.24.3.js +0 -43
package/dist/webmcp.es.js
CHANGED
|
@@ -1,771 +1,810 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { JSONRPCMessageSchema as
|
|
3
|
-
import { Client as
|
|
4
|
-
import { SSEClientTransport as
|
|
5
|
-
import { StreamableHTTPClientTransport as
|
|
6
|
-
import { WebSocketClientTransport as
|
|
7
|
-
import { UnauthorizedError as
|
|
8
|
-
import { McpServer as
|
|
9
|
-
import { ResourceTemplate as
|
|
10
|
-
import { z as
|
|
11
|
-
import { UriTemplate as
|
|
12
|
-
import { completable as
|
|
1
|
+
import { default as bt } from "ajv";
|
|
2
|
+
import { JSONRPCMessageSchema as oe, EmptyResultSchema as he, ElicitResultSchema as fe, CreateMessageResultSchema as pe, ListRootsResultSchema as xe, SetLevelRequestSchema as se, SubscribeRequestSchema as _e, UnsubscribeRequestSchema as ve, ListResourcesRequestSchema as me, RootsListChangedNotificationSchema as ge, CallToolResultSchema as we, ElicitRequestSchema as be, CreateMessageRequestSchema as ye, ListRootsRequestSchema as Ie, ToolListChangedNotificationSchema as Ce, PromptListChangedNotificationSchema as Re, ResourceListChangedNotificationSchema as Se, ResourceUpdatedNotificationSchema as Le, LoggingMessageNotificationSchema as Pe } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { Client as A } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
+
import { SSEClientTransport as V } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
5
|
+
import { StreamableHTTPClientTransport as Q } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
6
|
+
import { WebSocketClientTransport as ie } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
7
|
+
import { UnauthorizedError as ke } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
8
|
+
import { McpServer as ae } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
+
import { ResourceTemplate as It } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
+
import { z as Rt } from "zod";
|
|
11
|
+
import { UriTemplate as Lt } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
12
|
+
import { completable as kt } from "@modelcontextprotocol/sdk/server/completable.js";
|
|
13
13
|
import { getDisplayName as Tt } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
|
|
14
|
-
|
|
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 z = function() {
|
|
17
|
-
return r;
|
|
18
|
-
}, z();
|
|
19
|
-
}
|
|
14
|
+
const H = I;
|
|
20
15
|
(function(r, e) {
|
|
21
|
-
const t =
|
|
16
|
+
const t = I, n = I, s = r();
|
|
22
17
|
for (; ; )
|
|
23
18
|
try {
|
|
24
|
-
if (parseInt(t(
|
|
25
|
-
|
|
19
|
+
if (parseInt(t(403)) / 1 + -parseInt(t(411)) / 2 * (-parseInt(n(406)) / 3) + -parseInt(n(425)) / 4 * (parseInt(t(387)) / 5) + -parseInt(n(426)) / 6 + parseInt(n(395)) / 7 * (-parseInt(t(419)) / 8) + -parseInt(t(413)) / 9 + parseInt(n(400)) / 10 === e) break;
|
|
20
|
+
s.push(s.shift());
|
|
26
21
|
} catch {
|
|
27
|
-
|
|
22
|
+
s.push(s.shift());
|
|
28
23
|
}
|
|
29
|
-
})(
|
|
30
|
-
const
|
|
31
|
-
const r =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
})(B, -118057 + 3521 * -35 + -2099 * -233);
|
|
25
|
+
const ce = () => {
|
|
26
|
+
const r = I, e = I, t = {};
|
|
27
|
+
t[r(420)] = "3|0|2|1|4", t.vQYJZ = function(a, i) {
|
|
28
|
+
return a !== i;
|
|
29
|
+
}, t[e(394)] = e(414), t.ktWqD = function(a, i) {
|
|
30
|
+
return a !== i;
|
|
31
|
+
}, t[r(424)] = r(391);
|
|
32
|
+
const n = t, s = n[e(420)].split("|");
|
|
33
|
+
let o = 859 * 2 + -3 * -1039 + -4835 * 1;
|
|
34
|
+
for (; ; ) {
|
|
35
|
+
switch (s[o++]) {
|
|
36
|
+
case "0":
|
|
37
|
+
if (n[e(407)](typeof window, "undefined")) return window;
|
|
38
|
+
continue;
|
|
39
|
+
case "1":
|
|
40
|
+
if (n.vQYJZ(typeof self, n.NZmUq)) return self;
|
|
41
|
+
continue;
|
|
42
|
+
case "2":
|
|
43
|
+
if (n[e(405)](typeof global, "undefined")) return global;
|
|
44
|
+
continue;
|
|
45
|
+
case "3":
|
|
46
|
+
if (n[e(405)](typeof globalThis, n[r(394)])) return globalThis;
|
|
47
|
+
continue;
|
|
48
|
+
case "4":
|
|
49
|
+
return Function(n[r(424)])();
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
39
53
|
}, qe = (r, e, t) => {
|
|
40
|
-
const
|
|
41
|
-
o
|
|
42
|
-
return i
|
|
43
|
-
}, o[n(
|
|
54
|
+
const n = I, s = I, o = {};
|
|
55
|
+
o.eOzBp = function(i, c) {
|
|
56
|
+
return i !== c;
|
|
57
|
+
}, o.ooaJk = "undefined", o[n(402)] = function(i, c) {
|
|
58
|
+
return i === c;
|
|
59
|
+
}, o[n(421)] = "function";
|
|
44
60
|
const a = o;
|
|
45
|
-
typeof window
|
|
46
|
-
},
|
|
47
|
-
const t =
|
|
48
|
-
|
|
61
|
+
a[s(389)](typeof window, a.ooaJk) ? r[s(423)](e, "*", t) : n(423) in r && a.pTvSc(typeof r[s(423)], a[n(421)]) && r.postMessage(e, t);
|
|
62
|
+
}, Te = (r, e) => {
|
|
63
|
+
const t = I, n = I, s = {};
|
|
64
|
+
s.nTCfA = function(a, i) {
|
|
65
|
+
return a in i;
|
|
66
|
+
}, s[t(390)] = "addEventListener", s[t(385)] = function(a, i) {
|
|
49
67
|
return a === i;
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
}, s[t(409)] = "function", s.VaHpd = n(392), s[n(384)] = t(417), s.FPOYW = function(a, i) {
|
|
69
|
+
return a !== i;
|
|
70
|
+
};
|
|
71
|
+
const o = s;
|
|
72
|
+
o.nTCfA(o.ogKey, r) && o[n(385)](typeof r.addEventListener, o[n(409)]) ? r[n(386)](o.VaHpd, e) : o[n(384)] in r && o[t(398)](typeof r[n(417)], t(414)) && (r.onmessage = e);
|
|
53
73
|
};
|
|
54
|
-
class
|
|
74
|
+
class D {
|
|
55
75
|
constructor(e) {
|
|
56
|
-
|
|
57
|
-
this[t(406)] = e;
|
|
76
|
+
this._port = e;
|
|
58
77
|
}
|
|
59
|
-
async
|
|
60
|
-
const e =
|
|
61
|
-
this[e(
|
|
62
|
-
var
|
|
63
|
-
const a = e
|
|
78
|
+
async [H(401)]() {
|
|
79
|
+
const e = H, t = H;
|
|
80
|
+
this[e(422)] && (this[t(422)].onmessage = (n) => {
|
|
81
|
+
var s, o;
|
|
82
|
+
const a = e;
|
|
64
83
|
try {
|
|
65
|
-
const
|
|
66
|
-
(
|
|
67
|
-
} catch (
|
|
68
|
-
const c = new Error("MessageChannel failed to parse message: " +
|
|
69
|
-
(o = this[
|
|
84
|
+
const i = oe.parse(n.data.message);
|
|
85
|
+
(s = this.onmessage) == null || s.call(this, i, n[a(412)][a(428)]);
|
|
86
|
+
} catch (i) {
|
|
87
|
+
const c = new Error("MessageChannel failed to parse message: " + i);
|
|
88
|
+
(o = this[a(383)]) == null || o.call(this, c);
|
|
70
89
|
}
|
|
71
|
-
}, this._port
|
|
72
|
-
var
|
|
73
|
-
const o = t, a =
|
|
74
|
-
(
|
|
75
|
-
}, this[
|
|
90
|
+
}, this._port.onmessageerror = (n) => {
|
|
91
|
+
var s;
|
|
92
|
+
const o = t, a = new Error("MessageChannel transport error: " + JSON[o(415)](n));
|
|
93
|
+
(s = this.onerror) == null || s.call(this, a);
|
|
94
|
+
}, this[t(422)].start());
|
|
76
95
|
}
|
|
77
96
|
async send(e, t) {
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
},
|
|
81
|
-
return
|
|
97
|
+
const n = { EoBZE: function(s) {
|
|
98
|
+
return s();
|
|
99
|
+
}, leEiG: function(s, o) {
|
|
100
|
+
return s instanceof o;
|
|
101
|
+
}, cDUwk: function(s, o) {
|
|
102
|
+
return s(o);
|
|
82
103
|
} };
|
|
83
|
-
return new Promise((
|
|
104
|
+
return new Promise((s, o) => {
|
|
84
105
|
var a;
|
|
85
|
-
const i =
|
|
106
|
+
const i = I, c = I;
|
|
86
107
|
try {
|
|
87
|
-
const
|
|
88
|
-
|
|
108
|
+
const l = {};
|
|
109
|
+
l[i(404)] = t?.[i(404)];
|
|
89
110
|
const u = {};
|
|
90
|
-
u[
|
|
91
|
-
} catch (
|
|
92
|
-
const u =
|
|
93
|
-
(a = this
|
|
111
|
+
u[i(392)] = e, u.extra = l, this._port && this._port[c(423)](u), n[i(399)](s);
|
|
112
|
+
} catch (l) {
|
|
113
|
+
const u = n.leEiG(l, Error) ? l : new Error(n.cDUwk(String, l));
|
|
114
|
+
(a = this.onerror) == null || a.call(this, u), o(u);
|
|
94
115
|
}
|
|
95
116
|
});
|
|
96
117
|
}
|
|
97
118
|
async close() {
|
|
98
119
|
var e, t;
|
|
99
|
-
const
|
|
100
|
-
(e = this._port) == null || e[
|
|
120
|
+
const n = H, s = H;
|
|
121
|
+
(e = this._port) == null || e[n(393)](), this[n(422)] = void 0, (t = this[s(408)]) == null || t.call(this);
|
|
101
122
|
}
|
|
102
123
|
}
|
|
103
|
-
class
|
|
104
|
-
constructor(e, t =
|
|
105
|
-
const
|
|
106
|
-
return i
|
|
124
|
+
class $ extends D {
|
|
125
|
+
constructor(e, t = ce()) {
|
|
126
|
+
const n = H, s = { lSpBh: function(a, i, c, l) {
|
|
127
|
+
return a(i, c, l);
|
|
107
128
|
} };
|
|
108
|
-
super(), this
|
|
109
|
-
const
|
|
110
|
-
this[n(
|
|
129
|
+
super(), this._endpoint = e, this._globalObject = t;
|
|
130
|
+
const o = new MessageChannel();
|
|
131
|
+
this._port = o[n(410)], s[n(418)](qe, this._globalObject, { endpoint: this[n(397)] }, [o[n(429)]]);
|
|
111
132
|
}
|
|
112
133
|
}
|
|
113
|
-
class
|
|
114
|
-
constructor(e, t =
|
|
115
|
-
const s =
|
|
116
|
-
return
|
|
117
|
-
},
|
|
118
|
-
return
|
|
134
|
+
class ee extends D {
|
|
135
|
+
constructor(e, t = ce()) {
|
|
136
|
+
const n = H, s = H, o = { HITdC: function(a, i) {
|
|
137
|
+
return a === i;
|
|
138
|
+
}, QdDxM: function(a) {
|
|
139
|
+
return a();
|
|
140
|
+
}, jowPp: function(a, i, c) {
|
|
141
|
+
return a(i, c);
|
|
119
142
|
} };
|
|
120
|
-
super(), this
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
super(), this[n(397)] = e, this[s(388)] = t, this[s(416)] = new Promise((a) => {
|
|
144
|
+
const i = n, c = { XlglK: function(l, u) {
|
|
145
|
+
return o.HITdC(l, u);
|
|
146
|
+
}, pXlad: function(l) {
|
|
147
|
+
return o.QdDxM(l);
|
|
148
|
+
} };
|
|
149
|
+
o[i(427)](Te, this._globalObject, (l) => {
|
|
150
|
+
const u = i, d = i;
|
|
151
|
+
l[u(412)] && c.XlglK(l.data[d(396)], this._endpoint) && (this[u(422)] = l[d(430)][-3036 + -1518 * -2], c.pXlad(a));
|
|
125
152
|
});
|
|
126
153
|
});
|
|
127
154
|
}
|
|
128
155
|
async listen() {
|
|
129
|
-
return this
|
|
156
|
+
return this._listen;
|
|
130
157
|
}
|
|
131
158
|
}
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
return
|
|
136
|
-
},
|
|
159
|
+
function B() {
|
|
160
|
+
const r = ["message", "close", "NZmUq", "177464iLQCGm", "endpoint", "_endpoint", "FPOYW", "EoBZE", "3022630ngzRBs", "start", "pTvSc", "272809yMhhPJ", "authInfo", "ktWqD", "21849KofsKk", "vQYJZ", "onclose", "mkHJS", "port1", "22dUTKmE", "data", "608229RXNlUs", "undefined", "stringify", "_listen", "onmessage", "lSpBh", "8FmlYyF", "XwdDB", "cHbAW", "_port", "postMessage", "kFtNB", "72572mbPnfL", "689424jqaGZE", "jowPp", "extra", "port2", "ports", "onerror", "Fzdib", "mkuHv", "addEventListener", "55juYkZZ", "_globalObject", "eOzBp", "ogKey", "return this"];
|
|
161
|
+
return B = function() {
|
|
162
|
+
return r;
|
|
163
|
+
}, B();
|
|
137
164
|
}
|
|
138
|
-
|
|
165
|
+
function I(r, e) {
|
|
166
|
+
const t = B();
|
|
167
|
+
return I = function(n, s) {
|
|
168
|
+
return n = n - (17227 + 1 * -16844), t[n];
|
|
169
|
+
}, I(r, e);
|
|
170
|
+
}
|
|
171
|
+
const He = () => {
|
|
139
172
|
const r = new MessageChannel();
|
|
140
|
-
return [new
|
|
173
|
+
return [new D(r.port1), new D(r.port2)];
|
|
141
174
|
};
|
|
142
175
|
(function(r, e) {
|
|
143
|
-
const t =
|
|
176
|
+
const t = x, n = x, s = r();
|
|
144
177
|
for (; ; )
|
|
145
178
|
try {
|
|
146
|
-
if (parseInt(t(
|
|
147
|
-
|
|
179
|
+
if (parseInt(t(452)) / 1 * (parseInt(n(441)) / 2) + parseInt(n(434)) / 3 * (-parseInt(n(418)) / 4) + parseInt(t(459)) / 5 + parseInt(t(482)) / 6 * (-parseInt(t(479)) / 7) + -parseInt(t(458)) / 8 * (parseInt(t(457)) / 9) + -parseInt(n(416)) / 10 + -parseInt(t(450)) / 11 * (-parseInt(t(433)) / 12) === e) break;
|
|
180
|
+
s.push(s.shift());
|
|
148
181
|
} catch {
|
|
149
|
-
|
|
182
|
+
s.push(s.shift());
|
|
150
183
|
}
|
|
151
|
-
})(
|
|
152
|
-
const
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
a
|
|
156
|
-
const i = a, { id:
|
|
184
|
+
})(W, -411935 * 1 + 228107 + 208149 * 2);
|
|
185
|
+
const Me = async (r, e, t) => {
|
|
186
|
+
var n;
|
|
187
|
+
const s = x, o = x, a = {};
|
|
188
|
+
a.VRyiJ = "tools/list", a.VkPYu = "tools/call", a[s(475)] = s(411), a.SoCaE = "resources/templates/list", a[o(484)] = "resources/read", a[s(461)] = "prompts/get", a.srIIC = o(477), a[o(436)] = o(478), a[o(442)] = s(437), a.dEmVs = s(465);
|
|
189
|
+
const i = a, { id: c, method: l, params: u } = t;
|
|
157
190
|
let d = {};
|
|
158
|
-
switch (
|
|
159
|
-
case i
|
|
191
|
+
switch (l) {
|
|
192
|
+
case i.VRyiJ:
|
|
160
193
|
d = await e.listTools(u);
|
|
161
194
|
break;
|
|
162
|
-
case i.
|
|
195
|
+
case i.VkPYu:
|
|
163
196
|
d = await e.callTool(u);
|
|
164
197
|
break;
|
|
165
|
-
case i
|
|
166
|
-
d = await e
|
|
198
|
+
case i.fgMSD:
|
|
199
|
+
d = await e.listResources(u);
|
|
167
200
|
break;
|
|
168
|
-
case i[o(
|
|
201
|
+
case i[o(466)]:
|
|
169
202
|
d = await e.listResourceTemplates(u);
|
|
170
203
|
break;
|
|
171
|
-
case
|
|
172
|
-
d = await e[
|
|
204
|
+
case i.sthgI:
|
|
205
|
+
d = await e[s(455)](u);
|
|
173
206
|
break;
|
|
174
|
-
case
|
|
207
|
+
case o(486):
|
|
175
208
|
d = await e.subscribeResource(u);
|
|
176
209
|
break;
|
|
177
|
-
case
|
|
210
|
+
case s(410):
|
|
178
211
|
d = await e.unsubscribeResource(u);
|
|
179
212
|
break;
|
|
180
|
-
case i[
|
|
181
|
-
d = await e
|
|
213
|
+
case i[o(461)]:
|
|
214
|
+
d = await e[o(414)](u);
|
|
182
215
|
break;
|
|
183
|
-
case i
|
|
184
|
-
d = await e
|
|
216
|
+
case i[s(412)]:
|
|
217
|
+
d = await e[s(491)](u);
|
|
185
218
|
break;
|
|
186
|
-
case i[
|
|
187
|
-
d = await e[
|
|
219
|
+
case i[s(436)]:
|
|
220
|
+
d = await e[s(478)]();
|
|
188
221
|
break;
|
|
189
|
-
case i.
|
|
222
|
+
case i.kkNqg:
|
|
190
223
|
d = await e.complete(u);
|
|
191
224
|
break;
|
|
192
|
-
case
|
|
193
|
-
d = await e[
|
|
225
|
+
case s(464):
|
|
226
|
+
d = await e.setLoggingLevel(u?.[o(443)]);
|
|
194
227
|
break;
|
|
195
228
|
}
|
|
196
229
|
const h = {};
|
|
197
|
-
h
|
|
198
|
-
},
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
a
|
|
202
|
-
const i = a, { id:
|
|
230
|
+
h.result = d, h.jsonrpc = i[o(472)], h.id = c, await ((n = r?.[o(488)]) == null ? void 0 : n[s(460)](h));
|
|
231
|
+
}, Ue = async (r, e, t) => {
|
|
232
|
+
var n;
|
|
233
|
+
const s = x, o = x, a = {};
|
|
234
|
+
a[s(487)] = o(462), a.ypHTC = "ping", a.fPExS = s(465);
|
|
235
|
+
const i = a, { id: c, method: l, params: u } = t;
|
|
203
236
|
let d = {};
|
|
204
|
-
switch (
|
|
205
|
-
case
|
|
237
|
+
switch (l) {
|
|
238
|
+
case "roots/list":
|
|
206
239
|
const f = {};
|
|
207
|
-
f.method =
|
|
240
|
+
f.method = l, f[o(446)] = u, d = await e[s(469)](f, xe);
|
|
208
241
|
break;
|
|
209
|
-
case
|
|
210
|
-
const
|
|
211
|
-
|
|
242
|
+
case "sampling/createMessage":
|
|
243
|
+
const _ = {};
|
|
244
|
+
_[s(481)] = l, _[s(446)] = u, d = await e.request(_, pe);
|
|
212
245
|
break;
|
|
213
|
-
case i
|
|
246
|
+
case i[s(487)]:
|
|
214
247
|
const p = {};
|
|
215
|
-
p.method =
|
|
248
|
+
p.method = l, p[o(446)] = u, d = await e.request(p, fe);
|
|
216
249
|
break;
|
|
217
|
-
case i
|
|
218
|
-
const
|
|
219
|
-
|
|
250
|
+
case i.ypHTC:
|
|
251
|
+
const v = {};
|
|
252
|
+
v.method = l, d = await e.request(v, he);
|
|
220
253
|
break;
|
|
221
254
|
}
|
|
222
255
|
const h = {};
|
|
223
|
-
return h
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
return
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
256
|
+
return h.result = d, h.jsonrpc = i.fPExS, h.id = c, await ((n = r?.transport) == null ? void 0 : n.send(h)), d;
|
|
257
|
+
};
|
|
258
|
+
function x(r, e) {
|
|
259
|
+
const t = W();
|
|
260
|
+
return x = function(n, s) {
|
|
261
|
+
return n = n - (-8023 + 4 * -2344 + -17809 * -1), t[n];
|
|
262
|
+
}, x(r, e);
|
|
263
|
+
}
|
|
264
|
+
const Ne = (r, e) => {
|
|
265
|
+
const t = x, n = x, s = { vYlhn: function(a, i) {
|
|
266
|
+
return a === i;
|
|
267
|
+
}, DhPFX: t(470), NYVNC: function(a, i, c, l) {
|
|
268
|
+
return a(i, c, l);
|
|
269
|
+
}, yfZbw: "2.0" }, o = r._onrequest;
|
|
270
|
+
r[n(463)] = async (a, i) => {
|
|
271
|
+
var c, l, u, d, h;
|
|
272
|
+
const f = n, _ = t, { id: p, method: v } = a;
|
|
233
273
|
try {
|
|
234
|
-
s[
|
|
235
|
-
} catch (
|
|
236
|
-
const { code:
|
|
274
|
+
s[f(451)](v, s.DhPFX) ? await o.call(r, a, i) : await s[_(474)](Me, r, e, a);
|
|
275
|
+
} catch (m) {
|
|
276
|
+
const { code: b, message: C, data: P } = m;
|
|
237
277
|
try {
|
|
238
|
-
if (
|
|
278
|
+
if (b) {
|
|
239
279
|
const w = {};
|
|
240
|
-
w
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
} else (
|
|
280
|
+
w[_(485)] = b, w[f(422)] = C, w.data = P;
|
|
281
|
+
const L = {};
|
|
282
|
+
L[_(448)] = w, L.jsonrpc = s[f(417)], L.id = p, await ((c = r?.transport) == null ? void 0 : c[_(460)](L));
|
|
283
|
+
} else (u = (l = r?.transport) == null ? void 0 : l.onerror) == null || u.call(l, m);
|
|
244
284
|
} catch (w) {
|
|
245
|
-
(
|
|
285
|
+
(h = (d = r?.transport) == null ? void 0 : d.onerror) == null || h.call(d, w);
|
|
246
286
|
}
|
|
247
287
|
}
|
|
248
288
|
};
|
|
249
|
-
},
|
|
250
|
-
const t =
|
|
251
|
-
|
|
289
|
+
}, Fe = (r, e) => {
|
|
290
|
+
const t = x, n = x, s = {};
|
|
291
|
+
s[t(476)] = t(439), s[t(431)] = function(a, i) {
|
|
252
292
|
return a !== i;
|
|
253
|
-
},
|
|
254
|
-
const o =
|
|
255
|
-
r
|
|
256
|
-
var i,
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
259
|
-
await e
|
|
293
|
+
}, s.UPdQt = "notifications/cancelled";
|
|
294
|
+
const o = s;
|
|
295
|
+
r[t(421)] = async (a) => {
|
|
296
|
+
var i, c;
|
|
297
|
+
const l = t, u = n, { method: d, params: h } = a;
|
|
298
|
+
if (d !== o[l(476)] && (o.QWYMz(d, o.UPdQt) || h?.[u(490)])) try {
|
|
299
|
+
await e[l(445)](a);
|
|
260
300
|
} catch (f) {
|
|
261
|
-
(
|
|
301
|
+
(c = (i = r?.[l(488)]) == null ? void 0 : i[l(480)]) == null || c.call(i, f);
|
|
262
302
|
}
|
|
263
303
|
};
|
|
264
304
|
}, Ee = (r, e) => async (t) => {
|
|
265
|
-
var
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
305
|
+
var n, s, o, a, i;
|
|
306
|
+
const c = x, l = x, u = { TJhyV: function(d, h, f, _) {
|
|
307
|
+
return d(h, f, _);
|
|
308
|
+
}, MMNTY: c(465) };
|
|
269
309
|
try {
|
|
270
|
-
return await
|
|
271
|
-
} catch (
|
|
272
|
-
const { code:
|
|
310
|
+
return await u.TJhyV(Ue, r, e, t);
|
|
311
|
+
} catch (d) {
|
|
312
|
+
const { code: h, message: f, data: _ } = d;
|
|
273
313
|
try {
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
276
|
-
|
|
314
|
+
if (h) {
|
|
315
|
+
const p = {};
|
|
316
|
+
p.code = h, p[c(422)] = f, p[l(419)] = _;
|
|
277
317
|
const v = {};
|
|
278
|
-
v[c(
|
|
279
|
-
} else (o = (
|
|
280
|
-
} catch (
|
|
281
|
-
(i = (a = r?.[
|
|
318
|
+
v[c(448)] = p, v[c(424)] = u.MMNTY, v.id = t.id, await ((n = r?.transport) == null ? void 0 : n[l(460)](v));
|
|
319
|
+
} else (o = (s = r?.transport) == null ? void 0 : s[c(480)]) == null || o.call(s, d);
|
|
320
|
+
} catch (p) {
|
|
321
|
+
(i = (a = r?.[c(488)]) == null ? void 0 : a.onerror) == null || i.call(a, p);
|
|
282
322
|
}
|
|
283
323
|
}
|
|
284
324
|
}, Oe = (r, e) => async (t) => {
|
|
285
|
-
var
|
|
286
|
-
const a =
|
|
287
|
-
|
|
325
|
+
var n, s, o;
|
|
326
|
+
const a = x, i = x, c = {};
|
|
327
|
+
c.xmcLM = function(h, f) {
|
|
288
328
|
return h !== f;
|
|
289
|
-
},
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
329
|
+
}, c.xSWLt = "notifications/initialized", c[a(420)] = i(453);
|
|
330
|
+
const l = c, { method: u, params: d } = t;
|
|
331
|
+
if (l.xmcLM(u, l.xSWLt) && (l.xmcLM(u, l[i(420)]) || d?.[i(490)])) try {
|
|
292
332
|
const h = { ...t };
|
|
293
|
-
h
|
|
333
|
+
h.jsonrpc = a(465), await ((n = e?.[a(488)]) == null ? void 0 : n.send(h));
|
|
294
334
|
} catch (h) {
|
|
295
|
-
(o = (
|
|
335
|
+
(o = (s = r?.transport) == null ? void 0 : s.onerror) == null || o.call(s, h);
|
|
296
336
|
}
|
|
297
337
|
};
|
|
298
|
-
function
|
|
299
|
-
const
|
|
300
|
-
return
|
|
301
|
-
return
|
|
302
|
-
},
|
|
338
|
+
function W() {
|
|
339
|
+
const r = ["JMaxV", "cNneM", "completion/complete", "addResponseListener", "notifications/initialized", "call", "570686biwZQB", "kkNqg", "level", "addNotificationListener", "notification", "params", "addListener", "error", "_onresponse", "164054EGcqjc", "vYlhn", "1PDRdga", "notifications/cancelled", "_requestHandlers", "readResource", "FjTAY", "1782ueLDLp", "4496TJFZWc", "1767765yPcVQJ", "send", "HefvS", "elicitation/create", "_onrequest", "logging/setLevel", "2.0", "SoCaE", "HucXo", "function", "request", "initialize", "push", "dEmVs", "addRequestListener", "NYVNC", "fgMSD", "CSjwA", "prompts/list", "ping", "35pZrnNj", "onerror", "method", "238086YifXhM", "get", "sthgI", "code", "resources/subscribe", "sttJM", "transport", "jsmFN", "forward", "listPrompts", "resources/unsubscribe", "resources/list", "srIIC", "originalOnResponse", "getPrompt", "indexOf", "3653560KcjkMk", "yfZbw", "4SAWlvk", "data", "rCDHw", "_onnotification", "message", "UlqiY", "jsonrpc", "yCyFn", "clearNotificationListener", "VWsxO", "name", "UynHf", "length", "QWYMz", "fallbackRequestHandler", "492jTClKn", "1028589HsbHVQ"];
|
|
340
|
+
return W = function() {
|
|
341
|
+
return r;
|
|
342
|
+
}, W();
|
|
303
343
|
}
|
|
304
|
-
const
|
|
305
|
-
var
|
|
306
|
-
const
|
|
307
|
-
d
|
|
344
|
+
const Ae = (r, e) => async (t) => {
|
|
345
|
+
var n, s, o, a, i, c;
|
|
346
|
+
const l = x, u = x, d = {};
|
|
347
|
+
d.kSvAZ = l(465);
|
|
308
348
|
const h = d;
|
|
309
349
|
try {
|
|
310
|
-
await ((
|
|
350
|
+
await ((n = e?.[u(488)]) == null ? void 0 : n[u(460)](t));
|
|
311
351
|
} catch (f) {
|
|
312
|
-
const { code:
|
|
352
|
+
const { code: _, message: p, data: v } = f;
|
|
313
353
|
try {
|
|
314
|
-
if (
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
} else (a = (o = r?.transport) == null ? void 0 : o[
|
|
320
|
-
} catch (
|
|
321
|
-
(
|
|
354
|
+
if (_) {
|
|
355
|
+
const m = {};
|
|
356
|
+
m.code = _, m.message = p, m.data = v;
|
|
357
|
+
const b = {};
|
|
358
|
+
b.error = m, b[u(424)] = h.kSvAZ, b.id = t.id, await ((s = r?.transport) == null ? void 0 : s.send(b));
|
|
359
|
+
} else (a = (o = r?.transport) == null ? void 0 : o[l(480)]) == null || a.call(o, f);
|
|
360
|
+
} catch (m) {
|
|
361
|
+
(c = (i = r?.[l(488)]) == null ? void 0 : i[u(480)]) == null || c.call(i, m);
|
|
322
362
|
}
|
|
323
363
|
}
|
|
324
|
-
},
|
|
325
|
-
const r =
|
|
326
|
-
return c !==
|
|
327
|
-
},
|
|
328
|
-
return c(
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
const f = [];
|
|
335
|
-
for (const x of s)
|
|
364
|
+
}, G = () => {
|
|
365
|
+
const r = x, e = { rgPZO: function(c, l) {
|
|
366
|
+
return c !== l;
|
|
367
|
+
}, VWsxO: function(c, l) {
|
|
368
|
+
return c(l);
|
|
369
|
+
}, FjTAY: "function" }, t = [], n = (c, l) => {
|
|
370
|
+
const u = x;
|
|
371
|
+
if (l) {
|
|
372
|
+
const d = [];
|
|
373
|
+
for (const h of t)
|
|
336
374
|
try {
|
|
337
|
-
|
|
375
|
+
d.push(h(c, l));
|
|
338
376
|
} catch {
|
|
339
377
|
}
|
|
340
|
-
for (const
|
|
341
|
-
if (
|
|
342
|
-
} else for (const
|
|
378
|
+
for (const h of d)
|
|
379
|
+
if (e.rgPZO(h, null)) return h;
|
|
380
|
+
} else for (const d of t)
|
|
343
381
|
try {
|
|
344
|
-
|
|
382
|
+
e[u(427)](d, c);
|
|
345
383
|
} catch {
|
|
346
384
|
}
|
|
385
|
+
}, s = (c) => {
|
|
386
|
+
const l = x, u = x;
|
|
387
|
+
typeof c === e[l(456)] && !t.includes(c) && t[u(471)](c);
|
|
347
388
|
}, o = (c) => {
|
|
348
|
-
const u =
|
|
349
|
-
|
|
350
|
-
}, a = (
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
}, i =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
return n();
|
|
361
|
-
}, Mfvzm: function(n) {
|
|
362
|
-
return n();
|
|
389
|
+
const l = x, u = t[l(415)](c);
|
|
390
|
+
u !== -1 && t.splice(u, -17591 + 6 * 2932);
|
|
391
|
+
}, a = () => {
|
|
392
|
+
const c = x;
|
|
393
|
+
t[c(430)] = -505 * 7 + 1322 + 2213;
|
|
394
|
+
}, i = {};
|
|
395
|
+
return i.handleListener = n, i[r(447)] = s, i.removeListener = o, i.clearListener = a, i;
|
|
396
|
+
}, Ve = (r) => {
|
|
397
|
+
const e = x, t = x, n = { UlqiY: function(s) {
|
|
398
|
+
return s();
|
|
399
|
+
}, jsmFN: function(s) {
|
|
400
|
+
return s();
|
|
363
401
|
} };
|
|
364
402
|
{
|
|
365
|
-
const { handleListener:
|
|
366
|
-
r._onresponse =
|
|
403
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n[e(423)](G);
|
|
404
|
+
r._onresponse = s, r[t(438)] = o, r.removeResponseListener = a, r.clearResponseListener = i;
|
|
367
405
|
}
|
|
368
406
|
{
|
|
369
|
-
const { handleListener:
|
|
370
|
-
r[
|
|
407
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n[e(489)](G);
|
|
408
|
+
r[e(432)] = s, r[t(473)] = o, r.removeRequestListener = a, r.clearRequestListener = i;
|
|
371
409
|
}
|
|
372
410
|
{
|
|
373
|
-
const { handleListener:
|
|
374
|
-
r
|
|
411
|
+
const { handleListener: s, addListener: o, removeListener: a, clearListener: i } = n.jsmFN(G);
|
|
412
|
+
r.fallbackNotificationHandler = s, r[e(444)] = o, r.removeNotificationListener = a, r[t(426)] = i;
|
|
375
413
|
}
|
|
376
|
-
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
return
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}, cjSoZ: "function", iQqcJ: s(378), Zybtx: function(i, l) {
|
|
387
|
-
return i(l);
|
|
388
|
-
}, ElOQH: function(i) {
|
|
414
|
+
}, je = (r, { beforeInit: e, afterInit: t } = {}) => {
|
|
415
|
+
const n = x, s = x, o = { HucXo: function(i, c) {
|
|
416
|
+
return i === c;
|
|
417
|
+
}, HicFO: n(468), JMaxV: function(i) {
|
|
418
|
+
return i();
|
|
419
|
+
}, DclXr: function(i, c) {
|
|
420
|
+
return i(c);
|
|
421
|
+
}, UynHf: function(i, c) {
|
|
422
|
+
return i === c;
|
|
423
|
+
}, yCyFn: function(i) {
|
|
389
424
|
return i();
|
|
390
425
|
} }, a = new Map(r._notificationHandlers);
|
|
391
|
-
r[
|
|
392
|
-
const
|
|
393
|
-
r.originalOnResponse[
|
|
394
|
-
}), o
|
|
395
|
-
const { method: l } = i,
|
|
396
|
-
o
|
|
426
|
+
r[n(454)].clear(), r._notificationHandlers.clear(), o.HucXo(typeof e, o.HicFO) && o[n(435)](e), o[n(467)](r[n(449)][s(428)], n(449)) && (r[s(413)] = r[s(449)]), o.DclXr(Ve, r), r[s(438)]((i) => {
|
|
427
|
+
const c = n;
|
|
428
|
+
r.originalOnResponse[c(440)](r, i);
|
|
429
|
+
}), o[n(429)](typeof t, o.HicFO) && o[s(425)](t), r[s(444)]((i) => {
|
|
430
|
+
const c = s, { method: l } = i, u = a[c(483)](l);
|
|
431
|
+
o[c(467)](typeof u, "function") && u(i);
|
|
397
432
|
});
|
|
398
|
-
},
|
|
433
|
+
}, De = k;
|
|
399
434
|
(function(r, e) {
|
|
400
|
-
const t =
|
|
435
|
+
const t = k, n = k, s = r();
|
|
401
436
|
for (; ; )
|
|
402
437
|
try {
|
|
403
|
-
if (
|
|
404
|
-
|
|
438
|
+
if (parseInt(t(215)) / 1 * (-parseInt(n(217)) / 2) + parseInt(t(216)) / 3 + parseInt(t(210)) / 4 * (parseInt(n(223)) / 5) + -parseInt(n(214)) / 6 * (parseInt(n(220)) / 7) + parseInt(n(212)) / 8 * (parseInt(t(228)) / 9) + parseInt(t(219)) / 10 + parseInt(t(222)) / 11 * (parseInt(t(224)) / 12) === e) break;
|
|
439
|
+
s.push(s.shift());
|
|
405
440
|
} catch {
|
|
406
|
-
|
|
441
|
+
s.push(s.shift());
|
|
407
442
|
}
|
|
408
|
-
})(
|
|
409
|
-
|
|
410
|
-
const t =
|
|
411
|
-
|
|
412
|
-
return s
|
|
413
|
-
},
|
|
443
|
+
})(X, 995159 + -6 * -266138 + -1619768);
|
|
444
|
+
const Be = () => {
|
|
445
|
+
const r = k, e = k, t = {};
|
|
446
|
+
t.svuxn = function(s, o) {
|
|
447
|
+
return s & o;
|
|
448
|
+
}, t.ZUPdr = function(s, o) {
|
|
449
|
+
return s === o;
|
|
450
|
+
}, t[r(227)] = function(s, o) {
|
|
451
|
+
return s === o;
|
|
452
|
+
}, t.SpRzi = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
453
|
+
const n = t;
|
|
454
|
+
return n[e(227)](typeof crypto, "object") && crypto[r(211)] ? crypto.randomUUID() : n.SpRzi.replace(/[xy]/g, (s) => {
|
|
455
|
+
const o = r, a = n.svuxn(crypto.getRandomValues(new Uint8Array(-3798 + 8571 * -1 + 12370))[0], -8324 + 8339 * 1);
|
|
456
|
+
return (n[o(225)](s, "x") ? a : n[o(209)](a, -12998 + -1 * -13001) | 813 * 10 + -3707 + 883 * -5).toString(-1 * -1851 + 6493 + -8328);
|
|
457
|
+
});
|
|
458
|
+
}, We = (r) => {
|
|
459
|
+
const e = k, t = k, n = new Uint8Array(r);
|
|
460
|
+
return crypto[e(221)](n), Array[t(218)](n, (s) => s[t(226)](11424 + 4 * -2852).padStart(8950 + 2237 * -4, "0"))[e(213)]("");
|
|
461
|
+
}, M = {};
|
|
462
|
+
M[De(211)] = Be, M.randomBytes = We;
|
|
463
|
+
function k(r, e) {
|
|
464
|
+
const t = X();
|
|
465
|
+
return k = function(n, s) {
|
|
466
|
+
return n = n - (-7373 + 7187 * 1 + 395), t[n];
|
|
467
|
+
}, k(r, e);
|
|
414
468
|
}
|
|
415
|
-
function
|
|
416
|
-
const r = ["
|
|
417
|
-
return
|
|
469
|
+
function X() {
|
|
470
|
+
const r = ["join", "2500590yHdCUG", "3CzpgOE", "219762yRRBUK", "592022JqIdxi", "from", "6033730pSHJFF", "28gKZiuO", "getRandomValues", "147169GUBreL", "5fFOMNB", "1140KVOWlq", "ZUPdr", "toString", "DBGzc", "45351XtLuDF", "svuxn", "9892WpQPGF", "randomUUID", "2504EaskHQ"];
|
|
471
|
+
return X = function() {
|
|
418
472
|
return r;
|
|
419
|
-
},
|
|
473
|
+
}, X();
|
|
420
474
|
}
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
return n
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return n & o;
|
|
429
|
-
}, t[e(394)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
430
|
-
const s = t;
|
|
431
|
-
return s.suJHI(typeof crypto, "object") && crypto.randomUUID ? crypto[e(391)]() : s.dHTfU.replace(/[xy]/g, (n) => {
|
|
432
|
-
const o = r, a = r, i = s[o(392)](crypto[o(384)](new Uint8Array(8663 + 2 * -4331))[741 * 2 + -1385 * -2 + 4252 * -1], 15);
|
|
433
|
-
return (s.suJHI(n, "x") ? i : s[a(386)](i, -4377 + 4 * 1095) | 5079 + 461 * -11).toString(9449 + 4 * -461 + -7589);
|
|
434
|
-
});
|
|
435
|
-
}, De = (r) => {
|
|
436
|
-
const e = q, t = q, s = new Uint8Array(r);
|
|
437
|
-
return crypto.getRandomValues(s), Array[e(401)](s, (n) => n[t(403)](-3 * 1739 + -6509 + 2 * 5871)[e(387)](2, "0")).join("");
|
|
438
|
-
}, M = {};
|
|
439
|
-
M[Ve(391)] = We, M[ze(396)] = De;
|
|
440
|
-
const R = k;
|
|
475
|
+
function q(r, e) {
|
|
476
|
+
const t = Y();
|
|
477
|
+
return q = function(n, s) {
|
|
478
|
+
return n = n - (-1483 * 3 + -5564 + 20 * 513), t[n];
|
|
479
|
+
}, q(r, e);
|
|
480
|
+
}
|
|
481
|
+
const S = q, O = q;
|
|
441
482
|
(function(r, e) {
|
|
442
|
-
const t =
|
|
483
|
+
const t = q, n = q, s = r();
|
|
443
484
|
for (; ; )
|
|
444
485
|
try {
|
|
445
|
-
if (parseInt(t(
|
|
446
|
-
|
|
486
|
+
if (parseInt(t(302)) / 1 + -parseInt(n(249)) / 2 + -parseInt(t(291)) / 3 + -parseInt(t(292)) / 4 * (parseInt(t(264)) / 5) + -parseInt(n(273)) / 6 * (parseInt(t(266)) / 7) + parseInt(t(300)) / 8 * (parseInt(t(269)) / 9) + parseInt(n(255)) / 10 * (parseInt(t(284)) / 11) === e) break;
|
|
487
|
+
s.push(s.shift());
|
|
447
488
|
} catch {
|
|
448
|
-
|
|
489
|
+
s.push(s.shift());
|
|
449
490
|
}
|
|
450
|
-
})(
|
|
451
|
-
const
|
|
452
|
-
const t =
|
|
453
|
-
return l
|
|
454
|
-
},
|
|
455
|
-
return l
|
|
491
|
+
})(Y, -4 * 308317 + 753182 * 2 + 658196);
|
|
492
|
+
const Xe = (r, e) => {
|
|
493
|
+
const t = q, n = q, s = { olCWX: function(c, l, u) {
|
|
494
|
+
return c(l, u);
|
|
495
|
+
}, sfXDX: function(c, l, u) {
|
|
496
|
+
return c(l, u);
|
|
497
|
+
}, ksWFu: function(c, l, u) {
|
|
498
|
+
return c(l, u);
|
|
456
499
|
} };
|
|
457
|
-
|
|
458
|
-
const o = Ee
|
|
459
|
-
e
|
|
460
|
-
const l =
|
|
461
|
-
e
|
|
500
|
+
s[t(283)](Ne, r, e), Fe(r, e);
|
|
501
|
+
const o = s[n(283)](Ee, e, r), a = s[n(294)](Ae, e, r), i = s[t(277)](Oe, e, r);
|
|
502
|
+
e.addRequestListener(o), e.addResponseListener(a), e[n(287)](i), r.onclose = () => {
|
|
503
|
+
const c = t, l = n;
|
|
504
|
+
e[c(247)](o), e.removeResponseListener(a), e[l(252)](i);
|
|
462
505
|
};
|
|
463
|
-
},
|
|
464
|
-
const
|
|
465
|
-
return
|
|
466
|
-
},
|
|
467
|
-
return i
|
|
468
|
-
} },
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
}, ae = (r, e = M.randomUUID()) => {
|
|
479
|
-
const t = k, s = k, n = { OfssH: function(u, d, h) {
|
|
506
|
+
}, te = (r, e, t) => {
|
|
507
|
+
const n = { QhPqi: function(a, i) {
|
|
508
|
+
return a instanceof i;
|
|
509
|
+
}, AIICR: "close", Qalmc: function(a, i, c) {
|
|
510
|
+
return a(i, c);
|
|
511
|
+
} }, s = () => {
|
|
512
|
+
var a;
|
|
513
|
+
n.QhPqi(t, V) && ((a = t._eventSource) == null || a.addEventListener(n.AIICR, () => {
|
|
514
|
+
var i;
|
|
515
|
+
(i = t[q(295)]) == null || i.close();
|
|
516
|
+
})), n.Qalmc(Xe, r, e);
|
|
517
|
+
}, o = {};
|
|
518
|
+
o.afterInit = s, n.Qalmc(je, e, o);
|
|
519
|
+
}, le = (r, e = M[S(299)]()) => {
|
|
520
|
+
const t = S, n = S, s = { RVabx: function(u, d, h) {
|
|
480
521
|
return u(d, h);
|
|
481
|
-
} }, o = {};
|
|
482
|
-
o[
|
|
522
|
+
}, crCTs: "include" }, o = {};
|
|
523
|
+
o["sse-session-id"] = e;
|
|
483
524
|
const a = o, i = {};
|
|
484
|
-
i[
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
const h = t, f =
|
|
489
|
-
Object.entries(a)
|
|
490
|
-
|
|
525
|
+
i["sse-session-id"] = e;
|
|
526
|
+
const c = {};
|
|
527
|
+
c.headers = i, c.credentials = s[t(304)];
|
|
528
|
+
const l = { requestInit: c, eventSourceInit: { async fetch(u, d) {
|
|
529
|
+
const h = t, f = t, _ = new Headers(d?.[h(268)] || {});
|
|
530
|
+
Object.entries(a).forEach(([v, m]) => {
|
|
531
|
+
_.set(v, m);
|
|
491
532
|
});
|
|
492
533
|
const p = { ...d };
|
|
493
|
-
return p
|
|
534
|
+
return p.headers = _, s[f(279)](fetch, u, p);
|
|
494
535
|
}, withCredentials: !0 } };
|
|
495
|
-
return r && (
|
|
496
|
-
},
|
|
497
|
-
const t =
|
|
498
|
-
|
|
499
|
-
const o =
|
|
536
|
+
return r && (l[t(280)].headers.Authorization = "Bearer " + r, a.Authorization = n(256) + r), l;
|
|
537
|
+
}, ue = (r, e = M[S(299)]()) => {
|
|
538
|
+
const t = O, n = S, s = {};
|
|
539
|
+
s[t(271)] = "include";
|
|
540
|
+
const o = s, a = {};
|
|
500
541
|
a["stream-session-id"] = e;
|
|
501
542
|
const i = {};
|
|
502
|
-
i
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
return r && (
|
|
507
|
-
},
|
|
508
|
-
const
|
|
543
|
+
i[n(268)] = a, i.credentials = o[t(271)];
|
|
544
|
+
const c = {};
|
|
545
|
+
c.requestInit = i;
|
|
546
|
+
const l = c;
|
|
547
|
+
return r && (l[n(280)][t(268)][n(301)] = t(256) + r), l;
|
|
548
|
+
}, ne = async (r, e, t) => {
|
|
549
|
+
const n = S, s = S, o = { rRtFD: function(i) {
|
|
509
550
|
return i();
|
|
510
|
-
},
|
|
511
|
-
return i
|
|
512
|
-
} }, a = o
|
|
551
|
+
}, ToRAF: function(i, c) {
|
|
552
|
+
return i instanceof c;
|
|
553
|
+
} }, a = o[n(276)](t);
|
|
513
554
|
try {
|
|
514
|
-
return await r[s(
|
|
555
|
+
return await r[s(260)](a), a;
|
|
515
556
|
} catch (i) {
|
|
516
|
-
if (i
|
|
517
|
-
const
|
|
518
|
-
return await a[n(
|
|
557
|
+
if (o[n(275)](i, ke)) {
|
|
558
|
+
const c = await e();
|
|
559
|
+
return await a[n(257)](c), await ne(r, e, t);
|
|
519
560
|
} else throw i;
|
|
520
561
|
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
return k = function(s, n) {
|
|
525
|
-
return s = s - 498, t[s];
|
|
526
|
-
}, k(r, e);
|
|
527
|
-
}
|
|
528
|
-
const le = (r, e) => {
|
|
529
|
-
const t = R, s = R, n = {};
|
|
530
|
-
n.RsKXs = function(a, i) {
|
|
562
|
+
}, de = (r, e) => {
|
|
563
|
+
const t = O, n = O, s = {};
|
|
564
|
+
s[t(267)] = function(a, i) {
|
|
531
565
|
return a in i;
|
|
532
|
-
},
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return b(T, P);
|
|
540
|
-
}, HwvVa: "mcp-sse-proxy-client", ufTHS: function(b) {
|
|
541
|
-
return b();
|
|
542
|
-
}, WIVYl: function(b, T, P, E) {
|
|
543
|
-
return b(T, P, E);
|
|
544
|
-
}, jniGY: "sessionId" }, { client: n, url: o, token: a, sessionId: i, authProvider: l, requestInit: c, eventSourceInit: u, waitForOAuthCode: d } = r, h = {};
|
|
545
|
-
h.authProvider = l, h.requestInit = c, h.eventSourceInit = u;
|
|
546
|
-
const f = h, x = i || M.randomUUID(), p = s[e(506)](ae, a, x);
|
|
547
|
-
if (c) {
|
|
548
|
-
const b = { ...p.requestInit, ...c };
|
|
549
|
-
b.headers = { ...p[e(544)].headers, ...c.headers }, f.requestInit = b;
|
|
550
|
-
} else f[t(544)] = p.requestInit;
|
|
551
|
-
if (u) {
|
|
552
|
-
const b = { ...p[e(559)], ...u };
|
|
553
|
-
f.eventSourceInit = b;
|
|
554
|
-
} else f.eventSourceInit = p.eventSourceInit;
|
|
555
|
-
const _ = {};
|
|
556
|
-
_.listChanged = !0;
|
|
557
|
-
const v = {};
|
|
558
|
-
v.roots = _, v.sampling = {}, v[e(511)] = {};
|
|
559
|
-
const I = v, L = {};
|
|
560
|
-
L[t(536)] = s.HwvVa, L.version = e(526);
|
|
561
|
-
const w = {};
|
|
562
|
-
w.capabilities = I;
|
|
563
|
-
const S = new F(L, w), U = () => new j(new URL(o), f);
|
|
564
|
-
let C = s[t(504)](U);
|
|
565
|
-
if (l) {
|
|
566
|
-
const b = s[e(506)](le, l, d);
|
|
567
|
-
C = await s[t(513)](ee, S, b, U);
|
|
568
|
-
} else await S[e(538)](C);
|
|
569
|
-
s[t(513)]($, S, n, C), C[t(557)] = C[t(542)].searchParams[t(532)](s.jniGY);
|
|
570
|
-
const H = {};
|
|
571
|
-
return H.transport = C, H.sessionId = C[e(557)], H;
|
|
566
|
+
}, s.timcZ = "waitForOAuthCode", s[t(253)] = function(a, i) {
|
|
567
|
+
return a === i;
|
|
568
|
+
}, s.ufiEQ = t(285), s[n(250)] = t(293);
|
|
569
|
+
const o = s;
|
|
570
|
+
if (o.oGmBG(o[t(258)], r)) return r[n(278)];
|
|
571
|
+
if (o[n(253)](typeof e, o.ufiEQ)) return e;
|
|
572
|
+
throw new Error(o.daYBw);
|
|
572
573
|
};
|
|
573
|
-
function
|
|
574
|
-
const r = ["
|
|
575
|
-
return
|
|
574
|
+
function Y() {
|
|
575
|
+
const r = ["oGmBG", "headers", "1233BqDPfE", "eventSourceInit", "jmVYh", "wfHUn", "1336686qzpbXm", "_endpoint", "ToRAF", "rRtFD", "ksWFu", "waitForOAuthCode", "RVabx", "requestInit", "mcp-sse-proxy-client", "CfBXU", "olCWX", "341WrxLOu", "function", "sessionId", "addNotificationListener", "version", "GKDjq", "roots", "5390433vAXkON", "4NpGpPF", "waitForOAuthCode need to be provided when authProvider is provided", "sfXDX", "_eventSource", "PdsSn", "get", "sampling", "randomUUID", "4064jocfPO", "Authorization", "452565rqIeHi", "elicitation", "crCTs", "authProvider", "removeRequestListener", "1.0.0", "104070FoHgyi", "daYBw", "capabilities", "removeNotificationListener", "lauIp", "listChanged", "1255910ovFXHu", "Bearer ", "finishAuth", "timcZ", "eZwNI", "connect", "JzpWy", "tUMle", "kdowC", "379385gxVFVP", "&token=", "49TIzdXg"];
|
|
576
|
+
return Y = function() {
|
|
576
577
|
return r;
|
|
577
|
-
},
|
|
578
|
+
}, Y();
|
|
578
579
|
}
|
|
579
|
-
const
|
|
580
|
-
const e =
|
|
581
|
-
return
|
|
582
|
-
},
|
|
583
|
-
return
|
|
584
|
-
},
|
|
585
|
-
return
|
|
586
|
-
},
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
580
|
+
const Ye = async (r) => {
|
|
581
|
+
const e = O, t = S, n = { GKDjq: function(g, N, F) {
|
|
582
|
+
return g(N, F);
|
|
583
|
+
}, JzpWy: e(281), mcbiU: "1.0.0", CfBXU: function(g) {
|
|
584
|
+
return g();
|
|
585
|
+
}, kdowC: function(g, N, F, K) {
|
|
586
|
+
return g(N, F, K);
|
|
587
|
+
}, KkViY: "sessionId" }, { client: s, url: o, token: a, sessionId: i, authProvider: c, requestInit: l, eventSourceInit: u, waitForOAuthCode: d } = r, h = {};
|
|
588
|
+
h[t(305)] = c, h.requestInit = l, h.eventSourceInit = u;
|
|
589
|
+
const f = h, _ = i || M[t(299)](), p = n[e(289)](le, a, _);
|
|
590
|
+
if (l) {
|
|
591
|
+
const g = { ...p.requestInit, ...l };
|
|
592
|
+
g[t(268)] = { ...p[t(280)][e(268)], ...l.headers }, f.requestInit = g;
|
|
593
|
+
} else f.requestInit = p[e(280)];
|
|
594
|
+
if (u) {
|
|
595
|
+
const g = { ...p[e(270)], ...u };
|
|
596
|
+
f.eventSourceInit = g;
|
|
597
|
+
} else f.eventSourceInit = p[e(270)];
|
|
597
598
|
const v = {};
|
|
598
|
-
v[
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
599
|
+
v[e(254)] = !0;
|
|
600
|
+
const m = {};
|
|
601
|
+
m.roots = v, m[e(298)] = {}, m[t(303)] = {};
|
|
602
|
+
const b = m, C = {};
|
|
603
|
+
C.name = n[t(261)], C[e(288)] = n.mcbiU;
|
|
604
|
+
const P = {};
|
|
605
|
+
P[e(251)] = b;
|
|
606
|
+
const w = new A(C, P), L = () => new V(new URL(o), f);
|
|
607
|
+
let y = n[e(282)](L);
|
|
608
|
+
if (c) {
|
|
609
|
+
const g = de(c, d);
|
|
610
|
+
y = await n[e(263)](ne, w, g, L);
|
|
611
|
+
} else await w.connect(y);
|
|
612
|
+
te(w, s, y), y.sessionId = y[t(274)].searchParams[e(297)](n.KkViY);
|
|
613
|
+
const U = {};
|
|
614
|
+
return U.transport = y, U.sessionId = y[t(286)], U;
|
|
615
|
+
}, ze = async (r) => {
|
|
616
|
+
const e = O, t = S, n = { wfHUn: function(g, N, F) {
|
|
617
|
+
return g(N, F);
|
|
618
|
+
}, tUMle: "mcp-stream-proxy-client", omKPe: e(248), rSiEq: function(g) {
|
|
619
|
+
return g();
|
|
620
|
+
}, PdsSn: function(g, N, F, K) {
|
|
621
|
+
return g(N, F, K);
|
|
622
|
+
} }, { client: s, url: o, token: a, sessionId: i, authProvider: c, requestInit: l, reconnectionOptions: u, waitForOAuthCode: d } = r, h = {};
|
|
623
|
+
h.authProvider = c, h.requestInit = l, h.reconnectionOptions = u;
|
|
624
|
+
const f = h, _ = i || M.randomUUID(), p = n[t(272)](ue, a, _);
|
|
605
625
|
if (l) {
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
} else
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
626
|
+
const g = { ...p[e(280)], ...l };
|
|
627
|
+
g.headers = { ...p.requestInit[e(268)], ...l.headers }, f.requestInit = g;
|
|
628
|
+
} else f[t(280)] = p[t(280)];
|
|
629
|
+
const v = {};
|
|
630
|
+
v[t(254)] = !0;
|
|
631
|
+
const m = {};
|
|
632
|
+
m.roots = v, m[e(298)] = {}, m[e(303)] = {};
|
|
633
|
+
const b = m, C = {};
|
|
634
|
+
C.name = n[e(262)], C.version = n.omKPe;
|
|
635
|
+
const P = {};
|
|
636
|
+
P.capabilities = b;
|
|
637
|
+
const w = new A(C, P), L = () => new Q(new URL(o), f);
|
|
638
|
+
let y = n.rSiEq(L);
|
|
639
|
+
if (c) {
|
|
640
|
+
const g = n[e(272)](de, c, d);
|
|
641
|
+
y = await n[e(296)](ne, w, g, L);
|
|
642
|
+
} else await w[e(260)](y);
|
|
643
|
+
n.PdsSn(te, w, s, y);
|
|
644
|
+
const U = {};
|
|
645
|
+
return U.transport = y, U[t(286)] = y[t(286)], U;
|
|
646
|
+
}, Ze = async (r) => {
|
|
647
|
+
const e = S, t = S, n = { eZwNI: function(m, b, C, P) {
|
|
648
|
+
return m(b, C, P);
|
|
649
|
+
} }, { client: s, url: o, token: a, sessionId: i } = r, c = {};
|
|
650
|
+
c[e(254)] = !0;
|
|
651
|
+
const l = {};
|
|
652
|
+
l[t(290)] = c, l.sampling = {}, l.elicitation = {};
|
|
653
|
+
const u = l, d = {};
|
|
654
|
+
d.name = "mcp-socket-proxy-client", d.version = t(248);
|
|
621
655
|
const h = {};
|
|
622
|
-
h
|
|
623
|
-
const f = new
|
|
624
|
-
await f.connect(p),
|
|
625
|
-
const
|
|
626
|
-
return
|
|
627
|
-
},
|
|
628
|
-
function y(r, e) {
|
|
629
|
-
const t = Z();
|
|
630
|
-
return y = function(s, n) {
|
|
631
|
-
return s = s - (-16761 + 51 * 337), t[s];
|
|
632
|
-
}, y(r, e);
|
|
633
|
-
}
|
|
656
|
+
h[t(251)] = u;
|
|
657
|
+
const f = new A(d, h), _ = i || M[t(299)](), p = new ie(new URL(o + "?sessionId=" + _ + t(265) + a));
|
|
658
|
+
await f.connect(p), n[e(259)](te, f, s, p);
|
|
659
|
+
const v = {};
|
|
660
|
+
return v.transport = p, v[t(286)] = _, v;
|
|
661
|
+
}, T = R, E = R;
|
|
634
662
|
(function(r, e) {
|
|
635
|
-
const t =
|
|
663
|
+
const t = R, n = R, s = r();
|
|
636
664
|
for (; ; )
|
|
637
665
|
try {
|
|
638
|
-
if (
|
|
639
|
-
|
|
666
|
+
if (parseInt(t(216)) / 1 + -parseInt(n(219)) / 2 + -parseInt(t(203)) / 3 * (-parseInt(n(204)) / 4) + -parseInt(n(199)) / 5 * (parseInt(t(193)) / 6) + -parseInt(t(211)) / 7 * (-parseInt(t(192)) / 8) + -parseInt(n(221)) / 9 + parseInt(n(201)) / 10 * (parseInt(t(220)) / 11) === e) break;
|
|
667
|
+
s.push(s.shift());
|
|
640
668
|
} catch {
|
|
641
|
-
|
|
669
|
+
s.push(s.shift());
|
|
642
670
|
}
|
|
643
|
-
})(
|
|
644
|
-
function
|
|
645
|
-
const
|
|
646
|
-
return
|
|
647
|
-
return
|
|
648
|
-
},
|
|
671
|
+
})(z, 1297719 + -42747 * -22 + -1289197);
|
|
672
|
+
function R(r, e) {
|
|
673
|
+
const t = z();
|
|
674
|
+
return R = function(n, s) {
|
|
675
|
+
return n = n - (-4158 * 1 + -2 * 581 + -1 * -5510), t[n];
|
|
676
|
+
}, R(r, e);
|
|
649
677
|
}
|
|
650
|
-
const Je = () => M.randomBytes(
|
|
651
|
-
class
|
|
678
|
+
const Je = () => M.randomBytes(-8746 + -382 * -23);
|
|
679
|
+
class ot {
|
|
652
680
|
constructor(e) {
|
|
653
|
-
const t =
|
|
681
|
+
const t = R, n = R, s = { HbwOh: function(u) {
|
|
682
|
+
return u();
|
|
683
|
+
} };
|
|
654
684
|
this._callBackPromise = {};
|
|
655
|
-
const { clientMetadata:
|
|
656
|
-
this
|
|
685
|
+
const { clientMetadata: o, state: a, redirectCallback: i, getAuthCodeByState: c, waitForOAuthCode: l } = e;
|
|
686
|
+
this._clientMetadata = o, this[t(206)] = o.redirect_uris[-10 * 629 + 1 * 7646 + -1356], this[n(197)] = a || s.HbwOh(Je), this._redirectCallback = i || this[n(202)], this[n(195)] = c || this[t(191)], this.waitForOAuthCode = l || this.waitForOAuthCodeFunction();
|
|
657
687
|
}
|
|
658
688
|
async redirectCallbackFunction(e) {
|
|
659
|
-
var t,
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
!d.ok && ((
|
|
664
|
-
const h = await this
|
|
689
|
+
var t, n, s, o, a, i;
|
|
690
|
+
const c = R, l = R, u = {};
|
|
691
|
+
u[c(198)] = "GET";
|
|
692
|
+
const d = await fetch(e, u);
|
|
693
|
+
!d.ok && ((n = (t = this[l(207)])[l(196)]) == null || n.call(t, c(208) + d[l(205)]));
|
|
694
|
+
const h = await this[l(195)](this._redirectUrl, this[c(197)]);
|
|
665
695
|
if (!h.ok) {
|
|
666
|
-
(o = (
|
|
696
|
+
(o = (s = this[c(207)]).reject) == null || o.call(s, "Failed to fetch auth code: " + h[l(205)]);
|
|
667
697
|
return;
|
|
668
698
|
}
|
|
669
|
-
const f = await h
|
|
670
|
-
(i = (a = this
|
|
699
|
+
const f = await h.json();
|
|
700
|
+
(i = (a = this._callBackPromise).resolve) == null || i.call(a, f.code);
|
|
671
701
|
}
|
|
672
|
-
async
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
return
|
|
702
|
+
async [T(191)](e, t) {
|
|
703
|
+
const n = T, s = {};
|
|
704
|
+
s.xAOmI = "POST";
|
|
705
|
+
const o = s, a = {};
|
|
706
|
+
a["Content-Type"] = n(217);
|
|
707
|
+
const i = {};
|
|
708
|
+
return i.state = t, fetch(e, { method: o.xAOmI, headers: a, body: new URLSearchParams(i) });
|
|
679
709
|
}
|
|
680
710
|
waitForOAuthCodeFunction() {
|
|
681
|
-
const e =
|
|
682
|
-
return () => new Promise((
|
|
683
|
-
const
|
|
684
|
-
|
|
711
|
+
const e = this._callBackPromise;
|
|
712
|
+
return () => new Promise((t, n) => {
|
|
713
|
+
const s = R;
|
|
714
|
+
e.resolve = t, e[s(196)] = n;
|
|
685
715
|
});
|
|
686
716
|
}
|
|
687
717
|
get redirectUrl() {
|
|
688
|
-
return this[
|
|
718
|
+
return this[T(206)];
|
|
689
719
|
}
|
|
690
|
-
get
|
|
720
|
+
get [E(190)]() {
|
|
691
721
|
return this._clientMetadata;
|
|
692
722
|
}
|
|
693
|
-
|
|
694
|
-
return this
|
|
723
|
+
[T(213)]() {
|
|
724
|
+
return this[T(197)];
|
|
695
725
|
}
|
|
696
|
-
[
|
|
697
|
-
return this[
|
|
726
|
+
[E(218)]() {
|
|
727
|
+
return this[E(200)];
|
|
698
728
|
}
|
|
699
|
-
[
|
|
700
|
-
|
|
701
|
-
this[t(444)] = e;
|
|
729
|
+
[T(194)](e) {
|
|
730
|
+
this._clientInformation = e;
|
|
702
731
|
}
|
|
703
|
-
|
|
704
|
-
return this[
|
|
732
|
+
tokens() {
|
|
733
|
+
return this[E(210)];
|
|
705
734
|
}
|
|
706
735
|
saveTokens(e) {
|
|
707
|
-
|
|
736
|
+
const t = E;
|
|
737
|
+
this[t(210)] = e;
|
|
708
738
|
}
|
|
709
|
-
|
|
710
|
-
this
|
|
739
|
+
redirectToAuthorization(e) {
|
|
740
|
+
this._redirectCallback(e);
|
|
711
741
|
}
|
|
712
742
|
saveCodeVerifier(e) {
|
|
713
743
|
this._codeVerifier = e;
|
|
714
744
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
745
|
+
[T(212)]() {
|
|
746
|
+
const e = T, t = {};
|
|
747
|
+
t[e(215)] = e(214);
|
|
748
|
+
const n = t;
|
|
749
|
+
if (!this[e(209)]) throw new Error(n.mMdVl);
|
|
750
|
+
return this[e(209)];
|
|
718
751
|
}
|
|
719
752
|
}
|
|
753
|
+
function z() {
|
|
754
|
+
const r = ["370aKMzOb", "redirectCallbackFunction", "6AWGiLu", "697420WEpDtk", "statusText", "_redirectUrl", "_callBackPromise", "Failed to redirect: ", "_codeVerifier", "_tokens", "21ofrYNd", "codeVerifier", "state", "No code verifier saved", "mMdVl", "1546908KURscU", "application/x-www-form-urlencoded", "clientInformation", "2551694UzDoIS", "571637jVsNJQ", "4355271orhxAD", "clientMetadata", "getAuthCodeByStateFunction", "1400360ybYjeP", "30zRTJNb", "saveClientInformation", "_getAuthCodeByState", "reject", "_state", "method", "1634810cQPomO", "_clientInformation"];
|
|
755
|
+
return z = function() {
|
|
756
|
+
return r;
|
|
757
|
+
}, z();
|
|
758
|
+
}
|
|
720
759
|
(function(r, e) {
|
|
721
|
-
for (var t = J,
|
|
760
|
+
for (var t = J, n = J, s = r(); ; )
|
|
722
761
|
try {
|
|
723
|
-
var o = parseInt(t(
|
|
762
|
+
var o = parseInt(t(291)) / 1 + -parseInt(t(295)) / 2 * (parseInt(t(288)) / 3) + parseInt(t(290)) / 4 * (parseInt(t(296)) / 5) + -parseInt(n(289)) / 6 + parseInt(t(293)) / 7 * (-parseInt(n(294)) / 8) + parseInt(n(287)) / 9 + parseInt(n(292)) / 10;
|
|
724
763
|
if (o === e) break;
|
|
725
|
-
|
|
764
|
+
s.push(s.shift());
|
|
726
765
|
} catch {
|
|
727
|
-
|
|
766
|
+
s.push(s.shift());
|
|
728
767
|
}
|
|
729
|
-
})(
|
|
730
|
-
function
|
|
731
|
-
var r = ["
|
|
732
|
-
return
|
|
768
|
+
})(Z, 262 * -2438 + 1346066 * -1 + 2 * 1373311);
|
|
769
|
+
function Z() {
|
|
770
|
+
var r = ["279100FsqxFu", "7326315yxcNFg", "50823VTWXXj", "6441948uoPUwt", "92BSiBRu", "1361711dyawqa", "5202960gnlAWp", "7tNVFlv", "11056792usEcvw", "90CRWXmt"];
|
|
771
|
+
return Z = function() {
|
|
733
772
|
return r;
|
|
734
|
-
},
|
|
773
|
+
}, Z();
|
|
735
774
|
}
|
|
736
775
|
function J(r, e) {
|
|
737
|
-
var t =
|
|
738
|
-
return J = function(
|
|
739
|
-
|
|
740
|
-
var o = t[
|
|
776
|
+
var t = Z();
|
|
777
|
+
return J = function(n, s) {
|
|
778
|
+
n = n - 287;
|
|
779
|
+
var o = t[n];
|
|
741
780
|
return o;
|
|
742
781
|
}, J(r, e);
|
|
743
782
|
}
|
|
744
|
-
class
|
|
783
|
+
class it {
|
|
745
784
|
constructor(e, t) {
|
|
746
|
-
const
|
|
785
|
+
const n = {
|
|
747
786
|
name: "web-mcp-server",
|
|
748
787
|
version: "1.0.0"
|
|
749
|
-
},
|
|
788
|
+
}, s = {
|
|
750
789
|
prompts: { listChanged: !0 },
|
|
751
790
|
resources: { subscribe: !0, listChanged: !0 },
|
|
752
791
|
tools: { listChanged: !0 },
|
|
753
792
|
completions: {},
|
|
754
793
|
logging: {}
|
|
755
794
|
};
|
|
756
|
-
this.server = new
|
|
795
|
+
this.server = new ae(e || n, t || { capabilities: s }), this.server.server.oninitialized = () => {
|
|
757
796
|
this.oninitialized?.();
|
|
758
797
|
}, this.server.server.onclose = () => {
|
|
759
798
|
this.onclose?.();
|
|
760
799
|
}, this.server.server.onerror = (o) => {
|
|
761
800
|
this.onerror?.(o);
|
|
762
|
-
}, this.server.server.setRequestHandler(
|
|
801
|
+
}, this.server.server.setRequestHandler(se, async () => ({}));
|
|
763
802
|
}
|
|
764
803
|
/**
|
|
765
804
|
* Connects the server to a transport via the specified option.
|
|
766
805
|
*/
|
|
767
806
|
async connect(e) {
|
|
768
|
-
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
|
|
807
|
+
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 ee(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
|
|
769
808
|
}
|
|
770
809
|
/**
|
|
771
810
|
* Closes the connection.
|
|
@@ -776,17 +815,17 @@ class ot {
|
|
|
776
815
|
/**
|
|
777
816
|
* Registers a tool with a config object and callback.
|
|
778
817
|
*/
|
|
779
|
-
registerTool(e, t,
|
|
780
|
-
return this.server.registerTool(e, t,
|
|
818
|
+
registerTool(e, t, n) {
|
|
819
|
+
return this.server.registerTool(e, t, n);
|
|
781
820
|
}
|
|
782
821
|
/**
|
|
783
822
|
* Registers a prompt with a config object and callback.
|
|
784
823
|
*/
|
|
785
|
-
registerPrompt(e, t,
|
|
786
|
-
return this.server.registerPrompt(e, t,
|
|
824
|
+
registerPrompt(e, t, n) {
|
|
825
|
+
return this.server.registerPrompt(e, t, n);
|
|
787
826
|
}
|
|
788
|
-
registerResource(e, t,
|
|
789
|
-
return typeof t == "string" ? this.server.registerResource(e, t,
|
|
827
|
+
registerResource(e, t, n, s) {
|
|
828
|
+
return typeof t == "string" ? this.server.registerResource(e, t, n, s) : this.server.registerResource(e, t, n, s);
|
|
790
829
|
}
|
|
791
830
|
/**
|
|
792
831
|
* Checks if the server is connected to a transport.
|
|
@@ -866,8 +905,8 @@ class ot {
|
|
|
866
905
|
*
|
|
867
906
|
* Do not use this method to emit notifications! Use notification() instead.
|
|
868
907
|
*/
|
|
869
|
-
request(e, t,
|
|
870
|
-
return this.server.server.request(e, t,
|
|
908
|
+
request(e, t, n) {
|
|
909
|
+
return this.server.server.request(e, t, n);
|
|
871
910
|
}
|
|
872
911
|
/**
|
|
873
912
|
* Emits a notification, which is a one-way message that does not expect a response.
|
|
@@ -907,31 +946,31 @@ class ot {
|
|
|
907
946
|
* Registers a handler for the subscribe request.
|
|
908
947
|
*/
|
|
909
948
|
onSubscribe(e) {
|
|
910
|
-
this.server.server.setRequestHandler(
|
|
949
|
+
this.server.server.setRequestHandler(_e, e);
|
|
911
950
|
}
|
|
912
951
|
/**
|
|
913
952
|
* Registers a handler for the unsubscribe request.
|
|
914
953
|
*/
|
|
915
954
|
onUnsubscribe(e) {
|
|
916
|
-
this.server.server.setRequestHandler(
|
|
955
|
+
this.server.server.setRequestHandler(ve, e);
|
|
917
956
|
}
|
|
918
957
|
/**
|
|
919
958
|
* Registers a handler for the set log level request.
|
|
920
959
|
*/
|
|
921
960
|
onSetLogLevel(e) {
|
|
922
|
-
this.server.server.setRequestHandler(
|
|
961
|
+
this.server.server.setRequestHandler(se, e);
|
|
923
962
|
}
|
|
924
963
|
/**
|
|
925
964
|
* Registers a handler for the list tools request.
|
|
926
965
|
*/
|
|
927
966
|
onListResources(e) {
|
|
928
|
-
this.server.server.setRequestHandler(
|
|
967
|
+
this.server.server.setRequestHandler(me, e);
|
|
929
968
|
}
|
|
930
969
|
/**
|
|
931
970
|
* Registers a handler for the roots list changed notification.
|
|
932
971
|
*/
|
|
933
972
|
onRootsListChanged(e) {
|
|
934
|
-
this.server.server.setNotificationHandler(
|
|
973
|
+
this.server.server.setNotificationHandler(ge, e);
|
|
935
974
|
}
|
|
936
975
|
/**
|
|
937
976
|
* Close the transport for window.addEventListener('pagehide')
|
|
@@ -940,18 +979,18 @@ class ot {
|
|
|
940
979
|
e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
|
|
941
980
|
}
|
|
942
981
|
}
|
|
943
|
-
const
|
|
944
|
-
class
|
|
982
|
+
const at = (r, e) => new ee(r, e), ct = () => He(), lt = (r) => r instanceof ee, ut = (r) => r instanceof ae;
|
|
983
|
+
class dt {
|
|
945
984
|
constructor(e, t) {
|
|
946
|
-
const
|
|
985
|
+
const n = {
|
|
947
986
|
name: "web-mcp-client",
|
|
948
987
|
version: "1.0.0"
|
|
949
|
-
},
|
|
988
|
+
}, s = {
|
|
950
989
|
roots: { listChanged: !0 },
|
|
951
990
|
sampling: {},
|
|
952
991
|
elicitation: {}
|
|
953
992
|
};
|
|
954
|
-
this.client = new
|
|
993
|
+
this.client = new A(e || n, t || { capabilities: s }), this.client.onclose = () => {
|
|
955
994
|
this.onclose?.();
|
|
956
995
|
}, this.client.onerror = (o) => {
|
|
957
996
|
this.onerror?.(o);
|
|
@@ -963,28 +1002,28 @@ class ut {
|
|
|
963
1002
|
async connect(e) {
|
|
964
1003
|
if (typeof e.start == "function")
|
|
965
1004
|
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 };
|
|
966
|
-
const { url: t, token:
|
|
1005
|
+
const { url: t, token: n, sessionId: s, type: o, agent: a, onError: i } = e;
|
|
967
1006
|
if (a === !0) {
|
|
968
|
-
const u = { client: this.client, url: t, token:
|
|
1007
|
+
const u = { client: this.client, url: t, token: n, sessionId: s };
|
|
969
1008
|
let d;
|
|
970
1009
|
return await (async () => {
|
|
971
|
-
const { transport: f, sessionId:
|
|
1010
|
+
const { transport: f, sessionId: _ } = o === "sse" ? await Ye(u) : o === "socket" ? await Ze(u) : await ze(u);
|
|
972
1011
|
f.onerror = async (p) => {
|
|
973
1012
|
i?.(p);
|
|
974
|
-
}, d = { transport: f, sessionId:
|
|
1013
|
+
}, d = { transport: f, sessionId: _ };
|
|
975
1014
|
})(), d;
|
|
976
1015
|
}
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
if (o === "channel" && (
|
|
980
|
-
const u =
|
|
981
|
-
|
|
1016
|
+
const c = new URL(t);
|
|
1017
|
+
let l;
|
|
1018
|
+
if (o === "channel" && (l = new $(t), await this.client.connect(l)), o === "sse") {
|
|
1019
|
+
const u = le(n, s);
|
|
1020
|
+
l = new V(c, u), await this.client.connect(l);
|
|
982
1021
|
}
|
|
983
|
-
if (o === "socket" && (
|
|
984
|
-
const u =
|
|
985
|
-
|
|
1022
|
+
if (o === "socket" && (l = new ie(new URL(`${t}?sessionId=${s}&token=${n}`)), l.sessionId = s, await this.client.connect(l)), typeof l > "u") {
|
|
1023
|
+
const u = ue(n, s);
|
|
1024
|
+
l = new Q(c, u), await this.client.connect(l);
|
|
986
1025
|
}
|
|
987
|
-
return this.transport =
|
|
1026
|
+
return this.transport = l, { transport: this.transport, sessionId: this.transport.sessionId };
|
|
988
1027
|
}
|
|
989
1028
|
/**
|
|
990
1029
|
* Closes the connection.
|
|
@@ -1074,7 +1113,7 @@ class ut {
|
|
|
1074
1113
|
* Calls a tool on the server with the given parameters.
|
|
1075
1114
|
*/
|
|
1076
1115
|
async callTool(e, t) {
|
|
1077
|
-
return await this.client.callTool(e,
|
|
1116
|
+
return await this.client.callTool(e, we, t);
|
|
1078
1117
|
}
|
|
1079
1118
|
/**
|
|
1080
1119
|
* Lists all tools available on the server.
|
|
@@ -1093,8 +1132,8 @@ class ut {
|
|
|
1093
1132
|
*
|
|
1094
1133
|
* Do not use this method to emit notifications! Use notification() instead.
|
|
1095
1134
|
*/
|
|
1096
|
-
request(e, t,
|
|
1097
|
-
return this.client.request(e, t,
|
|
1135
|
+
request(e, t, n) {
|
|
1136
|
+
return this.client.request(e, t, n);
|
|
1098
1137
|
}
|
|
1099
1138
|
/**
|
|
1100
1139
|
* Emits a notification, which is a one-way message that does not expect a response.
|
|
@@ -1140,65 +1179,65 @@ class ut {
|
|
|
1140
1179
|
* Registers a handler for the create LLM message request.
|
|
1141
1180
|
*/
|
|
1142
1181
|
onCreateMessage(e) {
|
|
1143
|
-
this.client.setRequestHandler(
|
|
1182
|
+
this.client.setRequestHandler(ye, e);
|
|
1144
1183
|
}
|
|
1145
1184
|
/**
|
|
1146
1185
|
* Registers a handler for the list roots request.
|
|
1147
1186
|
*/
|
|
1148
1187
|
onListRoots(e) {
|
|
1149
|
-
this.client.setRequestHandler(
|
|
1188
|
+
this.client.setRequestHandler(Ie, e);
|
|
1150
1189
|
}
|
|
1151
1190
|
/**
|
|
1152
1191
|
* Registers a handler for the tool list changed notification.
|
|
1153
1192
|
*/
|
|
1154
1193
|
onToolListChanged(e) {
|
|
1155
|
-
this.client.setNotificationHandler(
|
|
1194
|
+
this.client.setNotificationHandler(Ce, e);
|
|
1156
1195
|
}
|
|
1157
1196
|
/**
|
|
1158
1197
|
* Registers a handler for the prompt list changed notification.
|
|
1159
1198
|
*/
|
|
1160
1199
|
onPromptListChanged(e) {
|
|
1161
|
-
this.client.setNotificationHandler(
|
|
1200
|
+
this.client.setNotificationHandler(Re, e);
|
|
1162
1201
|
}
|
|
1163
1202
|
/**
|
|
1164
1203
|
* Registers a handler for the resource list changed notification.
|
|
1165
1204
|
*/
|
|
1166
1205
|
onResourceListChanged(e) {
|
|
1167
|
-
this.client.setNotificationHandler(
|
|
1206
|
+
this.client.setNotificationHandler(Se, e);
|
|
1168
1207
|
}
|
|
1169
1208
|
/**
|
|
1170
1209
|
* Registers a handler for the resource updated notification.
|
|
1171
1210
|
*/
|
|
1172
1211
|
onResourceUpdated(e) {
|
|
1173
|
-
this.client.setNotificationHandler(
|
|
1212
|
+
this.client.setNotificationHandler(Le, e);
|
|
1174
1213
|
}
|
|
1175
1214
|
/**
|
|
1176
1215
|
* Registers a handler for the logging message notification.
|
|
1177
1216
|
*/
|
|
1178
1217
|
onLoggingMessage(e) {
|
|
1179
|
-
this.client.setNotificationHandler(
|
|
1218
|
+
this.client.setNotificationHandler(Pe, e);
|
|
1180
1219
|
}
|
|
1181
1220
|
/**
|
|
1182
1221
|
* Close the transport for window.addEventListener('pagehide')
|
|
1183
1222
|
*/
|
|
1184
1223
|
async onPagehide(e) {
|
|
1185
|
-
e.persisted || (
|
|
1224
|
+
e.persisted || (Qe(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
|
|
1186
1225
|
}
|
|
1187
1226
|
}
|
|
1188
|
-
const
|
|
1227
|
+
const ht = (r, e) => new V(r, e), ft = (r, e) => new Q(r, e), pt = (r, e) => new $(r, e), xt = (r) => r instanceof V, Qe = (r) => r instanceof Q, _t = (r) => r instanceof $, vt = (r) => r instanceof A, Ke = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
|
|
1189
1228
|
const e = Math.random() * 16 | 0;
|
|
1190
1229
|
return (r === "x" ? e : e & 3 | 8).toString(16);
|
|
1191
|
-
}),
|
|
1230
|
+
}), j = (r, e, t) => {
|
|
1192
1231
|
window.postMessage({ type: r, direction: t, data: e }, "*");
|
|
1193
|
-
},
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1232
|
+
}, re = (r, e, t) => {
|
|
1233
|
+
const n = async function(s) {
|
|
1234
|
+
s.source === window && s.data.type === r && s.data.direction === t && await e(s.data.data);
|
|
1196
1235
|
};
|
|
1197
|
-
return window.addEventListener("message",
|
|
1236
|
+
return window.addEventListener("message", n), () => window.removeEventListener("message", n);
|
|
1198
1237
|
};
|
|
1199
|
-
class
|
|
1238
|
+
class mt {
|
|
1200
1239
|
constructor(e = null) {
|
|
1201
|
-
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e ||
|
|
1240
|
+
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || Ke(), this._messageListener1 = re(
|
|
1202
1241
|
"sidepanel-ready-to-page",
|
|
1203
1242
|
() => {
|
|
1204
1243
|
this._lastRegistration && this._isStarted && this.notifyRegistration(this._lastRegistration).catch((t) => {
|
|
@@ -1206,13 +1245,13 @@ class vt {
|
|
|
1206
1245
|
});
|
|
1207
1246
|
},
|
|
1208
1247
|
"content->page"
|
|
1209
|
-
), this._messageListener2 =
|
|
1248
|
+
), this._messageListener2 = re(
|
|
1210
1249
|
"mcp-client-to-server-to-page",
|
|
1211
1250
|
(t) => {
|
|
1212
1251
|
if (t.sessionId !== this.sessionId) return;
|
|
1213
1252
|
console.log("【Page Svr Transport】 即将处理 mcpMessage", t.mcpMessage);
|
|
1214
|
-
const
|
|
1215
|
-
this.onmessage?.(
|
|
1253
|
+
const n = oe.parse(t.mcpMessage);
|
|
1254
|
+
this.onmessage?.(n), t.mcpMessage.params?.name && j(
|
|
1216
1255
|
"update-page-app-message",
|
|
1217
1256
|
{ status: "run", message: t.mcpMessage.params?.name },
|
|
1218
1257
|
"page->content"
|
|
@@ -1224,8 +1263,8 @@ class vt {
|
|
|
1224
1263
|
// 最后一次注册信息(用于 Sidepanel 刷新后重新注册)
|
|
1225
1264
|
_throwError(e, t) {
|
|
1226
1265
|
if (e()) {
|
|
1227
|
-
const
|
|
1228
|
-
throw console.log(t,
|
|
1266
|
+
const n = new Error(t);
|
|
1267
|
+
throw console.log(t, n), this.onerror && this.onerror(n), n;
|
|
1229
1268
|
}
|
|
1230
1269
|
}
|
|
1231
1270
|
/** 启动 transport,开始监听消息 */
|
|
@@ -1237,14 +1276,14 @@ class vt {
|
|
|
1237
1276
|
}
|
|
1238
1277
|
/** 发送消息到 MCP Client */
|
|
1239
1278
|
async send(e, t) {
|
|
1240
|
-
this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Page Svr Transport】 已关闭,无法发送消息"),
|
|
1279
|
+
this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Page Svr Transport】 已关闭,无法发送消息"), j(
|
|
1241
1280
|
"mcp-server-to-client-from-page",
|
|
1242
1281
|
{
|
|
1243
1282
|
sessionId: this.sessionId,
|
|
1244
1283
|
mcpMessage: e
|
|
1245
1284
|
},
|
|
1246
1285
|
"page->content"
|
|
1247
|
-
), "result" in e && e.result?.content &&
|
|
1286
|
+
), "result" in e && e.result?.content && j(
|
|
1248
1287
|
"update-page-app-message",
|
|
1249
1288
|
{ status: "ready", message: "" },
|
|
1250
1289
|
"page->content"
|
|
@@ -1255,7 +1294,7 @@ class vt {
|
|
|
1255
1294
|
async notifyRegistration(e) {
|
|
1256
1295
|
this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法注册消息"), this._lastRegistration = e;
|
|
1257
1296
|
try {
|
|
1258
|
-
|
|
1297
|
+
j(
|
|
1259
1298
|
"mcp-server-register-from-page",
|
|
1260
1299
|
{
|
|
1261
1300
|
sessionId: this.sessionId,
|
|
@@ -1282,25 +1321,25 @@ class vt {
|
|
|
1282
1321
|
}
|
|
1283
1322
|
}
|
|
1284
1323
|
export {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1324
|
+
bt as Ajv,
|
|
1325
|
+
ot as AuthClientProvider,
|
|
1326
|
+
mt as ExtensionPageServerTransport,
|
|
1327
|
+
It as ResourceTemplate,
|
|
1328
|
+
Lt as UriTemplate,
|
|
1329
|
+
dt as WebMcpClient,
|
|
1330
|
+
it as WebMcpServer,
|
|
1331
|
+
kt as completable,
|
|
1332
|
+
pt as createMessageChannelClientTransport,
|
|
1333
|
+
ct as createMessageChannelPairTransport,
|
|
1334
|
+
at as createMessageChannelServerTransport,
|
|
1335
|
+
ht as createSSEClientTransport,
|
|
1336
|
+
ft as createStreamableHTTPClientTransport,
|
|
1298
1337
|
Tt as getDisplayName,
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1338
|
+
vt as isMcpClient,
|
|
1339
|
+
ut as isMcpServer,
|
|
1340
|
+
_t as isMessageChannelClientTransport,
|
|
1341
|
+
lt as isMessageChannelServerTransport,
|
|
1342
|
+
xt as isSSEClientTransport,
|
|
1343
|
+
Qe as isStreamableHTTPClientTransport,
|
|
1344
|
+
Rt as z
|
|
1306
1345
|
};
|