@opentiny/next 0.2.1 → 0.3.1
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/README.md +2 -2
- package/index.d.ts +336 -0
- package/index.js +813 -0
- package/package.json +6 -18
- package/client.d.ts +0 -191
- package/client.js +0 -668
- package/server.d.ts +0 -146
- package/server.js +0 -565
package/server.js
DELETED
|
@@ -1,565 +0,0 @@
|
|
|
1
|
-
import _0x164627 from "jsonwebtoken";
|
|
2
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
-
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
5
|
-
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
6
|
-
import { EmptyResultSchema, CreateMessageResultSchema, ListRootsResultSchema, isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
-
(function(_0x15e9b1, _0x4ee6f0) {
|
|
8
|
-
const _0x581adc = _0x55b9, _0x17b01d = _0x55b9, _0x369cf0 = _0x15e9b1();
|
|
9
|
-
while (!![]) {
|
|
10
|
-
try {
|
|
11
|
-
const _0x493bfb = parseInt(_0x581adc(176)) / (6465 + -511 + -5953) * (parseInt(_0x581adc(189)) / (24 * -6 + -43 * 159 + 6983 * 1)) + -parseInt(_0x581adc(208)) / (-3369 + 2 * -20 + 3412) * (parseInt(_0x17b01d(181)) / (4219 * -1 + 61 * 31 + 2332)) + parseInt(_0x581adc(177)) / (4771 + 2 * 4552 + -730 * 19) + -parseInt(_0x581adc(243)) / (-6855 + 1605 + 5256) + parseInt(_0x581adc(218)) / (-5306 + 1 * -1871 + 7184) * (-parseInt(_0x17b01d(230)) / (9783 + 5763 + -17 * 914)) + -parseInt(_0x581adc(244)) / (-7509 + 5806 * -1 + 13324) * (-parseInt(_0x581adc(251)) / (1647 * -4 + 8378 + -1780)) + parseInt(_0x581adc(213)) / (-35 * 280 + 7002 + 2809) * (parseInt(_0x17b01d(245)) / (1867 + 201 * 35 + -35 * 254));
|
|
12
|
-
if (_0x493bfb === _0x4ee6f0) break;
|
|
13
|
-
else _0x369cf0["push"](_0x369cf0["shift"]());
|
|
14
|
-
} catch (_0x3b413a) {
|
|
15
|
-
_0x369cf0["push"](_0x369cf0["shift"]());
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
})(_0xf280, -130105 * -4 + -17 * 62683 + 1 * 1324985);
|
|
19
|
-
const forwardServerRequest = async (_0xdd0d09, _0x3dfb21, _0xe96ef1) => {
|
|
20
|
-
var _a;
|
|
21
|
-
const _0x5377ea = _0x55b9, _0x32cba5 = _0x55b9, _0x292789 = {};
|
|
22
|
-
_0x292789["mUXvC"] = "tools/list", _0x292789["Hipvk"] = "tools/call", _0x292789[_0x5377ea(186)] = _0x5377ea(234), _0x292789[_0x5377ea(226)] = "resources/read", _0x292789["xGtub"] = _0x5377ea(248), _0x292789[_0x32cba5(198)] = "resources/unsubscribe", _0x292789["NfpWZ"] = _0x5377ea(197), _0x292789[_0x32cba5(174)] = _0x32cba5(203), _0x292789["TcZvQ"] = "ping", _0x292789[_0x5377ea(235)] = _0x32cba5(215), _0x292789["TqteK"] = _0x32cba5(196);
|
|
23
|
-
const _0x13d65d = _0x292789, { id: _0x18414b, method: _0x1a415d, params: _0x3f2e5c } = _0xe96ef1;
|
|
24
|
-
let _0x94dd2b = {};
|
|
25
|
-
switch (_0x1a415d) {
|
|
26
|
-
case _0x13d65d["mUXvC"]:
|
|
27
|
-
_0x94dd2b = await _0x3dfb21["listTools"](_0x3f2e5c);
|
|
28
|
-
break;
|
|
29
|
-
case _0x13d65d["Hipvk"]:
|
|
30
|
-
_0x94dd2b = await _0x3dfb21["callTool"](_0x3f2e5c);
|
|
31
|
-
break;
|
|
32
|
-
case "resources/list":
|
|
33
|
-
_0x94dd2b = await _0x3dfb21[_0x32cba5(216)](_0x3f2e5c);
|
|
34
|
-
break;
|
|
35
|
-
case _0x13d65d["oMpFf"]:
|
|
36
|
-
_0x94dd2b = await _0x3dfb21["listResourceTemplates"](_0x3f2e5c);
|
|
37
|
-
break;
|
|
38
|
-
case _0x13d65d["IOvIF"]:
|
|
39
|
-
_0x94dd2b = await _0x3dfb21["readResource"](_0x3f2e5c);
|
|
40
|
-
break;
|
|
41
|
-
case _0x13d65d["xGtub"]:
|
|
42
|
-
_0x94dd2b = await _0x3dfb21["subscribeResource"](_0x3f2e5c);
|
|
43
|
-
break;
|
|
44
|
-
case _0x13d65d["PQrFy"]:
|
|
45
|
-
_0x94dd2b = await _0x3dfb21["unsubscribeResource"](_0x3f2e5c);
|
|
46
|
-
break;
|
|
47
|
-
case _0x13d65d[_0x5377ea(225)]:
|
|
48
|
-
_0x94dd2b = await _0x3dfb21[_0x32cba5(237)](_0x3f2e5c);
|
|
49
|
-
break;
|
|
50
|
-
case _0x13d65d["ntOTm"]:
|
|
51
|
-
_0x94dd2b = await _0x3dfb21["listPrompts"](_0x3f2e5c);
|
|
52
|
-
break;
|
|
53
|
-
case _0x13d65d["TcZvQ"]:
|
|
54
|
-
_0x94dd2b = await _0x3dfb21["ping"]();
|
|
55
|
-
break;
|
|
56
|
-
case _0x13d65d["Nmorh"]:
|
|
57
|
-
_0x94dd2b = await _0x3dfb21["complete"](_0x3f2e5c);
|
|
58
|
-
break;
|
|
59
|
-
case "logging/setLevel":
|
|
60
|
-
_0x94dd2b = await _0x3dfb21["setLoggingLevel"](_0x3f2e5c == null ? void 0 : _0x3f2e5c[_0x5377ea(199)]);
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
const _0x14a9ec = {};
|
|
64
|
-
_0x14a9ec["result"] = _0x94dd2b, _0x14a9ec["jsonrpc"] = _0x13d65d["TqteK"], _0x14a9ec["id"] = _0x18414b, await ((_a = _0xdd0d09 == null ? void 0 : _0xdd0d09["transport"]) == null ? void 0 : _a[_0x32cba5(175)](_0x14a9ec));
|
|
65
|
-
}, forwardClientRequest = async (_0x500638, _0x30e100, _0x3fbf0d) => {
|
|
66
|
-
var _a;
|
|
67
|
-
const _0x2a24b5 = _0x55b9, _0x584b84 = _0x55b9, _0x26b603 = {};
|
|
68
|
-
_0x26b603["YJPMs"] = "roots/list", _0x26b603["LIniD"] = "sampling/createMessage", _0x26b603[_0x2a24b5(192)] = _0x584b84(193), _0x26b603["rpSZm"] = "2.0";
|
|
69
|
-
const _0xb77dac = _0x26b603, { id: _0x40f3a8, method: _0xf0abf9, params: _0x37aa77 } = _0x3fbf0d;
|
|
70
|
-
let _0x40888e = {};
|
|
71
|
-
switch (_0xf0abf9) {
|
|
72
|
-
case _0xb77dac[_0x584b84(200)]:
|
|
73
|
-
const _0xdf7e43 = {};
|
|
74
|
-
_0xdf7e43["method"] = _0xf0abf9, _0xdf7e43["params"] = _0x37aa77, _0x40888e = await _0x30e100["request"](_0xdf7e43, ListRootsResultSchema);
|
|
75
|
-
break;
|
|
76
|
-
case _0xb77dac[_0x2a24b5(194)]:
|
|
77
|
-
const _0x231006 = {};
|
|
78
|
-
_0x231006[_0x2a24b5(222)] = _0xf0abf9, _0x231006[_0x2a24b5(178)] = _0x37aa77, _0x40888e = await _0x30e100[_0x2a24b5(190)](_0x231006, CreateMessageResultSchema);
|
|
79
|
-
break;
|
|
80
|
-
case _0xb77dac[_0x2a24b5(192)]:
|
|
81
|
-
const _0x231fb4 = {};
|
|
82
|
-
_0x231fb4["method"] = _0xf0abf9, _0x40888e = await _0x30e100[_0x584b84(190)](_0x231fb4, EmptyResultSchema);
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
const _0x32737c = {};
|
|
86
|
-
_0x32737c["result"] = _0x40888e, _0x32737c["jsonrpc"] = _0xb77dac["rpSZm"], _0x32737c["id"] = _0x40f3a8, await ((_a = _0x500638 == null ? void 0 : _0x500638["transport"]) == null ? void 0 : _a[_0x584b84(175)](_0x32737c));
|
|
87
|
-
};
|
|
88
|
-
const forwardServerOnRequest = (_0x3824e3, _0x21dea5) => {
|
|
89
|
-
const _0x4e0325 = _0x55b9, _0x2df68b = _0x55b9, _0x5721d2 = {};
|
|
90
|
-
_0x5721d2[_0x4e0325(206)] = function(_0x2d0003, _0x150e10) {
|
|
91
|
-
return _0x2d0003 === _0x150e10;
|
|
92
|
-
}, _0x5721d2["uksLa"] = "initialize", _0x5721d2[_0x2df68b(236)] = "2.0";
|
|
93
|
-
const _0x46ff83 = _0x5721d2, _0x518870 = _0x3824e3["_onrequest"];
|
|
94
|
-
_0x3824e3["_onrequest"] = async (_0x4aa706, _0x4b0563) => {
|
|
95
|
-
var _a;
|
|
96
|
-
const _0x54a7da = _0x4e0325, _0x40a08d = _0x4e0325, { id: _0x521a50, method: _0x42b6e9 } = _0x4aa706;
|
|
97
|
-
try {
|
|
98
|
-
_0x46ff83["RzxqY"](_0x42b6e9, _0x46ff83[_0x54a7da(242)]) ? await _0x518870[_0x40a08d(205)](_0x3824e3, _0x4aa706, _0x4b0563) : await forwardServerRequest(_0x3824e3, _0x21dea5, _0x4aa706);
|
|
99
|
-
} catch (_0x2446f5) {
|
|
100
|
-
const { code: _0x167ff4, message: _0x3eee41, data: _0x545c10 } = _0x2446f5;
|
|
101
|
-
try {
|
|
102
|
-
const _0x1fdab8 = {};
|
|
103
|
-
_0x1fdab8[_0x40a08d(220)] = _0x167ff4, _0x1fdab8[_0x40a08d(238)] = _0x3eee41, _0x1fdab8[_0x54a7da(228)] = _0x545c10;
|
|
104
|
-
const _0x25c69c = {};
|
|
105
|
-
_0x25c69c[_0x40a08d(211)] = _0x1fdab8, _0x25c69c["jsonrpc"] = _0x46ff83[_0x40a08d(236)], _0x25c69c["id"] = _0x521a50, await ((_a = _0x3824e3 == null ? void 0 : _0x3824e3[_0x40a08d(247)]) == null ? void 0 : _a["send"](_0x25c69c));
|
|
106
|
-
} catch {
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
function _0x55b9(_0x5023b9, _0x48992f) {
|
|
112
|
-
const _0x53cefc = _0xf280();
|
|
113
|
-
return _0x55b9 = function(_0x8f6ce1, _0x3bcbd2) {
|
|
114
|
-
_0x8f6ce1 = _0x8f6ce1 - (5209 + 1 * -9775 + 1 * 4736);
|
|
115
|
-
let _0x2e2bd3 = _0x53cefc[_0x8f6ce1];
|
|
116
|
-
return _0x2e2bd3;
|
|
117
|
-
}, _0x55b9(_0x5023b9, _0x48992f);
|
|
118
|
-
}
|
|
119
|
-
const forwardServerOnNotification = (_0xe793cc, _0x366d23) => {
|
|
120
|
-
const _0x50e439 = _0x55b9, _0x2e025b = _0x55b9, _0x4b9d00 = {};
|
|
121
|
-
_0x4b9d00[_0x50e439(223)] = function(_0x43a76b, _0x3de25a) {
|
|
122
|
-
return _0x43a76b !== _0x3de25a;
|
|
123
|
-
}, _0x4b9d00[_0x50e439(188)] = _0x2e025b(182);
|
|
124
|
-
const _0x27905e = _0x4b9d00;
|
|
125
|
-
_0xe793cc["_onnotification"] = async (_0x5b1d9e) => {
|
|
126
|
-
const _0x291c88 = _0x2e025b, { method: _0x3da3ce, params: _0x196adf } = _0x5b1d9e;
|
|
127
|
-
if (_0x27905e["DnapK"](_0x3da3ce, _0x27905e["XSOGV"]) && (_0x27905e["DnapK"](_0x3da3ce, "notifications/cancelled") || (_0x196adf == null ? void 0 : _0x196adf["forward"]))) try {
|
|
128
|
-
await _0x366d23[_0x291c88(179)](_0x5b1d9e);
|
|
129
|
-
} catch {
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
const forwardClientOnRequest = (_0x2ad851, _0x502abe) => async (_0x51f96d) => {
|
|
134
|
-
var _a;
|
|
135
|
-
const _0x50d76f = _0x55b9, _0x454803 = _0x55b9, _0x2d0e27 = { "UplYq": function(_0x2b60f1, _0x257972, _0x56ed07, _0xd351a4) {
|
|
136
|
-
return _0x2b60f1(_0x257972, _0x56ed07, _0xd351a4);
|
|
137
|
-
}, "fXKny": _0x50d76f(196) };
|
|
138
|
-
try {
|
|
139
|
-
await _0x2d0e27[_0x454803(241)](forwardClientRequest, _0x2ad851, _0x502abe, _0x51f96d);
|
|
140
|
-
} catch (_0x46d1db) {
|
|
141
|
-
const { code: _0xb18777, message: _0x42db0f, data: _0x1c75fe } = _0x46d1db;
|
|
142
|
-
try {
|
|
143
|
-
const _0x48f892 = {};
|
|
144
|
-
_0x48f892["code"] = _0xb18777, _0x48f892["message"] = _0x42db0f, _0x48f892["data"] = _0x1c75fe;
|
|
145
|
-
const _0x54d789 = {};
|
|
146
|
-
_0x54d789[_0x454803(211)] = _0x48f892, _0x54d789["jsonrpc"] = _0x2d0e27[_0x454803(239)], _0x54d789["id"] = _0x51f96d["id"], await ((_a = _0x2ad851 == null ? void 0 : _0x2ad851["transport"]) == null ? void 0 : _a["send"](_0x54d789));
|
|
147
|
-
} catch {
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
const forwardClientOnNotification = (_0x541155) => async (_0x74fcb1) => {
|
|
152
|
-
var _a;
|
|
153
|
-
const _0x7aa3ed = _0x55b9, _0x414387 = _0x55b9, _0x2f97f6 = {};
|
|
154
|
-
_0x2f97f6["fikGv"] = function(_0x47b5ae, _0x511ee4) {
|
|
155
|
-
return _0x47b5ae !== _0x511ee4;
|
|
156
|
-
}, _0x2f97f6["fJnlq"] = "notifications/cancelled", _0x2f97f6[_0x7aa3ed(170)] = _0x414387(196);
|
|
157
|
-
const _0x13d874 = _0x2f97f6, { method: _0x19afbd, params: _0xf71ac2 } = _0x74fcb1;
|
|
158
|
-
if (_0x19afbd !== _0x7aa3ed(182) && (_0x13d874["fikGv"](_0x19afbd, _0x13d874[_0x7aa3ed(246)]) || (_0xf71ac2 == null ? void 0 : _0xf71ac2["forward"]))) try {
|
|
159
|
-
const _0xd1c294 = { ..._0x74fcb1 };
|
|
160
|
-
_0xd1c294["jsonrpc"] = _0x13d874["jsXpM"], await ((_a = _0x541155 == null ? void 0 : _0x541155[_0x414387(247)]) == null ? void 0 : _a["send"](_0xd1c294));
|
|
161
|
-
} catch {
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
function _0xf280() {
|
|
165
|
-
const _0x2ebe74 = ["splice", "clear", "resources/templates/list", "Nmorh", "FsGHU", "getPrompt", "message", "fXKny", "removeNotificationListener", "UplYq", "uksLa", "5861136VaEGRG", "2817BFaiNq", "5649060zMeUWI", "fJnlq", "transport", "resources/subscribe", "removeRequestListener", "clearResponseListener", "19120yGInth", "function", "jsXpM", "addRequestListener", "UcGkN", "length", "ntOTm", "send", "9277MjgkSz", "120995npBoXL", "params", "notification", "requestId", "220dvuYGq", "notifications/initialized", "handleListener", "indexOf", "ltYwb", "oMpFf", "clearNotificationListener", "XSOGV", "126epAjuy", "request", "qPXQI", "NrYkj", "ping", "LIniD", "wEeAu", "2.0", "prompts/get", "PQrFy", "level", "YJPMs", "fallbackRequestHandler", "addResponseListener", "prompts/list", "MsJpV", "call", "RzxqY", "xpIcD", "17814GHkrjy", "notifications/progress", "_requestHandlers", "error", "abort", "33LtghCo", "notifications/cancelled", "completion/complete", "listResources", "clearListener", "7WyImGa", "_notificationHandlers", "code", "_onprogress", "method", "DnapK", "xTWlf", "NfpWZ", "IOvIF", "reason", "data", "hsWZi", "4289048VONxqF", "_onresponse"];
|
|
166
|
-
_0xf280 = function() {
|
|
167
|
-
return _0x2ebe74;
|
|
168
|
-
};
|
|
169
|
-
return _0xf280();
|
|
170
|
-
}
|
|
171
|
-
const createHandleListener = () => {
|
|
172
|
-
const _0x12c0ba = _0x55b9, _0x42b20c = _0x55b9, _0x12b1b6 = { "UcGkN": function(_0x16891d, _0x3f6978) {
|
|
173
|
-
return _0x16891d(_0x3f6978);
|
|
174
|
-
}, "yuQaq": function(_0x486780, _0xb1edbd) {
|
|
175
|
-
return _0x486780 instanceof _0xb1edbd;
|
|
176
|
-
}, "uDlkS": function(_0x33185b, _0x242857) {
|
|
177
|
-
return _0x33185b === _0x242857;
|
|
178
|
-
}, "NRazS": "function", "RbfAO": function(_0x8b6add, _0x1bdaff) {
|
|
179
|
-
return _0x8b6add !== _0x1bdaff;
|
|
180
|
-
} }, _0x332f2c = [], _0x4d6efc = (_0x25afba) => {
|
|
181
|
-
const _0x8f3cf0 = _0x55b9, _0x416b0c = [..._0x332f2c];
|
|
182
|
-
let _0x52425a;
|
|
183
|
-
for (const _0x4a21da of _0x416b0c) {
|
|
184
|
-
try {
|
|
185
|
-
_0x52425a = _0x12b1b6[_0x8f3cf0(172)](_0x4a21da, _0x25afba);
|
|
186
|
-
} catch {
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
if (!_0x12b1b6["yuQaq"](_0x52425a, Promise)) return _0x52425a;
|
|
190
|
-
}, _0x2ac796 = (_0x234c17) => {
|
|
191
|
-
_0x12b1b6["uDlkS"](typeof _0x234c17, _0x12b1b6["NRazS"]) && !_0x332f2c["includes"](_0x234c17) && _0x332f2c["push"](_0x234c17);
|
|
192
|
-
}, _0x31e40a = (_0x3163ee) => {
|
|
193
|
-
const _0x23bfcb = _0x55b9, _0x3a08e1 = _0x55b9, _0x53aecf = _0x332f2c[_0x23bfcb(184)](_0x3163ee);
|
|
194
|
-
_0x12b1b6["RbfAO"](_0x53aecf, -1) && _0x332f2c[_0x3a08e1(232)](_0x53aecf, 9767 + -4364 + 37 * -146);
|
|
195
|
-
}, _0x5a7266 = () => {
|
|
196
|
-
const _0x321d6d = _0x55b9;
|
|
197
|
-
_0x332f2c[_0x321d6d(173)] = -5259 + -1 * 6782 + 12041;
|
|
198
|
-
}, _0x3b4d39 = {};
|
|
199
|
-
return _0x3b4d39[_0x12c0ba(183)] = _0x4d6efc, _0x3b4d39["addListener"] = _0x2ac796, _0x3b4d39["removeListener"] = _0x31e40a, _0x3b4d39[_0x42b20c(217)] = _0x5a7266, _0x3b4d39;
|
|
200
|
-
}, setClientListener = (_0x50bf85) => {
|
|
201
|
-
const _0x1ea4c2 = _0x55b9, _0x33264e = _0x55b9, _0x5a3f06 = { "xTWlf": function(_0x360b9e) {
|
|
202
|
-
return _0x360b9e();
|
|
203
|
-
}, "eRHAO": function(_0xad3117) {
|
|
204
|
-
return _0xad3117();
|
|
205
|
-
}, "MsJpV": function(_0x84f19b) {
|
|
206
|
-
return _0x84f19b();
|
|
207
|
-
} };
|
|
208
|
-
{
|
|
209
|
-
const { handleListener: _0x384010, addListener: _0x20ff49, removeListener: _0x1a3c6b, clearListener: _0x47031d } = _0x5a3f06[_0x1ea4c2(224)](createHandleListener);
|
|
210
|
-
_0x50bf85[_0x1ea4c2(231)] = _0x384010, _0x50bf85[_0x33264e(202)] = _0x20ff49, _0x50bf85["removeResponseListener"] = _0x1a3c6b, _0x50bf85[_0x1ea4c2(250)] = _0x47031d;
|
|
211
|
-
}
|
|
212
|
-
{
|
|
213
|
-
const { handleListener: _0x28f580, addListener: _0x2f9c6f, removeListener: _0x4d8312, clearListener: _0x57f677 } = _0x5a3f06["eRHAO"](createHandleListener);
|
|
214
|
-
_0x50bf85[_0x1ea4c2(201)] = _0x28f580, _0x50bf85[_0x33264e(171)] = _0x2f9c6f, _0x50bf85[_0x1ea4c2(249)] = _0x4d8312, _0x50bf85["clearRequestListener"] = _0x57f677;
|
|
215
|
-
}
|
|
216
|
-
{
|
|
217
|
-
const { handleListener: _0x3e6477, addListener: _0x9d44d3, removeListener: _0x3a2b7a, clearListener: _0x53f161 } = _0x5a3f06[_0x1ea4c2(204)](createHandleListener);
|
|
218
|
-
_0x50bf85["fallbackNotificationHandler"] = _0x3e6477, _0x50bf85["addNotificationListener"] = _0x9d44d3, _0x50bf85[_0x1ea4c2(240)] = _0x3a2b7a, _0x50bf85[_0x33264e(187)] = _0x53f161;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
const initClientHandler = (_0x39c5d5, _0x5dfa8, { beforeInit: _0x44d014, afterInit: _0x41200d } = {}) => {
|
|
222
|
-
const _0x24d559 = _0x55b9, _0x2900da = _0x55b9, _0x223f8b = { "QLSMk": function(_0x3e2729, _0x5a15e2) {
|
|
223
|
-
return _0x3e2729 === _0x5a15e2;
|
|
224
|
-
}, "xpIcD": "ping", "EgAHi": _0x24d559(214), "qPXQI": _0x24d559(209), "ltYwb": _0x24d559(252), "hsWZi": function(_0x300d12) {
|
|
225
|
-
return _0x300d12();
|
|
226
|
-
}, "mooCL": function(_0x29bd15, _0x3327ee) {
|
|
227
|
-
return _0x29bd15(_0x3327ee);
|
|
228
|
-
}, "wEeAu": function(_0x3bdbde, _0xe82315) {
|
|
229
|
-
return _0x3bdbde === _0xe82315;
|
|
230
|
-
}, "ODqQU": function(_0x15d272) {
|
|
231
|
-
return _0x15d272();
|
|
232
|
-
} };
|
|
233
|
-
_0x39c5d5[_0x2900da(210)]["clear"](), _0x39c5d5[_0x2900da(219)][_0x2900da(233)]();
|
|
234
|
-
typeof _0x44d014 === _0x223f8b[_0x2900da(185)] && _0x223f8b[_0x2900da(229)](_0x44d014);
|
|
235
|
-
const _0x22984f = _0x39c5d5[_0x2900da(231)];
|
|
236
|
-
_0x223f8b["mooCL"](setClientListener, _0x39c5d5), _0x39c5d5[_0x24d559(202)]((_0x2d6297) => {
|
|
237
|
-
const _0x27d92d = _0x2900da;
|
|
238
|
-
_0x22984f[_0x27d92d(205)](_0x39c5d5, _0x2d6297);
|
|
239
|
-
}), _0x39c5d5[_0x2900da(171)]((_0x355e77) => {
|
|
240
|
-
const _0x2131d0 = _0x24d559, { method: _0x27087c } = _0x355e77;
|
|
241
|
-
if (_0x223f8b["QLSMk"](_0x27087c, _0x223f8b[_0x2131d0(207)])) return {};
|
|
242
|
-
}), _0x39c5d5["addNotificationListener"]((_0x2c103d) => {
|
|
243
|
-
const _0xcc40cf = _0x2900da, _0x571cef = _0x2900da, { method: _0x327acd, params: _0x45a2a8 } = _0x2c103d;
|
|
244
|
-
if (_0x223f8b["QLSMk"](_0x327acd, _0x223f8b["EgAHi"])) {
|
|
245
|
-
const _0x4168b9 = _0x39c5d5["_requestHandlerAbortControllers"]["get"](_0x45a2a8[_0xcc40cf(180)]);
|
|
246
|
-
_0x4168b9 == null ? void 0 : _0x4168b9[_0x571cef(212)](_0x45a2a8 == null ? void 0 : _0x45a2a8[_0xcc40cf(227)]);
|
|
247
|
-
} else _0x327acd === _0x223f8b[_0x571cef(191)] && _0x39c5d5[_0x571cef(221)](_0x2c103d);
|
|
248
|
-
}), _0x223f8b[_0x2900da(195)](typeof _0x41200d, _0x223f8b["ltYwb"]) && _0x223f8b["ODqQU"](_0x41200d);
|
|
249
|
-
};
|
|
250
|
-
function _0x4fe9(_0x528914, _0x529bab) {
|
|
251
|
-
const _0x5f1a75 = _0x2982();
|
|
252
|
-
return _0x4fe9 = function(_0x34fb1a, _0x1395af) {
|
|
253
|
-
_0x34fb1a = _0x34fb1a - (2871 + 2 * -871 + -5 * 188);
|
|
254
|
-
let _0x372b22 = _0x5f1a75[_0x34fb1a];
|
|
255
|
-
return _0x372b22;
|
|
256
|
-
}, _0x4fe9(_0x528914, _0x529bab);
|
|
257
|
-
}
|
|
258
|
-
function _0x2982() {
|
|
259
|
-
const _0x3e482a = ["256588RsFhNT", "40075UFkIrW", "vMvxs", "11XBODPC", "174WdaNOU", "39332zFHcSN", "392931VfserR", "159415Yjbwan", "2192TvITLB", "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx", "ciAqD", "288570LacKfs", "5887kbTLQF", "KzQHN", "randomUUID", "39BZFYBP"];
|
|
260
|
-
_0x2982 = function() {
|
|
261
|
-
return _0x3e482a;
|
|
262
|
-
};
|
|
263
|
-
return _0x2982();
|
|
264
|
-
}
|
|
265
|
-
(function(_0x34552d, _0x19c423) {
|
|
266
|
-
const _0x2ab19e = _0x4fe9, _0x1a3688 = _0x4fe9, _0xd8517a = _0x34552d();
|
|
267
|
-
while (!![]) {
|
|
268
|
-
try {
|
|
269
|
-
const _0xb6a784 = parseInt(_0x2ab19e(192)) / (113 * -41 + -7541 + 5 * 2435) + parseInt(_0x2ab19e(201)) / (-1959 + -3 * 213 + 200 * 13) + -parseInt(_0x2ab19e(200)) / (415 * 5 + 12 + 1 * -2084) * (parseInt(_0x2ab19e(190)) / (-4 * 1724 + 7469 + -1 * 569)) + parseInt(_0x1a3688(202)) / (4 * -289 + 3166 * -1 + -1 * -4327) * (parseInt(_0x2ab19e(189)) / (-770 * -7 + -3 * 466 + -3986)) + -parseInt(_0x2ab19e(197)) / (5495 + 7636 + -13124) * (parseInt(_0x1a3688(193)) / (-123 * -57 + 5 * 653 + -2 * 5134)) + -parseInt(_0x1a3688(191)) / (-5296 + -6978 + 12283) + -parseInt(_0x1a3688(196)) / (-7763 + 6511 + 1262) * (-parseInt(_0x2ab19e(204)) / (-8186 + 5545 + 2652));
|
|
270
|
-
if (_0xb6a784 === _0x19c423) break;
|
|
271
|
-
else _0xd8517a["push"](_0xd8517a["shift"]());
|
|
272
|
-
} catch (_0x549a95) {
|
|
273
|
-
_0xd8517a["push"](_0xd8517a["shift"]());
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
})(_0x2982, 186129 + -13139 * -7 + -1 * 131023);
|
|
277
|
-
const generateUUID = () => {
|
|
278
|
-
const _0x22af54 = _0x4fe9, _0x1ff92c = _0x4fe9, _0x51b139 = {};
|
|
279
|
-
_0x51b139["oucmQ"] = function(_0x10b44f, _0x3ac58f) {
|
|
280
|
-
return _0x10b44f & _0x3ac58f;
|
|
281
|
-
}, _0x51b139[_0x22af54(198)] = function(_0x3a5676, _0x32a6e8) {
|
|
282
|
-
return _0x3a5676 === _0x32a6e8;
|
|
283
|
-
}, _0x51b139[_0x1ff92c(203)] = function(_0x197a73, _0x51731e) {
|
|
284
|
-
return _0x197a73 | _0x51731e;
|
|
285
|
-
}, _0x51b139["EAaIb"] = function(_0x430a77, _0x464ac6) {
|
|
286
|
-
return _0x430a77 === _0x464ac6;
|
|
287
|
-
}, _0x51b139["ezRQk"] = "object", _0x51b139["ciAqD"] = _0x1ff92c(194);
|
|
288
|
-
const _0x5bc10b = _0x51b139;
|
|
289
|
-
if (_0x5bc10b["EAaIb"](typeof crypto, _0x5bc10b["ezRQk"]) && crypto["randomUUID"]) return crypto[_0x1ff92c(199)]();
|
|
290
|
-
return _0x5bc10b[_0x22af54(195)]["replace"](/[xy]/g, (_0x3f964b) => {
|
|
291
|
-
const _0x2475e8 = _0x1ff92c, _0x4a7751 = _0x1ff92c, _0x5b60a8 = _0x5bc10b["oucmQ"](crypto["getRandomValues"](new Uint8Array(12 * -136 + 6052 + -4419))[-7923 + 5373 + 2550], 6723 + -264 * -3 + -7500), _0x10b72f = _0x5bc10b[_0x2475e8(198)](_0x3f964b, "x") ? _0x5b60a8 : _0x5bc10b[_0x4a7751(203)](_0x5bc10b["oucmQ"](_0x5b60a8, -3678 + 4561 * 2 + -5441 * 1), 3818 + 1 * 6119 + -9929);
|
|
292
|
-
return _0x10b72f["toString"](-4564 + 1148 + 3432);
|
|
293
|
-
});
|
|
294
|
-
};
|
|
295
|
-
function _0x1ada() {
|
|
296
|
-
const _0x3b9936 = ["cjMvj", "1289472AwvewU", "nlZUx", "end", "HS256", "params", "AOxFh", "LrKhT", "Bad Request: No valid session ID provided", "status", "expiresIn", "BfVlt", "MlmaO", "16UpAJPE", "AfTzO", "close", "addNotificationListener", "SSE", "ZajdD", "connect", "error", "send", "GET, POST, DELETE", "handleStreamInspector", "capabilities", "code", "stringify", "sessionId", "handleSseProxy", "RYxnf", "referer", "prompts", "protocolVersion", "30 days", "MTOgT", "subscribe", "NhDjg", "mcp-sse-twin-client", "verify", "addRequestListener", "keys", "onclose", "completions", "KAWWw", "10zgnAKj", "1.0.0", "2.0", "user-agent", "POST", "algorithm", "client", "message", "Ttxfb", "forEach", "resources", "query", "jsonrpc", "method", "Invalid or missing session ID", "No client found for session ID ", "afterInit", "NRZGd", "No transport found", "_sessionId", "version", "authorization", "sessionIdGenerator", "Dllqo", "reset", "1306vIREIV", "write", "OTkDK", "2517pDvqFv", "json", "listChanged", "lYwoA", "3663667QEsatd", "4742523VxRpTo", "sign", "logging", "headers", "_sseResponse", "ApbUw", "AnoSh", "handlePostMessage", "Invalid bearer token", "543892hgLiqT", "resolve", "body", "remoters", "sampling", "name", "22959740kuZyXC", "jUMck", "user", "WmshC", "handleRequest", "values", "575219CKTXUD", "set"];
|
|
297
|
-
_0x1ada = function() {
|
|
298
|
-
return _0x3b9936;
|
|
299
|
-
};
|
|
300
|
-
return _0x1ada();
|
|
301
|
-
}
|
|
302
|
-
const _0x3efeea = _0x5727, _0x2c835d = _0x5727;
|
|
303
|
-
(function(_0x457393, _0x1f8588) {
|
|
304
|
-
const _0x3f3acf = _0x5727, _0xe15467 = _0x5727, _0x1c763a = _0x457393();
|
|
305
|
-
while (!![]) {
|
|
306
|
-
try {
|
|
307
|
-
const _0x3275b7 = -parseInt(_0x3f3acf(248)) / (-1732 + 453 * -5 + 3998) + -parseInt(_0x3f3acf(219)) / (-4906 + -9 * 193 + 6645) * (-parseInt(_0xe15467(222)) / (-1 * -1619 + 7586 + -1 * 9202)) + parseInt(_0xe15467(236)) / (7922 + -5038 + 48 * -60) * (-parseInt(_0x3f3acf(294)) / (766 * 13 + -2126 * -1 + -12079)) + parseInt(_0x3f3acf(251)) / (2 * -2969 + -6212 + 3 * 4052) + -parseInt(_0xe15467(226)) / (8370 + -1 * 3681 + 1 * -4682) * (parseInt(_0xe15467(263)) / (-55 * 123 + -261 * 12 + 9905 * 1)) + -parseInt(_0x3f3acf(227)) / (-970 + 2396 * -1 + 3375) + parseInt(_0xe15467(242)) / (96 * -16 + -13 * -30 + 1156);
|
|
308
|
-
if (_0x3275b7 === _0x1f8588) break;
|
|
309
|
-
else _0x1c763a["push"](_0x1c763a["shift"]());
|
|
310
|
-
} catch (_0x3845b7) {
|
|
311
|
-
_0x1c763a["push"](_0x1c763a["shift"]());
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
})(_0x1ada, 477 * -2199 + 425309 + 1261493);
|
|
315
|
-
const auth = ({ secret: _0x23b3bc }) => (_0x940268, _0xf63052, _0x5e96e7) => {
|
|
316
|
-
var _a;
|
|
317
|
-
const _0x382015 = _0x5727, _0x3af8b6 = _0x5727, _0x30b101 = {};
|
|
318
|
-
_0x30b101["jlBsK"] = _0x382015(235);
|
|
319
|
-
const _0x336750 = _0x30b101, _0x344bbd = (_a = _0x940268[_0x3af8b6(230)][_0x3af8b6(215)]) == null ? void 0 : _a["split"](" ")[-1 * 2440 + 7122 + -4681];
|
|
320
|
-
if (!_0x344bbd) {
|
|
321
|
-
_0xf63052["status"](13 * -341 + -8 * 717 + 10570)[_0x382015(271)]("Missing bearer token");
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
try {
|
|
325
|
-
_0x940268["user"] = _0x164627[_0x3af8b6(288)](_0x344bbd, _0x23b3bc), _0x5e96e7();
|
|
326
|
-
} catch (_0x5ea51d) {
|
|
327
|
-
const _0x1c28d1 = {};
|
|
328
|
-
_0x1c28d1["error"] = _0x336750["jlBsK"], _0x1c28d1["details"] = _0x5ea51d[_0x3af8b6(301)], _0xf63052[_0x3af8b6(259)](-1692 + 8520 + -1 * 6425)["json"](_0x1c28d1);
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
const _0x49c236 = {};
|
|
332
|
-
_0x49c236[_0x3efeea(260)] = _0x2c835d(283), _0x49c236[_0x3efeea(299)] = _0x3efeea(254);
|
|
333
|
-
function _0x5727(_0x2d59f3, _0x56622f) {
|
|
334
|
-
const _0x46aedc = _0x1ada();
|
|
335
|
-
return _0x5727 = function(_0x27c838, _0x280fcc) {
|
|
336
|
-
_0x27c838 = _0x27c838 - (2634 + 2 * 1915 + -6253);
|
|
337
|
-
let _0x28e78b = _0x46aedc[_0x27c838];
|
|
338
|
-
return _0x28e78b;
|
|
339
|
-
}, _0x5727(_0x2d59f3, _0x56622f);
|
|
340
|
-
}
|
|
341
|
-
const signToken = (_0x2e0eb3, _0x15c451, _0x3c25b1 = _0x49c236) => _0x164627[_0x2c835d(228)](_0x2e0eb3, _0x15c451, _0x3c25b1);
|
|
342
|
-
const verifyToken = (_0x1f4b67, _0x570f3f) => _0x164627["verify"](_0x1f4b67, _0x570f3f);
|
|
343
|
-
const getDeviceInfo = (_0x397f7e) => ({ "ip": _0x397f7e[_0x2c835d(230)]["x-forwarded-for"] || _0x397f7e["ip"] || "", "userAgent": _0x397f7e[_0x3efeea(230)][_0x3efeea(297)] || "", "acceptLanguage": _0x397f7e["headers"]["accept-language"] || "", "referer": _0x397f7e[_0x2c835d(230)][_0x3efeea(280)] || "" }), forwardProxyServer = (_0x10f307, _0x42f886) => {
|
|
344
|
-
const _0x345a7c = _0x3efeea, _0x2d78f3 = _0x3efeea, _0xaa642b = { "ZajdD": function(_0x59fd17, _0x1c9f04, _0x2daa5e) {
|
|
345
|
-
return _0x59fd17(_0x1c9f04, _0x2daa5e);
|
|
346
|
-
}, "LIgAB": function(_0xfe96e6, _0x3d2f3c) {
|
|
347
|
-
return _0xfe96e6(_0x3d2f3c);
|
|
348
|
-
} };
|
|
349
|
-
_0xaa642b["ZajdD"](forwardServerOnRequest, _0x10f307, _0x42f886), forwardServerOnNotification(_0x10f307, _0x42f886);
|
|
350
|
-
const _0x24b063 = _0xaa642b[_0x345a7c(268)](forwardClientOnRequest, _0x42f886, _0x10f307), _0x48d6fd = _0xaa642b["LIgAB"](forwardClientOnNotification, _0x10f307);
|
|
351
|
-
_0x42f886[_0x2d78f3(289)](_0x24b063), _0x42f886[_0x345a7c(266)](_0x48d6fd), _0x10f307[_0x345a7c(291)] = () => {
|
|
352
|
-
_0x42f886["removeRequestListener"](_0x24b063), _0x42f886["removeNotificationListener"](_0x48d6fd);
|
|
353
|
-
};
|
|
354
|
-
}, initTwinClientHandler = (_0x2cd74b, _0x157e33) => {
|
|
355
|
-
const _0x469137 = _0x3efeea, _0x2321b7 = { "zfMeF": "initialize", "QLdSo": "notifications/initialized", "NhDjg": "event: close\ndata: \n\n", "WpWJI": function(_0x2a8d99, _0x4c93fd) {
|
|
356
|
-
return _0x2a8d99 instanceof _0x4c93fd;
|
|
357
|
-
}, "sTgyX": function(_0x33b108, _0x2ee6d2, _0x2bf36f, _0x35ed16) {
|
|
358
|
-
return _0x33b108(_0x2ee6d2, _0x2bf36f, _0x35ed16);
|
|
359
|
-
} }, _0x8239f9 = () => {
|
|
360
|
-
const _0x2249be = _0x5727, _0x428adb = _0x5727, _0x496ae5 = {};
|
|
361
|
-
_0x496ae5[_0x2249be(224)] = !![];
|
|
362
|
-
const _0xb46e5c = {};
|
|
363
|
-
_0xb46e5c["subscribe"] = !![], _0xb46e5c["listChanged"] = !![];
|
|
364
|
-
const _0x39c242 = {};
|
|
365
|
-
_0x39c242[_0x428adb(224)] = !![];
|
|
366
|
-
const _0xfb2801 = {};
|
|
367
|
-
_0xfb2801[_0x2249be(281)] = _0x496ae5, _0xfb2801["resources"] = _0xb46e5c, _0xfb2801["tools"] = _0x39c242, _0xfb2801["completions"] = {}, _0xfb2801[_0x2249be(229)] = {};
|
|
368
|
-
const _0x3f37ba = _0xfb2801, _0xfb580c = {};
|
|
369
|
-
_0xfb580c[_0x2249be(241)] = "mcp-server", _0xfb580c[_0x2249be(214)] = _0x2249be(295), _0x2cd74b["_requestHandlers"]["set"](_0x2321b7["zfMeF"], (_0x19576b) => ({ "protocolVersion": _0x19576b[_0x2249be(255)][_0x2249be(282)], "capabilities": _0x3f37ba, "serverInfo": _0xfb580c })), _0x2cd74b["_notificationHandlers"][_0x2249be(249)](_0x2321b7["QLdSo"], () => {
|
|
370
|
-
});
|
|
371
|
-
}, _0x23f8a1 = () => {
|
|
372
|
-
const _0x4185cf = _0x5727, _0x2e3277 = _0x5727, _0x35ac0e = {};
|
|
373
|
-
_0x35ac0e["NuYKs"] = _0x2321b7[_0x4185cf(286)];
|
|
374
|
-
const _0x4a5343 = _0x35ac0e;
|
|
375
|
-
_0x2321b7["WpWJI"](_0x157e33, SSEServerTransport) && (_0x157e33[_0x2e3277(265)] = () => {
|
|
376
|
-
var _a, _b;
|
|
377
|
-
const _0x1b37f7 = _0x4185cf, _0x5e7971 = _0x4185cf;
|
|
378
|
-
return (_a = _0x157e33[_0x1b37f7(231)]) == null ? void 0 : _a[_0x1b37f7(220)](_0x4a5343["NuYKs"])[_0x1b37f7(253)](), _0x157e33["_sseResponse"] = void 0, (_b = _0x157e33[_0x1b37f7(291)]) == null ? void 0 : _b.call(_0x157e33), Promise[_0x5e7971(237)]();
|
|
379
|
-
});
|
|
380
|
-
}, _0x2ec237 = {};
|
|
381
|
-
_0x2ec237["beforeInit"] = _0x8239f9, _0x2ec237[_0x469137(310)] = _0x23f8a1, _0x2321b7["sTgyX"](initClientHandler, _0x2cd74b, _0x157e33, _0x2ec237);
|
|
382
|
-
};
|
|
383
|
-
const useProxyHandles = () => {
|
|
384
|
-
const _0x10ed51 = _0x2c835d, _0x2c8df3 = _0x3efeea, _0x27ae80 = { "zVhNX": "sse-session-id", "BGPIV": "close", "MTOgT": _0x10ed51(287), "MlmaO": _0x10ed51(295), "xHIEo": function(_0x4084ef, _0x1f9f19, _0x42cb1c) {
|
|
385
|
-
return _0x4084ef(_0x1f9f19, _0x42cb1c);
|
|
386
|
-
}, "cjMvj": "mcp-sse-proxy-server", "NRZGd": function(_0x2c7593, _0x294531) {
|
|
387
|
-
return _0x2c7593(_0x294531);
|
|
388
|
-
}, "LrKhT": function(_0x347032, _0x5a7c80, _0x41130a) {
|
|
389
|
-
return _0x347032(_0x5a7c80, _0x41130a);
|
|
390
|
-
}, "YyBSS": _0x10ed51(212), "AnoSh": function(_0xf584ff, _0x1d2e0e) {
|
|
391
|
-
return _0xf584ff === _0x1d2e0e;
|
|
392
|
-
}, "mdBiE": function(_0xae3442, _0x59cbff, _0x14fb8c) {
|
|
393
|
-
return _0xae3442(_0x59cbff, _0x14fb8c);
|
|
394
|
-
}, "nlZUx": "GET", "lYwoA": function(_0x9eb538, _0x1801ce) {
|
|
395
|
-
return _0x9eb538 === _0x1801ce;
|
|
396
|
-
}, "KAWWw": "DELETE", "jUMck": function(_0x2b9e3c, _0x8d6bb1, _0x6dfa2c) {
|
|
397
|
-
return _0x2b9e3c(_0x8d6bb1, _0x6dfa2c);
|
|
398
|
-
}, "ApbUw": _0x2c8df3(272), "OROrH": _0x2c8df3(296), "vpkus": "Method not allowed.", "Ttxfb": "mcp-session-id", "AOxFh": _0x2c8df3(308), "BfVlt": "stream-session-id", "nBVZs": "mcp-stream-twin-client", "AfTzO": function(_0x220a64, _0x15587f) {
|
|
399
|
-
return _0x220a64(_0x15587f);
|
|
400
|
-
}, "Dllqo": function(_0x5431e9, _0x30a0cf) {
|
|
401
|
-
return _0x5431e9 === _0x30a0cf;
|
|
402
|
-
}, "RYxnf": _0x10ed51(298), "VPByF": function(_0x669ede, _0x3d14ee, _0xad9806) {
|
|
403
|
-
return _0x669ede(_0x3d14ee, _0xad9806);
|
|
404
|
-
}, "WmshC": function(_0x2c0fae, _0x2f21cf) {
|
|
405
|
-
return _0x2c0fae === _0x2f21cf;
|
|
406
|
-
}, "OTkDK": function(_0x5c5a30) {
|
|
407
|
-
return _0x5c5a30();
|
|
408
|
-
}, "jVcqg": "mcp-stream-proxy-server", "ZydXC": "StreamableHTTP", "jdfdF": function(_0x5f3ba4, _0x5b88a2, _0x5a25d1) {
|
|
409
|
-
return _0x5f3ba4(_0x5b88a2, _0x5a25d1);
|
|
410
|
-
} }, _0xac406f = {}, _0x26f6c8 = {}, _0x5c96cf = {}, _0x439b01 = {}, _0x5ae4e6 = async (_0x3a373f, _0x330211, _0x295b26) => {
|
|
411
|
-
const _0x271be5 = _0x10ed51, _0x4f80a3 = _0x2c8df3, _0x4d7a6d = new SSEServerTransport(_0x295b26, _0x330211), _0x38a720 = _0x3a373f["headers"][_0x27ae80["zVhNX"]];
|
|
412
|
-
_0x38a720 && (_0x4d7a6d[_0x271be5(213)] = _0x38a720);
|
|
413
|
-
const _0x3b6ae3 = _0x4d7a6d[_0x271be5(277)];
|
|
414
|
-
_0xac406f[_0x3b6ae3] = _0x4d7a6d, _0x3a373f["on"](_0x27ae80["BGPIV"], () => {
|
|
415
|
-
const _0x1c7d78 = _0x4f80a3;
|
|
416
|
-
_0x4d7a6d[_0x1c7d78(265)](), delete _0xac406f[_0x3b6ae3], delete _0x26f6c8[_0x3b6ae3];
|
|
417
|
-
});
|
|
418
|
-
const _0x31fa17 = {};
|
|
419
|
-
_0x31fa17[_0x271be5(224)] = !![];
|
|
420
|
-
const _0x5001b3 = {};
|
|
421
|
-
_0x5001b3["subscribe"] = !![], _0x5001b3["listChanged"] = !![];
|
|
422
|
-
const _0x208ad3 = {};
|
|
423
|
-
_0x208ad3["listChanged"] = !![];
|
|
424
|
-
const _0x2d920b = {};
|
|
425
|
-
_0x2d920b["listChanged"] = !![];
|
|
426
|
-
const _0x4b500e = {};
|
|
427
|
-
_0x4b500e[_0x271be5(281)] = _0x31fa17, _0x4b500e[_0x4f80a3(304)] = _0x5001b3, _0x4b500e["tools"] = _0x208ad3, _0x4b500e["completions"] = {}, _0x4b500e[_0x271be5(229)] = {}, _0x4b500e["roots"] = _0x2d920b, _0x4b500e[_0x4f80a3(240)] = {};
|
|
428
|
-
const _0x56a7ac = _0x4b500e, _0x13061e = {};
|
|
429
|
-
_0x13061e["name"] = _0x27ae80[_0x4f80a3(284)], _0x13061e[_0x4f80a3(214)] = _0x27ae80[_0x271be5(262)];
|
|
430
|
-
const _0x4626e7 = {};
|
|
431
|
-
_0x4626e7[_0x271be5(274)] = _0x56a7ac;
|
|
432
|
-
const _0x582105 = new Client(_0x13061e, _0x4626e7);
|
|
433
|
-
_0x26f6c8[_0x3b6ae3] = { "client": _0x582105, "transport": _0x4d7a6d, "user": _0x3a373f[_0x4f80a3(244)], "device": getDeviceInfo(_0x3a373f), "type": "SSE" }, _0x27ae80["xHIEo"](initTwinClientHandler, _0x582105, _0x4d7a6d), await _0x582105["connect"](_0x4d7a6d);
|
|
434
|
-
}, _0x8d2fb6 = async (_0x280409, _0x21b369, _0x1b4709) => {
|
|
435
|
-
var _a;
|
|
436
|
-
const _0x8f4f4 = _0x2c8df3, _0x53e981 = _0x10ed51, _0x237e4a = _0x280409[_0x8f4f4(305)][_0x8f4f4(277)], _0x53707a = (_a = _0x26f6c8[_0x237e4a]) == null ? void 0 : _a[_0x53e981(300)];
|
|
437
|
-
if (!_0x53707a) {
|
|
438
|
-
_0x21b369[_0x8f4f4(259)](-961 * 1 + 8825 + -7464)[_0x53e981(271)](_0x53e981(309) + _0x237e4a);
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
const _0x2c401b = new SSEServerTransport(_0x1b4709, _0x21b369), _0x5d785a = _0x2c401b[_0x8f4f4(277)];
|
|
442
|
-
_0x5c96cf[_0x5d785a] = _0x2c401b, _0x280409["on"]("close", () => {
|
|
443
|
-
_0x2c401b["close"](), delete _0x5c96cf[_0x5d785a], delete _0x439b01[_0x5d785a];
|
|
444
|
-
});
|
|
445
|
-
const _0x4631f6 = {};
|
|
446
|
-
_0x4631f6[_0x53e981(224)] = !![];
|
|
447
|
-
const _0x396fdf = {};
|
|
448
|
-
_0x396fdf[_0x8f4f4(285)] = !![], _0x396fdf["listChanged"] = !![];
|
|
449
|
-
const _0x22304b = {};
|
|
450
|
-
_0x22304b[_0x53e981(224)] = !![];
|
|
451
|
-
const _0x28b4cf = {};
|
|
452
|
-
_0x28b4cf[_0x8f4f4(281)] = _0x4631f6, _0x28b4cf["resources"] = _0x396fdf, _0x28b4cf["tools"] = _0x22304b, _0x28b4cf["completions"] = {}, _0x28b4cf[_0x8f4f4(229)] = {};
|
|
453
|
-
const _0x51b49c = _0x28b4cf, _0x26ece1 = {};
|
|
454
|
-
_0x26ece1["name"] = _0x27ae80[_0x53e981(250)], _0x26ece1[_0x53e981(214)] = _0x27ae80["MlmaO"];
|
|
455
|
-
const _0x4e72fd = {};
|
|
456
|
-
_0x4e72fd["capabilities"] = _0x51b49c;
|
|
457
|
-
const _0x13db1e = new McpServer(_0x26ece1, _0x4e72fd);
|
|
458
|
-
_0x439b01[_0x5d785a] = { "mcpServer": _0x13db1e, "transport": _0x2c401b, "client": _0x237e4a, "user": _0x280409[_0x53e981(244)], "device": _0x27ae80["NRZGd"](getDeviceInfo, _0x280409), "type": _0x8f4f4(267) }, await _0x13db1e["connect"](_0x2c401b), _0x27ae80[_0x8f4f4(257)](forwardProxyServer, _0x13db1e["server"], _0x53707a);
|
|
459
|
-
}, _0x1e7708 = async (_0x4367c9, _0x3a2873) => {
|
|
460
|
-
const _0x3b9e33 = _0x10ed51, _0x514984 = _0x4367c9["query"][_0x3b9e33(277)], _0x4273c7 = _0xac406f[_0x514984] || _0x5c96cf[_0x514984];
|
|
461
|
-
_0x4273c7 ? await _0x4273c7[_0x3b9e33(234)](_0x4367c9, _0x3a2873) : _0x3a2873["status"](-278 * 1 + -2518 * -1 + -40 * 46)["send"](_0x27ae80["YyBSS"]);
|
|
462
|
-
}, _0x47bd50 = async (_0x59f307, _0x5d1cdd) => {
|
|
463
|
-
const _0x14a9e9 = _0x10ed51, _0x3a03d2 = _0x10ed51;
|
|
464
|
-
if (_0x27ae80["AnoSh"](_0x59f307[_0x14a9e9(307)], _0x14a9e9(298))) await _0x27ae80["mdBiE"](_0x2d9b97, _0x59f307, _0x5d1cdd);
|
|
465
|
-
else _0x27ae80["AnoSh"](_0x59f307[_0x3a03d2(307)], _0x27ae80[_0x14a9e9(252)]) || _0x27ae80[_0x14a9e9(225)](_0x59f307["method"], _0x27ae80["KAWWw"]) ? await _0x27ae80["jUMck"](_0xc127e6, _0x59f307, _0x5d1cdd) : await _0x27ae80["NRZGd"](_0x24b013, _0x5d1cdd);
|
|
466
|
-
}, _0x24b013 = async (_0x225e8b) => {
|
|
467
|
-
const _0x22c98f = _0x2c8df3, _0x3b1bca = _0x2c8df3, _0x23adaf = {};
|
|
468
|
-
_0x23adaf["Allow"] = _0x27ae80[_0x22c98f(232)];
|
|
469
|
-
const _0xf34ff1 = {};
|
|
470
|
-
_0xf34ff1["jsonrpc"] = _0x27ae80["OROrH"], _0xf34ff1[_0x3b1bca(270)] = {}, _0xf34ff1["id"] = null, _0xf34ff1[_0x3b1bca(270)]["code"] = -32e3, _0xf34ff1[_0x3b1bca(270)]["message"] = _0x27ae80["vpkus"], _0x225e8b["writeHead"](-922 * -6 + -9959 + 4832, _0x23adaf)["end"](JSON[_0x3b1bca(276)](_0xf34ff1));
|
|
471
|
-
}, _0xc127e6 = async (_0x2e5a96, _0x58719e) => {
|
|
472
|
-
const _0x1d3d1a = _0x10ed51, _0x431f88 = _0x2c8df3, _0x4788ad = _0x2e5a96["headers"][_0x27ae80[_0x1d3d1a(302)]], _0x25827e = _0xac406f[_0x4788ad];
|
|
473
|
-
_0x25827e ? (await _0x25827e[_0x431f88(246)](_0x2e5a96, _0x58719e), _0x27ae80[_0x431f88(225)](_0x2e5a96["method"], _0x27ae80[_0x1d3d1a(293)]) && (delete _0xac406f[_0x4788ad], delete _0x26f6c8[_0x4788ad])) : _0x58719e["status"](-847 * -1 + -99 * 6 + 147)[_0x431f88(271)](_0x27ae80[_0x1d3d1a(256)]);
|
|
474
|
-
}, _0x2d9b97 = async (_0x591974, _0x3fadaa) => {
|
|
475
|
-
const _0x3206b1 = _0x10ed51, _0x480c5e = _0x2c8df3, _0x4841ce = _0x591974[_0x3206b1(230)][_0x27ae80["Ttxfb"]], _0x35c693 = _0x591974["headers"][_0x27ae80[_0x480c5e(261)]];
|
|
476
|
-
let _0x237403 = _0xac406f[_0x4841ce];
|
|
477
|
-
if (_0x237403) await _0x237403["handleRequest"](_0x591974, _0x3fadaa, _0x591974["body"]);
|
|
478
|
-
else {
|
|
479
|
-
if (!_0x4841ce && _0x27ae80[_0x3206b1(211)](isInitializeRequest, _0x591974["body"])) {
|
|
480
|
-
const _0xa3a504 = {};
|
|
481
|
-
_0xa3a504["sessionIdGenerator"] = () => _0x35c693, _0x237403 = new StreamableHTTPServerTransport(_0xa3a504);
|
|
482
|
-
const _0x997047 = {};
|
|
483
|
-
_0x997047["listChanged"] = !![];
|
|
484
|
-
const _0x524b44 = {};
|
|
485
|
-
_0x524b44[_0x480c5e(285)] = !![], _0x524b44[_0x480c5e(224)] = !![];
|
|
486
|
-
const _0x4d5035 = {};
|
|
487
|
-
_0x4d5035["listChanged"] = !![];
|
|
488
|
-
const _0x2b2cc3 = {};
|
|
489
|
-
_0x2b2cc3[_0x480c5e(224)] = !![];
|
|
490
|
-
const _0x3563eb = {};
|
|
491
|
-
_0x3563eb["prompts"] = _0x997047, _0x3563eb[_0x480c5e(304)] = _0x524b44, _0x3563eb["tools"] = _0x4d5035, _0x3563eb[_0x3206b1(292)] = {}, _0x3563eb[_0x3206b1(229)] = {}, _0x3563eb["roots"] = _0x2b2cc3, _0x3563eb[_0x480c5e(240)] = {};
|
|
492
|
-
const _0x1ce703 = _0x3563eb, _0xd2c912 = {};
|
|
493
|
-
_0xd2c912["name"] = _0x27ae80["nBVZs"], _0xd2c912["version"] = _0x27ae80[_0x480c5e(262)];
|
|
494
|
-
const _0x192f3 = {};
|
|
495
|
-
_0x192f3[_0x3206b1(274)] = _0x1ce703;
|
|
496
|
-
const _0x40559c = new Client(_0xd2c912, _0x192f3);
|
|
497
|
-
_0x27ae80[_0x3206b1(257)](initTwinClientHandler, _0x40559c, _0x237403), _0x26f6c8[_0x35c693] = { "client": _0x40559c, "transport": _0x237403, "user": _0x591974[_0x480c5e(244)], "device": _0x27ae80[_0x3206b1(264)](getDeviceInfo, _0x591974), "type": "StreamableHTTP" }, _0xac406f[_0x35c693] = _0x237403, _0x237403[_0x480c5e(277)] = _0x35c693, await _0x40559c[_0x480c5e(269)](_0x237403), await _0x237403["handleRequest"](_0x591974, _0x3fadaa, _0x591974[_0x3206b1(238)]);
|
|
498
|
-
} else {
|
|
499
|
-
const _0x1f8bf6 = {};
|
|
500
|
-
_0x1f8bf6[_0x3206b1(275)] = -32e3, _0x1f8bf6["message"] = "Bad Request: No valid session ID provided";
|
|
501
|
-
const _0x209c4f = {};
|
|
502
|
-
_0x209c4f[_0x480c5e(306)] = _0x480c5e(296), _0x209c4f["error"] = _0x1f8bf6, _0x209c4f["id"] = null, _0x3fadaa[_0x3206b1(259)](1292 + 79 * 9 + 1603 * -1)[_0x3206b1(223)](_0x209c4f);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}, _0x1ff718 = async (_0xb40392, _0x50eef5) => {
|
|
506
|
-
const _0x163c94 = _0x10ed51, _0x2e01e8 = _0x10ed51;
|
|
507
|
-
if (_0x27ae80[_0x163c94(217)](_0xb40392[_0x2e01e8(307)], _0x27ae80[_0x163c94(279)])) await _0x27ae80["VPByF"](_0x271ac2, _0xb40392, _0x50eef5);
|
|
508
|
-
else _0xb40392[_0x163c94(307)] === _0x27ae80["nlZUx"] || _0x27ae80[_0x2e01e8(245)](_0xb40392[_0x2e01e8(307)], _0x27ae80[_0x163c94(293)]) ? await _0x27ae80[_0x163c94(243)](_0x223ac0, _0xb40392, _0x50eef5) : await _0x27ae80[_0x163c94(264)](_0x24b013, _0x50eef5);
|
|
509
|
-
}, _0x223ac0 = async (_0x5872dd, _0x42fcc7) => {
|
|
510
|
-
const _0x3061c3 = _0x10ed51, _0x573299 = _0x2c8df3, _0x5f1ad5 = _0x5872dd[_0x3061c3(230)]["mcp-session-id"], _0x5bacd2 = _0x5c96cf[_0x5f1ad5];
|
|
511
|
-
_0x5bacd2 ? (await _0x5bacd2[_0x3061c3(246)](_0x5872dd, _0x42fcc7), _0x27ae80[_0x3061c3(233)](_0x5872dd["method"], _0x27ae80[_0x573299(293)]) && (delete _0x5c96cf[_0x5f1ad5], delete _0x439b01[_0x5f1ad5])) : _0x42fcc7[_0x573299(259)](-9524 + -8556 + 18480)["send"](_0x27ae80[_0x573299(256)]);
|
|
512
|
-
}, _0x271ac2 = async (_0x3fa36c, _0x2ac443) => {
|
|
513
|
-
var _a;
|
|
514
|
-
const _0x979548 = _0x2c8df3, _0x569953 = _0x10ed51, _0x3c7155 = _0x3fa36c[_0x979548(230)][_0x27ae80["Ttxfb"]], _0x20d991 = _0x3fa36c[_0x569953(305)]["sessionId"];
|
|
515
|
-
let _0x20d75e = _0x5c96cf[_0x3c7155];
|
|
516
|
-
if (_0x20d75e) await _0x20d75e["handleRequest"](_0x3fa36c, _0x2ac443, _0x3fa36c["body"]);
|
|
517
|
-
else {
|
|
518
|
-
if (!_0x3c7155 && _0x27ae80["NRZGd"](isInitializeRequest, _0x3fa36c[_0x569953(238)])) {
|
|
519
|
-
const _0x294415 = (_a = _0x26f6c8[_0x20d991]) == null ? void 0 : _a["client"];
|
|
520
|
-
if (!_0x294415) {
|
|
521
|
-
_0x2ac443["status"](-7167 * -1 + -2607 + -5 * 832)[_0x569953(271)](_0x569953(309) + _0x20d991);
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
const _0x50b49a = _0x27ae80[_0x569953(221)](generateUUID), _0x3f616e = {};
|
|
525
|
-
_0x3f616e[_0x569953(216)] = () => _0x50b49a, _0x20d75e = new StreamableHTTPServerTransport(_0x3f616e);
|
|
526
|
-
const _0x42665d = {};
|
|
527
|
-
_0x42665d[_0x569953(224)] = !![];
|
|
528
|
-
const _0x426993 = {};
|
|
529
|
-
_0x426993["subscribe"] = !![], _0x426993["listChanged"] = !![];
|
|
530
|
-
const _0x54d53c = {};
|
|
531
|
-
_0x54d53c[_0x569953(224)] = !![];
|
|
532
|
-
const _0x39a81a = {};
|
|
533
|
-
_0x39a81a[_0x569953(281)] = _0x42665d, _0x39a81a[_0x979548(304)] = _0x426993, _0x39a81a["tools"] = _0x54d53c, _0x39a81a[_0x569953(292)] = {}, _0x39a81a["logging"] = {};
|
|
534
|
-
const _0x5f45d0 = _0x39a81a, _0x1be9c4 = {};
|
|
535
|
-
_0x1be9c4[_0x979548(241)] = _0x27ae80["jVcqg"], _0x1be9c4[_0x979548(214)] = _0x569953(295);
|
|
536
|
-
const _0x4a076b = {};
|
|
537
|
-
_0x4a076b["capabilities"] = _0x5f45d0;
|
|
538
|
-
const _0x3952a6 = new McpServer(_0x1be9c4, _0x4a076b);
|
|
539
|
-
_0x439b01[_0x50b49a] = { "mcpServer": _0x3952a6, "transport": _0x20d75e, "client": _0x20d991, "user": _0x3fa36c["user"], "device": _0x27ae80[_0x569953(264)](getDeviceInfo, _0x3fa36c), "type": _0x27ae80["ZydXC"] }, _0x5c96cf[_0x50b49a] = _0x20d75e, _0x20d75e["sessionId"] = _0x50b49a, await _0x3952a6[_0x569953(269)](_0x20d75e), _0x27ae80["jdfdF"](forwardProxyServer, _0x3952a6["server"], _0x294415), await _0x20d75e[_0x979548(246)](_0x3fa36c, _0x2ac443, _0x3fa36c[_0x569953(238)]);
|
|
540
|
-
} else {
|
|
541
|
-
const _0xdebaa6 = {};
|
|
542
|
-
_0xdebaa6[_0x569953(275)] = -32e3, _0xdebaa6[_0x569953(301)] = _0x979548(258);
|
|
543
|
-
const _0x26b01c = {};
|
|
544
|
-
_0x26b01c["jsonrpc"] = _0x979548(296), _0x26b01c["error"] = _0xdebaa6, _0x26b01c["id"] = null, _0x2ac443[_0x569953(259)](43 * 12 + -9751 + 9635)["json"](_0x26b01c);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}, _0x29a70d = () => {
|
|
548
|
-
const _0x4d603b = _0x10ed51, _0x26bbc5 = _0x2c8df3;
|
|
549
|
-
try {
|
|
550
|
-
Object[_0x4d603b(247)](_0xac406f)[_0x26bbc5(303)]((_0x22241c) => _0x22241c[_0x26bbc5(265)]()), Object[_0x4d603b(247)](_0x5c96cf)[_0x4d603b(303)]((_0xf4a269) => _0xf4a269[_0x4d603b(265)]()), Object["values"](_0x26f6c8)["forEach"]((_0x3add1e) => _0x3add1e[_0x26bbc5(300)][_0x26bbc5(265)]()), Object[_0x26bbc5(247)](_0x439b01)["forEach"]((_0x25fdae) => _0x25fdae["mcpServer"][_0x26bbc5(265)]());
|
|
551
|
-
} catch {
|
|
552
|
-
}
|
|
553
|
-
try {
|
|
554
|
-
Object[_0x26bbc5(290)](_0xac406f)[_0x26bbc5(303)]((_0x9636f1) => delete _0xac406f[_0x9636f1]), Object[_0x26bbc5(290)](_0x5c96cf)["forEach"]((_0x1c1831) => delete _0x5c96cf[_0x1c1831]), Object["keys"](_0x26f6c8)[_0x4d603b(303)]((_0x5de56f) => delete _0x26f6c8[_0x5de56f]), Object["keys"](_0x439b01)[_0x26bbc5(303)]((_0x463f79) => delete _0x439b01[_0x463f79]);
|
|
555
|
-
} catch {
|
|
556
|
-
}
|
|
557
|
-
}, _0x5e7398 = {};
|
|
558
|
-
return _0x5e7398[_0x10ed51(278)] = _0x5ae4e6, _0x5e7398["handleSseInspector"] = _0x8d2fb6, _0x5e7398["handleSseMessage"] = _0x1e7708, _0x5e7398["handleStreamRequest"] = _0x47bd50, _0x5e7398[_0x2c8df3(273)] = _0x1ff718, _0x5e7398["clients"] = _0x26f6c8, _0x5e7398[_0x2c8df3(239)] = _0x439b01, _0x5e7398[_0x10ed51(218)] = _0x29a70d, _0x5e7398;
|
|
559
|
-
};
|
|
560
|
-
export {
|
|
561
|
-
auth,
|
|
562
|
-
signToken,
|
|
563
|
-
useProxyHandles,
|
|
564
|
-
verifyToken
|
|
565
|
-
};
|