@gbozee/ultimate 0.0.2-119 → 0.0.2-121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend-index.js +7 -14
- package/dist/index.cjs +241 -214
- package/dist/index.d.ts +3 -0
- package/dist/index.js +245 -222
- package/dist/mcp-client.cjs +25 -50
- package/dist/mcp-client.js +25 -50
- package/dist/mcp-server.cjs +244 -220
- package/dist/mcp-server.js +248 -228
- package/package.json +1 -1
- package/dist/frontend/frontend-index.js +0 -1318
- package/dist/mcp.d.ts +0 -5
package/dist/mcp-server.cjs
CHANGED
|
@@ -580,8 +580,7 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
|
580
580
|
let macCheckPassed;
|
|
581
581
|
try {
|
|
582
582
|
macCheckPassed = timing_safe_equal_default(tag, expectedTag);
|
|
583
|
-
} catch {
|
|
584
|
-
}
|
|
583
|
+
} catch {}
|
|
585
584
|
if (!macCheckPassed) {
|
|
586
585
|
throw new JWEDecryptionFailed;
|
|
587
586
|
}
|
|
@@ -589,8 +588,7 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
|
589
588
|
try {
|
|
590
589
|
const decipher = import_node_crypto6.createDecipheriv(algorithm, encKey, iv);
|
|
591
590
|
plaintext = concat(decipher.update(ciphertext), decipher.final());
|
|
592
|
-
} catch {
|
|
593
|
-
}
|
|
591
|
+
} catch {}
|
|
594
592
|
if (!plaintext) {
|
|
595
593
|
throw new JWEDecryptionFailed;
|
|
596
594
|
}
|
|
@@ -769,8 +767,7 @@ function isPublicJWK(key) {
|
|
|
769
767
|
function isSecretJWK(key) {
|
|
770
768
|
return isJWK(key) && key.kty === "oct" && typeof key.k === "string";
|
|
771
769
|
}
|
|
772
|
-
var init_is_jwk = () => {
|
|
773
|
-
};
|
|
770
|
+
var init_is_jwk = () => {};
|
|
774
771
|
|
|
775
772
|
// node_modules/jose/dist/node/esm/runtime/get_named_curve.js
|
|
776
773
|
var import_node_crypto8, weakMap, namedCurveToJOSE = (namedCurve) => {
|
|
@@ -952,8 +949,7 @@ var import_node_crypto11, check_key_length_default = (key, alg) => {
|
|
|
952
949
|
} else {
|
|
953
950
|
modulusLength = Buffer.from(key.n, "base64url").byteLength << 3;
|
|
954
951
|
}
|
|
955
|
-
} catch {
|
|
956
|
-
}
|
|
952
|
+
} catch {}
|
|
957
953
|
if (typeof modulusLength !== "number" || modulusLength < 2048) {
|
|
958
954
|
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
|
959
955
|
}
|
|
@@ -1714,8 +1710,7 @@ async function generalDecrypt(jwe, key, options) {
|
|
|
1714
1710
|
tag: jwe.tag,
|
|
1715
1711
|
unprotected: jwe.unprotected
|
|
1716
1712
|
}, key, options);
|
|
1717
|
-
} catch {
|
|
1718
|
-
}
|
|
1713
|
+
} catch {}
|
|
1719
1714
|
}
|
|
1720
1715
|
throw new JWEDecryptionFailed;
|
|
1721
1716
|
}
|
|
@@ -2601,8 +2596,7 @@ async function generalVerify(jws, key, options) {
|
|
|
2601
2596
|
protected: signature.protected,
|
|
2602
2597
|
signature: signature.signature
|
|
2603
2598
|
}, key, options);
|
|
2604
|
-
} catch {
|
|
2605
|
-
}
|
|
2599
|
+
} catch {}
|
|
2606
2600
|
}
|
|
2607
2601
|
throw new JWSSignatureVerificationFailed;
|
|
2608
2602
|
}
|
|
@@ -2685,8 +2679,7 @@ var normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ""),
|
|
|
2685
2679
|
let payload;
|
|
2686
2680
|
try {
|
|
2687
2681
|
payload = JSON.parse(decoder.decode(encodedPayload));
|
|
2688
|
-
} catch {
|
|
2689
|
-
}
|
|
2682
|
+
} catch {}
|
|
2690
2683
|
if (!isObject(payload)) {
|
|
2691
2684
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
2692
2685
|
}
|
|
@@ -3371,8 +3364,7 @@ class LocalJWKSet {
|
|
|
3371
3364
|
for (const jwk2 of candidates) {
|
|
3372
3365
|
try {
|
|
3373
3366
|
yield await importWithAlgCache(_cached, jwk2, alg);
|
|
3374
|
-
} catch {
|
|
3375
|
-
}
|
|
3367
|
+
} catch {}
|
|
3376
3368
|
}
|
|
3377
3369
|
};
|
|
3378
3370
|
throw error;
|
|
@@ -3919,8 +3911,7 @@ var require_util = __commonJS((exports2) => {
|
|
|
3919
3911
|
var util5;
|
|
3920
3912
|
(function(util6) {
|
|
3921
3913
|
util6.assertEqual = (val) => val;
|
|
3922
|
-
function assertIs(_arg) {
|
|
3923
|
-
}
|
|
3914
|
+
function assertIs(_arg) {}
|
|
3924
3915
|
util6.assertIs = assertIs;
|
|
3925
3916
|
function assertNever(_x) {
|
|
3926
3917
|
throw new Error;
|
|
@@ -6336,8 +6327,7 @@ var require_types = __commonJS((exports2) => {
|
|
|
6336
6327
|
});
|
|
6337
6328
|
status.dirty();
|
|
6338
6329
|
}
|
|
6339
|
-
} else if (unknownKeys === "strip") {
|
|
6340
|
-
} else {
|
|
6330
|
+
} else if (unknownKeys === "strip") {} else {
|
|
6341
6331
|
throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
|
|
6342
6332
|
}
|
|
6343
6333
|
} else {
|
|
@@ -8489,8 +8479,7 @@ var require_logLevelLogger = __commonJS((exports2) => {
|
|
|
8489
8479
|
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
8490
8480
|
return theFunc.bind(logger);
|
|
8491
8481
|
}
|
|
8492
|
-
return function() {
|
|
8493
|
-
};
|
|
8482
|
+
return function() {};
|
|
8494
8483
|
}
|
|
8495
8484
|
return {
|
|
8496
8485
|
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
@@ -8715,8 +8704,7 @@ var require_NoopMeter = __commonJS((exports2) => {
|
|
|
8715
8704
|
exports2.createNoopMeter = exports2.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports2.NOOP_OBSERVABLE_GAUGE_METRIC = exports2.NOOP_OBSERVABLE_COUNTER_METRIC = exports2.NOOP_UP_DOWN_COUNTER_METRIC = exports2.NOOP_HISTOGRAM_METRIC = exports2.NOOP_GAUGE_METRIC = exports2.NOOP_COUNTER_METRIC = exports2.NOOP_METER = exports2.NoopObservableUpDownCounterMetric = exports2.NoopObservableGaugeMetric = exports2.NoopObservableCounterMetric = exports2.NoopObservableMetric = exports2.NoopHistogramMetric = exports2.NoopGaugeMetric = exports2.NoopUpDownCounterMetric = exports2.NoopCounterMetric = exports2.NoopMetric = exports2.NoopMeter = undefined;
|
|
8716
8705
|
|
|
8717
8706
|
class NoopMeter {
|
|
8718
|
-
constructor() {
|
|
8719
|
-
}
|
|
8707
|
+
constructor() {}
|
|
8720
8708
|
createGauge(_name, _options) {
|
|
8721
8709
|
return exports2.NOOP_GAUGE_METRIC;
|
|
8722
8710
|
}
|
|
@@ -8738,10 +8726,8 @@ var require_NoopMeter = __commonJS((exports2) => {
|
|
|
8738
8726
|
createObservableUpDownCounter(_name, _options) {
|
|
8739
8727
|
return exports2.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
8740
8728
|
}
|
|
8741
|
-
addBatchObservableCallback(_callback, _observables) {
|
|
8742
|
-
}
|
|
8743
|
-
removeBatchObservableCallback(_callback) {
|
|
8744
|
-
}
|
|
8729
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
8730
|
+
removeBatchObservableCallback(_callback) {}
|
|
8745
8731
|
}
|
|
8746
8732
|
exports2.NoopMeter = NoopMeter;
|
|
8747
8733
|
|
|
@@ -8750,34 +8736,28 @@ var require_NoopMeter = __commonJS((exports2) => {
|
|
|
8750
8736
|
exports2.NoopMetric = NoopMetric;
|
|
8751
8737
|
|
|
8752
8738
|
class NoopCounterMetric extends NoopMetric {
|
|
8753
|
-
add(_value, _attributes) {
|
|
8754
|
-
}
|
|
8739
|
+
add(_value, _attributes) {}
|
|
8755
8740
|
}
|
|
8756
8741
|
exports2.NoopCounterMetric = NoopCounterMetric;
|
|
8757
8742
|
|
|
8758
8743
|
class NoopUpDownCounterMetric extends NoopMetric {
|
|
8759
|
-
add(_value, _attributes) {
|
|
8760
|
-
}
|
|
8744
|
+
add(_value, _attributes) {}
|
|
8761
8745
|
}
|
|
8762
8746
|
exports2.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
8763
8747
|
|
|
8764
8748
|
class NoopGaugeMetric extends NoopMetric {
|
|
8765
|
-
record(_value, _attributes) {
|
|
8766
|
-
}
|
|
8749
|
+
record(_value, _attributes) {}
|
|
8767
8750
|
}
|
|
8768
8751
|
exports2.NoopGaugeMetric = NoopGaugeMetric;
|
|
8769
8752
|
|
|
8770
8753
|
class NoopHistogramMetric extends NoopMetric {
|
|
8771
|
-
record(_value, _attributes) {
|
|
8772
|
-
}
|
|
8754
|
+
record(_value, _attributes) {}
|
|
8773
8755
|
}
|
|
8774
8756
|
exports2.NoopHistogramMetric = NoopHistogramMetric;
|
|
8775
8757
|
|
|
8776
8758
|
class NoopObservableMetric {
|
|
8777
|
-
addCallback(_callback) {
|
|
8778
|
-
}
|
|
8779
|
-
removeCallback(_callback) {
|
|
8780
|
-
}
|
|
8759
|
+
addCallback(_callback) {}
|
|
8760
|
+
removeCallback(_callback) {}
|
|
8781
8761
|
}
|
|
8782
8762
|
exports2.NoopObservableMetric = NoopObservableMetric;
|
|
8783
8763
|
|
|
@@ -8882,8 +8862,7 @@ var require_context2 = __commonJS((exports2) => {
|
|
|
8882
8862
|
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
8883
8863
|
|
|
8884
8864
|
class ContextAPI {
|
|
8885
|
-
constructor() {
|
|
8886
|
-
}
|
|
8865
|
+
constructor() {}
|
|
8887
8866
|
static getInstance() {
|
|
8888
8867
|
if (!this._instance) {
|
|
8889
8868
|
this._instance = new ContextAPI;
|
|
@@ -8972,13 +8951,11 @@ var require_NonRecordingSpan = __commonJS((exports2) => {
|
|
|
8972
8951
|
updateName(_name) {
|
|
8973
8952
|
return this;
|
|
8974
8953
|
}
|
|
8975
|
-
end(_endTime) {
|
|
8976
|
-
}
|
|
8954
|
+
end(_endTime) {}
|
|
8977
8955
|
isRecording() {
|
|
8978
8956
|
return false;
|
|
8979
8957
|
}
|
|
8980
|
-
recordException(_exception, _time) {
|
|
8981
|
-
}
|
|
8958
|
+
recordException(_exception, _time) {}
|
|
8982
8959
|
}
|
|
8983
8960
|
exports2.NonRecordingSpan = NonRecordingSpan;
|
|
8984
8961
|
});
|
|
@@ -9280,8 +9257,7 @@ var require_tracestate_impl = __commonJS((exports2) => {
|
|
|
9280
9257
|
const value = listMember.slice(i + 1, part.length);
|
|
9281
9258
|
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
9282
9259
|
agg.set(key, value);
|
|
9283
|
-
} else {
|
|
9284
|
-
}
|
|
9260
|
+
} else {}
|
|
9285
9261
|
}
|
|
9286
9262
|
return agg;
|
|
9287
9263
|
}, new Map);
|
|
@@ -9353,8 +9329,7 @@ var require_metrics = __commonJS((exports2) => {
|
|
|
9353
9329
|
var API_NAME2 = "metrics";
|
|
9354
9330
|
|
|
9355
9331
|
class MetricsAPI {
|
|
9356
|
-
constructor() {
|
|
9357
|
-
}
|
|
9332
|
+
constructor() {}
|
|
9358
9333
|
static getInstance() {
|
|
9359
9334
|
if (!this._instance) {
|
|
9360
9335
|
this._instance = new MetricsAPI;
|
|
@@ -9391,8 +9366,7 @@ var require_NoopTextMapPropagator = __commonJS((exports2) => {
|
|
|
9391
9366
|
exports2.NoopTextMapPropagator = undefined;
|
|
9392
9367
|
|
|
9393
9368
|
class NoopTextMapPropagator {
|
|
9394
|
-
inject(_context, _carrier) {
|
|
9395
|
-
}
|
|
9369
|
+
inject(_context, _carrier) {}
|
|
9396
9370
|
extract(context, _carrier) {
|
|
9397
9371
|
return context;
|
|
9398
9372
|
}
|
|
@@ -9705,8 +9679,7 @@ class Registry {
|
|
|
9705
9679
|
return this.kv.getByKey(identifier);
|
|
9706
9680
|
}
|
|
9707
9681
|
}
|
|
9708
|
-
var init_registry = () => {
|
|
9709
|
-
};
|
|
9682
|
+
var init_registry = () => {};
|
|
9710
9683
|
|
|
9711
9684
|
// node_modules/superjson/dist/class-registry.js
|
|
9712
9685
|
var ClassRegistry;
|
|
@@ -9791,8 +9764,7 @@ class CustomTransformerRegistry {
|
|
|
9791
9764
|
return this.transfomers[name2];
|
|
9792
9765
|
}
|
|
9793
9766
|
}
|
|
9794
|
-
var init_custom_transformer_registry = () => {
|
|
9795
|
-
};
|
|
9767
|
+
var init_custom_transformer_registry = () => {};
|
|
9796
9768
|
|
|
9797
9769
|
// node_modules/superjson/dist/is.js
|
|
9798
9770
|
var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1), isUndefined = (payload) => typeof payload === "undefined", isNull = (payload) => payload === null, isPlainObject = (payload) => {
|
|
@@ -10137,8 +10109,7 @@ var getNthKey = (value, n) => {
|
|
|
10137
10109
|
}
|
|
10138
10110
|
return object2;
|
|
10139
10111
|
};
|
|
10140
|
-
var init_accessDeep = () => {
|
|
10141
|
-
};
|
|
10112
|
+
var init_accessDeep = () => {};
|
|
10142
10113
|
|
|
10143
10114
|
// node_modules/superjson/dist/plainer.js
|
|
10144
10115
|
function traverse(tree, walker, origin = []) {
|
|
@@ -10727,8 +10698,7 @@ var require_NoopLogger = __commonJS((exports2) => {
|
|
|
10727
10698
|
exports2.NOOP_LOGGER = exports2.NoopLogger = undefined;
|
|
10728
10699
|
|
|
10729
10700
|
class NoopLogger {
|
|
10730
|
-
emit(_logRecord) {
|
|
10731
|
-
}
|
|
10701
|
+
emit(_logRecord) {}
|
|
10732
10702
|
}
|
|
10733
10703
|
exports2.NoopLogger = NoopLogger;
|
|
10734
10704
|
exports2.NOOP_LOGGER = new NoopLogger;
|
|
@@ -10822,8 +10792,7 @@ var require_logs = __commonJS((exports2) => {
|
|
|
10822
10792
|
var NoopLoggerProvider_1 = require_NoopLoggerProvider();
|
|
10823
10793
|
|
|
10824
10794
|
class LogsAPI {
|
|
10825
|
-
constructor() {
|
|
10826
|
-
}
|
|
10795
|
+
constructor() {}
|
|
10827
10796
|
static getInstance() {
|
|
10828
10797
|
if (!this._instance) {
|
|
10829
10798
|
this._instance = new LogsAPI;
|
|
@@ -11291,8 +11260,7 @@ var require_browser = __commonJS((exports2, module2) => {
|
|
|
11291
11260
|
});
|
|
11292
11261
|
args.splice(lastC, 0, c);
|
|
11293
11262
|
}
|
|
11294
|
-
exports2.log = console.debug || console.log || (() => {
|
|
11295
|
-
});
|
|
11263
|
+
exports2.log = console.debug || console.log || (() => {});
|
|
11296
11264
|
function save(namespaces) {
|
|
11297
11265
|
try {
|
|
11298
11266
|
if (namespaces) {
|
|
@@ -11300,15 +11268,13 @@ var require_browser = __commonJS((exports2, module2) => {
|
|
|
11300
11268
|
} else {
|
|
11301
11269
|
exports2.storage.removeItem("debug");
|
|
11302
11270
|
}
|
|
11303
|
-
} catch (error) {
|
|
11304
|
-
}
|
|
11271
|
+
} catch (error) {}
|
|
11305
11272
|
}
|
|
11306
11273
|
function load() {
|
|
11307
11274
|
let r;
|
|
11308
11275
|
try {
|
|
11309
11276
|
r = exports2.storage.getItem("debug");
|
|
11310
|
-
} catch (error) {
|
|
11311
|
-
}
|
|
11277
|
+
} catch (error) {}
|
|
11312
11278
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
11313
11279
|
r = process.env.DEBUG;
|
|
11314
11280
|
}
|
|
@@ -11317,8 +11283,7 @@ var require_browser = __commonJS((exports2, module2) => {
|
|
|
11317
11283
|
function localstorage() {
|
|
11318
11284
|
try {
|
|
11319
11285
|
return localStorage;
|
|
11320
|
-
} catch (error) {
|
|
11321
|
-
}
|
|
11286
|
+
} catch (error) {}
|
|
11322
11287
|
}
|
|
11323
11288
|
module2.exports = require_common()(exports2);
|
|
11324
11289
|
var { formatters } = module2.exports;
|
|
@@ -11450,8 +11415,7 @@ var require_node3 = __commonJS((exports2, module2) => {
|
|
|
11450
11415
|
exports2.save = save;
|
|
11451
11416
|
exports2.load = load;
|
|
11452
11417
|
exports2.useColors = useColors;
|
|
11453
|
-
exports2.destroy = util5.deprecate(() => {
|
|
11454
|
-
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
11418
|
+
exports2.destroy = util5.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
11455
11419
|
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
11456
11420
|
try {
|
|
11457
11421
|
const supportsColor = require_supports_color();
|
|
@@ -11535,8 +11499,7 @@ var require_node3 = __commonJS((exports2, module2) => {
|
|
|
11535
11499
|
221
|
|
11536
11500
|
];
|
|
11537
11501
|
}
|
|
11538
|
-
} catch (error) {
|
|
11539
|
-
}
|
|
11502
|
+
} catch (error) {}
|
|
11540
11503
|
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
11541
11504
|
return /^debug_/i.test(key);
|
|
11542
11505
|
}).reduce((obj, key) => {
|
|
@@ -13785,8 +13748,7 @@ var require_jsbn = __commonJS((exports2, module2) => {
|
|
|
13785
13748
|
++this[w];
|
|
13786
13749
|
}
|
|
13787
13750
|
}
|
|
13788
|
-
function NullExp() {
|
|
13789
|
-
}
|
|
13751
|
+
function NullExp() {}
|
|
13790
13752
|
function nNop(x) {
|
|
13791
13753
|
return x;
|
|
13792
13754
|
}
|
|
@@ -14211,8 +14173,7 @@ var require_jsbn = __commonJS((exports2, module2) => {
|
|
|
14211
14173
|
for (i2 = 0;i2 < ba.length; ++i2)
|
|
14212
14174
|
ba[i2] = rng_get_byte();
|
|
14213
14175
|
}
|
|
14214
|
-
function SecureRandom() {
|
|
14215
|
-
}
|
|
14176
|
+
function SecureRandom() {}
|
|
14216
14177
|
SecureRandom.prototype.nextBytes = rng_get_bytes;
|
|
14217
14178
|
function Arcfour() {
|
|
14218
14179
|
this.i = 0;
|
|
@@ -16435,8 +16396,7 @@ var require_delayed_stream = __commonJS((exports2, module2) => {
|
|
|
16435
16396
|
delayedStream._handleEmit(arguments);
|
|
16436
16397
|
return realEmit.apply(source, arguments);
|
|
16437
16398
|
};
|
|
16438
|
-
source.on("error", function() {
|
|
16439
|
-
});
|
|
16399
|
+
source.on("error", function() {});
|
|
16440
16400
|
if (delayedStream.pauseStream) {
|
|
16441
16401
|
source.pause();
|
|
16442
16402
|
}
|
|
@@ -25740,8 +25700,7 @@ var require_implementation = __commonJS((exports2, module2) => {
|
|
|
25740
25700
|
}
|
|
25741
25701
|
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
25742
25702
|
if (target.prototype) {
|
|
25743
|
-
var Empty = function Empty() {
|
|
25744
|
-
};
|
|
25703
|
+
var Empty = function Empty() {};
|
|
25745
25704
|
Empty.prototype = target.prototype;
|
|
25746
25705
|
bound.prototype = new Empty;
|
|
25747
25706
|
Empty.prototype = null;
|
|
@@ -25861,8 +25820,7 @@ var require_get_intrinsic = __commonJS((exports2, module2) => {
|
|
|
25861
25820
|
var getEvalledConstructor = function(expressionSyntax) {
|
|
25862
25821
|
try {
|
|
25863
25822
|
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
25864
|
-
} catch (e2) {
|
|
25865
|
-
}
|
|
25823
|
+
} catch (e2) {}
|
|
25866
25824
|
};
|
|
25867
25825
|
var $gOPD = require_gopd();
|
|
25868
25826
|
var $defineProperty = require_es_define_property();
|
|
@@ -26601,11 +26559,9 @@ var require_debug = __commonJS((exports2, module2) => {
|
|
|
26601
26559
|
if (!debug) {
|
|
26602
26560
|
try {
|
|
26603
26561
|
debug = require_src4()("follow-redirects");
|
|
26604
|
-
} catch (error) {
|
|
26605
|
-
}
|
|
26562
|
+
} catch (error) {}
|
|
26606
26563
|
if (typeof debug !== "function") {
|
|
26607
|
-
debug = function() {
|
|
26608
|
-
};
|
|
26564
|
+
debug = function() {};
|
|
26609
26565
|
}
|
|
26610
26566
|
}
|
|
26611
26567
|
debug.apply(null, arguments);
|
|
@@ -26980,8 +26936,7 @@ var require_follow_redirects = __commonJS((exports2, module2) => {
|
|
|
26980
26936
|
});
|
|
26981
26937
|
return exports3;
|
|
26982
26938
|
}
|
|
26983
|
-
function noop2() {
|
|
26984
|
-
}
|
|
26939
|
+
function noop2() {}
|
|
26985
26940
|
function parseUrl(input) {
|
|
26986
26941
|
var parsed;
|
|
26987
26942
|
if (useNativeURL) {
|
|
@@ -27364,8 +27319,7 @@ var require_axios = __commonJS((exports2, module2) => {
|
|
|
27364
27319
|
isArray3(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
|
|
27365
27320
|
return obj;
|
|
27366
27321
|
};
|
|
27367
|
-
var noop2 = () => {
|
|
27368
|
-
};
|
|
27322
|
+
var noop2 = () => {};
|
|
27369
27323
|
var toFiniteNumber = (value2, defaultValue) => {
|
|
27370
27324
|
return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
|
|
27371
27325
|
};
|
|
@@ -28818,8 +28772,7 @@ var require_axios = __commonJS((exports2, module2) => {
|
|
|
28818
28772
|
try {
|
|
28819
28773
|
const knownLength = await util__default["default"].promisify(data.getLength).call(data);
|
|
28820
28774
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
28821
|
-
} catch (e2) {
|
|
28822
|
-
}
|
|
28775
|
+
} catch (e2) {}
|
|
28823
28776
|
}
|
|
28824
28777
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
28825
28778
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
@@ -29093,13 +29046,11 @@ var require_axios = __commonJS((exports2, module2) => {
|
|
|
29093
29046
|
this.write(name2, "", Date.now() - 86400000);
|
|
29094
29047
|
}
|
|
29095
29048
|
} : {
|
|
29096
|
-
write() {
|
|
29097
|
-
},
|
|
29049
|
+
write() {},
|
|
29098
29050
|
read() {
|
|
29099
29051
|
return null;
|
|
29100
29052
|
},
|
|
29101
|
-
remove() {
|
|
29102
|
-
}
|
|
29053
|
+
remove() {}
|
|
29103
29054
|
};
|
|
29104
29055
|
var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
29105
29056
|
function mergeConfig(config1, config2) {
|
|
@@ -29593,8 +29544,7 @@ var require_axios = __commonJS((exports2, module2) => {
|
|
|
29593
29544
|
if (fn) {
|
|
29594
29545
|
try {
|
|
29595
29546
|
Object.defineProperty(fn, "name", { value: value2 });
|
|
29596
|
-
} catch (e2) {
|
|
29597
|
-
}
|
|
29547
|
+
} catch (e2) {}
|
|
29598
29548
|
Object.defineProperty(fn, "adapterName", { value: value2 });
|
|
29599
29549
|
}
|
|
29600
29550
|
});
|
|
@@ -29744,8 +29694,7 @@ var require_axios = __commonJS((exports2, module2) => {
|
|
|
29744
29694
|
err.stack += `
|
|
29745
29695
|
` + stack;
|
|
29746
29696
|
}
|
|
29747
|
-
} catch (e2) {
|
|
29748
|
-
}
|
|
29697
|
+
} catch (e2) {}
|
|
29749
29698
|
}
|
|
29750
29699
|
throw err;
|
|
29751
29700
|
}
|
|
@@ -31818,8 +31767,7 @@ var require_logger = __commonJS((exports2) => {
|
|
|
31818
31767
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
31819
31768
|
exports2.DefaultLogger = undefined;
|
|
31820
31769
|
exports2.DefaultLogger = {
|
|
31821
|
-
silly: (...params) => {
|
|
31822
|
-
},
|
|
31770
|
+
silly: (...params) => {},
|
|
31823
31771
|
debug: (...params) => {
|
|
31824
31772
|
console.log(new Date, params);
|
|
31825
31773
|
},
|
|
@@ -34562,8 +34510,7 @@ var require_constants4 = __commonJS((exports2, module2) => {
|
|
|
34562
34510
|
kListener: Symbol("kListener"),
|
|
34563
34511
|
kStatusCode: Symbol("status-code"),
|
|
34564
34512
|
kWebSocket: Symbol("websocket"),
|
|
34565
|
-
NOOP: () => {
|
|
34566
|
-
}
|
|
34513
|
+
NOOP: () => {}
|
|
34567
34514
|
};
|
|
34568
34515
|
});
|
|
34569
34516
|
|
|
@@ -34641,8 +34588,7 @@ var require_buffer_util = __commonJS((exports2, module2) => {
|
|
|
34641
34588
|
else
|
|
34642
34589
|
bufferUtil.unmask(buffer, mask);
|
|
34643
34590
|
};
|
|
34644
|
-
} catch (e2) {
|
|
34645
|
-
}
|
|
34591
|
+
} catch (e2) {}
|
|
34646
34592
|
}
|
|
34647
34593
|
});
|
|
34648
34594
|
|
|
@@ -35121,8 +35067,7 @@ var require_validation = __commonJS((exports2, module2) => {
|
|
|
35121
35067
|
module2.exports.isValidUTF8 = function(buf) {
|
|
35122
35068
|
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
35123
35069
|
};
|
|
35124
|
-
} catch (e2) {
|
|
35125
|
-
}
|
|
35070
|
+
} catch (e2) {}
|
|
35126
35071
|
}
|
|
35127
35072
|
});
|
|
35128
35073
|
|
|
@@ -37552,8 +37497,7 @@ var require_websocket_client = __commonJS((exports2) => {
|
|
|
37552
37497
|
this.options = Object.assign({ pongTimeout: 7500, pingInterval: 1e4, reconnectTimeout: 500 }, options);
|
|
37553
37498
|
this.listenKeyStateStore = {};
|
|
37554
37499
|
this.wsUrlKeyMap = {};
|
|
37555
|
-
this.on("error", () => {
|
|
37556
|
-
});
|
|
37500
|
+
this.on("error", () => {});
|
|
37557
37501
|
}
|
|
37558
37502
|
getRestClientOptions() {
|
|
37559
37503
|
return Object.assign(Object.assign(Object.assign({}, this.options), this.options.restOptions), { api_key: this.options.api_key, api_secret: this.options.api_secret });
|
|
@@ -38430,6 +38374,63 @@ var require_lib2 = __commonJS((exports2) => {
|
|
|
38430
38374
|
__exportStar(require_websocket_client(), exports2);
|
|
38431
38375
|
});
|
|
38432
38376
|
|
|
38377
|
+
// node_modules/p-try/index.js
|
|
38378
|
+
var require_p_try = __commonJS((exports2, module2) => {
|
|
38379
|
+
var pTry = (fn, ...arguments_) => new Promise((resolve) => {
|
|
38380
|
+
resolve(fn(...arguments_));
|
|
38381
|
+
});
|
|
38382
|
+
module2.exports = pTry;
|
|
38383
|
+
module2.exports.default = pTry;
|
|
38384
|
+
});
|
|
38385
|
+
|
|
38386
|
+
// node_modules/p-limit/index.js
|
|
38387
|
+
var require_p_limit = __commonJS((exports2, module2) => {
|
|
38388
|
+
var pTry = require_p_try();
|
|
38389
|
+
var pLimit = (concurrency) => {
|
|
38390
|
+
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
|
|
38391
|
+
return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
|
|
38392
|
+
}
|
|
38393
|
+
const queue2 = [];
|
|
38394
|
+
let activeCount = 0;
|
|
38395
|
+
const next = () => {
|
|
38396
|
+
activeCount--;
|
|
38397
|
+
if (queue2.length > 0) {
|
|
38398
|
+
queue2.shift()();
|
|
38399
|
+
}
|
|
38400
|
+
};
|
|
38401
|
+
const run = (fn, resolve, ...args) => {
|
|
38402
|
+
activeCount++;
|
|
38403
|
+
const result = pTry(fn, ...args);
|
|
38404
|
+
resolve(result);
|
|
38405
|
+
result.then(next, next);
|
|
38406
|
+
};
|
|
38407
|
+
const enqueue = (fn, resolve, ...args) => {
|
|
38408
|
+
if (activeCount < concurrency) {
|
|
38409
|
+
run(fn, resolve, ...args);
|
|
38410
|
+
} else {
|
|
38411
|
+
queue2.push(run.bind(null, fn, resolve, ...args));
|
|
38412
|
+
}
|
|
38413
|
+
};
|
|
38414
|
+
const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args));
|
|
38415
|
+
Object.defineProperties(generator, {
|
|
38416
|
+
activeCount: {
|
|
38417
|
+
get: () => activeCount
|
|
38418
|
+
},
|
|
38419
|
+
pendingCount: {
|
|
38420
|
+
get: () => queue2.length
|
|
38421
|
+
},
|
|
38422
|
+
clearQueue: {
|
|
38423
|
+
value: () => {
|
|
38424
|
+
queue2.length = 0;
|
|
38425
|
+
}
|
|
38426
|
+
}
|
|
38427
|
+
});
|
|
38428
|
+
return generator;
|
|
38429
|
+
};
|
|
38430
|
+
module2.exports = pLimit;
|
|
38431
|
+
module2.exports.default = pLimit;
|
|
38432
|
+
});
|
|
38433
|
+
|
|
38433
38434
|
// node_modules/bybit-api/lib/util/requestUtils.js
|
|
38434
38435
|
var require_requestUtils2 = __commonJS((exports2) => {
|
|
38435
38436
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -38970,8 +38971,7 @@ var require_logger2 = __commonJS((exports2) => {
|
|
|
38970
38971
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
38971
38972
|
exports2.DefaultLogger = undefined;
|
|
38972
38973
|
exports2.DefaultLogger = {
|
|
38973
|
-
trace: (..._params) => {
|
|
38974
|
-
},
|
|
38974
|
+
trace: (..._params) => {},
|
|
38975
38975
|
info: (...params) => {
|
|
38976
38976
|
console.info(params);
|
|
38977
38977
|
},
|
|
@@ -41017,8 +41017,7 @@ var require_BaseWSClient = __commonJS((exports2) => {
|
|
|
41017
41017
|
if (wsState === null || wsState === undefined ? undefined : wsState.activePongTimer) {
|
|
41018
41018
|
clearTimeout(wsState.activePongTimer);
|
|
41019
41019
|
wsState.activePongTimer = undefined;
|
|
41020
|
-
} else {
|
|
41021
|
-
}
|
|
41020
|
+
} else {}
|
|
41022
41021
|
}
|
|
41023
41022
|
clearReconnectTimer(wsKey) {
|
|
41024
41023
|
const wsState = this.wsStore.get(wsKey);
|
|
@@ -41896,8 +41895,7 @@ module.exports = __toCommonJS(exports_mcp_server);
|
|
|
41896
41895
|
var util;
|
|
41897
41896
|
(function(util2) {
|
|
41898
41897
|
util2.assertEqual = (val) => val;
|
|
41899
|
-
function assertIs(_arg) {
|
|
41900
|
-
}
|
|
41898
|
+
function assertIs(_arg) {}
|
|
41901
41899
|
util2.assertIs = assertIs;
|
|
41902
41900
|
function assertNever(_x) {
|
|
41903
41901
|
throw new Error;
|
|
@@ -47252,8 +47250,7 @@ function parseStringDef(def, refs) {
|
|
|
47252
47250
|
case "trim":
|
|
47253
47251
|
break;
|
|
47254
47252
|
default:
|
|
47255
|
-
((_) => {
|
|
47256
|
-
})(check);
|
|
47253
|
+
((_) => {})(check);
|
|
47257
47254
|
}
|
|
47258
47255
|
}
|
|
47259
47256
|
}
|
|
@@ -48643,8 +48640,7 @@ class StdioServerTransport {
|
|
|
48643
48640
|
var util2;
|
|
48644
48641
|
(function(util3) {
|
|
48645
48642
|
util3.assertEqual = (val) => val;
|
|
48646
|
-
function assertIs(_arg) {
|
|
48647
|
-
}
|
|
48643
|
+
function assertIs(_arg) {}
|
|
48648
48644
|
util3.assertIs = assertIs;
|
|
48649
48645
|
function assertNever(_x) {
|
|
48650
48646
|
throw new Error;
|
|
@@ -53505,8 +53501,7 @@ var API_NAME = "task-context";
|
|
|
53505
53501
|
|
|
53506
53502
|
class TaskContextAPI {
|
|
53507
53503
|
static _instance;
|
|
53508
|
-
constructor() {
|
|
53509
|
-
}
|
|
53504
|
+
constructor() {}
|
|
53510
53505
|
static getInstance() {
|
|
53511
53506
|
if (!this._instance) {
|
|
53512
53507
|
this._instance = new TaskContextAPI;
|
|
@@ -53926,8 +53921,7 @@ class ParseError extends Error {
|
|
|
53926
53921
|
super(message2), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
53927
53922
|
}
|
|
53928
53923
|
}
|
|
53929
|
-
function noop(_arg) {
|
|
53930
|
-
}
|
|
53924
|
+
function noop(_arg) {}
|
|
53931
53925
|
function createParser(callbacks) {
|
|
53932
53926
|
if (typeof callbacks == "function")
|
|
53933
53927
|
throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
|
|
@@ -54130,8 +54124,7 @@ async function _doZodFetchWithRetries(schema, url, requestInit, options, attempt
|
|
|
54130
54124
|
if (error instanceof ApiError) {
|
|
54131
54125
|
throw error;
|
|
54132
54126
|
}
|
|
54133
|
-
if (error instanceof import_zod_validation_error.ValidationError) {
|
|
54134
|
-
}
|
|
54127
|
+
if (error instanceof import_zod_validation_error.ValidationError) {}
|
|
54135
54128
|
if (options?.retry) {
|
|
54136
54129
|
const retry = { ...defaultRetryOptions2, ...options.retry };
|
|
54137
54130
|
const delay = calculateNextRetryDelay(retry, attempt);
|
|
@@ -54605,8 +54598,7 @@ class ApiClientMissingError extends Error {
|
|
|
54605
54598
|
|
|
54606
54599
|
class APIClientManagerAPI {
|
|
54607
54600
|
static _instance;
|
|
54608
|
-
constructor() {
|
|
54609
|
-
}
|
|
54601
|
+
constructor() {}
|
|
54610
54602
|
static getInstance() {
|
|
54611
54603
|
if (!this._instance) {
|
|
54612
54604
|
this._instance = new APIClientManagerAPI;
|
|
@@ -55161,8 +55153,7 @@ var PrefetchQueue = class {
|
|
|
55161
55153
|
if (__privateGet(this, _queueTailUrl) && !__privateGet(this, _prefetchQueue).has(__privateGet(this, _queueTailUrl))) {
|
|
55162
55154
|
__privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, __privateGet(this, _queueTailUrl), args[1]);
|
|
55163
55155
|
}
|
|
55164
|
-
}).catch(() => {
|
|
55165
|
-
});
|
|
55156
|
+
}).catch(() => {});
|
|
55166
55157
|
return request;
|
|
55167
55158
|
}
|
|
55168
55159
|
};
|
|
@@ -55193,10 +55184,8 @@ prefetch_fn = function(...args) {
|
|
|
55193
55184
|
}
|
|
55194
55185
|
__privateSet(this, _queueTailUrl, nextUrl);
|
|
55195
55186
|
return __privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, nextUrl, args[1]);
|
|
55196
|
-
}).catch(() => {
|
|
55197
|
-
|
|
55198
|
-
} catch (_) {
|
|
55199
|
-
}
|
|
55187
|
+
}).catch(() => {});
|
|
55188
|
+
} catch (_) {}
|
|
55200
55189
|
};
|
|
55201
55190
|
function getNextChunkUrl(url, res) {
|
|
55202
55191
|
const shapeHandle = res.headers.get(SHAPE_HANDLE_HEADER);
|
|
@@ -55299,8 +55288,7 @@ var ShapeStream = class {
|
|
|
55299
55288
|
get lastOffset() {
|
|
55300
55289
|
return __privateGet(this, _lastOffset);
|
|
55301
55290
|
}
|
|
55302
|
-
subscribe(callback, onError = () => {
|
|
55303
|
-
}) {
|
|
55291
|
+
subscribe(callback, onError = () => {}) {
|
|
55304
55292
|
const subscriptionId = Math.random();
|
|
55305
55293
|
__privateGet(this, _subscribers).set(subscriptionId, [callback, onError]);
|
|
55306
55294
|
return () => {
|
|
@@ -56494,8 +56482,7 @@ class SimpleClock {
|
|
|
56494
56482
|
const nowStruct = now.toStruct();
|
|
56495
56483
|
return [nowStruct.seconds, nowStruct.nanos];
|
|
56496
56484
|
}
|
|
56497
|
-
reset() {
|
|
56498
|
-
}
|
|
56485
|
+
reset() {}
|
|
56499
56486
|
}
|
|
56500
56487
|
|
|
56501
56488
|
// node_modules/@trigger.dev/core/dist/esm/v3/clock/index.js
|
|
@@ -56504,8 +56491,7 @@ var SIMPLE_CLOCK = new SimpleClock;
|
|
|
56504
56491
|
|
|
56505
56492
|
class ClockAPI {
|
|
56506
56493
|
static _instance;
|
|
56507
|
-
constructor() {
|
|
56508
|
-
}
|
|
56494
|
+
constructor() {}
|
|
56509
56495
|
static getInstance() {
|
|
56510
56496
|
if (!this._instance) {
|
|
56511
56497
|
this._instance = new ClockAPI;
|
|
@@ -56531,8 +56517,7 @@ var clock = ClockAPI.getInstance();
|
|
|
56531
56517
|
|
|
56532
56518
|
// node_modules/@trigger.dev/core/dist/esm/v3/usage/noopUsageManager.js
|
|
56533
56519
|
class NoopUsageManager {
|
|
56534
|
-
disable() {
|
|
56535
|
-
}
|
|
56520
|
+
disable() {}
|
|
56536
56521
|
start() {
|
|
56537
56522
|
return {
|
|
56538
56523
|
sample: () => ({ cpuTime: 0, wallTime: 0 })
|
|
@@ -56555,8 +56540,7 @@ var NOOP_USAGE_MANAGER = new NoopUsageManager;
|
|
|
56555
56540
|
|
|
56556
56541
|
class UsageAPI {
|
|
56557
56542
|
static _instance;
|
|
56558
|
-
constructor() {
|
|
56559
|
-
}
|
|
56543
|
+
constructor() {}
|
|
56560
56544
|
static getInstance() {
|
|
56561
56545
|
if (!this._instance) {
|
|
56562
56546
|
this._instance = new UsageAPI;
|
|
@@ -56616,8 +56600,7 @@ class NoopRunMetadataManager {
|
|
|
56616
56600
|
refresh(requestOptions) {
|
|
56617
56601
|
throw new Error("Method not implemented.");
|
|
56618
56602
|
}
|
|
56619
|
-
enterWithMetadata(metadata) {
|
|
56620
|
-
}
|
|
56603
|
+
enterWithMetadata(metadata) {}
|
|
56621
56604
|
current() {
|
|
56622
56605
|
throw new Error("Method not implemented.");
|
|
56623
56606
|
}
|
|
@@ -56673,8 +56656,7 @@ var NOOP_MANAGER = new NoopRunMetadataManager;
|
|
|
56673
56656
|
|
|
56674
56657
|
class RunMetadataAPI {
|
|
56675
56658
|
static _instance;
|
|
56676
|
-
constructor() {
|
|
56677
|
-
}
|
|
56659
|
+
constructor() {}
|
|
56678
56660
|
static getInstance() {
|
|
56679
56661
|
if (!this._instance) {
|
|
56680
56662
|
this._instance = new RunMetadataAPI;
|
|
@@ -56759,8 +56741,7 @@ var NOOP_TIMEOUT_MANAGER = new NoopTimeoutManager;
|
|
|
56759
56741
|
|
|
56760
56742
|
class TimeoutAPI {
|
|
56761
56743
|
static _instance;
|
|
56762
|
-
constructor() {
|
|
56763
|
-
}
|
|
56744
|
+
constructor() {}
|
|
56764
56745
|
static getInstance() {
|
|
56765
56746
|
if (!this._instance) {
|
|
56766
56747
|
this._instance = new TimeoutAPI;
|
|
@@ -57159,8 +57140,7 @@ function getTokenPayload(e2) {
|
|
|
57159
57140
|
return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
|
|
57160
57141
|
}).join(""));
|
|
57161
57142
|
return JSON.parse(t2) || {};
|
|
57162
|
-
} catch (e3) {
|
|
57163
|
-
}
|
|
57143
|
+
} catch (e3) {}
|
|
57164
57144
|
return {};
|
|
57165
57145
|
}
|
|
57166
57146
|
function isTokenExpired(e2, t2 = 0) {
|
|
@@ -57214,8 +57194,7 @@ class BaseAuthStore {
|
|
|
57214
57194
|
let n = {};
|
|
57215
57195
|
try {
|
|
57216
57196
|
n = JSON.parse(s2), (typeof n === null || typeof n != "object" || Array.isArray(n)) && (n = {});
|
|
57217
|
-
} catch (e3) {
|
|
57218
|
-
}
|
|
57197
|
+
} catch (e3) {}
|
|
57219
57198
|
this.save(n.token || "", n.record || n.model || null);
|
|
57220
57199
|
}
|
|
57221
57200
|
exportToCookie(e2, t2 = i) {
|
|
@@ -57362,8 +57341,7 @@ class RealtimeService extends BaseService {
|
|
|
57362
57341
|
let i3;
|
|
57363
57342
|
try {
|
|
57364
57343
|
i3 = JSON.parse(s3?.data);
|
|
57365
|
-
} catch {
|
|
57366
|
-
}
|
|
57344
|
+
} catch {}
|
|
57367
57345
|
t2(i3 || {});
|
|
57368
57346
|
};
|
|
57369
57347
|
return this.subscriptions[i2] || (this.subscriptions[i2] = []), this.subscriptions[i2].push(listener), this.isConnected ? this.subscriptions[i2].length === 1 ? await this.submitSubscriptions() : this.eventSource?.addEventListener(i2, listener) : await this.connect(), async () => this.unsubscribeByTopicAndListener(e2, listener);
|
|
@@ -58076,8 +58054,7 @@ class Client {
|
|
|
58076
58054
|
let s3 = {};
|
|
58077
58055
|
try {
|
|
58078
58056
|
s3 = await e3.json();
|
|
58079
|
-
} catch (e4) {
|
|
58080
|
-
}
|
|
58057
|
+
} catch (e4) {}
|
|
58081
58058
|
if (this.afterSend && (s3 = await this.afterSend(e3, s3, t2)), e3.status >= 400)
|
|
58082
58059
|
throw new ClientResponseError({ url: e3.url, status: e3.status, data: s3 });
|
|
58083
58060
|
return s3;
|
|
@@ -58263,6 +58240,26 @@ class AppDatabase {
|
|
|
58263
58240
|
});
|
|
58264
58241
|
}
|
|
58265
58242
|
}
|
|
58243
|
+
async changeUserPassword(payload) {
|
|
58244
|
+
const { password } = payload;
|
|
58245
|
+
const credentials = await this.getUserCredentials();
|
|
58246
|
+
if (credentials) {
|
|
58247
|
+
const encryptedCredentials = encryptObject(credentials, password);
|
|
58248
|
+
if (this.salt && this.email) {
|
|
58249
|
+
const user = await this.getUserByEmail();
|
|
58250
|
+
const encryptedPassword = encryptObject(password, this.salt);
|
|
58251
|
+
await this.pb.collection("users").update(user.id, {
|
|
58252
|
+
settings: {
|
|
58253
|
+
...user.settings,
|
|
58254
|
+
password: encryptedPassword,
|
|
58255
|
+
credentials: encryptedCredentials
|
|
58256
|
+
}
|
|
58257
|
+
});
|
|
58258
|
+
return true;
|
|
58259
|
+
}
|
|
58260
|
+
}
|
|
58261
|
+
return false;
|
|
58262
|
+
}
|
|
58266
58263
|
async addNewCredential(params) {
|
|
58267
58264
|
const { password, payload } = params;
|
|
58268
58265
|
let credentials = await this.getCredentials({ password });
|
|
@@ -59547,8 +59544,7 @@ class Signal {
|
|
|
59547
59544
|
support: kind === "long" ? _stop_loss : this.support
|
|
59548
59545
|
};
|
|
59549
59546
|
const instance = new Signal(derivedConfig);
|
|
59550
|
-
if (kind === "short") {
|
|
59551
|
-
}
|
|
59547
|
+
if (kind === "short") {}
|
|
59552
59548
|
let result = instance.get_bulk_trade_zones({ current_price, kind });
|
|
59553
59549
|
return result;
|
|
59554
59550
|
return result?.filter((x) => {
|
|
@@ -59766,8 +59762,7 @@ class Signal {
|
|
|
59766
59762
|
kind = "long",
|
|
59767
59763
|
raw
|
|
59768
59764
|
}) {
|
|
59769
|
-
if (raw) {
|
|
59770
|
-
}
|
|
59765
|
+
if (raw) {}
|
|
59771
59766
|
const margin_range = this.get_margin_range(current_price, kind);
|
|
59772
59767
|
let margin_zones = this.get_margin_zones({ current_price });
|
|
59773
59768
|
let remaining_zones = margin_zones.filter((x) => JSON.stringify(x) != JSON.stringify(margin_range));
|
|
@@ -59978,8 +59973,7 @@ class Signal {
|
|
|
59978
59973
|
return true;
|
|
59979
59974
|
});
|
|
59980
59975
|
let total_orders = limit_trades.concat(market_trades);
|
|
59981
|
-
if (kind === "short") {
|
|
59982
|
-
}
|
|
59976
|
+
if (kind === "short") {}
|
|
59983
59977
|
if (this.minimum_size && total_orders.length > 0) {
|
|
59984
59978
|
let payload = total_orders;
|
|
59985
59979
|
let greater_than_min_size = total_orders.filter((o) => o ? o.quantity >= this.minimum_size : true);
|
|
@@ -60065,8 +60059,7 @@ class Signal {
|
|
|
60065
60059
|
});
|
|
60066
60060
|
const multiplier = start - index;
|
|
60067
60061
|
const incurred_fees = fees.reduce((a, b) => a + b, 0) + previous_risks.reduce((a, b) => a + b, 0);
|
|
60068
|
-
if (index === 0) {
|
|
60069
|
-
}
|
|
60062
|
+
if (index === 0) {}
|
|
60070
60063
|
let quantity = determine_position_size2({
|
|
60071
60064
|
entry,
|
|
60072
60065
|
stop,
|
|
@@ -60164,8 +60157,7 @@ function buildConfig(app_config, {
|
|
|
60164
60157
|
return [];
|
|
60165
60158
|
}
|
|
60166
60159
|
const condition = (kind === "long" ? entry > app_config.support : entry >= app_config.support) && stop >= app_config.support * 0.999;
|
|
60167
|
-
if (kind === "short") {
|
|
60168
|
-
}
|
|
60160
|
+
if (kind === "short") {}
|
|
60169
60161
|
const result = entry === stop ? [] : condition ? instance.build_entry({
|
|
60170
60162
|
current_price: entry,
|
|
60171
60163
|
stop_loss: stop,
|
|
@@ -61776,6 +61768,7 @@ class BaseExchange {
|
|
|
61776
61768
|
}
|
|
61777
61769
|
|
|
61778
61770
|
// src/exchanges/binance.ts
|
|
61771
|
+
var import_p_limit = __toESM(require_p_limit());
|
|
61779
61772
|
var CONSTANTS = {
|
|
61780
61773
|
SPOT_TO_FIAT: "MAIN_C2C",
|
|
61781
61774
|
SPOT_TO_USDT_FUTURE: "MAIN_UMFUTURE",
|
|
@@ -62003,13 +61996,16 @@ async function initClient(credentials, options) {
|
|
|
62003
61996
|
console.log(e2);
|
|
62004
61997
|
}
|
|
62005
61998
|
}
|
|
62006
|
-
|
|
61999
|
+
var ORDERS_PER_MINUTE = 2000;
|
|
62000
|
+
var ORDERS_PER_SECOND = Math.floor(ORDERS_PER_MINUTE / 60);
|
|
62001
|
+
var BATCH_SIZE = 5;
|
|
62002
|
+
var CANCEL_BATCH_SIZE = 10;
|
|
62003
|
+
async function createLimitPurchaseOrdersParallel(client, symbol, priceFormat, quantityFormat, orders, currentPrice, workingType = "last", realClose = false) {
|
|
62007
62004
|
const workingTypeValue = workingType === "mark" ? "MARK_PRICE" : "CONTRACT_PRICE";
|
|
62008
62005
|
const splitOrders = (inputOrders) => {
|
|
62009
62006
|
const result = [];
|
|
62010
62007
|
for (const o of inputOrders) {
|
|
62011
|
-
if (o.take_profit) {
|
|
62012
|
-
}
|
|
62008
|
+
if (o.take_profit) {}
|
|
62013
62009
|
if (o.stop && !o.side) {
|
|
62014
62010
|
result.push({
|
|
62015
62011
|
price: o.price,
|
|
@@ -62055,30 +62051,38 @@ async function createLimitPurchaseOrders(client, symbol, priceFormat, quantityFo
|
|
|
62055
62051
|
const remaining = orders.filter((x) => x.stop !== true);
|
|
62056
62052
|
const breakOrders = splitOrders(toSplit);
|
|
62057
62053
|
const newOrders = [...breakOrders, ...remaining].map(createOrder);
|
|
62058
|
-
|
|
62059
|
-
for (let i2 = 0;i2 < newOrders.length; i2 +=
|
|
62060
|
-
|
|
62061
|
-
const _res = await client.submitMultipleOrders(batch2.map((k) => {
|
|
62062
|
-
let payload = {
|
|
62063
|
-
symbol: k.symbol,
|
|
62064
|
-
side: k.side,
|
|
62065
|
-
positionSide: k.positionSide,
|
|
62066
|
-
type: k.type,
|
|
62067
|
-
timeInForce: k.timeInForce,
|
|
62068
|
-
quantity: k.quantity?.toString(),
|
|
62069
|
-
price: k.price?.toString(),
|
|
62070
|
-
workingType: k.workingType
|
|
62071
|
-
};
|
|
62072
|
-
if (k.stopPrice) {
|
|
62073
|
-
payload.stopPrice = k.stopPrice.toString();
|
|
62074
|
-
}
|
|
62075
|
-
return payload;
|
|
62076
|
-
}));
|
|
62077
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
62078
|
-
console.log(_res);
|
|
62079
|
-
res.push(_res);
|
|
62054
|
+
const batches = [];
|
|
62055
|
+
for (let i2 = 0;i2 < newOrders.length; i2 += BATCH_SIZE) {
|
|
62056
|
+
batches.push(newOrders.slice(i2, i2 + BATCH_SIZE));
|
|
62080
62057
|
}
|
|
62081
|
-
|
|
62058
|
+
const limit = import_p_limit.default(ORDERS_PER_SECOND);
|
|
62059
|
+
const results = await Promise.all(batches.map((batch2) => limit(async () => {
|
|
62060
|
+
try {
|
|
62061
|
+
const payload = batch2.map((k) => {
|
|
62062
|
+
let orderPayload = {
|
|
62063
|
+
symbol: k.symbol,
|
|
62064
|
+
side: k.side,
|
|
62065
|
+
positionSide: k.positionSide,
|
|
62066
|
+
type: k.type,
|
|
62067
|
+
timeInForce: k.timeInForce,
|
|
62068
|
+
quantity: k.quantity?.toString(),
|
|
62069
|
+
price: k.price?.toString(),
|
|
62070
|
+
workingType: k.workingType
|
|
62071
|
+
};
|
|
62072
|
+
if (k.stopPrice) {
|
|
62073
|
+
orderPayload.stopPrice = k.stopPrice.toString();
|
|
62074
|
+
}
|
|
62075
|
+
return orderPayload;
|
|
62076
|
+
});
|
|
62077
|
+
const result = await client.submitMultipleOrders(payload);
|
|
62078
|
+
console.log("Batch result:", result);
|
|
62079
|
+
return result;
|
|
62080
|
+
} catch (error) {
|
|
62081
|
+
console.error("Error processing batch:", error);
|
|
62082
|
+
throw error;
|
|
62083
|
+
}
|
|
62084
|
+
})));
|
|
62085
|
+
return results;
|
|
62082
62086
|
}
|
|
62083
62087
|
async function getPositionInfo(client, symbol) {
|
|
62084
62088
|
const response = await client.getPositionsV3({
|
|
@@ -62104,6 +62108,11 @@ async function getPositionInfo(client, symbol) {
|
|
|
62104
62108
|
return { long, short };
|
|
62105
62109
|
}
|
|
62106
62110
|
async function cancelOrders(payload) {
|
|
62111
|
+
return await cancelOrdersParallel({
|
|
62112
|
+
symbol: payload.symbol,
|
|
62113
|
+
orders: payload.orders,
|
|
62114
|
+
custom_client: payload.custom_client
|
|
62115
|
+
});
|
|
62107
62116
|
const client = payload.custom_client;
|
|
62108
62117
|
for (let i2 = 0;i2 < payload.orders.length; i2 += 10) {
|
|
62109
62118
|
const batch2 = payload.orders.slice(i2, i2 + 10);
|
|
@@ -62142,7 +62151,7 @@ async function placeLimitOrders(client, payload) {
|
|
|
62142
62151
|
quantity: x.quantity,
|
|
62143
62152
|
kind: payload.kind
|
|
62144
62153
|
}));
|
|
62145
|
-
return await
|
|
62154
|
+
return await createLimitPurchaseOrdersParallel(client, symbol, price_places, decimal_places, orders);
|
|
62146
62155
|
}
|
|
62147
62156
|
}
|
|
62148
62157
|
async function placeTpOrder(client, payload) {
|
|
@@ -62170,7 +62179,7 @@ async function placeTpOrder(client, payload) {
|
|
|
62170
62179
|
price: payload.tp,
|
|
62171
62180
|
quantity: _quantity
|
|
62172
62181
|
};
|
|
62173
|
-
const rr = await
|
|
62182
|
+
const rr = await createLimitPurchaseOrdersParallel(client, symbol, price_places, decimal_places, [order]);
|
|
62174
62183
|
if (payload.kind == "long") {
|
|
62175
62184
|
console.log("rr", { rr, price_places, decimal_places });
|
|
62176
62185
|
}
|
|
@@ -62216,7 +62225,7 @@ async function placeStopOrder(client, payload) {
|
|
|
62216
62225
|
stop: payload.final_stop,
|
|
62217
62226
|
is_market: !payload.is_limit
|
|
62218
62227
|
};
|
|
62219
|
-
return
|
|
62228
|
+
return createLimitPurchaseOrdersParallel(client, symbol, price_places, decimal_places, [order]);
|
|
62220
62229
|
}
|
|
62221
62230
|
async function getOpenOrders(client, symbol, type) {
|
|
62222
62231
|
const response = await client.getAllOpenOrders({
|
|
@@ -62576,7 +62585,7 @@ class BinanceExchange extends BaseExchange {
|
|
|
62576
62585
|
return await cancelAllOrders(this.client, symbol, payload);
|
|
62577
62586
|
}
|
|
62578
62587
|
async _createLimitPurchaseOrders(payload) {
|
|
62579
|
-
return await
|
|
62588
|
+
return await createLimitPurchaseOrdersParallel(this.client, payload.symbol, payload.price_places, payload.decimal_places, payload.orders);
|
|
62580
62589
|
}
|
|
62581
62590
|
async analyzeCharts(payload) {
|
|
62582
62591
|
return await analyzeCharts({
|
|
@@ -62800,7 +62809,7 @@ async function forceClosePosition(client, symbol, options) {
|
|
|
62800
62809
|
force_market: true
|
|
62801
62810
|
};
|
|
62802
62811
|
console.log(`Closing ${position2.kind} position for ${symbol}: ${position2.size} units`);
|
|
62803
|
-
const orderResult = await
|
|
62812
|
+
const orderResult = await createLimitPurchaseOrdersParallel(client, symbol, price_places, decimal_places, [order]);
|
|
62804
62813
|
result.closedPositions.push({
|
|
62805
62814
|
kind: position2.kind,
|
|
62806
62815
|
quantity: position2.size,
|
|
@@ -62837,6 +62846,28 @@ async function forceClosePosition(client, symbol, options) {
|
|
|
62837
62846
|
}
|
|
62838
62847
|
return result;
|
|
62839
62848
|
}
|
|
62849
|
+
async function cancelOrdersParallel(payload) {
|
|
62850
|
+
const client = payload.custom_client;
|
|
62851
|
+
const batches = [];
|
|
62852
|
+
for (let i2 = 0;i2 < payload.orders.length; i2 += CANCEL_BATCH_SIZE) {
|
|
62853
|
+
batches.push(payload.orders.slice(i2, i2 + CANCEL_BATCH_SIZE));
|
|
62854
|
+
}
|
|
62855
|
+
const limit = import_p_limit.default(ORDERS_PER_SECOND);
|
|
62856
|
+
const results = await Promise.all(batches.map((batch2) => limit(async () => {
|
|
62857
|
+
try {
|
|
62858
|
+
const result = await Promise.all(batch2.map((x) => client.cancelOrder({
|
|
62859
|
+
symbol: payload.symbol,
|
|
62860
|
+
orderId: x.orderId
|
|
62861
|
+
})));
|
|
62862
|
+
console.log("Cancel batch result:", result);
|
|
62863
|
+
return result;
|
|
62864
|
+
} catch (error) {
|
|
62865
|
+
console.error("Error processing cancel batch:", error);
|
|
62866
|
+
throw error;
|
|
62867
|
+
}
|
|
62868
|
+
})));
|
|
62869
|
+
return results;
|
|
62870
|
+
}
|
|
62840
62871
|
|
|
62841
62872
|
// src/exchanges/bybit.ts
|
|
62842
62873
|
var import_bybit_api = __toESM(require_lib3());
|
|
@@ -62862,13 +62893,12 @@ function titleCase(str) {
|
|
|
62862
62893
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
62863
62894
|
}).join(" ");
|
|
62864
62895
|
}
|
|
62865
|
-
async function
|
|
62896
|
+
async function createLimitPurchaseOrders(client, symbol, priceFormat, quantityFormat, orders, currentPrice, workingType = "last", realClose = false) {
|
|
62866
62897
|
const workingTypeValue = workingType === "mark" ? "MarkPrice" : "LastPrice";
|
|
62867
62898
|
const splitOrders = (inputOrders) => {
|
|
62868
62899
|
const result = [];
|
|
62869
62900
|
for (const o of inputOrders) {
|
|
62870
|
-
if (o.take_profit) {
|
|
62871
|
-
}
|
|
62901
|
+
if (o.take_profit) {}
|
|
62872
62902
|
if (o.stop && !o.side) {
|
|
62873
62903
|
result.push({
|
|
62874
62904
|
price: o.price,
|
|
@@ -62984,7 +63014,7 @@ async function placeLimitOrders2(client, payload) {
|
|
|
62984
63014
|
quantity: x.quantity,
|
|
62985
63015
|
kind: payload.kind
|
|
62986
63016
|
}));
|
|
62987
|
-
return await
|
|
63017
|
+
return await createLimitPurchaseOrders(client, symbol, price_places, decimal_places, orders);
|
|
62988
63018
|
}
|
|
62989
63019
|
}
|
|
62990
63020
|
async function placeTpOrder2(client, payload) {
|
|
@@ -63013,7 +63043,7 @@ async function placeTpOrder2(client, payload) {
|
|
|
63013
63043
|
price: payload.tp,
|
|
63014
63044
|
quantity: _quantity
|
|
63015
63045
|
};
|
|
63016
|
-
return
|
|
63046
|
+
return createLimitPurchaseOrders(client, symbol, price_places, decimal_places, [order]);
|
|
63017
63047
|
}
|
|
63018
63048
|
return { error: "No quantity" };
|
|
63019
63049
|
}
|
|
@@ -63034,7 +63064,7 @@ async function placeStopOrder2(client, payload) {
|
|
|
63034
63064
|
stop: payload.final_stop,
|
|
63035
63065
|
is_market: !payload.is_limit
|
|
63036
63066
|
};
|
|
63037
|
-
return
|
|
63067
|
+
return createLimitPurchaseOrders(client, symbol, price_places, decimal_places, [order]);
|
|
63038
63068
|
}
|
|
63039
63069
|
async function getOpenOrders2(client, symbol, type) {
|
|
63040
63070
|
const response = await client.getActiveOrders({
|
|
@@ -63363,7 +63393,7 @@ class BybitExchange extends BaseExchange {
|
|
|
63363
63393
|
return await cancelAllOrders2(this.client, symbol, payload);
|
|
63364
63394
|
}
|
|
63365
63395
|
async _createLimitPurchaseOrders(payload) {
|
|
63366
|
-
return await
|
|
63396
|
+
return await createLimitPurchaseOrders(this.client, payload.symbol, payload.price_places, payload.decimal_places, payload.orders);
|
|
63367
63397
|
}
|
|
63368
63398
|
async getCurrentPrice(symbol) {
|
|
63369
63399
|
return await getCurrentPrice2(this.client, symbol);
|
|
@@ -63410,10 +63440,8 @@ class BybitExchange extends BaseExchange {
|
|
|
63410
63440
|
sellLeverage: payload.leverage.toString()
|
|
63411
63441
|
});
|
|
63412
63442
|
}
|
|
63413
|
-
async generateConfig(payload) {
|
|
63414
|
-
}
|
|
63415
|
-
async checkDelistedMovers(payload) {
|
|
63416
|
-
}
|
|
63443
|
+
async generateConfig(payload) {}
|
|
63444
|
+
async checkDelistedMovers(payload) {}
|
|
63417
63445
|
async getAllOpenOrders() {
|
|
63418
63446
|
const result = await getAllOpenOrders2({ client: this.client });
|
|
63419
63447
|
return result;
|
|
@@ -63424,13 +63452,11 @@ class BybitExchange extends BaseExchange {
|
|
|
63424
63452
|
async getDelistedSpotSymbols() {
|
|
63425
63453
|
return [];
|
|
63426
63454
|
}
|
|
63427
|
-
async crossAccountTransfer(payload) {
|
|
63428
|
-
}
|
|
63455
|
+
async crossAccountTransfer(payload) {}
|
|
63429
63456
|
getOpenOrders(payload) {
|
|
63430
63457
|
return getOpenOrders2(this.client, payload.symbol);
|
|
63431
63458
|
}
|
|
63432
|
-
async placeBadStopEntry(payload) {
|
|
63433
|
-
}
|
|
63459
|
+
async placeBadStopEntry(payload) {}
|
|
63434
63460
|
}
|
|
63435
63461
|
|
|
63436
63462
|
// src/helpers/accounts.ts
|
|
@@ -64384,8 +64410,7 @@ class ExchangeAccount {
|
|
|
64384
64410
|
cancelExchangeOrders: this.cancelExchangeOrders.bind(this)
|
|
64385
64411
|
});
|
|
64386
64412
|
}
|
|
64387
|
-
if (all) {
|
|
64388
|
-
} else {
|
|
64413
|
+
if (all) {} else {
|
|
64389
64414
|
if (!price) {
|
|
64390
64415
|
const position2 = await this.syncAccount({
|
|
64391
64416
|
symbol,
|
|
@@ -67085,8 +67110,7 @@ async function fetchExchangeDetails(payload) {
|
|
|
67085
67110
|
}
|
|
67086
67111
|
|
|
67087
67112
|
// src/mcp-server.ts
|
|
67088
|
-
console.log = (...args) => {
|
|
67089
|
-
};
|
|
67113
|
+
console.log = (...args) => {};
|
|
67090
67114
|
var server = new McpServer({
|
|
67091
67115
|
name: "ultimate-trader",
|
|
67092
67116
|
version: "0.0.1",
|