@opentiny/next 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/client.js +341 -329
  2. package/package.json +1 -1
  3. package/server.js +233 -221
package/client.js CHANGED
@@ -1,482 +1,494 @@
1
- import { JSONRPCMessageSchema as O } from "@modelcontextprotocol/sdk/types.js";
2
- import { Client as j } from "@modelcontextprotocol/sdk/client/index.js";
3
- import { SSEClientTransport as U } from "@modelcontextprotocol/sdk/client/sse.js";
4
- import { StreamableHTTPClientTransport as N } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
1
+ import { JSONRPCMessageSchema as P } from "@modelcontextprotocol/sdk/types.js";
2
+ import { Client as C } from "@modelcontextprotocol/sdk/client/index.js";
3
+ import { SSEClientTransport as A } from "@modelcontextprotocol/sdk/client/sse.js";
4
+ import { StreamableHTTPClientTransport as L } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
5
5
  const f = u;
6
- (function(n, t) {
7
- const x = u, e = n();
6
+ function _() {
7
+ const n = ["4|3|2|0|1", "port1", "679224RAgtsv", "undefined", "postMessage", "uxyaO", "MessagePort error: ", "356yKKReV", "uJFvk", "_port", "AkUMV", "onclose", "data", "KORLb", "rErKj", "phDrU", "stringify", "_started", "randomUUID", "function", "onmessageerror", "9DHNIof", "1071009WHRYjd", "YQtxD", "BPROw", "5ASndSO", "split", "2236OiZOuq", "sYiAO", "onmessage", "hskou", "RSOqz", "iOEyU", "endpoint", "AwGTN", "close", "bRXzv", "_endpoint", "IDJSL", "listen", "_sessionId", "_globalObject", "onerror", "hTcZx", "port2", "_closed", "kVBRC", "11812oaqyFE", "addEventListener", "cnNyz", "return this", "SLQrX", "_listen", "5679540HLvIsa", "start", "618472IVkSDy", "2221037PeQXnH", "yslLa"];
8
+ return _ = function() {
9
+ return n;
10
+ }, _();
11
+ }
12
+ (function(n, e) {
13
+ const x = u, t = n();
8
14
  for (; ; )
9
15
  try {
10
- if (parseInt(x(381)) / 1 * (-parseInt(x(367)) / 2) + -parseInt(x(400)) / 3 * (parseInt(x(393)) / 4) + parseInt(x(376)) / 5 + -parseInt(x(377)) / 6 + parseInt(x(387)) / 7 * (parseInt(x(389)) / 8) + parseInt(x(380)) / 9 * (-parseInt(x(396)) / 10) + parseInt(x(372)) / 11 === t) break;
11
- e.push(e.shift());
16
+ if (parseInt(x(306)) / 1 * (-parseInt(x(286)) / 2) + parseInt(x(301)) / 3 + parseInt(x(268)) / 4 * (parseInt(x(304)) / 5) + parseInt(x(281)) / 6 + -parseInt(x(277)) / 7 + -parseInt(x(276)) / 8 * (parseInt(x(300)) / 9) + parseInt(x(274)) / 10 === e) break;
17
+ t.push(t.shift());
12
18
  } catch {
13
- e.push(e.shift());
19
+ t.push(t.shift());
14
20
  }
15
- })(h, -5 * 243483 + 1280137 + 811227);
16
- function u(n, t) {
17
- const x = h();
18
- return u = function(e, s) {
19
- return e = e - (8905 + -1613 * 5 + -480 * 1), x[e];
20
- }, u(n, t);
21
- }
22
- const z = () => {
23
- const n = u, t = { KOkQn: n(402), DXJIO: function(s, r) {
24
- return s !== r;
25
- }, swzGV: n(413), FMQlm: function(s, r) {
26
- return s !== r;
27
- }, XTSBQ: function(s, r) {
28
- return s !== r;
29
- } }, x = t[n(414)][n(379)]("|");
30
- let e = 0;
21
+ })(_, -75076 + -7651 * 53 + 1295 * 563);
22
+ const V = () => {
23
+ const n = u, e = { AkUMV: n(279), hTcZx: function(s, a) {
24
+ return s !== a;
25
+ }, cXUVU: function(s, a) {
26
+ return s(a);
27
+ }, cnNyz: n(271), BPROw: function(s, a) {
28
+ return s !== a;
29
+ }, KORLb: n(282) }, x = e[n(289)][n(305)]("|");
30
+ let t = -3 * -3093 + -281 * -7 + -11246;
31
31
  for (; ; ) {
32
- switch (x[e++]) {
32
+ switch (x[t++]) {
33
33
  case "0":
34
- return Function(n(394))();
35
- case "1":
36
- if (t[n(373)](typeof self, t[n(383)])) return self;
34
+ if (e[n(264)](typeof self, n(282))) return self;
37
35
  continue;
36
+ case "1":
37
+ return e.cXUVU(Function, e[n(270)])();
38
38
  case "2":
39
- if (t[n(368)](typeof window, n(413))) return window;
39
+ if (e[n(303)](typeof global, e[n(292)])) return global;
40
40
  continue;
41
41
  case "3":
42
- if (t.XTSBQ(typeof globalThis, n(413))) return globalThis;
42
+ if (e.BPROw(typeof window, n(282))) return window;
43
43
  continue;
44
44
  case "4":
45
- if (t.FMQlm(typeof global, t[n(383)])) return global;
45
+ if (e[n(264)](typeof globalThis, e[n(292)])) return globalThis;
46
46
  continue;
47
47
  }
48
48
  break;
49
49
  }
50
- }, L = (n, t, x) => {
51
- const e = u, s = { vPMSQ: function(r, a) {
52
- return r !== a;
53
- }, hFSmL: e(397), LcjQl: function(r, a) {
54
- return r === a;
55
- } };
56
- s[e(374)](typeof window, "undefined") ? n[e(397)](t, "*", x) : s[e(360)] in n && s.LcjQl(typeof n[e(397)], e(384)) && n.postMessage(t, x);
57
- }, J = (n, t) => {
58
- const x = u, e = { CMVeQ: function(s, r) {
59
- return s in r;
60
- }, AlAfb: "addEventListener", ITMfs: function(s, r) {
61
- return s === r;
62
- }, XbCwl: function(s, r) {
63
- return s !== r;
64
- } };
65
- e.CMVeQ(e[x(410)], n) && e[x(385)](typeof n[x(407)], x(384)) ? n[x(407)](x(391), t) : "onmessage" in n && e[x(399)](typeof n[x(375)], x(413)) && (n[x(375)] = t);
50
+ }, J = (n, e, x) => {
51
+ const t = u, s = { RSOqz: function(a, r) {
52
+ return a === r;
53
+ }, sYiAO: t(298) };
54
+ typeof window !== t(282) ? n[t(283)](e, "*", x) : t(283) in n && s[t(310)](typeof n[t(283)], s[t(307)]) && n[t(283)](e, x);
55
+ }, q = (n, e) => {
56
+ const x = u, t = { hskou: function(s, a) {
57
+ return s in a;
58
+ }, jKyCk: x(269), CHloe: function(s, a) {
59
+ return s === a;
60
+ }, uxyaO: "message", yslLa: x(308), SLQrX: function(s, a) {
61
+ return s !== a;
62
+ }, phDrU: x(282) };
63
+ t[x(309)](t.jKyCk, n) && t.CHloe(typeof n[x(269)], "function") ? n[x(269)](t[x(284)], e) : t.hskou(t[x(278)], n) && t[x(272)](typeof n[x(308)], t[x(294)]) && (n[x(308)] = e);
66
64
  };
67
- function h() {
68
- const n = ["wFeCb", "split", "297ZYngTH", "65293VHyWyI", "_started", "swzGV", "function", "ITMfs", "MessagePort error: ", "581RuUBJM", "onclose", "45352MkhdPv", "zjysK", "message", "_globalObject", "12rNtUCN", "return this", "close", "50230eJRSZp", "postMessage", "stringify", "XbCwl", "809106WfyjLS", "_endpoint", "3|2|4|1|0", "vzpHB", "onerror", "Failed to parse message: ", "port1", "addEventListener", "sessionId", "mkXkB", "AlAfb", "endpoint", "data", "undefined", "KOkQn", "_sessionId", "hFSmL", "port2", "start", "randomUUID", "_closed", "AUWQS", "cdjiy", "38RIHtWs", "FMQlm", "_port", "parse", "3|1|5|0|4|2", "27290384onvWZe", "DXJIO", "vPMSQ", "onmessage", "8234415iHOLlw", "9053838tFCGGq"];
69
- return h = function() {
70
- return n;
71
- }, h();
65
+ function u(n, e) {
66
+ const x = _();
67
+ return u = function(t, s) {
68
+ return t = t - (-7068 + 1639 * 5 + -3 * 289), x[t];
69
+ }, u(n, e);
72
70
  }
73
- class l {
74
- constructor(t, x) {
75
- const e = u, s = { AUWQS: e(371) }, r = s[e(365)][e(379)]("|");
76
- let a = 1365 + 8 * -52 + -949 * 1;
71
+ class I {
72
+ constructor(e, x) {
73
+ const t = u, s = "4|3|2|0|5|1"[t(305)]("|");
74
+ let a = -5991 + 8167 * -1 + 14158;
77
75
  for (; ; ) {
78
- switch (r[a++]) {
76
+ switch (s[a++]) {
79
77
  case "0":
80
- this._sessionId = x;
78
+ this[t(261)] = x;
81
79
  continue;
82
80
  case "1":
83
- this[e(364)] = !1;
81
+ this[t(266)] = !1;
84
82
  continue;
85
83
  case "2":
86
- this[e(364)] = !1;
84
+ this[t(288)] = e;
87
85
  continue;
88
86
  case "3":
89
- this._started = !1;
87
+ this[t(266)] = !1;
90
88
  continue;
91
89
  case "4":
92
- this[e(382)] = !1;
90
+ this._started = !1;
93
91
  continue;
94
92
  case "5":
95
- this._port = t;
93
+ this[t(296)] = !1;
96
94
  continue;
97
95
  }
98
96
  break;
99
97
  }
100
98
  }
101
- async [f(362)]() {
102
- const t = f;
103
- this[t(382)] || this[t(364)] || !this[t(369)] || (this[t(382)] = !0, this[t(369)].onmessage = (x) => {
104
- var s, r;
105
- const e = t;
99
+ async [f(275)]() {
100
+ const e = f;
101
+ this[e(296)] || this[e(266)] || !this._port || (this[e(296)] = !0, this[e(288)].onmessage = (x) => {
102
+ var s, a;
103
+ const t = e;
106
104
  try {
107
- const a = O[e(370)](x.data);
108
- (s = this[e(375)]) == null || s.call(this, a);
109
- } catch (a) {
110
- const c = new Error(e(405) + a);
111
- (r = this.onerror) == null || r.call(this, c);
105
+ const r = P.parse(x[t(291)]);
106
+ (s = this.onmessage) == null || s.call(this, r);
107
+ } catch (r) {
108
+ const c = new Error("Failed to parse message: " + r);
109
+ (a = this.onerror) == null || a.call(this, c);
112
110
  }
113
- }, this[t(369)].onmessageerror = (x) => {
114
- var r;
115
- const e = t, s = new Error(e(386) + JSON[e(398)](x));
116
- (r = this[e(404)]) == null || r.call(this, s);
117
- }, this[t(369)][t(362)]());
111
+ }, this[e(288)][e(299)] = (x) => {
112
+ var a;
113
+ const t = e, s = new Error(t(285) + JSON[t(295)](x));
114
+ (a = this.onerror) == null || a.call(this, s);
115
+ }, this[e(288)].start());
118
116
  }
119
- async send(t) {
120
- const x = f, e = { wFeCb: function(s, r) {
121
- return s instanceof r;
122
- }, vzpHB: function(s, r) {
123
- return s(r);
124
- }, cdjiy: function(s, r) {
125
- return s(r);
117
+ async send(e) {
118
+ const x = f, t = { YQtxD: function(s) {
119
+ return s();
120
+ }, uJFvk: function(s, a) {
121
+ return s instanceof a;
122
+ }, AwGTN: function(s, a) {
123
+ return s(a);
126
124
  } };
127
- if (!(this[x(364)] || !this[x(369)]))
128
- return new Promise((s, r) => {
125
+ if (!(this[x(266)] || !this[x(288)]))
126
+ return new Promise((s, a) => {
129
127
  var c;
130
- const a = x;
128
+ const r = x;
131
129
  try {
132
- this[a(369)] && this[a(369)][a(397)](t), s();
130
+ this[r(288)] && this[r(288)][r(283)](e), t[r(302)](s);
133
131
  } catch (o) {
134
- const i = e[a(378)](o, Error) ? o : new Error(e[a(403)](String, o));
135
- (c = this[a(404)]) == null || c.call(this, i), e[a(366)](r, i);
132
+ const i = t[r(287)](o, Error) ? o : new Error(String(o));
133
+ (c = this[r(263)]) == null || c.call(this, i), t[r(313)](a, i);
136
134
  }
137
135
  });
138
136
  }
139
- async [f(395)]() {
137
+ async [f(314)]() {
140
138
  var x;
141
- const t = f;
142
- this[t(364)] || !this[t(369)] || (this[t(364)] = !0, this[t(369)][t(395)](), (x = this[t(388)]) == null || x.call(this));
139
+ const e = f;
140
+ this[e(266)] || !this[e(288)] || (this._closed = !0, this._port[e(314)](), (x = this[e(290)]) == null || x.call(this));
143
141
  }
144
- get [f(408)]() {
145
- return this[f(415)];
142
+ get sessionId() {
143
+ return this[f(261)];
146
144
  }
147
145
  }
148
- class G extends l {
149
- constructor(t, x = z()) {
150
- const e = f;
151
- super(), this._endpoint = t, this._globalObject = x;
152
- const s = new MessageChannel(), r = crypto[e(363)]();
153
- this[e(369)] = s[e(406)], this[e(415)] = r, L(this[e(392)], { endpoint: this[e(401)], sessionId: r }, [s[e(361)]]);
146
+ class Y extends I {
147
+ constructor(e, x = V()) {
148
+ const t = f;
149
+ super(), this[t(316)] = e, this[t(262)] = x;
150
+ const s = new MessageChannel(), a = crypto[t(297)]();
151
+ this._port = s[t(280)], this._sessionId = a, J(this[t(262)], { endpoint: this._endpoint, sessionId: a }, [s.port2]);
154
152
  }
155
153
  }
156
- class q extends l {
157
- constructor(t, x = z()) {
158
- const e = f, s = { zjysK: function(r, a) {
159
- return r === a;
160
- }, JwJXP: function(r) {
161
- return r();
154
+ class $ extends I {
155
+ constructor(e, x = V()) {
156
+ const t = f, s = { iOEyU: function(a, r) {
157
+ return a === r;
158
+ }, IDJSL: function(a) {
159
+ return a();
160
+ }, kVBRC: function(a, r, c) {
161
+ return a(r, c);
162
162
  } };
163
- super(), this._endpoint = t, this[e(392)] = x, this._listen = new Promise((r) => {
164
- const a = e, c = { mkXkB: function(o, i) {
165
- return s[u(390)](o, i);
166
- }, vKRow: function(o) {
167
- return s.JwJXP(o);
163
+ super(), this[t(316)] = e, this[t(262)] = x, this[t(273)] = new Promise((a) => {
164
+ const r = t, c = { bRXzv: function(o, i) {
165
+ return s[u(311)](o, i);
166
+ }, rErKj: function(o) {
167
+ return s[u(317)](o);
168
168
  } };
169
- J(this[a(392)], (o) => {
170
- const i = a;
171
- o[i(412)] && c[i(409)](o[i(412)][i(411)], this._endpoint) && (this[i(369)] = o.ports[7172 + 2512 * 3 + -14708], this._sessionId = o[i(412)][i(408)], c.vKRow(r));
169
+ s[r(267)](q, this[r(262)], (o) => {
170
+ const i = r;
171
+ o[i(291)] && c[i(315)](o.data[i(312)], this._endpoint) && (this[i(288)] = o.ports[-5711 * 1 + -4211 + 9922], this[i(261)] = o[i(291)].sessionId, c[i(293)](a));
172
172
  });
173
173
  });
174
174
  }
175
- async listen() {
176
- return this._listen;
175
+ async [f(260)]() {
176
+ return this[f(273)];
177
177
  }
178
178
  }
179
- const $ = () => {
180
- const n = f, t = new MessageChannel(), x = crypto[n(363)]();
181
- return [new l(t[n(406)], x), new l(t.port2, x)];
179
+ const x0 = () => {
180
+ const n = f, e = new MessageChannel(), x = crypto[n(297)]();
181
+ return [new I(e[n(280)], x), new I(e[n(265)], x)];
182
182
  };
183
- (function(n, t) {
184
- const x = p, e = n();
183
+ (function(n, e) {
184
+ const x = h, t = n();
185
185
  for (; ; )
186
186
  try {
187
- if (-parseInt(x(288)) / 1 + parseInt(x(266)) / 2 + -parseInt(x(246)) / 3 * (-parseInt(x(274)) / 4) + parseInt(x(275)) / 5 * (-parseInt(x(264)) / 6) + parseInt(x(243)) / 7 + parseInt(x(255)) / 8 * (parseInt(x(256)) / 9) + -parseInt(x(286)) / 10 * (parseInt(x(249)) / 11) === t) break;
188
- e.push(e.shift());
187
+ if (parseInt(x(206)) / 1 + -parseInt(x(193)) / 2 + -parseInt(x(199)) / 3 + -parseInt(x(157)) / 4 * (parseInt(x(180)) / 5) + -parseInt(x(183)) / 6 * (-parseInt(x(170)) / 7) + -parseInt(x(184)) / 8 + parseInt(x(189)) / 9 * (parseInt(x(186)) / 10) === e) break;
188
+ t.push(t.shift());
189
189
  } catch {
190
- e.push(e.shift());
190
+ t.push(t.shift());
191
191
  }
192
- })(I, -478347 + -3 * -96269 + -1075 * -451);
193
- function p(n, t) {
194
- const x = I();
195
- return p = function(e, s) {
196
- return e = e - (-4892 + -197 * -11 + 2968), x[e];
197
- }, p(n, t);
192
+ })(w, -30554 * -52 + -1 * 606613 + -57292);
193
+ function h(n, e) {
194
+ const x = w();
195
+ return h = function(t, s) {
196
+ return t = t - (-11 * -185 + 336 + -443 * 5), x[t];
197
+ }, h(n, e);
198
198
  }
199
- const R = async (n, t) => {
200
- const x = p, e = { PitKE: x(270), maubQ: "tools/call", xIbLF: x(268), zdWOe: "resources/subscribe", rpoYy: "resources/unsubscribe", HzfVS: x(247), EEwSb: "ping", TBOui: x(250), CDYcU: x(244), aojBA: x(289), PkqjY: function(o, i) {
201
- return o !== i;
202
- }, gRqrR: "notifications/initialized" };
199
+ function w() {
200
+ const n = ["resources/subscribe", "ping", "resources/read", "393530yIHVtY", "forward", "XZETl", "pwSKX", "initialize", "unsubscribeResource", "notification", "172pkalSl", "tools/call", "completion/complete", "readResource", "_onrequest", "setLoggingLevel", "resources/list", "protocolVersion", "prompts/list", "listResourceTemplates", "Tzjin", "iaOEj", "onmessage", "1227289EsxKGN", "subscribeResource", "IsISs", "WOdsW", "KBlBl", "tIVIZ", "resources/unsubscribe", "tools/list", "qfKYm", "callTool", "106490VdOZkx", "MwUMO", "logging/setLevel", "30AFvHVm", "9889840NnrolI", "_onnotification", "20dKDpUE", "send", "notifications/initialized", "16467786obemSM", "resources/templates/list", "prompts/get", "_client", "2611030UuZguQ", "2.0", "isSet", "OVBQA", "FIXVX", "_transport", "1641633Qjhlmh", "call", "CendM", "listPrompts"];
201
+ return w = function() {
202
+ return n;
203
+ }, w();
204
+ }
205
+ const Q = async (n, e) => {
206
+ const x = h, t = { Chjbn: x(177), FIXVX: x(158), Tzjin: x(163), ogPKJ: x(203), OVBQA: x(191), iaOEj: x(165), tIVIZ: x(204), qfKYm: x(159), WFkgE: x(182), MwUMO: "2.0", pwSKX: function(i, p) {
207
+ return i !== p;
208
+ }, KBlBl: x(210), IsISs: function(i, p) {
209
+ return i !== p;
210
+ }, CendM: "notifications/cancelled" };
203
211
  let s;
204
- const { id: r, method: a, params: c } = t;
205
- if (a) {
206
- switch (a) {
207
- case e[x(276)]:
208
- s = await n._client[x(258)](c);
212
+ const { id: a, method: r, params: c, result: o } = e;
213
+ if (r) {
214
+ switch (r) {
215
+ case t.Chjbn:
216
+ s = await n[x(192)].listTools(c);
209
217
  break;
210
- case e[x(260)]:
211
- s = await n[x(257)][x(285)](c);
218
+ case t[x(197)]:
219
+ s = await n._client[x(179)](c);
212
220
  break;
213
- case x(267):
221
+ case t[x(167)]:
214
222
  s = await n._client.listResources(c);
215
223
  break;
216
- case e.xIbLF:
217
- s = await n[x(257)][x(251)](c);
224
+ case x(190):
225
+ s = await n[x(192)][x(166)](c);
218
226
  break;
219
- case x(282):
220
- s = await n._client.readResource(c);
227
+ case x(205):
228
+ s = await n._client[x(160)](c);
221
229
  break;
222
- case e[x(263)]:
223
- s = await n[x(257)].subscribeResource(c);
230
+ case t.ogPKJ:
231
+ s = await n[x(192)][x(171)](c);
224
232
  break;
225
- case e[x(254)]:
226
- s = await n[x(257)].unsubscribeResource(c);
233
+ case x(176):
234
+ s = await n[x(192)][x(211)](c);
227
235
  break;
228
- case e[x(287)]:
229
- s = await n[x(257)][x(279)](c);
236
+ case t[x(196)]:
237
+ s = await n._client.getPrompt(c);
230
238
  break;
231
- case "prompts/list":
232
- s = await n[x(257)][x(280)](c);
239
+ case t[x(168)]:
240
+ s = await n[x(192)][x(202)](c);
233
241
  break;
234
- case e.EEwSb:
235
- s = await n[x(257)][x(259)]();
242
+ case t[x(175)]:
243
+ s = await n[x(192)][x(204)]();
236
244
  break;
237
- case e[x(252)]:
238
- s = await n[x(257)][x(253)](c);
245
+ case t[x(178)]:
246
+ s = await n[x(192)].complete(c);
239
247
  break;
240
- case e[x(290)]:
241
- s = await n._client[x(265)](c);
248
+ case t.WFkgE:
249
+ s = await n._client[x(162)](c.level);
242
250
  break;
243
251
  }
244
- return s ? await n[x(271)]({ result: s, jsonrpc: e[x(281)], id: r }) : e[x(269)](a, x(248)) && e[x(269)](a, e[x(273)]) && (a !== x(245) || c[x(278)]) && await n[x(257)].notification({ method: a, params: c }), s;
245
- }
246
- }, B = (n) => {
247
- const t = p, x = { UbcJZ: function(s, r, a) {
248
- return s(r, a);
249
- } }, e = n[t(261)];
250
- if (!e[t(272)]) {
251
- async function s(r, a) {
252
- const c = t;
253
- if (n[c(257)]) {
252
+ s ? await n[x(187)]({ result: s, jsonrpc: t[x(181)], id: a }) : t[x(209)](r, t[x(174)]) && t[x(209)](r, x(188)) && (t[x(172)](r, t[x(201)]) || c[x(207)]) && await n[x(192)][x(156)]({ method: r, params: c });
253
+ } else o && !o[x(164)] && (await n[x(192)][x(198)][x(187)](e), s = o);
254
+ return s;
255
+ }, K = (n) => {
256
+ const e = h, x = { XZETl: function(s, a, r) {
257
+ return s(a, r);
258
+ }, iqgfj: function(s, a) {
259
+ return s === a;
260
+ } }, t = n[e(169)];
261
+ if (!t.isSet) {
262
+ async function s(a, r) {
263
+ const c = e;
264
+ if (n._client) {
254
265
  let o;
255
266
  try {
256
- o = await x[c(262)](R, n, r);
267
+ o = await x[c(208)](Q, n, a);
257
268
  } catch {
258
269
  }
259
- if (o === void 0 && e) try {
260
- e[c(284)](n, r, a);
270
+ if (x.iqgfj(o, void 0) && t) try {
271
+ t[c(200)](n, a, r);
261
272
  } catch {
262
273
  }
263
274
  }
264
275
  }
265
- s[t(272)] = !0, n[t(261)] = s;
276
+ s[e(195)] = !0, n.onmessage = s;
266
277
  }
267
- }, F = (n, t) => {
268
- const x = p, e = { uVICw: "2.0" }, s = t._onnotification;
269
- t[x(283)] = async (r) => {
270
- const a = x, c = { ...r, jsonrpc: e[a(277)] };
278
+ }, M = (n, e) => {
279
+ const x = h, t = { WOdsW: x(194) };
280
+ e[x(161)] = async (a) => {
271
281
  try {
272
- await n[a(271)](c);
282
+ await n.send(a);
273
283
  } catch {
274
284
  }
275
- s[a(284)](t, r);
285
+ };
286
+ const s = e[x(185)];
287
+ e[x(185)] = async (a) => {
288
+ const r = x;
289
+ try {
290
+ await n[r(187)]({ ...a, jsonrpc: t[r(173)] });
291
+ } catch {
292
+ }
293
+ s[r(200)](e, a);
276
294
  };
277
295
  };
278
- function I() {
279
- const n = ["1902432oaNMmN", "logging/setLevel", "notifications/cancelled", "423vnTEpV", "prompts/get", "initialize", "38423iPDJzE", "completion/complete", "listResourceTemplates", "TBOui", "complete", "rpoYy", "8WCGEFo", "2308032MvAygh", "_client", "listTools", "ping", "maubQ", "onmessage", "UbcJZ", "zdWOe", "16194SVjsAa", "setLoggingLevel", "1036224YsKPJD", "resources/list", "resources/templates/list", "PkqjY", "tools/list", "send", "isSet", "gRqrR", "9884vhoTIc", "790tyyHbr", "PitKE", "uVICw", "forward", "getPrompt", "listPrompts", "aojBA", "resources/read", "_onnotification", "call", "callTool", "1390iMNkwv", "HzfVS", "187493tmEvWX", "2.0", "CDYcU"];
280
- return I = function() {
281
- return n;
282
- }, I();
283
- }
284
- var C = b;
285
- (function(n, t) {
286
- for (var x = b, e = n(); ; )
296
+ (function(n, e) {
297
+ for (var x = b, t = n(); ; )
287
298
  try {
288
- var s = parseInt(x(124)) / 1 * (-parseInt(x(123)) / 2) + -parseInt(x(113)) / 3 * (-parseInt(x(127)) / 4) + -parseInt(x(122)) / 5 * (parseInt(x(115)) / 6) + parseInt(x(128)) / 7 * (parseInt(x(119)) / 8) + -parseInt(x(112)) / 9 + -parseInt(x(126)) / 10 + parseInt(x(121)) / 11 * (parseInt(x(118)) / 12);
289
- if (s === t) break;
290
- e.push(e.shift());
299
+ var s = parseInt(x(383)) / 1 * (parseInt(x(391)) / 2) + parseInt(x(386)) / 3 * (parseInt(x(396)) / 4) + -parseInt(x(385)) / 5 * (parseInt(x(379)) / 6) + -parseInt(x(387)) / 7 * (parseInt(x(380)) / 8) + -parseInt(x(382)) / 9 * (-parseInt(x(392)) / 10) + -parseInt(x(381)) / 11 * (-parseInt(x(388)) / 12) + -parseInt(x(389)) / 13;
300
+ if (s === e) break;
301
+ t.push(t.shift());
291
302
  } catch {
292
- e.push(e.shift());
303
+ t.push(t.shift());
293
304
  }
294
- })(w, 1767 * 253 + -687857 + 8 * 78058);
295
- function b(n, t) {
296
- var x = w();
297
- return b = function(e, s) {
298
- e = e - (7038 + -5 * -1006 + -11958);
299
- var r = x[e];
300
- return r;
301
- }, b(n, t);
302
- }
303
- function w() {
304
- var n = ["ozTZy", "2026719afumPv", "245283gIIfvg", "_endpoint", "66AmGFRf", "NUrkI", "kpaeS", "7404nyyBCe", "2488EwPGSE", "sessionId", "19382iSxgqP", "38365HVaadj", "12QfucWW", "106347UlJhXm", "_client", "7409080OKLnQg", "20cIGngf", "12971DXPsbO", "_startOrAuth"];
305
- return w = function() {
305
+ })(m, 389 * -1754 + -3 * 97355 + 1317170);
306
+ function m() {
307
+ var n = ["5022OmnyKA", "10LdrZKx", "get", "142565gVQzoS", "4419UtroOm", "3268391tMBvKD", "14244EMXwWb", "8517808LylLmW", "_client", "64166GVytov", "8430JLnKxF", "uRope", "sessionId", "searchParams", "724hXVbSd", "_startOrAuth", "_endpoint", "12GXPNZL", "8qTvGNm", "4301CiXaaz"];
308
+ return m = function() {
306
309
  return n;
307
- }, w();
310
+ }, m();
308
311
  }
309
- class V extends U {
310
- constructor(t, x, e) {
311
- var s = b, r = { kpaeS: function(a, c, o) {
312
- return a(c, o);
313
- } };
314
- super(t, x), this[s(125)] = e, r[s(117)](F, this, e);
312
+ function b(n, e) {
313
+ var x = m();
314
+ return b = function(t, s) {
315
+ t = t - (5050 + 4337 * -1 + -335);
316
+ var a = x[t];
317
+ return a;
318
+ }, b(n, e);
319
+ }
320
+ class B extends A {
321
+ constructor(e, x, t) {
322
+ var s = b;
323
+ super(e, x), this[s(390)] = t, M(this, t);
315
324
  }
316
- [C(110)]() {
317
- var t = C, x = { NUrkI: function(e, s) {
318
- return e(s);
325
+ _startOrAuth() {
326
+ var e = b, x = { JnUhn: function(t, s) {
327
+ return t(s);
319
328
  } };
320
- return x[t(116)](B, this), super[t(110)]();
329
+ return x.JnUhn(K, this), super[e(397)]();
321
330
  }
322
331
  get sessionId() {
323
- var t = C, x = { ozTZy: t(120) };
324
- return this[t(114)].searchParams.get(x[t(111)]);
332
+ var e = b, x = { uRope: e(394) };
333
+ return this[e(378)][e(395)][e(384)](x[e(393)]);
325
334
  }
326
335
  }
327
- var A = d;
328
- (function(n, t) {
329
- for (var x = d, e = n(); ; )
336
+ var T = d;
337
+ (function(n, e) {
338
+ for (var x = d, t = n(); ; )
330
339
  try {
331
- var s = -parseInt(x(494)) / 1 * (parseInt(x(498)) / 2) + -parseInt(x(491)) / 3 * (parseInt(x(504)) / 4) + parseInt(x(503)) / 5 * (-parseInt(x(502)) / 6) + -parseInt(x(505)) / 7 * (parseInt(x(499)) / 8) + parseInt(x(497)) / 9 + -parseInt(x(496)) / 10 * (parseInt(x(501)) / 11) + parseInt(x(492)) / 12;
332
- if (s === t) break;
333
- e.push(e.shift());
340
+ var s = -parseInt(x(264)) / 1 * (-parseInt(x(271)) / 2) + parseInt(x(278)) / 3 * (-parseInt(x(272)) / 4) + parseInt(x(263)) / 5 * (parseInt(x(265)) / 6) + -parseInt(x(268)) / 7 * (-parseInt(x(269)) / 8) + parseInt(x(277)) / 9 * (parseInt(x(267)) / 10) + -parseInt(x(270)) / 11 + parseInt(x(275)) / 12 * (parseInt(x(266)) / 13);
341
+ if (s === e) break;
342
+ t.push(t.shift());
334
343
  } catch {
335
- e.push(e.shift());
344
+ t.push(t.shift());
336
345
  }
337
- })(m, 1053414 + -4817 * -239 + -1535 * 980);
338
- function m() {
339
- var n = ["136705pohpDC", "4FsndJo", "28jNguJQ", "2342961csporP", "51806004VzAdTV", "ENejo", "1nzFbEV", "_client", "10LYjkAz", "9855miNlny", "2360332QWKvZn", "832664mWZTbO", "_handleSseStream", "7328629udHvjc", "126SuKvXw"];
340
- return m = function() {
341
- return n;
342
- }, m();
346
+ })(y, 2 * -294638 + -857 * -1018 + 168624);
347
+ function d(n, e) {
348
+ var x = y();
349
+ return d = function(t, s) {
350
+ t = t - (-107 * -52 + -9209 * -1 + -1451 * 10);
351
+ var a = x[t];
352
+ return a;
353
+ }, d(n, e);
343
354
  }
344
- function d(n, t) {
345
- var x = m();
346
- return d = function(e, s) {
347
- e = e - (447 + -44 * -1);
348
- var r = x[e];
349
- return r;
350
- }, d(n, t);
351
- }
352
- class D extends N {
353
- constructor(t, x, e) {
354
- var s = d, r = { ENejo: function(a, c, o) {
355
- return a(c, o);
355
+ class N extends L {
356
+ constructor(e, x, t) {
357
+ var s = d, a = { Wkuiz: function(r, c, o) {
358
+ return r(c, o);
356
359
  } };
357
- super(t, x), this[s(495)] = e, r[s(493)](F, this, e);
360
+ super(e, x), this._client = t, a[s(274)](M, this, t);
358
361
  }
359
- [A(500)](t, x) {
360
- B(this), super._handleSseStream(t, x);
362
+ [T(276)](e, x) {
363
+ var t = T, s = { jhXtX: function(a, r) {
364
+ return a(r);
365
+ } };
366
+ s[t(273)](K, this), super[t(276)](e, x);
361
367
  }
362
368
  }
363
- const Q = g;
364
- (function(n, t) {
365
- const x = g, e = n();
369
+ function y() {
370
+ var n = ["9qaucRd", "65uQwPii", "2GMTeDE", "308838LBJQJN", "1361685edIBxA", "3241950hJdseW", "13559oRTimU", "1128blaCel", "7753944SDuEQc", "5474nfaAVO", "725596Wfvlqr", "jhXtX", "Wkuiz", "12hYhJyj", "_handleSseStream", "18MhUuVA"];
371
+ return y = function() {
372
+ return n;
373
+ }, y();
374
+ }
375
+ const E = g;
376
+ (function(n, e) {
377
+ const x = g, t = n();
366
378
  for (; ; )
367
379
  try {
368
- if (-parseInt(x(322)) / 1 + -parseInt(x(313)) / 2 * (-parseInt(x(318)) / 3) + -parseInt(x(317)) / 4 + parseInt(x(320)) / 5 + parseInt(x(316)) / 6 * (-parseInt(x(319)) / 7) + -parseInt(x(314)) / 8 + parseInt(x(325)) / 9 === t) break;
369
- e.push(e.shift());
380
+ if (parseInt(x(302)) / 1 * (parseInt(x(299)) / 2) + parseInt(x(312)) / 3 * (-parseInt(x(305)) / 4) + parseInt(x(297)) / 5 * (-parseInt(x(309)) / 6) + parseInt(x(304)) / 7 * (-parseInt(x(308)) / 8) + -parseInt(x(313)) / 9 + -parseInt(x(311)) / 10 * (-parseInt(x(307)) / 11) + parseInt(x(306)) / 12 * (parseInt(x(301)) / 13) === e) break;
381
+ t.push(t.shift());
370
382
  } catch {
371
- e.push(e.shift());
383
+ t.push(t.shift());
372
384
  }
373
- })(y, -284853 * 1 + 337349 + 308244);
374
- function g(n, t) {
375
- const x = y();
376
- return g = function(e, s) {
377
- return e = e - (193 * 25 + 215 * 13 + -1 * 7307), x[e];
378
- }, g(n, t);
385
+ })(k, 609845);
386
+ function g(n, e) {
387
+ const x = k();
388
+ return g = function(t, s) {
389
+ return t = t - (-31 * -298 + -513 * 5 + -6376), x[t];
390
+ }, g(n, e);
379
391
  }
380
- const K = (n) => ({ requestInit: { headers: { Authorization: Q(315) + n } }, eventSourceInit: { async fetch(t, x) {
381
- const e = Q, s = { rYWUh: function(a, c, o) {
382
- return a(c, o);
383
- } }, r = new Headers((x == null ? void 0 : x[e(326)]) || {});
384
- return r[e(324)](e(323), "Bearer " + n), s[e(321)](fetch, t, { ...x, headers: r });
385
- } } });
386
- function y() {
387
- const n = ["10aFKAvH", "1632360aeNKje", "Bearer ", "12wpzBCB", "2297516BDZPEa", "378561EjWPGr", "485681thirRS", "3352345TLwAVz", "rYWUh", "234601LtFMpu", "authorization", "set", "1900143qjBhtI", "headers"];
388
- return y = function() {
392
+ function k() {
393
+ const n = ["Bearer ", "130ubnbXA", "38879VOegQR", "sIbfU", "63tamhTw", "5860rATNON", "1214988htFrdb", "11zVJjZH", "389576ywXhav", "1226886lQQmBP", "authorization", "11690620IaVmMm", "1407QuUABf", "5585148VIesXa", "10iWlXME", "set", "30wtelFC"];
394
+ return k = function() {
389
395
  return n;
390
- }, y();
396
+ }, k();
391
397
  }
398
+ const W = (n) => ({ requestInit: { headers: { Authorization: E(300) + n } }, eventSourceInit: { async fetch(e, x) {
399
+ const t = E, s = { sIbfU: t(310), ibcOG: function(r, c, o) {
400
+ return r(c, o);
401
+ } }, a = new Headers((x == null ? void 0 : x.headers) || {});
402
+ return a[t(298)](s[t(303)], t(300) + n), s.ibcOG(fetch, e, { ...x, headers: a });
403
+ } } });
392
404
  function v() {
393
- const n = ["4SkJKJL", "9zKKMwH", "12IATTGu", "Bearer ", "2328136tnNXGw", "13111439kofmQB", "7028DxzoFj", "12aHQLzS", "randomUUID", "10ZcCFQv", "21194277dSsQRo", "1225892GmoNMD", "2604453DQpZXf", "1840aFNRvJ", "140854VsCYIF"];
405
+ const n = ["30553pEiuTa", "808pkhgKb", "126329USsomm", "22977LUaclj", "66oWTfhh", "227436VsPWvX", "Bearer ", "4269460GObhyR", "920125kzwNyQ", "26VxzVCI", "12807awgiCn", "randomUUID"];
394
406
  return v = function() {
395
407
  return n;
396
408
  }, v();
397
409
  }
398
- function k(n, t) {
410
+ function O(n, e) {
399
411
  const x = v();
400
- return k = function(e, s) {
401
- return e = e - (1 * 4855 + 2015 * -3 + -541 * -3), x[e];
402
- }, k(n, t);
412
+ return O = function(t, s) {
413
+ return t = t - (366 * -26 + -594 + -29 * -362), x[t];
414
+ }, O(n, e);
403
415
  }
404
- const E = k;
405
- (function(n, t) {
406
- const x = k, e = n();
416
+ const X = O;
417
+ (function(n, e) {
418
+ const x = O, t = n();
407
419
  for (; ; )
408
420
  try {
409
- if (-parseInt(x(435)) / 1 + parseInt(x(439)) / 2 * (parseInt(x(436)) / 3) + parseInt(x(445)) / 4 * (parseInt(x(437)) / 5) + parseInt(x(446)) / 6 * (-parseInt(x(438)) / 7) + -parseInt(x(443)) / 8 * (-parseInt(x(440)) / 9) + parseInt(x(433)) / 10 * (parseInt(x(444)) / 11) + -parseInt(x(441)) / 12 * (parseInt(x(434)) / 13) === t) break;
410
- e.push(e.shift());
421
+ if (-parseInt(x(392)) / 1 * (parseInt(x(389)) / 2) + -parseInt(x(395)) / 3 + parseInt(x(397)) / 4 + parseInt(x(388)) / 5 + parseInt(x(396)) / 6 * (-parseInt(x(394)) / 7) + parseInt(x(393)) / 8 * (parseInt(x(390)) / 9) + parseInt(x(399)) / 10 === e) break;
422
+ t.push(t.shift());
411
423
  } catch {
412
- e.push(e.shift());
424
+ t.push(t.shift());
413
425
  }
414
- })(v, 341649 + 12867 * 29 + 254587);
415
- const W = (n, t = crypto[E(447)]()) => ({ requestInit: { headers: { Authorization: E(442) + n, "stream-session-id": t } } });
416
- (function(n, t) {
417
- const x = _, e = n();
426
+ })(v, -217834 * -1 + 414155 + -423801);
427
+ const F = (n, e = crypto[X(391)]()) => ({ requestInit: { headers: { Authorization: X(398) + n, "stream-session-id": e } } });
428
+ (function(n, e) {
429
+ const x = l, t = n();
418
430
  for (; ; )
419
431
  try {
420
- if (parseInt(x(275)) / 1 + -parseInt(x(287)) / 2 + -parseInt(x(281)) / 3 + parseInt(x(278)) / 4 + -parseInt(x(283)) / 5 * (-parseInt(x(276)) / 6) + -parseInt(x(288)) / 7 + -parseInt(x(277)) / 8 * (-parseInt(x(279)) / 9) === t) break;
421
- e.push(e.shift());
432
+ if (parseInt(x(159)) / 1 * (-parseInt(x(156)) / 2) + -parseInt(x(157)) / 3 * (-parseInt(x(149)) / 4) + -parseInt(x(153)) / 5 * (-parseInt(x(163)) / 6) + parseInt(x(165)) / 7 * (parseInt(x(148)) / 8) + parseInt(x(162)) / 9 + parseInt(x(161)) / 10 + parseInt(x(154)) / 11 * (-parseInt(x(145)) / 12) === e) break;
433
+ t.push(t.shift());
422
434
  } catch {
423
- e.push(e.shift());
435
+ t.push(t.shift());
424
436
  }
425
- })(S, 21 * 10856 + -1289478 + 1872590);
437
+ })(S, -2 * -356012 + 5 * 185831 + -430571 * 2);
426
438
  function S() {
427
- const n = ["OFZDO", "3078402bfKTDc", "aPrQB", "165rMVxea", "sessionId", "UkwnV", "1.0.0", "2730562IApyhv", "8251971BQcDYN", "connect", "mcp-proxy-client", "1382582OHWLMY", "181014nWtnBj", "40YGaUQY", "1439628aYTeUJ", "2957922NBEiGW"];
439
+ const n = ["10579914JkMOvS", "6rEhTxH", "lYWRE", "2329537vnNeJF", "24ALvRXi", "mcp-proxy-client", "QRpGh", "8pdqlaq", "5836416IwzHzF", "randomUUID", "oshJo", "KnRqG", "706165zIRaKP", "16954927rXFijE", "connect", "4vEYPmW", "3biXmpN", "1.0.0", "165023JeoCuN", "sessionId", "10841230ZbeHac"];
428
440
  return S = function() {
429
441
  return n;
430
442
  }, S();
431
443
  }
432
- function _(n, t) {
444
+ function l(n, e) {
433
445
  const x = S();
434
- return _ = function(e, s) {
435
- return e = e - (-6477 + 43 * 157), x[e];
436
- }, _(n, t);
446
+ return l = function(t, s) {
447
+ return t = t - (6 * 1345 + -109 * 85 + 134 * 10), x[t];
448
+ }, l(n, e);
437
449
  }
438
- const x0 = async (n) => {
439
- const t = _, x = { aPrQB: function(i, T) {
440
- return i(T);
441
- }, KNpgk: t(286) }, { client: e, url: s, token: r } = n, a = new V(new URL(s), x[t(282)](K, r), e), c = { prompts: {}, resources: {}, tools: {}, logging: {}, roots: { listChanged: !0 }, sampling: {} };
442
- return await new j({ name: t(274), version: x.KNpgk }, { capabilities: c }).connect(a), { transport: a, sessionId: a[t(284)] };
450
+ const t0 = async (n) => {
451
+ const e = l, x = { KnRqG: e(146), lYWRE: e(158) }, { client: t, url: s, token: a } = n, r = new B(new URL(s), W(a), t), c = { prompts: {}, resources: {}, tools: {}, logging: {}, roots: { listChanged: !0 }, sampling: {} };
452
+ return await new C({ name: x[e(152)], version: x[e(164)] }, { capabilities: c })[e(155)](r), { transport: r, sessionId: r[e(160)] };
443
453
  }, e0 = async (n) => {
444
- const t = _, x = { UkwnV: "mcp-proxy-client", OFZDO: t(286) }, { client: e, url: s, token: r } = n, a = crypto.randomUUID(), c = new D(new URL(s), W(r, a), e), o = { prompts: {}, resources: {}, tools: {}, logging: {}, roots: { listChanged: !0 }, sampling: {} };
445
- return await new j({ name: x[t(285)], version: x[t(280)] }, { capabilities: o })[t(289)](c), { transport: c, sessionId: a };
454
+ const e = l, x = { QRpGh: function(p, z, j) {
455
+ return p(z, j);
456
+ }, dxxzZ: e(146), oshJo: e(158) }, { client: t, url: s, token: a } = n, r = crypto[e(150)](), c = new N(new URL(s), x[e(147)](F, a, r), t), o = { prompts: {}, resources: {}, tools: {}, logging: {}, roots: { listChanged: !0 }, sampling: {} };
457
+ return await new C({ name: x.dxxzZ, version: x[e(151)] }, { capabilities: o })[e(155)](c), { transport: c, sessionId: r };
446
458
  };
447
- (function(n, t) {
448
- for (var x = M, e = n(); ; )
459
+ (function(n, e) {
460
+ for (var x = U, t = n(); ; )
449
461
  try {
450
- var s = -parseInt(x(263)) / 1 * (-parseInt(x(265)) / 2) + -parseInt(x(266)) / 3 + -parseInt(x(260)) / 4 * (parseInt(x(264)) / 5) + -parseInt(x(261)) / 6 + -parseInt(x(259)) / 7 + -parseInt(x(262)) / 8 + parseInt(x(258)) / 9 * (parseInt(x(267)) / 10);
451
- if (s === t) break;
452
- e.push(e.shift());
462
+ var s = -parseInt(x(192)) / 1 * (-parseInt(x(184)) / 2) + parseInt(x(189)) / 3 + -parseInt(x(191)) / 4 + -parseInt(x(190)) / 5 * (parseInt(x(187)) / 6) + -parseInt(x(188)) / 7 + -parseInt(x(186)) / 8 + -parseInt(x(185)) / 9 * (-parseInt(x(183)) / 10);
463
+ if (s === e) break;
464
+ t.push(t.shift());
453
465
  } catch {
454
- e.push(e.shift());
466
+ t.push(t.shift());
455
467
  }
456
- })(P, -51445 * -2 + 47946 * 7 + -25451 * 6);
457
- function P() {
458
- var n = ["4FylPba", "983805jQaDCg", "117826OFmOiY", "1560156wNEzZE", "3350pVYacf", "24669aEBmhn", "289737sUbMZE", "4wIBQsd", "2166XHMuiF", "876128zNinIk"];
459
- return P = function() {
468
+ })(R, -1423438 + 1 * 705865 + 1452266);
469
+ function R() {
470
+ var n = ["4322934YRzirF", "35urgodU", "1113112McoPZj", "1pAOfQT", "73690GqkJoh", "2806274NFWKYE", "927oDzgqo", "5963992rUDokS", "920904gLnKFU", "5391848BByiTj"];
471
+ return R = function() {
460
472
  return n;
461
- }, P();
473
+ }, R();
462
474
  }
463
- function M(n, t) {
464
- var x = P();
465
- return M = function(e, s) {
466
- e = e - 258;
467
- var r = x[e];
468
- return r;
469
- }, M(n, t);
475
+ function U(n, e) {
476
+ var x = R();
477
+ return U = function(t, s) {
478
+ t = t - (-3319 * 1 + 1 * 3530 + 14 * -2);
479
+ var a = x[t];
480
+ return a;
481
+ }, U(n, e);
470
482
  }
471
483
  export {
472
- G as MessageChannelClientTransport,
473
- q as MessageChannelServerTransport,
474
- l as MessageChannelTransport,
475
- V as ProxySSEClientTransport,
476
- D as ProxyStreamClientTransport,
477
- x0 as createSseProxy,
484
+ Y as MessageChannelClientTransport,
485
+ $ as MessageChannelServerTransport,
486
+ I as MessageChannelTransport,
487
+ B as ProxySSEClientTransport,
488
+ N as ProxyStreamClientTransport,
489
+ t0 as createSseProxy,
478
490
  e0 as createStreamProxy,
479
- $ as createTransportPair,
480
- K as sseOptions,
481
- W as streamOptions
491
+ x0 as createTransportPair,
492
+ W as sseOptions,
493
+ F as streamOptions
482
494
  };