open-mcp-app 0.0.13 → 0.0.14
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/core/index.js +23 -11
- package/dist/core/index.js.map +1 -1
- package/dist/react/index.js +23 -11
- package/dist/react/index.js.map +1 -1
- package/dist/server/index.d.ts +410 -4
- package/dist/server/index.js +828 -212
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// node_modules/ajv/dist/compile/codegen/code.js
|
|
28
28
|
var require_code = __commonJS({
|
|
29
|
-
"
|
|
29
|
+
"node_modules/ajv/dist/compile/codegen/code.js"(exports) {
|
|
30
30
|
"use strict";
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
@@ -178,9 +178,9 @@ var require_code = __commonJS({
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
-
//
|
|
181
|
+
// node_modules/ajv/dist/compile/codegen/scope.js
|
|
182
182
|
var require_scope = __commonJS({
|
|
183
|
-
"
|
|
183
|
+
"node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
|
|
184
184
|
"use strict";
|
|
185
185
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
186
186
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
@@ -323,9 +323,9 @@ var require_scope = __commonJS({
|
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
325
|
|
|
326
|
-
//
|
|
326
|
+
// node_modules/ajv/dist/compile/codegen/index.js
|
|
327
327
|
var require_codegen = __commonJS({
|
|
328
|
-
"
|
|
328
|
+
"node_modules/ajv/dist/compile/codegen/index.js"(exports) {
|
|
329
329
|
"use strict";
|
|
330
330
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
331
331
|
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
|
|
@@ -1043,9 +1043,9 @@ var require_codegen = __commonJS({
|
|
|
1043
1043
|
}
|
|
1044
1044
|
});
|
|
1045
1045
|
|
|
1046
|
-
//
|
|
1046
|
+
// node_modules/ajv/dist/compile/util.js
|
|
1047
1047
|
var require_util = __commonJS({
|
|
1048
|
-
"
|
|
1048
|
+
"node_modules/ajv/dist/compile/util.js"(exports) {
|
|
1049
1049
|
"use strict";
|
|
1050
1050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1051
1051
|
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
|
|
@@ -1210,9 +1210,9 @@ var require_util = __commonJS({
|
|
|
1210
1210
|
}
|
|
1211
1211
|
});
|
|
1212
1212
|
|
|
1213
|
-
//
|
|
1213
|
+
// node_modules/ajv/dist/compile/names.js
|
|
1214
1214
|
var require_names = __commonJS({
|
|
1215
|
-
"
|
|
1215
|
+
"node_modules/ajv/dist/compile/names.js"(exports) {
|
|
1216
1216
|
"use strict";
|
|
1217
1217
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1218
1218
|
var codegen_1 = require_codegen();
|
|
@@ -1249,9 +1249,9 @@ var require_names = __commonJS({
|
|
|
1249
1249
|
}
|
|
1250
1250
|
});
|
|
1251
1251
|
|
|
1252
|
-
//
|
|
1252
|
+
// node_modules/ajv/dist/compile/errors.js
|
|
1253
1253
|
var require_errors = __commonJS({
|
|
1254
|
-
"
|
|
1254
|
+
"node_modules/ajv/dist/compile/errors.js"(exports) {
|
|
1255
1255
|
"use strict";
|
|
1256
1256
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1257
1257
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
|
@@ -1371,9 +1371,9 @@ var require_errors = __commonJS({
|
|
|
1371
1371
|
}
|
|
1372
1372
|
});
|
|
1373
1373
|
|
|
1374
|
-
//
|
|
1374
|
+
// node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
1375
1375
|
var require_boolSchema = __commonJS({
|
|
1376
|
-
"
|
|
1376
|
+
"node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
|
|
1377
1377
|
"use strict";
|
|
1378
1378
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1379
1379
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
|
|
@@ -1422,9 +1422,9 @@ var require_boolSchema = __commonJS({
|
|
|
1422
1422
|
}
|
|
1423
1423
|
});
|
|
1424
1424
|
|
|
1425
|
-
//
|
|
1425
|
+
// node_modules/ajv/dist/compile/rules.js
|
|
1426
1426
|
var require_rules = __commonJS({
|
|
1427
|
-
"
|
|
1427
|
+
"node_modules/ajv/dist/compile/rules.js"(exports) {
|
|
1428
1428
|
"use strict";
|
|
1429
1429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1430
1430
|
exports.getRules = exports.isJSONType = void 0;
|
|
@@ -1453,9 +1453,9 @@ var require_rules = __commonJS({
|
|
|
1453
1453
|
}
|
|
1454
1454
|
});
|
|
1455
1455
|
|
|
1456
|
-
//
|
|
1456
|
+
// node_modules/ajv/dist/compile/validate/applicability.js
|
|
1457
1457
|
var require_applicability = __commonJS({
|
|
1458
|
-
"
|
|
1458
|
+
"node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
|
|
1459
1459
|
"use strict";
|
|
1460
1460
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1461
1461
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
|
|
@@ -1476,9 +1476,9 @@ var require_applicability = __commonJS({
|
|
|
1476
1476
|
}
|
|
1477
1477
|
});
|
|
1478
1478
|
|
|
1479
|
-
//
|
|
1479
|
+
// node_modules/ajv/dist/compile/validate/dataType.js
|
|
1480
1480
|
var require_dataType = __commonJS({
|
|
1481
|
-
"
|
|
1481
|
+
"node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
|
|
1482
1482
|
"use strict";
|
|
1483
1483
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1484
1484
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
|
|
@@ -1660,9 +1660,9 @@ var require_dataType = __commonJS({
|
|
|
1660
1660
|
}
|
|
1661
1661
|
});
|
|
1662
1662
|
|
|
1663
|
-
//
|
|
1663
|
+
// node_modules/ajv/dist/compile/validate/defaults.js
|
|
1664
1664
|
var require_defaults = __commonJS({
|
|
1665
|
-
"
|
|
1665
|
+
"node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
|
|
1666
1666
|
"use strict";
|
|
1667
1667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1668
1668
|
exports.assignDefaults = void 0;
|
|
@@ -1697,9 +1697,9 @@ var require_defaults = __commonJS({
|
|
|
1697
1697
|
}
|
|
1698
1698
|
});
|
|
1699
1699
|
|
|
1700
|
-
//
|
|
1700
|
+
// node_modules/ajv/dist/vocabularies/code.js
|
|
1701
1701
|
var require_code2 = __commonJS({
|
|
1702
|
-
"
|
|
1702
|
+
"node_modules/ajv/dist/vocabularies/code.js"(exports) {
|
|
1703
1703
|
"use strict";
|
|
1704
1704
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1705
1705
|
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
|
|
@@ -1830,9 +1830,9 @@ var require_code2 = __commonJS({
|
|
|
1830
1830
|
}
|
|
1831
1831
|
});
|
|
1832
1832
|
|
|
1833
|
-
//
|
|
1833
|
+
// node_modules/ajv/dist/compile/validate/keyword.js
|
|
1834
1834
|
var require_keyword = __commonJS({
|
|
1835
|
-
"
|
|
1835
|
+
"node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
|
|
1836
1836
|
"use strict";
|
|
1837
1837
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1838
1838
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
|
|
@@ -1948,9 +1948,9 @@ var require_keyword = __commonJS({
|
|
|
1948
1948
|
}
|
|
1949
1949
|
});
|
|
1950
1950
|
|
|
1951
|
-
//
|
|
1951
|
+
// node_modules/ajv/dist/compile/validate/subschema.js
|
|
1952
1952
|
var require_subschema = __commonJS({
|
|
1953
|
-
"
|
|
1953
|
+
"node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
|
|
1954
1954
|
"use strict";
|
|
1955
1955
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1956
1956
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
|
|
@@ -2031,9 +2031,9 @@ var require_subschema = __commonJS({
|
|
|
2031
2031
|
}
|
|
2032
2032
|
});
|
|
2033
2033
|
|
|
2034
|
-
//
|
|
2034
|
+
// node_modules/fast-deep-equal/index.js
|
|
2035
2035
|
var require_fast_deep_equal = __commonJS({
|
|
2036
|
-
"
|
|
2036
|
+
"node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
2037
2037
|
"use strict";
|
|
2038
2038
|
module.exports = function equal(a, b) {
|
|
2039
2039
|
if (a === b) return true;
|
|
@@ -2066,9 +2066,9 @@ var require_fast_deep_equal = __commonJS({
|
|
|
2066
2066
|
}
|
|
2067
2067
|
});
|
|
2068
2068
|
|
|
2069
|
-
//
|
|
2069
|
+
// node_modules/json-schema-traverse/index.js
|
|
2070
2070
|
var require_json_schema_traverse = __commonJS({
|
|
2071
|
-
"
|
|
2071
|
+
"node_modules/json-schema-traverse/index.js"(exports, module) {
|
|
2072
2072
|
"use strict";
|
|
2073
2073
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
2074
2074
|
if (typeof opts == "function") {
|
|
@@ -2154,9 +2154,9 @@ var require_json_schema_traverse = __commonJS({
|
|
|
2154
2154
|
}
|
|
2155
2155
|
});
|
|
2156
2156
|
|
|
2157
|
-
//
|
|
2157
|
+
// node_modules/ajv/dist/compile/resolve.js
|
|
2158
2158
|
var require_resolve = __commonJS({
|
|
2159
|
-
"
|
|
2159
|
+
"node_modules/ajv/dist/compile/resolve.js"(exports) {
|
|
2160
2160
|
"use strict";
|
|
2161
2161
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2162
2162
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
|
|
@@ -2310,9 +2310,9 @@ var require_resolve = __commonJS({
|
|
|
2310
2310
|
}
|
|
2311
2311
|
});
|
|
2312
2312
|
|
|
2313
|
-
//
|
|
2313
|
+
// node_modules/ajv/dist/compile/validate/index.js
|
|
2314
2314
|
var require_validate = __commonJS({
|
|
2315
|
-
"
|
|
2315
|
+
"node_modules/ajv/dist/compile/validate/index.js"(exports) {
|
|
2316
2316
|
"use strict";
|
|
2317
2317
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2318
2318
|
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
|
|
@@ -2818,9 +2818,9 @@ var require_validate = __commonJS({
|
|
|
2818
2818
|
}
|
|
2819
2819
|
});
|
|
2820
2820
|
|
|
2821
|
-
//
|
|
2821
|
+
// node_modules/ajv/dist/runtime/validation_error.js
|
|
2822
2822
|
var require_validation_error = __commonJS({
|
|
2823
|
-
"
|
|
2823
|
+
"node_modules/ajv/dist/runtime/validation_error.js"(exports) {
|
|
2824
2824
|
"use strict";
|
|
2825
2825
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2826
2826
|
var ValidationError = class extends Error {
|
|
@@ -2834,9 +2834,9 @@ var require_validation_error = __commonJS({
|
|
|
2834
2834
|
}
|
|
2835
2835
|
});
|
|
2836
2836
|
|
|
2837
|
-
//
|
|
2837
|
+
// node_modules/ajv/dist/compile/ref_error.js
|
|
2838
2838
|
var require_ref_error = __commonJS({
|
|
2839
|
-
"
|
|
2839
|
+
"node_modules/ajv/dist/compile/ref_error.js"(exports) {
|
|
2840
2840
|
"use strict";
|
|
2841
2841
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2842
2842
|
var resolve_1 = require_resolve();
|
|
@@ -2851,9 +2851,9 @@ var require_ref_error = __commonJS({
|
|
|
2851
2851
|
}
|
|
2852
2852
|
});
|
|
2853
2853
|
|
|
2854
|
-
//
|
|
2854
|
+
// node_modules/ajv/dist/compile/index.js
|
|
2855
2855
|
var require_compile = __commonJS({
|
|
2856
|
-
"
|
|
2856
|
+
"node_modules/ajv/dist/compile/index.js"(exports) {
|
|
2857
2857
|
"use strict";
|
|
2858
2858
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2859
2859
|
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
|
|
@@ -3075,9 +3075,9 @@ var require_compile = __commonJS({
|
|
|
3075
3075
|
}
|
|
3076
3076
|
});
|
|
3077
3077
|
|
|
3078
|
-
//
|
|
3078
|
+
// node_modules/ajv/dist/refs/data.json
|
|
3079
3079
|
var require_data = __commonJS({
|
|
3080
|
-
"
|
|
3080
|
+
"node_modules/ajv/dist/refs/data.json"(exports, module) {
|
|
3081
3081
|
module.exports = {
|
|
3082
3082
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
3083
3083
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
@@ -3094,9 +3094,9 @@ var require_data = __commonJS({
|
|
|
3094
3094
|
}
|
|
3095
3095
|
});
|
|
3096
3096
|
|
|
3097
|
-
//
|
|
3097
|
+
// node_modules/fast-uri/lib/utils.js
|
|
3098
3098
|
var require_utils = __commonJS({
|
|
3099
|
-
"
|
|
3099
|
+
"node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
3100
3100
|
"use strict";
|
|
3101
3101
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3102
3102
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -3351,9 +3351,9 @@ var require_utils = __commonJS({
|
|
|
3351
3351
|
}
|
|
3352
3352
|
});
|
|
3353
3353
|
|
|
3354
|
-
//
|
|
3354
|
+
// node_modules/fast-uri/lib/schemes.js
|
|
3355
3355
|
var require_schemes = __commonJS({
|
|
3356
|
-
"
|
|
3356
|
+
"node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3357
3357
|
"use strict";
|
|
3358
3358
|
var { isUUID } = require_utils();
|
|
3359
3359
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -3561,9 +3561,9 @@ var require_schemes = __commonJS({
|
|
|
3561
3561
|
}
|
|
3562
3562
|
});
|
|
3563
3563
|
|
|
3564
|
-
//
|
|
3564
|
+
// node_modules/fast-uri/index.js
|
|
3565
3565
|
var require_fast_uri = __commonJS({
|
|
3566
|
-
"
|
|
3566
|
+
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3567
3567
|
"use strict";
|
|
3568
3568
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
3569
3569
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -3816,9 +3816,9 @@ var require_fast_uri = __commonJS({
|
|
|
3816
3816
|
}
|
|
3817
3817
|
});
|
|
3818
3818
|
|
|
3819
|
-
//
|
|
3819
|
+
// node_modules/ajv/dist/runtime/uri.js
|
|
3820
3820
|
var require_uri = __commonJS({
|
|
3821
|
-
"
|
|
3821
|
+
"node_modules/ajv/dist/runtime/uri.js"(exports) {
|
|
3822
3822
|
"use strict";
|
|
3823
3823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3824
3824
|
var uri = require_fast_uri();
|
|
@@ -3827,9 +3827,9 @@ var require_uri = __commonJS({
|
|
|
3827
3827
|
}
|
|
3828
3828
|
});
|
|
3829
3829
|
|
|
3830
|
-
//
|
|
3830
|
+
// node_modules/ajv/dist/core.js
|
|
3831
3831
|
var require_core = __commonJS({
|
|
3832
|
-
"
|
|
3832
|
+
"node_modules/ajv/dist/core.js"(exports) {
|
|
3833
3833
|
"use strict";
|
|
3834
3834
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3835
3835
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
@@ -4438,9 +4438,9 @@ var require_core = __commonJS({
|
|
|
4438
4438
|
}
|
|
4439
4439
|
});
|
|
4440
4440
|
|
|
4441
|
-
//
|
|
4441
|
+
// node_modules/ajv/dist/vocabularies/core/id.js
|
|
4442
4442
|
var require_id = __commonJS({
|
|
4443
|
-
"
|
|
4443
|
+
"node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
|
|
4444
4444
|
"use strict";
|
|
4445
4445
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4446
4446
|
var def = {
|
|
@@ -4453,9 +4453,9 @@ var require_id = __commonJS({
|
|
|
4453
4453
|
}
|
|
4454
4454
|
});
|
|
4455
4455
|
|
|
4456
|
-
//
|
|
4456
|
+
// node_modules/ajv/dist/vocabularies/core/ref.js
|
|
4457
4457
|
var require_ref = __commonJS({
|
|
4458
|
-
"
|
|
4458
|
+
"node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
|
|
4459
4459
|
"use strict";
|
|
4460
4460
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4461
4461
|
exports.callRef = exports.getValidate = void 0;
|
|
@@ -4575,9 +4575,9 @@ var require_ref = __commonJS({
|
|
|
4575
4575
|
}
|
|
4576
4576
|
});
|
|
4577
4577
|
|
|
4578
|
-
//
|
|
4578
|
+
// node_modules/ajv/dist/vocabularies/core/index.js
|
|
4579
4579
|
var require_core2 = __commonJS({
|
|
4580
|
-
"
|
|
4580
|
+
"node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
|
|
4581
4581
|
"use strict";
|
|
4582
4582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4583
4583
|
var id_1 = require_id();
|
|
@@ -4596,9 +4596,9 @@ var require_core2 = __commonJS({
|
|
|
4596
4596
|
}
|
|
4597
4597
|
});
|
|
4598
4598
|
|
|
4599
|
-
//
|
|
4599
|
+
// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4600
4600
|
var require_limitNumber = __commonJS({
|
|
4601
|
-
"
|
|
4601
|
+
"node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
|
|
4602
4602
|
"use strict";
|
|
4603
4603
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4604
4604
|
var codegen_1 = require_codegen();
|
|
@@ -4628,9 +4628,9 @@ var require_limitNumber = __commonJS({
|
|
|
4628
4628
|
}
|
|
4629
4629
|
});
|
|
4630
4630
|
|
|
4631
|
-
//
|
|
4631
|
+
// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4632
4632
|
var require_multipleOf = __commonJS({
|
|
4633
|
-
"
|
|
4633
|
+
"node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
|
|
4634
4634
|
"use strict";
|
|
4635
4635
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4636
4636
|
var codegen_1 = require_codegen();
|
|
@@ -4656,9 +4656,9 @@ var require_multipleOf = __commonJS({
|
|
|
4656
4656
|
}
|
|
4657
4657
|
});
|
|
4658
4658
|
|
|
4659
|
-
//
|
|
4659
|
+
// node_modules/ajv/dist/runtime/ucs2length.js
|
|
4660
4660
|
var require_ucs2length = __commonJS({
|
|
4661
|
-
"
|
|
4661
|
+
"node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
|
|
4662
4662
|
"use strict";
|
|
4663
4663
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4664
4664
|
function ucs2length(str) {
|
|
@@ -4682,9 +4682,9 @@ var require_ucs2length = __commonJS({
|
|
|
4682
4682
|
}
|
|
4683
4683
|
});
|
|
4684
4684
|
|
|
4685
|
-
//
|
|
4685
|
+
// node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
4686
4686
|
var require_limitLength = __commonJS({
|
|
4687
|
-
"
|
|
4687
|
+
"node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
|
|
4688
4688
|
"use strict";
|
|
4689
4689
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4690
4690
|
var codegen_1 = require_codegen();
|
|
@@ -4714,12 +4714,13 @@ var require_limitLength = __commonJS({
|
|
|
4714
4714
|
}
|
|
4715
4715
|
});
|
|
4716
4716
|
|
|
4717
|
-
//
|
|
4717
|
+
// node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
4718
4718
|
var require_pattern = __commonJS({
|
|
4719
|
-
"
|
|
4719
|
+
"node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
|
|
4720
4720
|
"use strict";
|
|
4721
4721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4722
4722
|
var code_1 = require_code2();
|
|
4723
|
+
var util_1 = require_util();
|
|
4723
4724
|
var codegen_1 = require_codegen();
|
|
4724
4725
|
var error = {
|
|
4725
4726
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -4732,19 +4733,27 @@ var require_pattern = __commonJS({
|
|
|
4732
4733
|
$data: true,
|
|
4733
4734
|
error,
|
|
4734
4735
|
code(cxt) {
|
|
4735
|
-
const { data, $data, schema, schemaCode, it } = cxt;
|
|
4736
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4736
4737
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
4737
|
-
|
|
4738
|
-
|
|
4738
|
+
if ($data) {
|
|
4739
|
+
const { regExp } = it.opts.code;
|
|
4740
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
4741
|
+
const valid = gen.let("valid");
|
|
4742
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
4743
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
4744
|
+
} else {
|
|
4745
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
4746
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
4747
|
+
}
|
|
4739
4748
|
}
|
|
4740
4749
|
};
|
|
4741
4750
|
exports.default = def;
|
|
4742
4751
|
}
|
|
4743
4752
|
});
|
|
4744
4753
|
|
|
4745
|
-
//
|
|
4754
|
+
// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4746
4755
|
var require_limitProperties = __commonJS({
|
|
4747
|
-
"
|
|
4756
|
+
"node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
|
|
4748
4757
|
"use strict";
|
|
4749
4758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4750
4759
|
var codegen_1 = require_codegen();
|
|
@@ -4771,9 +4780,9 @@ var require_limitProperties = __commonJS({
|
|
|
4771
4780
|
}
|
|
4772
4781
|
});
|
|
4773
4782
|
|
|
4774
|
-
//
|
|
4783
|
+
// node_modules/ajv/dist/vocabularies/validation/required.js
|
|
4775
4784
|
var require_required = __commonJS({
|
|
4776
|
-
"
|
|
4785
|
+
"node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
|
|
4777
4786
|
"use strict";
|
|
4778
4787
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4779
4788
|
var code_1 = require_code2();
|
|
@@ -4853,9 +4862,9 @@ var require_required = __commonJS({
|
|
|
4853
4862
|
}
|
|
4854
4863
|
});
|
|
4855
4864
|
|
|
4856
|
-
//
|
|
4865
|
+
// node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4857
4866
|
var require_limitItems = __commonJS({
|
|
4858
|
-
"
|
|
4867
|
+
"node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
|
|
4859
4868
|
"use strict";
|
|
4860
4869
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4861
4870
|
var codegen_1 = require_codegen();
|
|
@@ -4882,9 +4891,9 @@ var require_limitItems = __commonJS({
|
|
|
4882
4891
|
}
|
|
4883
4892
|
});
|
|
4884
4893
|
|
|
4885
|
-
//
|
|
4894
|
+
// node_modules/ajv/dist/runtime/equal.js
|
|
4886
4895
|
var require_equal = __commonJS({
|
|
4887
|
-
"
|
|
4896
|
+
"node_modules/ajv/dist/runtime/equal.js"(exports) {
|
|
4888
4897
|
"use strict";
|
|
4889
4898
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4890
4899
|
var equal = require_fast_deep_equal();
|
|
@@ -4893,9 +4902,9 @@ var require_equal = __commonJS({
|
|
|
4893
4902
|
}
|
|
4894
4903
|
});
|
|
4895
4904
|
|
|
4896
|
-
//
|
|
4905
|
+
// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
4897
4906
|
var require_uniqueItems = __commonJS({
|
|
4898
|
-
"
|
|
4907
|
+
"node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
|
|
4899
4908
|
"use strict";
|
|
4900
4909
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4901
4910
|
var dataType_1 = require_dataType();
|
|
@@ -4960,9 +4969,9 @@ var require_uniqueItems = __commonJS({
|
|
|
4960
4969
|
}
|
|
4961
4970
|
});
|
|
4962
4971
|
|
|
4963
|
-
//
|
|
4972
|
+
// node_modules/ajv/dist/vocabularies/validation/const.js
|
|
4964
4973
|
var require_const = __commonJS({
|
|
4965
|
-
"
|
|
4974
|
+
"node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
|
|
4966
4975
|
"use strict";
|
|
4967
4976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4968
4977
|
var codegen_1 = require_codegen();
|
|
@@ -4989,9 +4998,9 @@ var require_const = __commonJS({
|
|
|
4989
4998
|
}
|
|
4990
4999
|
});
|
|
4991
5000
|
|
|
4992
|
-
//
|
|
5001
|
+
// node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
4993
5002
|
var require_enum = __commonJS({
|
|
4994
|
-
"
|
|
5003
|
+
"node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
|
|
4995
5004
|
"use strict";
|
|
4996
5005
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4997
5006
|
var codegen_1 = require_codegen();
|
|
@@ -5038,9 +5047,9 @@ var require_enum = __commonJS({
|
|
|
5038
5047
|
}
|
|
5039
5048
|
});
|
|
5040
5049
|
|
|
5041
|
-
//
|
|
5050
|
+
// node_modules/ajv/dist/vocabularies/validation/index.js
|
|
5042
5051
|
var require_validation = __commonJS({
|
|
5043
|
-
"
|
|
5052
|
+
"node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
|
|
5044
5053
|
"use strict";
|
|
5045
5054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5046
5055
|
var limitNumber_1 = require_limitNumber();
|
|
@@ -5076,9 +5085,9 @@ var require_validation = __commonJS({
|
|
|
5076
5085
|
}
|
|
5077
5086
|
});
|
|
5078
5087
|
|
|
5079
|
-
//
|
|
5088
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
5080
5089
|
var require_additionalItems = __commonJS({
|
|
5081
|
-
"
|
|
5090
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
|
|
5082
5091
|
"use strict";
|
|
5083
5092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5084
5093
|
exports.validateAdditionalItems = void 0;
|
|
@@ -5129,9 +5138,9 @@ var require_additionalItems = __commonJS({
|
|
|
5129
5138
|
}
|
|
5130
5139
|
});
|
|
5131
5140
|
|
|
5132
|
-
//
|
|
5141
|
+
// node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
5133
5142
|
var require_items = __commonJS({
|
|
5134
|
-
"
|
|
5143
|
+
"node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
|
|
5135
5144
|
"use strict";
|
|
5136
5145
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5137
5146
|
exports.validateTuple = void 0;
|
|
@@ -5186,9 +5195,9 @@ var require_items = __commonJS({
|
|
|
5186
5195
|
}
|
|
5187
5196
|
});
|
|
5188
5197
|
|
|
5189
|
-
//
|
|
5198
|
+
// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
5190
5199
|
var require_prefixItems = __commonJS({
|
|
5191
|
-
"
|
|
5200
|
+
"node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
|
|
5192
5201
|
"use strict";
|
|
5193
5202
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5194
5203
|
var items_1 = require_items();
|
|
@@ -5203,9 +5212,9 @@ var require_prefixItems = __commonJS({
|
|
|
5203
5212
|
}
|
|
5204
5213
|
});
|
|
5205
5214
|
|
|
5206
|
-
//
|
|
5215
|
+
// node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
5207
5216
|
var require_items2020 = __commonJS({
|
|
5208
|
-
"
|
|
5217
|
+
"node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
|
|
5209
5218
|
"use strict";
|
|
5210
5219
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5211
5220
|
var codegen_1 = require_codegen();
|
|
@@ -5238,9 +5247,9 @@ var require_items2020 = __commonJS({
|
|
|
5238
5247
|
}
|
|
5239
5248
|
});
|
|
5240
5249
|
|
|
5241
|
-
//
|
|
5250
|
+
// node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
5242
5251
|
var require_contains = __commonJS({
|
|
5243
|
-
"
|
|
5252
|
+
"node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
|
|
5244
5253
|
"use strict";
|
|
5245
5254
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5246
5255
|
var codegen_1 = require_codegen();
|
|
@@ -5332,9 +5341,9 @@ var require_contains = __commonJS({
|
|
|
5332
5341
|
}
|
|
5333
5342
|
});
|
|
5334
5343
|
|
|
5335
|
-
//
|
|
5344
|
+
// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
5336
5345
|
var require_dependencies = __commonJS({
|
|
5337
|
-
"
|
|
5346
|
+
"node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
|
|
5338
5347
|
"use strict";
|
|
5339
5348
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5340
5349
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
@@ -5426,9 +5435,9 @@ var require_dependencies = __commonJS({
|
|
|
5426
5435
|
}
|
|
5427
5436
|
});
|
|
5428
5437
|
|
|
5429
|
-
//
|
|
5438
|
+
// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
5430
5439
|
var require_propertyNames = __commonJS({
|
|
5431
|
-
"
|
|
5440
|
+
"node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
|
|
5432
5441
|
"use strict";
|
|
5433
5442
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5434
5443
|
var codegen_1 = require_codegen();
|
|
@@ -5469,9 +5478,9 @@ var require_propertyNames = __commonJS({
|
|
|
5469
5478
|
}
|
|
5470
5479
|
});
|
|
5471
5480
|
|
|
5472
|
-
//
|
|
5481
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
5473
5482
|
var require_additionalProperties = __commonJS({
|
|
5474
|
-
"
|
|
5483
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
|
|
5475
5484
|
"use strict";
|
|
5476
5485
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5477
5486
|
var code_1 = require_code2();
|
|
@@ -5575,9 +5584,9 @@ var require_additionalProperties = __commonJS({
|
|
|
5575
5584
|
}
|
|
5576
5585
|
});
|
|
5577
5586
|
|
|
5578
|
-
//
|
|
5587
|
+
// node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
5579
5588
|
var require_properties = __commonJS({
|
|
5580
|
-
"
|
|
5589
|
+
"node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
|
|
5581
5590
|
"use strict";
|
|
5582
5591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5583
5592
|
var validate_1 = require_validate();
|
|
@@ -5633,9 +5642,9 @@ var require_properties = __commonJS({
|
|
|
5633
5642
|
}
|
|
5634
5643
|
});
|
|
5635
5644
|
|
|
5636
|
-
//
|
|
5645
|
+
// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
5637
5646
|
var require_patternProperties = __commonJS({
|
|
5638
|
-
"
|
|
5647
|
+
"node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
|
|
5639
5648
|
"use strict";
|
|
5640
5649
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5641
5650
|
var code_1 = require_code2();
|
|
@@ -5707,9 +5716,9 @@ var require_patternProperties = __commonJS({
|
|
|
5707
5716
|
}
|
|
5708
5717
|
});
|
|
5709
5718
|
|
|
5710
|
-
//
|
|
5719
|
+
// node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
5711
5720
|
var require_not = __commonJS({
|
|
5712
|
-
"
|
|
5721
|
+
"node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
|
|
5713
5722
|
"use strict";
|
|
5714
5723
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5715
5724
|
var util_1 = require_util();
|
|
@@ -5738,9 +5747,9 @@ var require_not = __commonJS({
|
|
|
5738
5747
|
}
|
|
5739
5748
|
});
|
|
5740
5749
|
|
|
5741
|
-
//
|
|
5750
|
+
// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
5742
5751
|
var require_anyOf = __commonJS({
|
|
5743
|
-
"
|
|
5752
|
+
"node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
|
|
5744
5753
|
"use strict";
|
|
5745
5754
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5746
5755
|
var code_1 = require_code2();
|
|
@@ -5755,9 +5764,9 @@ var require_anyOf = __commonJS({
|
|
|
5755
5764
|
}
|
|
5756
5765
|
});
|
|
5757
5766
|
|
|
5758
|
-
//
|
|
5767
|
+
// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
5759
5768
|
var require_oneOf = __commonJS({
|
|
5760
|
-
"
|
|
5769
|
+
"node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
|
|
5761
5770
|
"use strict";
|
|
5762
5771
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5763
5772
|
var codegen_1 = require_codegen();
|
|
@@ -5813,9 +5822,9 @@ var require_oneOf = __commonJS({
|
|
|
5813
5822
|
}
|
|
5814
5823
|
});
|
|
5815
5824
|
|
|
5816
|
-
//
|
|
5825
|
+
// node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
5817
5826
|
var require_allOf = __commonJS({
|
|
5818
|
-
"
|
|
5827
|
+
"node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
|
|
5819
5828
|
"use strict";
|
|
5820
5829
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5821
5830
|
var util_1 = require_util();
|
|
@@ -5840,9 +5849,9 @@ var require_allOf = __commonJS({
|
|
|
5840
5849
|
}
|
|
5841
5850
|
});
|
|
5842
5851
|
|
|
5843
|
-
//
|
|
5852
|
+
// node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
5844
5853
|
var require_if = __commonJS({
|
|
5845
|
-
"
|
|
5854
|
+
"node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
|
|
5846
5855
|
"use strict";
|
|
5847
5856
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5848
5857
|
var codegen_1 = require_codegen();
|
|
@@ -5909,9 +5918,9 @@ var require_if = __commonJS({
|
|
|
5909
5918
|
}
|
|
5910
5919
|
});
|
|
5911
5920
|
|
|
5912
|
-
//
|
|
5921
|
+
// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
5913
5922
|
var require_thenElse = __commonJS({
|
|
5914
|
-
"
|
|
5923
|
+
"node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
|
|
5915
5924
|
"use strict";
|
|
5916
5925
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5917
5926
|
var util_1 = require_util();
|
|
@@ -5927,9 +5936,9 @@ var require_thenElse = __commonJS({
|
|
|
5927
5936
|
}
|
|
5928
5937
|
});
|
|
5929
5938
|
|
|
5930
|
-
//
|
|
5939
|
+
// node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
5931
5940
|
var require_applicator = __commonJS({
|
|
5932
|
-
"
|
|
5941
|
+
"node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
|
|
5933
5942
|
"use strict";
|
|
5934
5943
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5935
5944
|
var additionalItems_1 = require_additionalItems();
|
|
@@ -5975,9 +5984,9 @@ var require_applicator = __commonJS({
|
|
|
5975
5984
|
}
|
|
5976
5985
|
});
|
|
5977
5986
|
|
|
5978
|
-
//
|
|
5987
|
+
// node_modules/ajv/dist/vocabularies/format/format.js
|
|
5979
5988
|
var require_format = __commonJS({
|
|
5980
|
-
"
|
|
5989
|
+
"node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
|
|
5981
5990
|
"use strict";
|
|
5982
5991
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5983
5992
|
var codegen_1 = require_codegen();
|
|
@@ -6065,9 +6074,9 @@ var require_format = __commonJS({
|
|
|
6065
6074
|
}
|
|
6066
6075
|
});
|
|
6067
6076
|
|
|
6068
|
-
//
|
|
6077
|
+
// node_modules/ajv/dist/vocabularies/format/index.js
|
|
6069
6078
|
var require_format2 = __commonJS({
|
|
6070
|
-
"
|
|
6079
|
+
"node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
|
|
6071
6080
|
"use strict";
|
|
6072
6081
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6073
6082
|
var format_1 = require_format();
|
|
@@ -6076,9 +6085,9 @@ var require_format2 = __commonJS({
|
|
|
6076
6085
|
}
|
|
6077
6086
|
});
|
|
6078
6087
|
|
|
6079
|
-
//
|
|
6088
|
+
// node_modules/ajv/dist/vocabularies/metadata.js
|
|
6080
6089
|
var require_metadata = __commonJS({
|
|
6081
|
-
"
|
|
6090
|
+
"node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
|
|
6082
6091
|
"use strict";
|
|
6083
6092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6084
6093
|
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
@@ -6099,9 +6108,9 @@ var require_metadata = __commonJS({
|
|
|
6099
6108
|
}
|
|
6100
6109
|
});
|
|
6101
6110
|
|
|
6102
|
-
//
|
|
6111
|
+
// node_modules/ajv/dist/vocabularies/draft7.js
|
|
6103
6112
|
var require_draft7 = __commonJS({
|
|
6104
|
-
"
|
|
6113
|
+
"node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
|
|
6105
6114
|
"use strict";
|
|
6106
6115
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6107
6116
|
var core_1 = require_core2();
|
|
@@ -6121,9 +6130,9 @@ var require_draft7 = __commonJS({
|
|
|
6121
6130
|
}
|
|
6122
6131
|
});
|
|
6123
6132
|
|
|
6124
|
-
//
|
|
6133
|
+
// node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
6125
6134
|
var require_types = __commonJS({
|
|
6126
|
-
"
|
|
6135
|
+
"node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
|
|
6127
6136
|
"use strict";
|
|
6128
6137
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6129
6138
|
exports.DiscrError = void 0;
|
|
@@ -6135,9 +6144,9 @@ var require_types = __commonJS({
|
|
|
6135
6144
|
}
|
|
6136
6145
|
});
|
|
6137
6146
|
|
|
6138
|
-
//
|
|
6147
|
+
// node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
6139
6148
|
var require_discriminator = __commonJS({
|
|
6140
|
-
"
|
|
6149
|
+
"node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
|
|
6141
6150
|
"use strict";
|
|
6142
6151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6143
6152
|
var codegen_1 = require_codegen();
|
|
@@ -6240,9 +6249,9 @@ var require_discriminator = __commonJS({
|
|
|
6240
6249
|
}
|
|
6241
6250
|
});
|
|
6242
6251
|
|
|
6243
|
-
//
|
|
6252
|
+
// node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
6244
6253
|
var require_json_schema_draft_07 = __commonJS({
|
|
6245
|
-
"
|
|
6254
|
+
"node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
|
|
6246
6255
|
module.exports = {
|
|
6247
6256
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6248
6257
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
@@ -6397,9 +6406,9 @@ var require_json_schema_draft_07 = __commonJS({
|
|
|
6397
6406
|
}
|
|
6398
6407
|
});
|
|
6399
6408
|
|
|
6400
|
-
//
|
|
6409
|
+
// node_modules/ajv/dist/ajv.js
|
|
6401
6410
|
var require_ajv = __commonJS({
|
|
6402
|
-
"
|
|
6411
|
+
"node_modules/ajv/dist/ajv.js"(exports, module) {
|
|
6403
6412
|
"use strict";
|
|
6404
6413
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6405
6414
|
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
@@ -6467,9 +6476,9 @@ var require_ajv = __commonJS({
|
|
|
6467
6476
|
}
|
|
6468
6477
|
});
|
|
6469
6478
|
|
|
6470
|
-
//
|
|
6479
|
+
// node_modules/ajv-formats/dist/formats.js
|
|
6471
6480
|
var require_formats = __commonJS({
|
|
6472
|
-
"
|
|
6481
|
+
"node_modules/ajv-formats/dist/formats.js"(exports) {
|
|
6473
6482
|
"use strict";
|
|
6474
6483
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6475
6484
|
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
@@ -6670,9 +6679,9 @@ var require_formats = __commonJS({
|
|
|
6670
6679
|
}
|
|
6671
6680
|
});
|
|
6672
6681
|
|
|
6673
|
-
//
|
|
6682
|
+
// node_modules/ajv-formats/dist/limit.js
|
|
6674
6683
|
var require_limit = __commonJS({
|
|
6675
|
-
"
|
|
6684
|
+
"node_modules/ajv-formats/dist/limit.js"(exports) {
|
|
6676
6685
|
"use strict";
|
|
6677
6686
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6678
6687
|
exports.formatLimitDefinition = void 0;
|
|
@@ -6742,9 +6751,9 @@ var require_limit = __commonJS({
|
|
|
6742
6751
|
}
|
|
6743
6752
|
});
|
|
6744
6753
|
|
|
6745
|
-
//
|
|
6754
|
+
// node_modules/ajv-formats/dist/index.js
|
|
6746
6755
|
var require_dist = __commonJS({
|
|
6747
|
-
"
|
|
6756
|
+
"node_modules/ajv-formats/dist/index.js"(exports, module) {
|
|
6748
6757
|
"use strict";
|
|
6749
6758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6750
6759
|
var formats_1 = require_formats();
|
|
@@ -6789,7 +6798,7 @@ import { randomUUID } from "crypto";
|
|
|
6789
6798
|
import path2 from "path";
|
|
6790
6799
|
import { fileURLToPath } from "url";
|
|
6791
6800
|
|
|
6792
|
-
//
|
|
6801
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
6793
6802
|
import * as z3rt from "zod/v3";
|
|
6794
6803
|
import * as z4mini from "zod/v4-mini";
|
|
6795
6804
|
function isZ4Schema(s) {
|
|
@@ -6935,7 +6944,7 @@ function getLiteralValue(schema) {
|
|
|
6935
6944
|
return void 0;
|
|
6936
6945
|
}
|
|
6937
6946
|
|
|
6938
|
-
//
|
|
6947
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
6939
6948
|
import * as z from "zod/v4";
|
|
6940
6949
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
6941
6950
|
var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
|
|
@@ -8456,15 +8465,15 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
8456
8465
|
}
|
|
8457
8466
|
};
|
|
8458
8467
|
|
|
8459
|
-
//
|
|
8468
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
8460
8469
|
function isTerminal(status) {
|
|
8461
8470
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
8462
8471
|
}
|
|
8463
8472
|
|
|
8464
|
-
//
|
|
8473
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
8465
8474
|
import * as z4mini2 from "zod/v4-mini";
|
|
8466
8475
|
|
|
8467
|
-
//
|
|
8476
|
+
// node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
8468
8477
|
var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
8469
8478
|
var defaultOptions = {
|
|
8470
8479
|
name: void 0,
|
|
@@ -8498,7 +8507,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
8498
8507
|
...options
|
|
8499
8508
|
};
|
|
8500
8509
|
|
|
8501
|
-
//
|
|
8510
|
+
// node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
8502
8511
|
var getRefs = (options) => {
|
|
8503
8512
|
const _options = getDefaultOptions(options);
|
|
8504
8513
|
const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
@@ -8519,7 +8528,7 @@ var getRefs = (options) => {
|
|
|
8519
8528
|
};
|
|
8520
8529
|
};
|
|
8521
8530
|
|
|
8522
|
-
//
|
|
8531
|
+
// node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
8523
8532
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
8524
8533
|
if (!refs?.errorMessages)
|
|
8525
8534
|
return;
|
|
@@ -8535,7 +8544,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
8535
8544
|
addErrorMessage(res, key, errorMessage, refs);
|
|
8536
8545
|
}
|
|
8537
8546
|
|
|
8538
|
-
//
|
|
8547
|
+
// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
8539
8548
|
var getRelativePath = (pathA, pathB) => {
|
|
8540
8549
|
let i = 0;
|
|
8541
8550
|
for (; i < pathA.length && i < pathB.length; i++) {
|
|
@@ -8545,10 +8554,10 @@ var getRelativePath = (pathA, pathB) => {
|
|
|
8545
8554
|
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
8546
8555
|
};
|
|
8547
8556
|
|
|
8548
|
-
//
|
|
8557
|
+
// node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
8549
8558
|
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind3 } from "zod/v3";
|
|
8550
8559
|
|
|
8551
|
-
//
|
|
8560
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
8552
8561
|
function parseAnyDef(refs) {
|
|
8553
8562
|
if (refs.target !== "openAi") {
|
|
8554
8563
|
return {};
|
|
@@ -8564,7 +8573,7 @@ function parseAnyDef(refs) {
|
|
|
8564
8573
|
};
|
|
8565
8574
|
}
|
|
8566
8575
|
|
|
8567
|
-
//
|
|
8576
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
8568
8577
|
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
8569
8578
|
function parseArrayDef(def, refs) {
|
|
8570
8579
|
const res = {
|
|
@@ -8589,7 +8598,7 @@ function parseArrayDef(def, refs) {
|
|
|
8589
8598
|
return res;
|
|
8590
8599
|
}
|
|
8591
8600
|
|
|
8592
|
-
//
|
|
8601
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
8593
8602
|
function parseBigintDef(def, refs) {
|
|
8594
8603
|
const res = {
|
|
8595
8604
|
type: "integer",
|
|
@@ -8635,24 +8644,24 @@ function parseBigintDef(def, refs) {
|
|
|
8635
8644
|
return res;
|
|
8636
8645
|
}
|
|
8637
8646
|
|
|
8638
|
-
//
|
|
8647
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
8639
8648
|
function parseBooleanDef() {
|
|
8640
8649
|
return {
|
|
8641
8650
|
type: "boolean"
|
|
8642
8651
|
};
|
|
8643
8652
|
}
|
|
8644
8653
|
|
|
8645
|
-
//
|
|
8654
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
8646
8655
|
function parseBrandedDef(_def, refs) {
|
|
8647
8656
|
return parseDef(_def.type._def, refs);
|
|
8648
8657
|
}
|
|
8649
8658
|
|
|
8650
|
-
//
|
|
8659
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
8651
8660
|
var parseCatchDef = (def, refs) => {
|
|
8652
8661
|
return parseDef(def.innerType._def, refs);
|
|
8653
8662
|
};
|
|
8654
8663
|
|
|
8655
|
-
//
|
|
8664
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
8656
8665
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
8657
8666
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
8658
8667
|
if (Array.isArray(strategy)) {
|
|
@@ -8711,7 +8720,7 @@ var integerDateParser = (def, refs) => {
|
|
|
8711
8720
|
return res;
|
|
8712
8721
|
};
|
|
8713
8722
|
|
|
8714
|
-
//
|
|
8723
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
8715
8724
|
function parseDefaultDef(_def, refs) {
|
|
8716
8725
|
return {
|
|
8717
8726
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -8719,12 +8728,12 @@ function parseDefaultDef(_def, refs) {
|
|
|
8719
8728
|
};
|
|
8720
8729
|
}
|
|
8721
8730
|
|
|
8722
|
-
//
|
|
8731
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
8723
8732
|
function parseEffectsDef(_def, refs) {
|
|
8724
8733
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
8725
8734
|
}
|
|
8726
8735
|
|
|
8727
|
-
//
|
|
8736
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
8728
8737
|
function parseEnumDef(def) {
|
|
8729
8738
|
return {
|
|
8730
8739
|
type: "string",
|
|
@@ -8732,7 +8741,7 @@ function parseEnumDef(def) {
|
|
|
8732
8741
|
};
|
|
8733
8742
|
}
|
|
8734
8743
|
|
|
8735
|
-
//
|
|
8744
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
8736
8745
|
var isJsonSchema7AllOfType = (type) => {
|
|
8737
8746
|
if ("type" in type && type.type === "string")
|
|
8738
8747
|
return false;
|
|
@@ -8774,7 +8783,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
8774
8783
|
} : void 0;
|
|
8775
8784
|
}
|
|
8776
8785
|
|
|
8777
|
-
//
|
|
8786
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
8778
8787
|
function parseLiteralDef(def, refs) {
|
|
8779
8788
|
const parsedType = typeof def.value;
|
|
8780
8789
|
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
|
|
@@ -8794,10 +8803,10 @@ function parseLiteralDef(def, refs) {
|
|
|
8794
8803
|
};
|
|
8795
8804
|
}
|
|
8796
8805
|
|
|
8797
|
-
//
|
|
8806
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
8798
8807
|
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind2 } from "zod/v3";
|
|
8799
8808
|
|
|
8800
|
-
//
|
|
8809
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
8801
8810
|
var emojiRegex = void 0;
|
|
8802
8811
|
var zodPatterns = {
|
|
8803
8812
|
/**
|
|
@@ -9122,7 +9131,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
9122
9131
|
return pattern;
|
|
9123
9132
|
}
|
|
9124
9133
|
|
|
9125
|
-
//
|
|
9134
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
9126
9135
|
function parseRecordDef(def, refs) {
|
|
9127
9136
|
if (refs.target === "openAi") {
|
|
9128
9137
|
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
@@ -9174,7 +9183,7 @@ function parseRecordDef(def, refs) {
|
|
|
9174
9183
|
return schema;
|
|
9175
9184
|
}
|
|
9176
9185
|
|
|
9177
|
-
//
|
|
9186
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
9178
9187
|
function parseMapDef(def, refs) {
|
|
9179
9188
|
if (refs.mapStrategy === "record") {
|
|
9180
9189
|
return parseRecordDef(def, refs);
|
|
@@ -9199,7 +9208,7 @@ function parseMapDef(def, refs) {
|
|
|
9199
9208
|
};
|
|
9200
9209
|
}
|
|
9201
9210
|
|
|
9202
|
-
//
|
|
9211
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
9203
9212
|
function parseNativeEnumDef(def) {
|
|
9204
9213
|
const object4 = def.values;
|
|
9205
9214
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -9213,7 +9222,7 @@ function parseNativeEnumDef(def) {
|
|
|
9213
9222
|
};
|
|
9214
9223
|
}
|
|
9215
9224
|
|
|
9216
|
-
//
|
|
9225
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
9217
9226
|
function parseNeverDef(refs) {
|
|
9218
9227
|
return refs.target === "openAi" ? void 0 : {
|
|
9219
9228
|
not: parseAnyDef({
|
|
@@ -9223,7 +9232,7 @@ function parseNeverDef(refs) {
|
|
|
9223
9232
|
};
|
|
9224
9233
|
}
|
|
9225
9234
|
|
|
9226
|
-
//
|
|
9235
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
9227
9236
|
function parseNullDef(refs) {
|
|
9228
9237
|
return refs.target === "openApi3" ? {
|
|
9229
9238
|
enum: ["null"],
|
|
@@ -9233,7 +9242,7 @@ function parseNullDef(refs) {
|
|
|
9233
9242
|
};
|
|
9234
9243
|
}
|
|
9235
9244
|
|
|
9236
|
-
//
|
|
9245
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
9237
9246
|
var primitiveMappings = {
|
|
9238
9247
|
ZodString: "string",
|
|
9239
9248
|
ZodNumber: "number",
|
|
@@ -9301,7 +9310,7 @@ var asAnyOf = (def, refs) => {
|
|
|
9301
9310
|
return anyOf.length ? { anyOf } : void 0;
|
|
9302
9311
|
};
|
|
9303
9312
|
|
|
9304
|
-
//
|
|
9313
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
9305
9314
|
function parseNullableDef(def, refs) {
|
|
9306
9315
|
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
9307
9316
|
if (refs.target === "openApi3") {
|
|
@@ -9333,7 +9342,7 @@ function parseNullableDef(def, refs) {
|
|
|
9333
9342
|
return base && { anyOf: [base, { type: "null" }] };
|
|
9334
9343
|
}
|
|
9335
9344
|
|
|
9336
|
-
//
|
|
9345
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
9337
9346
|
function parseNumberDef(def, refs) {
|
|
9338
9347
|
const res = {
|
|
9339
9348
|
type: "number"
|
|
@@ -9382,7 +9391,7 @@ function parseNumberDef(def, refs) {
|
|
|
9382
9391
|
return res;
|
|
9383
9392
|
}
|
|
9384
9393
|
|
|
9385
|
-
//
|
|
9394
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
9386
9395
|
function parseObjectDef(def, refs) {
|
|
9387
9396
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
9388
9397
|
const result = {
|
|
@@ -9452,7 +9461,7 @@ function safeIsOptional(schema) {
|
|
|
9452
9461
|
}
|
|
9453
9462
|
}
|
|
9454
9463
|
|
|
9455
|
-
//
|
|
9464
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
9456
9465
|
var parseOptionalDef = (def, refs) => {
|
|
9457
9466
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
9458
9467
|
return parseDef(def.innerType._def, refs);
|
|
@@ -9471,7 +9480,7 @@ var parseOptionalDef = (def, refs) => {
|
|
|
9471
9480
|
} : parseAnyDef(refs);
|
|
9472
9481
|
};
|
|
9473
9482
|
|
|
9474
|
-
//
|
|
9483
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
9475
9484
|
var parsePipelineDef = (def, refs) => {
|
|
9476
9485
|
if (refs.pipeStrategy === "input") {
|
|
9477
9486
|
return parseDef(def.in._def, refs);
|
|
@@ -9491,12 +9500,12 @@ var parsePipelineDef = (def, refs) => {
|
|
|
9491
9500
|
};
|
|
9492
9501
|
};
|
|
9493
9502
|
|
|
9494
|
-
//
|
|
9503
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
9495
9504
|
function parsePromiseDef(def, refs) {
|
|
9496
9505
|
return parseDef(def.type._def, refs);
|
|
9497
9506
|
}
|
|
9498
9507
|
|
|
9499
|
-
//
|
|
9508
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
9500
9509
|
function parseSetDef(def, refs) {
|
|
9501
9510
|
const items = parseDef(def.valueType._def, {
|
|
9502
9511
|
...refs,
|
|
@@ -9516,7 +9525,7 @@ function parseSetDef(def, refs) {
|
|
|
9516
9525
|
return schema;
|
|
9517
9526
|
}
|
|
9518
9527
|
|
|
9519
|
-
//
|
|
9528
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
9520
9529
|
function parseTupleDef(def, refs) {
|
|
9521
9530
|
if (def.rest) {
|
|
9522
9531
|
return {
|
|
@@ -9544,24 +9553,24 @@ function parseTupleDef(def, refs) {
|
|
|
9544
9553
|
}
|
|
9545
9554
|
}
|
|
9546
9555
|
|
|
9547
|
-
//
|
|
9556
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
9548
9557
|
function parseUndefinedDef(refs) {
|
|
9549
9558
|
return {
|
|
9550
9559
|
not: parseAnyDef(refs)
|
|
9551
9560
|
};
|
|
9552
9561
|
}
|
|
9553
9562
|
|
|
9554
|
-
//
|
|
9563
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
9555
9564
|
function parseUnknownDef(refs) {
|
|
9556
9565
|
return parseAnyDef(refs);
|
|
9557
9566
|
}
|
|
9558
9567
|
|
|
9559
|
-
//
|
|
9568
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
9560
9569
|
var parseReadonlyDef = (def, refs) => {
|
|
9561
9570
|
return parseDef(def.innerType._def, refs);
|
|
9562
9571
|
};
|
|
9563
9572
|
|
|
9564
|
-
//
|
|
9573
|
+
// node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
9565
9574
|
var selectParser = (def, typeName, refs) => {
|
|
9566
9575
|
switch (typeName) {
|
|
9567
9576
|
case ZodFirstPartyTypeKind3.ZodString:
|
|
@@ -9637,7 +9646,7 @@ var selectParser = (def, typeName, refs) => {
|
|
|
9637
9646
|
}
|
|
9638
9647
|
};
|
|
9639
9648
|
|
|
9640
|
-
//
|
|
9649
|
+
// node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
9641
9650
|
function parseDef(def, refs, forceResolution = false) {
|
|
9642
9651
|
const seenItem = refs.seen.get(def);
|
|
9643
9652
|
if (refs.override) {
|
|
@@ -9693,7 +9702,7 @@ var addMeta = (def, refs, jsonSchema) => {
|
|
|
9693
9702
|
return jsonSchema;
|
|
9694
9703
|
};
|
|
9695
9704
|
|
|
9696
|
-
//
|
|
9705
|
+
// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
9697
9706
|
var zodToJsonSchema = (schema, options) => {
|
|
9698
9707
|
const refs = getRefs(options);
|
|
9699
9708
|
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
@@ -9755,7 +9764,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
9755
9764
|
return combined;
|
|
9756
9765
|
};
|
|
9757
9766
|
|
|
9758
|
-
//
|
|
9767
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
9759
9768
|
function mapMiniTarget(t) {
|
|
9760
9769
|
if (!t)
|
|
9761
9770
|
return "draft-7";
|
|
@@ -9797,7 +9806,7 @@ function parseWithCompat(schema, data) {
|
|
|
9797
9806
|
return result.data;
|
|
9798
9807
|
}
|
|
9799
9808
|
|
|
9800
|
-
//
|
|
9809
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
9801
9810
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
9802
9811
|
var Protocol = class {
|
|
9803
9812
|
constructor(_options) {
|
|
@@ -9974,6 +9983,9 @@ var Protocol = class {
|
|
|
9974
9983
|
* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
|
|
9975
9984
|
*/
|
|
9976
9985
|
async connect(transport) {
|
|
9986
|
+
if (this._transport) {
|
|
9987
|
+
throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
|
|
9988
|
+
}
|
|
9977
9989
|
this._transport = transport;
|
|
9978
9990
|
const _onclose = this.transport?.onclose;
|
|
9979
9991
|
this._transport.onclose = () => {
|
|
@@ -10006,6 +10018,10 @@ var Protocol = class {
|
|
|
10006
10018
|
this._progressHandlers.clear();
|
|
10007
10019
|
this._taskProgressTokens.clear();
|
|
10008
10020
|
this._pendingDebouncedNotifications.clear();
|
|
10021
|
+
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
10022
|
+
controller.abort();
|
|
10023
|
+
}
|
|
10024
|
+
this._requestHandlerAbortControllers.clear();
|
|
10009
10025
|
const error = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
10010
10026
|
this._transport = void 0;
|
|
10011
10027
|
this.onclose?.();
|
|
@@ -10056,6 +10072,8 @@ var Protocol = class {
|
|
|
10056
10072
|
sessionId: capturedTransport?.sessionId,
|
|
10057
10073
|
_meta: request.params?._meta,
|
|
10058
10074
|
sendNotification: async (notification) => {
|
|
10075
|
+
if (abortController.signal.aborted)
|
|
10076
|
+
return;
|
|
10059
10077
|
const notificationOptions = { relatedRequestId: request.id };
|
|
10060
10078
|
if (relatedTaskId) {
|
|
10061
10079
|
notificationOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -10063,6 +10081,9 @@ var Protocol = class {
|
|
|
10063
10081
|
await this.notification(notification, notificationOptions);
|
|
10064
10082
|
},
|
|
10065
10083
|
sendRequest: async (r, resultSchema, options) => {
|
|
10084
|
+
if (abortController.signal.aborted) {
|
|
10085
|
+
throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
|
|
10086
|
+
}
|
|
10066
10087
|
const requestOptions = { ...options, relatedRequestId: request.id };
|
|
10067
10088
|
if (relatedTaskId && !requestOptions.relatedTask) {
|
|
10068
10089
|
requestOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -10733,7 +10754,7 @@ function mergeCapabilities(base, additional) {
|
|
|
10733
10754
|
return result;
|
|
10734
10755
|
}
|
|
10735
10756
|
|
|
10736
|
-
//
|
|
10757
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
10737
10758
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
10738
10759
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
10739
10760
|
function createDefaultAjvInstance() {
|
|
@@ -10801,7 +10822,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
10801
10822
|
}
|
|
10802
10823
|
};
|
|
10803
10824
|
|
|
10804
|
-
//
|
|
10825
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
10805
10826
|
var ExperimentalServerTasks = class {
|
|
10806
10827
|
constructor(_server) {
|
|
10807
10828
|
this._server = _server;
|
|
@@ -10823,6 +10844,147 @@ var ExperimentalServerTasks = class {
|
|
|
10823
10844
|
requestStream(request, resultSchema, options) {
|
|
10824
10845
|
return this._server.requestStream(request, resultSchema, options);
|
|
10825
10846
|
}
|
|
10847
|
+
/**
|
|
10848
|
+
* Sends a sampling request and returns an AsyncGenerator that yields response messages.
|
|
10849
|
+
* The generator is guaranteed to end with either a 'result' or 'error' message.
|
|
10850
|
+
*
|
|
10851
|
+
* For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
|
|
10852
|
+
* before the final result.
|
|
10853
|
+
*
|
|
10854
|
+
* @example
|
|
10855
|
+
* ```typescript
|
|
10856
|
+
* const stream = server.experimental.tasks.createMessageStream({
|
|
10857
|
+
* messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
|
|
10858
|
+
* maxTokens: 100
|
|
10859
|
+
* }, {
|
|
10860
|
+
* onprogress: (progress) => {
|
|
10861
|
+
* // Handle streaming tokens via progress notifications
|
|
10862
|
+
* console.log('Progress:', progress.message);
|
|
10863
|
+
* }
|
|
10864
|
+
* });
|
|
10865
|
+
*
|
|
10866
|
+
* for await (const message of stream) {
|
|
10867
|
+
* switch (message.type) {
|
|
10868
|
+
* case 'taskCreated':
|
|
10869
|
+
* console.log('Task created:', message.task.taskId);
|
|
10870
|
+
* break;
|
|
10871
|
+
* case 'taskStatus':
|
|
10872
|
+
* console.log('Task status:', message.task.status);
|
|
10873
|
+
* break;
|
|
10874
|
+
* case 'result':
|
|
10875
|
+
* console.log('Final result:', message.result);
|
|
10876
|
+
* break;
|
|
10877
|
+
* case 'error':
|
|
10878
|
+
* console.error('Error:', message.error);
|
|
10879
|
+
* break;
|
|
10880
|
+
* }
|
|
10881
|
+
* }
|
|
10882
|
+
* ```
|
|
10883
|
+
*
|
|
10884
|
+
* @param params - The sampling request parameters
|
|
10885
|
+
* @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
|
|
10886
|
+
* @returns AsyncGenerator that yields ResponseMessage objects
|
|
10887
|
+
*
|
|
10888
|
+
* @experimental
|
|
10889
|
+
*/
|
|
10890
|
+
createMessageStream(params, options) {
|
|
10891
|
+
const clientCapabilities = this._server.getClientCapabilities();
|
|
10892
|
+
if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
|
|
10893
|
+
throw new Error("Client does not support sampling tools capability.");
|
|
10894
|
+
}
|
|
10895
|
+
if (params.messages.length > 0) {
|
|
10896
|
+
const lastMessage = params.messages[params.messages.length - 1];
|
|
10897
|
+
const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
|
|
10898
|
+
const hasToolResults = lastContent.some((c) => c.type === "tool_result");
|
|
10899
|
+
const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
|
|
10900
|
+
const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
|
|
10901
|
+
const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
|
|
10902
|
+
if (hasToolResults) {
|
|
10903
|
+
if (lastContent.some((c) => c.type !== "tool_result")) {
|
|
10904
|
+
throw new Error("The last message must contain only tool_result content if any is present");
|
|
10905
|
+
}
|
|
10906
|
+
if (!hasPreviousToolUse) {
|
|
10907
|
+
throw new Error("tool_result blocks are not matching any tool_use from the previous message");
|
|
10908
|
+
}
|
|
10909
|
+
}
|
|
10910
|
+
if (hasPreviousToolUse) {
|
|
10911
|
+
const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
|
|
10912
|
+
const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
|
|
10913
|
+
if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
|
|
10914
|
+
throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
|
|
10915
|
+
}
|
|
10916
|
+
}
|
|
10917
|
+
}
|
|
10918
|
+
return this.requestStream({
|
|
10919
|
+
method: "sampling/createMessage",
|
|
10920
|
+
params
|
|
10921
|
+
}, CreateMessageResultSchema, options);
|
|
10922
|
+
}
|
|
10923
|
+
/**
|
|
10924
|
+
* Sends an elicitation request and returns an AsyncGenerator that yields response messages.
|
|
10925
|
+
* The generator is guaranteed to end with either a 'result' or 'error' message.
|
|
10926
|
+
*
|
|
10927
|
+
* For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
|
|
10928
|
+
* and 'taskStatus' messages before the final result.
|
|
10929
|
+
*
|
|
10930
|
+
* @example
|
|
10931
|
+
* ```typescript
|
|
10932
|
+
* const stream = server.experimental.tasks.elicitInputStream({
|
|
10933
|
+
* mode: 'url',
|
|
10934
|
+
* message: 'Please authenticate',
|
|
10935
|
+
* elicitationId: 'auth-123',
|
|
10936
|
+
* url: 'https://example.com/auth'
|
|
10937
|
+
* }, {
|
|
10938
|
+
* task: { ttl: 300000 } // Task-augmented for long-running auth flow
|
|
10939
|
+
* });
|
|
10940
|
+
*
|
|
10941
|
+
* for await (const message of stream) {
|
|
10942
|
+
* switch (message.type) {
|
|
10943
|
+
* case 'taskCreated':
|
|
10944
|
+
* console.log('Task created:', message.task.taskId);
|
|
10945
|
+
* break;
|
|
10946
|
+
* case 'taskStatus':
|
|
10947
|
+
* console.log('Task status:', message.task.status);
|
|
10948
|
+
* break;
|
|
10949
|
+
* case 'result':
|
|
10950
|
+
* console.log('User action:', message.result.action);
|
|
10951
|
+
* break;
|
|
10952
|
+
* case 'error':
|
|
10953
|
+
* console.error('Error:', message.error);
|
|
10954
|
+
* break;
|
|
10955
|
+
* }
|
|
10956
|
+
* }
|
|
10957
|
+
* ```
|
|
10958
|
+
*
|
|
10959
|
+
* @param params - The elicitation request parameters
|
|
10960
|
+
* @param options - Optional request options (timeout, signal, task creation params, etc.)
|
|
10961
|
+
* @returns AsyncGenerator that yields ResponseMessage objects
|
|
10962
|
+
*
|
|
10963
|
+
* @experimental
|
|
10964
|
+
*/
|
|
10965
|
+
elicitInputStream(params, options) {
|
|
10966
|
+
const clientCapabilities = this._server.getClientCapabilities();
|
|
10967
|
+
const mode = params.mode ?? "form";
|
|
10968
|
+
switch (mode) {
|
|
10969
|
+
case "url": {
|
|
10970
|
+
if (!clientCapabilities?.elicitation?.url) {
|
|
10971
|
+
throw new Error("Client does not support url elicitation.");
|
|
10972
|
+
}
|
|
10973
|
+
break;
|
|
10974
|
+
}
|
|
10975
|
+
case "form": {
|
|
10976
|
+
if (!clientCapabilities?.elicitation?.form) {
|
|
10977
|
+
throw new Error("Client does not support form elicitation.");
|
|
10978
|
+
}
|
|
10979
|
+
break;
|
|
10980
|
+
}
|
|
10981
|
+
}
|
|
10982
|
+
const normalizedParams = mode === "form" && params.mode === void 0 ? { ...params, mode: "form" } : params;
|
|
10983
|
+
return this.requestStream({
|
|
10984
|
+
method: "elicitation/create",
|
|
10985
|
+
params: normalizedParams
|
|
10986
|
+
}, ElicitResultSchema, options);
|
|
10987
|
+
}
|
|
10826
10988
|
/**
|
|
10827
10989
|
* Gets the current status of a task.
|
|
10828
10990
|
*
|
|
@@ -10873,7 +11035,7 @@ var ExperimentalServerTasks = class {
|
|
|
10873
11035
|
}
|
|
10874
11036
|
};
|
|
10875
11037
|
|
|
10876
|
-
//
|
|
11038
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
10877
11039
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
10878
11040
|
if (!requests) {
|
|
10879
11041
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -10908,7 +11070,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
10908
11070
|
}
|
|
10909
11071
|
}
|
|
10910
11072
|
|
|
10911
|
-
//
|
|
11073
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
10912
11074
|
var Server = class extends Protocol {
|
|
10913
11075
|
/**
|
|
10914
11076
|
* Initializes this server with the given name and version information.
|
|
@@ -11288,7 +11450,7 @@ var Server = class extends Protocol {
|
|
|
11288
11450
|
}
|
|
11289
11451
|
};
|
|
11290
11452
|
|
|
11291
|
-
//
|
|
11453
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
11292
11454
|
var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
|
|
11293
11455
|
function isCompletable(schema) {
|
|
11294
11456
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -11302,7 +11464,7 @@ var McpZodTypeKind;
|
|
|
11302
11464
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
11303
11465
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
11304
11466
|
|
|
11305
|
-
//
|
|
11467
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
11306
11468
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
11307
11469
|
function validateToolName(name) {
|
|
11308
11470
|
const warnings = [];
|
|
@@ -11360,7 +11522,7 @@ function validateAndWarnToolName(name) {
|
|
|
11360
11522
|
return result.isValid;
|
|
11361
11523
|
}
|
|
11362
11524
|
|
|
11363
|
-
//
|
|
11525
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
11364
11526
|
var ExperimentalMcpServerTasks = class {
|
|
11365
11527
|
constructor(_mcpServer) {
|
|
11366
11528
|
this._mcpServer = _mcpServer;
|
|
@@ -11375,7 +11537,7 @@ var ExperimentalMcpServerTasks = class {
|
|
|
11375
11537
|
}
|
|
11376
11538
|
};
|
|
11377
11539
|
|
|
11378
|
-
//
|
|
11540
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
11379
11541
|
import { ZodOptional } from "zod";
|
|
11380
11542
|
var McpServer = class {
|
|
11381
11543
|
constructor(serverInfo, options) {
|
|
@@ -12162,7 +12324,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
12162
12324
|
}
|
|
12163
12325
|
};
|
|
12164
12326
|
|
|
12165
|
-
//
|
|
12327
|
+
// node_modules/@hono/node-server/dist/index.mjs
|
|
12166
12328
|
import { Http2ServerRequest as Http2ServerRequest2 } from "http2";
|
|
12167
12329
|
import { Http2ServerRequest } from "http2";
|
|
12168
12330
|
import { Readable } from "stream";
|
|
@@ -12694,10 +12856,11 @@ var getRequestListener = (fetchCallback, options = {}) => {
|
|
|
12694
12856
|
};
|
|
12695
12857
|
};
|
|
12696
12858
|
|
|
12697
|
-
//
|
|
12859
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
12698
12860
|
var WebStandardStreamableHTTPServerTransport = class {
|
|
12699
12861
|
constructor(options = {}) {
|
|
12700
12862
|
this._started = false;
|
|
12863
|
+
this._hasHandledRequest = false;
|
|
12701
12864
|
this._streamMapping = /* @__PURE__ */ new Map();
|
|
12702
12865
|
this._requestToStreamMapping = /* @__PURE__ */ new Map();
|
|
12703
12866
|
this._requestResponseMap = /* @__PURE__ */ new Map();
|
|
@@ -12775,6 +12938,10 @@ var WebStandardStreamableHTTPServerTransport = class {
|
|
|
12775
12938
|
* Returns a Response object (Web Standard)
|
|
12776
12939
|
*/
|
|
12777
12940
|
async handleRequest(req, options) {
|
|
12941
|
+
if (!this.sessionIdGenerator && this._hasHandledRequest) {
|
|
12942
|
+
throw new Error("Stateless transport cannot be reused across requests. Create a new transport per request.");
|
|
12943
|
+
}
|
|
12944
|
+
this._hasHandledRequest = true;
|
|
12778
12945
|
const validationError = this.validateRequestHeaders(req);
|
|
12779
12946
|
if (validationError) {
|
|
12780
12947
|
return validationError;
|
|
@@ -12822,6 +12989,7 @@ data:
|
|
|
12822
12989
|
async handleGetRequest(req) {
|
|
12823
12990
|
const acceptHeader = req.headers.get("accept");
|
|
12824
12991
|
if (!acceptHeader?.includes("text/event-stream")) {
|
|
12992
|
+
this.onerror?.(new Error("Not Acceptable: Client must accept text/event-stream"));
|
|
12825
12993
|
return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept text/event-stream");
|
|
12826
12994
|
}
|
|
12827
12995
|
const sessionError = this.validateSession(req);
|
|
@@ -12839,6 +13007,7 @@ data:
|
|
|
12839
13007
|
}
|
|
12840
13008
|
}
|
|
12841
13009
|
if (this._streamMapping.get(this._standaloneSseStreamId) !== void 0) {
|
|
13010
|
+
this.onerror?.(new Error("Conflict: Only one SSE stream is allowed per session"));
|
|
12842
13011
|
return this.createJsonErrorResponse(409, -32e3, "Conflict: Only one SSE stream is allowed per session");
|
|
12843
13012
|
}
|
|
12844
13013
|
const encoder = new TextEncoder();
|
|
@@ -12878,6 +13047,7 @@ data:
|
|
|
12878
13047
|
*/
|
|
12879
13048
|
async replayEvents(lastEventId) {
|
|
12880
13049
|
if (!this._eventStore) {
|
|
13050
|
+
this.onerror?.(new Error("Event store not configured"));
|
|
12881
13051
|
return this.createJsonErrorResponse(400, -32e3, "Event store not configured");
|
|
12882
13052
|
}
|
|
12883
13053
|
try {
|
|
@@ -12885,9 +13055,11 @@ data:
|
|
|
12885
13055
|
if (this._eventStore.getStreamIdForEventId) {
|
|
12886
13056
|
streamId = await this._eventStore.getStreamIdForEventId(lastEventId);
|
|
12887
13057
|
if (!streamId) {
|
|
13058
|
+
this.onerror?.(new Error("Invalid event ID format"));
|
|
12888
13059
|
return this.createJsonErrorResponse(400, -32e3, "Invalid event ID format");
|
|
12889
13060
|
}
|
|
12890
13061
|
if (this._streamMapping.get(streamId) !== void 0) {
|
|
13062
|
+
this.onerror?.(new Error("Conflict: Stream already has an active connection"));
|
|
12891
13063
|
return this.createJsonErrorResponse(409, -32e3, "Conflict: Stream already has an active connection");
|
|
12892
13064
|
}
|
|
12893
13065
|
}
|
|
@@ -12953,7 +13125,8 @@ data:
|
|
|
12953
13125
|
`;
|
|
12954
13126
|
controller.enqueue(encoder.encode(eventData));
|
|
12955
13127
|
return true;
|
|
12956
|
-
} catch {
|
|
13128
|
+
} catch (error) {
|
|
13129
|
+
this.onerror?.(error);
|
|
12957
13130
|
return false;
|
|
12958
13131
|
}
|
|
12959
13132
|
}
|
|
@@ -12961,6 +13134,7 @@ data:
|
|
|
12961
13134
|
* Handles unsupported requests (PUT, PATCH, etc.)
|
|
12962
13135
|
*/
|
|
12963
13136
|
handleUnsupportedRequest() {
|
|
13137
|
+
this.onerror?.(new Error("Method not allowed."));
|
|
12964
13138
|
return new Response(JSON.stringify({
|
|
12965
13139
|
jsonrpc: "2.0",
|
|
12966
13140
|
error: {
|
|
@@ -12983,14 +13157,17 @@ data:
|
|
|
12983
13157
|
try {
|
|
12984
13158
|
const acceptHeader = req.headers.get("accept");
|
|
12985
13159
|
if (!acceptHeader?.includes("application/json") || !acceptHeader.includes("text/event-stream")) {
|
|
13160
|
+
this.onerror?.(new Error("Not Acceptable: Client must accept both application/json and text/event-stream"));
|
|
12986
13161
|
return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept both application/json and text/event-stream");
|
|
12987
13162
|
}
|
|
12988
13163
|
const ct = req.headers.get("content-type");
|
|
12989
13164
|
if (!ct || !ct.includes("application/json")) {
|
|
13165
|
+
this.onerror?.(new Error("Unsupported Media Type: Content-Type must be application/json"));
|
|
12990
13166
|
return this.createJsonErrorResponse(415, -32e3, "Unsupported Media Type: Content-Type must be application/json");
|
|
12991
13167
|
}
|
|
12992
13168
|
const requestInfo = {
|
|
12993
|
-
headers: Object.fromEntries(req.headers.entries())
|
|
13169
|
+
headers: Object.fromEntries(req.headers.entries()),
|
|
13170
|
+
url: new URL(req.url)
|
|
12994
13171
|
};
|
|
12995
13172
|
let rawMessage;
|
|
12996
13173
|
if (options?.parsedBody !== void 0) {
|
|
@@ -12999,6 +13176,7 @@ data:
|
|
|
12999
13176
|
try {
|
|
13000
13177
|
rawMessage = await req.json();
|
|
13001
13178
|
} catch {
|
|
13179
|
+
this.onerror?.(new Error("Parse error: Invalid JSON"));
|
|
13002
13180
|
return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON");
|
|
13003
13181
|
}
|
|
13004
13182
|
}
|
|
@@ -13010,14 +13188,17 @@ data:
|
|
|
13010
13188
|
messages = [JSONRPCMessageSchema.parse(rawMessage)];
|
|
13011
13189
|
}
|
|
13012
13190
|
} catch {
|
|
13191
|
+
this.onerror?.(new Error("Parse error: Invalid JSON-RPC message"));
|
|
13013
13192
|
return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON-RPC message");
|
|
13014
13193
|
}
|
|
13015
13194
|
const isInitializationRequest = messages.some(isInitializeRequest);
|
|
13016
13195
|
if (isInitializationRequest) {
|
|
13017
13196
|
if (this._initialized && this.sessionId !== void 0) {
|
|
13197
|
+
this.onerror?.(new Error("Invalid Request: Server already initialized"));
|
|
13018
13198
|
return this.createJsonErrorResponse(400, -32600, "Invalid Request: Server already initialized");
|
|
13019
13199
|
}
|
|
13020
13200
|
if (messages.length > 1) {
|
|
13201
|
+
this.onerror?.(new Error("Invalid Request: Only one initialization request is allowed"));
|
|
13021
13202
|
return this.createJsonErrorResponse(400, -32600, "Invalid Request: Only one initialization request is allowed");
|
|
13022
13203
|
}
|
|
13023
13204
|
this.sessionId = this.sessionIdGenerator?.();
|
|
@@ -13143,13 +13324,16 @@ data:
|
|
|
13143
13324
|
return void 0;
|
|
13144
13325
|
}
|
|
13145
13326
|
if (!this._initialized) {
|
|
13327
|
+
this.onerror?.(new Error("Bad Request: Server not initialized"));
|
|
13146
13328
|
return this.createJsonErrorResponse(400, -32e3, "Bad Request: Server not initialized");
|
|
13147
13329
|
}
|
|
13148
13330
|
const sessionId = req.headers.get("mcp-session-id");
|
|
13149
13331
|
if (!sessionId) {
|
|
13332
|
+
this.onerror?.(new Error("Bad Request: Mcp-Session-Id header is required"));
|
|
13150
13333
|
return this.createJsonErrorResponse(400, -32e3, "Bad Request: Mcp-Session-Id header is required");
|
|
13151
13334
|
}
|
|
13152
13335
|
if (sessionId !== this.sessionId) {
|
|
13336
|
+
this.onerror?.(new Error("Session not found"));
|
|
13153
13337
|
return this.createJsonErrorResponse(404, -32001, "Session not found");
|
|
13154
13338
|
}
|
|
13155
13339
|
return void 0;
|
|
@@ -13170,6 +13354,7 @@ data:
|
|
|
13170
13354
|
validateProtocolVersion(req) {
|
|
13171
13355
|
const protocolVersion = req.headers.get("mcp-protocol-version");
|
|
13172
13356
|
if (protocolVersion !== null && !SUPPORTED_PROTOCOL_VERSIONS.includes(protocolVersion)) {
|
|
13357
|
+
this.onerror?.(new Error(`Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")})`));
|
|
13173
13358
|
return this.createJsonErrorResponse(400, -32e3, `Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")})`);
|
|
13174
13359
|
}
|
|
13175
13360
|
return void 0;
|
|
@@ -13273,7 +13458,7 @@ data:
|
|
|
13273
13458
|
}
|
|
13274
13459
|
};
|
|
13275
13460
|
|
|
13276
|
-
//
|
|
13461
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
|
|
13277
13462
|
var StreamableHTTPServerTransport = class {
|
|
13278
13463
|
constructor(options = {}) {
|
|
13279
13464
|
this._requestContext = /* @__PURE__ */ new WeakMap();
|
|
@@ -13377,7 +13562,7 @@ var StreamableHTTPServerTransport = class {
|
|
|
13377
13562
|
|
|
13378
13563
|
// src/server/app.ts
|
|
13379
13564
|
import express from "express";
|
|
13380
|
-
import { z as
|
|
13565
|
+
import { z as z3 } from "zod";
|
|
13381
13566
|
|
|
13382
13567
|
// src/server/types.ts
|
|
13383
13568
|
var MIME_TYPES = {
|
|
@@ -13617,15 +13802,153 @@ var WebSocketManager = class {
|
|
|
13617
13802
|
};
|
|
13618
13803
|
|
|
13619
13804
|
// src/server/storageRpc.ts
|
|
13805
|
+
import { z as z2 } from "zod";
|
|
13806
|
+
var STORAGE_METHODS = {
|
|
13807
|
+
KV_GET: "creature/storage/kv/get",
|
|
13808
|
+
KV_SET: "creature/storage/kv/set",
|
|
13809
|
+
KV_DELETE: "creature/storage/kv/delete",
|
|
13810
|
+
KV_LIST: "creature/storage/kv/list",
|
|
13811
|
+
KV_LIST_WITH_VALUES: "creature/storage/kv/listWithValues",
|
|
13812
|
+
KV_SEARCH: "creature/storage/kv/search",
|
|
13813
|
+
VECTOR_UPSERT: "creature/storage/vector/upsert",
|
|
13814
|
+
VECTOR_SEARCH: "creature/storage/vector/search",
|
|
13815
|
+
VECTOR_DELETE: "creature/storage/vector/delete",
|
|
13816
|
+
BLOB_PUT: "creature/storage/blob/put",
|
|
13817
|
+
BLOB_GET: "creature/storage/blob/get",
|
|
13818
|
+
BLOB_DELETE: "creature/storage/blob/delete",
|
|
13819
|
+
BLOB_LIST: "creature/storage/blob/list"
|
|
13820
|
+
};
|
|
13620
13821
|
var currentServer = null;
|
|
13621
|
-
var setCurrentServer = ({
|
|
13622
|
-
server
|
|
13623
|
-
}) => {
|
|
13822
|
+
var setCurrentServer = (server) => {
|
|
13624
13823
|
currentServer = server;
|
|
13625
13824
|
};
|
|
13626
13825
|
var getCurrentServer = () => {
|
|
13627
13826
|
return currentServer;
|
|
13628
13827
|
};
|
|
13828
|
+
var isStorageRpcAvailable = () => {
|
|
13829
|
+
const isCreature = !!process.env.CREATURE_PROJECT_ID;
|
|
13830
|
+
return isCreature && currentServer !== null;
|
|
13831
|
+
};
|
|
13832
|
+
var GenericResultSchema = z2.record(z2.unknown());
|
|
13833
|
+
var sendStorageRequest = async (method, params) => {
|
|
13834
|
+
if (!currentServer) {
|
|
13835
|
+
throw new Error(
|
|
13836
|
+
"Storage RPC not available: no server connection. Make sure you're calling this from within a tool handler."
|
|
13837
|
+
);
|
|
13838
|
+
}
|
|
13839
|
+
try {
|
|
13840
|
+
const server = currentServer.server;
|
|
13841
|
+
const result = await server.request(
|
|
13842
|
+
{ method, params },
|
|
13843
|
+
GenericResultSchema
|
|
13844
|
+
);
|
|
13845
|
+
return result;
|
|
13846
|
+
} catch (error) {
|
|
13847
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
13848
|
+
throw new Error(`Storage RPC failed (${method}): ${message}`);
|
|
13849
|
+
}
|
|
13850
|
+
};
|
|
13851
|
+
var rpcKvGet = async (key) => {
|
|
13852
|
+
const result = await sendStorageRequest(
|
|
13853
|
+
STORAGE_METHODS.KV_GET,
|
|
13854
|
+
{ key }
|
|
13855
|
+
);
|
|
13856
|
+
return result.value;
|
|
13857
|
+
};
|
|
13858
|
+
var rpcKvSet = async (key, value) => {
|
|
13859
|
+
const result = await sendStorageRequest(
|
|
13860
|
+
STORAGE_METHODS.KV_SET,
|
|
13861
|
+
{ key, value }
|
|
13862
|
+
);
|
|
13863
|
+
return result.success;
|
|
13864
|
+
};
|
|
13865
|
+
var rpcKvDelete = async (key) => {
|
|
13866
|
+
const result = await sendStorageRequest(
|
|
13867
|
+
STORAGE_METHODS.KV_DELETE,
|
|
13868
|
+
{ key }
|
|
13869
|
+
);
|
|
13870
|
+
return result.deleted;
|
|
13871
|
+
};
|
|
13872
|
+
var rpcKvList = async (prefix) => {
|
|
13873
|
+
const result = await sendStorageRequest(
|
|
13874
|
+
STORAGE_METHODS.KV_LIST,
|
|
13875
|
+
{ prefix }
|
|
13876
|
+
);
|
|
13877
|
+
return result.keys;
|
|
13878
|
+
};
|
|
13879
|
+
var rpcKvListWithValues = async (prefix) => {
|
|
13880
|
+
const result = await sendStorageRequest(
|
|
13881
|
+
STORAGE_METHODS.KV_LIST_WITH_VALUES,
|
|
13882
|
+
{ prefix }
|
|
13883
|
+
);
|
|
13884
|
+
return result.entries;
|
|
13885
|
+
};
|
|
13886
|
+
var rpcKvSearch = async (query, options) => {
|
|
13887
|
+
const result = await sendStorageRequest(
|
|
13888
|
+
STORAGE_METHODS.KV_SEARCH,
|
|
13889
|
+
{ query, prefix: options?.prefix, limit: options?.limit }
|
|
13890
|
+
);
|
|
13891
|
+
return result.matches;
|
|
13892
|
+
};
|
|
13893
|
+
var rpcVectorUpsert = async (key, text, metadata) => {
|
|
13894
|
+
const result = await sendStorageRequest(
|
|
13895
|
+
STORAGE_METHODS.VECTOR_UPSERT,
|
|
13896
|
+
{ key, text, metadata }
|
|
13897
|
+
);
|
|
13898
|
+
return result.success;
|
|
13899
|
+
};
|
|
13900
|
+
var rpcVectorSearch = async (query, options) => {
|
|
13901
|
+
const result = await sendStorageRequest(
|
|
13902
|
+
STORAGE_METHODS.VECTOR_SEARCH,
|
|
13903
|
+
{ query, prefix: options?.prefix, limit: options?.limit }
|
|
13904
|
+
);
|
|
13905
|
+
return result.matches;
|
|
13906
|
+
};
|
|
13907
|
+
var rpcVectorDelete = async (key) => {
|
|
13908
|
+
const result = await sendStorageRequest(
|
|
13909
|
+
STORAGE_METHODS.VECTOR_DELETE,
|
|
13910
|
+
{ key }
|
|
13911
|
+
);
|
|
13912
|
+
return result.deleted;
|
|
13913
|
+
};
|
|
13914
|
+
var rpcBlobPut = async (name, data, mimeType) => {
|
|
13915
|
+
const result = await sendStorageRequest(
|
|
13916
|
+
STORAGE_METHODS.BLOB_PUT,
|
|
13917
|
+
{
|
|
13918
|
+
name,
|
|
13919
|
+
data: Buffer.from(data).toString("base64"),
|
|
13920
|
+
mimeType
|
|
13921
|
+
}
|
|
13922
|
+
);
|
|
13923
|
+
return result;
|
|
13924
|
+
};
|
|
13925
|
+
var rpcBlobGet = async (name) => {
|
|
13926
|
+
const result = await sendStorageRequest(
|
|
13927
|
+
STORAGE_METHODS.BLOB_GET,
|
|
13928
|
+
{ name }
|
|
13929
|
+
);
|
|
13930
|
+
if (result.data === null) {
|
|
13931
|
+
return null;
|
|
13932
|
+
}
|
|
13933
|
+
return {
|
|
13934
|
+
data: Buffer.from(result.data, "base64"),
|
|
13935
|
+
mimeType: result.mimeType
|
|
13936
|
+
};
|
|
13937
|
+
};
|
|
13938
|
+
var rpcBlobDelete = async (name) => {
|
|
13939
|
+
const result = await sendStorageRequest(
|
|
13940
|
+
STORAGE_METHODS.BLOB_DELETE,
|
|
13941
|
+
{ name }
|
|
13942
|
+
);
|
|
13943
|
+
return result.deleted;
|
|
13944
|
+
};
|
|
13945
|
+
var rpcBlobList = async (prefix) => {
|
|
13946
|
+
const result = await sendStorageRequest(
|
|
13947
|
+
STORAGE_METHODS.BLOB_LIST,
|
|
13948
|
+
{ prefix }
|
|
13949
|
+
);
|
|
13950
|
+
return result.names;
|
|
13951
|
+
};
|
|
13629
13952
|
|
|
13630
13953
|
// src/server/app.ts
|
|
13631
13954
|
function createHttpLogSink(endpoint, sourceName) {
|
|
@@ -13931,6 +14254,13 @@ var App = class {
|
|
|
13931
14254
|
getResourceDefinitions() {
|
|
13932
14255
|
return this.resources;
|
|
13933
14256
|
}
|
|
14257
|
+
/**
|
|
14258
|
+
* Get the Express application for serverless wrapping (e.g. Lambda).
|
|
14259
|
+
* Does NOT start listening on a port.
|
|
14260
|
+
*/
|
|
14261
|
+
toExpressApp() {
|
|
14262
|
+
return this.createExpressApp();
|
|
14263
|
+
}
|
|
13934
14264
|
/**
|
|
13935
14265
|
* Close a specific transport session.
|
|
13936
14266
|
*/
|
|
@@ -13985,7 +14315,7 @@ var App = class {
|
|
|
13985
14315
|
const toolMeta = this.buildToolMeta(config);
|
|
13986
14316
|
tools.push({
|
|
13987
14317
|
name,
|
|
13988
|
-
description: this.buildToolDescription(config, config.input ||
|
|
14318
|
+
description: this.buildToolDescription(config, config.input || z3.object({})),
|
|
13989
14319
|
inputSchema: config.input ? this.zodToJsonSchema(config.input) : { type: "object" },
|
|
13990
14320
|
...config.annotations && { annotations: config.annotations },
|
|
13991
14321
|
...Object.keys(toolMeta).length > 0 && { _meta: toolMeta }
|
|
@@ -14236,7 +14566,7 @@ var App = class {
|
|
|
14236
14566
|
const server = this.createMcpServer();
|
|
14237
14567
|
await server.connect(transport);
|
|
14238
14568
|
this.serverByTransport.set(transport, server);
|
|
14239
|
-
setCurrentServer(
|
|
14569
|
+
setCurrentServer(server);
|
|
14240
14570
|
await transport.handleRequest(req, res, req.body);
|
|
14241
14571
|
return;
|
|
14242
14572
|
} else {
|
|
@@ -14412,7 +14742,7 @@ var App = class {
|
|
|
14412
14742
|
registerTools(server) {
|
|
14413
14743
|
for (const [name, { config, handler }] of this.tools) {
|
|
14414
14744
|
const toolMeta = this.buildToolMeta(config);
|
|
14415
|
-
const baseSchema = config.input ||
|
|
14745
|
+
const baseSchema = config.input || z3.object({});
|
|
14416
14746
|
const inputSchema = "passthrough" in baseSchema && typeof baseSchema.passthrough === "function" ? baseSchema.passthrough() : baseSchema;
|
|
14417
14747
|
const description = this.buildToolDescription(config, baseSchema);
|
|
14418
14748
|
const hasUi = !!config.ui;
|
|
@@ -14733,7 +15063,7 @@ function wrapServer(server) {
|
|
|
14733
15063
|
import fs2 from "fs";
|
|
14734
15064
|
import fsPromises from "fs/promises";
|
|
14735
15065
|
import path3 from "path";
|
|
14736
|
-
import { z as
|
|
15066
|
+
import { z as z4 } from "zod";
|
|
14737
15067
|
var getStorageDir = () => {
|
|
14738
15068
|
const dir = process.env.CREATURE_MCP_STORAGE_DIR;
|
|
14739
15069
|
return dir && dir.length > 0 ? dir : null;
|
|
@@ -14831,6 +15161,235 @@ function experimental_rmdirSync(relativePath) {
|
|
|
14831
15161
|
const safePath = resolveSafePath(relativePath);
|
|
14832
15162
|
fs2.rmSync(safePath, { recursive: true, force: true });
|
|
14833
15163
|
}
|
|
15164
|
+
var MAX_KEY_LENGTH = 256;
|
|
15165
|
+
var MAX_VECTOR_TEXT_LENGTH = 2e4;
|
|
15166
|
+
var sanitizeKey = (key) => {
|
|
15167
|
+
if (!key || key.length === 0) {
|
|
15168
|
+
throw new Error("Key cannot be empty");
|
|
15169
|
+
}
|
|
15170
|
+
if (key.length > MAX_KEY_LENGTH) {
|
|
15171
|
+
throw new Error(`Key exceeds maximum length of ${MAX_KEY_LENGTH}`);
|
|
15172
|
+
}
|
|
15173
|
+
if (key.includes("..")) {
|
|
15174
|
+
throw new Error("Key cannot contain '..'");
|
|
15175
|
+
}
|
|
15176
|
+
if (path3.isAbsolute(key)) {
|
|
15177
|
+
throw new Error("Key cannot be an absolute path");
|
|
15178
|
+
}
|
|
15179
|
+
if (!/^[a-zA-Z0-9_\-./:]+$/.test(key)) {
|
|
15180
|
+
throw new Error("Key contains invalid characters");
|
|
15181
|
+
}
|
|
15182
|
+
return key;
|
|
15183
|
+
};
|
|
15184
|
+
function experimental_kvIsAvailable() {
|
|
15185
|
+
return isStorageRpcAvailable() || getStorageDir() !== null;
|
|
15186
|
+
}
|
|
15187
|
+
async function experimental_kvGet(key) {
|
|
15188
|
+
const sanitizedKey = sanitizeKey(key);
|
|
15189
|
+
if (isStorageRpcAvailable()) {
|
|
15190
|
+
try {
|
|
15191
|
+
return await rpcKvGet(sanitizedKey);
|
|
15192
|
+
} catch (error) {
|
|
15193
|
+
console.error("[KV] RPC error in kvGet:", error);
|
|
15194
|
+
return null;
|
|
15195
|
+
}
|
|
15196
|
+
}
|
|
15197
|
+
return null;
|
|
15198
|
+
}
|
|
15199
|
+
function experimental_kvGetSync(key) {
|
|
15200
|
+
console.warn("[KV] experimental_kvGetSync is deprecated. Use experimental_kvGet for cross-platform support.");
|
|
15201
|
+
return null;
|
|
15202
|
+
}
|
|
15203
|
+
async function experimental_kvSet(key, value) {
|
|
15204
|
+
const sanitizedKey = sanitizeKey(key);
|
|
15205
|
+
if (isStorageRpcAvailable()) {
|
|
15206
|
+
try {
|
|
15207
|
+
return await rpcKvSet(sanitizedKey, value);
|
|
15208
|
+
} catch (error) {
|
|
15209
|
+
console.error("[KV] RPC error in kvSet:", error);
|
|
15210
|
+
return false;
|
|
15211
|
+
}
|
|
15212
|
+
}
|
|
15213
|
+
return false;
|
|
15214
|
+
}
|
|
15215
|
+
function experimental_kvSetSync(key, value) {
|
|
15216
|
+
console.warn("[KV] experimental_kvSetSync is deprecated. Use experimental_kvSet for cross-platform support.");
|
|
15217
|
+
return false;
|
|
15218
|
+
}
|
|
15219
|
+
async function experimental_kvDelete(key) {
|
|
15220
|
+
const sanitizedKey = sanitizeKey(key);
|
|
15221
|
+
if (isStorageRpcAvailable()) {
|
|
15222
|
+
try {
|
|
15223
|
+
return await rpcKvDelete(sanitizedKey);
|
|
15224
|
+
} catch (error) {
|
|
15225
|
+
console.error("[KV] RPC error in kvDelete:", error);
|
|
15226
|
+
return false;
|
|
15227
|
+
}
|
|
15228
|
+
}
|
|
15229
|
+
return false;
|
|
15230
|
+
}
|
|
15231
|
+
function experimental_kvDeleteSync(key) {
|
|
15232
|
+
console.warn("[KV] experimental_kvDeleteSync is deprecated. Use experimental_kvDelete for cross-platform support.");
|
|
15233
|
+
return false;
|
|
15234
|
+
}
|
|
15235
|
+
async function experimental_kvList(prefix) {
|
|
15236
|
+
const sanitizedPrefix = prefix ? sanitizeKey(prefix) : void 0;
|
|
15237
|
+
if (isStorageRpcAvailable()) {
|
|
15238
|
+
try {
|
|
15239
|
+
return await rpcKvList(sanitizedPrefix);
|
|
15240
|
+
} catch (error) {
|
|
15241
|
+
console.error("[KV] RPC error in kvList:", error);
|
|
15242
|
+
return null;
|
|
15243
|
+
}
|
|
15244
|
+
}
|
|
15245
|
+
return null;
|
|
15246
|
+
}
|
|
15247
|
+
async function experimental_kvListWithValues(prefix) {
|
|
15248
|
+
const sanitizedPrefix = prefix ? sanitizeKey(prefix) : void 0;
|
|
15249
|
+
if (isStorageRpcAvailable()) {
|
|
15250
|
+
try {
|
|
15251
|
+
return await rpcKvListWithValues(sanitizedPrefix);
|
|
15252
|
+
} catch (error) {
|
|
15253
|
+
console.error("[KV] RPC error in kvListWithValues:", error);
|
|
15254
|
+
return null;
|
|
15255
|
+
}
|
|
15256
|
+
}
|
|
15257
|
+
return null;
|
|
15258
|
+
}
|
|
15259
|
+
function experimental_kvListSync(prefix) {
|
|
15260
|
+
console.warn("[KV] experimental_kvListSync is deprecated. Use experimental_kvList for cross-platform support.");
|
|
15261
|
+
return null;
|
|
15262
|
+
}
|
|
15263
|
+
async function experimental_kvSearch(query, options) {
|
|
15264
|
+
if (!query || query.trim().length === 0) {
|
|
15265
|
+
throw new Error("Search query cannot be empty");
|
|
15266
|
+
}
|
|
15267
|
+
const sanitizedPrefix = options?.prefix ? sanitizeKey(options.prefix) : void 0;
|
|
15268
|
+
if (isStorageRpcAvailable()) {
|
|
15269
|
+
try {
|
|
15270
|
+
return await rpcKvSearch(query, {
|
|
15271
|
+
prefix: sanitizedPrefix,
|
|
15272
|
+
limit: options?.limit
|
|
15273
|
+
});
|
|
15274
|
+
} catch (error) {
|
|
15275
|
+
console.error("[KV] RPC error in kvSearch:", error);
|
|
15276
|
+
return null;
|
|
15277
|
+
}
|
|
15278
|
+
}
|
|
15279
|
+
return null;
|
|
15280
|
+
}
|
|
15281
|
+
function experimental_vectorIsAvailable() {
|
|
15282
|
+
return isStorageRpcAvailable();
|
|
15283
|
+
}
|
|
15284
|
+
async function experimental_vectorUpsert(key, text, metadata) {
|
|
15285
|
+
const sanitizedKey = sanitizeKey(key);
|
|
15286
|
+
const trimmed = text.trim();
|
|
15287
|
+
if (!trimmed) {
|
|
15288
|
+
throw new Error("Text cannot be empty");
|
|
15289
|
+
}
|
|
15290
|
+
if (trimmed.length > MAX_VECTOR_TEXT_LENGTH) {
|
|
15291
|
+
throw new Error(`Text exceeds maximum length of ${MAX_VECTOR_TEXT_LENGTH}`);
|
|
15292
|
+
}
|
|
15293
|
+
if (!isStorageRpcAvailable()) {
|
|
15294
|
+
return false;
|
|
15295
|
+
}
|
|
15296
|
+
return rpcVectorUpsert(sanitizedKey, trimmed, metadata);
|
|
15297
|
+
}
|
|
15298
|
+
async function experimental_vectorSearch(query, options) {
|
|
15299
|
+
const trimmed = query.trim();
|
|
15300
|
+
if (!trimmed) {
|
|
15301
|
+
throw new Error("Search query cannot be empty");
|
|
15302
|
+
}
|
|
15303
|
+
if (trimmed.length > MAX_VECTOR_TEXT_LENGTH) {
|
|
15304
|
+
throw new Error(`Text exceeds maximum length of ${MAX_VECTOR_TEXT_LENGTH}`);
|
|
15305
|
+
}
|
|
15306
|
+
const sanitizedPrefix = options?.prefix ? sanitizeKey(options.prefix) : void 0;
|
|
15307
|
+
if (!isStorageRpcAvailable()) {
|
|
15308
|
+
return null;
|
|
15309
|
+
}
|
|
15310
|
+
return rpcVectorSearch(trimmed, {
|
|
15311
|
+
prefix: sanitizedPrefix,
|
|
15312
|
+
limit: options?.limit
|
|
15313
|
+
});
|
|
15314
|
+
}
|
|
15315
|
+
async function experimental_vectorDelete(key) {
|
|
15316
|
+
const sanitizedKey = sanitizeKey(key);
|
|
15317
|
+
if (!isStorageRpcAvailable()) {
|
|
15318
|
+
return false;
|
|
15319
|
+
}
|
|
15320
|
+
return rpcVectorDelete(sanitizedKey);
|
|
15321
|
+
}
|
|
15322
|
+
var MAX_BLOB_SIZE = 10 * 1024 * 1024;
|
|
15323
|
+
function experimental_blobIsAvailable() {
|
|
15324
|
+
return isStorageRpcAvailable() || getStorageDir() !== null;
|
|
15325
|
+
}
|
|
15326
|
+
async function experimental_blobPut(name, data, mimeType) {
|
|
15327
|
+
const sanitizedName = sanitizeKey(name);
|
|
15328
|
+
if (data.length > MAX_BLOB_SIZE) {
|
|
15329
|
+
throw new Error(`Blob exceeds maximum size of ${MAX_BLOB_SIZE} bytes`);
|
|
15330
|
+
}
|
|
15331
|
+
if (isStorageRpcAvailable()) {
|
|
15332
|
+
try {
|
|
15333
|
+
return await rpcBlobPut(sanitizedName, data, mimeType);
|
|
15334
|
+
} catch (error) {
|
|
15335
|
+
console.error("[Blob] RPC error in blobPut:", error);
|
|
15336
|
+
return null;
|
|
15337
|
+
}
|
|
15338
|
+
}
|
|
15339
|
+
return null;
|
|
15340
|
+
}
|
|
15341
|
+
function experimental_blobPutSync(name, data, mimeType) {
|
|
15342
|
+
console.warn("[Blob] experimental_blobPutSync is deprecated. Use experimental_blobPut for cross-platform support.");
|
|
15343
|
+
return null;
|
|
15344
|
+
}
|
|
15345
|
+
async function experimental_blobGet(name) {
|
|
15346
|
+
const sanitizedName = sanitizeKey(name);
|
|
15347
|
+
if (isStorageRpcAvailable()) {
|
|
15348
|
+
try {
|
|
15349
|
+
return await rpcBlobGet(sanitizedName);
|
|
15350
|
+
} catch (error) {
|
|
15351
|
+
console.error("[Blob] RPC error in blobGet:", error);
|
|
15352
|
+
return null;
|
|
15353
|
+
}
|
|
15354
|
+
}
|
|
15355
|
+
return null;
|
|
15356
|
+
}
|
|
15357
|
+
function experimental_blobGetSync(name) {
|
|
15358
|
+
console.warn("[Blob] experimental_blobGetSync is deprecated. Use experimental_blobGet for cross-platform support.");
|
|
15359
|
+
return null;
|
|
15360
|
+
}
|
|
15361
|
+
async function experimental_blobDelete(name) {
|
|
15362
|
+
const sanitizedName = sanitizeKey(name);
|
|
15363
|
+
if (isStorageRpcAvailable()) {
|
|
15364
|
+
try {
|
|
15365
|
+
return await rpcBlobDelete(sanitizedName);
|
|
15366
|
+
} catch (error) {
|
|
15367
|
+
console.error("[Blob] RPC error in blobDelete:", error);
|
|
15368
|
+
return false;
|
|
15369
|
+
}
|
|
15370
|
+
}
|
|
15371
|
+
return false;
|
|
15372
|
+
}
|
|
15373
|
+
function experimental_blobDeleteSync(name) {
|
|
15374
|
+
console.warn("[Blob] experimental_blobDeleteSync is deprecated. Use experimental_blobDelete for cross-platform support.");
|
|
15375
|
+
return false;
|
|
15376
|
+
}
|
|
15377
|
+
async function experimental_blobList(prefix) {
|
|
15378
|
+
const sanitizedPrefix = prefix ? sanitizeKey(prefix) : void 0;
|
|
15379
|
+
if (isStorageRpcAvailable()) {
|
|
15380
|
+
try {
|
|
15381
|
+
return await rpcBlobList(sanitizedPrefix);
|
|
15382
|
+
} catch (error) {
|
|
15383
|
+
console.error("[Blob] RPC error in blobList:", error);
|
|
15384
|
+
return null;
|
|
15385
|
+
}
|
|
15386
|
+
}
|
|
15387
|
+
return null;
|
|
15388
|
+
}
|
|
15389
|
+
function experimental_blobListSync(prefix) {
|
|
15390
|
+
console.warn("[Blob] experimental_blobListSync is deprecated. Use experimental_blobList for cross-platform support.");
|
|
15391
|
+
return null;
|
|
15392
|
+
}
|
|
14834
15393
|
async function experimental_sampleMessage(params) {
|
|
14835
15394
|
const server = getCurrentServer();
|
|
14836
15395
|
if (!server) {
|
|
@@ -14838,7 +15397,7 @@ async function experimental_sampleMessage(params) {
|
|
|
14838
15397
|
}
|
|
14839
15398
|
const rawResult = await server.server.request(
|
|
14840
15399
|
{ method: "sampling/createMessage", params },
|
|
14841
|
-
|
|
15400
|
+
z4.record(z4.unknown())
|
|
14842
15401
|
);
|
|
14843
15402
|
const result = rawResult;
|
|
14844
15403
|
const content = result.content;
|
|
@@ -14883,6 +15442,40 @@ var exp = {
|
|
|
14883
15442
|
mkdirSync: experimental_mkdirSync,
|
|
14884
15443
|
readdirSync: experimental_readdirSync,
|
|
14885
15444
|
rmdirSync: experimental_rmdirSync,
|
|
15445
|
+
// KV Store
|
|
15446
|
+
kvIsAvailable: experimental_kvIsAvailable,
|
|
15447
|
+
kvGet: experimental_kvGet,
|
|
15448
|
+
kvSet: experimental_kvSet,
|
|
15449
|
+
kvDelete: experimental_kvDelete,
|
|
15450
|
+
kvList: experimental_kvList,
|
|
15451
|
+
kvListWithValues: experimental_kvListWithValues,
|
|
15452
|
+
kvSearch: experimental_kvSearch,
|
|
15453
|
+
vectorIsAvailable: experimental_vectorIsAvailable,
|
|
15454
|
+
vectorUpsert: experimental_vectorUpsert,
|
|
15455
|
+
vectorSearch: experimental_vectorSearch,
|
|
15456
|
+
vectorDelete: experimental_vectorDelete,
|
|
15457
|
+
/** @deprecated Use kvGet instead */
|
|
15458
|
+
kvGetSync: experimental_kvGetSync,
|
|
15459
|
+
/** @deprecated Use kvSet instead */
|
|
15460
|
+
kvSetSync: experimental_kvSetSync,
|
|
15461
|
+
/** @deprecated Use kvDelete instead */
|
|
15462
|
+
kvDeleteSync: experimental_kvDeleteSync,
|
|
15463
|
+
/** @deprecated Use kvList instead */
|
|
15464
|
+
kvListSync: experimental_kvListSync,
|
|
15465
|
+
// Blob Store
|
|
15466
|
+
blobIsAvailable: experimental_blobIsAvailable,
|
|
15467
|
+
blobPut: experimental_blobPut,
|
|
15468
|
+
blobGet: experimental_blobGet,
|
|
15469
|
+
blobDelete: experimental_blobDelete,
|
|
15470
|
+
blobList: experimental_blobList,
|
|
15471
|
+
/** @deprecated Use blobPut instead */
|
|
15472
|
+
blobPutSync: experimental_blobPutSync,
|
|
15473
|
+
/** @deprecated Use blobGet instead */
|
|
15474
|
+
blobGetSync: experimental_blobGetSync,
|
|
15475
|
+
/** @deprecated Use blobDelete instead */
|
|
15476
|
+
blobDeleteSync: experimental_blobDeleteSync,
|
|
15477
|
+
/** @deprecated Use blobList instead */
|
|
15478
|
+
blobListSync: experimental_blobListSync,
|
|
14886
15479
|
sampleMessage: experimental_sampleMessage
|
|
14887
15480
|
};
|
|
14888
15481
|
export {
|
|
@@ -14890,6 +15483,15 @@ export {
|
|
|
14890
15483
|
MIME_TYPES,
|
|
14891
15484
|
createApp,
|
|
14892
15485
|
exp,
|
|
15486
|
+
experimental_blobDelete,
|
|
15487
|
+
experimental_blobDeleteSync,
|
|
15488
|
+
experimental_blobGet,
|
|
15489
|
+
experimental_blobGetSync,
|
|
15490
|
+
experimental_blobIsAvailable,
|
|
15491
|
+
experimental_blobList,
|
|
15492
|
+
experimental_blobListSync,
|
|
15493
|
+
experimental_blobPut,
|
|
15494
|
+
experimental_blobPutSync,
|
|
14893
15495
|
experimental_deleteFile,
|
|
14894
15496
|
experimental_deleteFileSync,
|
|
14895
15497
|
experimental_exists,
|
|
@@ -14897,6 +15499,16 @@ export {
|
|
|
14897
15499
|
experimental_getProjectId,
|
|
14898
15500
|
experimental_getServerName,
|
|
14899
15501
|
experimental_getWritableDirectory,
|
|
15502
|
+
experimental_kvDelete,
|
|
15503
|
+
experimental_kvDeleteSync,
|
|
15504
|
+
experimental_kvGet,
|
|
15505
|
+
experimental_kvGetSync,
|
|
15506
|
+
experimental_kvIsAvailable,
|
|
15507
|
+
experimental_kvList,
|
|
15508
|
+
experimental_kvListSync,
|
|
15509
|
+
experimental_kvSearch,
|
|
15510
|
+
experimental_kvSet,
|
|
15511
|
+
experimental_kvSetSync,
|
|
14900
15512
|
experimental_mkdir,
|
|
14901
15513
|
experimental_mkdirSync,
|
|
14902
15514
|
experimental_readFile,
|
|
@@ -14906,6 +15518,10 @@ export {
|
|
|
14906
15518
|
experimental_rmdir,
|
|
14907
15519
|
experimental_rmdirSync,
|
|
14908
15520
|
experimental_sampleMessage,
|
|
15521
|
+
experimental_vectorDelete,
|
|
15522
|
+
experimental_vectorIsAvailable,
|
|
15523
|
+
experimental_vectorSearch,
|
|
15524
|
+
experimental_vectorUpsert,
|
|
14909
15525
|
experimental_writeFile,
|
|
14910
15526
|
experimental_writeFileSync,
|
|
14911
15527
|
htmlLoader,
|