@hypurrquant/defi-cli 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -199
- package/config/pools.example.toml +31 -0
- package/dist/index.js +297 -2082
- package/dist/index.js.map +1 -1
- package/dist/main.js +303 -2093
- package/dist/main.js.map +1 -1
- package/dist/mcp-server.js +318 -844
- package/dist/mcp-server.js.map +1 -1
- package/package.json +2 -1
package/dist/mcp-server.js
CHANGED
|
@@ -10,764 +10,6 @@ var __export = (target, all) => {
|
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/error.js
|
|
14
|
-
function getLineColFromPtr(string, ptr) {
|
|
15
|
-
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
16
|
-
return [lines.length, lines.pop().length + 1];
|
|
17
|
-
}
|
|
18
|
-
function makeCodeBlock(string, line, column) {
|
|
19
|
-
let lines = string.split(/\r\n|\n|\r/g);
|
|
20
|
-
let codeblock = "";
|
|
21
|
-
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
22
|
-
for (let i = line - 1; i <= line + 1; i++) {
|
|
23
|
-
let l = lines[i - 1];
|
|
24
|
-
if (!l)
|
|
25
|
-
continue;
|
|
26
|
-
codeblock += i.toString().padEnd(numberLen, " ");
|
|
27
|
-
codeblock += ": ";
|
|
28
|
-
codeblock += l;
|
|
29
|
-
codeblock += "\n";
|
|
30
|
-
if (i === line) {
|
|
31
|
-
codeblock += " ".repeat(numberLen + column + 2);
|
|
32
|
-
codeblock += "^\n";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return codeblock;
|
|
36
|
-
}
|
|
37
|
-
var TomlError;
|
|
38
|
-
var init_error = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/error.js"() {
|
|
40
|
-
"use strict";
|
|
41
|
-
TomlError = class extends Error {
|
|
42
|
-
line;
|
|
43
|
-
column;
|
|
44
|
-
codeblock;
|
|
45
|
-
constructor(message, options) {
|
|
46
|
-
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
47
|
-
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
48
|
-
super(`Invalid TOML document: ${message}
|
|
49
|
-
|
|
50
|
-
${codeblock}`, options);
|
|
51
|
-
this.line = line;
|
|
52
|
-
this.column = column;
|
|
53
|
-
this.codeblock = codeblock;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/util.js
|
|
60
|
-
function isEscaped(str, ptr) {
|
|
61
|
-
let i = 0;
|
|
62
|
-
while (str[ptr - ++i] === "\\")
|
|
63
|
-
;
|
|
64
|
-
return --i && i % 2;
|
|
65
|
-
}
|
|
66
|
-
function indexOfNewline(str, start = 0, end = str.length) {
|
|
67
|
-
let idx = str.indexOf("\n", start);
|
|
68
|
-
if (str[idx - 1] === "\r")
|
|
69
|
-
idx--;
|
|
70
|
-
return idx <= end ? idx : -1;
|
|
71
|
-
}
|
|
72
|
-
function skipComment(str, ptr) {
|
|
73
|
-
for (let i = ptr; i < str.length; i++) {
|
|
74
|
-
let c = str[i];
|
|
75
|
-
if (c === "\n")
|
|
76
|
-
return i;
|
|
77
|
-
if (c === "\r" && str[i + 1] === "\n")
|
|
78
|
-
return i + 1;
|
|
79
|
-
if (c < " " && c !== " " || c === "\x7F") {
|
|
80
|
-
throw new TomlError("control characters are not allowed in comments", {
|
|
81
|
-
toml: str,
|
|
82
|
-
ptr
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return str.length;
|
|
87
|
-
}
|
|
88
|
-
function skipVoid(str, ptr, banNewLines, banComments) {
|
|
89
|
-
let c;
|
|
90
|
-
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
|
91
|
-
ptr++;
|
|
92
|
-
return banComments || c !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
|
|
93
|
-
}
|
|
94
|
-
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
95
|
-
if (!end) {
|
|
96
|
-
ptr = indexOfNewline(str, ptr);
|
|
97
|
-
return ptr < 0 ? str.length : ptr;
|
|
98
|
-
}
|
|
99
|
-
for (let i = ptr; i < str.length; i++) {
|
|
100
|
-
let c = str[i];
|
|
101
|
-
if (c === "#") {
|
|
102
|
-
i = indexOfNewline(str, i);
|
|
103
|
-
} else if (c === sep) {
|
|
104
|
-
return i + 1;
|
|
105
|
-
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
|
106
|
-
return i;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
throw new TomlError("cannot find end of structure", {
|
|
110
|
-
toml: str,
|
|
111
|
-
ptr
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
function getStringEnd(str, seek) {
|
|
115
|
-
let first = str[seek];
|
|
116
|
-
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
117
|
-
seek += target.length - 1;
|
|
118
|
-
do
|
|
119
|
-
seek = str.indexOf(target, ++seek);
|
|
120
|
-
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
|
121
|
-
if (seek > -1) {
|
|
122
|
-
seek += target.length;
|
|
123
|
-
if (target.length > 1) {
|
|
124
|
-
if (str[seek] === first)
|
|
125
|
-
seek++;
|
|
126
|
-
if (str[seek] === first)
|
|
127
|
-
seek++;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return seek;
|
|
131
|
-
}
|
|
132
|
-
var init_util = __esm({
|
|
133
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/util.js"() {
|
|
134
|
-
"use strict";
|
|
135
|
-
init_error();
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/date.js
|
|
140
|
-
var DATE_TIME_RE, TomlDate;
|
|
141
|
-
var init_date = __esm({
|
|
142
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/date.js"() {
|
|
143
|
-
"use strict";
|
|
144
|
-
DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
145
|
-
TomlDate = class _TomlDate extends Date {
|
|
146
|
-
#hasDate = false;
|
|
147
|
-
#hasTime = false;
|
|
148
|
-
#offset = null;
|
|
149
|
-
constructor(date) {
|
|
150
|
-
let hasDate = true;
|
|
151
|
-
let hasTime = true;
|
|
152
|
-
let offset = "Z";
|
|
153
|
-
if (typeof date === "string") {
|
|
154
|
-
let match = date.match(DATE_TIME_RE);
|
|
155
|
-
if (match) {
|
|
156
|
-
if (!match[1]) {
|
|
157
|
-
hasDate = false;
|
|
158
|
-
date = `0000-01-01T${date}`;
|
|
159
|
-
}
|
|
160
|
-
hasTime = !!match[2];
|
|
161
|
-
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
|
|
162
|
-
if (match[2] && +match[2] > 23) {
|
|
163
|
-
date = "";
|
|
164
|
-
} else {
|
|
165
|
-
offset = match[3] || null;
|
|
166
|
-
date = date.toUpperCase();
|
|
167
|
-
if (!offset && hasTime)
|
|
168
|
-
date += "Z";
|
|
169
|
-
}
|
|
170
|
-
} else {
|
|
171
|
-
date = "";
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
super(date);
|
|
175
|
-
if (!isNaN(this.getTime())) {
|
|
176
|
-
this.#hasDate = hasDate;
|
|
177
|
-
this.#hasTime = hasTime;
|
|
178
|
-
this.#offset = offset;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
isDateTime() {
|
|
182
|
-
return this.#hasDate && this.#hasTime;
|
|
183
|
-
}
|
|
184
|
-
isLocal() {
|
|
185
|
-
return !this.#hasDate || !this.#hasTime || !this.#offset;
|
|
186
|
-
}
|
|
187
|
-
isDate() {
|
|
188
|
-
return this.#hasDate && !this.#hasTime;
|
|
189
|
-
}
|
|
190
|
-
isTime() {
|
|
191
|
-
return this.#hasTime && !this.#hasDate;
|
|
192
|
-
}
|
|
193
|
-
isValid() {
|
|
194
|
-
return this.#hasDate || this.#hasTime;
|
|
195
|
-
}
|
|
196
|
-
toISOString() {
|
|
197
|
-
let iso = super.toISOString();
|
|
198
|
-
if (this.isDate())
|
|
199
|
-
return iso.slice(0, 10);
|
|
200
|
-
if (this.isTime())
|
|
201
|
-
return iso.slice(11, 23);
|
|
202
|
-
if (this.#offset === null)
|
|
203
|
-
return iso.slice(0, -1);
|
|
204
|
-
if (this.#offset === "Z")
|
|
205
|
-
return iso;
|
|
206
|
-
let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
|
|
207
|
-
offset = this.#offset[0] === "-" ? offset : -offset;
|
|
208
|
-
let offsetDate = new Date(this.getTime() - offset * 6e4);
|
|
209
|
-
return offsetDate.toISOString().slice(0, -1) + this.#offset;
|
|
210
|
-
}
|
|
211
|
-
static wrapAsOffsetDateTime(jsDate, offset = "Z") {
|
|
212
|
-
let date = new _TomlDate(jsDate);
|
|
213
|
-
date.#offset = offset;
|
|
214
|
-
return date;
|
|
215
|
-
}
|
|
216
|
-
static wrapAsLocalDateTime(jsDate) {
|
|
217
|
-
let date = new _TomlDate(jsDate);
|
|
218
|
-
date.#offset = null;
|
|
219
|
-
return date;
|
|
220
|
-
}
|
|
221
|
-
static wrapAsLocalDate(jsDate) {
|
|
222
|
-
let date = new _TomlDate(jsDate);
|
|
223
|
-
date.#hasTime = false;
|
|
224
|
-
date.#offset = null;
|
|
225
|
-
return date;
|
|
226
|
-
}
|
|
227
|
-
static wrapAsLocalTime(jsDate) {
|
|
228
|
-
let date = new _TomlDate(jsDate);
|
|
229
|
-
date.#hasDate = false;
|
|
230
|
-
date.#offset = null;
|
|
231
|
-
return date;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/primitive.js
|
|
238
|
-
function parseString(str, ptr = 0, endPtr = str.length) {
|
|
239
|
-
let isLiteral = str[ptr] === "'";
|
|
240
|
-
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
|
241
|
-
if (isMultiline) {
|
|
242
|
-
endPtr -= 2;
|
|
243
|
-
if (str[ptr += 2] === "\r")
|
|
244
|
-
ptr++;
|
|
245
|
-
if (str[ptr] === "\n")
|
|
246
|
-
ptr++;
|
|
247
|
-
}
|
|
248
|
-
let tmp = 0;
|
|
249
|
-
let isEscape;
|
|
250
|
-
let parsed = "";
|
|
251
|
-
let sliceStart = ptr;
|
|
252
|
-
while (ptr < endPtr - 1) {
|
|
253
|
-
let c = str[ptr++];
|
|
254
|
-
if (c === "\n" || c === "\r" && str[ptr] === "\n") {
|
|
255
|
-
if (!isMultiline) {
|
|
256
|
-
throw new TomlError("newlines are not allowed in strings", {
|
|
257
|
-
toml: str,
|
|
258
|
-
ptr: ptr - 1
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
} else if (c < " " && c !== " " || c === "\x7F") {
|
|
262
|
-
throw new TomlError("control characters are not allowed in strings", {
|
|
263
|
-
toml: str,
|
|
264
|
-
ptr: ptr - 1
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
if (isEscape) {
|
|
268
|
-
isEscape = false;
|
|
269
|
-
if (c === "x" || c === "u" || c === "U") {
|
|
270
|
-
let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
|
|
271
|
-
if (!ESCAPE_REGEX.test(code)) {
|
|
272
|
-
throw new TomlError("invalid unicode escape", {
|
|
273
|
-
toml: str,
|
|
274
|
-
ptr: tmp
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
try {
|
|
278
|
-
parsed += String.fromCodePoint(parseInt(code, 16));
|
|
279
|
-
} catch {
|
|
280
|
-
throw new TomlError("invalid unicode escape", {
|
|
281
|
-
toml: str,
|
|
282
|
-
ptr: tmp
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
} else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
|
|
286
|
-
ptr = skipVoid(str, ptr - 1, true);
|
|
287
|
-
if (str[ptr] !== "\n" && str[ptr] !== "\r") {
|
|
288
|
-
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
|
289
|
-
toml: str,
|
|
290
|
-
ptr: tmp
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
ptr = skipVoid(str, ptr);
|
|
294
|
-
} else if (c in ESC_MAP) {
|
|
295
|
-
parsed += ESC_MAP[c];
|
|
296
|
-
} else {
|
|
297
|
-
throw new TomlError("unrecognized escape sequence", {
|
|
298
|
-
toml: str,
|
|
299
|
-
ptr: tmp
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
sliceStart = ptr;
|
|
303
|
-
} else if (!isLiteral && c === "\\") {
|
|
304
|
-
tmp = ptr - 1;
|
|
305
|
-
isEscape = true;
|
|
306
|
-
parsed += str.slice(sliceStart, tmp);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return parsed + str.slice(sliceStart, endPtr - 1);
|
|
310
|
-
}
|
|
311
|
-
function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
312
|
-
if (value === "true")
|
|
313
|
-
return true;
|
|
314
|
-
if (value === "false")
|
|
315
|
-
return false;
|
|
316
|
-
if (value === "-inf")
|
|
317
|
-
return -Infinity;
|
|
318
|
-
if (value === "inf" || value === "+inf")
|
|
319
|
-
return Infinity;
|
|
320
|
-
if (value === "nan" || value === "+nan" || value === "-nan")
|
|
321
|
-
return NaN;
|
|
322
|
-
if (value === "-0")
|
|
323
|
-
return integersAsBigInt ? 0n : 0;
|
|
324
|
-
let isInt = INT_REGEX.test(value);
|
|
325
|
-
if (isInt || FLOAT_REGEX.test(value)) {
|
|
326
|
-
if (LEADING_ZERO.test(value)) {
|
|
327
|
-
throw new TomlError("leading zeroes are not allowed", {
|
|
328
|
-
toml,
|
|
329
|
-
ptr
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
value = value.replace(/_/g, "");
|
|
333
|
-
let numeric = +value;
|
|
334
|
-
if (isNaN(numeric)) {
|
|
335
|
-
throw new TomlError("invalid number", {
|
|
336
|
-
toml,
|
|
337
|
-
ptr
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
if (isInt) {
|
|
341
|
-
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
342
|
-
throw new TomlError("integer value cannot be represented losslessly", {
|
|
343
|
-
toml,
|
|
344
|
-
ptr
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (isInt || integersAsBigInt === true)
|
|
348
|
-
numeric = BigInt(value);
|
|
349
|
-
}
|
|
350
|
-
return numeric;
|
|
351
|
-
}
|
|
352
|
-
const date = new TomlDate(value);
|
|
353
|
-
if (!date.isValid()) {
|
|
354
|
-
throw new TomlError("invalid value", {
|
|
355
|
-
toml,
|
|
356
|
-
ptr
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
return date;
|
|
360
|
-
}
|
|
361
|
-
var INT_REGEX, FLOAT_REGEX, LEADING_ZERO, ESCAPE_REGEX, ESC_MAP;
|
|
362
|
-
var init_primitive = __esm({
|
|
363
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/primitive.js"() {
|
|
364
|
-
"use strict";
|
|
365
|
-
init_util();
|
|
366
|
-
init_date();
|
|
367
|
-
init_error();
|
|
368
|
-
INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
369
|
-
FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
370
|
-
LEADING_ZERO = /^[+-]?0[0-9_]/;
|
|
371
|
-
ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
|
|
372
|
-
ESC_MAP = {
|
|
373
|
-
b: "\b",
|
|
374
|
-
t: " ",
|
|
375
|
-
n: "\n",
|
|
376
|
-
f: "\f",
|
|
377
|
-
r: "\r",
|
|
378
|
-
e: "\x1B",
|
|
379
|
-
'"': '"',
|
|
380
|
-
"\\": "\\"
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/extract.js
|
|
386
|
-
function sliceAndTrimEndOf(str, startPtr, endPtr) {
|
|
387
|
-
let value = str.slice(startPtr, endPtr);
|
|
388
|
-
let commentIdx = value.indexOf("#");
|
|
389
|
-
if (commentIdx > -1) {
|
|
390
|
-
skipComment(str, commentIdx);
|
|
391
|
-
value = value.slice(0, commentIdx);
|
|
392
|
-
}
|
|
393
|
-
return [value.trimEnd(), commentIdx];
|
|
394
|
-
}
|
|
395
|
-
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
396
|
-
if (depth === 0) {
|
|
397
|
-
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
398
|
-
toml: str,
|
|
399
|
-
ptr
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
let c = str[ptr];
|
|
403
|
-
if (c === "[" || c === "{") {
|
|
404
|
-
let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
|
|
405
|
-
if (end) {
|
|
406
|
-
endPtr2 = skipVoid(str, endPtr2);
|
|
407
|
-
if (str[endPtr2] === ",")
|
|
408
|
-
endPtr2++;
|
|
409
|
-
else if (str[endPtr2] !== end) {
|
|
410
|
-
throw new TomlError("expected comma or end of structure", {
|
|
411
|
-
toml: str,
|
|
412
|
-
ptr: endPtr2
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
return [value, endPtr2];
|
|
417
|
-
}
|
|
418
|
-
let endPtr;
|
|
419
|
-
if (c === '"' || c === "'") {
|
|
420
|
-
endPtr = getStringEnd(str, ptr);
|
|
421
|
-
let parsed = parseString(str, ptr, endPtr);
|
|
422
|
-
if (end) {
|
|
423
|
-
endPtr = skipVoid(str, endPtr);
|
|
424
|
-
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
425
|
-
throw new TomlError("unexpected character encountered", {
|
|
426
|
-
toml: str,
|
|
427
|
-
ptr: endPtr
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
endPtr += +(str[endPtr] === ",");
|
|
431
|
-
}
|
|
432
|
-
return [parsed, endPtr];
|
|
433
|
-
}
|
|
434
|
-
endPtr = skipUntil(str, ptr, ",", end);
|
|
435
|
-
let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
|
|
436
|
-
if (!slice[0]) {
|
|
437
|
-
throw new TomlError("incomplete key-value declaration: no value specified", {
|
|
438
|
-
toml: str,
|
|
439
|
-
ptr
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
if (end && slice[1] > -1) {
|
|
443
|
-
endPtr = skipVoid(str, ptr + slice[1]);
|
|
444
|
-
endPtr += +(str[endPtr] === ",");
|
|
445
|
-
}
|
|
446
|
-
return [
|
|
447
|
-
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
448
|
-
endPtr
|
|
449
|
-
];
|
|
450
|
-
}
|
|
451
|
-
var init_extract = __esm({
|
|
452
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/extract.js"() {
|
|
453
|
-
"use strict";
|
|
454
|
-
init_primitive();
|
|
455
|
-
init_struct();
|
|
456
|
-
init_util();
|
|
457
|
-
init_error();
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/struct.js
|
|
462
|
-
function parseKey(str, ptr, end = "=") {
|
|
463
|
-
let dot = ptr - 1;
|
|
464
|
-
let parsed = [];
|
|
465
|
-
let endPtr = str.indexOf(end, ptr);
|
|
466
|
-
if (endPtr < 0) {
|
|
467
|
-
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
468
|
-
toml: str,
|
|
469
|
-
ptr
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
do {
|
|
473
|
-
let c = str[ptr = ++dot];
|
|
474
|
-
if (c !== " " && c !== " ") {
|
|
475
|
-
if (c === '"' || c === "'") {
|
|
476
|
-
if (c === str[ptr + 1] && c === str[ptr + 2]) {
|
|
477
|
-
throw new TomlError("multiline strings are not allowed in keys", {
|
|
478
|
-
toml: str,
|
|
479
|
-
ptr
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
let eos = getStringEnd(str, ptr);
|
|
483
|
-
if (eos < 0) {
|
|
484
|
-
throw new TomlError("unfinished string encountered", {
|
|
485
|
-
toml: str,
|
|
486
|
-
ptr
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
dot = str.indexOf(".", eos);
|
|
490
|
-
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
491
|
-
let newLine = indexOfNewline(strEnd);
|
|
492
|
-
if (newLine > -1) {
|
|
493
|
-
throw new TomlError("newlines are not allowed in keys", {
|
|
494
|
-
toml: str,
|
|
495
|
-
ptr: ptr + dot + newLine
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
if (strEnd.trimStart()) {
|
|
499
|
-
throw new TomlError("found extra tokens after the string part", {
|
|
500
|
-
toml: str,
|
|
501
|
-
ptr: eos
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
if (endPtr < eos) {
|
|
505
|
-
endPtr = str.indexOf(end, eos);
|
|
506
|
-
if (endPtr < 0) {
|
|
507
|
-
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
508
|
-
toml: str,
|
|
509
|
-
ptr
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
parsed.push(parseString(str, ptr, eos));
|
|
514
|
-
} else {
|
|
515
|
-
dot = str.indexOf(".", ptr);
|
|
516
|
-
let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
517
|
-
if (!KEY_PART_RE.test(part)) {
|
|
518
|
-
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
519
|
-
toml: str,
|
|
520
|
-
ptr
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
parsed.push(part.trimEnd());
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
} while (dot + 1 && dot < endPtr);
|
|
527
|
-
return [parsed, skipVoid(str, endPtr + 1, true, true)];
|
|
528
|
-
}
|
|
529
|
-
function parseInlineTable(str, ptr, depth, integersAsBigInt) {
|
|
530
|
-
let res = {};
|
|
531
|
-
let seen = /* @__PURE__ */ new Set();
|
|
532
|
-
let c;
|
|
533
|
-
ptr++;
|
|
534
|
-
while ((c = str[ptr++]) !== "}" && c) {
|
|
535
|
-
if (c === ",") {
|
|
536
|
-
throw new TomlError("expected value, found comma", {
|
|
537
|
-
toml: str,
|
|
538
|
-
ptr: ptr - 1
|
|
539
|
-
});
|
|
540
|
-
} else if (c === "#")
|
|
541
|
-
ptr = skipComment(str, ptr);
|
|
542
|
-
else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
|
|
543
|
-
let k;
|
|
544
|
-
let t = res;
|
|
545
|
-
let hasOwn = false;
|
|
546
|
-
let [key, keyEndPtr] = parseKey(str, ptr - 1);
|
|
547
|
-
for (let i = 0; i < key.length; i++) {
|
|
548
|
-
if (i)
|
|
549
|
-
t = hasOwn ? t[k] : t[k] = {};
|
|
550
|
-
k = key[i];
|
|
551
|
-
if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
|
|
552
|
-
throw new TomlError("trying to redefine an already defined value", {
|
|
553
|
-
toml: str,
|
|
554
|
-
ptr
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
if (!hasOwn && k === "__proto__") {
|
|
558
|
-
Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
if (hasOwn) {
|
|
562
|
-
throw new TomlError("trying to redefine an already defined value", {
|
|
563
|
-
toml: str,
|
|
564
|
-
ptr
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
|
|
568
|
-
seen.add(value);
|
|
569
|
-
t[k] = value;
|
|
570
|
-
ptr = valueEndPtr;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
if (!c) {
|
|
574
|
-
throw new TomlError("unfinished table encountered", {
|
|
575
|
-
toml: str,
|
|
576
|
-
ptr
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
return [res, ptr];
|
|
580
|
-
}
|
|
581
|
-
function parseArray(str, ptr, depth, integersAsBigInt) {
|
|
582
|
-
let res = [];
|
|
583
|
-
let c;
|
|
584
|
-
ptr++;
|
|
585
|
-
while ((c = str[ptr++]) !== "]" && c) {
|
|
586
|
-
if (c === ",") {
|
|
587
|
-
throw new TomlError("expected value, found comma", {
|
|
588
|
-
toml: str,
|
|
589
|
-
ptr: ptr - 1
|
|
590
|
-
});
|
|
591
|
-
} else if (c === "#")
|
|
592
|
-
ptr = skipComment(str, ptr);
|
|
593
|
-
else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
|
|
594
|
-
let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
|
|
595
|
-
res.push(e[0]);
|
|
596
|
-
ptr = e[1];
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
if (!c) {
|
|
600
|
-
throw new TomlError("unfinished array encountered", {
|
|
601
|
-
toml: str,
|
|
602
|
-
ptr
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
return [res, ptr];
|
|
606
|
-
}
|
|
607
|
-
var KEY_PART_RE;
|
|
608
|
-
var init_struct = __esm({
|
|
609
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/struct.js"() {
|
|
610
|
-
"use strict";
|
|
611
|
-
init_primitive();
|
|
612
|
-
init_extract();
|
|
613
|
-
init_util();
|
|
614
|
-
init_error();
|
|
615
|
-
KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
|
-
|
|
619
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/parse.js
|
|
620
|
-
function peekTable(key, table, meta, type) {
|
|
621
|
-
let t = table;
|
|
622
|
-
let m = meta;
|
|
623
|
-
let k;
|
|
624
|
-
let hasOwn = false;
|
|
625
|
-
let state;
|
|
626
|
-
for (let i = 0; i < key.length; i++) {
|
|
627
|
-
if (i) {
|
|
628
|
-
t = hasOwn ? t[k] : t[k] = {};
|
|
629
|
-
m = (state = m[k]).c;
|
|
630
|
-
if (type === 0 && (state.t === 1 || state.t === 2)) {
|
|
631
|
-
return null;
|
|
632
|
-
}
|
|
633
|
-
if (state.t === 2) {
|
|
634
|
-
let l = t.length - 1;
|
|
635
|
-
t = t[l];
|
|
636
|
-
m = m[l].c;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
k = key[i];
|
|
640
|
-
if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) {
|
|
641
|
-
return null;
|
|
642
|
-
}
|
|
643
|
-
if (!hasOwn) {
|
|
644
|
-
if (k === "__proto__") {
|
|
645
|
-
Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
|
|
646
|
-
Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
|
|
647
|
-
}
|
|
648
|
-
m[k] = {
|
|
649
|
-
t: i < key.length - 1 && type === 2 ? 3 : type,
|
|
650
|
-
d: false,
|
|
651
|
-
i: 0,
|
|
652
|
-
c: {}
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
state = m[k];
|
|
657
|
-
if (state.t !== type && !(type === 1 && state.t === 3)) {
|
|
658
|
-
return null;
|
|
659
|
-
}
|
|
660
|
-
if (type === 2) {
|
|
661
|
-
if (!state.d) {
|
|
662
|
-
state.d = true;
|
|
663
|
-
t[k] = [];
|
|
664
|
-
}
|
|
665
|
-
t[k].push(t = {});
|
|
666
|
-
state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
|
|
667
|
-
}
|
|
668
|
-
if (state.d) {
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
671
|
-
state.d = true;
|
|
672
|
-
if (type === 1) {
|
|
673
|
-
t = hasOwn ? t[k] : t[k] = {};
|
|
674
|
-
} else if (type === 0 && hasOwn) {
|
|
675
|
-
return null;
|
|
676
|
-
}
|
|
677
|
-
return [k, t, state.c];
|
|
678
|
-
}
|
|
679
|
-
function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
680
|
-
let res = {};
|
|
681
|
-
let meta = {};
|
|
682
|
-
let tbl = res;
|
|
683
|
-
let m = meta;
|
|
684
|
-
for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
|
|
685
|
-
if (toml[ptr] === "[") {
|
|
686
|
-
let isTableArray = toml[++ptr] === "[";
|
|
687
|
-
let k = parseKey(toml, ptr += +isTableArray, "]");
|
|
688
|
-
if (isTableArray) {
|
|
689
|
-
if (toml[k[1] - 1] !== "]") {
|
|
690
|
-
throw new TomlError("expected end of table declaration", {
|
|
691
|
-
toml,
|
|
692
|
-
ptr: k[1] - 1
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
k[1]++;
|
|
696
|
-
}
|
|
697
|
-
let p = peekTable(
|
|
698
|
-
k[0],
|
|
699
|
-
res,
|
|
700
|
-
meta,
|
|
701
|
-
isTableArray ? 2 : 1
|
|
702
|
-
/* Type.EXPLICIT */
|
|
703
|
-
);
|
|
704
|
-
if (!p) {
|
|
705
|
-
throw new TomlError("trying to redefine an already defined table or value", {
|
|
706
|
-
toml,
|
|
707
|
-
ptr
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
m = p[2];
|
|
711
|
-
tbl = p[1];
|
|
712
|
-
ptr = k[1];
|
|
713
|
-
} else {
|
|
714
|
-
let k = parseKey(toml, ptr);
|
|
715
|
-
let p = peekTable(
|
|
716
|
-
k[0],
|
|
717
|
-
tbl,
|
|
718
|
-
m,
|
|
719
|
-
0
|
|
720
|
-
/* Type.DOTTED */
|
|
721
|
-
);
|
|
722
|
-
if (!p) {
|
|
723
|
-
throw new TomlError("trying to redefine an already defined table or value", {
|
|
724
|
-
toml,
|
|
725
|
-
ptr
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
|
|
729
|
-
p[1][p[0]] = v[0];
|
|
730
|
-
ptr = v[1];
|
|
731
|
-
}
|
|
732
|
-
ptr = skipVoid(toml, ptr, true);
|
|
733
|
-
if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
|
|
734
|
-
throw new TomlError("each key-value declaration must be followed by an end-of-line", {
|
|
735
|
-
toml,
|
|
736
|
-
ptr
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
ptr = skipVoid(toml, ptr);
|
|
740
|
-
}
|
|
741
|
-
return res;
|
|
742
|
-
}
|
|
743
|
-
var init_parse = __esm({
|
|
744
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/parse.js"() {
|
|
745
|
-
"use strict";
|
|
746
|
-
init_struct();
|
|
747
|
-
init_extract();
|
|
748
|
-
init_util();
|
|
749
|
-
init_error();
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
|
|
753
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/stringify.js
|
|
754
|
-
var init_stringify = __esm({
|
|
755
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/stringify.js"() {
|
|
756
|
-
"use strict";
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
|
|
760
|
-
// ../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/index.js
|
|
761
|
-
var init_dist = __esm({
|
|
762
|
-
"../../node_modules/.pnpm/smol-toml@1.6.0/node_modules/smol-toml/dist/index.js"() {
|
|
763
|
-
"use strict";
|
|
764
|
-
init_parse();
|
|
765
|
-
init_stringify();
|
|
766
|
-
init_date();
|
|
767
|
-
init_error();
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
|
|
771
13
|
// ../defi-core/dist/index.js
|
|
772
14
|
var dist_exports = {};
|
|
773
15
|
__export(dist_exports, {
|
|
@@ -803,6 +45,7 @@ import { encodeFunctionData as encodeFunctionData2, decodeFunctionResult, parseA
|
|
|
803
45
|
import { readFileSync, readdirSync } from "fs";
|
|
804
46
|
import { resolve } from "path";
|
|
805
47
|
import { fileURLToPath } from "url";
|
|
48
|
+
import { parse } from "smol-toml";
|
|
806
49
|
import { existsSync } from "fs";
|
|
807
50
|
function formatHuman(t) {
|
|
808
51
|
const divisor = 10n ** BigInt(t.decimals);
|
|
@@ -978,10 +221,9 @@ function readToml(relPath) {
|
|
|
978
221
|
return readFileSync(resolve(CONFIG_DIR, relPath), "utf-8");
|
|
979
222
|
}
|
|
980
223
|
var TxStatus, InterestRateMode, DefiError, erc20Abi, providerCache, MULTICALL3_ADDRESS, multicall3Abi, ChainConfig, ProtocolCategory, __dirname, CONFIG_DIR, Registry;
|
|
981
|
-
var
|
|
224
|
+
var init_dist = __esm({
|
|
982
225
|
"../defi-core/dist/index.js"() {
|
|
983
226
|
"use strict";
|
|
984
|
-
init_dist();
|
|
985
227
|
TxStatus = /* @__PURE__ */ ((TxStatus2) => {
|
|
986
228
|
TxStatus2["DryRun"] = "dry_run";
|
|
987
229
|
TxStatus2["Simulated"] = "simulated";
|
|
@@ -1777,43 +1019,43 @@ function createKittenSwapFarming(entry, rpcUrl) {
|
|
|
1777
1019
|
return new KittenSwapFarmingAdapter(entry.name, farmingCenter, eternalFarming, positionManager, rpcUrl, factory);
|
|
1778
1020
|
}
|
|
1779
1021
|
var DEFAULT_FEE, swapRouterAbi, quoterAbi, ramsesQuoterAbi, positionManagerAbi, UniswapV3Adapter, abi, lbQuoterAbi, UniswapV2Adapter, abi2, algebraQuoterAbi, algebraSingleQuoterAbi, algebraIntegralPmAbi, algebraV2PmAbi, AlgebraV3Adapter, abi3, BalancerV3Adapter, poolAbi, CurveStableSwapAdapter, abi4, abiV2, SolidlyAdapter, thenaPmAbi, thenaRouterAbi, thenaPoolAbi, thenaFactoryAbi, ThenaCLAdapter, _addressDecodeAbi, _symbolDecodeAbi, gaugeManagerAbi, gaugeCLAbi, nfpmAbi, veAbi, voterAbi, HybraGaugeAdapter, abi5, WooFiAdapter, gaugeAbi, veAbi2, voterAbi2, _addressDecodeAbi2, _symbolDecodeAbi2, _boolDecodeAbi, HYPEREVM_TOKENS, CL_TICK_SPACINGS, SolidlyGaugeAdapter, masterchefAbi, MasterChefAdapter, lbRouterAbi, lbFactoryAbi, lbPairAbi, lbRewarderAbi, masterChefAbi, veMoeAbi, lbPairBinAbi, lbQuoterAbi2, erc20Abi2, _addressAbi, _uint256Abi, _boolAbi, _rangeAbi, _binAbi, _uint256ArrayAbi, MerchantMoeLBAdapter, KITTEN_TOKEN, WHYPE_TOKEN, MAX_NONCE_SCAN, HYPEREVM_TOKENS2, farmingCenterAbi, positionManagerAbi2, eternalFarmingAbi, algebraFactoryAbi, _addressDecodeAbi3, nonceCache, KittenSwapFarmingAdapter, POOL_ABI, ERC20_ABI, INCENTIVES_ABI, REWARDS_CONTROLLER_ABI, POOL_PROVIDER_ABI, ADDRESSES_PROVIDER_ABI, ORACLE_ABI, ERC20_DECIMALS_ABI, AaveV3Adapter, POOL_ABI2, ERC20_ABI2, AaveV2Adapter, ORACLE_ABI2, AaveOracleAdapter, CTOKEN_ABI, BSC_BLOCKS_PER_YEAR, CompoundV2Adapter, COMET_ABI, SECONDS_PER_YEAR, CompoundV3Adapter, EULER_VAULT_ABI, SECONDS_PER_YEAR2, EulerV2Adapter, MORPHO_ABI, META_MORPHO_ABI, IRM_ABI, SECONDS_PER_YEAR3, MorphoBlueAdapter, BORROWER_OPS_ABI, TROVE_MANAGER_ABI, HINT_HELPERS_ABI, SORTED_TROVES_ABI, FelixCdpAdapter, PRICE_FEED_ABI, FelixOracleAdapter, ERC4626_ABI, ERC4626VaultAdapter, GENERIC_LST_ABI, GenericLstAdapter, STHYPE_ABI, ERC20_ABI3, StHypeAdapter, KINETIQ_ABI, ORACLE_ABI3, WHYPE, HYPERLEND_ORACLE, KinetiqAdapter, PendleAdapter, GenericYieldAdapter, HLP_ABI, HlpVaultAdapter, GenericDerivativesAdapter, RYSK_ABI, RyskAdapter, GenericOptionsAdapter, ERC721_ABI, ERC721Adapter, DexSpotPrice;
|
|
1780
|
-
var
|
|
1022
|
+
var init_dist2 = __esm({
|
|
1781
1023
|
"../defi-protocols/dist/index.js"() {
|
|
1782
1024
|
"use strict";
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1025
|
+
init_dist();
|
|
1026
|
+
init_dist();
|
|
1027
|
+
init_dist();
|
|
1028
|
+
init_dist();
|
|
1029
|
+
init_dist();
|
|
1030
|
+
init_dist();
|
|
1031
|
+
init_dist();
|
|
1032
|
+
init_dist();
|
|
1033
|
+
init_dist();
|
|
1034
|
+
init_dist();
|
|
1035
|
+
init_dist();
|
|
1036
|
+
init_dist();
|
|
1037
|
+
init_dist();
|
|
1038
|
+
init_dist();
|
|
1039
|
+
init_dist();
|
|
1040
|
+
init_dist();
|
|
1041
|
+
init_dist();
|
|
1042
|
+
init_dist();
|
|
1043
|
+
init_dist();
|
|
1044
|
+
init_dist();
|
|
1045
|
+
init_dist();
|
|
1046
|
+
init_dist();
|
|
1047
|
+
init_dist();
|
|
1048
|
+
init_dist();
|
|
1049
|
+
init_dist();
|
|
1050
|
+
init_dist();
|
|
1051
|
+
init_dist();
|
|
1052
|
+
init_dist();
|
|
1053
|
+
init_dist();
|
|
1054
|
+
init_dist();
|
|
1055
|
+
init_dist();
|
|
1056
|
+
init_dist();
|
|
1057
|
+
init_dist();
|
|
1058
|
+
init_dist();
|
|
1817
1059
|
DEFAULT_FEE = 3e3;
|
|
1818
1060
|
swapRouterAbi = parseAbi3([
|
|
1819
1061
|
"struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; }",
|
|
@@ -6892,8 +6134,8 @@ var init_dist3 = __esm({
|
|
|
6892
6134
|
});
|
|
6893
6135
|
|
|
6894
6136
|
// src/mcp-server.ts
|
|
6137
|
+
init_dist();
|
|
6895
6138
|
init_dist2();
|
|
6896
|
-
init_dist3();
|
|
6897
6139
|
import "dotenv/config";
|
|
6898
6140
|
import { createRequire } from "module";
|
|
6899
6141
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -6901,8 +6143,8 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
6901
6143
|
import { z } from "zod";
|
|
6902
6144
|
|
|
6903
6145
|
// src/executor.ts
|
|
6904
|
-
|
|
6905
|
-
|
|
6146
|
+
init_dist();
|
|
6147
|
+
init_dist();
|
|
6906
6148
|
import { createPublicClient as createPublicClient23, createWalletClient, http as http23, parseAbi as parseAbi30, encodeFunctionData as encodeFunctionData27 } from "viem";
|
|
6907
6149
|
import { privateKeyToAccount } from "viem/accounts";
|
|
6908
6150
|
var ERC20_ABI4 = parseAbi30([
|
|
@@ -7625,6 +6867,277 @@ server.tool(
|
|
|
7625
6867
|
}
|
|
7626
6868
|
}
|
|
7627
6869
|
);
|
|
6870
|
+
server.tool(
|
|
6871
|
+
"defi_swap",
|
|
6872
|
+
"Swap tokens via DEX aggregator (KyberSwap or OpenOcean). Finds the best route automatically. Defaults to dry-run. Set broadcast=true to send transaction (requires DEFI_PRIVATE_KEY)",
|
|
6873
|
+
{
|
|
6874
|
+
chain: z.string().optional().describe("Chain name (default: hyperevm)"),
|
|
6875
|
+
token_in: z.string().describe("Input token symbol (e.g. WHYPE) or address (0x...)"),
|
|
6876
|
+
token_out: z.string().describe("Output token symbol (e.g. USDC) or address (0x...)"),
|
|
6877
|
+
amount_in: z.string().describe("Amount of input token in wei (as string)"),
|
|
6878
|
+
slippage_bps: z.number().optional().describe("Slippage tolerance in basis points (default: 50 = 0.5%)"),
|
|
6879
|
+
provider: z.enum(["kyber", "openocean"]).optional().describe("Aggregator to use: kyber (default) or openocean"),
|
|
6880
|
+
broadcast: z.boolean().optional().describe("Set true to broadcast the transaction (default: false = dry run)")
|
|
6881
|
+
},
|
|
6882
|
+
async ({ chain, token_in, token_out, amount_in, slippage_bps, provider, broadcast }) => {
|
|
6883
|
+
try {
|
|
6884
|
+
const chainName = (chain ?? "hyperevm").toLowerCase();
|
|
6885
|
+
const registry = getRegistry();
|
|
6886
|
+
const chainConfig = registry.getChain(chainName);
|
|
6887
|
+
const rpcUrl = chainConfig.effectiveRpcUrl();
|
|
6888
|
+
const fromAddr = token_in.startsWith("0x") ? token_in : registry.resolveToken(chainName, token_in).address;
|
|
6889
|
+
const toAddr = token_out.startsWith("0x") ? token_out : registry.resolveToken(chainName, token_out).address;
|
|
6890
|
+
const wallet = process.env["DEFI_WALLET_ADDRESS"] ?? "0x0000000000000000000000000000000000000001";
|
|
6891
|
+
const slippage = slippage_bps ?? 50;
|
|
6892
|
+
const agg = provider ?? "kyber";
|
|
6893
|
+
const KYBER_API = "https://aggregator-api.kyberswap.com";
|
|
6894
|
+
const OPENOCEAN_API = "https://open-api.openocean.finance/v4";
|
|
6895
|
+
let txParams;
|
|
6896
|
+
if (agg === "kyber") {
|
|
6897
|
+
const CHAIN_KYBER = { hyperevm: "hyperevm", mantle: "mantle" };
|
|
6898
|
+
const kyberChain = CHAIN_KYBER[chainName];
|
|
6899
|
+
if (!kyberChain) throw new Error(`KyberSwap: unsupported chain '${chainName}'`);
|
|
6900
|
+
const qparams = new URLSearchParams({ tokenIn: fromAddr, tokenOut: toAddr, amountIn: amount_in });
|
|
6901
|
+
const qres = await fetch(`${KYBER_API}/${kyberChain}/api/v1/routes?${qparams}`, {
|
|
6902
|
+
headers: { "x-client-id": "defi-cli" }
|
|
6903
|
+
});
|
|
6904
|
+
if (!qres.ok) throw new Error(`KyberSwap quote failed: ${qres.status}`);
|
|
6905
|
+
const qjson = await qres.json();
|
|
6906
|
+
const qdata = qjson.data;
|
|
6907
|
+
if (!qdata?.routeSummary) throw new Error("KyberSwap: no route found");
|
|
6908
|
+
const routeSummary = qdata.routeSummary;
|
|
6909
|
+
const amountOut = String(routeSummary.amountOut ?? "0");
|
|
6910
|
+
const bres = await fetch(`${KYBER_API}/${kyberChain}/api/v1/route/build`, {
|
|
6911
|
+
method: "POST",
|
|
6912
|
+
headers: { "Content-Type": "application/json", "x-client-id": "defi-cli" },
|
|
6913
|
+
body: JSON.stringify({ routeSummary, sender: wallet, recipient: wallet, slippageTolerance: slippage })
|
|
6914
|
+
});
|
|
6915
|
+
if (!bres.ok) throw new Error(`KyberSwap build failed: ${bres.status}`);
|
|
6916
|
+
const bjson = await bres.json();
|
|
6917
|
+
const bdata = bjson.data;
|
|
6918
|
+
if (!bdata) throw new Error("KyberSwap: no build data");
|
|
6919
|
+
txParams = {
|
|
6920
|
+
to: String(bdata.routerAddress),
|
|
6921
|
+
data: String(bdata.data),
|
|
6922
|
+
value: String(bdata.value ?? "0x0"),
|
|
6923
|
+
amountOut
|
|
6924
|
+
};
|
|
6925
|
+
} else {
|
|
6926
|
+
const CHAIN_OO = { hyperevm: "hyperevm", mantle: "mantle" };
|
|
6927
|
+
const ooChain = CHAIN_OO[chainName] ?? chainName;
|
|
6928
|
+
const humanAmount = (BigInt(amount_in) / BigInt(10 ** 18)).toString();
|
|
6929
|
+
const ooParams = new URLSearchParams({
|
|
6930
|
+
inTokenAddress: fromAddr,
|
|
6931
|
+
outTokenAddress: toAddr,
|
|
6932
|
+
amount: humanAmount,
|
|
6933
|
+
gasPrice: "0.1",
|
|
6934
|
+
slippage: String(slippage / 100),
|
|
6935
|
+
account: wallet
|
|
6936
|
+
});
|
|
6937
|
+
const ores = await fetch(`${OPENOCEAN_API}/${ooChain}/swap?${ooParams}`);
|
|
6938
|
+
if (!ores.ok) throw new Error(`OpenOcean swap failed: ${ores.status}`);
|
|
6939
|
+
const ojson = await ores.json();
|
|
6940
|
+
const odata = ojson.data;
|
|
6941
|
+
if (!odata) throw new Error("OpenOcean: no swap data");
|
|
6942
|
+
txParams = {
|
|
6943
|
+
to: String(odata.to),
|
|
6944
|
+
data: String(odata.data),
|
|
6945
|
+
value: String(odata.value ?? "0"),
|
|
6946
|
+
amountOut: String(odata.outAmount ?? "0")
|
|
6947
|
+
};
|
|
6948
|
+
}
|
|
6949
|
+
const tx = {
|
|
6950
|
+
description: `${agg === "kyber" ? "KyberSwap" : "OpenOcean"}: swap ${amount_in} ${token_in} -> ${token_out}`,
|
|
6951
|
+
to: txParams.to,
|
|
6952
|
+
data: txParams.data,
|
|
6953
|
+
value: txParams.value.startsWith("0x") ? BigInt(txParams.value) : BigInt(txParams.value || 0),
|
|
6954
|
+
approvals: [{ token: fromAddr, spender: txParams.to, amount: BigInt(amount_in) }]
|
|
6955
|
+
};
|
|
6956
|
+
const executor = makeExecutor(broadcast ?? false, rpcUrl, chainConfig.explorer_url);
|
|
6957
|
+
const result = await executor.execute(tx);
|
|
6958
|
+
return {
|
|
6959
|
+
content: [{
|
|
6960
|
+
type: "text",
|
|
6961
|
+
text: ok(
|
|
6962
|
+
{ ...result, amount_out: txParams.amountOut, provider: agg },
|
|
6963
|
+
{ chain: chainName, token_in, token_out, broadcast: broadcast ?? false }
|
|
6964
|
+
)
|
|
6965
|
+
}]
|
|
6966
|
+
};
|
|
6967
|
+
} catch (e) {
|
|
6968
|
+
return { content: [{ type: "text", text: err(e instanceof Error ? e.message : String(e), { token_in, token_out }) }], isError: true };
|
|
6969
|
+
}
|
|
6970
|
+
}
|
|
6971
|
+
);
|
|
6972
|
+
server.tool(
|
|
6973
|
+
"defi_lp_discover",
|
|
6974
|
+
"Scan all protocols on a chain for fee and emission pools (gauges, farming, Liquidity Book rewards). Returns up to 134 pools on HyperEVM.",
|
|
6975
|
+
{
|
|
6976
|
+
chain: z.string().optional().describe("Chain name (default: hyperevm)"),
|
|
6977
|
+
protocol: z.string().optional().describe("Filter to a single protocol slug (optional)"),
|
|
6978
|
+
emission_only: z.boolean().optional().describe("Only show emission pools (gauge/farming), skip fee-only pools")
|
|
6979
|
+
},
|
|
6980
|
+
async ({ chain, protocol, emission_only }) => {
|
|
6981
|
+
try {
|
|
6982
|
+
const chainName = (chain ?? "hyperevm").toLowerCase();
|
|
6983
|
+
const registry = getRegistry();
|
|
6984
|
+
const chainConfig = registry.getChain(chainName);
|
|
6985
|
+
const rpcUrl = chainConfig.effectiveRpcUrl();
|
|
6986
|
+
const { createGauge: createGauge2, createKittenSwapFarming: createKittenSwapFarming2, createMerchantMoeLB: createMerchantMoeLB2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
6987
|
+
const allProtocols = registry.getProtocolsForChain(chainName);
|
|
6988
|
+
const protocols = protocol ? [registry.getProtocol(protocol)] : allProtocols;
|
|
6989
|
+
const results = [];
|
|
6990
|
+
await Promise.allSettled(
|
|
6991
|
+
protocols.map(async (p) => {
|
|
6992
|
+
try {
|
|
6993
|
+
if (["solidly_v2", "solidly_cl", "algebra_v3", "hybra"].includes(p.interface)) {
|
|
6994
|
+
const adapter = createGauge2(p, rpcUrl);
|
|
6995
|
+
if (adapter.discoverGaugedPools) {
|
|
6996
|
+
const pools = await adapter.discoverGaugedPools();
|
|
6997
|
+
for (const pool of pools) {
|
|
6998
|
+
results.push({
|
|
6999
|
+
protocol: p.slug,
|
|
7000
|
+
pool: pool.pool,
|
|
7001
|
+
pair: `${pool.token0}/${pool.token1}`,
|
|
7002
|
+
type: "EMISSION",
|
|
7003
|
+
source: "gauge"
|
|
7004
|
+
});
|
|
7005
|
+
}
|
|
7006
|
+
}
|
|
7007
|
+
}
|
|
7008
|
+
if (p.interface === "algebra_v3" && p.contracts?.["farming_center"]) {
|
|
7009
|
+
const adapter = createKittenSwapFarming2(p, rpcUrl);
|
|
7010
|
+
const pools = await adapter.discoverFarmingPools();
|
|
7011
|
+
for (const pool of pools) {
|
|
7012
|
+
results.push({
|
|
7013
|
+
protocol: p.slug,
|
|
7014
|
+
pool: pool.pool,
|
|
7015
|
+
type: "EMISSION",
|
|
7016
|
+
source: "farming",
|
|
7017
|
+
active: pool.active
|
|
7018
|
+
});
|
|
7019
|
+
}
|
|
7020
|
+
}
|
|
7021
|
+
if (p.interface === "uniswap_v2" && p.contracts?.["lb_factory"]) {
|
|
7022
|
+
const adapter = createMerchantMoeLB2(p, rpcUrl);
|
|
7023
|
+
const pools = await adapter.discoverRewardedPools();
|
|
7024
|
+
for (const pool of pools) {
|
|
7025
|
+
if (emission_only && pool.stopped) continue;
|
|
7026
|
+
results.push({
|
|
7027
|
+
protocol: p.slug,
|
|
7028
|
+
pool: pool.pool,
|
|
7029
|
+
pair: `${pool.symbolX}/${pool.symbolY}`,
|
|
7030
|
+
type: "EMISSION",
|
|
7031
|
+
source: "lb_hooks",
|
|
7032
|
+
active: !pool.stopped,
|
|
7033
|
+
apr: pool.aprPercent ? `${pool.aprPercent}%` : void 0
|
|
7034
|
+
});
|
|
7035
|
+
}
|
|
7036
|
+
}
|
|
7037
|
+
} catch {
|
|
7038
|
+
}
|
|
7039
|
+
})
|
|
7040
|
+
);
|
|
7041
|
+
const filtered = emission_only ? results.filter((r) => r.type === "EMISSION") : results;
|
|
7042
|
+
return {
|
|
7043
|
+
content: [{
|
|
7044
|
+
type: "text",
|
|
7045
|
+
text: ok(
|
|
7046
|
+
{ chain: chainName, pools: filtered, total: filtered.length },
|
|
7047
|
+
{ scanned_protocols: protocols.length }
|
|
7048
|
+
)
|
|
7049
|
+
}]
|
|
7050
|
+
};
|
|
7051
|
+
} catch (e) {
|
|
7052
|
+
return { content: [{ type: "text", text: err(e instanceof Error ? e.message : String(e)) }], isError: true };
|
|
7053
|
+
}
|
|
7054
|
+
}
|
|
7055
|
+
);
|
|
7056
|
+
server.tool(
|
|
7057
|
+
"defi_lp_autopilot",
|
|
7058
|
+
"Generate an LP autopilot allocation plan from the whitelisted pools in ~/.defi/pools.toml. Returns a dry-run plan with budget splits per pool. Always runs as dry-run (read-only).",
|
|
7059
|
+
{
|
|
7060
|
+
chain: z.string().optional().describe("Chain name (default: hyperevm)"),
|
|
7061
|
+
budget_usd: z.number().describe("Total budget in USD to allocate across whitelisted pools")
|
|
7062
|
+
},
|
|
7063
|
+
async ({ chain, budget_usd }) => {
|
|
7064
|
+
try {
|
|
7065
|
+
const chainName = (chain ?? "hyperevm").toLowerCase();
|
|
7066
|
+
if (budget_usd <= 0) throw new Error("budget_usd must be greater than 0");
|
|
7067
|
+
const { readFileSync: readFileSync2, existsSync: existsSync2 } = await import("fs");
|
|
7068
|
+
const { homedir } = await import("os");
|
|
7069
|
+
const { join } = await import("path");
|
|
7070
|
+
const whitelistPath = join(homedir(), ".defi", "pools.toml");
|
|
7071
|
+
if (!existsSync2(whitelistPath)) {
|
|
7072
|
+
return {
|
|
7073
|
+
content: [{
|
|
7074
|
+
type: "text",
|
|
7075
|
+
text: err(
|
|
7076
|
+
`No whitelist found at ${whitelistPath}. Create it with [[pools]] entries (see defi-cli README).`,
|
|
7077
|
+
{ path: whitelistPath }
|
|
7078
|
+
)
|
|
7079
|
+
}],
|
|
7080
|
+
isError: true
|
|
7081
|
+
};
|
|
7082
|
+
}
|
|
7083
|
+
const raw = readFileSync2(whitelistPath, "utf8");
|
|
7084
|
+
const entries = [];
|
|
7085
|
+
let current = null;
|
|
7086
|
+
for (const line of raw.split("\n")) {
|
|
7087
|
+
const trimmed = line.trim();
|
|
7088
|
+
if (trimmed === "[[pools]]") {
|
|
7089
|
+
if (current) entries.push(current);
|
|
7090
|
+
current = {};
|
|
7091
|
+
} else if (current && trimmed.includes("=")) {
|
|
7092
|
+
const [k, ...rest] = trimmed.split("=");
|
|
7093
|
+
const key = k.trim();
|
|
7094
|
+
const val = rest.join("=").trim().replace(/^"|"$/g, "");
|
|
7095
|
+
if (key === "weight") {
|
|
7096
|
+
current[key] = parseFloat(val);
|
|
7097
|
+
} else {
|
|
7098
|
+
current[key] = val;
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
if (current) entries.push(current);
|
|
7103
|
+
const chainFiltered = entries.filter((e) => !e.chain || e.chain.toLowerCase() === chainName);
|
|
7104
|
+
if (chainFiltered.length === 0) {
|
|
7105
|
+
throw new Error(`No whitelisted pools for chain '${chainName}' in ${whitelistPath}`);
|
|
7106
|
+
}
|
|
7107
|
+
const totalWeight = chainFiltered.reduce((s, e) => s + (e.weight ?? 1), 0);
|
|
7108
|
+
const plan = chainFiltered.map((e) => {
|
|
7109
|
+
const weight = e.weight ?? 1;
|
|
7110
|
+
const alloc = weight / totalWeight * budget_usd;
|
|
7111
|
+
return {
|
|
7112
|
+
protocol: e.protocol ?? "unknown",
|
|
7113
|
+
pool_address: e.pool_address ?? "unknown",
|
|
7114
|
+
type: e.type ?? "lp",
|
|
7115
|
+
asset: e.asset,
|
|
7116
|
+
weight,
|
|
7117
|
+
weight_pct: Math.round(weight / totalWeight * 1e4) / 100,
|
|
7118
|
+
allocated_usd: Math.round(alloc * 100) / 100
|
|
7119
|
+
};
|
|
7120
|
+
});
|
|
7121
|
+
return {
|
|
7122
|
+
content: [{
|
|
7123
|
+
type: "text",
|
|
7124
|
+
text: ok(
|
|
7125
|
+
{
|
|
7126
|
+
chain: chainName,
|
|
7127
|
+
budget_usd,
|
|
7128
|
+
plan,
|
|
7129
|
+
total_pools: plan.length,
|
|
7130
|
+
note: "This is a dry-run plan. Use the defi CLI with --broadcast to execute."
|
|
7131
|
+
},
|
|
7132
|
+
{ whitelist_path: whitelistPath }
|
|
7133
|
+
)
|
|
7134
|
+
}]
|
|
7135
|
+
};
|
|
7136
|
+
} catch (e) {
|
|
7137
|
+
return { content: [{ type: "text", text: err(e instanceof Error ? e.message : String(e)) }], isError: true };
|
|
7138
|
+
}
|
|
7139
|
+
}
|
|
7140
|
+
);
|
|
7628
7141
|
server.tool(
|
|
7629
7142
|
"defi_price",
|
|
7630
7143
|
"Query asset price from on-chain oracles (Aave V3) and/or DEX spot prices",
|
|
@@ -7654,8 +7167,8 @@ server.tool(
|
|
|
7654
7167
|
} catch (e) {
|
|
7655
7168
|
return { content: [{ type: "text", text: err(`Could not resolve asset: ${asset}`) }], isError: true };
|
|
7656
7169
|
}
|
|
7657
|
-
const { ProtocolCategory: ProtocolCategory2 } = await Promise.resolve().then(() => (
|
|
7658
|
-
const { createOracleFromLending: createOracleFromLending2 } = await Promise.resolve().then(() => (
|
|
7170
|
+
const { ProtocolCategory: ProtocolCategory2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
|
7171
|
+
const { createOracleFromLending: createOracleFromLending2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
7659
7172
|
const prices = [];
|
|
7660
7173
|
if (srcMode === "all" || srcMode === "oracle") {
|
|
7661
7174
|
const lendingProtos = registry.getProtocolsForChain(chainName).filter((p) => p.category === ProtocolCategory2.Lending);
|
|
@@ -7669,7 +7182,7 @@ server.tool(
|
|
|
7669
7182
|
}));
|
|
7670
7183
|
}
|
|
7671
7184
|
if (srcMode === "all" || srcMode === "dex") {
|
|
7672
|
-
const { DexSpotPrice: DexSpotPrice2 } = await Promise.resolve().then(() => (
|
|
7185
|
+
const { DexSpotPrice: DexSpotPrice2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
7673
7186
|
const USDC_SYMBOL = "USDC";
|
|
7674
7187
|
let usdcAddr;
|
|
7675
7188
|
let usdcDecimals = 6;
|
|
@@ -7733,8 +7246,8 @@ server.tool(
|
|
|
7733
7246
|
const registry = getRegistry();
|
|
7734
7247
|
const chainConfig = registry.getChain(chainName);
|
|
7735
7248
|
const rpcUrl = chainConfig.effectiveRpcUrl();
|
|
7736
|
-
const { ProtocolCategory: ProtocolCategory2 } = await Promise.resolve().then(() => (
|
|
7737
|
-
const { createOracleFromLending: createOracleFromLending2, DexSpotPrice: DexSpotPrice2 } = await Promise.resolve().then(() => (
|
|
7249
|
+
const { ProtocolCategory: ProtocolCategory2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
|
7250
|
+
const { createOracleFromLending: createOracleFromLending2, DexSpotPrice: DexSpotPrice2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
7738
7251
|
const tokens = registry.tokens.get(chainName) ?? [];
|
|
7739
7252
|
const lendingProtos = registry.getProtocolsForChain(chainName).filter((p) => p.category === ProtocolCategory2.Lending);
|
|
7740
7253
|
const dexProtos = registry.getProtocolsForChain(chainName).filter((p) => p.category === ProtocolCategory2.Dex);
|
|
@@ -7817,8 +7330,8 @@ server.tool(
|
|
|
7817
7330
|
const chainConfig = registry.getChain(chainName);
|
|
7818
7331
|
const rpcUrl = chainConfig.effectiveRpcUrl();
|
|
7819
7332
|
const user = address;
|
|
7820
|
-
const { ProtocolCategory: ProtocolCategory2, multicallRead: multicallRead2 } = await Promise.resolve().then(() => (
|
|
7821
|
-
const { createLending: _createLending } = await Promise.resolve().then(() => (
|
|
7333
|
+
const { ProtocolCategory: ProtocolCategory2, multicallRead: multicallRead2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
|
7334
|
+
const { createLending: _createLending } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
7822
7335
|
const { encodeFunctionData: encodeFunctionData28, parseAbi: parseAbi31 } = await import("viem");
|
|
7823
7336
|
const POOL_ABI3 = parseAbi31([
|
|
7824
7337
|
"function getUserAccountData(address user) external view returns (uint256 totalCollateralBase, uint256 totalDebtBase, uint256 availableBorrowsBase, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)"
|
|
@@ -7875,43 +7388,4 @@ server.tool(
|
|
|
7875
7388
|
);
|
|
7876
7389
|
var transport = new StdioServerTransport();
|
|
7877
7390
|
await server.connect(transport);
|
|
7878
|
-
/*! Bundled license information:
|
|
7879
|
-
|
|
7880
|
-
smol-toml/dist/error.js:
|
|
7881
|
-
smol-toml/dist/util.js:
|
|
7882
|
-
smol-toml/dist/date.js:
|
|
7883
|
-
smol-toml/dist/primitive.js:
|
|
7884
|
-
smol-toml/dist/extract.js:
|
|
7885
|
-
smol-toml/dist/struct.js:
|
|
7886
|
-
smol-toml/dist/parse.js:
|
|
7887
|
-
smol-toml/dist/stringify.js:
|
|
7888
|
-
smol-toml/dist/index.js:
|
|
7889
|
-
(*!
|
|
7890
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
7891
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
7892
|
-
*
|
|
7893
|
-
* Redistribution and use in source and binary forms, with or without
|
|
7894
|
-
* modification, are permitted provided that the following conditions are met:
|
|
7895
|
-
*
|
|
7896
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
7897
|
-
* list of conditions and the following disclaimer.
|
|
7898
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
7899
|
-
* this list of conditions and the following disclaimer in the
|
|
7900
|
-
* documentation and/or other materials provided with the distribution.
|
|
7901
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
7902
|
-
* may be used to endorse or promote products derived from this software without
|
|
7903
|
-
* specific prior written permission.
|
|
7904
|
-
*
|
|
7905
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
7906
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
7907
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
7908
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
7909
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
7910
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
7911
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
7912
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
7913
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
7914
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
7915
|
-
*)
|
|
7916
|
-
*/
|
|
7917
7391
|
//# sourceMappingURL=mcp-server.js.map
|