@opentiny/agent 0.3.0 → 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/index.js +740 -739
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,952 +1,953 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _0xb6e97a from "jsonwebtoken";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
4
|
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
5
5
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
6
6
|
import { EmptyResultSchema, ElicitResultSchema, CreateMessageResultSchema, ListRootsResultSchema, isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import _0x3ff0bd from "cors";
|
|
8
|
+
import _0x3b4ea9 from "express";
|
|
9
9
|
import { getOAuthProtectedResourceMetadataUrl, createOAuthMetadata, mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
|
10
10
|
import { checkResourceAllowed } from "@modelcontextprotocol/sdk/shared/auth-utils.js";
|
|
11
11
|
import { requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js";
|
|
12
12
|
import { allowedMethods } from "@modelcontextprotocol/sdk/server/auth/middleware/allowedMethods.js";
|
|
13
13
|
import { InvalidGrantError, InvalidTokenError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
|
|
14
|
-
|
|
15
|
-
const
|
|
14
|
+
function _0x47e3(_0x5f4b98, _0x5afdf9) {
|
|
15
|
+
const _0x40e224 = _0xd45d();
|
|
16
|
+
return _0x47e3 = function(_0x104d66, _0x4576ae) {
|
|
17
|
+
_0x104d66 = _0x104d66 - (9648 + -43 * -2 + -9426);
|
|
18
|
+
let _0x15d074 = _0x40e224[_0x104d66];
|
|
19
|
+
return _0x15d074;
|
|
20
|
+
}, _0x47e3(_0x5f4b98, _0x5afdf9);
|
|
21
|
+
}
|
|
22
|
+
(function(_0x2766de, _0x4745f6) {
|
|
23
|
+
const _0x4d4689 = _0x47e3, _0x27c1f6 = _0x47e3, _0x408001 = _0x2766de();
|
|
16
24
|
while (!![]) {
|
|
17
25
|
try {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
else
|
|
21
|
-
} catch (
|
|
22
|
-
|
|
26
|
+
const _0x4f0545 = -parseInt(_0x4d4689(316)) / (8404 + 121 * 74 + -17357) * (-parseInt(_0x4d4689(387)) / (5914 + 4737 + -10649 * 1)) + parseInt(_0x27c1f6(360)) / (2916 + 17 * 36 + -3525) + -parseInt(_0x27c1f6(358)) / (2 * -4429 + 6245 + -2617 * -1) + parseInt(_0x27c1f6(382)) / (-107 * -61 + 3943 + 35 * -299) * (-parseInt(_0x27c1f6(318)) / (53 * -17 + 643 * 11 + -1 * 6166)) + parseInt(_0x27c1f6(385)) / (-2273 + 2936 + -1 * 656) * (parseInt(_0x27c1f6(323)) / (-7 * -229 + -1 * 9799 + 8204)) + parseInt(_0x27c1f6(335)) / (1974 + -1 * -4231 + -6196) * (parseInt(_0x27c1f6(339)) / (835 * 5 + 1 * 7916 + -12081)) + -parseInt(_0x4d4689(343)) / (-1 * -5729 + -1 * 7025 + 1307);
|
|
27
|
+
if (_0x4f0545 === _0x4745f6) break;
|
|
28
|
+
else _0x408001["push"](_0x408001["shift"]());
|
|
29
|
+
} catch (_0x231e11) {
|
|
30
|
+
_0x408001["push"](_0x408001["shift"]());
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
|
-
})(
|
|
26
|
-
const forwardServerRequest = async (
|
|
33
|
+
})(_0xd45d, 193871 * 1 + -232149 + 605619);
|
|
34
|
+
const forwardServerRequest = async (_0x359b10, _0x5f18c3, _0xe94488) => {
|
|
27
35
|
var _a;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
let
|
|
32
|
-
switch (
|
|
33
|
-
case
|
|
34
|
-
|
|
36
|
+
const _0x1decbb = _0x47e3, _0x289131 = _0x47e3, _0xccc460 = {};
|
|
37
|
+
_0xccc460["OhNxi"] = _0x1decbb(377), _0xccc460["ZijeN"] = _0x1decbb(350), _0xccc460[_0x1decbb(375)] = "resources/templates/list", _0xccc460["cqBHj"] = "resources/read", _0xccc460[_0x1decbb(381)] = "resources/subscribe", _0xccc460[_0x1decbb(334)] = _0x1decbb(370), _0xccc460[_0x1decbb(365)] = "prompts/list", _0xccc460["PipzT"] = "ping", _0xccc460["DWWZD"] = _0x289131(366), _0xccc460["bMZEp"] = "logging/setLevel";
|
|
38
|
+
const _0x483b74 = _0xccc460, { id: _0x5e5ddf, method: _0x28ec6f, params: _0x40a0f1 } = _0xe94488;
|
|
39
|
+
let _0x5820d0 = {};
|
|
40
|
+
switch (_0x28ec6f) {
|
|
41
|
+
case _0x483b74["OhNxi"]:
|
|
42
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(344)](_0x40a0f1);
|
|
35
43
|
break;
|
|
36
|
-
case
|
|
37
|
-
|
|
44
|
+
case _0x483b74[_0x289131(310)]:
|
|
45
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(329)](_0x40a0f1);
|
|
38
46
|
break;
|
|
39
|
-
case
|
|
40
|
-
|
|
47
|
+
case "resources/list":
|
|
48
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(357)](_0x40a0f1);
|
|
41
49
|
break;
|
|
42
|
-
case
|
|
43
|
-
|
|
50
|
+
case _0x483b74["yLRdW"]:
|
|
51
|
+
_0x5820d0 = await _0x5f18c3["listResourceTemplates"](_0x40a0f1);
|
|
44
52
|
break;
|
|
45
|
-
case
|
|
46
|
-
|
|
53
|
+
case _0x483b74[_0x1decbb(378)]:
|
|
54
|
+
_0x5820d0 = await _0x5f18c3["readResource"](_0x40a0f1);
|
|
47
55
|
break;
|
|
48
|
-
case
|
|
49
|
-
|
|
56
|
+
case _0x483b74["zxSfQ"]:
|
|
57
|
+
_0x5820d0 = await _0x5f18c3["subscribeResource"](_0x40a0f1);
|
|
50
58
|
break;
|
|
51
|
-
case
|
|
52
|
-
|
|
59
|
+
case _0x289131(326):
|
|
60
|
+
_0x5820d0 = await _0x5f18c3[_0x289131(346)](_0x40a0f1);
|
|
53
61
|
break;
|
|
54
|
-
case
|
|
55
|
-
|
|
62
|
+
case _0x483b74[_0x289131(334)]:
|
|
63
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(348)](_0x40a0f1);
|
|
56
64
|
break;
|
|
57
|
-
case
|
|
58
|
-
|
|
65
|
+
case _0x483b74["qLMuk"]:
|
|
66
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(362)](_0x40a0f1);
|
|
59
67
|
break;
|
|
60
|
-
case
|
|
61
|
-
|
|
68
|
+
case _0x483b74[_0x289131(352)]:
|
|
69
|
+
_0x5820d0 = await _0x5f18c3[_0x289131(351)]();
|
|
62
70
|
break;
|
|
63
|
-
case
|
|
64
|
-
|
|
71
|
+
case _0x483b74[_0x1decbb(314)]:
|
|
72
|
+
_0x5820d0 = await _0x5f18c3[_0x1decbb(359)](_0x40a0f1);
|
|
65
73
|
break;
|
|
66
|
-
case
|
|
67
|
-
|
|
74
|
+
case _0x483b74["bMZEp"]:
|
|
75
|
+
_0x5820d0 = await _0x5f18c3["setLoggingLevel"](_0x40a0f1 == null ? void 0 : _0x40a0f1[_0x1decbb(356)]);
|
|
68
76
|
break;
|
|
69
77
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
}, forwardClientRequest = async (
|
|
78
|
+
const _0x5529c8 = {};
|
|
79
|
+
_0x5529c8[_0x1decbb(327)] = _0x5820d0, _0x5529c8["jsonrpc"] = _0x1decbb(373), _0x5529c8["id"] = _0x5e5ddf, await ((_a = _0x359b10 == null ? void 0 : _0x359b10[_0x289131(337)]) == null ? void 0 : _a["send"](_0x5529c8));
|
|
80
|
+
}, forwardClientRequest = async (_0x251088, _0x3d1e13, _0x3924fd) => {
|
|
73
81
|
var _a;
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
switch (
|
|
79
|
-
case
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
+
const _0x567dc4 = _0x47e3, _0x280111 = _0x47e3, _0x142a45 = {};
|
|
83
|
+
_0x142a45["xDwgD"] = _0x567dc4(379), _0x142a45[_0x280111(331)] = _0x567dc4(351), _0x142a45[_0x280111(333)] = _0x567dc4(373);
|
|
84
|
+
const _0x5c974c = _0x142a45, { id: _0x21e6c5, method: _0x208b31, params: _0x4c98b6 } = _0x3924fd;
|
|
85
|
+
let _0x2cef6f = {};
|
|
86
|
+
switch (_0x208b31) {
|
|
87
|
+
case _0x567dc4(341):
|
|
88
|
+
const _0x2148b9 = {};
|
|
89
|
+
_0x2148b9[_0x280111(330)] = _0x208b31, _0x2148b9[_0x567dc4(372)] = _0x4c98b6, _0x2cef6f = await _0x3d1e13["request"](_0x2148b9, ListRootsResultSchema);
|
|
82
90
|
break;
|
|
83
|
-
case
|
|
84
|
-
const
|
|
85
|
-
|
|
91
|
+
case _0x280111(367):
|
|
92
|
+
const _0x30eedf = {};
|
|
93
|
+
_0x30eedf["method"] = _0x208b31, _0x30eedf["params"] = _0x4c98b6, _0x2cef6f = await _0x3d1e13[_0x567dc4(336)](_0x30eedf, CreateMessageResultSchema);
|
|
86
94
|
break;
|
|
87
|
-
case
|
|
88
|
-
const
|
|
89
|
-
|
|
95
|
+
case _0x5c974c["xDwgD"]:
|
|
96
|
+
const _0x5e0254 = {};
|
|
97
|
+
_0x5e0254[_0x567dc4(330)] = _0x208b31, _0x5e0254[_0x567dc4(372)] = _0x4c98b6, _0x2cef6f = await _0x3d1e13["request"](_0x5e0254, ElicitResultSchema);
|
|
90
98
|
break;
|
|
91
|
-
case
|
|
92
|
-
const
|
|
93
|
-
|
|
99
|
+
case _0x5c974c[_0x567dc4(331)]:
|
|
100
|
+
const _0x5b3819 = {};
|
|
101
|
+
_0x5b3819[_0x567dc4(330)] = _0x208b31, _0x2cef6f = await _0x3d1e13[_0x567dc4(336)](_0x5b3819, EmptyResultSchema);
|
|
94
102
|
break;
|
|
95
103
|
}
|
|
96
|
-
const
|
|
97
|
-
return
|
|
104
|
+
const _0x2b003c = {};
|
|
105
|
+
return _0x2b003c["result"] = _0x2cef6f, _0x2b003c["jsonrpc"] = _0x5c974c[_0x280111(333)], _0x2b003c["id"] = _0x21e6c5, await ((_a = _0x251088 == null ? void 0 : _0x251088[_0x567dc4(337)]) == null ? void 0 : _a[_0x567dc4(363)](_0x2b003c)), _0x2cef6f;
|
|
98
106
|
};
|
|
99
|
-
const forwardServerOnRequest = (
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
|
|
107
|
+
const forwardServerOnRequest = (_0x531e12, _0x224b82) => {
|
|
108
|
+
const _0x3e078d = _0x47e3, _0x109151 = { "NgrBj": function(_0x1abc40, _0x1668fd) {
|
|
109
|
+
return _0x1abc40 === _0x1668fd;
|
|
110
|
+
}, "tYjTc": function(_0x5e3edc, _0x398d09, _0x3c3226, _0x3c3c28) {
|
|
111
|
+
return _0x5e3edc(_0x398d09, _0x3c3226, _0x3c3c28);
|
|
112
|
+
} }, _0x1caf22 = _0x531e12["_onrequest"];
|
|
113
|
+
_0x531e12[_0x3e078d(361)] = async (_0x285aa8, _0x192f25) => {
|
|
104
114
|
var _a, _b, _c, _d, _e;
|
|
105
|
-
const
|
|
115
|
+
const _0x409c4a = _0x3e078d, _0x379177 = _0x3e078d, { id: _0x59c6e3, method: _0x45ccd7 } = _0x285aa8;
|
|
106
116
|
try {
|
|
107
|
-
|
|
108
|
-
} catch (
|
|
109
|
-
const { code:
|
|
117
|
+
_0x109151["NgrBj"](_0x45ccd7, "initialize") ? await _0x1caf22["call"](_0x531e12, _0x285aa8, _0x192f25) : await _0x109151["tYjTc"](forwardServerRequest, _0x531e12, _0x224b82, _0x285aa8);
|
|
118
|
+
} catch (_0x2a3c36) {
|
|
119
|
+
const { code: _0x24206e, message: _0x488c17, data: _0x5c69b3 } = _0x2a3c36;
|
|
110
120
|
try {
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
} else (_c = (_b =
|
|
117
|
-
} catch (
|
|
118
|
-
(_e = (_d =
|
|
121
|
+
if (_0x24206e) {
|
|
122
|
+
const _0x159b9d = {};
|
|
123
|
+
_0x159b9d["code"] = _0x24206e, _0x159b9d["message"] = _0x488c17, _0x159b9d[_0x409c4a(349)] = _0x5c69b3;
|
|
124
|
+
const _0x444db2 = {};
|
|
125
|
+
_0x444db2["error"] = _0x159b9d, _0x444db2["jsonrpc"] = _0x379177(373), _0x444db2["id"] = _0x59c6e3, await ((_a = _0x531e12 == null ? void 0 : _0x531e12[_0x409c4a(337)]) == null ? void 0 : _a["send"](_0x444db2));
|
|
126
|
+
} else (_c = (_b = _0x531e12 == null ? void 0 : _0x531e12["transport"]) == null ? void 0 : _b[_0x409c4a(364)]) == null ? void 0 : _c.call(_b, _0x2a3c36);
|
|
127
|
+
} catch (_0x4bb96a) {
|
|
128
|
+
(_e = (_d = _0x531e12 == null ? void 0 : _0x531e12[_0x379177(337)]) == null ? void 0 : _d["onerror"]) == null ? void 0 : _e.call(_d, _0x4bb96a);
|
|
119
129
|
}
|
|
120
130
|
}
|
|
121
131
|
};
|
|
122
132
|
};
|
|
123
|
-
const forwardServerOnNotification = (
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
return
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const _0x39e20e = _0x43f5e0;
|
|
131
|
-
_0x3b079f[_0x1a8c52(434)] = async (_0x270c6e) => {
|
|
133
|
+
const forwardServerOnNotification = (_0x2c3695, _0x272f8) => {
|
|
134
|
+
const _0x130318 = _0x47e3, _0x2b70e1 = _0x47e3, _0x4b744f = {};
|
|
135
|
+
_0x4b744f["iLCeK"] = function(_0x599447, _0x1d0b37) {
|
|
136
|
+
return _0x599447 !== _0x1d0b37;
|
|
137
|
+
}, _0x4b744f["VnFnZ"] = _0x130318(355), _0x4b744f[_0x2b70e1(354)] = "notifications/cancelled";
|
|
138
|
+
const _0x46e763 = _0x4b744f;
|
|
139
|
+
_0x2c3695["_onnotification"] = async (_0xdb7ba5) => {
|
|
132
140
|
var _a, _b;
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
await
|
|
136
|
-
} catch (
|
|
137
|
-
(_b = (_a =
|
|
141
|
+
const _0x588b56 = _0x130318, _0x1f6817 = _0x130318, { method: _0x518ef7, params: _0x38ea22 } = _0xdb7ba5;
|
|
142
|
+
if (_0x46e763["iLCeK"](_0x518ef7, _0x46e763["VnFnZ"]) && (_0x518ef7 !== _0x46e763[_0x588b56(354)] || (_0x38ea22 == null ? void 0 : _0x38ea22["forward"]))) try {
|
|
143
|
+
await _0x272f8["notification"](_0xdb7ba5);
|
|
144
|
+
} catch (_0xdee759) {
|
|
145
|
+
(_b = (_a = _0x2c3695 == null ? void 0 : _0x2c3695[_0x1f6817(337)]) == null ? void 0 : _a[_0x1f6817(364)]) == null ? void 0 : _b.call(_a, _0xdee759);
|
|
138
146
|
}
|
|
139
147
|
};
|
|
140
148
|
};
|
|
141
|
-
const forwardClientOnRequest = (
|
|
149
|
+
const forwardClientOnRequest = (_0x2e765c, _0x40b7cd) => async (_0x5448d5) => {
|
|
142
150
|
var _a, _b, _c, _d, _e;
|
|
143
|
-
const
|
|
144
|
-
return
|
|
145
|
-
} };
|
|
151
|
+
const _0x3c6fc4 = _0x47e3, _0x200849 = _0x47e3, _0x49cba7 = { "RoSaN": function(_0x578c38, _0x195121, _0x2ef806, _0x2d5641) {
|
|
152
|
+
return _0x578c38(_0x195121, _0x2ef806, _0x2d5641);
|
|
153
|
+
}, "aFNdj": _0x3c6fc4(373) };
|
|
146
154
|
try {
|
|
147
|
-
return await
|
|
148
|
-
} catch (
|
|
149
|
-
const { code:
|
|
155
|
+
return await _0x49cba7["RoSaN"](forwardClientRequest, _0x2e765c, _0x40b7cd, _0x5448d5);
|
|
156
|
+
} catch (_0xb75b03) {
|
|
157
|
+
const { code: _0x2c5c92, message: _0x39d839, data: _0x43dcdf } = _0xb75b03;
|
|
150
158
|
try {
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
} else (_c = (_b =
|
|
157
|
-
} catch (
|
|
158
|
-
(_e = (_d =
|
|
159
|
+
if (_0x2c5c92) {
|
|
160
|
+
const _0x251991 = {};
|
|
161
|
+
_0x251991[_0x3c6fc4(371)] = _0x2c5c92, _0x251991[_0x200849(322)] = _0x39d839, _0x251991["data"] = _0x43dcdf;
|
|
162
|
+
const _0x2c3525 = {};
|
|
163
|
+
_0x2c3525["error"] = _0x251991, _0x2c3525[_0x3c6fc4(384)] = _0x49cba7[_0x3c6fc4(338)], _0x2c3525["id"] = _0x5448d5["id"], await ((_a = _0x2e765c == null ? void 0 : _0x2e765c[_0x200849(337)]) == null ? void 0 : _a["send"](_0x2c3525));
|
|
164
|
+
} else (_c = (_b = _0x2e765c == null ? void 0 : _0x2e765c[_0x3c6fc4(337)]) == null ? void 0 : _b["onerror"]) == null ? void 0 : _c.call(_b, _0xb75b03);
|
|
165
|
+
} catch (_0x254a39) {
|
|
166
|
+
(_e = (_d = _0x2e765c == null ? void 0 : _0x2e765c["transport"]) == null ? void 0 : _d[_0x200849(364)]) == null ? void 0 : _e.call(_d, _0x254a39);
|
|
159
167
|
}
|
|
160
168
|
}
|
|
161
169
|
};
|
|
162
|
-
|
|
163
|
-
const _0xeafb11 = _0xdc18();
|
|
164
|
-
return _0x2148 = function(_0x3612ee, _0xf2e2dc) {
|
|
165
|
-
_0x3612ee = _0x3612ee - (-7811 + 3480 + 4751);
|
|
166
|
-
let _0x592853 = _0xeafb11[_0x3612ee];
|
|
167
|
-
return _0x592853;
|
|
168
|
-
}, _0x2148(_0x2f37fe, _0x3a4fa9);
|
|
169
|
-
}
|
|
170
|
-
const forwardClientOnNotification = (_0x81d6a0, _0x4b9834) => async (_0x3a59b4) => {
|
|
170
|
+
const forwardClientOnNotification = (_0x4f21c5, _0x2360c8) => async (_0x130fb7) => {
|
|
171
171
|
var _a, _b, _c;
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
return
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
} catch (_0x3ae513) {
|
|
183
|
-
(_c = (_b = _0x81d6a0 == null ? void 0 : _0x81d6a0["transport"]) == null ? void 0 : _b["onerror"]) == null ? void 0 : _c.call(_b, _0x3ae513);
|
|
172
|
+
const _0x2c782c = _0x47e3, _0x6d9896 = _0x47e3, _0x476b91 = {};
|
|
173
|
+
_0x476b91[_0x2c782c(374)] = function(_0x183c5b, _0x594c4f) {
|
|
174
|
+
return _0x183c5b !== _0x594c4f;
|
|
175
|
+
}, _0x476b91["haUTc"] = _0x2c782c(355), _0x476b91[_0x2c782c(340)] = _0x6d9896(317);
|
|
176
|
+
const _0xaedb5c = _0x476b91, { method: _0x15b0ab, params: _0x52bf07 } = _0x130fb7;
|
|
177
|
+
if (_0xaedb5c["kykUa"](_0x15b0ab, _0xaedb5c["haUTc"]) && (_0x15b0ab !== _0xaedb5c["pALWP"] || (_0x52bf07 == null ? void 0 : _0x52bf07["forward"]))) try {
|
|
178
|
+
const _0x322a81 = { ..._0x130fb7 };
|
|
179
|
+
_0x322a81[_0x2c782c(384)] = _0x6d9896(373), await ((_a = _0x2360c8 == null ? void 0 : _0x2360c8["transport"]) == null ? void 0 : _a["send"](_0x322a81));
|
|
180
|
+
} catch (_0x3bb6c4) {
|
|
181
|
+
(_c = (_b = _0x4f21c5 == null ? void 0 : _0x4f21c5["transport"]) == null ? void 0 : _b[_0x2c782c(364)]) == null ? void 0 : _c.call(_b, _0x3bb6c4);
|
|
184
182
|
}
|
|
185
183
|
};
|
|
186
|
-
function _0xdc18() {
|
|
187
|
-
const _0x429d97 = ["readResource", "KvuPz", "ZzLqb", "function", "logging/setLevel", "QyZsH", "UxVqB", "XITLS", "VOrSW", "call", "get", "listTools", "initialize", "listResources", "IYvWf", "_onnotification", "forward", "clear", "ECpzz", "unsubscribeResource", "fallbackRequestHandler", "_notificationHandlers", "jsonrpc", "179152MHFjCL", "fyrWU", "GxPaA", "BPlGy", "2.0", "setLoggingLevel", "clearResponseListener", "data", "includes", "length", "transport", "_onrequest", "14tMAtCT", "name", "gcKPn", "addListener", "resources/unsubscribe", "clearNotificationListener", "1472888OkcRyI", "splice", "JZOKo", "fDlAQ", "8994132yhOhQF", "tools/list", "zBkSM", "send", "166548nQfjZY", "request", "wBtzd", "crNru", "XBQVo", "pxjlU", "UNpJw", "18KJcGuQ", "notifications/cancelled", "handleListener", "elicitation/create", "originalOnResponse", "ping", "AvMEN", "QtNZz", "error", "prompts/list", "16914852YHuiIr", "push", "_onresponse", "aWSIX", "MVdrt", "3671290VgqvKl", "2053016PhCfNY", "nvMqU", "BEURE", "clearRequestListener", "onerror", "LXhkL"];
|
|
188
|
-
_0xdc18 = function() {
|
|
189
|
-
return _0x429d97;
|
|
190
|
-
};
|
|
191
|
-
return _0xdc18();
|
|
192
|
-
}
|
|
193
184
|
const createHandleListener = () => {
|
|
194
|
-
const
|
|
195
|
-
return
|
|
196
|
-
}, "
|
|
197
|
-
return
|
|
198
|
-
}, "
|
|
199
|
-
return
|
|
200
|
-
}, "
|
|
201
|
-
return
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
185
|
+
const _0xddf6fb = _0x47e3, _0x3ab4be = { "QWHjY": function(_0x44fec7, _0x4fe4f5, _0x494e8e) {
|
|
186
|
+
return _0x44fec7(_0x4fe4f5, _0x494e8e);
|
|
187
|
+
}, "cHNMS": function(_0xdb039c, _0x3ba45b) {
|
|
188
|
+
return _0xdb039c !== _0x3ba45b;
|
|
189
|
+
}, "BMgEW": function(_0x25baf0, _0x3bb7a6) {
|
|
190
|
+
return _0x25baf0(_0x3bb7a6);
|
|
191
|
+
}, "LwFMy": function(_0xc7a5dc, _0x349c34) {
|
|
192
|
+
return _0xc7a5dc === _0x349c34;
|
|
193
|
+
}, "QIdRN": function(_0x2a879e, _0x387755) {
|
|
194
|
+
return _0x2a879e !== _0x387755;
|
|
195
|
+
} }, _0xad526d = [], _0x16a2ef = (_0x1428aa, _0x31fbce) => {
|
|
196
|
+
const _0x3b51a6 = _0x47e3;
|
|
197
|
+
if (_0x31fbce) {
|
|
198
|
+
const _0x206b80 = [];
|
|
199
|
+
for (const _0x1e6d9f of _0xad526d) {
|
|
207
200
|
try {
|
|
208
|
-
|
|
201
|
+
_0x206b80[_0x3b51a6(328)](_0x3ab4be["QWHjY"](_0x1e6d9f, _0x1428aa, _0x31fbce));
|
|
209
202
|
} catch {
|
|
210
203
|
}
|
|
211
204
|
}
|
|
212
|
-
for (const
|
|
213
|
-
if (
|
|
205
|
+
for (const _0x2d80ab of _0x206b80) {
|
|
206
|
+
if (_0x3ab4be["cHNMS"](_0x2d80ab, null)) return _0x2d80ab;
|
|
214
207
|
}
|
|
215
|
-
} else for (const
|
|
208
|
+
} else for (const _0x18f315 of _0xad526d) {
|
|
216
209
|
try {
|
|
217
|
-
|
|
210
|
+
_0x3ab4be["BMgEW"](_0x18f315, _0x1428aa);
|
|
218
211
|
} catch {
|
|
219
212
|
}
|
|
220
213
|
}
|
|
221
|
-
},
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
214
|
+
}, _0x439b56 = (_0x3f663a) => {
|
|
215
|
+
const _0x5d9488 = _0x47e3, _0x3b4296 = _0x47e3;
|
|
216
|
+
_0x3ab4be["LwFMy"](typeof _0x3f663a, _0x5d9488(347)) && !_0xad526d[_0x3b4296(368)](_0x3f663a) && _0xad526d[_0x3b4296(328)](_0x3f663a);
|
|
217
|
+
}, _0x1ce8eb = (_0xbbca13) => {
|
|
218
|
+
const _0x57e456 = _0x47e3, _0x3bec20 = _0x47e3, _0x3f5120 = _0xad526d["indexOf"](_0xbbca13);
|
|
219
|
+
_0x3ab4be[_0x57e456(345)](_0x3f5120, -1) && _0xad526d[_0x3bec20(313)](_0x3f5120, 7217 * 1 + 2267 + -9483);
|
|
220
|
+
}, _0xea9e31 = () => {
|
|
221
|
+
_0xad526d["length"] = 7608 + 55 * -17 + -6673;
|
|
222
|
+
}, _0x318449 = {};
|
|
223
|
+
return _0x318449["handleListener"] = _0x16a2ef, _0x318449["addListener"] = _0x439b56, _0x318449[_0xddf6fb(315)] = _0x1ce8eb, _0x318449[_0xddf6fb(342)] = _0xea9e31, _0x318449;
|
|
224
|
+
}, setClientListener = (_0x16db1f) => {
|
|
225
|
+
const _0x127a85 = _0x47e3, _0x131a17 = _0x47e3, _0x43bbc1 = { "OGhpj": function(_0x3461c2) {
|
|
226
|
+
return _0x3461c2();
|
|
227
|
+
}, "jJiwz": function(_0x41edea) {
|
|
228
|
+
return _0x41edea();
|
|
235
229
|
} };
|
|
236
230
|
{
|
|
237
|
-
const { handleListener:
|
|
238
|
-
|
|
231
|
+
const { handleListener: _0x1dc94a, addListener: _0x417991, removeListener: _0x403dd9, clearListener: _0x4d9309 } = _0x43bbc1[_0x127a85(321)](createHandleListener);
|
|
232
|
+
_0x16db1f[_0x127a85(319)] = _0x1dc94a, _0x16db1f[_0x131a17(308)] = _0x417991, _0x16db1f["removeResponseListener"] = _0x403dd9, _0x16db1f[_0x131a17(332)] = _0x4d9309;
|
|
239
233
|
}
|
|
240
234
|
{
|
|
241
|
-
const { handleListener:
|
|
242
|
-
|
|
235
|
+
const { handleListener: _0x3b90fc, addListener: _0x2fd7c9, removeListener: _0x292d2a, clearListener: _0x160bc4 } = createHandleListener();
|
|
236
|
+
_0x16db1f[_0x131a17(353)] = _0x3b90fc, _0x16db1f[_0x127a85(320)] = _0x2fd7c9, _0x16db1f["removeRequestListener"] = _0x292d2a, _0x16db1f[_0x127a85(309)] = _0x160bc4;
|
|
243
237
|
}
|
|
244
238
|
{
|
|
245
|
-
const { handleListener:
|
|
246
|
-
|
|
239
|
+
const { handleListener: _0x13fd44, addListener: _0x2ac762, removeListener: _0x6d9a27, clearListener: _0xb16fba } = _0x43bbc1["jJiwz"](createHandleListener);
|
|
240
|
+
_0x16db1f[_0x131a17(386)] = _0x13fd44, _0x16db1f[_0x127a85(369)] = _0x2ac762, _0x16db1f[_0x131a17(324)] = _0x6d9a27, _0x16db1f[_0x131a17(376)] = _0xb16fba;
|
|
247
241
|
}
|
|
248
242
|
};
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
|
|
243
|
+
function _0xd45d() {
|
|
244
|
+
const _0x5a812f = ["message", "2273464ccvOsZ", "removeNotificationListener", "name", "resources/unsubscribe", "result", "push", "callTool", "method", "PFnXq", "clearResponseListener", "hiTto", "wAjlQ", "9252BPxmLi", "request", "transport", "aFNdj", "5990GfgYej", "pALWP", "roots/list", "clearListener", "1087900nVDcct", "listTools", "QIdRN", "unsubscribeResource", "function", "getPrompt", "data", "tools/call", "ping", "PipzT", "fallbackRequestHandler", "iUefp", "notifications/initialized", "level", "listResources", "1626132xwUtNz", "complete", "117492rrQpuM", "_onrequest", "listPrompts", "send", "onerror", "qLMuk", "completion/complete", "sampling/createMessage", "includes", "addNotificationListener", "prompts/get", "code", "params", "2.0", "kykUa", "yLRdW", "clearNotificationListener", "tools/list", "cqBHj", "elicitation/create", "ZYNFj", "zxSfQ", "60orVcNK", "originalOnResponse", "jsonrpc", "7ukYHgT", "fallbackNotificationHandler", "26ajRDlu", "addResponseListener", "clearRequestListener", "ZijeN", "clear", "_notificationHandlers", "splice", "DWWZD", "removeListener", "47615opiEqz", "notifications/cancelled", "242670qapTzl", "_onresponse", "addRequestListener", "OGhpj"];
|
|
245
|
+
_0xd45d = function() {
|
|
246
|
+
return _0x5a812f;
|
|
247
|
+
};
|
|
248
|
+
return _0xd45d();
|
|
249
|
+
}
|
|
250
|
+
const initClientHandler = (_0x37df2d, { beforeInit: _0x5e7619, afterInit: _0x15128e } = {}) => {
|
|
251
|
+
const _0x5490bf = _0x47e3, _0x44da83 = _0x47e3, _0x371972 = { "IiBFR": function(_0x58e27e, _0x1569d7) {
|
|
252
|
+
return _0x58e27e === _0x1569d7;
|
|
253
|
+
}, "chzWu": function(_0x1ad0b1, _0x2cdfe4) {
|
|
254
|
+
return _0x1ad0b1 === _0x2cdfe4;
|
|
255
|
+
}, "AvFuO": function(_0x26582a, _0x310cc5) {
|
|
256
|
+
return _0x26582a(_0x310cc5);
|
|
257
|
+
}, "MSUAp": _0x5490bf(347), "ZYNFj": function(_0x2a106f) {
|
|
258
|
+
return _0x2a106f();
|
|
259
|
+
} }, _0xe3b560 = new Map(_0x37df2d[_0x44da83(312)]);
|
|
260
|
+
_0x37df2d["_requestHandlers"][_0x44da83(311)](), _0x37df2d["_notificationHandlers"]["clear"](), _0x371972["chzWu"](typeof _0x5e7619, "function") && _0x5e7619(), _0x371972["IiBFR"](_0x37df2d["_onresponse"][_0x44da83(325)], "_onresponse") && (_0x37df2d["originalOnResponse"] = _0x37df2d["_onresponse"]), _0x371972["AvFuO"](setClientListener, _0x37df2d), _0x37df2d[_0x44da83(308)]((_0x5823fb) => {
|
|
261
|
+
const _0x47be4f = _0x44da83;
|
|
262
|
+
_0x37df2d[_0x47be4f(383)]["call"](_0x37df2d, _0x5823fb);
|
|
263
|
+
}), typeof _0x15128e === _0x371972["MSUAp"] && _0x371972[_0x5490bf(380)](_0x15128e), _0x37df2d["addNotificationListener"]((_0x17fc1b) => {
|
|
264
|
+
const _0x1160c4 = _0x5490bf, { method: _0x3803a2 } = _0x17fc1b, _0x4a9aa2 = _0xe3b560["get"](_0x3803a2);
|
|
265
|
+
_0x371972["IiBFR"](typeof _0x4a9aa2, _0x1160c4(347)) && _0x4a9aa2(_0x17fc1b);
|
|
269
266
|
});
|
|
270
267
|
};
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
268
|
+
function _0x5a92() {
|
|
269
|
+
const _0x4775de = ["55kpBnQf", "getRandomValues", "13287680QlWBTg", "6fZNRLf", "9428301EUigEO", "randomUUID", "7119955bByuQT", "xVLfE", "2660IKYrtk", "1139131gulCHS", "10wPlAGv", "toString", "VtXpH", "15016mOLrbN", "1806NKFyEV", "4380828cAoRcH", "29guSmRa"];
|
|
270
|
+
_0x5a92 = function() {
|
|
271
|
+
return _0x4775de;
|
|
272
|
+
};
|
|
273
|
+
return _0x5a92();
|
|
274
|
+
}
|
|
275
|
+
(function(_0xb8e0d8, _0x42ff59) {
|
|
276
|
+
const _0x191f7f = _0x1e18, _0xe2e4b2 = _0x1e18, _0x31d187 = _0xb8e0d8();
|
|
274
277
|
while (!![]) {
|
|
275
278
|
try {
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
else
|
|
279
|
-
} catch (
|
|
280
|
-
|
|
279
|
+
const _0x327c59 = parseInt(_0x191f7f(479)) / (8663 * -1 + -3 * -2361 + -31 * -51) * (parseInt(_0x191f7f(493)) / (-6499 + 1759 * 2 + 2983)) + parseInt(_0xe2e4b2(494)) / (-2 * 865 + -349 * 22 + -3 * -3137) * (parseInt(_0xe2e4b2(488)) / (-8979 + -3017 + 1e3 * 12)) + -parseInt(_0x191f7f(486)) / (-9164 + -2374 * 4 + -5 * -3733) * (-parseInt(_0x191f7f(483)) / (-4717 + -1 * 8539 + 13262)) + -parseInt(_0xe2e4b2(489)) / (3993 * -1 + 7109 * -1 + 11109) + -parseInt(_0x191f7f(482)) / (-2189 * -3 + -6854 + 295) + -parseInt(_0xe2e4b2(484)) / (5765 + -24 * 238 + 44 * -1) * (parseInt(_0xe2e4b2(490)) / (741 + 1 * 8839 + -435 * 22)) + -parseInt(_0xe2e4b2(480)) / (8108 + 8467 + -16564) * (-parseInt(_0x191f7f(478)) / (-17 * -46 + 2505 + -3275));
|
|
280
|
+
if (_0x327c59 === _0x42ff59) break;
|
|
281
|
+
else _0x31d187["push"](_0x31d187["shift"]());
|
|
282
|
+
} catch (_0x4f91f8) {
|
|
283
|
+
_0x31d187["push"](_0x31d187["shift"]());
|
|
281
284
|
}
|
|
282
285
|
}
|
|
283
|
-
})(
|
|
286
|
+
})(_0x5a92, -1813587 + 1061865 + 1747838);
|
|
287
|
+
function _0x1e18(_0x84a984, _0x2506fd) {
|
|
288
|
+
const _0x543573 = _0x5a92();
|
|
289
|
+
return _0x1e18 = function(_0x1f90db, _0x59daa0) {
|
|
290
|
+
_0x1f90db = _0x1f90db - (-15 * 183 + -397 * -23 + -5908);
|
|
291
|
+
let _0x512290 = _0x543573[_0x1f90db];
|
|
292
|
+
return _0x512290;
|
|
293
|
+
}, _0x1e18(_0x84a984, _0x2506fd);
|
|
294
|
+
}
|
|
284
295
|
const randomUUID = () => {
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
return
|
|
288
|
-
},
|
|
289
|
-
return
|
|
290
|
-
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if (_0x38ffc3["bARia"](typeof crypto, _0x38ffc3[_0x2e8617(181)]) && crypto[_0x2e8617(168)]) return crypto["randomUUID"]();
|
|
297
|
-
return _0x240238(169)[_0x240238(186)](/[xy]/g, (_0x483ff2) => {
|
|
298
|
-
const _0x5b08d0 = _0x2e8617, _0x231da6 = _0x240238, _0x17d979 = _0x38ffc3["WtHdW"](crypto["getRandomValues"](new Uint8Array(134 * 31 + -5654 + 1501))[-7 * 146 + -31 * 139 + 1 * 5331], -5844 + -7380 + 13239), _0x2cf4ec = _0x38ffc3["bARia"](_0x483ff2, "x") ? _0x17d979 : _0x38ffc3[_0x5b08d0(188)](_0x38ffc3[_0x231da6(179)](_0x17d979, -17 * -367 + -8604 + 1184 * 2), 47 * 167 + 9124 + -16965);
|
|
299
|
-
return _0x2cf4ec["toString"](-23 * -174 + -9950 + 1988 * 3);
|
|
296
|
+
const _0x293ca1 = _0x1e18, _0xd3779f = _0x1e18, _0x1bc1cf = {};
|
|
297
|
+
_0x1bc1cf["xVLfE"] = function(_0x56dea9, _0x4ed659) {
|
|
298
|
+
return _0x56dea9 === _0x4ed659;
|
|
299
|
+
}, _0x1bc1cf["yeueZ"] = function(_0x4bc2a6, _0x540c8a) {
|
|
300
|
+
return _0x4bc2a6 & _0x540c8a;
|
|
301
|
+
}, _0x1bc1cf["VtXpH"] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
302
|
+
const _0x1630ae = _0x1bc1cf;
|
|
303
|
+
if (_0x1630ae[_0x293ca1(487)](typeof crypto, "object") && crypto["randomUUID"]) return crypto[_0xd3779f(485)]();
|
|
304
|
+
return _0x1630ae[_0x293ca1(492)]["replace"](/[xy]/g, (_0x4e003a) => {
|
|
305
|
+
const _0x2cb9d2 = _0x293ca1, _0x2f8776 = crypto["getRandomValues"](new Uint8Array(841 * -8 + -9630 + -287 * -57))[-3983 + 2477 * 1 + 1506] & 4769 + -1172 * -5 + -10614 * 1, _0x5c5d31 = _0x1630ae[_0x2cb9d2(487)](_0x4e003a, "x") ? _0x2f8776 : _0x1630ae["yeueZ"](_0x2f8776, 384 * -9 + 1 * 8273 + -4814) | -6853 + 6076 + -785 * -1;
|
|
306
|
+
return _0x5c5d31[_0x2cb9d2(491)](-46 * 191 + -5697 + 14499 * 1);
|
|
300
307
|
});
|
|
301
|
-
}, randomBytes = (
|
|
302
|
-
const
|
|
303
|
-
return crypto[
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
_0x566dad = _0x566dad - (-7299 + -4241 * 2 + -389 * -41);
|
|
310
|
-
let _0x2c889c = _0x55445f[_0x566dad];
|
|
311
|
-
return _0x2c889c;
|
|
312
|
-
}, _0x3719(_0x5c540d, _0x24fb6c);
|
|
313
|
-
}
|
|
314
|
-
function _0x2be1() {
|
|
315
|
-
const _0x40dd17 = ["randomBytes", "nvQfP", "2605440SNpafK", "fPedK", "51PbyUnl", "2466cHyxrl", "from", "11536wuhjmP", "replace", "4bLpbCN", "QQpyg", "randomUUID", "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx", "object", "20403042uZjcCY", "1134087EXndeA", "toString", "4461970ccFOru", "8Ijsoaa", "110574qnXPtJ", "933651VoWqwJ"];
|
|
316
|
-
_0x2be1 = function() {
|
|
317
|
-
return _0x40dd17;
|
|
318
|
-
};
|
|
319
|
-
return _0x2be1();
|
|
320
|
-
}
|
|
321
|
-
const _0x5881e5 = _0x2b37, _0x4e9d44 = _0x2b37;
|
|
322
|
-
(function(_0x1c2ee3, _0xcf2b49) {
|
|
323
|
-
const _0x5774e6 = _0x2b37, _0x66e94f = _0x2b37, _0x3aca95 = _0x1c2ee3();
|
|
308
|
+
}, randomBytes = (_0x4057d7) => {
|
|
309
|
+
const _0x5adf17 = _0x1e18, _0x244b6d = _0x1e18, _0x1c3cad = new Uint8Array(_0x4057d7);
|
|
310
|
+
return crypto[_0x5adf17(481)](_0x1c3cad), Array["from"](_0x1c3cad, (_0x3f0f66) => _0x3f0f66[_0x244b6d(491)](-1 * -877 + 92 * 53 + -5737)["padStart"](-1 * -5681 + -1681 * -4 + 79 * -157, "0"))["join"]("");
|
|
311
|
+
}, _0x15ecde = {};
|
|
312
|
+
_0x15ecde["randomUUID"] = randomUUID, _0x15ecde["randomBytes"] = randomBytes;
|
|
313
|
+
const _0xe43874 = _0x249d, _0x3c4c4b = _0x249d;
|
|
314
|
+
(function(_0x11a97f, _0x559c48) {
|
|
315
|
+
const _0xcf63b4 = _0x249d, _0x2d53ca = _0x249d, _0x3901dd = _0x11a97f();
|
|
324
316
|
while (!![]) {
|
|
325
317
|
try {
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
else
|
|
329
|
-
} catch (
|
|
330
|
-
|
|
318
|
+
const _0x1e1761 = -parseInt(_0xcf63b4(291)) / (-9920 + 8101 * 1 + 13 * 140) + parseInt(_0xcf63b4(287)) / (-9218 + 131 + 9089) + parseInt(_0x2d53ca(247)) / (-7 * -1163 + 8523 + -16661) * (-parseInt(_0x2d53ca(222)) / (-3 * 593 + -196 * -23 + -2725)) + parseInt(_0x2d53ca(248)) / (-236 * 6 + -2233 * 1 + 3654) + parseInt(_0xcf63b4(290)) / (-53 * -29 + -203 * 43 + 7198) * (parseInt(_0x2d53ca(264)) / (-9 * 145 + -20 * 466 + 10632)) + parseInt(_0x2d53ca(228)) / (241 * 25 + 2 * -3473 + 929 * 1) * (parseInt(_0xcf63b4(250)) / (2635 + -1 * 2221 + 3 * -135)) + -parseInt(_0x2d53ca(252)) / (-4817 + 5291 + 2 * -232) * (-parseInt(_0x2d53ca(306)) / (-155 * 53 + 3863 * -1 + 12089));
|
|
319
|
+
if (_0x1e1761 === _0x559c48) break;
|
|
320
|
+
else _0x3901dd["push"](_0x3901dd["shift"]());
|
|
321
|
+
} catch (_0x9a5ce2) {
|
|
322
|
+
_0x3901dd["push"](_0x3901dd["shift"]());
|
|
331
323
|
}
|
|
332
324
|
}
|
|
333
|
-
})(
|
|
334
|
-
function
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
325
|
+
})(_0x4684, -4423 * -113 + 191466 + -230226);
|
|
326
|
+
function _0x249d(_0x4d48b5, _0x1ed6e9) {
|
|
327
|
+
const _0x18d6c0 = _0x4684();
|
|
328
|
+
return _0x249d = function(_0x255318, _0x40852c) {
|
|
329
|
+
_0x255318 = _0x255318 - (-1 * -6805 + -1549 * -3 + -11231);
|
|
330
|
+
let _0x58f921 = _0x18d6c0[_0x255318];
|
|
331
|
+
return _0x58f921;
|
|
332
|
+
}, _0x249d(_0x4d48b5, _0x1ed6e9);
|
|
340
333
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
return _0x2b37 = function(_0x1714ee, _0x30efd9) {
|
|
344
|
-
_0x1714ee = _0x1714ee - (-8833 + 2396 + -1 * -6580);
|
|
345
|
-
let _0x20d42d = _0xd4e150[_0x1714ee];
|
|
346
|
-
return _0x20d42d;
|
|
347
|
-
}, _0x2b37(_0x23e720, _0x26eb39);
|
|
348
|
-
}
|
|
349
|
-
const ACCESS_TOKEN_EXPIRES_IN = (-9568 + 163 * -41 + 16275) * (-8544 + -247 * -17 + 4405) * (1145 * -1 + -9903 + -2 * -5554);
|
|
350
|
-
const REFRESH_TOKEN_EXPIRES_IN = (790 * -1 + 53 * -137 + 1 * 8058) * (-9540 + 8976 + 588) * (-6257 + 6915 + -23 * 26) * (-8867 * -1 + 7213 + -16020);
|
|
334
|
+
const ACCESS_TOKEN_EXPIRES_IN = (-6551 + -1363 + 2 * 3969) * (-4748 + -4262 + 9070) * (2 * 2589 + -1 * 9627 + 4509);
|
|
335
|
+
const REFRESH_TOKEN_EXPIRES_IN = (-4843 * -2 + -9611 * -1 + -1929 * 10) * (4783 * 2 + -3541 + -6001) * (-6171 + 6257 + -2 * 13) * (3714 + -8442 + 4788);
|
|
351
336
|
const generateAuthorizationCodeFunction = () => {
|
|
352
|
-
|
|
337
|
+
const _0x24cfbe = _0x249d;
|
|
338
|
+
return _0x15ecde[_0x24cfbe(246)](-167 * 9 + 980 + 547 * 1);
|
|
353
339
|
}, generateAccessTokenFunction = () => {
|
|
354
|
-
|
|
340
|
+
const _0x5706eb = _0x249d;
|
|
341
|
+
return _0x15ecde[_0x5706eb(246)](-1054 + 2034 + -948);
|
|
355
342
|
}, generateRefreshTokenFunction = () => {
|
|
356
|
-
|
|
357
|
-
return _0x198425[_0x8e4fff(213)](-1 * -1252 + 4411 * 1 + -5615);
|
|
343
|
+
return _0x15ecde["randomBytes"](-256 * -38 + 44 + 68 * -143);
|
|
358
344
|
};
|
|
359
345
|
class MemoryClientsStore {
|
|
360
346
|
constructor() {
|
|
361
|
-
|
|
347
|
+
const _0x5aac42 = _0x249d;
|
|
348
|
+
this[_0x5aac42(305)] = /* @__PURE__ */ new Map();
|
|
362
349
|
}
|
|
363
|
-
async [
|
|
364
|
-
|
|
350
|
+
async [_0xe43874(300)](_0xa95f20) {
|
|
351
|
+
const _0x11c480 = _0xe43874;
|
|
352
|
+
return this["clients"][_0x11c480(254)](_0xa95f20);
|
|
365
353
|
}
|
|
366
|
-
async [
|
|
367
|
-
const
|
|
368
|
-
return this[
|
|
354
|
+
async [_0xe43874(240)](_0x474d08) {
|
|
355
|
+
const _0x1196e4 = _0x3c4c4b;
|
|
356
|
+
return this[_0x1196e4(305)][_0x1196e4(270)](_0x474d08["client_id"], _0x474d08), _0x474d08;
|
|
369
357
|
}
|
|
370
|
-
async ["deleteClient"](
|
|
371
|
-
const
|
|
372
|
-
return this[
|
|
358
|
+
async ["deleteClient"](_0x118e75) {
|
|
359
|
+
const _0x5d0975 = _0x3c4c4b;
|
|
360
|
+
return this[_0x5d0975(305)][_0x5d0975(244)](_0x118e75);
|
|
373
361
|
}
|
|
374
|
-
async [
|
|
375
|
-
|
|
376
|
-
return this[_0x117d33(192)](_0x179824);
|
|
362
|
+
async ["registerClient"](_0x3e3815) {
|
|
363
|
+
return this["saveClient"](_0x3e3815);
|
|
377
364
|
}
|
|
378
365
|
}
|
|
379
366
|
class MemoryAuthorizationCodeStore {
|
|
380
367
|
constructor() {
|
|
381
|
-
const
|
|
382
|
-
this[
|
|
368
|
+
const _0x10ab05 = _0xe43874;
|
|
369
|
+
this[_0x10ab05(249)] = /* @__PURE__ */ new Map();
|
|
383
370
|
}
|
|
384
|
-
async [
|
|
385
|
-
const
|
|
386
|
-
return this[
|
|
371
|
+
async [_0xe43874(289)](_0x378843) {
|
|
372
|
+
const _0x4c6cc2 = _0xe43874;
|
|
373
|
+
return this["codes"][_0x4c6cc2(254)](_0x378843);
|
|
387
374
|
}
|
|
388
|
-
async ["saveCodeData"](
|
|
389
|
-
const
|
|
390
|
-
return this[
|
|
375
|
+
async ["saveCodeData"](_0x1cbdcf, _0x23cf7e) {
|
|
376
|
+
const _0x21fab8 = _0xe43874, _0x52e6ff = _0x3c4c4b;
|
|
377
|
+
return this[_0x21fab8(249)][_0x52e6ff(270)](_0x1cbdcf, _0x23cf7e), !![];
|
|
391
378
|
}
|
|
392
|
-
async [
|
|
393
|
-
const
|
|
394
|
-
return this["
|
|
379
|
+
async [_0x3c4c4b(232)](_0x9d5f82) {
|
|
380
|
+
const _0x14ac0e = _0x3c4c4b;
|
|
381
|
+
return this[_0x14ac0e(249)]["delete"](_0x9d5f82);
|
|
395
382
|
}
|
|
396
383
|
}
|
|
397
384
|
class MemoryAccessTokensStore {
|
|
398
385
|
constructor() {
|
|
399
|
-
|
|
400
|
-
this[_0x15e7ab(188)] = /* @__PURE__ */ new Map();
|
|
386
|
+
this["accessTokens"] = /* @__PURE__ */ new Map();
|
|
401
387
|
}
|
|
402
|
-
async [
|
|
403
|
-
const
|
|
404
|
-
return this[
|
|
388
|
+
async ["getAccessToken"](_0x8c6025) {
|
|
389
|
+
const _0x38998a = _0xe43874;
|
|
390
|
+
return this[_0x38998a(259)]["get"](_0x8c6025);
|
|
405
391
|
}
|
|
406
|
-
async [
|
|
407
|
-
|
|
408
|
-
return this["accessTokens"][_0x393ce0(230)](_0x2af231, _0x39f776), !![];
|
|
392
|
+
async ["saveAccessToken"](_0x214daa, _0x422738) {
|
|
393
|
+
return this["accessTokens"]["set"](_0x214daa, _0x422738), !![];
|
|
409
394
|
}
|
|
410
|
-
async ["revokeAccessToken"](
|
|
411
|
-
const
|
|
412
|
-
return this[
|
|
395
|
+
async ["revokeAccessToken"](_0x4b77f7) {
|
|
396
|
+
const _0x4f8735 = _0xe43874;
|
|
397
|
+
return this["accessTokens"][_0x4f8735(244)](_0x4b77f7);
|
|
413
398
|
}
|
|
414
399
|
}
|
|
415
400
|
class MemoryRefreshTokensStore {
|
|
416
401
|
constructor() {
|
|
417
|
-
const
|
|
418
|
-
this[
|
|
402
|
+
const _0x3f111b = _0xe43874;
|
|
403
|
+
this[_0x3f111b(242)] = /* @__PURE__ */ new Map();
|
|
419
404
|
}
|
|
420
|
-
async [
|
|
421
|
-
const
|
|
422
|
-
return this[
|
|
405
|
+
async ["getRefreshToken"](_0x5b6e94) {
|
|
406
|
+
const _0x5a9a42 = _0xe43874;
|
|
407
|
+
return this[_0x5a9a42(242)]["get"](_0x5b6e94);
|
|
423
408
|
}
|
|
424
|
-
async [
|
|
425
|
-
|
|
426
|
-
return this[_0x11c7c0(224)]["set"](_0x231c08, _0x5dbbdf), !![];
|
|
409
|
+
async [_0x3c4c4b(266)](_0x3571f5, _0x90c083) {
|
|
410
|
+
return this["refreshTokens"]["set"](_0x3571f5, _0x90c083), !![];
|
|
427
411
|
}
|
|
428
|
-
async ["revokeRefreshToken"](
|
|
429
|
-
const
|
|
430
|
-
return this[
|
|
412
|
+
async ["revokeRefreshToken"](_0x2d833c) {
|
|
413
|
+
const _0x401989 = _0xe43874;
|
|
414
|
+
return this[_0x401989(242)][_0x401989(244)](_0x2d833c);
|
|
431
415
|
}
|
|
432
416
|
}
|
|
433
417
|
class AuthServerProvider {
|
|
434
|
-
constructor(
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
return
|
|
438
|
-
},
|
|
439
|
-
return
|
|
440
|
-
}, _0x56f68e[_0x2f3f2a(194)] = function(_0x20cfc8, _0xf49617) {
|
|
441
|
-
return _0x20cfc8 || _0xf49617;
|
|
418
|
+
constructor(_0x58bd5b = {}) {
|
|
419
|
+
const _0xeb23ac = _0x3c4c4b, _0x59606d = _0x3c4c4b, _0x51d368 = {};
|
|
420
|
+
_0x51d368["taYfN"] = function(_0x26ee50, _0x351039) {
|
|
421
|
+
return _0x26ee50 || _0x351039;
|
|
422
|
+
}, _0x51d368["besuu"] = function(_0x1d7c95, _0x2636f5) {
|
|
423
|
+
return _0x1d7c95 || _0x2636f5;
|
|
442
424
|
};
|
|
443
|
-
const
|
|
444
|
-
this[
|
|
425
|
+
const _0x2f2901 = _0x51d368, { clientsStore: _0x106074, codesStore: _0x4d4ffa, accessTokensStore: _0x2378c3, refreshTokensStore: _0x3dc6e1, generateAuthorizationCode: _0x316fb9, generateAccessToken: _0x4806e0, generateRefreshToken: _0x51922a, accessTokenExpiresIn: _0x595091, refreshTokenExpiresIn: _0x55b227 } = _0x58bd5b;
|
|
426
|
+
this["clientsStore"] = _0x106074 || new MemoryClientsStore(), this[_0xeb23ac(297)] = _0x4d4ffa || new MemoryAuthorizationCodeStore(), this[_0x59606d(231)] = _0x2378c3 || new MemoryAccessTokensStore(), this["refreshTokensStore"] = _0x3dc6e1 || new MemoryRefreshTokensStore(), this["generateAuthorizationCode"] = _0x2f2901[_0x59606d(301)](_0x316fb9, generateAuthorizationCodeFunction), this[_0x59606d(304)] = _0x4806e0 || generateAccessTokenFunction, this[_0xeb23ac(268)] = _0x2f2901["taYfN"](_0x51922a, generateRefreshTokenFunction), this[_0x59606d(257)] = _0x2f2901["besuu"](_0x595091, ACCESS_TOKEN_EXPIRES_IN), this[_0xeb23ac(225)] = _0x2f2901[_0xeb23ac(301)](_0x55b227, REFRESH_TOKEN_EXPIRES_IN);
|
|
445
427
|
}
|
|
446
|
-
async [
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
return
|
|
450
|
-
};
|
|
451
|
-
const _0x57ceaa = _0x3cc4b7, _0x248abb = this[_0xfe9ad4(219)](), _0x567cfd = {};
|
|
452
|
-
_0x567cfd["code"] = _0x248abb;
|
|
453
|
-
const _0x4617a7 = new URLSearchParams(_0x567cfd);
|
|
454
|
-
_0x57ceaa[_0x2cb3ff(217)](_0x56a101["state"], void 0) && _0x4617a7[_0xfe9ad4(230)](_0xfe9ad4(197), _0x56a101["state"]);
|
|
455
|
-
const _0x55f27a = {};
|
|
456
|
-
_0x55f27a[_0xfe9ad4(211)] = _0x58bd0c, _0x55f27a[_0xfe9ad4(168)] = _0x56a101, await this[_0xfe9ad4(161)]["saveCodeData"](_0x248abb, _0x55f27a);
|
|
457
|
-
const _0x27dd6f = new URL(_0x58bd0c["redirect_uris"][-6 * 1306 + -36 + -192 * -41]);
|
|
458
|
-
_0x27dd6f[_0xfe9ad4(199)] = _0x4617a7["toString"](), _0x2f2979["redirect"](_0x27dd6f[_0xfe9ad4(171)]());
|
|
459
|
-
}
|
|
460
|
-
async [_0x4e9d44(203)](_0x1b4298, _0x10a41b) {
|
|
461
|
-
const _0x17c296 = _0x4e9d44, _0x1b5dce = await this[_0x17c296(161)]["getCodeDate"](_0x10a41b);
|
|
462
|
-
if (!_0x1b5dce) throw new InvalidGrantError("Invalid authorization code for this client: " + _0x1b4298["client_id"]);
|
|
463
|
-
return _0x1b5dce["params"][_0x17c296(151)];
|
|
464
|
-
}
|
|
465
|
-
async [_0x4e9d44(154)](_0x4595ec, _0x1c4c7b) {
|
|
466
|
-
const _0x1b1b3d = _0x5881e5, _0x2bad88 = _0x5881e5, _0x47f87f = {};
|
|
467
|
-
_0x47f87f["CrczU"] = function(_0x2504cf, _0x372fd1) {
|
|
468
|
-
return _0x2504cf !== _0x372fd1;
|
|
469
|
-
}, _0x47f87f["nrkmb"] = function(_0x44591f, _0x590f01) {
|
|
470
|
-
return _0x44591f + _0x590f01;
|
|
471
|
-
}, _0x47f87f["jXyZO"] = function(_0x37c695, _0x291af2) {
|
|
472
|
-
return _0x37c695 * _0x291af2;
|
|
428
|
+
async ["authorize"](_0x8f39e7, _0x58d999, _0x90761b) {
|
|
429
|
+
const _0x3df655 = _0x3c4c4b, _0x53309e = _0xe43874, _0x3ff44c = {};
|
|
430
|
+
_0x3ff44c["RsOud"] = function(_0x50a50c, _0x4938cb) {
|
|
431
|
+
return _0x50a50c !== _0x4938cb;
|
|
473
432
|
};
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
const
|
|
479
|
-
await this[
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
433
|
+
const _0x53299b = _0x3ff44c, _0x944856 = this[_0x3df655(265)](), _0x5782b0 = {};
|
|
434
|
+
_0x5782b0["code"] = _0x944856;
|
|
435
|
+
const _0xd4484b = new URLSearchParams(_0x5782b0);
|
|
436
|
+
_0x53299b["RsOud"](_0x58d999["state"], void 0) && _0xd4484b[_0x53309e(270)]("state", _0x58d999["state"]);
|
|
437
|
+
const _0x44007f = {};
|
|
438
|
+
_0x44007f[_0x53309e(280)] = _0x8f39e7, _0x44007f["params"] = _0x58d999, await this["codesStore"]["saveCodeData"](_0x944856, _0x44007f);
|
|
439
|
+
const _0x6096a5 = new URL(_0x58d999["redirectUri"] || _0x8f39e7["redirect_uris"][3433 + -8658 + 1045 * 5]);
|
|
440
|
+
_0x6096a5["search"] = _0xd4484b[_0x53309e(258)](), _0x90761b[_0x53309e(227)](_0x6096a5[_0x53309e(258)]());
|
|
441
|
+
}
|
|
442
|
+
async [_0xe43874(308)](_0xdf69bb, _0x2eb0cc) {
|
|
443
|
+
const _0x46df41 = _0xe43874, _0x10b0e1 = await this[_0x46df41(297)]["getCodeDate"](_0x2eb0cc);
|
|
444
|
+
if (!_0x10b0e1) throw new InvalidGrantError(_0x46df41(224) + _0xdf69bb[_0x46df41(226)]);
|
|
445
|
+
return _0x10b0e1["params"]["codeChallenge"];
|
|
446
|
+
}
|
|
447
|
+
async ["exchangeAuthorizationCode"](_0x5e11bf, _0x452fb1) {
|
|
448
|
+
const _0x15f280 = _0x3c4c4b, _0x126457 = _0xe43874, _0x4ceb2c = {};
|
|
449
|
+
_0x4ceb2c["taKwi"] = function(_0x5697ca, _0x396baf) {
|
|
450
|
+
return _0x5697ca !== _0x396baf;
|
|
451
|
+
}, _0x4ceb2c["cegXx"] = function(_0xa8c6be, _0x486863) {
|
|
452
|
+
return _0xa8c6be + _0x486863;
|
|
453
|
+
}, _0x4ceb2c[_0x15f280(285)] = function(_0x349471, _0x220da8) {
|
|
454
|
+
return _0x349471 * _0x220da8;
|
|
455
|
+
}, _0x4ceb2c[_0x15f280(271)] = function(_0x4a0893, _0x5c4387) {
|
|
456
|
+
return _0x4a0893 * _0x5c4387;
|
|
457
|
+
}, _0x4ceb2c["yaAXj"] = "bearer";
|
|
458
|
+
const _0x19faf7 = _0x4ceb2c, _0x3e662e = await this[_0x126457(297)][_0x126457(289)](_0x452fb1);
|
|
459
|
+
if (!_0x3e662e) throw new InvalidGrantError(_0x126457(224) + _0x5e11bf[_0x126457(226)]);
|
|
460
|
+
if (_0x19faf7["taKwi"](_0x3e662e["client"]["client_id"], _0x5e11bf["client_id"])) throw new InvalidGrantError(_0x15f280(275) + _0x5e11bf[_0x126457(226)]);
|
|
461
|
+
await this[_0x15f280(297)][_0x15f280(232)](_0x452fb1);
|
|
462
|
+
const _0x1b6733 = this["generateAccessToken"](), _0x370c1b = this["generateRefreshToken"](), _0x1ced36 = { "token": _0x1b6733, "clientId": _0x5e11bf[_0x15f280(226)], "scopes": _0x3e662e[_0x126457(273)]["scopes"] || [], "expiresAt": _0x19faf7[_0x126457(299)](Date[_0x126457(235)](), _0x19faf7[_0x15f280(285)](this["accessTokenExpiresIn"], -4944 + -8490 + 14434)), "resource": _0x3e662e["params"][_0x15f280(237)] };
|
|
463
|
+
await this["accessTokensStore"][_0x15f280(272)](_0x1b6733, _0x1ced36);
|
|
464
|
+
const _0x57f1e1 = {};
|
|
465
|
+
_0x57f1e1[_0x126457(281)] = ![];
|
|
466
|
+
const _0x344006 = { "token": _0x370c1b, "clientId": _0x5e11bf[_0x126457(226)], "scopes": _0x3e662e["params"]["scopes"] || [], "expiresAt": _0x19faf7[_0x15f280(299)](Date["now"](), _0x19faf7["zQDvg"](this[_0x15f280(225)], 2 * 4307 + 8 * -521 + -3446)), "extra": _0x57f1e1 };
|
|
467
|
+
return await this[_0x15f280(284)][_0x126457(266)](_0x370c1b, _0x344006), { "access_token": _0x1b6733, "refresh_token": _0x370c1b, "token_type": _0x19faf7["yaAXj"], "expires_in": this[_0x126457(257)], "scope": (_0x3e662e["params"]["scopes"] || [])["join"](" ") };
|
|
468
|
+
}
|
|
469
|
+
async ["exchangeRefreshToken"](_0x224106, _0x3af171) {
|
|
470
|
+
const _0x19477d = _0x3c4c4b, _0xf20ae5 = _0xe43874, _0xe12de3 = {};
|
|
471
|
+
_0xe12de3["JIFCu"] = function(_0x29a526, _0xe27ecb) {
|
|
472
|
+
return _0x29a526 < _0xe27ecb;
|
|
473
|
+
}, _0xe12de3[_0x19477d(267)] = function(_0x31ff42, _0x2defe6) {
|
|
474
|
+
return _0x31ff42 !== _0x2defe6;
|
|
475
|
+
}, _0xe12de3["gnySI"] = function(_0x2abea1, _0x49b0bd) {
|
|
476
|
+
return _0x2abea1 + _0x49b0bd;
|
|
477
|
+
}, _0xe12de3["JzexV"] = function(_0x496d90, _0x2c5eb1) {
|
|
478
|
+
return _0x496d90 * _0x2c5eb1;
|
|
479
|
+
}, _0xe12de3[_0xf20ae5(261)] = "Bearer";
|
|
480
|
+
const _0x5eb2df = _0xe12de3, _0x3f17a0 = await this[_0x19477d(284)]["getRefreshToken"](_0x3af171);
|
|
481
|
+
if (!_0x3f17a0) throw new InvalidGrantError("Refresh token is invalid or has been revoked for this client: " + _0x224106["client_id"]);
|
|
482
|
+
if (_0x5eb2df[_0xf20ae5(294)](_0x3f17a0[_0xf20ae5(263)], Date["now"]())) throw new InvalidGrantError("Refresh token has expired for this client: " + _0x224106["client_id"]);
|
|
483
|
+
if (_0x5eb2df[_0x19477d(267)](_0x3f17a0["clientId"], _0x224106["client_id"])) throw new InvalidGrantError(_0x19477d(276) + _0x224106[_0xf20ae5(226)]);
|
|
484
|
+
await this[_0x19477d(284)]["revokeRefreshToken"](_0x3af171);
|
|
485
|
+
const _0x6afb59 = this["generateAccessToken"](), _0x329672 = this[_0xf20ae5(268)](), _0x432a61 = { "token": _0x3af171, "clientId": _0x224106[_0xf20ae5(226)], "scopes": _0x3f17a0[_0x19477d(241)], "expiresAt": _0x5eb2df[_0x19477d(245)](Date["now"](), _0x5eb2df[_0xf20ae5(269)](this[_0x19477d(225)], 1 * 2221 + 8001 + -9222)) };
|
|
486
|
+
return await this[_0xf20ae5(284)][_0xf20ae5(266)](_0x3af171, _0x432a61), { "access_token": _0x6afb59, "refresh_token": _0x329672, "token_type": _0x5eb2df[_0x19477d(261)], "expires_in": this[_0xf20ae5(257)], "scope": _0x3f17a0[_0x19477d(241)][_0x19477d(238)](" ") };
|
|
487
|
+
}
|
|
488
|
+
async [_0xe43874(292)](_0x3947b2) {
|
|
489
|
+
const _0x2ba222 = _0x3c4c4b, _0x3fb7d9 = _0x3c4c4b, _0x47740e = await this[_0x2ba222(231)][_0x3fb7d9(303)](_0x3947b2);
|
|
490
|
+
if (!_0x47740e || !_0x47740e["expiresAt"]) throw new InvalidTokenError(_0x3fb7d9(298));
|
|
491
|
+
return { "token": _0x3947b2, "clientId": _0x47740e["clientId"], "scopes": _0x47740e["scopes"], "expiresAt": Math["floor"](_0x47740e["expiresAt"] / (781 + 8828 + 8609 * -1)), "resource": _0x47740e["resource"] };
|
|
492
|
+
}
|
|
493
|
+
async ["revokeToken"](_0x42ff7c, _0x4c082d) {
|
|
494
|
+
const _0x15b0e7 = _0x3c4c4b, _0x165108 = _0x3c4c4b, _0x55779c = {};
|
|
495
|
+
_0x55779c[_0x15b0e7(223)] = function(_0x575e05, _0xe3d8af) {
|
|
496
|
+
return _0x575e05 === _0xe3d8af;
|
|
497
|
+
}, _0x55779c[_0x165108(251)] = function(_0xbcb15f, _0x5d105e) {
|
|
498
|
+
return _0xbcb15f !== _0x5d105e;
|
|
499
|
+
}, _0x55779c["uzsQa"] = "refresh_token";
|
|
500
|
+
const _0x44ca17 = _0x55779c;
|
|
501
|
+
if (_0x44ca17["jCdyX"](_0x4c082d[_0x15b0e7(239)], "access_token")) {
|
|
502
|
+
const _0x22f07b = await this["accessTokensStore"]["getAccessToken"](_0x4c082d[_0x15b0e7(277)]);
|
|
503
|
+
if (!_0x22f07b || _0x44ca17["adLAw"](_0x22f07b["clientId"], _0x42ff7c[_0x15b0e7(226)])) throw new InvalidTokenError(_0x165108(233) + _0x42ff7c[_0x165108(226)]);
|
|
504
|
+
await this[_0x15b0e7(231)][_0x15b0e7(283)](_0x4c082d["token"]);
|
|
523
505
|
} else {
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
await this[
|
|
528
|
-
} else throw new InvalidGrantError(
|
|
506
|
+
if (_0x4c082d[_0x15b0e7(239)] === _0x44ca17["uzsQa"]) {
|
|
507
|
+
const _0xde2495 = await this[_0x15b0e7(284)]["getRefreshToken"](_0x4c082d[_0x165108(277)]);
|
|
508
|
+
if (!_0xde2495 || _0xde2495[_0x15b0e7(255)] !== _0x42ff7c[_0x165108(226)]) throw new InvalidTokenError("Refresh token is invalid or does not belong to this client: " + _0x42ff7c["client_id"]);
|
|
509
|
+
await this["refreshTokensStore"][_0x15b0e7(234)](_0x4c082d["token"]);
|
|
510
|
+
} else throw new InvalidGrantError(_0x165108(296) + _0x4c082d[_0x15b0e7(239)] + " to this client: " + _0x42ff7c[_0x15b0e7(226)]);
|
|
529
511
|
}
|
|
530
512
|
}
|
|
531
513
|
}
|
|
532
|
-
const createAuthMiddleware = (
|
|
533
|
-
const
|
|
534
|
-
return
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
514
|
+
const createAuthMiddleware = (_0x3baed3, _0x238dff) => {
|
|
515
|
+
const _0x2c5dae = _0xe43874, _0x43e28e = { "ebfKl": function(_0x6689cb, _0x118b09) {
|
|
516
|
+
return _0x6689cb(_0x118b09);
|
|
517
|
+
}, "kpBZz": function(_0x29f55e, _0xe110e2) {
|
|
518
|
+
return _0x29f55e(_0xe110e2);
|
|
519
|
+
} }, _0xbcfc6 = async (_0x229d85) => {
|
|
520
|
+
const _0x21a8a7 = _0x249d, _0x1edf54 = _0x249d, _0x3bb6bf = await _0x3baed3["verifyAccessToken"](_0x229d85), _0x2fcc24 = { "active": !![], "client_id": _0x3bb6bf[_0x21a8a7(255)], "scope": _0x3bb6bf["scopes"][_0x1edf54(238)](" "), "exp": _0x3bb6bf[_0x1edf54(263)], "aud": _0x3bb6bf["resource"] };
|
|
521
|
+
if (!_0x2fcc24[_0x1edf54(236)]) throw new Error(_0x1edf54(302));
|
|
522
|
+
const _0xd2b81a = {};
|
|
523
|
+
_0xd2b81a["requestedResource"] = _0x2fcc24["aud"], _0xd2b81a["configuredResource"] = _0x238dff;
|
|
524
|
+
if (!_0x43e28e["ebfKl"](checkResourceAllowed, _0xd2b81a)) throw new Error("Expected resource indicator " + _0x238dff + _0x1edf54(293) + _0x2fcc24["aud"]);
|
|
525
|
+
return { "token": _0x229d85, "clientId": _0x2fcc24[_0x1edf54(226)], "scopes": _0x2fcc24["scope"] ? _0x2fcc24[_0x21a8a7(286)][_0x1edf54(288)](" ") : [], "expiresAt": _0x2fcc24[_0x1edf54(307)] };
|
|
526
|
+
}, _0x9b8c4a = {};
|
|
527
|
+
return _0x9b8c4a[_0x2c5dae(292)] = _0xbcfc6, requireBearerAuth({ "verifier": _0x9b8c4a, "requiredScopes": [], "resourceMetadataUrl": _0x43e28e["kpBZz"](getOAuthProtectedResourceMetadataUrl, new URL(_0x238dff)) });
|
|
544
528
|
};
|
|
545
|
-
const createAuthCallbackRouter = (
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
return
|
|
529
|
+
const createAuthCallbackRouter = (_0x17454d, ..._0x53ce66) => {
|
|
530
|
+
const _0x30326c = _0xe43874, _0x5f5665 = {};
|
|
531
|
+
_0x5f5665["XUwJv"] = function(_0x3f35fc, _0x3299fc) {
|
|
532
|
+
return _0x3f35fc && _0x3299fc;
|
|
549
533
|
};
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
else
|
|
534
|
+
const _0x22d48d = _0x5f5665, _0x41b8f7 = _0x3b4ea9["Router"](), _0x388e64 = /* @__PURE__ */ new Map();
|
|
535
|
+
_0x41b8f7["get"](_0x17454d, _0x3b4ea9["json"](), (_0x14c802, _0x267c78) => {
|
|
536
|
+
const _0x58962f = _0x249d, _0x278763 = _0x249d, { code: _0x2440fe, state: _0x2e9b9f, error: _0x2b16d7 } = _0x14c802[_0x58962f(253)];
|
|
537
|
+
if (_0x22d48d[_0x58962f(282)](_0x2440fe, _0x2e9b9f)) _0x388e64["set"](_0x2e9b9f, _0x2440fe), _0x267c78["json"]({});
|
|
538
|
+
else _0x2b16d7 && _0x267c78[_0x278763(221)](-5182 * 1 + 1 * 8606 + -3024)["send"](_0x278763(278) + _0x2b16d7);
|
|
555
539
|
});
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
} else
|
|
540
|
+
const _0x42e771 = [_0x3b4ea9["json"](), ..._0x53ce66, (_0x3c82ed, _0x3494a0) => {
|
|
541
|
+
const _0x5f100c = _0x249d, { state: _0x32e61a } = _0x3c82ed["body"];
|
|
542
|
+
if (_0x32e61a && _0x388e64["has"](_0x32e61a)) {
|
|
543
|
+
const _0x537ab6 = _0x388e64["get"](_0x32e61a);
|
|
544
|
+
_0x388e64["delete"](_0x32e61a);
|
|
545
|
+
const _0x654ab8 = {};
|
|
546
|
+
_0x654ab8["code"] = _0x537ab6, _0x3494a0["json"](_0x654ab8);
|
|
547
|
+
} else _0x3494a0[_0x5f100c(221)](-3066 * -1 + -3516 + -850 * -1)["send"]("No authorization code found for state: " + _0x32e61a);
|
|
564
548
|
}];
|
|
565
|
-
return
|
|
549
|
+
return _0x41b8f7[_0x30326c(243)](_0x17454d, ..._0x42e771), _0x41b8f7;
|
|
566
550
|
};
|
|
567
|
-
const metadataHandler = (
|
|
568
|
-
const
|
|
569
|
-
return
|
|
570
|
-
}, "
|
|
571
|
-
return
|
|
572
|
-
|
|
573
|
-
|
|
551
|
+
const metadataHandler = (_0x5df121) => {
|
|
552
|
+
const _0x3a5bac = _0x3c4c4b, _0x89aaf2 = _0x3c4c4b, _0x6fbdb1 = { "MpGmT": function(_0x2d3620, _0x23bbdc) {
|
|
553
|
+
return _0x2d3620(_0x23bbdc);
|
|
554
|
+
}, "vILMJ": _0x3a5bac(256) }, _0x3a53c5 = _0x3b4ea9[_0x89aaf2(230)]();
|
|
555
|
+
return _0x3a53c5[_0x3a5bac(279)](_0x3ff0bd()), _0x3a53c5[_0x3a5bac(279)](_0x6fbdb1["MpGmT"](allowedMethods, [_0x6fbdb1[_0x89aaf2(229)]])), _0x3a53c5[_0x3a5bac(279)]("/", (_0x489ab3, _0x3f55a2) => {
|
|
556
|
+
const _0x54085b = _0x89aaf2;
|
|
557
|
+
_0x3f55a2[_0x54085b(221)](2107 + -9895 * -1 + 2 * -5901)["json"](_0x5df121);
|
|
558
|
+
}), _0x3a53c5;
|
|
574
559
|
};
|
|
575
|
-
const createAuthMetadataRouter = (
|
|
576
|
-
const
|
|
577
|
-
return
|
|
578
|
-
}
|
|
579
|
-
|
|
560
|
+
const createAuthMetadataRouter = (_0x413313, _0x2ef4ff, _0x34eb23) => {
|
|
561
|
+
const _0xc6727a = _0x3c4c4b, _0x8e98bb = _0xe43874, _0x3d56f8 = { "VbkeF": function(_0x3634c9, _0x2927af) {
|
|
562
|
+
return _0x3634c9(_0x2927af);
|
|
563
|
+
}, "VoqUG": function(_0x24dbd6, _0x30040d) {
|
|
564
|
+
return _0x24dbd6(_0x30040d);
|
|
565
|
+
}, "tpdlC": function(_0x55324a, _0x5c43ea) {
|
|
566
|
+
return _0x55324a(_0x5c43ea);
|
|
567
|
+
} }, _0x2d20da = _0x3b4ea9["Router"](), _0x37ed34 = _0x3d56f8["VbkeF"](createOAuthMetadata, { "provider": _0x413313, "issuerUrl": new URL(_0x2ef4ff) }), _0x166518 = { "resource": new URL(_0x34eb23)["href"], "authorization_servers": [_0x37ed34[_0xc6727a(274)]] };
|
|
568
|
+
return _0x2d20da["use"](_0xc6727a(260), _0x3d56f8[_0x8e98bb(295)](metadataHandler, _0x166518)), _0x2d20da["use"](_0x8e98bb(262), _0x3d56f8["tpdlC"](metadataHandler, _0x37ed34)), _0x2d20da;
|
|
580
569
|
};
|
|
581
|
-
const createAuthRouter = (
|
|
582
|
-
|
|
583
|
-
return _0x1d197b(_0x2d00b8);
|
|
584
|
-
} };
|
|
585
|
-
return _0xb2fb2b["GKiYF"](mcpAuthRouter, _0x503c8b);
|
|
570
|
+
const createAuthRouter = (_0x22196d) => {
|
|
571
|
+
return mcpAuthRouter(_0x22196d);
|
|
586
572
|
};
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
573
|
+
function _0x4684() {
|
|
574
|
+
const _0x1541a9 = ["/.well-known/oauth-protected-resource", "RCEuG", "/.well-known/oauth-authorization-server", "expiresAt", "7KjLRvp", "generateAuthorizationCode", "saveRefreshToken", "qUaqe", "generateRefreshToken", "JzexV", "set", "zQDvg", "saveAccessToken", "params", "issuer", "Authorization code was not issued to this client: ", "Refresh token was not issued to this client: ", "token", "OAuth authorization failed: ", "use", "client", "isRevoked", "XUwJv", "revokeAccessToken", "refreshTokensStore", "tVRuV", "scope", "200306JLaqFy", "split", "getCodeDate", "1166574pWmdds", "488801NTRbRY", "verifyAccessToken", ", got: ", "JIFCu", "VoqUG", "Unsupported token type hint: ", "codesStore", "Token is invalid", "cegXx", "getClient", "taYfN", "Resource Indicator (RFC8707) missing", "getAccessToken", "generateAccessToken", "clients", "1232dCaLzQ", "exp", "challengeForAuthorizationCode", "status", "28916BWqlor", "jCdyX", "Invalid authorization code for this client: ", "refreshTokenExpiresIn", "client_id", "redirect", "50008pDBaSY", "vILMJ", "Router", "accessTokensStore", "deleteCodeData", "Access token is invalid or does not belong to this client: ", "revokeRefreshToken", "now", "aud", "resource", "join", "token_type_hint", "saveClient", "scopes", "refreshTokens", "post", "delete", "gnySI", "randomBytes", "318lXUBXF", "3529785QLPjOU", "codes", "333wOKJhm", "adLAw", "43240HivtQs", "query", "get", "clientId", "GET", "accessTokenExpiresIn", "toString", "accessTokens"];
|
|
575
|
+
_0x4684 = function() {
|
|
576
|
+
return _0x1541a9;
|
|
577
|
+
};
|
|
578
|
+
return _0x4684();
|
|
579
|
+
}
|
|
580
|
+
const _0x4d15c2 = _0x27a6, _0x969375 = _0x27a6;
|
|
581
|
+
function _0x27a6(_0x578df3, _0x35c841) {
|
|
582
|
+
const _0x481407 = _0x38cb();
|
|
583
|
+
return _0x27a6 = function(_0x283e3d, _0x3a92a3) {
|
|
584
|
+
_0x283e3d = _0x283e3d - (-1 * 6333 + 36 * 5 + 6418);
|
|
585
|
+
let _0x135a03 = _0x481407[_0x283e3d];
|
|
586
|
+
return _0x135a03;
|
|
587
|
+
}, _0x27a6(_0x578df3, _0x35c841);
|
|
588
|
+
}
|
|
589
|
+
(function(_0x31a920, _0x4c86d0) {
|
|
590
|
+
const _0x3465cf = _0x27a6, _0x1eb74e = _0x27a6, _0x310b10 = _0x31a920();
|
|
590
591
|
while (!![]) {
|
|
591
592
|
try {
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
else
|
|
595
|
-
} catch (
|
|
596
|
-
|
|
593
|
+
const _0x852137 = parseInt(_0x3465cf(335)) / (-9797 + 2 * -3769 + 17336) + parseInt(_0x1eb74e(327)) / (6244 + 1 * -3805 + -2437) * (-parseInt(_0x1eb74e(265)) / (1614 * 6 + 394 * -14 + -4165)) + -parseInt(_0x1eb74e(267)) / (6360 + -4663 + -1693) + -parseInt(_0x1eb74e(341)) / (-7380 + 71 * 89 + 1066) * (-parseInt(_0x3465cf(269)) / (26 * -61 + -2057 + 3649)) + parseInt(_0x1eb74e(295)) / (-6095 + 2865 + 1079 * 3) * (parseInt(_0x3465cf(376)) / (-4799 + -1 * -7804 + 111 * -27)) + -parseInt(_0x3465cf(290)) / (7027 * 1 + -9504 + 22 * 113) * (parseInt(_0x1eb74e(387)) / (-122 * 34 + 497 * 1 + 3661)) + parseInt(_0x1eb74e(272)) / (-168 * 25 + -1 * 7059 + -490 * -23);
|
|
594
|
+
if (_0x852137 === _0x4c86d0) break;
|
|
595
|
+
else _0x310b10["push"](_0x310b10["shift"]());
|
|
596
|
+
} catch (_0x291175) {
|
|
597
|
+
_0x310b10["push"](_0x310b10["shift"]());
|
|
597
598
|
}
|
|
598
599
|
}
|
|
599
|
-
})(
|
|
600
|
-
function
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
}, _0x2f7b(_0x37a693, _0x3ad569);
|
|
600
|
+
})(_0x38cb, -2 * -58043 + -126232 + 773259 * 1);
|
|
601
|
+
function _0x38cb() {
|
|
602
|
+
const _0x45165b = ["handleSseInspector", "completions", "write", "GET", "mcp-sse-proxy-server", "stream-session-id", "EMxHT", "lGlsW", "elicitation", "No client found for session ID ", "1.0.0", "server", "jsonrpc", "9zXbOds", "mcp-stream-twin-client", "zPeZJ", "error", "StreamableHTTP", "7xwxkmh", "value", "details", "qmRGt", "headersSent", "Missing bearer token", "Allow", "auth", "sampling", "code", "headers", "set", "end", "handleSseProxy", "vXsBf", "onclose", "rzmhK", "IQrpu", "name", "tools", "logging", "tGtcf", "jWXaz", "ping", "WWWVd", "sessionId", "shouldClose", "handleStreamInspector", "mcpServer", "onerror", "version", "OrrCz", "2qfrvTF", "mcp-sse-twin-client", "qCTJV", "roots", "verify", "DELETE", "prompts", "resolve", "351221WUbiFl", "body", "Internal server error", "close", "sse-session-id", "resources", "7421345YmxeKP", "_sessionId", "kpQjh", "length", "json", "IkWeJ", "tMQIg", "user", "qoKBW", "SSE", "connect", "protocolVersion", "handleRequest", "Invalid or missing session ID", "method", "DhEmq", "referer", "forEach", "send", "capabilities", "map", "listChanged", "client", "EjXtZ", "randomUUID", "allSettled", "message", "push", "nKUoO", "authorization", "handlePostMessage", "handleSseMessage", "JCqRL", "keys", "values", "3533736LEKWWc", "user-agent", "_sseResponse", "ZEsCW", "SRmvJ", "addRequestListener", "afterInit", "reset", "status", "subscribe", "query", "9647270CJAnSA", "Method not allowed.", "awHjn", "sessionIdGenerator", "3685938AqsJHp", "xYsEG", "5660264afuFcU", "IxQwK", "6dExhCA", "zxoAS", "removeRequestListener", "23037795NgAckT", "BDeTx", "sHVfg", "trzfV", "dLhvm"];
|
|
603
|
+
_0x38cb = function() {
|
|
604
|
+
return _0x45165b;
|
|
605
|
+
};
|
|
606
|
+
return _0x38cb();
|
|
607
607
|
}
|
|
608
|
-
const auth = ({ secret:
|
|
608
|
+
const auth = ({ secret: _0x13b538 }) => (_0x5ab11b, _0x46174f, _0x2f7802) => {
|
|
609
609
|
var _a;
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
if (!
|
|
614
|
-
|
|
610
|
+
const _0x348030 = _0x27a6, _0x123859 = _0x27a6, _0x4cc780 = { "gjxBL": _0x348030(300), "BDeTx": function(_0x294845) {
|
|
611
|
+
return _0x294845();
|
|
612
|
+
}, "JCqRL": "Invalid bearer token" }, _0x57b212 = (_a = _0x5ab11b[_0x348030(305)][_0x348030(370)]) == null ? void 0 : _a["split"](" ")[-4745 + 4444 + -1 * -302];
|
|
613
|
+
if (!_0x57b212) {
|
|
614
|
+
_0x46174f[_0x123859(384)](232 * 6 + 2267 + -3258)["send"](_0x4cc780["gjxBL"]);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
617
|
try {
|
|
618
|
-
|
|
619
|
-
} catch (
|
|
620
|
-
const
|
|
621
|
-
|
|
618
|
+
_0x5ab11b[_0x123859(348)] = _0xb6e97a[_0x348030(331)](_0x57b212, _0x13b538), _0x4cc780[_0x348030(273)](_0x2f7802);
|
|
619
|
+
} catch (_0x47bca2) {
|
|
620
|
+
const _0x48ecab = {};
|
|
621
|
+
_0x48ecab[_0x348030(293)] = _0x4cc780[_0x123859(373)], _0x48ecab[_0x123859(297)] = _0x47bca2[_0x348030(367)], _0x46174f[_0x123859(384)](17 * -169 + 1848 * -2 + 6972)["json"](_0x48ecab);
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
-
const getDeviceInfo = (
|
|
625
|
-
const
|
|
626
|
-
return
|
|
624
|
+
const getDeviceInfo = (_0x149038) => ({ "ip": _0x149038["headers"]["x-forwarded-for"] || _0x149038["ip"] || "", "userAgent": _0x149038[_0x4d15c2(305)][_0x969375(377)] || "", "acceptLanguage": _0x149038[_0x969375(305)]["accept-language"] || "", "referer": _0x149038[_0x969375(305)][_0x969375(357)] || "" }), forwardProxyServer = (_0x1e276c, _0x19a185) => {
|
|
625
|
+
const _0x20e5b9 = _0x969375, _0x13bc4d = { "jWXaz": function(_0x10bfe8, _0x36d00b, _0x142672) {
|
|
626
|
+
return _0x10bfe8(_0x36d00b, _0x142672);
|
|
627
|
+
}, "KfZbo": function(_0x3478f5, _0x3baeb0, _0x2019f4) {
|
|
628
|
+
return _0x3478f5(_0x3baeb0, _0x2019f4);
|
|
627
629
|
} };
|
|
628
|
-
forwardServerOnRequest(
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
const
|
|
632
|
-
|
|
630
|
+
forwardServerOnRequest(_0x1e276c, _0x19a185), _0x13bc4d[_0x20e5b9(317)](forwardServerOnNotification, _0x1e276c, _0x19a185);
|
|
631
|
+
const _0x2b323f = _0x13bc4d["jWXaz"](forwardClientOnRequest, _0x19a185, _0x1e276c), _0x4715fe = _0x13bc4d["KfZbo"](forwardClientOnNotification, _0x19a185, _0x1e276c);
|
|
632
|
+
_0x19a185[_0x20e5b9(381)](_0x2b323f), _0x19a185["addNotificationListener"](_0x4715fe), _0x1e276c["onclose"] = () => {
|
|
633
|
+
const _0x119dbd = _0x20e5b9;
|
|
634
|
+
_0x19a185[_0x119dbd(271)](_0x2b323f), _0x19a185["removeNotificationListener"](_0x4715fe);
|
|
633
635
|
};
|
|
634
|
-
}, initTwinClientHandler = (
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
const _0x53ea52 = _0x25f58a, _0x5ed97b = {};
|
|
649
|
-
_0x5ed97b[_0x29f855(336)] = _0x29f855(397), _0x5ed97b[_0x29f855(310)] = "1.0.0", _0x54589c["_requestHandlers"]["set"](_0x3cd2f9["IcHpP"], (_0x3b61ef) => ({ "protocolVersion": _0x3b61ef[_0x29f855(430)]["protocolVersion"], "capabilities": _0x53ea52, "serverInfo": _0x5ed97b })), _0x54589c[_0x29f855(332)]["set"](_0x3cd2f9["XovhO"], () => {
|
|
636
|
+
}, initTwinClientHandler = (_0x2ad7a3, _0x1154c9) => {
|
|
637
|
+
const _0x1c937a = _0x4d15c2, _0x342b40 = {};
|
|
638
|
+
_0x342b40["UFacz"] = "initialize", _0x342b40["zPeZJ"] = "notifications/initialized", _0x342b40[_0x1c937a(349)] = "event: close\ndata: \n\n";
|
|
639
|
+
const _0x56464f = _0x342b40, _0x36e58a = () => {
|
|
640
|
+
const _0x70f09d = _0x1c937a, _0x4824c9 = _0x1c937a, _0x5a1392 = {};
|
|
641
|
+
_0x5a1392[_0x70f09d(362)] = !![];
|
|
642
|
+
const _0x45d212 = {};
|
|
643
|
+
_0x45d212[_0x70f09d(385)] = !![], _0x45d212[_0x70f09d(362)] = !![];
|
|
644
|
+
const _0x532829 = {};
|
|
645
|
+
_0x532829["listChanged"] = !![];
|
|
646
|
+
const _0x2c89b9 = {};
|
|
647
|
+
_0x2c89b9["prompts"] = _0x5a1392, _0x2c89b9["resources"] = _0x45d212, _0x2c89b9[_0x4824c9(314)] = _0x532829, _0x2c89b9["completions"] = {}, _0x2c89b9["logging"] = {};
|
|
648
|
+
const _0x104a35 = _0x2c89b9, _0xac6e72 = {};
|
|
649
|
+
_0xac6e72[_0x4824c9(313)] = "mcp-server", _0xac6e72["version"] = _0x70f09d(287), _0x2ad7a3["_requestHandlers"][_0x4824c9(306)](_0x56464f["UFacz"], (_0x3c68dc) => ({ "protocolVersion": _0x3c68dc["params"][_0x70f09d(352)], "capabilities": _0x104a35, "serverInfo": _0xac6e72 })), _0x2ad7a3["_notificationHandlers"][_0x70f09d(306)](_0x56464f[_0x70f09d(292)], () => {
|
|
650
650
|
});
|
|
651
|
-
},
|
|
652
|
-
const
|
|
653
|
-
|
|
651
|
+
}, _0x27a111 = () => {
|
|
652
|
+
const _0x18133e = {};
|
|
653
|
+
_0x18133e["lUgOo"] = _0x56464f["qoKBW"];
|
|
654
|
+
const _0x40723e = _0x18133e;
|
|
655
|
+
_0x1154c9 instanceof SSEServerTransport && (_0x1154c9["close"] = () => {
|
|
654
656
|
var _a, _b;
|
|
655
|
-
const
|
|
656
|
-
return (_a =
|
|
657
|
+
const _0x4e33f3 = _0x27a6, _0x49e16e = _0x27a6;
|
|
658
|
+
return (_a = _0x1154c9[_0x4e33f3(378)]) == null ? void 0 : _a[_0x4e33f3(279)](_0x40723e["lUgOo"])["end"](), _0x1154c9[_0x4e33f3(378)] = void 0, (_b = _0x1154c9[_0x49e16e(310)]) == null ? void 0 : _b.call(_0x1154c9), Promise[_0x4e33f3(334)]();
|
|
657
659
|
});
|
|
658
|
-
},
|
|
659
|
-
|
|
660
|
+
}, _0x268bfe = {};
|
|
661
|
+
_0x268bfe["beforeInit"] = _0x36e58a, _0x268bfe[_0x1c937a(382)] = _0x27a111, initClientHandler(_0x2ad7a3, _0x268bfe);
|
|
660
662
|
};
|
|
661
663
|
const useProxyHandles = () => {
|
|
662
|
-
const
|
|
663
|
-
return
|
|
664
|
-
}, "
|
|
665
|
-
return
|
|
666
|
-
}, "
|
|
667
|
-
return
|
|
668
|
-
}, "
|
|
669
|
-
return
|
|
670
|
-
}, "
|
|
671
|
-
return
|
|
672
|
-
}, "
|
|
673
|
-
return
|
|
674
|
-
}, "
|
|
675
|
-
return
|
|
676
|
-
}, "
|
|
677
|
-
return
|
|
678
|
-
}, "
|
|
679
|
-
return
|
|
680
|
-
}, "
|
|
681
|
-
return
|
|
682
|
-
}, "
|
|
683
|
-
return
|
|
684
|
-
}, "
|
|
685
|
-
return
|
|
686
|
-
}, "
|
|
687
|
-
return
|
|
688
|
-
}, "
|
|
689
|
-
return
|
|
690
|
-
}, "
|
|
691
|
-
return
|
|
692
|
-
}, "
|
|
693
|
-
return
|
|
694
|
-
} },
|
|
695
|
-
let
|
|
664
|
+
const _0x356f5f = _0x4d15c2, _0xa78d72 = _0x4d15c2, _0x521a3b = { "IQrpu": function(_0x3297db, _0x3a018a) {
|
|
665
|
+
return _0x3297db(_0x3a018a);
|
|
666
|
+
}, "vXsBf": _0x356f5f(350), "kLinO": _0x356f5f(339), "PbSkZ": _0x356f5f(338), "SRmvJ": _0x356f5f(328), "xYsEG": _0x356f5f(287), "WOwsg": function(_0x579f29, _0x325946) {
|
|
667
|
+
return _0x579f29(_0x325946);
|
|
668
|
+
}, "XabnH": function(_0x51bf20, _0xe5ae99, _0x2d0b2d) {
|
|
669
|
+
return _0x51bf20(_0xe5ae99, _0x2d0b2d);
|
|
670
|
+
}, "zxoAS": _0xa78d72(281), "EMxHT": function(_0x3ef8bf, _0x5b8003) {
|
|
671
|
+
return _0x3ef8bf(_0x5b8003);
|
|
672
|
+
}, "OrrCz": function(_0x319a63, _0x15923f, _0xe8bd8a) {
|
|
673
|
+
return _0x319a63(_0x15923f, _0xe8bd8a);
|
|
674
|
+
}, "DhEmq": function(_0x4e94c5, _0x54cd90) {
|
|
675
|
+
return _0x4e94c5 === _0x54cd90;
|
|
676
|
+
}, "nKUoO": "POST", "qCTJV": function(_0x1f594f, _0x1156ea, _0x42bb77) {
|
|
677
|
+
return _0x1f594f(_0x1156ea, _0x42bb77);
|
|
678
|
+
}, "IkWeJ": _0xa78d72(280), "tMQIg": _0x356f5f(332), "dLhvm": "GET, POST, DELETE", "VenRq": "2.0", "rzmhK": "mcp-session-id", "CGiaz": function(_0x3e93de, _0x145817) {
|
|
679
|
+
return _0x3e93de === _0x145817;
|
|
680
|
+
}, "peXdP": _0xa78d72(291), "qmRGt": function(_0x3970f6, _0x1d1f1c, _0x48f8ed) {
|
|
681
|
+
return _0x3970f6(_0x1d1f1c, _0x48f8ed);
|
|
682
|
+
}, "kpQjh": "Bad Request: No valid session ID provided", "xqeyg": _0x356f5f(337), "tGtcf": function(_0x14a423, _0x32173d, _0x46874a) {
|
|
683
|
+
return _0x14a423(_0x32173d, _0x46874a);
|
|
684
|
+
}, "WWWVd": function(_0x4f62f6, _0x212b31) {
|
|
685
|
+
return _0x4f62f6 === _0x212b31;
|
|
686
|
+
}, "sHVfg": function(_0x28831d, _0x45369b) {
|
|
687
|
+
return _0x28831d === _0x45369b;
|
|
688
|
+
}, "ZEsCW": function(_0x137c6a, _0xae6e0e, _0x7a3e7b) {
|
|
689
|
+
return _0x137c6a(_0xae6e0e, _0x7a3e7b);
|
|
690
|
+
}, "wYJPs": function(_0x12d2c0, _0x3f276d) {
|
|
691
|
+
return _0x12d2c0 === _0x3f276d;
|
|
692
|
+
}, "EjXtZ": "mcp-stream-proxy-server", "IxQwK": "StreamableHTTP", "RDJUO": function(_0x19bd22, _0x4c91b4) {
|
|
693
|
+
return _0x19bd22 !== _0x4c91b4;
|
|
694
|
+
}, "PgxKv": function(_0x374c6d, _0x1ceeaf) {
|
|
695
|
+
return _0x374c6d === _0x1ceeaf;
|
|
696
|
+
}, "SUhnQ": "fulfilled" }, _0xca7918 = {}, _0x2b58e6 = {}, _0x2d370c = {}, _0x4a2f0f = {};
|
|
697
|
+
let _0x2b6c8f = () => {
|
|
696
698
|
};
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
+
const _0x3d2fa1 = (_0x3df710) => {
|
|
700
|
+
_0x2b6c8f = _0x3df710;
|
|
699
701
|
};
|
|
700
|
-
let
|
|
702
|
+
let _0x595907 = () => {
|
|
701
703
|
};
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
},
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
|
|
704
|
+
const _0x223176 = (_0x51fe0e) => {
|
|
705
|
+
_0x595907 = _0x51fe0e;
|
|
706
|
+
}, _0x517e01 = async (_0x12d335, _0x29f340, _0x1cae8b) => {
|
|
707
|
+
const _0x240115 = _0x356f5f, _0x27d88a = _0xa78d72, _0x4e6fba = new SSEServerTransport(_0x1cae8b, _0x29f340), _0x117b22 = _0x12d335[_0x240115(305)][_0x521a3b["kLinO"]];
|
|
708
|
+
_0x117b22 && (_0x4e6fba[_0x240115(342)] = _0x117b22);
|
|
709
|
+
const _0x5ec0b6 = _0x4e6fba[_0x27d88a(320)];
|
|
710
|
+
_0xca7918[_0x5ec0b6] = _0x4e6fba, _0x12d335["on"](_0x521a3b["PbSkZ"], () => {
|
|
711
|
+
const _0x1bb0e2 = _0x27d88a;
|
|
712
|
+
_0x4e6fba[_0x1bb0e2(338)](), delete _0xca7918[_0x5ec0b6], delete _0x2b58e6[_0x5ec0b6];
|
|
711
713
|
});
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
}, initTwinClientHandler
|
|
731
|
-
},
|
|
714
|
+
const _0x1c15d3 = {};
|
|
715
|
+
_0x1c15d3["listChanged"] = !![];
|
|
716
|
+
const _0x345732 = {};
|
|
717
|
+
_0x345732[_0x27d88a(385)] = !![], _0x345732["listChanged"] = !![];
|
|
718
|
+
const _0x1cd3ac = {};
|
|
719
|
+
_0x1cd3ac[_0x240115(362)] = !![];
|
|
720
|
+
const _0x2072d8 = {};
|
|
721
|
+
_0x2072d8["listChanged"] = !![];
|
|
722
|
+
const _0x39f2d8 = {};
|
|
723
|
+
_0x39f2d8[_0x27d88a(333)] = _0x1c15d3, _0x39f2d8["resources"] = _0x345732, _0x39f2d8[_0x27d88a(314)] = _0x1cd3ac, _0x39f2d8[_0x240115(278)] = {}, _0x39f2d8[_0x27d88a(315)] = {}, _0x39f2d8[_0x240115(330)] = _0x2072d8, _0x39f2d8[_0x27d88a(303)] = {}, _0x39f2d8[_0x240115(285)] = {};
|
|
724
|
+
const _0x229650 = _0x39f2d8, _0x4cd952 = {};
|
|
725
|
+
_0x4cd952["name"] = _0x521a3b[_0x27d88a(380)], _0x4cd952[_0x27d88a(325)] = _0x521a3b[_0x240115(266)];
|
|
726
|
+
const _0x1b1021 = {};
|
|
727
|
+
_0x1b1021[_0x27d88a(360)] = _0x229650;
|
|
728
|
+
const _0x28a162 = new Client(_0x4cd952, _0x1b1021);
|
|
729
|
+
_0x2b58e6[_0x5ec0b6] = { "client": _0x28a162, "transport": _0x4e6fba, "user": _0x12d335[_0x240115(302)] || _0x12d335[_0x240115(348)], "device": _0x521a3b["WOwsg"](getDeviceInfo, _0x12d335), "type": _0x27d88a(350) }, _0x4e6fba["onerror"] = (_0x5cd65c) => {
|
|
730
|
+
const _0x2ac346 = _0x240115;
|
|
731
|
+
_0x521a3b["IQrpu"](_0x2b6c8f, { "client": _0x28a162, "transport": _0x4e6fba, "error": _0x5cd65c, "type": _0x521a3b[_0x2ac346(309)] });
|
|
732
|
+
}, _0x521a3b["XabnH"](initTwinClientHandler, _0x28a162, _0x4e6fba), await _0x28a162["connect"](_0x4e6fba);
|
|
733
|
+
}, _0xd3034b = async (_0x162351, _0x32540f, _0x44723c) => {
|
|
732
734
|
var _a;
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
735
|
+
const _0x4dff13 = _0xa78d72, _0x2f79ac = _0xa78d72, _0x2ef0b0 = { "XbcEv": function(_0x51da5a, _0x12e9fd) {
|
|
736
|
+
return _0x51da5a(_0x12e9fd);
|
|
737
|
+
}, "BigXJ": _0x521a3b[_0x4dff13(309)] }, _0x2de9da = _0x162351["query"][_0x4dff13(320)], _0x3805e8 = (_a = _0x2b58e6[_0x2de9da]) == null ? void 0 : _a[_0x2f79ac(363)];
|
|
738
|
+
if (!_0x3805e8) {
|
|
739
|
+
_0x32540f[_0x4dff13(384)](9880 + 7565 + -487 * 35)[_0x2f79ac(359)](_0x2f79ac(286) + _0x2de9da);
|
|
736
740
|
return;
|
|
737
741
|
}
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
|
|
742
|
+
const _0x1fccb8 = new SSEServerTransport(_0x44723c, _0x32540f), _0x56c90f = _0x1fccb8[_0x2f79ac(320)];
|
|
743
|
+
_0x2d370c[_0x56c90f] = _0x1fccb8, _0x162351["on"]("close", () => {
|
|
744
|
+
const _0x48fdc1 = _0x2f79ac;
|
|
745
|
+
_0x1fccb8[_0x48fdc1(338)](), delete _0x2d370c[_0x56c90f], delete _0x4a2f0f[_0x56c90f];
|
|
741
746
|
});
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
747
|
+
const _0x2efd88 = {};
|
|
748
|
+
_0x2efd88[_0x4dff13(362)] = !![];
|
|
749
|
+
const _0x39b90e = {};
|
|
750
|
+
_0x39b90e["subscribe"] = !![], _0x39b90e[_0x4dff13(362)] = !![];
|
|
751
|
+
const _0x3ee090 = {};
|
|
752
|
+
_0x3ee090[_0x4dff13(362)] = !![];
|
|
753
|
+
const _0x4f625d = {};
|
|
754
|
+
_0x4f625d[_0x2f79ac(333)] = _0x2efd88, _0x4f625d["resources"] = _0x39b90e, _0x4f625d["tools"] = _0x3ee090, _0x4f625d[_0x2f79ac(278)] = {}, _0x4f625d[_0x2f79ac(315)] = {};
|
|
755
|
+
const _0x52a4f6 = _0x4f625d, _0x260186 = {};
|
|
756
|
+
_0x260186[_0x2f79ac(313)] = _0x521a3b[_0x2f79ac(270)], _0x260186[_0x2f79ac(325)] = _0x521a3b[_0x2f79ac(266)];
|
|
757
|
+
const _0x535777 = {};
|
|
758
|
+
_0x535777["capabilities"] = _0x52a4f6;
|
|
759
|
+
const _0xfee25f = new McpServer(_0x260186, _0x535777);
|
|
760
|
+
_0x4a2f0f[_0x56c90f] = { "mcpServer": _0xfee25f, "transport": _0x1fccb8, "client": _0x2de9da, "user": _0x162351[_0x4dff13(302)] || _0x162351["user"], "device": _0x521a3b["EMxHT"](getDeviceInfo, _0x162351), "type": _0x521a3b[_0x2f79ac(309)] }, _0x1fccb8["onerror"] = (_0x1e2887) => {
|
|
761
|
+
_0x2ef0b0["XbcEv"](_0x595907, { "mcpServer": _0xfee25f, "transport": _0x1fccb8, "client": _0x2de9da, "error": _0x1e2887, "type": _0x2ef0b0["BigXJ"] });
|
|
762
|
+
}, await _0xfee25f["connect"](_0x1fccb8), _0x521a3b[_0x2f79ac(326)](forwardProxyServer, _0xfee25f[_0x4dff13(288)], _0x3805e8);
|
|
763
|
+
}, _0x169d65 = async (_0x3a8589, _0x51fa73) => {
|
|
764
|
+
const _0x491692 = _0x356f5f, _0x5d63a5 = _0x356f5f, _0x13164a = _0x3a8589[_0x491692(386)][_0x5d63a5(320)], _0xeb9fff = _0xca7918[_0x13164a] || _0x2d370c[_0x13164a];
|
|
765
|
+
_0xeb9fff ? await _0xeb9fff[_0x491692(371)](_0x3a8589, _0x51fa73) : _0x51fa73[_0x491692(384)](-5 * -1503 + -1 * -3534 + -10649)[_0x5d63a5(359)]("No transport found");
|
|
766
|
+
}, _0x54856e = async (_0x389c72, _0x91a3f6) => {
|
|
767
|
+
const _0x19c7f8 = _0x356f5f, _0x3d83a4 = _0x356f5f;
|
|
768
|
+
if (_0x521a3b[_0x19c7f8(356)](_0x389c72[_0x19c7f8(355)], _0x521a3b[_0x3d83a4(369)])) await _0x521a3b[_0x19c7f8(329)](_0x3846f2, _0x389c72, _0x91a3f6);
|
|
769
|
+
else _0x389c72[_0x19c7f8(355)] === _0x521a3b[_0x3d83a4(346)] || _0x389c72["method"] === _0x521a3b["tMQIg"] ? await _0x521a3b["XabnH"](_0xa97d05, _0x389c72, _0x91a3f6) : await _0x521a3b["WOwsg"](_0x5177ff, _0x91a3f6);
|
|
770
|
+
}, _0x5177ff = async (_0x578ba5) => {
|
|
771
|
+
const _0x34c7fe = _0xa78d72, _0x5e3da9 = _0x356f5f, _0x3bdba1 = {};
|
|
772
|
+
_0x3bdba1[_0x34c7fe(301)] = _0x521a3b[_0x34c7fe(276)];
|
|
773
|
+
const _0x3f2b60 = {};
|
|
774
|
+
_0x3f2b60["code"] = -32e3, _0x3f2b60[_0x5e3da9(367)] = _0x34c7fe(388);
|
|
775
|
+
const _0x318b58 = {};
|
|
776
|
+
_0x318b58[_0x34c7fe(289)] = _0x521a3b["VenRq"], _0x318b58["error"] = _0x3f2b60, _0x318b58["id"] = null, _0x578ba5["writeHead"](-941 * -4 + 1607 + 13 * -382, _0x3bdba1)[_0x34c7fe(307)](JSON["stringify"](_0x318b58));
|
|
777
|
+
}, _0xa97d05 = async (_0x12307f, _0xb6cab3) => {
|
|
778
|
+
const _0x41e3a2 = _0xa78d72, _0x430834 = _0xa78d72, _0x5dd679 = _0x12307f["headers"][_0x521a3b["rzmhK"]], _0x2e32a7 = _0xca7918[_0x5dd679];
|
|
779
|
+
_0x2e32a7 ? (await _0x2e32a7[_0x41e3a2(353)](_0x12307f, _0xb6cab3), _0x521a3b["CGiaz"](_0x12307f["method"], _0x521a3b[_0x430834(347)]) && (delete _0xca7918[_0x5dd679], delete _0x2b58e6[_0x5dd679])) : _0xb6cab3[_0x430834(384)](5 * -467 + 1 * -2659 + -87 * -62)[_0x41e3a2(359)]("Invalid or missing session ID");
|
|
780
|
+
}, _0x3846f2 = async (_0x44f0a1, _0xe79278) => {
|
|
781
|
+
const _0x493add = _0xa78d72, _0x35133d = _0x356f5f, _0x5381fd = { "dCZKQ": function(_0x148016, _0x194075) {
|
|
782
|
+
return _0x148016(_0x194075);
|
|
783
|
+
}, "fmIVP": "StreamableHTTP" };
|
|
778
784
|
try {
|
|
779
|
-
const
|
|
780
|
-
let
|
|
781
|
-
if (
|
|
785
|
+
const _0x53c27d = _0x44f0a1["headers"][_0x521a3b["rzmhK"]], _0x333822 = _0x44f0a1["headers"][_0x493add(282)];
|
|
786
|
+
let _0x4284e0 = _0xca7918[_0x53c27d];
|
|
787
|
+
if (_0x4284e0) await _0x4284e0[_0x35133d(353)](_0x44f0a1, _0xe79278, _0x44f0a1["body"]);
|
|
782
788
|
else {
|
|
783
|
-
if (!
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
}, await _0x25c872[_0x13579d(312)](_0x4368f1), await _0x4368f1["handleRequest"](_0x3a639d, _0x5615a3, _0x3a639d[_0x13579d(377)]);
|
|
789
|
+
if (!_0x53c27d && isInitializeRequest(_0x44f0a1[_0x493add(336)])) {
|
|
790
|
+
const _0x3218a1 = {};
|
|
791
|
+
_0x3218a1["sessionIdGenerator"] = () => _0x333822, _0x4284e0 = new StreamableHTTPServerTransport(_0x3218a1);
|
|
792
|
+
const _0x413162 = {};
|
|
793
|
+
_0x413162[_0x35133d(362)] = !![];
|
|
794
|
+
const _0x31603f = {};
|
|
795
|
+
_0x31603f[_0x35133d(385)] = !![], _0x31603f[_0x35133d(362)] = !![];
|
|
796
|
+
const _0x1485b8 = {};
|
|
797
|
+
_0x1485b8[_0x35133d(362)] = !![];
|
|
798
|
+
const _0x1a92de = {};
|
|
799
|
+
_0x1a92de["listChanged"] = !![];
|
|
800
|
+
const _0x1240d3 = {};
|
|
801
|
+
_0x1240d3["prompts"] = _0x413162, _0x1240d3["resources"] = _0x31603f, _0x1240d3[_0x35133d(314)] = _0x1485b8, _0x1240d3[_0x35133d(278)] = {}, _0x1240d3[_0x35133d(315)] = {}, _0x1240d3["roots"] = _0x1a92de, _0x1240d3["sampling"] = {}, _0x1240d3[_0x493add(285)] = {};
|
|
802
|
+
const _0x521e2e = _0x1240d3, _0x13ab2f = {};
|
|
803
|
+
_0x13ab2f[_0x493add(313)] = _0x521a3b["peXdP"], _0x13ab2f["version"] = _0x521a3b[_0x35133d(266)];
|
|
804
|
+
const _0x437219 = {};
|
|
805
|
+
_0x437219[_0x493add(360)] = _0x521e2e;
|
|
806
|
+
const _0x3e728f = new Client(_0x13ab2f, _0x437219);
|
|
807
|
+
_0x521a3b[_0x35133d(298)](initTwinClientHandler, _0x3e728f, _0x4284e0), _0x2b58e6[_0x333822] = { "client": _0x3e728f, "transport": _0x4284e0, "user": _0x44f0a1["auth"] || _0x44f0a1["user"], "device": getDeviceInfo(_0x44f0a1), "type": _0x493add(294) }, _0xca7918[_0x333822] = _0x4284e0, _0x4284e0[_0x35133d(320)] = _0x333822, _0x4284e0["onclose"] = () => {
|
|
808
|
+
const _0x535e24 = _0x4284e0["sessionId"];
|
|
809
|
+
_0x535e24 && _0xca7918[_0x535e24] && (delete _0xca7918[_0x535e24], delete _0x2b58e6[_0x535e24]);
|
|
810
|
+
}, _0x4284e0["onerror"] = (_0x223810) => {
|
|
811
|
+
_0x5381fd["dCZKQ"](_0x2b6c8f, { "client": _0x3e728f, "transport": _0x4284e0, "error": _0x223810, "type": _0x5381fd["fmIVP"] });
|
|
812
|
+
}, await _0x3e728f["connect"](_0x4284e0), await _0x4284e0[_0x35133d(353)](_0x44f0a1, _0xe79278, _0x44f0a1[_0x493add(336)]);
|
|
808
813
|
} else {
|
|
809
|
-
const
|
|
810
|
-
|
|
814
|
+
const _0x54620f = {};
|
|
815
|
+
_0x54620f["jsonrpc"] = _0x521a3b["VenRq"], _0x54620f[_0x35133d(293)] = {}, _0x54620f["id"] = null, _0x54620f[_0x35133d(293)]["code"] = -(5 * -9497 + -63087 + 142572), _0x54620f[_0x35133d(293)]["message"] = _0x521a3b[_0x493add(343)], _0xe79278[_0x35133d(384)](67 * -2 + 5236 + -2351 * 2)[_0x35133d(345)](_0x54620f);
|
|
811
816
|
}
|
|
812
817
|
}
|
|
813
818
|
} catch {
|
|
814
|
-
if (!
|
|
815
|
-
const
|
|
816
|
-
|
|
819
|
+
if (!_0xe79278["headersSent"]) {
|
|
820
|
+
const _0x1bcec9 = {};
|
|
821
|
+
_0x1bcec9["jsonrpc"] = _0x521a3b["VenRq"], _0x1bcec9["error"] = {}, _0x1bcec9["id"] = null, _0x1bcec9["error"]["code"] = -32603, _0x1bcec9["error"]["message"] = _0x521a3b["xqeyg"], _0xe79278[_0x35133d(384)](-9495 + -496 * 16 + 17931)["json"](_0x1bcec9);
|
|
817
822
|
}
|
|
818
823
|
}
|
|
819
|
-
},
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
else
|
|
823
|
-
},
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
},
|
|
824
|
+
}, _0x274c7c = async (_0x58599f, _0x338f96) => {
|
|
825
|
+
const _0x7a6d7b = _0xa78d72, _0x438520 = _0x356f5f;
|
|
826
|
+
if (_0x521a3b["CGiaz"](_0x58599f[_0x7a6d7b(355)], "POST")) await _0x521a3b[_0x438520(316)](_0x322cdc, _0x58599f, _0x338f96);
|
|
827
|
+
else _0x521a3b[_0x438520(319)](_0x58599f[_0x438520(355)], _0x521a3b["IkWeJ"]) || _0x521a3b[_0x7a6d7b(274)](_0x58599f[_0x7a6d7b(355)], _0x521a3b["tMQIg"]) ? await _0x521a3b[_0x438520(379)](_0xc40260, _0x58599f, _0x338f96) : await _0x521a3b[_0x7a6d7b(312)](_0x5177ff, _0x338f96);
|
|
828
|
+
}, _0xc40260 = async (_0x34780f, _0xab6027) => {
|
|
829
|
+
const _0x58dfa5 = _0x356f5f, _0x3bf700 = _0xa78d72, _0x126f06 = _0x34780f[_0x58dfa5(305)][_0x521a3b[_0x58dfa5(311)]], _0x2f07f4 = _0x2d370c[_0x126f06];
|
|
830
|
+
_0x2f07f4 ? (await _0x2f07f4["handleRequest"](_0x34780f, _0xab6027), _0x521a3b["wYJPs"](_0x34780f["method"], _0x521a3b[_0x3bf700(347)]) && (delete _0x2d370c[_0x126f06], delete _0x4a2f0f[_0x126f06])) : _0xab6027["status"](13 * -49 + -7451 * 1 + 8488)[_0x58dfa5(359)](_0x3bf700(354));
|
|
831
|
+
}, _0x322cdc = async (_0x4b31e0, _0xa63506) => {
|
|
827
832
|
var _a;
|
|
828
|
-
const
|
|
833
|
+
const _0x95628c = _0xa78d72, _0x4aa102 = _0x356f5f, _0x298da4 = { "lGlsW": function(_0x3b1c26, _0x19dffb) {
|
|
834
|
+
return _0x3b1c26(_0x19dffb);
|
|
835
|
+
} };
|
|
829
836
|
try {
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
if (
|
|
837
|
+
const _0x2f863d = _0x4b31e0[_0x95628c(305)][_0x521a3b[_0x95628c(311)]], _0x5ece38 = _0x4b31e0["query"][_0x95628c(320)];
|
|
838
|
+
let _0x29b996 = _0x2d370c[_0x2f863d];
|
|
839
|
+
if (_0x29b996) await _0x29b996[_0x4aa102(353)](_0x4b31e0, _0xa63506, _0x4b31e0[_0x95628c(336)]);
|
|
833
840
|
else {
|
|
834
|
-
if (!
|
|
835
|
-
const
|
|
836
|
-
if (!
|
|
837
|
-
|
|
841
|
+
if (!_0x2f863d && _0x521a3b[_0x4aa102(283)](isInitializeRequest, _0x4b31e0["body"])) {
|
|
842
|
+
const _0x1b8d42 = (_a = _0x2b58e6[_0x5ece38]) == null ? void 0 : _a["client"];
|
|
843
|
+
if (!_0x1b8d42) {
|
|
844
|
+
_0xa63506[_0x95628c(384)](19 * 25 + 3 * -2417 + -26 * -276)["send"](_0x4aa102(286) + _0x5ece38);
|
|
838
845
|
return;
|
|
839
846
|
}
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
},
|
|
859
|
-
const
|
|
860
|
-
|
|
861
|
-
}, await
|
|
847
|
+
const _0x128afa = _0x15ecde[_0x95628c(365)](), _0x4f3b0b = {};
|
|
848
|
+
_0x4f3b0b[_0x4aa102(390)] = () => _0x128afa, _0x29b996 = new StreamableHTTPServerTransport(_0x4f3b0b);
|
|
849
|
+
const _0x30cb25 = {};
|
|
850
|
+
_0x30cb25["listChanged"] = !![];
|
|
851
|
+
const _0x171ff6 = {};
|
|
852
|
+
_0x171ff6[_0x4aa102(385)] = !![], _0x171ff6["listChanged"] = !![];
|
|
853
|
+
const _0x30475b = {};
|
|
854
|
+
_0x30475b[_0x4aa102(362)] = !![];
|
|
855
|
+
const _0x1a2841 = {};
|
|
856
|
+
_0x1a2841[_0x4aa102(333)] = _0x30cb25, _0x1a2841[_0x95628c(340)] = _0x171ff6, _0x1a2841[_0x4aa102(314)] = _0x30475b, _0x1a2841["completions"] = {}, _0x1a2841[_0x95628c(315)] = {};
|
|
857
|
+
const _0x29300a = _0x1a2841, _0x3ca8b0 = {};
|
|
858
|
+
_0x3ca8b0[_0x95628c(313)] = _0x521a3b[_0x95628c(364)], _0x3ca8b0[_0x4aa102(325)] = _0x521a3b[_0x4aa102(266)];
|
|
859
|
+
const _0x3c012b = {};
|
|
860
|
+
_0x3c012b[_0x95628c(360)] = _0x29300a;
|
|
861
|
+
const _0x22992e = new McpServer(_0x3ca8b0, _0x3c012b);
|
|
862
|
+
_0x4a2f0f[_0x128afa] = { "mcpServer": _0x22992e, "transport": _0x29b996, "client": _0x5ece38, "user": _0x4b31e0[_0x95628c(302)] || _0x4b31e0[_0x4aa102(348)], "device": _0x521a3b[_0x4aa102(312)](getDeviceInfo, _0x4b31e0), "type": _0x521a3b[_0x95628c(268)] }, _0x2d370c[_0x128afa] = _0x29b996, _0x29b996["sessionId"] = _0x128afa, _0x29b996[_0x95628c(310)] = () => {
|
|
863
|
+
const _0x47aa14 = _0x29b996["sessionId"];
|
|
864
|
+
_0x47aa14 && _0xca7918[_0x47aa14] && (delete _0x2d370c[_0x47aa14], delete _0x4a2f0f[_0x47aa14]);
|
|
865
|
+
}, _0x29b996[_0x95628c(324)] = (_0x4e7e1f) => {
|
|
866
|
+
const _0x57bf6c = _0x95628c, _0x2cfd65 = _0x95628c, _0x560100 = {};
|
|
867
|
+
_0x560100["mcpServer"] = _0x22992e, _0x560100["transport"] = _0x29b996, _0x560100[_0x57bf6c(363)] = _0x5ece38, _0x560100["error"] = _0x4e7e1f, _0x560100["type"] = "StreamableHTTP", _0x298da4[_0x2cfd65(284)](_0x595907, _0x560100);
|
|
868
|
+
}, await _0x22992e[_0x4aa102(351)](_0x29b996), _0x521a3b[_0x95628c(316)](forwardProxyServer, _0x22992e["server"], _0x1b8d42), await _0x29b996["handleRequest"](_0x4b31e0, _0xa63506, _0x4b31e0[_0x4aa102(336)]);
|
|
862
869
|
} else {
|
|
863
|
-
const
|
|
864
|
-
|
|
870
|
+
const _0x218e96 = {};
|
|
871
|
+
_0x218e96[_0x95628c(289)] = _0x521a3b["VenRq"], _0x218e96[_0x95628c(293)] = {}, _0x218e96["id"] = null, _0x218e96[_0x95628c(293)]["code"] = -(54708 + 22492 + -9040 * 5), _0x218e96[_0x95628c(293)]["message"] = _0x521a3b[_0x95628c(343)], _0xa63506["status"](-778 + 6428 + -1750 * 3)["json"](_0x218e96);
|
|
865
872
|
}
|
|
866
873
|
}
|
|
867
874
|
} catch {
|
|
868
|
-
if (!
|
|
869
|
-
const
|
|
870
|
-
|
|
875
|
+
if (!_0xa63506[_0x95628c(299)]) {
|
|
876
|
+
const _0x26347e = {};
|
|
877
|
+
_0x26347e[_0x4aa102(289)] = _0x521a3b["VenRq"], _0x26347e["error"] = {}, _0x26347e["id"] = null, _0x26347e["error"][_0x4aa102(304)] = -32603, _0x26347e["error"][_0x95628c(367)] = _0x521a3b["xqeyg"], _0xa63506[_0x4aa102(384)](-5734 + -3721 * 1 + 9955)["json"](_0x26347e);
|
|
871
878
|
}
|
|
872
879
|
}
|
|
873
|
-
},
|
|
874
|
-
const
|
|
880
|
+
}, _0x571656 = () => {
|
|
881
|
+
const _0x14abe7 = _0xa78d72, _0x4b90b3 = _0x356f5f;
|
|
875
882
|
try {
|
|
876
|
-
Object[
|
|
883
|
+
Object[_0x14abe7(375)](_0xca7918)[_0x4b90b3(358)]((_0x5aea61) => _0x5aea61["close"]()), Object["values"](_0x2d370c)["forEach"]((_0x494c93) => _0x494c93[_0x4b90b3(338)]()), Object[_0x14abe7(375)](_0x2b58e6)["forEach"]((_0x3792c4) => _0x3792c4[_0x4b90b3(363)][_0x4b90b3(338)]()), Object["values"](_0x4a2f0f)["forEach"]((_0x419b2c) => _0x419b2c["mcpServer"]["close"]());
|
|
877
884
|
} catch {
|
|
878
885
|
}
|
|
879
886
|
try {
|
|
880
|
-
Object[
|
|
887
|
+
Object[_0x14abe7(374)](_0xca7918)[_0x14abe7(358)]((_0x44b36c) => delete _0xca7918[_0x44b36c]), Object["keys"](_0x2d370c)["forEach"]((_0x359a7e) => delete _0x2d370c[_0x359a7e]), Object["keys"](_0x2b58e6)["forEach"]((_0x25f4db) => delete _0x2b58e6[_0x25f4db]), Object["keys"](_0x4a2f0f)[_0x4b90b3(358)]((_0x3cfdba) => delete _0x4a2f0f[_0x3cfdba]);
|
|
881
888
|
} catch {
|
|
882
889
|
}
|
|
883
890
|
return {};
|
|
884
|
-
},
|
|
885
|
-
const
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
891
|
+
}, _0x4adadb = async () => {
|
|
892
|
+
const _0x410387 = _0xa78d72, _0x3e90d2 = _0xa78d72, _0x436dd1 = { "pKdJu": function(_0x445de7, _0x2cbd37) {
|
|
893
|
+
return _0x521a3b["RDJUO"](_0x445de7, _0x2cbd37);
|
|
894
|
+
}, "awHjn": function(_0x3d9c6e, _0xa6039d) {
|
|
895
|
+
return _0x521a3b["PgxKv"](_0x3d9c6e, _0xa6039d);
|
|
896
|
+
}, "trzfV": _0x521a3b["SUhnQ"] }, _0x2323fc = Object["keys"](_0x2b58e6)[_0x410387(361)](async (_0x4e84c) => {
|
|
897
|
+
const _0x22bae2 = _0x410387, _0x34de8b = _0x410387, { client: _0x5d47a7 } = _0x2b58e6[_0x4e84c];
|
|
890
898
|
try {
|
|
891
|
-
const
|
|
892
|
-
return { "sessionId":
|
|
899
|
+
const _0x5e60ac = await _0x5d47a7["ping"]();
|
|
900
|
+
return { "sessionId": _0x4e84c, "shouldClose": _0x436dd1["pKdJu"](Object[_0x22bae2(374)](_0x5e60ac)["length"], 1 * -1991 + -2922 + -4913 * -1) };
|
|
893
901
|
} catch {
|
|
894
|
-
const
|
|
895
|
-
return
|
|
902
|
+
const _0x2a68e2 = {};
|
|
903
|
+
return _0x2a68e2[_0x34de8b(320)] = _0x4e84c, _0x2a68e2["shouldClose"] = !![], _0x2a68e2;
|
|
896
904
|
}
|
|
897
|
-
}),
|
|
898
|
-
const
|
|
905
|
+
}), _0x9cd1ba = Object[_0x3e90d2(374)](_0x4a2f0f)[_0x3e90d2(361)](async (_0x2da174) => {
|
|
906
|
+
const _0x2df005 = _0x3e90d2, { mcpServer: _0x2e955b } = _0x4a2f0f[_0x2da174];
|
|
899
907
|
try {
|
|
900
|
-
const
|
|
901
|
-
return { "sessionId":
|
|
908
|
+
const _0x5ce4a6 = await _0x2e955b[_0x2df005(288)][_0x2df005(318)]();
|
|
909
|
+
return { "sessionId": _0x2da174, "shouldClose": _0x436dd1["pKdJu"](Object["keys"](_0x5ce4a6)[_0x2df005(344)], 855 + -31 * -88 + -3583) };
|
|
902
910
|
} catch {
|
|
903
|
-
const
|
|
904
|
-
return
|
|
911
|
+
const _0x5a6753 = {};
|
|
912
|
+
return _0x5a6753["sessionId"] = _0x2da174, _0x5a6753[_0x2df005(321)] = !![], _0x5a6753;
|
|
905
913
|
}
|
|
906
|
-
}), [
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
}),
|
|
911
|
-
const
|
|
912
|
-
|
|
914
|
+
}), [_0x4a0ee7, _0xc56ab9] = await Promise["all"]([Promise["allSettled"](_0x2323fc), Promise[_0x410387(366)](_0x9cd1ba)]), _0x2312c3 = [], _0x99e86b = [];
|
|
915
|
+
_0x4a0ee7[_0x3e90d2(358)]((_0x45a11d) => {
|
|
916
|
+
const _0x27e50e = _0x3e90d2, _0x34c306 = _0x410387;
|
|
917
|
+
_0x45a11d[_0x27e50e(384)] === "fulfilled" && _0x45a11d[_0x27e50e(296)][_0x34c306(321)] && _0x2312c3[_0x34c306(368)](_0x45a11d[_0x27e50e(296)][_0x34c306(320)]);
|
|
918
|
+
}), _0xc56ab9[_0x410387(358)]((_0x118e70) => {
|
|
919
|
+
const _0x23d0e6 = _0x410387, _0x2ff33f = _0x410387;
|
|
920
|
+
_0x436dd1[_0x23d0e6(389)](_0x118e70["status"], _0x436dd1[_0x2ff33f(275)]) && _0x118e70["value"][_0x23d0e6(321)] && _0x99e86b[_0x2ff33f(368)](_0x118e70[_0x2ff33f(296)][_0x23d0e6(320)]);
|
|
913
921
|
});
|
|
914
|
-
const
|
|
922
|
+
const _0x154f6e = _0x2312c3["map"](async (_0x1ed1dc) => {
|
|
915
923
|
var _a, _b;
|
|
916
|
-
const
|
|
924
|
+
const _0x51cc68 = _0x3e90d2;
|
|
917
925
|
try {
|
|
918
|
-
(_a =
|
|
926
|
+
(_a = _0xca7918[_0x1ed1dc]) == null ? void 0 : _a["close"](), (_b = _0x2b58e6[_0x1ed1dc]) == null ? void 0 : _b["client"][_0x51cc68(338)]();
|
|
919
927
|
} catch {
|
|
920
928
|
}
|
|
921
929
|
try {
|
|
922
|
-
delete
|
|
930
|
+
delete _0xca7918[_0x1ed1dc], delete _0x2b58e6[_0x1ed1dc];
|
|
923
931
|
} catch {
|
|
924
932
|
}
|
|
925
|
-
}),
|
|
933
|
+
}), _0x63a5b = _0x99e86b["map"](async (_0x11047c) => {
|
|
926
934
|
var _a, _b;
|
|
927
|
-
const
|
|
935
|
+
const _0x2d6c34 = _0x410387, _0x169703 = _0x3e90d2;
|
|
928
936
|
try {
|
|
929
|
-
(_a =
|
|
937
|
+
(_a = _0x2d370c[_0x11047c]) == null ? void 0 : _a[_0x2d6c34(338)](), (_b = _0x4a2f0f[_0x11047c]) == null ? void 0 : _b[_0x2d6c34(323)][_0x169703(338)]();
|
|
930
938
|
} catch {
|
|
931
939
|
}
|
|
932
940
|
try {
|
|
933
|
-
delete
|
|
941
|
+
delete _0x2d370c[_0x11047c], delete _0x4a2f0f[_0x11047c];
|
|
934
942
|
} catch {
|
|
935
943
|
}
|
|
936
944
|
});
|
|
937
|
-
await Promise["allSettled"]([...
|
|
938
|
-
const
|
|
939
|
-
return
|
|
940
|
-
},
|
|
941
|
-
return
|
|
945
|
+
await Promise["allSettled"]([..._0x154f6e, ..._0x63a5b]);
|
|
946
|
+
const _0x26d18a = {};
|
|
947
|
+
return _0x26d18a["clientSessions"] = _0x2312c3, _0x26d18a["remoterSessions"] = _0x99e86b, _0x26d18a;
|
|
948
|
+
}, _0xa1a2b5 = {};
|
|
949
|
+
return _0xa1a2b5[_0x356f5f(308)] = _0x517e01, _0xa1a2b5[_0xa78d72(277)] = _0xd3034b, _0xa1a2b5[_0xa78d72(372)] = _0x169d65, _0xa1a2b5["handleStreamRequest"] = _0x54856e, _0xa1a2b5[_0xa78d72(322)] = _0x274c7c, _0xa1a2b5["clients"] = _0x2b58e6, _0xa1a2b5["remoters"] = _0x4a2f0f, _0xa1a2b5["transports"] = _0xca7918, _0xa1a2b5["inspectors"] = _0x2d370c, _0xa1a2b5[_0x356f5f(383)] = _0x571656, _0xa1a2b5[_0xa78d72(318)] = _0x4adadb, _0xa1a2b5["onClientError"] = _0x3d2fa1, _0xa1a2b5["onRemoterError"] = _0x223176, _0xa1a2b5;
|
|
942
950
|
};
|
|
943
|
-
function _0x6b51() {
|
|
944
|
-
const _0x390c80 = ["tOrTB", "details", "URNvt", "params", "handleSseProxy", "mIkYm", "prompts", "version", "values", "connect", "Method not allowed.", "CcOpT", "split", "event: close\ndata: \n\n", "Bad Request: No valid session ID provided", "subscribe", "1083562jcWPcE", "addRequestListener", "handleRequest", "MCyPx", "Missing bearer token", "notifications/initialized", "length", "jsonrpc", "message", "handlePostMessage", "send", "authorization", "addNotificationListener", "_notificationHandlers", "RcENs", "spzPF", "jiGQt", "name", "close", "onClientError", "onclose", "onRemoterError", "afterInit", "mcp-session-id", "303wmcoub", "headers", "No client found for session ID ", "query", "all", "poUzV", "value", "VcuqS", "POST", "GET, POST, DELETE", "status", "transport", "xmKBD", "59124NhmyFT", "sjrOH", "qLStB", "SSE", "No transport found", "referer", "sessionIdGenerator", "242256uBBPSI", "GGSyp", "StreamableHTTP", "push", "completions", "IBanx", "9816TWKerG", "Lndqr", "mcp-stream-proxy-server", "forEach", "Internal server error", "9229910dXUjLF", "roots", "onerror", "body", "JuViw", "keys", "tools", "capabilities", "dMURb", "stringify", "_sseResponse", "method", "Hrtvy", "map", "error", "client", "resolve", "removeNotificationListener", "3944525GHCRpB", "listChanged", "shouldClose", "server", "type", "mcp-server", "mcpServer", "hCjHy", "9234JiZfnS", "initialize", "ping", "sKJxy", "1.0.0", "VcBKB", "fulfilled", "logging", "2.0", "headersSent", "22iZCOcW", "resources", "code", "elicitation", "write", "inspectors", "FCEDe", "sessionId", "auth", "ufHqk", "35FagELh", "1507854ndNPRD", "handleStreamRequest", "xrxSg", "json", "EypRd", "user"];
|
|
945
|
-
_0x6b51 = function() {
|
|
946
|
-
return _0x390c80;
|
|
947
|
-
};
|
|
948
|
-
return _0x6b51();
|
|
949
|
-
}
|
|
950
951
|
export {
|
|
951
952
|
ACCESS_TOKEN_EXPIRES_IN,
|
|
952
953
|
AuthServerProvider,
|