@gbozee/ultimate 0.0.2-167 → 0.0.2-169
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.d.ts +23 -0
- package/dist/frontend-index.js +33 -14
- package/dist/index.cjs +212 -211
- package/dist/index.d.ts +66 -1
- package/dist/index.js +216 -219
- package/dist/mcp-client.cjs +25 -50
- package/dist/mcp-client.js +25 -50
- package/dist/mcp-server.cjs +214 -217
- package/dist/mcp-server.js +218 -225
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -229,8 +229,7 @@ var init_errors = __esm(() => {
|
|
|
229
229
|
|
|
230
230
|
// node_modules/jose/dist/node/esm/runtime/random.js
|
|
231
231
|
import { randomFillSync } from "node:crypto";
|
|
232
|
-
var init_random = () => {
|
|
233
|
-
};
|
|
232
|
+
var init_random = () => {};
|
|
234
233
|
|
|
235
234
|
// node_modules/jose/dist/node/esm/lib/iv.js
|
|
236
235
|
function bitLength(alg) {
|
|
@@ -271,8 +270,7 @@ var init_check_iv_length = __esm(() => {
|
|
|
271
270
|
// node_modules/jose/dist/node/esm/runtime/is_key_object.js
|
|
272
271
|
import * as util3 from "node:util";
|
|
273
272
|
var is_key_object_default = (obj) => util3.types.isKeyObject(obj);
|
|
274
|
-
var init_is_key_object = () => {
|
|
275
|
-
};
|
|
273
|
+
var init_is_key_object = () => {};
|
|
276
274
|
|
|
277
275
|
// node_modules/jose/dist/node/esm/runtime/check_cek_length.js
|
|
278
276
|
var checkCekLength = (enc, cek) => {
|
|
@@ -534,8 +532,7 @@ var ciphers, ciphers_default = (algorithm) => {
|
|
|
534
532
|
ciphers ||= new Set(getCiphers());
|
|
535
533
|
return ciphers.has(algorithm);
|
|
536
534
|
};
|
|
537
|
-
var init_ciphers = () => {
|
|
538
|
-
};
|
|
535
|
+
var init_ciphers = () => {};
|
|
539
536
|
|
|
540
537
|
// node_modules/jose/dist/node/esm/runtime/is_key_like.js
|
|
541
538
|
var is_key_like_default = (key) => is_key_object_default(key) || isCryptoKey(key), types3;
|
|
@@ -566,8 +563,7 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
|
566
563
|
let macCheckPassed;
|
|
567
564
|
try {
|
|
568
565
|
macCheckPassed = timing_safe_equal_default(tag, expectedTag);
|
|
569
|
-
} catch {
|
|
570
|
-
}
|
|
566
|
+
} catch {}
|
|
571
567
|
if (!macCheckPassed) {
|
|
572
568
|
throw new JWEDecryptionFailed;
|
|
573
569
|
}
|
|
@@ -575,8 +571,7 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
|
|
|
575
571
|
try {
|
|
576
572
|
const decipher = createDecipheriv(algorithm, encKey, iv);
|
|
577
573
|
plaintext = concat(decipher.update(ciphertext), decipher.final());
|
|
578
|
-
} catch {
|
|
579
|
-
}
|
|
574
|
+
} catch {}
|
|
580
575
|
if (!plaintext) {
|
|
581
576
|
throw new JWEDecryptionFailed;
|
|
582
577
|
}
|
|
@@ -754,8 +749,7 @@ function isPublicJWK(key) {
|
|
|
754
749
|
function isSecretJWK(key) {
|
|
755
750
|
return isJWK(key) && key.kty === "oct" && typeof key.k === "string";
|
|
756
751
|
}
|
|
757
|
-
var init_is_jwk = () => {
|
|
758
|
-
};
|
|
752
|
+
var init_is_jwk = () => {};
|
|
759
753
|
|
|
760
754
|
// node_modules/jose/dist/node/esm/runtime/get_named_curve.js
|
|
761
755
|
import { KeyObject as KeyObject3 } from "node:crypto";
|
|
@@ -938,14 +932,12 @@ var check_key_length_default = (key, alg) => {
|
|
|
938
932
|
} else {
|
|
939
933
|
modulusLength = Buffer.from(key.n, "base64url").byteLength << 3;
|
|
940
934
|
}
|
|
941
|
-
} catch {
|
|
942
|
-
}
|
|
935
|
+
} catch {}
|
|
943
936
|
if (typeof modulusLength !== "number" || modulusLength < 2048) {
|
|
944
937
|
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
|
945
938
|
}
|
|
946
939
|
};
|
|
947
|
-
var init_check_key_length = () => {
|
|
948
|
-
};
|
|
940
|
+
var init_check_key_length = () => {};
|
|
949
941
|
|
|
950
942
|
// node_modules/jose/dist/node/esm/runtime/rsaes.js
|
|
951
943
|
import { KeyObject as KeyObject7, publicEncrypt, constants, privateDecrypt } from "node:crypto";
|
|
@@ -1699,8 +1691,7 @@ async function generalDecrypt(jwe, key, options) {
|
|
|
1699
1691
|
tag: jwe.tag,
|
|
1700
1692
|
unprotected: jwe.unprotected
|
|
1701
1693
|
}, key, options);
|
|
1702
|
-
} catch {
|
|
1703
|
-
}
|
|
1694
|
+
} catch {}
|
|
1704
1695
|
}
|
|
1705
1696
|
throw new JWEDecryptionFailed;
|
|
1706
1697
|
}
|
|
@@ -2585,8 +2576,7 @@ async function generalVerify(jws, key, options) {
|
|
|
2585
2576
|
protected: signature.protected,
|
|
2586
2577
|
signature: signature.signature
|
|
2587
2578
|
}, key, options);
|
|
2588
|
-
} catch {
|
|
2589
|
-
}
|
|
2579
|
+
} catch {}
|
|
2590
2580
|
}
|
|
2591
2581
|
throw new JWSSignatureVerificationFailed;
|
|
2592
2582
|
}
|
|
@@ -2669,8 +2659,7 @@ var normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ""),
|
|
|
2669
2659
|
let payload;
|
|
2670
2660
|
try {
|
|
2671
2661
|
payload = JSON.parse(decoder.decode(encodedPayload));
|
|
2672
|
-
} catch {
|
|
2673
|
-
}
|
|
2662
|
+
} catch {}
|
|
2674
2663
|
if (!isObject(payload)) {
|
|
2675
2664
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
2676
2665
|
}
|
|
@@ -3355,8 +3344,7 @@ class LocalJWKSet {
|
|
|
3355
3344
|
for (const jwk2 of candidates) {
|
|
3356
3345
|
try {
|
|
3357
3346
|
yield await importWithAlgCache(_cached, jwk2, alg);
|
|
3358
|
-
} catch {
|
|
3359
|
-
}
|
|
3347
|
+
} catch {}
|
|
3360
3348
|
}
|
|
3361
3349
|
};
|
|
3362
3350
|
throw error;
|
|
@@ -3903,8 +3891,7 @@ var require_util = __commonJS((exports) => {
|
|
|
3903
3891
|
var util5;
|
|
3904
3892
|
(function(util6) {
|
|
3905
3893
|
util6.assertEqual = (val) => val;
|
|
3906
|
-
function assertIs(_arg) {
|
|
3907
|
-
}
|
|
3894
|
+
function assertIs(_arg) {}
|
|
3908
3895
|
util6.assertIs = assertIs;
|
|
3909
3896
|
function assertNever(_x) {
|
|
3910
3897
|
throw new Error;
|
|
@@ -6320,8 +6307,7 @@ var require_types = __commonJS((exports) => {
|
|
|
6320
6307
|
});
|
|
6321
6308
|
status.dirty();
|
|
6322
6309
|
}
|
|
6323
|
-
} else if (unknownKeys === "strip") {
|
|
6324
|
-
} else {
|
|
6310
|
+
} else if (unknownKeys === "strip") {} else {
|
|
6325
6311
|
throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
|
|
6326
6312
|
}
|
|
6327
6313
|
} else {
|
|
@@ -8473,8 +8459,7 @@ var require_logLevelLogger = __commonJS((exports) => {
|
|
|
8473
8459
|
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
8474
8460
|
return theFunc.bind(logger);
|
|
8475
8461
|
}
|
|
8476
|
-
return function() {
|
|
8477
|
-
};
|
|
8462
|
+
return function() {};
|
|
8478
8463
|
}
|
|
8479
8464
|
return {
|
|
8480
8465
|
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
@@ -8699,8 +8684,7 @@ var require_NoopMeter = __commonJS((exports) => {
|
|
|
8699
8684
|
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
8700
8685
|
|
|
8701
8686
|
class NoopMeter {
|
|
8702
|
-
constructor() {
|
|
8703
|
-
}
|
|
8687
|
+
constructor() {}
|
|
8704
8688
|
createGauge(_name, _options) {
|
|
8705
8689
|
return exports.NOOP_GAUGE_METRIC;
|
|
8706
8690
|
}
|
|
@@ -8722,10 +8706,8 @@ var require_NoopMeter = __commonJS((exports) => {
|
|
|
8722
8706
|
createObservableUpDownCounter(_name, _options) {
|
|
8723
8707
|
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
8724
8708
|
}
|
|
8725
|
-
addBatchObservableCallback(_callback, _observables) {
|
|
8726
|
-
}
|
|
8727
|
-
removeBatchObservableCallback(_callback) {
|
|
8728
|
-
}
|
|
8709
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
8710
|
+
removeBatchObservableCallback(_callback) {}
|
|
8729
8711
|
}
|
|
8730
8712
|
exports.NoopMeter = NoopMeter;
|
|
8731
8713
|
|
|
@@ -8734,34 +8716,28 @@ var require_NoopMeter = __commonJS((exports) => {
|
|
|
8734
8716
|
exports.NoopMetric = NoopMetric;
|
|
8735
8717
|
|
|
8736
8718
|
class NoopCounterMetric extends NoopMetric {
|
|
8737
|
-
add(_value, _attributes) {
|
|
8738
|
-
}
|
|
8719
|
+
add(_value, _attributes) {}
|
|
8739
8720
|
}
|
|
8740
8721
|
exports.NoopCounterMetric = NoopCounterMetric;
|
|
8741
8722
|
|
|
8742
8723
|
class NoopUpDownCounterMetric extends NoopMetric {
|
|
8743
|
-
add(_value, _attributes) {
|
|
8744
|
-
}
|
|
8724
|
+
add(_value, _attributes) {}
|
|
8745
8725
|
}
|
|
8746
8726
|
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
8747
8727
|
|
|
8748
8728
|
class NoopGaugeMetric extends NoopMetric {
|
|
8749
|
-
record(_value, _attributes) {
|
|
8750
|
-
}
|
|
8729
|
+
record(_value, _attributes) {}
|
|
8751
8730
|
}
|
|
8752
8731
|
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
8753
8732
|
|
|
8754
8733
|
class NoopHistogramMetric extends NoopMetric {
|
|
8755
|
-
record(_value, _attributes) {
|
|
8756
|
-
}
|
|
8734
|
+
record(_value, _attributes) {}
|
|
8757
8735
|
}
|
|
8758
8736
|
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
8759
8737
|
|
|
8760
8738
|
class NoopObservableMetric {
|
|
8761
|
-
addCallback(_callback) {
|
|
8762
|
-
}
|
|
8763
|
-
removeCallback(_callback) {
|
|
8764
|
-
}
|
|
8739
|
+
addCallback(_callback) {}
|
|
8740
|
+
removeCallback(_callback) {}
|
|
8765
8741
|
}
|
|
8766
8742
|
exports.NoopObservableMetric = NoopObservableMetric;
|
|
8767
8743
|
|
|
@@ -8866,8 +8842,7 @@ var require_context2 = __commonJS((exports) => {
|
|
|
8866
8842
|
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
8867
8843
|
|
|
8868
8844
|
class ContextAPI {
|
|
8869
|
-
constructor() {
|
|
8870
|
-
}
|
|
8845
|
+
constructor() {}
|
|
8871
8846
|
static getInstance() {
|
|
8872
8847
|
if (!this._instance) {
|
|
8873
8848
|
this._instance = new ContextAPI;
|
|
@@ -8956,13 +8931,11 @@ var require_NonRecordingSpan = __commonJS((exports) => {
|
|
|
8956
8931
|
updateName(_name) {
|
|
8957
8932
|
return this;
|
|
8958
8933
|
}
|
|
8959
|
-
end(_endTime) {
|
|
8960
|
-
}
|
|
8934
|
+
end(_endTime) {}
|
|
8961
8935
|
isRecording() {
|
|
8962
8936
|
return false;
|
|
8963
8937
|
}
|
|
8964
|
-
recordException(_exception, _time) {
|
|
8965
|
-
}
|
|
8938
|
+
recordException(_exception, _time) {}
|
|
8966
8939
|
}
|
|
8967
8940
|
exports.NonRecordingSpan = NonRecordingSpan;
|
|
8968
8941
|
});
|
|
@@ -9264,8 +9237,7 @@ var require_tracestate_impl = __commonJS((exports) => {
|
|
|
9264
9237
|
const value = listMember.slice(i + 1, part.length);
|
|
9265
9238
|
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
9266
9239
|
agg.set(key, value);
|
|
9267
|
-
} else {
|
|
9268
|
-
}
|
|
9240
|
+
} else {}
|
|
9269
9241
|
}
|
|
9270
9242
|
return agg;
|
|
9271
9243
|
}, new Map);
|
|
@@ -9337,8 +9309,7 @@ var require_metrics = __commonJS((exports) => {
|
|
|
9337
9309
|
var API_NAME2 = "metrics";
|
|
9338
9310
|
|
|
9339
9311
|
class MetricsAPI {
|
|
9340
|
-
constructor() {
|
|
9341
|
-
}
|
|
9312
|
+
constructor() {}
|
|
9342
9313
|
static getInstance() {
|
|
9343
9314
|
if (!this._instance) {
|
|
9344
9315
|
this._instance = new MetricsAPI;
|
|
@@ -9375,8 +9346,7 @@ var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
|
9375
9346
|
exports.NoopTextMapPropagator = undefined;
|
|
9376
9347
|
|
|
9377
9348
|
class NoopTextMapPropagator {
|
|
9378
|
-
inject(_context, _carrier) {
|
|
9379
|
-
}
|
|
9349
|
+
inject(_context, _carrier) {}
|
|
9380
9350
|
extract(context, _carrier) {
|
|
9381
9351
|
return context;
|
|
9382
9352
|
}
|
|
@@ -9689,8 +9659,7 @@ class Registry {
|
|
|
9689
9659
|
return this.kv.getByKey(identifier);
|
|
9690
9660
|
}
|
|
9691
9661
|
}
|
|
9692
|
-
var init_registry = () => {
|
|
9693
|
-
};
|
|
9662
|
+
var init_registry = () => {};
|
|
9694
9663
|
|
|
9695
9664
|
// node_modules/superjson/dist/class-registry.js
|
|
9696
9665
|
var ClassRegistry;
|
|
@@ -9775,8 +9744,7 @@ class CustomTransformerRegistry {
|
|
|
9775
9744
|
return this.transfomers[name2];
|
|
9776
9745
|
}
|
|
9777
9746
|
}
|
|
9778
|
-
var init_custom_transformer_registry = () => {
|
|
9779
|
-
};
|
|
9747
|
+
var init_custom_transformer_registry = () => {};
|
|
9780
9748
|
|
|
9781
9749
|
// node_modules/superjson/dist/is.js
|
|
9782
9750
|
var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1), isUndefined = (payload) => typeof payload === "undefined", isNull = (payload) => payload === null, isPlainObject = (payload) => {
|
|
@@ -10121,8 +10089,7 @@ var getNthKey = (value, n) => {
|
|
|
10121
10089
|
}
|
|
10122
10090
|
return object2;
|
|
10123
10091
|
};
|
|
10124
|
-
var init_accessDeep = () => {
|
|
10125
|
-
};
|
|
10092
|
+
var init_accessDeep = () => {};
|
|
10126
10093
|
|
|
10127
10094
|
// node_modules/superjson/dist/plainer.js
|
|
10128
10095
|
function traverse(tree, walker, origin = []) {
|
|
@@ -10711,8 +10678,7 @@ var require_NoopLogger = __commonJS((exports) => {
|
|
|
10711
10678
|
exports.NOOP_LOGGER = exports.NoopLogger = undefined;
|
|
10712
10679
|
|
|
10713
10680
|
class NoopLogger {
|
|
10714
|
-
emit(_logRecord) {
|
|
10715
|
-
}
|
|
10681
|
+
emit(_logRecord) {}
|
|
10716
10682
|
}
|
|
10717
10683
|
exports.NoopLogger = NoopLogger;
|
|
10718
10684
|
exports.NOOP_LOGGER = new NoopLogger;
|
|
@@ -10806,8 +10772,7 @@ var require_logs = __commonJS((exports) => {
|
|
|
10806
10772
|
var NoopLoggerProvider_1 = require_NoopLoggerProvider();
|
|
10807
10773
|
|
|
10808
10774
|
class LogsAPI {
|
|
10809
|
-
constructor() {
|
|
10810
|
-
}
|
|
10775
|
+
constructor() {}
|
|
10811
10776
|
static getInstance() {
|
|
10812
10777
|
if (!this._instance) {
|
|
10813
10778
|
this._instance = new LogsAPI;
|
|
@@ -11275,8 +11240,7 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
11275
11240
|
});
|
|
11276
11241
|
args.splice(lastC, 0, c);
|
|
11277
11242
|
}
|
|
11278
|
-
exports.log = console.debug || console.log || (() => {
|
|
11279
|
-
});
|
|
11243
|
+
exports.log = console.debug || console.log || (() => {});
|
|
11280
11244
|
function save(namespaces) {
|
|
11281
11245
|
try {
|
|
11282
11246
|
if (namespaces) {
|
|
@@ -11284,15 +11248,13 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
11284
11248
|
} else {
|
|
11285
11249
|
exports.storage.removeItem("debug");
|
|
11286
11250
|
}
|
|
11287
|
-
} catch (error) {
|
|
11288
|
-
}
|
|
11251
|
+
} catch (error) {}
|
|
11289
11252
|
}
|
|
11290
11253
|
function load() {
|
|
11291
11254
|
let r;
|
|
11292
11255
|
try {
|
|
11293
11256
|
r = exports.storage.getItem("debug");
|
|
11294
|
-
} catch (error) {
|
|
11295
|
-
}
|
|
11257
|
+
} catch (error) {}
|
|
11296
11258
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
11297
11259
|
r = process.env.DEBUG;
|
|
11298
11260
|
}
|
|
@@ -11301,8 +11263,7 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
11301
11263
|
function localstorage() {
|
|
11302
11264
|
try {
|
|
11303
11265
|
return localStorage;
|
|
11304
|
-
} catch (error) {
|
|
11305
|
-
}
|
|
11266
|
+
} catch (error) {}
|
|
11306
11267
|
}
|
|
11307
11268
|
module.exports = require_common()(exports);
|
|
11308
11269
|
var { formatters } = module.exports;
|
|
@@ -11434,8 +11395,7 @@ var require_node3 = __commonJS((exports, module) => {
|
|
|
11434
11395
|
exports.save = save;
|
|
11435
11396
|
exports.load = load;
|
|
11436
11397
|
exports.useColors = useColors;
|
|
11437
|
-
exports.destroy = util5.deprecate(() => {
|
|
11438
|
-
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
11398
|
+
exports.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`.");
|
|
11439
11399
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
11440
11400
|
try {
|
|
11441
11401
|
const supportsColor = require_supports_color();
|
|
@@ -11519,8 +11479,7 @@ var require_node3 = __commonJS((exports, module) => {
|
|
|
11519
11479
|
221
|
|
11520
11480
|
];
|
|
11521
11481
|
}
|
|
11522
|
-
} catch (error) {
|
|
11523
|
-
}
|
|
11482
|
+
} catch (error) {}
|
|
11524
11483
|
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
11525
11484
|
return /^debug_/i.test(key);
|
|
11526
11485
|
}).reduce((obj, key) => {
|
|
@@ -13769,8 +13728,7 @@ var require_jsbn = __commonJS((exports, module) => {
|
|
|
13769
13728
|
++this[w];
|
|
13770
13729
|
}
|
|
13771
13730
|
}
|
|
13772
|
-
function NullExp() {
|
|
13773
|
-
}
|
|
13731
|
+
function NullExp() {}
|
|
13774
13732
|
function nNop(x) {
|
|
13775
13733
|
return x;
|
|
13776
13734
|
}
|
|
@@ -14195,8 +14153,7 @@ var require_jsbn = __commonJS((exports, module) => {
|
|
|
14195
14153
|
for (i2 = 0;i2 < ba.length; ++i2)
|
|
14196
14154
|
ba[i2] = rng_get_byte();
|
|
14197
14155
|
}
|
|
14198
|
-
function SecureRandom() {
|
|
14199
|
-
}
|
|
14156
|
+
function SecureRandom() {}
|
|
14200
14157
|
SecureRandom.prototype.nextBytes = rng_get_bytes;
|
|
14201
14158
|
function Arcfour() {
|
|
14202
14159
|
this.i = 0;
|
|
@@ -16419,8 +16376,7 @@ var require_delayed_stream = __commonJS((exports, module) => {
|
|
|
16419
16376
|
delayedStream._handleEmit(arguments);
|
|
16420
16377
|
return realEmit.apply(source, arguments);
|
|
16421
16378
|
};
|
|
16422
|
-
source.on("error", function() {
|
|
16423
|
-
});
|
|
16379
|
+
source.on("error", function() {});
|
|
16424
16380
|
if (delayedStream.pauseStream) {
|
|
16425
16381
|
source.pause();
|
|
16426
16382
|
}
|
|
@@ -25724,8 +25680,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
25724
25680
|
}
|
|
25725
25681
|
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
25726
25682
|
if (target.prototype) {
|
|
25727
|
-
var Empty = function Empty() {
|
|
25728
|
-
};
|
|
25683
|
+
var Empty = function Empty() {};
|
|
25729
25684
|
Empty.prototype = target.prototype;
|
|
25730
25685
|
bound.prototype = new Empty;
|
|
25731
25686
|
Empty.prototype = null;
|
|
@@ -25845,8 +25800,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
25845
25800
|
var getEvalledConstructor = function(expressionSyntax) {
|
|
25846
25801
|
try {
|
|
25847
25802
|
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
25848
|
-
} catch (e2) {
|
|
25849
|
-
}
|
|
25803
|
+
} catch (e2) {}
|
|
25850
25804
|
};
|
|
25851
25805
|
var $gOPD = require_gopd();
|
|
25852
25806
|
var $defineProperty = require_es_define_property();
|
|
@@ -26585,11 +26539,9 @@ var require_debug = __commonJS((exports, module) => {
|
|
|
26585
26539
|
if (!debug) {
|
|
26586
26540
|
try {
|
|
26587
26541
|
debug = require_src4()("follow-redirects");
|
|
26588
|
-
} catch (error) {
|
|
26589
|
-
}
|
|
26542
|
+
} catch (error) {}
|
|
26590
26543
|
if (typeof debug !== "function") {
|
|
26591
|
-
debug = function() {
|
|
26592
|
-
};
|
|
26544
|
+
debug = function() {};
|
|
26593
26545
|
}
|
|
26594
26546
|
}
|
|
26595
26547
|
debug.apply(null, arguments);
|
|
@@ -26964,8 +26916,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
26964
26916
|
});
|
|
26965
26917
|
return exports2;
|
|
26966
26918
|
}
|
|
26967
|
-
function noop2() {
|
|
26968
|
-
}
|
|
26919
|
+
function noop2() {}
|
|
26969
26920
|
function parseUrl(input) {
|
|
26970
26921
|
var parsed;
|
|
26971
26922
|
if (useNativeURL) {
|
|
@@ -27348,8 +27299,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
27348
27299
|
isArray3(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
|
|
27349
27300
|
return obj;
|
|
27350
27301
|
};
|
|
27351
|
-
var noop2 = () => {
|
|
27352
|
-
};
|
|
27302
|
+
var noop2 = () => {};
|
|
27353
27303
|
var toFiniteNumber = (value, defaultValue) => {
|
|
27354
27304
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
27355
27305
|
};
|
|
@@ -28802,8 +28752,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
28802
28752
|
try {
|
|
28803
28753
|
const knownLength = await util__default["default"].promisify(data.getLength).call(data);
|
|
28804
28754
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
28805
|
-
} catch (e2) {
|
|
28806
|
-
}
|
|
28755
|
+
} catch (e2) {}
|
|
28807
28756
|
}
|
|
28808
28757
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
28809
28758
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
@@ -29077,13 +29026,11 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
29077
29026
|
this.write(name2, "", Date.now() - 86400000);
|
|
29078
29027
|
}
|
|
29079
29028
|
} : {
|
|
29080
|
-
write() {
|
|
29081
|
-
},
|
|
29029
|
+
write() {},
|
|
29082
29030
|
read() {
|
|
29083
29031
|
return null;
|
|
29084
29032
|
},
|
|
29085
|
-
remove() {
|
|
29086
|
-
}
|
|
29033
|
+
remove() {}
|
|
29087
29034
|
};
|
|
29088
29035
|
var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
29089
29036
|
function mergeConfig(config1, config2) {
|
|
@@ -29577,8 +29524,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
29577
29524
|
if (fn) {
|
|
29578
29525
|
try {
|
|
29579
29526
|
Object.defineProperty(fn, "name", { value });
|
|
29580
|
-
} catch (e2) {
|
|
29581
|
-
}
|
|
29527
|
+
} catch (e2) {}
|
|
29582
29528
|
Object.defineProperty(fn, "adapterName", { value });
|
|
29583
29529
|
}
|
|
29584
29530
|
});
|
|
@@ -29728,8 +29674,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
29728
29674
|
err.stack += `
|
|
29729
29675
|
` + stack;
|
|
29730
29676
|
}
|
|
29731
|
-
} catch (e2) {
|
|
29732
|
-
}
|
|
29677
|
+
} catch (e2) {}
|
|
29733
29678
|
}
|
|
29734
29679
|
throw err;
|
|
29735
29680
|
}
|
|
@@ -31802,8 +31747,7 @@ var require_logger = __commonJS((exports) => {
|
|
|
31802
31747
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31803
31748
|
exports.DefaultLogger = undefined;
|
|
31804
31749
|
exports.DefaultLogger = {
|
|
31805
|
-
silly: (...params) => {
|
|
31806
|
-
},
|
|
31750
|
+
silly: (...params) => {},
|
|
31807
31751
|
debug: (...params) => {
|
|
31808
31752
|
console.log(new Date, params);
|
|
31809
31753
|
},
|
|
@@ -34546,8 +34490,7 @@ var require_constants4 = __commonJS((exports, module) => {
|
|
|
34546
34490
|
kListener: Symbol("kListener"),
|
|
34547
34491
|
kStatusCode: Symbol("status-code"),
|
|
34548
34492
|
kWebSocket: Symbol("websocket"),
|
|
34549
|
-
NOOP: () => {
|
|
34550
|
-
}
|
|
34493
|
+
NOOP: () => {}
|
|
34551
34494
|
};
|
|
34552
34495
|
});
|
|
34553
34496
|
|
|
@@ -34625,8 +34568,7 @@ var require_buffer_util = __commonJS((exports, module) => {
|
|
|
34625
34568
|
else
|
|
34626
34569
|
bufferUtil.unmask(buffer, mask);
|
|
34627
34570
|
};
|
|
34628
|
-
} catch (e2) {
|
|
34629
|
-
}
|
|
34571
|
+
} catch (e2) {}
|
|
34630
34572
|
}
|
|
34631
34573
|
});
|
|
34632
34574
|
|
|
@@ -35105,8 +35047,7 @@ var require_validation = __commonJS((exports, module) => {
|
|
|
35105
35047
|
module.exports.isValidUTF8 = function(buf) {
|
|
35106
35048
|
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
35107
35049
|
};
|
|
35108
|
-
} catch (e2) {
|
|
35109
|
-
}
|
|
35050
|
+
} catch (e2) {}
|
|
35110
35051
|
}
|
|
35111
35052
|
});
|
|
35112
35053
|
|
|
@@ -37531,8 +37472,7 @@ var require_websocket_client = __commonJS((exports) => {
|
|
|
37531
37472
|
this.options = Object.assign({ pongTimeout: 7500, pingInterval: 1e4, reconnectTimeout: 500 }, options);
|
|
37532
37473
|
this.listenKeyStateStore = {};
|
|
37533
37474
|
this.wsUrlKeyMap = {};
|
|
37534
|
-
this.on("error", () => {
|
|
37535
|
-
});
|
|
37475
|
+
this.on("error", () => {});
|
|
37536
37476
|
}
|
|
37537
37477
|
getRestClientOptions() {
|
|
37538
37478
|
return Object.assign(Object.assign(Object.assign({}, this.options), this.options.restOptions), { api_key: this.options.api_key, api_secret: this.options.api_secret });
|
|
@@ -38750,8 +38690,7 @@ var require_axios2 = __commonJS((exports, module) => {
|
|
|
38750
38690
|
isArray3(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
|
|
38751
38691
|
return obj;
|
|
38752
38692
|
};
|
|
38753
|
-
var noop2 = () => {
|
|
38754
|
-
};
|
|
38693
|
+
var noop2 = () => {};
|
|
38755
38694
|
var toFiniteNumber = (value2, defaultValue) => {
|
|
38756
38695
|
return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
|
|
38757
38696
|
};
|
|
@@ -40204,8 +40143,7 @@ var require_axios2 = __commonJS((exports, module) => {
|
|
|
40204
40143
|
try {
|
|
40205
40144
|
const knownLength = await util__default["default"].promisify(data.getLength).call(data);
|
|
40206
40145
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
40207
|
-
} catch (e2) {
|
|
40208
|
-
}
|
|
40146
|
+
} catch (e2) {}
|
|
40209
40147
|
}
|
|
40210
40148
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
40211
40149
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
@@ -40479,13 +40417,11 @@ var require_axios2 = __commonJS((exports, module) => {
|
|
|
40479
40417
|
this.write(name2, "", Date.now() - 86400000);
|
|
40480
40418
|
}
|
|
40481
40419
|
} : {
|
|
40482
|
-
write() {
|
|
40483
|
-
},
|
|
40420
|
+
write() {},
|
|
40484
40421
|
read() {
|
|
40485
40422
|
return null;
|
|
40486
40423
|
},
|
|
40487
|
-
remove() {
|
|
40488
|
-
}
|
|
40424
|
+
remove() {}
|
|
40489
40425
|
};
|
|
40490
40426
|
var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
40491
40427
|
function mergeConfig(config1, config2) {
|
|
@@ -40979,8 +40915,7 @@ var require_axios2 = __commonJS((exports, module) => {
|
|
|
40979
40915
|
if (fn) {
|
|
40980
40916
|
try {
|
|
40981
40917
|
Object.defineProperty(fn, "name", { value: value2 });
|
|
40982
|
-
} catch (e2) {
|
|
40983
|
-
}
|
|
40918
|
+
} catch (e2) {}
|
|
40984
40919
|
Object.defineProperty(fn, "adapterName", { value: value2 });
|
|
40985
40920
|
}
|
|
40986
40921
|
});
|
|
@@ -41130,8 +41065,7 @@ var require_axios2 = __commonJS((exports, module) => {
|
|
|
41130
41065
|
err.stack += `
|
|
41131
41066
|
` + stack;
|
|
41132
41067
|
}
|
|
41133
|
-
} catch (e2) {
|
|
41134
|
-
}
|
|
41068
|
+
} catch (e2) {}
|
|
41135
41069
|
}
|
|
41136
41070
|
throw err;
|
|
41137
41071
|
}
|
|
@@ -42000,8 +41934,7 @@ var require_logger2 = __commonJS((exports) => {
|
|
|
42000
41934
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42001
41935
|
exports.DefaultLogger = undefined;
|
|
42002
41936
|
exports.DefaultLogger = {
|
|
42003
|
-
trace: (..._params) => {
|
|
42004
|
-
},
|
|
41937
|
+
trace: (..._params) => {},
|
|
42005
41938
|
info: (...params) => {
|
|
42006
41939
|
console.info(params);
|
|
42007
41940
|
},
|
|
@@ -44047,8 +43980,7 @@ var require_BaseWSClient = __commonJS((exports) => {
|
|
|
44047
43980
|
if (wsState === null || wsState === undefined ? undefined : wsState.activePongTimer) {
|
|
44048
43981
|
clearTimeout(wsState.activePongTimer);
|
|
44049
43982
|
wsState.activePongTimer = undefined;
|
|
44050
|
-
} else {
|
|
44051
|
-
}
|
|
43983
|
+
} else {}
|
|
44052
43984
|
}
|
|
44053
43985
|
clearReconnectTimer(wsKey) {
|
|
44054
43986
|
const wsState = this.wsStore.get(wsKey);
|
|
@@ -44919,8 +44851,7 @@ var require_lib3 = __commonJS((exports) => {
|
|
|
44919
44851
|
var util;
|
|
44920
44852
|
(function(util2) {
|
|
44921
44853
|
util2.assertEqual = (val) => val;
|
|
44922
|
-
function assertIs(_arg) {
|
|
44923
|
-
}
|
|
44854
|
+
function assertIs(_arg) {}
|
|
44924
44855
|
util2.assertIs = assertIs;
|
|
44925
44856
|
function assertNever(_x) {
|
|
44926
44857
|
throw new Error;
|
|
@@ -50275,8 +50206,7 @@ function parseStringDef(def, refs) {
|
|
|
50275
50206
|
case "trim":
|
|
50276
50207
|
break;
|
|
50277
50208
|
default:
|
|
50278
|
-
((_) => {
|
|
50279
|
-
})(check);
|
|
50209
|
+
((_) => {})(check);
|
|
50280
50210
|
}
|
|
50281
50211
|
}
|
|
50282
50212
|
}
|
|
@@ -51666,8 +51596,7 @@ class StdioServerTransport {
|
|
|
51666
51596
|
var util2;
|
|
51667
51597
|
(function(util3) {
|
|
51668
51598
|
util3.assertEqual = (val) => val;
|
|
51669
|
-
function assertIs(_arg) {
|
|
51670
|
-
}
|
|
51599
|
+
function assertIs(_arg) {}
|
|
51671
51600
|
util3.assertIs = assertIs;
|
|
51672
51601
|
function assertNever(_x) {
|
|
51673
51602
|
throw new Error;
|
|
@@ -56528,8 +56457,7 @@ var API_NAME = "task-context";
|
|
|
56528
56457
|
|
|
56529
56458
|
class TaskContextAPI {
|
|
56530
56459
|
static _instance;
|
|
56531
|
-
constructor() {
|
|
56532
|
-
}
|
|
56460
|
+
constructor() {}
|
|
56533
56461
|
static getInstance() {
|
|
56534
56462
|
if (!this._instance) {
|
|
56535
56463
|
this._instance = new TaskContextAPI;
|
|
@@ -56949,8 +56877,7 @@ class ParseError extends Error {
|
|
|
56949
56877
|
super(message2), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
56950
56878
|
}
|
|
56951
56879
|
}
|
|
56952
|
-
function noop(_arg) {
|
|
56953
|
-
}
|
|
56880
|
+
function noop(_arg) {}
|
|
56954
56881
|
function createParser(callbacks) {
|
|
56955
56882
|
if (typeof callbacks == "function")
|
|
56956
56883
|
throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
|
|
@@ -57153,8 +57080,7 @@ async function _doZodFetchWithRetries(schema, url, requestInit, options, attempt
|
|
|
57153
57080
|
if (error instanceof ApiError) {
|
|
57154
57081
|
throw error;
|
|
57155
57082
|
}
|
|
57156
|
-
if (error instanceof import_zod_validation_error.ValidationError) {
|
|
57157
|
-
}
|
|
57083
|
+
if (error instanceof import_zod_validation_error.ValidationError) {}
|
|
57158
57084
|
if (options?.retry) {
|
|
57159
57085
|
const retry = { ...defaultRetryOptions2, ...options.retry };
|
|
57160
57086
|
const delay = calculateNextRetryDelay(retry, attempt);
|
|
@@ -57628,8 +57554,7 @@ class ApiClientMissingError extends Error {
|
|
|
57628
57554
|
|
|
57629
57555
|
class APIClientManagerAPI {
|
|
57630
57556
|
static _instance;
|
|
57631
|
-
constructor() {
|
|
57632
|
-
}
|
|
57557
|
+
constructor() {}
|
|
57633
57558
|
static getInstance() {
|
|
57634
57559
|
if (!this._instance) {
|
|
57635
57560
|
this._instance = new APIClientManagerAPI;
|
|
@@ -58184,8 +58109,7 @@ var PrefetchQueue = class {
|
|
|
58184
58109
|
if (__privateGet(this, _queueTailUrl) && !__privateGet(this, _prefetchQueue).has(__privateGet(this, _queueTailUrl))) {
|
|
58185
58110
|
__privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, __privateGet(this, _queueTailUrl), args[1]);
|
|
58186
58111
|
}
|
|
58187
|
-
}).catch(() => {
|
|
58188
|
-
});
|
|
58112
|
+
}).catch(() => {});
|
|
58189
58113
|
return request;
|
|
58190
58114
|
}
|
|
58191
58115
|
};
|
|
@@ -58216,10 +58140,8 @@ prefetch_fn = function(...args) {
|
|
|
58216
58140
|
}
|
|
58217
58141
|
__privateSet(this, _queueTailUrl, nextUrl);
|
|
58218
58142
|
return __privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, nextUrl, args[1]);
|
|
58219
|
-
}).catch(() => {
|
|
58220
|
-
|
|
58221
|
-
} catch (_) {
|
|
58222
|
-
}
|
|
58143
|
+
}).catch(() => {});
|
|
58144
|
+
} catch (_) {}
|
|
58223
58145
|
};
|
|
58224
58146
|
function getNextChunkUrl(url, res) {
|
|
58225
58147
|
const shapeHandle = res.headers.get(SHAPE_HANDLE_HEADER);
|
|
@@ -58322,8 +58244,7 @@ var ShapeStream = class {
|
|
|
58322
58244
|
get lastOffset() {
|
|
58323
58245
|
return __privateGet(this, _lastOffset);
|
|
58324
58246
|
}
|
|
58325
|
-
subscribe(callback, onError = () => {
|
|
58326
|
-
}) {
|
|
58247
|
+
subscribe(callback, onError = () => {}) {
|
|
58327
58248
|
const subscriptionId = Math.random();
|
|
58328
58249
|
__privateGet(this, _subscribers).set(subscriptionId, [callback, onError]);
|
|
58329
58250
|
return () => {
|
|
@@ -59517,8 +59438,7 @@ class SimpleClock {
|
|
|
59517
59438
|
const nowStruct = now.toStruct();
|
|
59518
59439
|
return [nowStruct.seconds, nowStruct.nanos];
|
|
59519
59440
|
}
|
|
59520
|
-
reset() {
|
|
59521
|
-
}
|
|
59441
|
+
reset() {}
|
|
59522
59442
|
}
|
|
59523
59443
|
|
|
59524
59444
|
// node_modules/@trigger.dev/core/dist/esm/v3/clock/index.js
|
|
@@ -59527,8 +59447,7 @@ var SIMPLE_CLOCK = new SimpleClock;
|
|
|
59527
59447
|
|
|
59528
59448
|
class ClockAPI {
|
|
59529
59449
|
static _instance;
|
|
59530
|
-
constructor() {
|
|
59531
|
-
}
|
|
59450
|
+
constructor() {}
|
|
59532
59451
|
static getInstance() {
|
|
59533
59452
|
if (!this._instance) {
|
|
59534
59453
|
this._instance = new ClockAPI;
|
|
@@ -59554,8 +59473,7 @@ var clock = ClockAPI.getInstance();
|
|
|
59554
59473
|
|
|
59555
59474
|
// node_modules/@trigger.dev/core/dist/esm/v3/usage/noopUsageManager.js
|
|
59556
59475
|
class NoopUsageManager {
|
|
59557
|
-
disable() {
|
|
59558
|
-
}
|
|
59476
|
+
disable() {}
|
|
59559
59477
|
start() {
|
|
59560
59478
|
return {
|
|
59561
59479
|
sample: () => ({ cpuTime: 0, wallTime: 0 })
|
|
@@ -59578,8 +59496,7 @@ var NOOP_USAGE_MANAGER = new NoopUsageManager;
|
|
|
59578
59496
|
|
|
59579
59497
|
class UsageAPI {
|
|
59580
59498
|
static _instance;
|
|
59581
|
-
constructor() {
|
|
59582
|
-
}
|
|
59499
|
+
constructor() {}
|
|
59583
59500
|
static getInstance() {
|
|
59584
59501
|
if (!this._instance) {
|
|
59585
59502
|
this._instance = new UsageAPI;
|
|
@@ -59639,8 +59556,7 @@ class NoopRunMetadataManager {
|
|
|
59639
59556
|
refresh(requestOptions) {
|
|
59640
59557
|
throw new Error("Method not implemented.");
|
|
59641
59558
|
}
|
|
59642
|
-
enterWithMetadata(metadata) {
|
|
59643
|
-
}
|
|
59559
|
+
enterWithMetadata(metadata) {}
|
|
59644
59560
|
current() {
|
|
59645
59561
|
throw new Error("Method not implemented.");
|
|
59646
59562
|
}
|
|
@@ -59696,8 +59612,7 @@ var NOOP_MANAGER = new NoopRunMetadataManager;
|
|
|
59696
59612
|
|
|
59697
59613
|
class RunMetadataAPI {
|
|
59698
59614
|
static _instance;
|
|
59699
|
-
constructor() {
|
|
59700
|
-
}
|
|
59615
|
+
constructor() {}
|
|
59701
59616
|
static getInstance() {
|
|
59702
59617
|
if (!this._instance) {
|
|
59703
59618
|
this._instance = new RunMetadataAPI;
|
|
@@ -59782,8 +59697,7 @@ var NOOP_TIMEOUT_MANAGER = new NoopTimeoutManager;
|
|
|
59782
59697
|
|
|
59783
59698
|
class TimeoutAPI {
|
|
59784
59699
|
static _instance;
|
|
59785
|
-
constructor() {
|
|
59786
|
-
}
|
|
59700
|
+
constructor() {}
|
|
59787
59701
|
static getInstance() {
|
|
59788
59702
|
if (!this._instance) {
|
|
59789
59703
|
this._instance = new TimeoutAPI;
|
|
@@ -60187,8 +60101,7 @@ function getTokenPayload(e2) {
|
|
|
60187
60101
|
return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
|
|
60188
60102
|
}).join(""));
|
|
60189
60103
|
return JSON.parse(t2) || {};
|
|
60190
|
-
} catch (e3) {
|
|
60191
|
-
}
|
|
60104
|
+
} catch (e3) {}
|
|
60192
60105
|
return {};
|
|
60193
60106
|
}
|
|
60194
60107
|
function isTokenExpired(e2, t2 = 0) {
|
|
@@ -60242,8 +60155,7 @@ class BaseAuthStore {
|
|
|
60242
60155
|
let n = {};
|
|
60243
60156
|
try {
|
|
60244
60157
|
n = JSON.parse(s2), (typeof n === null || typeof n != "object" || Array.isArray(n)) && (n = {});
|
|
60245
|
-
} catch (e3) {
|
|
60246
|
-
}
|
|
60158
|
+
} catch (e3) {}
|
|
60247
60159
|
this.save(n.token || "", n.record || n.model || null);
|
|
60248
60160
|
}
|
|
60249
60161
|
exportToCookie(e2, t2 = i) {
|
|
@@ -60390,8 +60302,7 @@ class RealtimeService extends BaseService {
|
|
|
60390
60302
|
let i3;
|
|
60391
60303
|
try {
|
|
60392
60304
|
i3 = JSON.parse(s3?.data);
|
|
60393
|
-
} catch {
|
|
60394
|
-
}
|
|
60305
|
+
} catch {}
|
|
60395
60306
|
t2(i3 || {});
|
|
60396
60307
|
};
|
|
60397
60308
|
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);
|
|
@@ -61104,8 +61015,7 @@ class Client {
|
|
|
61104
61015
|
let s3 = {};
|
|
61105
61016
|
try {
|
|
61106
61017
|
s3 = await e3.json();
|
|
61107
|
-
} catch (e4) {
|
|
61108
|
-
}
|
|
61018
|
+
} catch (e4) {}
|
|
61109
61019
|
if (this.afterSend && (s3 = await this.afterSend(e3, s3, t2)), e3.status >= 400)
|
|
61110
61020
|
throw new ClientResponseError({ url: e3.url, status: e3.status, data: s3 });
|
|
61111
61021
|
return s3;
|
|
@@ -62632,8 +62542,7 @@ class Signal {
|
|
|
62632
62542
|
support: kind === "long" ? _stop_loss : this.support
|
|
62633
62543
|
};
|
|
62634
62544
|
const instance = new Signal(derivedConfig);
|
|
62635
|
-
if (kind === "short") {
|
|
62636
|
-
}
|
|
62545
|
+
if (kind === "short") {}
|
|
62637
62546
|
let result = instance.get_bulk_trade_zones({ current_price, kind });
|
|
62638
62547
|
return result;
|
|
62639
62548
|
return result?.filter((x) => {
|
|
@@ -62851,8 +62760,7 @@ class Signal {
|
|
|
62851
62760
|
kind = "long",
|
|
62852
62761
|
raw
|
|
62853
62762
|
}) {
|
|
62854
|
-
if (raw) {
|
|
62855
|
-
}
|
|
62763
|
+
if (raw) {}
|
|
62856
62764
|
const margin_range = this.get_margin_range(current_price, kind);
|
|
62857
62765
|
let margin_zones = this.get_margin_zones({ current_price });
|
|
62858
62766
|
let remaining_zones = margin_zones.filter((x) => JSON.stringify(x) != JSON.stringify(margin_range));
|
|
@@ -63079,8 +62987,7 @@ class Signal {
|
|
|
63079
62987
|
return true;
|
|
63080
62988
|
});
|
|
63081
62989
|
let total_orders = limit_trades.concat(market_trades);
|
|
63082
|
-
if (kind === "short") {
|
|
63083
|
-
}
|
|
62990
|
+
if (kind === "short") {}
|
|
63084
62991
|
if (this.minimum_size && total_orders.length > 0) {
|
|
63085
62992
|
let payload = total_orders;
|
|
63086
62993
|
let greater_than_min_size = total_orders.filter((o) => o ? o.quantity >= this.minimum_size : true);
|
|
@@ -63166,8 +63073,7 @@ class Signal {
|
|
|
63166
63073
|
});
|
|
63167
63074
|
const multiplier = start - index;
|
|
63168
63075
|
const incurred_fees = fees.reduce((a, b) => a + b, 0) + previous_risks.reduce((a, b) => a + b, 0);
|
|
63169
|
-
if (index === 0) {
|
|
63170
|
-
}
|
|
63076
|
+
if (index === 0) {}
|
|
63171
63077
|
let quantity = determine_position_size({
|
|
63172
63078
|
entry,
|
|
63173
63079
|
stop,
|
|
@@ -63553,8 +63459,7 @@ function buildConfig(app_config, {
|
|
|
63553
63459
|
return [];
|
|
63554
63460
|
}
|
|
63555
63461
|
const condition = (kind === "long" ? entry > app_config.support : entry >= app_config.support) && stop >= app_config.support * 0.999;
|
|
63556
|
-
if (kind === "short") {
|
|
63557
|
-
}
|
|
63462
|
+
if (kind === "short") {}
|
|
63558
63463
|
console.log({ entry, stop, condition, working_risk, config: config2 });
|
|
63559
63464
|
const result = entry === stop ? [] : condition ? instance.build_entry({
|
|
63560
63465
|
current_price: entry,
|
|
@@ -64572,6 +64477,31 @@ function constructAppConfig(payload) {
|
|
|
64572
64477
|
const appConfig = buildAppConfig(global_config, options);
|
|
64573
64478
|
return appConfig;
|
|
64574
64479
|
}
|
|
64480
|
+
function generateDangerousConfig(payload) {
|
|
64481
|
+
const { account, global_config, config: config2 } = payload;
|
|
64482
|
+
const app_config = constructAppConfig({
|
|
64483
|
+
account,
|
|
64484
|
+
global_config,
|
|
64485
|
+
kelly_config: {}
|
|
64486
|
+
});
|
|
64487
|
+
const { optimal_risk, optimal_stop } = getOptimumStopAndRisk(app_config, {
|
|
64488
|
+
max_size: config2.quantity,
|
|
64489
|
+
target_stop: config2.stop
|
|
64490
|
+
});
|
|
64491
|
+
const optimumRiskReward = computeRiskReward({
|
|
64492
|
+
app_config,
|
|
64493
|
+
entry: config2.entry,
|
|
64494
|
+
stop: optimal_stop,
|
|
64495
|
+
risk_per_trade: optimal_risk,
|
|
64496
|
+
target_loss: optimal_risk
|
|
64497
|
+
});
|
|
64498
|
+
return {
|
|
64499
|
+
entry: config2.entry,
|
|
64500
|
+
risk: optimal_risk,
|
|
64501
|
+
stop: optimal_stop,
|
|
64502
|
+
risk_reward: optimumRiskReward
|
|
64503
|
+
};
|
|
64504
|
+
}
|
|
64575
64505
|
// src/helpers/strategy.ts
|
|
64576
64506
|
class Strategy {
|
|
64577
64507
|
position;
|
|
@@ -65643,8 +65573,7 @@ async function createLimitPurchaseOrdersParallel(client, symbol, priceFormat, qu
|
|
|
65643
65573
|
const splitOrders = (inputOrders) => {
|
|
65644
65574
|
const result = [];
|
|
65645
65575
|
for (const o of inputOrders) {
|
|
65646
|
-
if (o.take_profit) {
|
|
65647
|
-
}
|
|
65576
|
+
if (o.take_profit) {}
|
|
65648
65577
|
if (o.stop && !o.side) {
|
|
65649
65578
|
result.push({
|
|
65650
65579
|
price: o.price,
|
|
@@ -66539,8 +66468,7 @@ async function createLimitPurchaseOrders(client, symbol, priceFormat, quantityFo
|
|
|
66539
66468
|
const splitOrders = (inputOrders) => {
|
|
66540
66469
|
const result = [];
|
|
66541
66470
|
for (const o of inputOrders) {
|
|
66542
|
-
if (o.take_profit) {
|
|
66543
|
-
}
|
|
66471
|
+
if (o.take_profit) {}
|
|
66544
66472
|
if (o.stop && !o.side) {
|
|
66545
66473
|
result.push({
|
|
66546
66474
|
price: o.price,
|
|
@@ -67092,10 +67020,8 @@ class BybitExchange extends BaseExchange {
|
|
|
67092
67020
|
sellLeverage: payload.leverage.toString()
|
|
67093
67021
|
});
|
|
67094
67022
|
}
|
|
67095
|
-
async generateConfig(payload) {
|
|
67096
|
-
}
|
|
67097
|
-
async checkDelistedMovers(payload) {
|
|
67098
|
-
}
|
|
67023
|
+
async generateConfig(payload) {}
|
|
67024
|
+
async checkDelistedMovers(payload) {}
|
|
67099
67025
|
async getAllOpenOrders() {
|
|
67100
67026
|
const result = await getAllOpenOrders2({ client: this.client });
|
|
67101
67027
|
return result;
|
|
@@ -67106,13 +67032,11 @@ class BybitExchange extends BaseExchange {
|
|
|
67106
67032
|
async getDelistedSpotSymbols() {
|
|
67107
67033
|
return [];
|
|
67108
67034
|
}
|
|
67109
|
-
async crossAccountTransfer(payload) {
|
|
67110
|
-
}
|
|
67035
|
+
async crossAccountTransfer(payload) {}
|
|
67111
67036
|
getOpenOrders(payload) {
|
|
67112
67037
|
return getOpenOrders2(this.client, payload.symbol);
|
|
67113
67038
|
}
|
|
67114
|
-
async placeBadStopEntry(payload) {
|
|
67115
|
-
}
|
|
67039
|
+
async placeBadStopEntry(payload) {}
|
|
67116
67040
|
}
|
|
67117
67041
|
|
|
67118
67042
|
// src/helpers/accounts.ts
|
|
@@ -67219,14 +67143,24 @@ function build_reduce_config(payload) {
|
|
|
67219
67143
|
} = payload;
|
|
67220
67144
|
const long_position = _positions.find((x) => x.kind === "long");
|
|
67221
67145
|
const short_position = _positions.find((x) => x.kind === "short");
|
|
67146
|
+
let long_target_pnl = long_position?.target_pnl || 0;
|
|
67147
|
+
let short_target_pnl = short_position?.target_pnl || 0;
|
|
67148
|
+
if (long_config.profit_percent && long_position?.entry) {
|
|
67149
|
+
const sell_price = (1 + long_config.profit_percent / 100) * long_position.entry;
|
|
67150
|
+
long_target_pnl = Math.abs(sell_price - long_position.entry) * long_position.quantity;
|
|
67151
|
+
}
|
|
67152
|
+
if (short_config.profit_percent && short_position?.entry) {
|
|
67153
|
+
const buy_price = (1 - short_config.profit_percent / 100) * short_position.entry;
|
|
67154
|
+
short_target_pnl = Math.abs(short_position.entry - buy_price) * short_position.quantity;
|
|
67155
|
+
}
|
|
67222
67156
|
return {
|
|
67223
67157
|
trigger_short: true,
|
|
67224
67158
|
trigger_long: true,
|
|
67225
67159
|
symbol,
|
|
67226
67160
|
short_minimum_pnl,
|
|
67227
67161
|
long_minimum_pnl,
|
|
67228
|
-
short_profit:
|
|
67229
|
-
long_profit:
|
|
67162
|
+
short_profit: short_target_pnl,
|
|
67163
|
+
long_profit: long_target_pnl,
|
|
67230
67164
|
owner: account.owner,
|
|
67231
67165
|
exchange: account.exchange,
|
|
67232
67166
|
not_reduce,
|
|
@@ -67543,6 +67477,10 @@ class ExchangePosition {
|
|
|
67543
67477
|
if (this.instance.expand.proxy) {
|
|
67544
67478
|
const result = this.instance.expand.proxy;
|
|
67545
67479
|
const { type, ip_address } = result;
|
|
67480
|
+
console.log("exchange", {
|
|
67481
|
+
owner: this.account.owner,
|
|
67482
|
+
exchange: this.account.exchange
|
|
67483
|
+
});
|
|
67546
67484
|
console.log("position", type, ip_address);
|
|
67547
67485
|
if (type === "http") {
|
|
67548
67486
|
return new import_https_proxy_agent2.HttpsProxyAgent(`http://${ip_address}`);
|
|
@@ -67581,7 +67519,7 @@ class ExchangePosition {
|
|
|
67581
67519
|
if (payload?.params) {
|
|
67582
67520
|
const db_position = this.instance;
|
|
67583
67521
|
if (db_position) {
|
|
67584
|
-
const config2 = db_position.expand?.
|
|
67522
|
+
const config2 = db_position.expand?.b_config;
|
|
67585
67523
|
const params = {
|
|
67586
67524
|
entry: payload.params.entry !== undefined ? payload.params.entry : config2?.entry,
|
|
67587
67525
|
stop: payload.params.stop !== undefined ? payload.params.stop : config2?.stop,
|
|
@@ -67962,7 +67900,6 @@ class ExchangePosition {
|
|
|
67962
67900
|
place
|
|
67963
67901
|
});
|
|
67964
67902
|
}
|
|
67965
|
-
const rr = await this.refresh(true);
|
|
67966
67903
|
await this.updateConfigPnl();
|
|
67967
67904
|
if (tp) {
|
|
67968
67905
|
await this.exchange_account.placeProfitAndStop({
|
|
@@ -67972,7 +67909,6 @@ class ExchangePosition {
|
|
|
67972
67909
|
});
|
|
67973
67910
|
}
|
|
67974
67911
|
return [];
|
|
67975
|
-
return rr.existingOrders;
|
|
67976
67912
|
}
|
|
67977
67913
|
async placeStopLimit(payload) {
|
|
67978
67914
|
const { place, stop, quantity: _quantity } = payload;
|
|
@@ -68446,14 +68382,29 @@ class ExchangePosition {
|
|
|
68446
68382
|
});
|
|
68447
68383
|
}
|
|
68448
68384
|
const last_order = focus_position.instance.last_order;
|
|
68449
|
-
|
|
68450
|
-
if (this.
|
|
68451
|
-
|
|
68452
|
-
|
|
68453
|
-
|
|
68454
|
-
|
|
68385
|
+
let take_profit;
|
|
68386
|
+
if (this.instance.tp?.price) {
|
|
68387
|
+
take_profit = to_f(this.instance.tp?.price, this.symbol_config.price_places);
|
|
68388
|
+
if (this.kind === "short" && last_order && take_profit) {
|
|
68389
|
+
const reduce_ratio = take_profit < last_order ? 1 : 0;
|
|
68390
|
+
await this.getConfig({
|
|
68391
|
+
params: {
|
|
68392
|
+
reduce_ratio
|
|
68393
|
+
}
|
|
68394
|
+
});
|
|
68395
|
+
}
|
|
68396
|
+
if (this.instance.quantity > 0) {
|
|
68397
|
+
if (focus_position.kind === "long" && focus_position.instance.stop_loss && take_profit > focus_position.appConfig.stop && focus_position.instance.stop_loss?.price) {
|
|
68398
|
+
await focus_position.cancelExchangeOrder({
|
|
68399
|
+
type: "stop"
|
|
68400
|
+
});
|
|
68455
68401
|
}
|
|
68456
|
-
|
|
68402
|
+
if (focus_position.kind === "short" && focus_position.instance.stop_loss && take_profit < focus_position.appConfig.stop && focus_position.instance.stop_loss?.price) {
|
|
68403
|
+
await focus_position.cancelExchangeOrder({
|
|
68404
|
+
type: "stop"
|
|
68405
|
+
});
|
|
68406
|
+
}
|
|
68407
|
+
}
|
|
68457
68408
|
}
|
|
68458
68409
|
return { profit_percent, take_profit, last_order };
|
|
68459
68410
|
}
|
|
@@ -68481,6 +68432,21 @@ class ExchangePosition {
|
|
|
68481
68432
|
}
|
|
68482
68433
|
return result;
|
|
68483
68434
|
}
|
|
68435
|
+
placeDangerousTrade(payload) {
|
|
68436
|
+
const { ...rest } = payload;
|
|
68437
|
+
const expected_quantity = rest.quantity;
|
|
68438
|
+
const entry = rest.entry;
|
|
68439
|
+
const stop = rest.stop;
|
|
68440
|
+
return generateDangerousConfig({
|
|
68441
|
+
account: this.instance,
|
|
68442
|
+
global_config: this.symbol_config,
|
|
68443
|
+
config: {
|
|
68444
|
+
entry,
|
|
68445
|
+
stop,
|
|
68446
|
+
quantity: expected_quantity
|
|
68447
|
+
}
|
|
68448
|
+
});
|
|
68449
|
+
}
|
|
68484
68450
|
}
|
|
68485
68451
|
function convert_to_exchange_order(order) {
|
|
68486
68452
|
return {
|
|
@@ -68546,8 +68512,7 @@ class ExchangeAccount {
|
|
|
68546
68512
|
async initializePositions(payload) {
|
|
68547
68513
|
const raw_positions = await this.syncAccount({
|
|
68548
68514
|
update: payload.update,
|
|
68549
|
-
symbol: payload.symbol
|
|
68550
|
-
live_refresh: payload.update
|
|
68515
|
+
symbol: payload.symbol
|
|
68551
68516
|
});
|
|
68552
68517
|
const positions = await this.syncAccount({
|
|
68553
68518
|
symbol: payload.symbol,
|
|
@@ -68559,6 +68524,7 @@ class ExchangeAccount {
|
|
|
68559
68524
|
const active_account = await this.getActiveAccount({
|
|
68560
68525
|
symbol: payload.symbol
|
|
68561
68526
|
});
|
|
68527
|
+
console.log("active_account", payload);
|
|
68562
68528
|
const long_position = positions.find((x) => x.kind === "long");
|
|
68563
68529
|
const short_position = positions.find((x) => x.kind === "short");
|
|
68564
68530
|
this.long_position = new ExchangePosition({
|
|
@@ -68634,6 +68600,9 @@ class ExchangeAccount {
|
|
|
68634
68600
|
});
|
|
68635
68601
|
if (options.kind) {
|
|
68636
68602
|
let position2 = db_positions2.find((x) => x.kind === options.kind);
|
|
68603
|
+
if (position2.symbol !== symbol) {
|
|
68604
|
+
throw new Error("Symbol mismatch");
|
|
68605
|
+
}
|
|
68637
68606
|
return position2;
|
|
68638
68607
|
}
|
|
68639
68608
|
return db_positions2;
|
|
@@ -68644,7 +68613,11 @@ class ExchangeAccount {
|
|
|
68644
68613
|
leverage: options.leverage
|
|
68645
68614
|
});
|
|
68646
68615
|
if (options.kind) {
|
|
68647
|
-
|
|
68616
|
+
const result = db_positions.find((x) => x.kind === options.kind);
|
|
68617
|
+
if (result.symbol !== symbol) {
|
|
68618
|
+
throw new Error("Symbol mismatch");
|
|
68619
|
+
}
|
|
68620
|
+
return result;
|
|
68648
68621
|
}
|
|
68649
68622
|
return db_positions;
|
|
68650
68623
|
}
|
|
@@ -68699,14 +68672,18 @@ class ExchangeAccount {
|
|
|
68699
68672
|
}
|
|
68700
68673
|
async getFocusPosition(payload) {
|
|
68701
68674
|
const { symbol, kind, update = false } = payload;
|
|
68675
|
+
console.log("payload", payload);
|
|
68702
68676
|
let focus_position = kind === "long" ? this.long_position : this.short_position;
|
|
68703
|
-
if (!focus_position) {
|
|
68677
|
+
if (!focus_position || focus_position.symbol !== symbol) {
|
|
68704
68678
|
focus_position = await this.initializePositions({
|
|
68705
68679
|
symbol,
|
|
68706
68680
|
kind,
|
|
68707
68681
|
update
|
|
68708
68682
|
});
|
|
68709
68683
|
}
|
|
68684
|
+
if (focus_position.symbol !== symbol) {
|
|
68685
|
+
throw new Error("Symbol mismatch");
|
|
68686
|
+
}
|
|
68710
68687
|
return focus_position;
|
|
68711
68688
|
}
|
|
68712
68689
|
async cancelOrders(payload) {
|
|
@@ -68825,7 +68802,10 @@ class ExchangeAccount {
|
|
|
68825
68802
|
return await focus_position.getOrCreatePositionConfig(payload);
|
|
68826
68803
|
}
|
|
68827
68804
|
async getPositionConfig(payload) {
|
|
68828
|
-
const focus_position = await this.getFocusPosition(
|
|
68805
|
+
const focus_position = await this.getFocusPosition({
|
|
68806
|
+
...payload,
|
|
68807
|
+
update: !Boolean(payload.params)
|
|
68808
|
+
});
|
|
68829
68809
|
return await focus_position.getConfig({
|
|
68830
68810
|
params: payload.params
|
|
68831
68811
|
});
|
|
@@ -68860,6 +68840,7 @@ class ExchangeAccount {
|
|
|
68860
68840
|
long_config,
|
|
68861
68841
|
short_config
|
|
68862
68842
|
});
|
|
68843
|
+
console.log("config", config2);
|
|
68863
68844
|
if (!long_config || !short_config) {
|
|
68864
68845
|
return null;
|
|
68865
68846
|
}
|
|
@@ -69902,10 +69883,19 @@ class ExchangeAccount {
|
|
|
69902
69883
|
const focus_position = await this.getFocusPosition(payload);
|
|
69903
69884
|
return await focus_position.placeStopLimit(payload);
|
|
69904
69885
|
}
|
|
69886
|
+
async placeDangerousTrade(payload) {
|
|
69887
|
+
const { symbol, config: config2, kind } = payload;
|
|
69888
|
+
const focus_position = await this.getFocusPosition({
|
|
69889
|
+
symbol,
|
|
69890
|
+
kind
|
|
69891
|
+
});
|
|
69892
|
+
return focus_position.placeDangerousTrade(config2);
|
|
69893
|
+
}
|
|
69905
69894
|
async placeTrade(payload) {
|
|
69906
69895
|
const focus_position = await this.getFocusPosition({
|
|
69907
69896
|
symbol: payload.symbol,
|
|
69908
|
-
kind: payload.kind
|
|
69897
|
+
kind: payload.kind,
|
|
69898
|
+
update: true
|
|
69909
69899
|
});
|
|
69910
69900
|
return await focus_position.placeTrade(payload);
|
|
69911
69901
|
}
|
|
@@ -69964,8 +69954,13 @@ class ExchangeAccount {
|
|
|
69964
69954
|
const opposite_config = focus_position.getOppositeConfig({
|
|
69965
69955
|
ratio: reward_factor
|
|
69966
69956
|
});
|
|
69957
|
+
console.log("opposite_config", opposite_config);
|
|
69967
69958
|
const reverse_config = await reversePosition.getConfig();
|
|
69968
|
-
|
|
69959
|
+
let condition = (reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focus_position.getInstance().quantity > 0;
|
|
69960
|
+
if (reversePosition.getInstance().quantity === 0 && focus_position.getInstance().quantity > 0) {
|
|
69961
|
+
condition = true;
|
|
69962
|
+
}
|
|
69963
|
+
if (condition) {
|
|
69969
69964
|
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
69970
69965
|
await reversePosition.getConfig({
|
|
69971
69966
|
params: {
|
|
@@ -70133,8 +70128,7 @@ class ExchangeAccount {
|
|
|
70133
70128
|
full_ratio
|
|
70134
70129
|
});
|
|
70135
70130
|
}
|
|
70136
|
-
async placeCompoundShortTrade(payload) {
|
|
70137
|
-
}
|
|
70131
|
+
async placeCompoundShortTrade(payload) {}
|
|
70138
70132
|
async placeCompoundLongTrade(payload) {
|
|
70139
70133
|
const { symbol, params, place = false } = payload;
|
|
70140
70134
|
if (place) {
|
|
@@ -70822,8 +70816,7 @@ async function fetchExchangeDetails(payload) {
|
|
|
70822
70816
|
}
|
|
70823
70817
|
|
|
70824
70818
|
// src/mcp-server.ts
|
|
70825
|
-
console.log = (...args) => {
|
|
70826
|
-
};
|
|
70819
|
+
console.log = (...args) => {};
|
|
70827
70820
|
var server = new McpServer({
|
|
70828
70821
|
name: "ultimate-trader",
|
|
70829
70822
|
version: "0.0.1",
|